@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
|
@@ -1333,6 +1333,17 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1333
1333
|
}
|
|
1334
1334
|
});
|
|
1335
1335
|
//#endregion
|
|
1336
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1337
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1338
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1339
|
+
method: "GET",
|
|
1340
|
+
revalidate: 60,
|
|
1341
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1342
|
+
auth: "public",
|
|
1343
|
+
responseKind: "json",
|
|
1344
|
+
errors: []
|
|
1345
|
+
} });
|
|
1346
|
+
//#endregion
|
|
1336
1347
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1337
1348
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1338
1349
|
listSiteApiKeys: {
|
|
@@ -1459,13 +1470,249 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1459
1470
|
"resource:conflict",
|
|
1460
1471
|
"server:internal_error"
|
|
1461
1472
|
]
|
|
1473
|
+
},
|
|
1474
|
+
updateEventIdentity: {
|
|
1475
|
+
path: "/sites/{siteId}/bookings/events/{eventId}",
|
|
1476
|
+
method: "PATCH",
|
|
1477
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1478
|
+
auth: "user",
|
|
1479
|
+
responseKind: "json",
|
|
1480
|
+
errors: [
|
|
1481
|
+
"validation:invalid_input",
|
|
1482
|
+
"resource:not_found",
|
|
1483
|
+
"server:internal_error"
|
|
1484
|
+
]
|
|
1485
|
+
},
|
|
1486
|
+
createWholeSeriesRun: {
|
|
1487
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
1488
|
+
method: "POST",
|
|
1489
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1490
|
+
auth: "user",
|
|
1491
|
+
responseKind: "json",
|
|
1492
|
+
errors: [
|
|
1493
|
+
"validation:invalid_input",
|
|
1494
|
+
"resource:not_found",
|
|
1495
|
+
"resource:already_exists",
|
|
1496
|
+
"server:internal_error"
|
|
1497
|
+
]
|
|
1498
|
+
},
|
|
1499
|
+
updateWholeSeriesRun: {
|
|
1500
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}",
|
|
1501
|
+
method: "PATCH",
|
|
1502
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1503
|
+
auth: "user",
|
|
1504
|
+
responseKind: "json",
|
|
1505
|
+
errors: [
|
|
1506
|
+
"validation:invalid_input",
|
|
1507
|
+
"resource:not_found",
|
|
1508
|
+
"resource:conflict",
|
|
1509
|
+
"server:internal_error"
|
|
1510
|
+
]
|
|
1511
|
+
},
|
|
1512
|
+
cancelWholeSeriesRun: {
|
|
1513
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
1514
|
+
method: "POST",
|
|
1515
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1516
|
+
auth: "user",
|
|
1517
|
+
responseKind: "json",
|
|
1518
|
+
errors: [
|
|
1519
|
+
"validation:invalid_input",
|
|
1520
|
+
"resource:not_found",
|
|
1521
|
+
"resource:conflict",
|
|
1522
|
+
"server:internal_error"
|
|
1523
|
+
]
|
|
1524
|
+
}
|
|
1525
|
+
});
|
|
1526
|
+
//#endregion
|
|
1527
|
+
//#region ../api/src/giftingEndpointDefinitions.ts
|
|
1528
|
+
/**
|
|
1529
|
+
* Gifting endpoints (gift cards & vouchers) — the dashboard surface that manages
|
|
1530
|
+
* offers, gifts and settings, plus the public buy/claim surface.
|
|
1531
|
+
*/
|
|
1532
|
+
const GIFTING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1533
|
+
createGiftingOffer: {
|
|
1534
|
+
path: "/sites/{siteId}/gifting/offers",
|
|
1535
|
+
method: "POST",
|
|
1536
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1537
|
+
auth: "user",
|
|
1538
|
+
responseKind: "json",
|
|
1539
|
+
errors: [
|
|
1540
|
+
"validation:invalid_input",
|
|
1541
|
+
"auth:forbidden",
|
|
1542
|
+
"server:internal_error"
|
|
1543
|
+
]
|
|
1544
|
+
},
|
|
1545
|
+
updateGiftingOffer: {
|
|
1546
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1547
|
+
method: "PATCH",
|
|
1548
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1549
|
+
auth: "user",
|
|
1550
|
+
responseKind: "json",
|
|
1551
|
+
errors: [
|
|
1552
|
+
"validation:invalid_input",
|
|
1553
|
+
"auth:forbidden",
|
|
1554
|
+
"resource:not_found",
|
|
1555
|
+
"resource:conflict",
|
|
1556
|
+
"server:internal_error"
|
|
1557
|
+
]
|
|
1558
|
+
},
|
|
1559
|
+
deleteGiftingOffer: {
|
|
1560
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1561
|
+
method: "DELETE",
|
|
1562
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1563
|
+
auth: "user",
|
|
1564
|
+
responseKind: "json",
|
|
1565
|
+
errors: [
|
|
1566
|
+
"auth:forbidden",
|
|
1567
|
+
"resource:not_found",
|
|
1568
|
+
"resource:conflict",
|
|
1569
|
+
"server:internal_error"
|
|
1570
|
+
]
|
|
1571
|
+
},
|
|
1572
|
+
duplicateGiftingOffer: {
|
|
1573
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}/duplicate",
|
|
1574
|
+
method: "POST",
|
|
1575
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1576
|
+
auth: "user",
|
|
1577
|
+
responseKind: "json",
|
|
1578
|
+
errors: [
|
|
1579
|
+
"auth:forbidden",
|
|
1580
|
+
"resource:not_found",
|
|
1581
|
+
"server:internal_error"
|
|
1582
|
+
]
|
|
1583
|
+
},
|
|
1584
|
+
reorderGiftingOffers: {
|
|
1585
|
+
path: "/sites/{siteId}/gifting/offers/order",
|
|
1586
|
+
method: "PUT",
|
|
1587
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1588
|
+
auth: "user",
|
|
1589
|
+
responseKind: "json",
|
|
1590
|
+
errors: [
|
|
1591
|
+
"validation:invalid_input",
|
|
1592
|
+
"auth:forbidden",
|
|
1593
|
+
"resource:not_found",
|
|
1594
|
+
"server:internal_error"
|
|
1595
|
+
]
|
|
1596
|
+
},
|
|
1597
|
+
sendGift: {
|
|
1598
|
+
path: "/sites/{siteId}/gifting/gifts",
|
|
1599
|
+
method: "POST",
|
|
1600
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1601
|
+
auth: "user",
|
|
1602
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1603
|
+
responseKind: "json",
|
|
1604
|
+
errors: [
|
|
1605
|
+
"validation:invalid_input",
|
|
1606
|
+
"auth:forbidden",
|
|
1607
|
+
"resource:not_found",
|
|
1608
|
+
"server:internal_error"
|
|
1609
|
+
]
|
|
1610
|
+
},
|
|
1611
|
+
resendGift: {
|
|
1612
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/resend",
|
|
1613
|
+
method: "POST",
|
|
1614
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1615
|
+
auth: "user",
|
|
1616
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1617
|
+
responseKind: "json",
|
|
1618
|
+
errors: [
|
|
1619
|
+
"auth:forbidden",
|
|
1620
|
+
"resource:not_found",
|
|
1621
|
+
"resource:conflict",
|
|
1622
|
+
"server:internal_error"
|
|
1623
|
+
]
|
|
1624
|
+
},
|
|
1625
|
+
correctGiftEmailAndResend: {
|
|
1626
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/correct-email-and-resend",
|
|
1627
|
+
method: "POST",
|
|
1628
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1629
|
+
auth: "user",
|
|
1630
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1631
|
+
responseKind: "json",
|
|
1632
|
+
errors: [
|
|
1633
|
+
"validation:invalid_input",
|
|
1634
|
+
"auth:forbidden",
|
|
1635
|
+
"resource:not_found",
|
|
1636
|
+
"resource:conflict",
|
|
1637
|
+
"server:internal_error"
|
|
1638
|
+
]
|
|
1639
|
+
},
|
|
1640
|
+
updateGiftingSettings: {
|
|
1641
|
+
path: "/sites/{siteId}/gifting/settings",
|
|
1642
|
+
method: "PATCH",
|
|
1643
|
+
tags: [
|
|
1644
|
+
"site-{siteId}",
|
|
1645
|
+
"gifting-offers-{siteId}",
|
|
1646
|
+
"gifting-gifts-{siteId}"
|
|
1647
|
+
],
|
|
1648
|
+
auth: "user",
|
|
1649
|
+
responseKind: "json",
|
|
1650
|
+
errors: [
|
|
1651
|
+
"validation:invalid_input",
|
|
1652
|
+
"auth:forbidden",
|
|
1653
|
+
"server:internal_error"
|
|
1654
|
+
]
|
|
1655
|
+
},
|
|
1656
|
+
listPublicGiftingOffers: {
|
|
1657
|
+
path: "/public/sites/{siteId}/gifting/offers",
|
|
1658
|
+
method: "GET",
|
|
1659
|
+
revalidate: 300,
|
|
1660
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1661
|
+
errors: [],
|
|
1662
|
+
auth: "public",
|
|
1663
|
+
responseKind: "json"
|
|
1664
|
+
},
|
|
1665
|
+
createPublicGiftingCheckout: {
|
|
1666
|
+
path: "/public/sites/{siteId}/gifting/checkout",
|
|
1667
|
+
method: "POST",
|
|
1668
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1669
|
+
errors: [],
|
|
1670
|
+
auth: "public",
|
|
1671
|
+
responseKind: "json"
|
|
1672
|
+
},
|
|
1673
|
+
claimGiftCardPublic: {
|
|
1674
|
+
path: "/public/sites/{siteId}/gifting/claim",
|
|
1675
|
+
method: "POST",
|
|
1676
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1677
|
+
errors: [],
|
|
1678
|
+
auth: "public",
|
|
1679
|
+
responseKind: "json"
|
|
1462
1680
|
}
|
|
1463
1681
|
});
|
|
1464
|
-
|
|
1682
|
+
//#endregion
|
|
1683
|
+
//#region ../api/src/sdkEndpointDefinitions.ts
|
|
1684
|
+
/** SDK management endpoints that do not belong to a CRUD resource family. */
|
|
1685
|
+
const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1686
|
+
sdkUpdateSettings: {
|
|
1687
|
+
path: "/sdk/{siteId}/settings",
|
|
1688
|
+
method: "PATCH",
|
|
1689
|
+
auth: "service",
|
|
1690
|
+
responseKind: "json",
|
|
1691
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1692
|
+
},
|
|
1693
|
+
sdkConfigureBookingVertical: {
|
|
1694
|
+
path: "/sdk/{siteId}/settings/booking/vertical",
|
|
1695
|
+
method: "POST",
|
|
1696
|
+
auth: "service",
|
|
1697
|
+
responseKind: "json"
|
|
1698
|
+
},
|
|
1699
|
+
sdkSetupRevalidationWebhook: {
|
|
1700
|
+
path: "/sdk/{siteId}/webhooks/revalidation/setup",
|
|
1701
|
+
method: "POST",
|
|
1702
|
+
auth: "service",
|
|
1703
|
+
responseKind: "json",
|
|
1704
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
({
|
|
1708
|
+
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
1709
|
+
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
1710
|
+
...GIFTING_ENDPOINT_DEFINITIONS
|
|
1711
|
+
}), TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, { ...SITE_API_KEY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, {
|
|
1465
1712
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
1466
1713
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
1467
1714
|
...COURSE_ENDPOINT_DEFINITIONS
|
|
1468
|
-
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.formById, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEventFilters, { ...PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicTeamMembers, TAG_TEMPLATES.publicWholeSeriesOfferings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicPasses, TAG_TEMPLATES.publicMemberships, TAG_TEMPLATES.publicProducts, TAG_TEMPLATES.
|
|
1715
|
+
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.formById, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEventFilters, { ...PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicTeamMembers, TAG_TEMPLATES.publicWholeSeriesOfferings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicPasses, TAG_TEMPLATES.publicMemberships, TAG_TEMPLATES.publicProducts, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
|
|
1469
1716
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
1470
1717
|
z.object({
|
|
1471
1718
|
accessToken: z.string().min(1).max(4096),
|
|
@@ -1935,6 +2182,298 @@ function parseManagementKey(raw) {
|
|
|
1935
2182
|
if (typeof raw !== "string" || !raw.startsWith("bld_mgmt_sk_") || raw.length === 12) return err({ kind: "invalid-management-key" });
|
|
1936
2183
|
return ok(createSecretInternal("management-key", raw));
|
|
1937
2184
|
}
|
|
2185
|
+
//#endregion
|
|
2186
|
+
//#region ../core/src/event-series-behaviour.ts
|
|
2187
|
+
const SURFACE_EVENT_PRESET_VALUES = [
|
|
2188
|
+
"class",
|
|
2189
|
+
"course",
|
|
2190
|
+
"term",
|
|
2191
|
+
"workshop",
|
|
2192
|
+
"retreat",
|
|
2193
|
+
"performance"
|
|
2194
|
+
];
|
|
2195
|
+
//#endregion
|
|
2196
|
+
//#region ../core/src/booking-vertical-preset.ts
|
|
2197
|
+
const BOOKING_ENGINE_BY_BEHAVIOUR = {
|
|
2198
|
+
class: "event_series",
|
|
2199
|
+
workshop: "event_series",
|
|
2200
|
+
course: "event_series",
|
|
2201
|
+
retreat: "event_series",
|
|
2202
|
+
performance: "event_series",
|
|
2203
|
+
appointment: "appointment_service"
|
|
2204
|
+
};
|
|
2205
|
+
function verticalBookingPreset(id, verticalId, canonicalBehaviour, label, pluralLabel, description, availability = "onboarding") {
|
|
2206
|
+
return {
|
|
2207
|
+
id,
|
|
2208
|
+
verticalId,
|
|
2209
|
+
canonicalBehaviour,
|
|
2210
|
+
engine: BOOKING_ENGINE_BY_BEHAVIOUR[canonicalBehaviour],
|
|
2211
|
+
availability,
|
|
2212
|
+
label,
|
|
2213
|
+
pluralLabel,
|
|
2214
|
+
description
|
|
2215
|
+
};
|
|
2216
|
+
}
|
|
2217
|
+
//#endregion
|
|
2218
|
+
//#region ../core/src/booking-vertical-definitions.ts
|
|
2219
|
+
const VERTICAL_DEFINITIONS = [
|
|
2220
|
+
{
|
|
2221
|
+
id: "yoga_wellness",
|
|
2222
|
+
label: "Yoga, meditation or mindfulness",
|
|
2223
|
+
description: "Yoga studios, wellness teachers, and movement practitioners."
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
id: "fitness_pt",
|
|
2227
|
+
label: "Fitness and personal training",
|
|
2228
|
+
description: "Personal trainers, group training, and fitness programmes."
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
id: "dance_school",
|
|
2232
|
+
label: "Dance school",
|
|
2233
|
+
description: "Dance classes, courses or terms, workshops, private lessons, and shows."
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
id: "physiotherapy_physical_health",
|
|
2237
|
+
label: "Physiotherapy & physical health",
|
|
2238
|
+
description: "Physiotherapists, chiropractors, osteopaths, sports therapists, and rehabilitation practitioners."
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
id: "massage_bodywork",
|
|
2242
|
+
label: "Massage & bodywork",
|
|
2243
|
+
description: "Massage therapists, bodyworkers, and somatic practitioners."
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
id: "therapist_practitioner",
|
|
2247
|
+
label: "Therapist or practitioner",
|
|
2248
|
+
description: "Appointments, sessions, consultations, and occasional group work."
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
id: "beauty_spa",
|
|
2252
|
+
label: "Beauty or spa",
|
|
2253
|
+
description: "Treatment-led businesses with optional workshops."
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
id: "consultant_coach",
|
|
2257
|
+
label: "Consultant or coach",
|
|
2258
|
+
description: "One-to-one calls, workshops, courses, and retreats."
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
id: "training_provider",
|
|
2262
|
+
label: "Training provider",
|
|
2263
|
+
description: "Courses, workshops, classes, appointments, and residential training."
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
id: "retreat_centre",
|
|
2267
|
+
label: "Retreat centre",
|
|
2268
|
+
description: "Residential retreats, workshops, classes, courses, and private sessions."
|
|
2269
|
+
},
|
|
2270
|
+
{
|
|
2271
|
+
id: "music_school",
|
|
2272
|
+
label: "Music teacher or school",
|
|
2273
|
+
description: "Lessons, classes, terms, workshops, and performances."
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
id: "voice_singing",
|
|
2277
|
+
label: "Voice & Singing",
|
|
2278
|
+
description: "Singing lessons, choirs, voice circles, workshops, and performances."
|
|
2279
|
+
},
|
|
2280
|
+
{
|
|
2281
|
+
id: "performing_arts_school",
|
|
2282
|
+
label: "Theatre or performing arts school",
|
|
2283
|
+
description: "Classes, terms, workshops, performances, and lessons."
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
id: "community_wellbeing",
|
|
2287
|
+
label: "Community or wellbeing centre",
|
|
2288
|
+
description: "Groups, workshops, courses, appointments, and retreats."
|
|
2289
|
+
},
|
|
2290
|
+
{
|
|
2291
|
+
id: "venue_event_space",
|
|
2292
|
+
label: "Venue or event space",
|
|
2293
|
+
description: "Room, resource, or access bookings. Depends on the future capacity-booking domain."
|
|
2294
|
+
}
|
|
2295
|
+
];
|
|
2296
|
+
VERTICAL_DEFINITIONS.map(({ id }) => id);
|
|
2297
|
+
//#endregion
|
|
2298
|
+
//#region ../core/src/booking-vertical-catalog.ts
|
|
2299
|
+
const VERTICAL_BOOKING_PRESETS = [
|
|
2300
|
+
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
2301
|
+
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
2302
|
+
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
2303
|
+
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
2304
|
+
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
2305
|
+
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
2306
|
+
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
2307
|
+
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
2308
|
+
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
2309
|
+
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
2310
|
+
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
2311
|
+
{
|
|
2312
|
+
...verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2313
|
+
eventPresetOverride: "term"
|
|
2314
|
+
},
|
|
2315
|
+
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
2316
|
+
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2317
|
+
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
2318
|
+
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
2319
|
+
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
2320
|
+
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
2321
|
+
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
2322
|
+
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
2323
|
+
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
2324
|
+
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
2325
|
+
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
2326
|
+
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
2327
|
+
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
2328
|
+
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
2329
|
+
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
2330
|
+
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
2331
|
+
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
2332
|
+
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
2333
|
+
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
2334
|
+
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
2335
|
+
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
2336
|
+
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
2337
|
+
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
2338
|
+
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
2339
|
+
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
2340
|
+
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
2341
|
+
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
2342
|
+
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
2343
|
+
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
2344
|
+
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
2345
|
+
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
2346
|
+
{
|
|
2347
|
+
...verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
2348
|
+
eventPresetOverride: "term"
|
|
2349
|
+
},
|
|
2350
|
+
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2351
|
+
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
2352
|
+
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
2353
|
+
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
2354
|
+
{
|
|
2355
|
+
...verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
2356
|
+
eventPresetOverride: "term"
|
|
2357
|
+
},
|
|
2358
|
+
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
2359
|
+
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
2360
|
+
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
2361
|
+
{
|
|
2362
|
+
...verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2363
|
+
eventPresetOverride: "term"
|
|
2364
|
+
},
|
|
2365
|
+
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2366
|
+
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
2367
|
+
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
2368
|
+
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
2369
|
+
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
2370
|
+
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
2371
|
+
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
2372
|
+
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
2373
|
+
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
2374
|
+
];
|
|
2375
|
+
//#endregion
|
|
2376
|
+
//#region ../core/src/booking-vertical-config.ts
|
|
2377
|
+
const VERTICAL_ID_SET = new Set(VERTICAL_DEFINITIONS.map(({ id }) => id));
|
|
2378
|
+
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
2379
|
+
function parseVerticalId(value) {
|
|
2380
|
+
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
2381
|
+
}
|
|
2382
|
+
function parseVerticalPresetId(value) {
|
|
2383
|
+
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
2384
|
+
}
|
|
2385
|
+
function getVerticalPresetDefinition(presetId) {
|
|
2386
|
+
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
2387
|
+
if (definition === void 0) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
2388
|
+
return definition;
|
|
2389
|
+
}
|
|
2390
|
+
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
2391
|
+
return {
|
|
2392
|
+
verticalId,
|
|
2393
|
+
selectedPresetIds
|
|
2394
|
+
};
|
|
2395
|
+
}
|
|
2396
|
+
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
2397
|
+
const firstPresetId = presetIds[0];
|
|
2398
|
+
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
2399
|
+
}
|
|
2400
|
+
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
2401
|
+
verticalId: null,
|
|
2402
|
+
selectedPresetIds: []
|
|
2403
|
+
};
|
|
2404
|
+
function appendUniqueIssue(issues, issue) {
|
|
2405
|
+
return issues.some((existing) => existing.code === issue.code) ? issues : [...issues, issue];
|
|
2406
|
+
}
|
|
2407
|
+
function collectRawConfigIssues(rawConfig, config) {
|
|
2408
|
+
const rawPresetValue = rawConfig.selectedPresetIds;
|
|
2409
|
+
const rawPresetIds = Array.isArray(rawPresetValue) ? rawPresetValue : [];
|
|
2410
|
+
let issues = [];
|
|
2411
|
+
if (rawConfig.verticalId != null && config.verticalId === null) issues = appendUniqueIssue(issues, {
|
|
2412
|
+
code: "unknown_vertical",
|
|
2413
|
+
rawValue: rawConfig.verticalId
|
|
2414
|
+
});
|
|
2415
|
+
if (config.verticalId === null && config.selectedPresetIds.length > 0) issues = appendUniqueIssue(issues, { code: "missing_vertical" });
|
|
2416
|
+
if (rawPresetValue !== void 0 && !Array.isArray(rawPresetValue) || rawPresetIds.some((presetId) => parseVerticalPresetId(presetId) === null)) issues = appendUniqueIssue(issues, {
|
|
2417
|
+
code: "unknown_preset",
|
|
2418
|
+
rawValue: rawPresetValue
|
|
2419
|
+
});
|
|
2420
|
+
if (rawConfig.verticalId != null && config.selectedPresetIds.length === 0) issues = appendUniqueIssue(issues, { code: "empty_selected_presets" });
|
|
2421
|
+
return issues;
|
|
2422
|
+
}
|
|
2423
|
+
function collectPresetConfigIssues(config) {
|
|
2424
|
+
const seenPresetIds = /* @__PURE__ */ new Set();
|
|
2425
|
+
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
2426
|
+
let issues = [];
|
|
2427
|
+
for (const presetId of config.selectedPresetIds) {
|
|
2428
|
+
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
2429
|
+
if (seenPresetIds.has(presetId)) issues = appendUniqueIssue(issues, { code: "duplicate_preset_id" });
|
|
2430
|
+
seenPresetIds.add(presetId);
|
|
2431
|
+
if (config.verticalId !== null && presetDefinition.verticalId !== config.verticalId) issues = appendUniqueIssue(issues, { code: "preset_vertical_mismatch" });
|
|
2432
|
+
if (presetDefinition.availability === "future") issues = appendUniqueIssue(issues, { code: "future_preset_selected" });
|
|
2433
|
+
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues = appendUniqueIssue(issues, { code: "duplicate_canonical_behaviour" });
|
|
2434
|
+
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
2435
|
+
}
|
|
2436
|
+
return issues;
|
|
2437
|
+
}
|
|
2438
|
+
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
2439
|
+
let issues = collectRawConfigIssues(rawConfig, config);
|
|
2440
|
+
for (const issue of collectPresetConfigIssues(config)) issues = appendUniqueIssue(issues, issue);
|
|
2441
|
+
return issues;
|
|
2442
|
+
}
|
|
2443
|
+
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
2444
|
+
if (rawConfig == null) return {
|
|
2445
|
+
kind: "unconfigured",
|
|
2446
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2447
|
+
};
|
|
2448
|
+
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
2449
|
+
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
2450
|
+
const config = {
|
|
2451
|
+
verticalId,
|
|
2452
|
+
selectedPresetIds
|
|
2453
|
+
};
|
|
2454
|
+
if (rawConfig.verticalId == null && selectedPresetIds.length === 0) return {
|
|
2455
|
+
kind: "unconfigured",
|
|
2456
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2457
|
+
};
|
|
2458
|
+
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
2459
|
+
if (issues.length > 0) return {
|
|
2460
|
+
kind: "invalid",
|
|
2461
|
+
config,
|
|
2462
|
+
issues
|
|
2463
|
+
};
|
|
2464
|
+
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
2465
|
+
const configuredConfig = verticalId !== null && nonEmptyPresetIds !== null ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
2466
|
+
if (configuredConfig === null) return {
|
|
2467
|
+
kind: "invalid",
|
|
2468
|
+
config,
|
|
2469
|
+
issues: [{ code: "empty_selected_presets" }]
|
|
2470
|
+
};
|
|
2471
|
+
return {
|
|
2472
|
+
kind: "configured",
|
|
2473
|
+
config: configuredConfig,
|
|
2474
|
+
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
2475
|
+
};
|
|
2476
|
+
}
|
|
1938
2477
|
z.object({
|
|
1939
2478
|
formulaVersion: z.literal("managed-domain-overage-v1"),
|
|
1940
2479
|
conversionRule: z.literal("usd-to-gbp-1-to-1-v1"),
|
|
@@ -1946,6 +2485,68 @@ z.object({
|
|
|
1946
2485
|
monthlyCurrency: z.literal("gbp")
|
|
1947
2486
|
});
|
|
1948
2487
|
//#endregion
|
|
2488
|
+
//#region ../blocks/src/system/types/link.ts
|
|
2489
|
+
const nullableString = z.union([z.string().min(1), z.null()]);
|
|
2490
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
2491
|
+
"page",
|
|
2492
|
+
"content",
|
|
2493
|
+
"pageSurface"
|
|
2494
|
+
];
|
|
2495
|
+
const resolvedInternalLinkKeys = [
|
|
2496
|
+
"entityId",
|
|
2497
|
+
"entityType",
|
|
2498
|
+
"href",
|
|
2499
|
+
"title",
|
|
2500
|
+
"typeLabel"
|
|
2501
|
+
];
|
|
2502
|
+
const internalRouteOnlyLinkSchema = z.object({
|
|
2503
|
+
kind: z.literal("internal"),
|
|
2504
|
+
routeId: z.string().min(1)
|
|
2505
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
2506
|
+
if (!resolvedInternalLinkKeys.some((key) => value[key] != null)) return;
|
|
2507
|
+
ctx.addIssue({
|
|
2508
|
+
code: "custom",
|
|
2509
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
2510
|
+
});
|
|
2511
|
+
});
|
|
2512
|
+
const internalResolvedLinkSchema = z.object({
|
|
2513
|
+
kind: z.literal("internal"),
|
|
2514
|
+
routeId: z.string().min(1),
|
|
2515
|
+
entityId: z.string().min(1),
|
|
2516
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
2517
|
+
href: z.string().min(1),
|
|
2518
|
+
title: z.string().min(1),
|
|
2519
|
+
typeLabel: z.string().min(1),
|
|
2520
|
+
contentTypeKey: nullableString.optional(),
|
|
2521
|
+
contentTypeName: nullableString.optional(),
|
|
2522
|
+
updatedAt: nullableString.optional()
|
|
2523
|
+
}).passthrough();
|
|
2524
|
+
const internalLinkSchema = z.union([internalResolvedLinkSchema, internalRouteOnlyLinkSchema]);
|
|
2525
|
+
const externalLinkSchema$1 = z.object({
|
|
2526
|
+
kind: z.literal("external"),
|
|
2527
|
+
href: z.string().min(1)
|
|
2528
|
+
}).passthrough();
|
|
2529
|
+
const customLinkSchema$1 = z.object({
|
|
2530
|
+
kind: z.literal("url"),
|
|
2531
|
+
href: z.string().min(1)
|
|
2532
|
+
}).passthrough();
|
|
2533
|
+
const pageLinkSchema$1 = z.object({
|
|
2534
|
+
kind: z.literal("page"),
|
|
2535
|
+
identifier: z.string().min(1)
|
|
2536
|
+
}).passthrough();
|
|
2537
|
+
const entryLinkSchema$1 = z.object({
|
|
2538
|
+
kind: z.literal("entry"),
|
|
2539
|
+
contentType: z.string().min(1),
|
|
2540
|
+
identifier: z.string().min(1)
|
|
2541
|
+
}).passthrough();
|
|
2542
|
+
z.union([
|
|
2543
|
+
internalLinkSchema,
|
|
2544
|
+
externalLinkSchema$1,
|
|
2545
|
+
customLinkSchema$1,
|
|
2546
|
+
pageLinkSchema$1,
|
|
2547
|
+
entryLinkSchema$1
|
|
2548
|
+
]);
|
|
2549
|
+
//#endregion
|
|
1949
2550
|
//#region ../api/src/navigation/contracts.ts
|
|
1950
2551
|
/**
|
|
1951
2552
|
* Canonical navigation/link Zod contracts.
|
|
@@ -1975,7 +2576,7 @@ const internalLinkPayloadSchema = z.object({
|
|
|
1975
2576
|
kind: z.literal("internal"),
|
|
1976
2577
|
routeId: z.string().uuid(),
|
|
1977
2578
|
entityId: z.string().uuid(),
|
|
1978
|
-
entityType: z.enum(
|
|
2579
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
1979
2580
|
href: z.string().min(1),
|
|
1980
2581
|
title: z.string().min(1),
|
|
1981
2582
|
typeLabel: z.string().min(1),
|
|
@@ -3847,6 +4448,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
3847
4448
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
3848
4449
|
return token;
|
|
3849
4450
|
});
|
|
4451
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
4452
|
+
kind: z.literal("shade-shift"),
|
|
4453
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
4454
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
4455
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
4456
|
+
});
|
|
3850
4457
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
3851
4458
|
const buttonShadowIntensitySchema = z.enum([
|
|
3852
4459
|
"subtle",
|
|
@@ -4186,6 +4793,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
4186
4793
|
shadow: variantShadowSchema.optional(),
|
|
4187
4794
|
border: buttonBorderSchema.optional(),
|
|
4188
4795
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
4796
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
4189
4797
|
effects: variantEffectsSchema.optional(),
|
|
4190
4798
|
sizes: variantSizeOverridesSchema.optional(),
|
|
4191
4799
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -4458,6 +5066,139 @@ function validateButtonTextContrast(input) {
|
|
|
4458
5066
|
};
|
|
4459
5067
|
}
|
|
4460
5068
|
//#endregion
|
|
5069
|
+
//#region ../theme-core/src/buttons/contextualHover.ts
|
|
5070
|
+
function resolveContextualHoverPreference(input) {
|
|
5071
|
+
const preferred = input.instruction.preferredToken;
|
|
5072
|
+
if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
|
|
5073
|
+
kind: "resolved",
|
|
5074
|
+
token: preferred,
|
|
5075
|
+
repair: null
|
|
5076
|
+
};
|
|
5077
|
+
const contextual = resolveContextualHover(input);
|
|
5078
|
+
return contextual.kind === "resolved" ? {
|
|
5079
|
+
kind: "resolved",
|
|
5080
|
+
token: contextual.token,
|
|
5081
|
+
repair: preferred ? {
|
|
5082
|
+
kind: "preferred-token-replaced",
|
|
5083
|
+
preferredToken: preferred,
|
|
5084
|
+
contextualToken: contextual.token
|
|
5085
|
+
} : null
|
|
5086
|
+
} : contextual;
|
|
5087
|
+
}
|
|
5088
|
+
/**
|
|
5089
|
+
* Resolves semantic shade movement from real palette steps. The persisted
|
|
5090
|
+
* instruction owns the colour family and deterministic unknown-surface
|
|
5091
|
+
* fallback; a proven surface may select the opposite direction when it gives
|
|
5092
|
+
* the button stronger separation while retaining the shared contrast contract.
|
|
5093
|
+
*/
|
|
5094
|
+
function resolveContextualHover(input) {
|
|
5095
|
+
const candidates = shadeCandidates(input.instruction.seedToken, input.palette);
|
|
5096
|
+
if (candidates.length === 0) return {
|
|
5097
|
+
kind: "unavailable",
|
|
5098
|
+
reason: "no-distinct-shade"
|
|
5099
|
+
};
|
|
5100
|
+
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
|
|
5101
|
+
if (textSafe.length === 0) return {
|
|
5102
|
+
kind: "unavailable",
|
|
5103
|
+
reason: "no-text-safe-candidate"
|
|
5104
|
+
};
|
|
5105
|
+
if (!input.surface) {
|
|
5106
|
+
const selected = textSafe.find((candidate) => candidate.direction === input.instruction.fallbackDirection) ?? textSafe[0];
|
|
5107
|
+
return selected ? {
|
|
5108
|
+
kind: "resolved",
|
|
5109
|
+
token: selected.token,
|
|
5110
|
+
direction: selected.direction,
|
|
5111
|
+
evidence: "fallback-direction"
|
|
5112
|
+
} : {
|
|
5113
|
+
kind: "unavailable",
|
|
5114
|
+
reason: "no-text-safe-candidate"
|
|
5115
|
+
};
|
|
5116
|
+
}
|
|
5117
|
+
const selected = textSafe.map((candidate) => ({
|
|
5118
|
+
...candidate,
|
|
5119
|
+
surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface?.backgroundHex ?? "")
|
|
5120
|
+
})).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
|
|
5121
|
+
const distanceDifference = left.distance - right.distance;
|
|
5122
|
+
if (distanceDifference !== 0) return distanceDifference;
|
|
5123
|
+
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
5124
|
+
if (contrastDifference !== 0) return contrastDifference;
|
|
5125
|
+
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
5126
|
+
return left.direction === input.instruction.fallbackDirection ? -1 : 1;
|
|
5127
|
+
})[0];
|
|
5128
|
+
return selected ? {
|
|
5129
|
+
kind: "resolved",
|
|
5130
|
+
token: selected.token,
|
|
5131
|
+
direction: selected.direction,
|
|
5132
|
+
evidence: "known-surface"
|
|
5133
|
+
} : {
|
|
5134
|
+
kind: "unavailable",
|
|
5135
|
+
reason: "no-surface-safe-candidate"
|
|
5136
|
+
};
|
|
5137
|
+
}
|
|
5138
|
+
function shadeCandidates(seedToken, palette) {
|
|
5139
|
+
const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
|
|
5140
|
+
const family = match?.[1] ?? String(seedToken);
|
|
5141
|
+
const currentShade = match?.[2] ? Number(match[2]) : 500;
|
|
5142
|
+
const seedHex = palette[seedToken];
|
|
5143
|
+
const shades = Object.keys(palette).flatMap((token) => {
|
|
5144
|
+
const shade = token.match(new RegExp(`^${escapeRegExp(family)}-(\\d{2,3})$`));
|
|
5145
|
+
return shade?.[1] ? [Number(shade[1])] : [];
|
|
5146
|
+
}).filter((shade) => Number.isFinite(shade)).sort((left, right) => left - right);
|
|
5147
|
+
const lower = [...shades].filter((shade) => shade < currentShade).sort((left, right) => right - left);
|
|
5148
|
+
const higher = shades.filter((shade) => shade > currentShade);
|
|
5149
|
+
return [...lower.map((shade) => candidate(family, shade, currentShade, "lighter", seedHex, palette)), ...higher.map((shade) => candidate(family, shade, currentShade, "darker", seedHex, palette))].filter((value) => value !== null);
|
|
5150
|
+
}
|
|
5151
|
+
function candidate(family, shade, currentShade, direction, seedHex, palette) {
|
|
5152
|
+
const token = parseOpaqueButtonColourToken(`${family}-${shade}`);
|
|
5153
|
+
if (token === null) return null;
|
|
5154
|
+
const candidateHex = palette[token];
|
|
5155
|
+
if (!candidateHex || candidateHex === seedHex) return null;
|
|
5156
|
+
return {
|
|
5157
|
+
token,
|
|
5158
|
+
direction,
|
|
5159
|
+
distance: Math.abs(shade - currentShade),
|
|
5160
|
+
surfaceContrast: null
|
|
5161
|
+
};
|
|
5162
|
+
}
|
|
5163
|
+
function hasSafeTextContrast(token, palette) {
|
|
5164
|
+
const background = palette[token];
|
|
5165
|
+
const foreground = palette[onColorTokenName(token)];
|
|
5166
|
+
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
5167
|
+
}
|
|
5168
|
+
function isSafeCandidate(token, palette, surface) {
|
|
5169
|
+
if (!hasSafeTextContrast(token, palette)) return false;
|
|
5170
|
+
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
5171
|
+
}
|
|
5172
|
+
function escapeRegExp(value) {
|
|
5173
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5174
|
+
}
|
|
5175
|
+
//#endregion
|
|
5176
|
+
//#region ../theme-core/src/buttons/resolveButtonHoverTreatment.ts
|
|
5177
|
+
function resolveButtonHoverTreatment(input) {
|
|
5178
|
+
if (input.variant.contextualHover) {
|
|
5179
|
+
const contextual = resolveContextualHoverPreference({
|
|
5180
|
+
instruction: input.variant.contextualHover,
|
|
5181
|
+
palette: input.palette,
|
|
5182
|
+
surface: input.surface
|
|
5183
|
+
});
|
|
5184
|
+
if (contextual.kind === "resolved") return {
|
|
5185
|
+
treatment: {
|
|
5186
|
+
type: "solid",
|
|
5187
|
+
colorToken: contextual.token
|
|
5188
|
+
},
|
|
5189
|
+
repair: contextual.repair
|
|
5190
|
+
};
|
|
5191
|
+
}
|
|
5192
|
+
const token = input.variant.hoverBackgroundToken ?? (input.global.hoverColor === "token" ? input.global.hoverColorToken : void 0);
|
|
5193
|
+
return {
|
|
5194
|
+
treatment: token === void 0 ? input.fallback : {
|
|
5195
|
+
type: "solid",
|
|
5196
|
+
colorToken: token
|
|
5197
|
+
},
|
|
5198
|
+
repair: null
|
|
5199
|
+
};
|
|
5200
|
+
}
|
|
5201
|
+
//#endregion
|
|
4461
5202
|
//#region ../theme-core/src/buttons/resolveButtonColourStates.ts
|
|
4462
5203
|
function compileButtonColourStates(input) {
|
|
4463
5204
|
const baseTransition = applyColourEffects({
|
|
@@ -4468,9 +5209,16 @@ function compileButtonColourStates(input) {
|
|
|
4468
5209
|
palette: input.palette
|
|
4469
5210
|
});
|
|
4470
5211
|
if (!baseTransition.ok) return baseTransition;
|
|
5212
|
+
const hover = resolveButtonHoverTreatment({
|
|
5213
|
+
variant: input.variant,
|
|
5214
|
+
global: input.global,
|
|
5215
|
+
fallback: baseTransition.treatment,
|
|
5216
|
+
palette: input.palette,
|
|
5217
|
+
surface: input.surface
|
|
5218
|
+
});
|
|
4471
5219
|
const stateTreatments = {
|
|
4472
5220
|
base: baseTransition.treatment,
|
|
4473
|
-
hover:
|
|
5221
|
+
hover: hover.treatment,
|
|
4474
5222
|
focus: baseTransition.treatment,
|
|
4475
5223
|
active: baseTransition.treatment,
|
|
4476
5224
|
disabled: baseTransition.treatment
|
|
@@ -4509,14 +5257,8 @@ function compileButtonColourStates(input) {
|
|
|
4509
5257
|
ok: true,
|
|
4510
5258
|
states: resolved,
|
|
4511
5259
|
focusIndicator: resolveFocusIndicator(resolved.focus),
|
|
4512
|
-
nonColourEffects
|
|
4513
|
-
|
|
4514
|
-
}
|
|
4515
|
-
function hoverTreatment(variant, global, fallback) {
|
|
4516
|
-
const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
|
|
4517
|
-
return token === void 0 ? fallback : {
|
|
4518
|
-
type: "solid",
|
|
4519
|
-
colorToken: token
|
|
5260
|
+
nonColourEffects,
|
|
5261
|
+
contextualHoverRepair: hover.repair
|
|
4520
5262
|
};
|
|
4521
5263
|
}
|
|
4522
5264
|
function applyColourEffects(input) {
|
|
@@ -5327,13 +6069,24 @@ function resolveContextualButtonRole(input) {
|
|
|
5327
6069
|
};
|
|
5328
6070
|
const rejected = [];
|
|
5329
6071
|
const preferred = compileCandidate(requested, input.buttonSystem, input.palette, input.surface);
|
|
5330
|
-
if (preferred.ok)
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
6072
|
+
if (preferred.ok) {
|
|
6073
|
+
if (preferred.contextualHoverRepair) return {
|
|
6074
|
+
kind: "repaired",
|
|
6075
|
+
requestedRole: input.role,
|
|
6076
|
+
candidate: "contextual-hover",
|
|
6077
|
+
states: preferred.states,
|
|
6078
|
+
focusIndicator: preferred.focusIndicator,
|
|
6079
|
+
boundary: boundaryForVariant(requested),
|
|
6080
|
+
rejectedCandidates: []
|
|
6081
|
+
};
|
|
6082
|
+
return {
|
|
6083
|
+
kind: "preferred",
|
|
6084
|
+
requestedRole: input.role,
|
|
6085
|
+
states: preferred.states,
|
|
6086
|
+
focusIndicator: preferred.focusIndicator,
|
|
6087
|
+
boundary: boundaryForVariant(requested)
|
|
6088
|
+
};
|
|
6089
|
+
}
|
|
5337
6090
|
rejected.push({
|
|
5338
6091
|
candidate: "preferred",
|
|
5339
6092
|
error: preferred.error
|
|
@@ -5453,6 +6206,7 @@ function candidateVariant(fallback, requested, system) {
|
|
|
5453
6206
|
},
|
|
5454
6207
|
border: { widthClass: "border" },
|
|
5455
6208
|
hoverBackgroundToken: void 0,
|
|
6209
|
+
contextualHover: void 0,
|
|
5456
6210
|
effects: void 0
|
|
5457
6211
|
},
|
|
5458
6212
|
boundary: {
|
|
@@ -5564,13 +6318,7 @@ function readNonEmptyString(value) {
|
|
|
5564
6318
|
buttonSizeNameSchema.options;
|
|
5565
6319
|
//#endregion
|
|
5566
6320
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
5567
|
-
const PUBLIC_BUTTON_ROLES =
|
|
5568
|
-
"primary",
|
|
5569
|
-
"secondary",
|
|
5570
|
-
"outline",
|
|
5571
|
-
"ghost",
|
|
5572
|
-
"accent"
|
|
5573
|
-
];
|
|
6321
|
+
const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
|
|
5574
6322
|
function defineButtonStyleRecipe(recipe) {
|
|
5575
6323
|
return recipe;
|
|
5576
6324
|
}
|
|
@@ -5666,6 +6414,14 @@ const BUTTON_STYLE_IDS = [
|
|
|
5666
6414
|
"quiet-arrow"
|
|
5667
6415
|
];
|
|
5668
6416
|
const quietArrowParametersSchema = z.object({ secondaryTreatment: z.enum(["outlined", "solid-accent"]) }).strict();
|
|
6417
|
+
const flatInkHoverTreatmentSchema = z.enum([
|
|
6418
|
+
"contextual",
|
|
6419
|
+
"secondary",
|
|
6420
|
+
"accent"
|
|
6421
|
+
]);
|
|
6422
|
+
const flatInkHoverPreferencesShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, flatInkHoverTreatmentSchema.optional()]));
|
|
6423
|
+
const flatInkHoverPreferencesSchema = z.strictObject(flatInkHoverPreferencesShape);
|
|
6424
|
+
const flatInkParametersSchema = z.strictObject({ hoverPreferences: flatInkHoverPreferencesSchema.optional() });
|
|
5669
6425
|
const emptyParametersSchema$1 = z.object({}).strict();
|
|
5670
6426
|
function selectionBranch(styleId, parameters) {
|
|
5671
6427
|
return z.object({
|
|
@@ -5680,7 +6436,7 @@ const buttonStyleSelectionSchema = z.discriminatedUnion("styleId", [
|
|
|
5680
6436
|
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
5681
6437
|
selectionBranch("pebble", emptyParametersSchema$1),
|
|
5682
6438
|
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
5683
|
-
selectionBranch("flat-ink",
|
|
6439
|
+
selectionBranch("flat-ink", flatInkParametersSchema),
|
|
5684
6440
|
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
5685
6441
|
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
5686
6442
|
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
@@ -5817,6 +6573,189 @@ const quietArrowRecipe = defineButtonStyleRecipe({
|
|
|
5817
6573
|
})
|
|
5818
6574
|
});
|
|
5819
6575
|
//#endregion
|
|
6576
|
+
//#region ../theme-core/src/buttons/styles/recipes/flatInk.ts
|
|
6577
|
+
const contextualRoleConfig = {
|
|
6578
|
+
primary: {
|
|
6579
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("primary"),
|
|
6580
|
+
fallbackDirection: "darker"
|
|
6581
|
+
},
|
|
6582
|
+
secondary: {
|
|
6583
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6584
|
+
fallbackDirection: "darker"
|
|
6585
|
+
},
|
|
6586
|
+
outline: {
|
|
6587
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6588
|
+
fallbackDirection: "darker"
|
|
6589
|
+
},
|
|
6590
|
+
ghost: {
|
|
6591
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6592
|
+
fallbackDirection: "darker"
|
|
6593
|
+
},
|
|
6594
|
+
accent: {
|
|
6595
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("accent"),
|
|
6596
|
+
fallbackDirection: "darker"
|
|
6597
|
+
}
|
|
6598
|
+
};
|
|
6599
|
+
const hoverControl = {
|
|
6600
|
+
kind: "button-hover-by-role",
|
|
6601
|
+
parameter: "hoverPreferences",
|
|
6602
|
+
label: "Button hover",
|
|
6603
|
+
roles: contextualRoleConfig,
|
|
6604
|
+
options: [
|
|
6605
|
+
{
|
|
6606
|
+
value: "contextual",
|
|
6607
|
+
label: "Contextual shade shift"
|
|
6608
|
+
},
|
|
6609
|
+
{
|
|
6610
|
+
value: "secondary",
|
|
6611
|
+
label: "Secondary button colour"
|
|
6612
|
+
},
|
|
6613
|
+
{
|
|
6614
|
+
value: "accent",
|
|
6615
|
+
label: "Accent button colour"
|
|
6616
|
+
}
|
|
6617
|
+
]
|
|
6618
|
+
};
|
|
6619
|
+
const lift = { effectId: "lift" };
|
|
6620
|
+
const flatInkRecipe = defineButtonStyleRecipe({
|
|
6621
|
+
id: "flat-ink",
|
|
6622
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
6623
|
+
tags: {
|
|
6624
|
+
tone: "classic",
|
|
6625
|
+
energy: "calm",
|
|
6626
|
+
motion: "subtle",
|
|
6627
|
+
era: "editorial"
|
|
6628
|
+
},
|
|
6629
|
+
parameterSchema: flatInkParametersSchema,
|
|
6630
|
+
defaultParameters: {},
|
|
6631
|
+
controls: [hoverControl],
|
|
6632
|
+
defineSystem: (parameters) => ({
|
|
6633
|
+
global: {
|
|
6634
|
+
cornerStyle: "rounded",
|
|
6635
|
+
textTransform: "none",
|
|
6636
|
+
fontWeight: 600,
|
|
6637
|
+
typography: "body",
|
|
6638
|
+
letterSpacing: "tight",
|
|
6639
|
+
paddingPreset: "default",
|
|
6640
|
+
hoverTransform: "lift",
|
|
6641
|
+
hoverColor: "none"
|
|
6642
|
+
},
|
|
6643
|
+
sizes: {
|
|
6644
|
+
sm: {
|
|
6645
|
+
padding: "0.625rem 1.125rem",
|
|
6646
|
+
fontSize: "text-sm"
|
|
6647
|
+
},
|
|
6648
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
6649
|
+
lg: {
|
|
6650
|
+
padding: "0.9375rem 1.625rem",
|
|
6651
|
+
fontSize: "text-lg"
|
|
6652
|
+
},
|
|
6653
|
+
xl: {
|
|
6654
|
+
padding: "1.0625rem 2rem",
|
|
6655
|
+
fontSize: "text-xl"
|
|
6656
|
+
}
|
|
6657
|
+
},
|
|
6658
|
+
roles: {
|
|
6659
|
+
primary: {
|
|
6660
|
+
kind: "complete",
|
|
6661
|
+
appearance: {
|
|
6662
|
+
background: {
|
|
6663
|
+
type: "solid",
|
|
6664
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
6665
|
+
},
|
|
6666
|
+
borderRadius: "rounded-lg",
|
|
6667
|
+
affordance: { iconId: "ArrowRight" },
|
|
6668
|
+
...hoverAppearance("primary", parameters, [lift, {
|
|
6669
|
+
effectId: "background-on-hover",
|
|
6670
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
6671
|
+
}])
|
|
6672
|
+
}
|
|
6673
|
+
},
|
|
6674
|
+
secondary: {
|
|
6675
|
+
kind: "complete",
|
|
6676
|
+
appearance: {
|
|
6677
|
+
background: {
|
|
6678
|
+
type: "surface",
|
|
6679
|
+
role: "link"
|
|
6680
|
+
},
|
|
6681
|
+
borderRadius: "rounded-lg",
|
|
6682
|
+
border: { widthClass: "border" },
|
|
6683
|
+
...hoverAppearance("secondary", parameters, [lift, {
|
|
6684
|
+
effectId: "background-on-hover",
|
|
6685
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6686
|
+
}])
|
|
6687
|
+
}
|
|
6688
|
+
},
|
|
6689
|
+
outline: {
|
|
6690
|
+
kind: "complete",
|
|
6691
|
+
appearance: {
|
|
6692
|
+
background: {
|
|
6693
|
+
type: "surface",
|
|
6694
|
+
role: "link"
|
|
6695
|
+
},
|
|
6696
|
+
borderRadius: "rounded-lg",
|
|
6697
|
+
border: { widthClass: "border" },
|
|
6698
|
+
...hoverAppearance("outline", parameters, [lift, {
|
|
6699
|
+
effectId: "background-on-hover",
|
|
6700
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6701
|
+
}])
|
|
6702
|
+
}
|
|
6703
|
+
},
|
|
6704
|
+
ghost: {
|
|
6705
|
+
kind: "complete",
|
|
6706
|
+
appearance: {
|
|
6707
|
+
background: {
|
|
6708
|
+
type: "surface",
|
|
6709
|
+
role: "link"
|
|
6710
|
+
},
|
|
6711
|
+
borderRadius: "rounded-lg",
|
|
6712
|
+
...hoverAppearance("ghost", parameters, [lift])
|
|
6713
|
+
}
|
|
6714
|
+
},
|
|
6715
|
+
accent: {
|
|
6716
|
+
kind: "complete",
|
|
6717
|
+
appearance: {
|
|
6718
|
+
background: {
|
|
6719
|
+
type: "solid",
|
|
6720
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
6721
|
+
},
|
|
6722
|
+
borderRadius: "rounded-lg",
|
|
6723
|
+
affordance: { iconId: "ArrowRight" },
|
|
6724
|
+
...hoverAppearance("accent", parameters, [lift])
|
|
6725
|
+
}
|
|
6726
|
+
}
|
|
6727
|
+
}
|
|
6728
|
+
})
|
|
6729
|
+
});
|
|
6730
|
+
function hoverAppearance(role, parameters, recommended) {
|
|
6731
|
+
const preference = parameters.hoverPreferences?.[role];
|
|
6732
|
+
if (preference === void 0) return { effects: { hover: [...recommended] } };
|
|
6733
|
+
if (preference === "contextual") {
|
|
6734
|
+
const config = contextualRoleConfig[role];
|
|
6735
|
+
return {
|
|
6736
|
+
effects: { hover: [lift] },
|
|
6737
|
+
contextualHover: {
|
|
6738
|
+
kind: "shade-shift",
|
|
6739
|
+
seedToken: config.contextualSeedToken,
|
|
6740
|
+
fallbackDirection: config.fallbackDirection
|
|
6741
|
+
}
|
|
6742
|
+
};
|
|
6743
|
+
}
|
|
6744
|
+
const config = contextualRoleConfig[role];
|
|
6745
|
+
return {
|
|
6746
|
+
effects: { hover: [lift] },
|
|
6747
|
+
contextualHover: {
|
|
6748
|
+
kind: "shade-shift",
|
|
6749
|
+
seedToken: config.contextualSeedToken,
|
|
6750
|
+
fallbackDirection: config.fallbackDirection,
|
|
6751
|
+
preferredToken: unsafeAsOpaqueButtonColourToken(paletteRole(preference))
|
|
6752
|
+
}
|
|
6753
|
+
};
|
|
6754
|
+
}
|
|
6755
|
+
function paletteRole(preference) {
|
|
6756
|
+
return preference;
|
|
6757
|
+
}
|
|
6758
|
+
//#endregion
|
|
5820
6759
|
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
5821
6760
|
const emptyParametersSchema = z.object({}).strict();
|
|
5822
6761
|
function defineStaticButtonStyleRecipe(input) {
|
|
@@ -6663,113 +7602,6 @@ const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
|
6663
7602
|
}
|
|
6664
7603
|
}
|
|
6665
7604
|
});
|
|
6666
|
-
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
6667
|
-
id: "flat-ink",
|
|
6668
|
-
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
6669
|
-
tags: {
|
|
6670
|
-
tone: "classic",
|
|
6671
|
-
energy: "calm",
|
|
6672
|
-
motion: "subtle",
|
|
6673
|
-
era: "editorial"
|
|
6674
|
-
},
|
|
6675
|
-
system: {
|
|
6676
|
-
global: {
|
|
6677
|
-
cornerStyle: "rounded",
|
|
6678
|
-
textTransform: "none",
|
|
6679
|
-
fontWeight: 600,
|
|
6680
|
-
typography: "body",
|
|
6681
|
-
letterSpacing: "tight",
|
|
6682
|
-
paddingPreset: "default",
|
|
6683
|
-
hoverTransform: "lift",
|
|
6684
|
-
hoverColor: "none"
|
|
6685
|
-
},
|
|
6686
|
-
sizes: {
|
|
6687
|
-
sm: {
|
|
6688
|
-
padding: "0.625rem 1.125rem",
|
|
6689
|
-
fontSize: "text-sm"
|
|
6690
|
-
},
|
|
6691
|
-
md: { padding: "0.8125rem 1.375rem" },
|
|
6692
|
-
lg: {
|
|
6693
|
-
padding: "0.9375rem 1.625rem",
|
|
6694
|
-
fontSize: "text-lg"
|
|
6695
|
-
},
|
|
6696
|
-
xl: {
|
|
6697
|
-
padding: "1.0625rem 2rem",
|
|
6698
|
-
fontSize: "text-xl"
|
|
6699
|
-
}
|
|
6700
|
-
},
|
|
6701
|
-
roles: {
|
|
6702
|
-
primary: {
|
|
6703
|
-
kind: "complete",
|
|
6704
|
-
appearance: {
|
|
6705
|
-
background: {
|
|
6706
|
-
type: "solid",
|
|
6707
|
-
colorToken: "primary"
|
|
6708
|
-
},
|
|
6709
|
-
borderRadius: "rounded-lg",
|
|
6710
|
-
affordance: { iconId: "ArrowRight" },
|
|
6711
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6712
|
-
effectId: "background-on-hover",
|
|
6713
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
6714
|
-
}] }
|
|
6715
|
-
}
|
|
6716
|
-
},
|
|
6717
|
-
secondary: {
|
|
6718
|
-
kind: "complete",
|
|
6719
|
-
appearance: {
|
|
6720
|
-
background: {
|
|
6721
|
-
type: "surface",
|
|
6722
|
-
role: "link"
|
|
6723
|
-
},
|
|
6724
|
-
borderRadius: "rounded-lg",
|
|
6725
|
-
border: { widthClass: "border" },
|
|
6726
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6727
|
-
effectId: "background-on-hover",
|
|
6728
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6729
|
-
}] }
|
|
6730
|
-
}
|
|
6731
|
-
},
|
|
6732
|
-
outline: {
|
|
6733
|
-
kind: "complete",
|
|
6734
|
-
appearance: {
|
|
6735
|
-
background: {
|
|
6736
|
-
type: "surface",
|
|
6737
|
-
role: "link"
|
|
6738
|
-
},
|
|
6739
|
-
borderRadius: "rounded-lg",
|
|
6740
|
-
border: { widthClass: "border" },
|
|
6741
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6742
|
-
effectId: "background-on-hover",
|
|
6743
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6744
|
-
}] }
|
|
6745
|
-
}
|
|
6746
|
-
},
|
|
6747
|
-
ghost: {
|
|
6748
|
-
kind: "complete",
|
|
6749
|
-
appearance: {
|
|
6750
|
-
background: {
|
|
6751
|
-
type: "surface",
|
|
6752
|
-
role: "link"
|
|
6753
|
-
},
|
|
6754
|
-
borderRadius: "rounded-lg",
|
|
6755
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
6756
|
-
}
|
|
6757
|
-
},
|
|
6758
|
-
accent: {
|
|
6759
|
-
kind: "complete",
|
|
6760
|
-
appearance: {
|
|
6761
|
-
background: {
|
|
6762
|
-
type: "solid",
|
|
6763
|
-
colorToken: "accent"
|
|
6764
|
-
},
|
|
6765
|
-
borderRadius: "rounded-lg",
|
|
6766
|
-
affordance: { iconId: "ArrowRight" },
|
|
6767
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
6768
|
-
}
|
|
6769
|
-
}
|
|
6770
|
-
}
|
|
6771
|
-
}
|
|
6772
|
-
});
|
|
6773
7605
|
const showtimePillRecipe = defineStaticButtonStyleRecipe({
|
|
6774
7606
|
id: "showtime-pill",
|
|
6775
7607
|
accessibilityLabel: "Bold uppercase pill buttons with playful movement",
|
|
@@ -7191,8 +8023,8 @@ const openCardRoleValue = "open";
|
|
|
7191
8023
|
*/
|
|
7192
8024
|
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
7193
8025
|
/**
|
|
7194
|
-
* The closed
|
|
7195
|
-
*
|
|
8026
|
+
* The closed role vocabulary Looks and blocks use for surfaced and boxless
|
|
8027
|
+
* card choices.
|
|
7196
8028
|
*
|
|
7197
8029
|
* - `none` — no site-style card surface; the block's own composition and
|
|
7198
8030
|
* the author's own card fields govern the item. This is *not*
|
|
@@ -7204,11 +8036,6 @@ const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
|
7204
8036
|
* - `alternative` — the statement card carrying the site's personality
|
|
7205
8037
|
*/
|
|
7206
8038
|
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
7207
|
-
const legacyCardVariantRoleAliases = {
|
|
7208
|
-
variant1: "alternative",
|
|
7209
|
-
variant2: "alternative",
|
|
7210
|
-
statement: "alternative"
|
|
7211
|
-
};
|
|
7212
8039
|
const cardSpacingSchema = z.enum([
|
|
7213
8040
|
"none",
|
|
7214
8041
|
"compact",
|
|
@@ -7238,33 +8065,21 @@ const gradientDirectionSchema = z.enum([
|
|
|
7238
8065
|
"to-br",
|
|
7239
8066
|
"to-bl"
|
|
7240
8067
|
]);
|
|
7241
|
-
|
|
8068
|
+
z.enum(cardVariantRoleValues);
|
|
7242
8069
|
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
7243
8070
|
const cardRoleSchema = z.enum(cardRoleValues);
|
|
7244
|
-
/**
|
|
7245
|
-
* Historical name for the role vocabulary as it reaches box styles. Widened to
|
|
7246
|
-
* the full `CardRole` set — old values keep parsing, `open` now parses too.
|
|
7247
|
-
*/
|
|
7248
|
-
const boxStylesCardVariantSchema = cardRoleSchema;
|
|
7249
8071
|
function isCardVariantRole(value) {
|
|
7250
8072
|
return typeof value === "string" && cardVariantRoleValues.includes(value);
|
|
7251
8073
|
}
|
|
7252
8074
|
function normalizeCardVariantRole(value) {
|
|
7253
|
-
|
|
7254
|
-
if (typeof value !== "string") return null;
|
|
7255
|
-
return legacyCardVariantRoleAliases[value] ?? null;
|
|
8075
|
+
return isCardVariantRole(value) ? value : null;
|
|
7256
8076
|
}
|
|
7257
|
-
/**
|
|
7258
|
-
* The one untrusted-input boundary for the role vocabulary. Legacy alias values
|
|
7259
|
-
* (`variant1`, `variant2`, `statement`) normalize here and nowhere else.
|
|
7260
|
-
*/
|
|
8077
|
+
/** The one untrusted-input boundary for the closed role vocabulary. */
|
|
7261
8078
|
function normalizeCardRole(value) {
|
|
7262
8079
|
if (value === "none") return boxlessCardVariantValue;
|
|
7263
8080
|
if (value === "open") return openCardRoleValue;
|
|
7264
8081
|
return normalizeCardVariantRole(value);
|
|
7265
8082
|
}
|
|
7266
|
-
/** Historical name for {@link normalizeCardRole}. */
|
|
7267
|
-
const normalizeBoxStylesCardVariant = normalizeCardRole;
|
|
7268
8083
|
const PRIORITY_ROLE_INFERENCE = {
|
|
7269
8084
|
1: "default",
|
|
7270
8085
|
2: "alternative"
|
|
@@ -8209,6 +9024,21 @@ const eventListTreatmentValues = [
|
|
|
8209
9024
|
"editorial-register",
|
|
8210
9025
|
"dense-index"
|
|
8211
9026
|
];
|
|
9027
|
+
const testimonialsCompositionTreatmentValues = [
|
|
9028
|
+
"open-editorial",
|
|
9029
|
+
"evergreen-lead",
|
|
9030
|
+
"room-and-response",
|
|
9031
|
+
"open-floor"
|
|
9032
|
+
];
|
|
9033
|
+
/**
|
|
9034
|
+
* How an offerings preview arranges its groups. Structure only — the group
|
|
9035
|
+
* card surface is the Look's `cardRole` and the site style's card system.
|
|
9036
|
+
*/
|
|
9037
|
+
const offeringsPreviewCompositionTreatmentValues = [
|
|
9038
|
+
"paired-feature-cards",
|
|
9039
|
+
"open-editorial-columns",
|
|
9040
|
+
"joined-programme-panel"
|
|
9041
|
+
];
|
|
8212
9042
|
const eyebrowTreatmentValues = [
|
|
8213
9043
|
"plain",
|
|
8214
9044
|
"accent",
|
|
@@ -8742,8 +9572,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
8742
9572
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
8743
9573
|
raised: z.boolean().nullable().optional(),
|
|
8744
9574
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
8745
|
-
role: cardRoleSchema.nullable().optional()
|
|
8746
|
-
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
9575
|
+
role: cardRoleSchema.nullable().optional()
|
|
8747
9576
|
});
|
|
8748
9577
|
const blockStyleOverridesSchema = z.object({
|
|
8749
9578
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
@@ -9632,7 +10461,12 @@ defineBlockAppearancePreset({
|
|
|
9632
10461
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9633
10462
|
design: {
|
|
9634
10463
|
sectionSurface: "base",
|
|
9635
|
-
contentFrame: plainFrame
|
|
10464
|
+
contentFrame: plainFrame,
|
|
10465
|
+
cardRole: "alternative",
|
|
10466
|
+
composition: {
|
|
10467
|
+
kind: "offerings-preview",
|
|
10468
|
+
treatment: "paired-feature-cards"
|
|
10469
|
+
}
|
|
9636
10470
|
}
|
|
9637
10471
|
}), defineBlockAppearancePreset({
|
|
9638
10472
|
id: "offerings-preview-open-editorial-columns",
|
|
@@ -9642,7 +10476,12 @@ defineBlockAppearancePreset({
|
|
|
9642
10476
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9643
10477
|
design: {
|
|
9644
10478
|
sectionSurface: "base",
|
|
9645
|
-
contentFrame: plainFrame
|
|
10479
|
+
contentFrame: plainFrame,
|
|
10480
|
+
cardRole: "open",
|
|
10481
|
+
composition: {
|
|
10482
|
+
kind: "offerings-preview",
|
|
10483
|
+
treatment: "open-editorial-columns"
|
|
10484
|
+
}
|
|
9646
10485
|
}
|
|
9647
10486
|
}), defineBlockAppearancePreset({
|
|
9648
10487
|
id: "offerings-preview-joined-programme-panel",
|
|
@@ -9652,7 +10491,12 @@ defineBlockAppearancePreset({
|
|
|
9652
10491
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9653
10492
|
design: {
|
|
9654
10493
|
sectionSurface: "base",
|
|
9655
|
-
contentFrame: plainFrame
|
|
10494
|
+
contentFrame: plainFrame,
|
|
10495
|
+
cardRole: "default",
|
|
10496
|
+
composition: {
|
|
10497
|
+
kind: "offerings-preview",
|
|
10498
|
+
treatment: "joined-programme-panel"
|
|
10499
|
+
}
|
|
9656
10500
|
}
|
|
9657
10501
|
}), defineBlockAppearancePreset({
|
|
9658
10502
|
id: "feature-cards-raised-rule",
|
|
@@ -9894,7 +10738,11 @@ defineBlockAppearancePreset({
|
|
|
9894
10738
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9895
10739
|
design: {
|
|
9896
10740
|
sectionSurface: "base",
|
|
9897
|
-
contentFrame: plainFrame
|
|
10741
|
+
contentFrame: plainFrame,
|
|
10742
|
+
composition: {
|
|
10743
|
+
kind: "testimonials",
|
|
10744
|
+
treatment: "evergreen-lead"
|
|
10745
|
+
}
|
|
9898
10746
|
}
|
|
9899
10747
|
}), defineBlockAppearancePreset({
|
|
9900
10748
|
id: "testimonials-room-and-response",
|
|
@@ -9904,7 +10752,11 @@ defineBlockAppearancePreset({
|
|
|
9904
10752
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9905
10753
|
design: {
|
|
9906
10754
|
sectionSurface: "base",
|
|
9907
|
-
contentFrame: plainFrame
|
|
10755
|
+
contentFrame: plainFrame,
|
|
10756
|
+
composition: {
|
|
10757
|
+
kind: "testimonials",
|
|
10758
|
+
treatment: "room-and-response"
|
|
10759
|
+
}
|
|
9908
10760
|
}
|
|
9909
10761
|
}), defineBlockAppearancePreset({
|
|
9910
10762
|
id: "testimonials-open-floor",
|
|
@@ -9914,7 +10766,11 @@ defineBlockAppearancePreset({
|
|
|
9914
10766
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9915
10767
|
design: {
|
|
9916
10768
|
sectionSurface: "base",
|
|
9917
|
-
contentFrame: plainFrame
|
|
10769
|
+
contentFrame: plainFrame,
|
|
10770
|
+
composition: {
|
|
10771
|
+
kind: "testimonials",
|
|
10772
|
+
treatment: "open-floor"
|
|
10773
|
+
}
|
|
9918
10774
|
}
|
|
9919
10775
|
}), defineBlockAppearancePreset({
|
|
9920
10776
|
id: "faq-base-accordion",
|
|
@@ -12839,7 +13695,8 @@ const curatedSiteStyles = [
|
|
|
12839
13695
|
buttonStyleChoices: [
|
|
12840
13696
|
buttonChoice("soft-pill"),
|
|
12841
13697
|
buttonChoice("pebble"),
|
|
12842
|
-
buttonChoice("confident-chip")
|
|
13698
|
+
buttonChoice("confident-chip"),
|
|
13699
|
+
buttonChoice("flat-ink")
|
|
12843
13700
|
],
|
|
12844
13701
|
paletteRecommendations: [
|
|
12845
13702
|
paletteRecommendation("soft-natural-sage"),
|
|
@@ -14354,7 +15211,6 @@ const ALLOWED_TRANSFORM_IDS = [
|
|
|
14354
15211
|
"boxStyles.resolveRootStyle",
|
|
14355
15212
|
"boxStyles.semanticGap",
|
|
14356
15213
|
"boxStyles.semanticGapValue",
|
|
14357
|
-
"boxStyles.cardVariantClass",
|
|
14358
15214
|
"containerStyles.resolveBoxClassName"
|
|
14359
15215
|
];
|
|
14360
15216
|
/**
|
|
@@ -15804,8 +16660,41 @@ function containerStylesField(options = {}) {
|
|
|
15804
16660
|
return createBoxStylesFieldWithDepth("container", options);
|
|
15805
16661
|
}
|
|
15806
16662
|
function cardStylesField(options = {}) {
|
|
16663
|
+
if (options.controls === "role-only") return createRoleOnlyCardStylesField(options);
|
|
15807
16664
|
return createBoxStylesFieldWithDepth("card", options);
|
|
15808
16665
|
}
|
|
16666
|
+
function createRoleOnlyCardStylesField(options) {
|
|
16667
|
+
const { id = "_cardStyles", label = "Card styles", renderInHeader, intent } = options;
|
|
16668
|
+
return {
|
|
16669
|
+
id,
|
|
16670
|
+
type: "modal",
|
|
16671
|
+
label,
|
|
16672
|
+
required: false,
|
|
16673
|
+
schema: { fields: [{
|
|
16674
|
+
id: "role",
|
|
16675
|
+
type: "select",
|
|
16676
|
+
label: "Card style",
|
|
16677
|
+
description: "Choose a semantic card style from the active site style.",
|
|
16678
|
+
required: false,
|
|
16679
|
+
multiple: false,
|
|
16680
|
+
defaultValue: "default",
|
|
16681
|
+
options: cardVariantRoleValues.map((value) => ({
|
|
16682
|
+
value,
|
|
16683
|
+
label: value === "default" ? "Default" : "Alternative"
|
|
16684
|
+
}))
|
|
16685
|
+
}] },
|
|
16686
|
+
ui: {
|
|
16687
|
+
...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
|
|
16688
|
+
...intent ? { intent } : {},
|
|
16689
|
+
modalConfig: {
|
|
16690
|
+
buttonLabel: label,
|
|
16691
|
+
description: "Choose the site-style card role.",
|
|
16692
|
+
buttonVariant: "outline",
|
|
16693
|
+
showCustomizedIndicator: true
|
|
16694
|
+
}
|
|
16695
|
+
}
|
|
16696
|
+
};
|
|
16697
|
+
}
|
|
15809
16698
|
//#endregion
|
|
15810
16699
|
//#region ../blocks/src/system/fields/imageShape.ts
|
|
15811
16700
|
const standardImageShapeOptions = [
|
|
@@ -16992,21 +17881,29 @@ function cardRoleClass(role) {
|
|
|
16992
17881
|
return `card-role-${role}`;
|
|
16993
17882
|
}
|
|
16994
17883
|
/**
|
|
17884
|
+
* The role class for a card slot the *block* owns structurally, where a Look
|
|
17885
|
+
* may still name the surface.
|
|
17886
|
+
*
|
|
17887
|
+
* Some layouts have more than one card slot and decide themselves which one is
|
|
17888
|
+
* the statement — the featured-editorial testimonials field is a lead voice
|
|
17889
|
+
* beside its supporting voices, and that is structure, not composition. Those
|
|
17890
|
+
* slots still have to honour a Look that picks a surface, or a role-picking
|
|
17891
|
+
* Look would silently no-op under the layout. So the slot carries a default
|
|
17892
|
+
* role and the Look's compiled role wins over it when there is one.
|
|
17893
|
+
*
|
|
17894
|
+
* An explicit `none` is honoured as boxlessness and emits no class, matching
|
|
17895
|
+
* how the composite emitter reads it.
|
|
17896
|
+
*/
|
|
17897
|
+
/**
|
|
16995
17898
|
* The role a card renders with, and the one place a set of card styles becomes
|
|
16996
17899
|
* a role.
|
|
16997
17900
|
*
|
|
16998
|
-
* Precedence: a per-item override, then the `role` a Look
|
|
16999
|
-
* block's card styles
|
|
17000
|
-
*
|
|
17001
|
-
* vocabulary — an explicit `role` wins when a record carries both.
|
|
17002
|
-
*
|
|
17003
|
-
* Compiled and freshly authored card styles carry only `role`. `cardVariant`
|
|
17004
|
-
* survives on content persisted before the role contract, and normalizes here
|
|
17005
|
-
* rather than in `cardStylesOverrideSchema` because that content reaches the
|
|
17006
|
-
* renderer as a raw record without ever passing through the schema.
|
|
17901
|
+
* Precedence: a per-item override, then the `role` a Look or semantic field
|
|
17902
|
+
* compiled onto the block's card styles. Persisted inputs are normalized at
|
|
17903
|
+
* this boundary because raw block records do not pass through the theme schema.
|
|
17007
17904
|
*/
|
|
17008
17905
|
function resolveCardRoleForBoxStyles(input, override) {
|
|
17009
|
-
return override ?? normalizeCardRole(input.role)
|
|
17906
|
+
return override ?? normalizeCardRole(input.role);
|
|
17010
17907
|
}
|
|
17011
17908
|
/**
|
|
17012
17909
|
* Parse a block's own per-item surface vocabulary into a card role. The alias
|
|
@@ -17023,8 +17920,8 @@ function resolveItemCardRole(value, aliases) {
|
|
|
17023
17920
|
* The card surface for a set of box styles: one role, one class vocabulary, so
|
|
17024
17921
|
* a site-style swap re-skins the card whichever field named it.
|
|
17025
17922
|
*/
|
|
17026
|
-
function cardSurface(input, override) {
|
|
17027
|
-
const role = resolveCardRoleForBoxStyles(input, override);
|
|
17923
|
+
function cardSurface(input, override, fallback) {
|
|
17924
|
+
const role = resolveCardRoleForBoxStyles(input, override) ?? fallback ?? null;
|
|
17028
17925
|
if (!role) return {
|
|
17029
17926
|
role: null,
|
|
17030
17927
|
classes: []
|
|
@@ -17121,10 +18018,9 @@ function raisedClassFor(options) {
|
|
|
17121
18018
|
* of keeping a copy that drifts.
|
|
17122
18019
|
*/
|
|
17123
18020
|
function boxStyleClassNames(value, options) {
|
|
17124
|
-
|
|
17125
|
-
const input = value;
|
|
18021
|
+
const input = value && typeof value === "object" ? value : {};
|
|
17126
18022
|
const borderOverride = borderOverrideClass(input);
|
|
17127
|
-
const surface = cardSurface(input, options.cardRoleOverride);
|
|
18023
|
+
const surface = cardSurface(input, options.cardRoleOverride, options.cardRoleFallback);
|
|
17128
18024
|
const cardOwnsBorder = surface.role !== null && surface.role !== "none";
|
|
17129
18025
|
return [
|
|
17130
18026
|
borderOverride || cardOwnsBorder ? withoutBorderClasses(options.baseClass ?? "") : options.baseClass ?? "",
|
|
@@ -17272,29 +18168,41 @@ const cardRoleClassTransform = {
|
|
|
17272
18168
|
return baseClass ? `${baseClass.trim()} ${hook}` : hook;
|
|
17273
18169
|
}
|
|
17274
18170
|
};
|
|
17275
|
-
|
|
17276
|
-
|
|
18171
|
+
/**
|
|
18172
|
+
* The role class for a layout's own card slot, bound from the block's compiled
|
|
18173
|
+
* card styles so a Look that picks a surface still reaches a slot the layout
|
|
18174
|
+
* assigned a default role to.
|
|
18175
|
+
*/
|
|
18176
|
+
const cardSlotRoleTransform = {
|
|
18177
|
+
id: "boxStyles.cardSlotRole",
|
|
17277
18178
|
kind: "string",
|
|
17278
|
-
summary: "
|
|
17279
|
-
run: (value, options) => {
|
|
17280
|
-
|
|
17281
|
-
|
|
17282
|
-
|
|
17283
|
-
|
|
17284
|
-
return baseClass ? `${baseClass} ${roleClass}` : roleClass;
|
|
17285
|
-
}
|
|
18179
|
+
summary: "Resolve a layout card slot's role class, defaulting to the slot's own role",
|
|
18180
|
+
run: (value, options) => boxStyleClassNames(value, {
|
|
18181
|
+
baseClass: options?.baseClass,
|
|
18182
|
+
cardRoleFallback: options.slotDefault,
|
|
18183
|
+
includeSpacing: false
|
|
18184
|
+
})
|
|
17286
18185
|
};
|
|
18186
|
+
function resolveBorderColorState(value, options, viewModel) {
|
|
18187
|
+
const input = asPartialObject(options?.stylesPath ? readPath(viewModel, options.stylesPath) : value);
|
|
18188
|
+
if (!input) return null;
|
|
18189
|
+
return {
|
|
18190
|
+
input,
|
|
18191
|
+
role: resolveCardRoleForBoxStyles(input, options?.stylesPath ? resolveItemCardRole(value, options.itemRoleAliases) : void 0)
|
|
18192
|
+
};
|
|
18193
|
+
}
|
|
17287
18194
|
const boxStylesBorderColorTransform = {
|
|
17288
18195
|
id: "boxStyles.borderColor",
|
|
17289
18196
|
kind: "string",
|
|
17290
18197
|
summary: "Resolve border color from box styles border.colorToken",
|
|
17291
|
-
run: (value, options,
|
|
18198
|
+
run: (value, options, context) => {
|
|
17292
18199
|
const fallbackToken = options?.fallbackToken ?? "border";
|
|
17293
18200
|
const returnEmptyForDefault = options?.returnEmptyForDefault ?? false;
|
|
17294
18201
|
let explicitToken = null;
|
|
17295
|
-
const
|
|
17296
|
-
if (
|
|
17297
|
-
|
|
18202
|
+
const state = resolveBorderColorState(value, options, context.viewModel);
|
|
18203
|
+
if (state) {
|
|
18204
|
+
if (state.role && state.role !== "none") return "";
|
|
18205
|
+
const border = normalizeBoxStylesBorder(state.input.border);
|
|
17298
18206
|
if (border && border.enabled === true && border.colorToken) explicitToken = border.colorToken;
|
|
17299
18207
|
}
|
|
17300
18208
|
if (explicitToken) {
|
|
@@ -17514,7 +18422,7 @@ const boxStylesTransforms = [
|
|
|
17514
18422
|
roundedTransform,
|
|
17515
18423
|
boxStylesCompositeTransform,
|
|
17516
18424
|
cardRoleClassTransform,
|
|
17517
|
-
|
|
18425
|
+
cardSlotRoleTransform,
|
|
17518
18426
|
boxStylesBorderColorTransform,
|
|
17519
18427
|
sectionClassNameTransform,
|
|
17520
18428
|
containerStylesResolveClassName,
|
|
@@ -17621,10 +18529,16 @@ function styledCard(children, opts, ...mods) {
|
|
|
17621
18529
|
const style = {
|
|
17622
18530
|
...opts.style ?? {},
|
|
17623
18531
|
borderColor: { $bind: {
|
|
17624
|
-
from: opts.stylesFrom,
|
|
18532
|
+
from: opts.itemRole?.from ?? opts.stylesFrom,
|
|
17625
18533
|
transforms: [{
|
|
17626
18534
|
id: "boxStyles.borderColor",
|
|
17627
|
-
options: {
|
|
18535
|
+
options: {
|
|
18536
|
+
returnEmptyForDefault: true,
|
|
18537
|
+
...opts.itemRole ? {
|
|
18538
|
+
stylesPath: opts.stylesFrom,
|
|
18539
|
+
...opts.itemRole.aliases ? { itemRoleAliases: opts.itemRole.aliases } : {}
|
|
18540
|
+
} : {}
|
|
18541
|
+
}
|
|
17628
18542
|
}]
|
|
17629
18543
|
} }
|
|
17630
18544
|
};
|
|
@@ -18749,18 +19663,73 @@ function buildGridCardsLayout(className) {
|
|
|
18749
19663
|
return el("div", { className }, buildResponsiveGridCards());
|
|
18750
19664
|
}
|
|
18751
19665
|
/**
|
|
19666
|
+
* The card slots the featured-editorial layout has, and the role each one
|
|
19667
|
+
* defaults to.
|
|
19668
|
+
*
|
|
19669
|
+
* Which slot is the statement is *structure*, so the layout decides it: this
|
|
19670
|
+
* variant exists to put one lead voice beside its supporting voices. But a Look
|
|
19671
|
+
* that picks a surface has to keep meaning something here, so the lead slot's
|
|
19672
|
+
* role is a default the Look's compiled `cardRole` wins over — see
|
|
19673
|
+
* `cardSlotRoleClass`. Supporting voices stay the quiet everyday card.
|
|
19674
|
+
*/
|
|
19675
|
+
const FEATURED_EDITORIAL_SLOTS = {
|
|
19676
|
+
lead: {
|
|
19677
|
+
/** Composition CSS addresses the lead card's geometry through this. */
|
|
19678
|
+
variantClass: "rb-testimonials-fe-card--feature",
|
|
19679
|
+
slotDefault: "alternative",
|
|
19680
|
+
followsLook: true
|
|
19681
|
+
},
|
|
19682
|
+
support: {
|
|
19683
|
+
variantClass: null,
|
|
19684
|
+
slotDefault: "default",
|
|
19685
|
+
followsLook: false
|
|
19686
|
+
}
|
|
19687
|
+
};
|
|
19688
|
+
/** Where the testimonials block's compiled card styles live. */
|
|
19689
|
+
const TESTIMONIALS_CARD_STYLES_PATH = "content._cardStyles";
|
|
19690
|
+
/**
|
|
19691
|
+
* The class list for one featured-editorial card slot.
|
|
19692
|
+
*
|
|
19693
|
+
* A slot that follows the Look has to resolve at render time, so it binds
|
|
19694
|
+
* through the shared card-class emitter rather than naming a role class here;
|
|
19695
|
+
* a slot that does not is a plain string built by the same composite emitter.
|
|
19696
|
+
*/
|
|
19697
|
+
function featuredEditorialCardClassName(slot) {
|
|
19698
|
+
const { variantClass, slotDefault, followsLook } = FEATURED_EDITORIAL_SLOTS[slot];
|
|
19699
|
+
const baseClass = ["rb-testimonials-fe-card", variantClass].filter(Boolean).join(" ");
|
|
19700
|
+
if (!followsLook) return boxStyleClassNames({}, {
|
|
19701
|
+
baseClass,
|
|
19702
|
+
cardRoleFallback: slotDefault,
|
|
19703
|
+
includeSpacing: false
|
|
19704
|
+
});
|
|
19705
|
+
return { $bind: {
|
|
19706
|
+
from: TESTIMONIALS_CARD_STYLES_PATH,
|
|
19707
|
+
transforms: [{
|
|
19708
|
+
id: "boxStyles.cardSlotRole",
|
|
19709
|
+
options: {
|
|
19710
|
+
baseClass,
|
|
19711
|
+
slotDefault
|
|
19712
|
+
}
|
|
19713
|
+
}],
|
|
19714
|
+
fallback: boxStyleClassNames({}, {
|
|
19715
|
+
baseClass,
|
|
19716
|
+
cardRoleFallback: slotDefault,
|
|
19717
|
+
includeSpacing: false
|
|
19718
|
+
})
|
|
19719
|
+
} };
|
|
19720
|
+
}
|
|
19721
|
+
/**
|
|
18752
19722
|
* Build a single "featured editorial" testimonial card.
|
|
18753
19723
|
*
|
|
18754
|
-
* This card type deliberately renders NO avatar/headshot:
|
|
18755
|
-
*
|
|
18756
|
-
*
|
|
18757
|
-
*
|
|
18758
|
-
* - `rb-testimonials-fe-card--plain` → white surface card
|
|
19724
|
+
* This card type deliberately renders NO avatar/headshot: a quote mark, the
|
|
19725
|
+
* quote body, then the author name and a context line. The card surface comes
|
|
19726
|
+
* from the slot's card role — the site style owns the fill, border, corners and
|
|
19727
|
+
* padding.
|
|
18759
19728
|
*
|
|
18760
19729
|
* Extra modifiers (`repeat`, `when`) are forwarded to the card node so the
|
|
18761
19730
|
* caller can drive first-vs-rest branching.
|
|
18762
19731
|
*/
|
|
18763
|
-
function buildFeaturedEditorialCard(
|
|
19732
|
+
function buildFeaturedEditorialCard(slot, ...mods) {
|
|
18764
19733
|
const quoteMark = text({
|
|
18765
19734
|
as: "span",
|
|
18766
19735
|
className: "rb-testimonials-fe-qmark",
|
|
@@ -18774,11 +19743,11 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18774
19743
|
as: "span",
|
|
18775
19744
|
className: "rb-testimonials-fe-context"
|
|
18776
19745
|
}, when("testimonial.content.jobTitle"), bind("testimonial.content.jobTitle"))]);
|
|
18777
|
-
return el("div", { className:
|
|
19746
|
+
return el("div", { className: featuredEditorialCardClassName(slot) }, [el("div", { className: "card-content rb-testimonials-fe-card-body" }, [
|
|
18778
19747
|
quoteMark,
|
|
18779
19748
|
quote,
|
|
18780
19749
|
meta
|
|
18781
|
-
], ...mods);
|
|
19750
|
+
])], ...mods);
|
|
18782
19751
|
}
|
|
18783
19752
|
/**
|
|
18784
19753
|
* Build the "featured editorial" layout: an asymmetric two-column arrangement
|
|
@@ -18792,7 +19761,7 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18792
19761
|
* index scope in context, so entry 0 produces no node in the rest column.
|
|
18793
19762
|
*/
|
|
18794
19763
|
function buildFeaturedEditorialLayout() {
|
|
18795
|
-
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("
|
|
19764
|
+
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("lead", repeat("data.entries", "testimonial", { limit: 1 })), el("div", { className: "rb-testimonials-fe-col" }, [buildFeaturedEditorialCard("support", repeat("data.entries", "testimonial", { indexName: "tIndex" }), when("tIndex", {
|
|
18796
19765
|
equals: 0,
|
|
18797
19766
|
not: true
|
|
18798
19767
|
}))])]);
|
|
@@ -19519,7 +20488,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
19519
20488
|
});
|
|
19520
20489
|
//#endregion
|
|
19521
20490
|
//#region ../blocks/src/system/fragments/library/card.ts
|
|
19522
|
-
const cardVariantOptions
|
|
20491
|
+
const cardVariantOptions = cardVariantRoleValues.map((value) => ({
|
|
19523
20492
|
value,
|
|
19524
20493
|
label: value === "default" ? "Default" : "Alternative"
|
|
19525
20494
|
}));
|
|
@@ -19617,7 +20586,7 @@ const cardFragment = defineFragment({
|
|
|
19617
20586
|
description: "Choose a card style from your theme",
|
|
19618
20587
|
required: false,
|
|
19619
20588
|
defaultValue: "default",
|
|
19620
|
-
options: cardVariantOptions
|
|
20589
|
+
options: cardVariantOptions,
|
|
19621
20590
|
ui: { intent: "style" }
|
|
19622
20591
|
}
|
|
19623
20592
|
],
|
|
@@ -19626,7 +20595,10 @@ const cardFragment = defineFragment({
|
|
|
19626
20595
|
className: { $bind: {
|
|
19627
20596
|
from: "variant",
|
|
19628
20597
|
fallback: "default",
|
|
19629
|
-
transforms: [{
|
|
20598
|
+
transforms: [{
|
|
20599
|
+
id: "boxStyles.cardRoleClass",
|
|
20600
|
+
options: { baseClass: "" }
|
|
20601
|
+
}]
|
|
19630
20602
|
} }
|
|
19631
20603
|
}, [media({
|
|
19632
20604
|
className: "card-media rb-w-full rb-h-auto rb-object-cover",
|
|
@@ -25572,19 +26544,30 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
25572
26544
|
]);
|
|
25573
26545
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
25574
26546
|
//#endregion
|
|
25575
|
-
//#region ../blocks/src/system/blocks/
|
|
25576
|
-
|
|
25577
|
-
|
|
25578
|
-
|
|
25579
|
-
|
|
26547
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
26548
|
+
const blockBookingConsentSchema = z.object({
|
|
26549
|
+
requirementId: z.string(),
|
|
26550
|
+
title: z.string(),
|
|
26551
|
+
agreement: RichTextDocSchema,
|
|
26552
|
+
checkboxLabel: z.string()
|
|
26553
|
+
});
|
|
26554
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
26555
|
+
id: z.string(),
|
|
26556
|
+
label: z.string(),
|
|
26557
|
+
type: z.literal("booking_requirement_consent"),
|
|
26558
|
+
required: z.literal(true),
|
|
26559
|
+
agreement: RichTextDocSchema,
|
|
26560
|
+
checkboxLabel: z.string().min(1)
|
|
26561
|
+
});
|
|
26562
|
+
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
26563
|
+
//#endregion
|
|
26564
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26565
|
+
const wholeSeriesVenueSchema = z.object({
|
|
25580
26566
|
id: z.string(),
|
|
25581
26567
|
name: z.string(),
|
|
25582
26568
|
address: z.string().nullable()
|
|
25583
26569
|
});
|
|
25584
|
-
|
|
25585
|
-
* Zod schema for course session (occurrence) data
|
|
25586
|
-
*/
|
|
25587
|
-
const courseSessionSchema = z.object({
|
|
26570
|
+
const wholeSeriesSessionSchema = z.object({
|
|
25588
26571
|
id: z.string(),
|
|
25589
26572
|
startsAt: z.string(),
|
|
25590
26573
|
endsAt: z.string(),
|
|
@@ -25592,14 +26575,14 @@ const courseSessionSchema = z.object({
|
|
|
25592
26575
|
capacityOverride: z.number().nullable().optional(),
|
|
25593
26576
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
25594
26577
|
});
|
|
25595
|
-
const
|
|
26578
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
25596
26579
|
id: z.string(),
|
|
25597
26580
|
name: z.string(),
|
|
25598
26581
|
roleLabel: z.string().nullable(),
|
|
25599
26582
|
summary: z.string().nullable(),
|
|
25600
26583
|
profilePath: z.string().nullable()
|
|
25601
26584
|
});
|
|
25602
|
-
const
|
|
26585
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
25603
26586
|
id: z.string(),
|
|
25604
26587
|
name: z.string(),
|
|
25605
26588
|
description: z.string().nullable(),
|
|
@@ -25615,7 +26598,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
25615
26598
|
"both"
|
|
25616
26599
|
]).nullable().optional()
|
|
25617
26600
|
});
|
|
25618
|
-
const
|
|
26601
|
+
const wholeSeriesPricingSchema = z.object({
|
|
25619
26602
|
bookingRequirement: z.enum(["none", "required"]),
|
|
25620
26603
|
pricingStrategy: z.enum([
|
|
25621
26604
|
"free",
|
|
@@ -25629,22 +26612,20 @@ const coursePricingSchema = z.object({
|
|
|
25629
26612
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
25630
26613
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
25631
26614
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25632
|
-
options: z.array(
|
|
26615
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
25633
26616
|
});
|
|
25634
|
-
/**
|
|
25635
|
-
* Zod schema for public course data
|
|
25636
|
-
*/
|
|
25637
26617
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
25638
26618
|
eventSeriesId: z.string(),
|
|
25639
26619
|
eventOfferingId: z.string(),
|
|
25640
26620
|
title: z.string(),
|
|
25641
26621
|
slug: z.string(),
|
|
25642
26622
|
description: z.unknown().nullable(),
|
|
25643
|
-
teamMembers: z.array(
|
|
26623
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
25644
26624
|
enrollmentOpen: z.boolean(),
|
|
25645
|
-
pricing:
|
|
26625
|
+
pricing: wholeSeriesPricingSchema,
|
|
25646
26626
|
currency: z.string(),
|
|
25647
26627
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26628
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
25648
26629
|
enrollmentCapacity: z.number().nullable(),
|
|
25649
26630
|
acceptsMemberships: z.boolean(),
|
|
25650
26631
|
status: z.enum([
|
|
@@ -25655,12 +26636,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
25655
26636
|
sessionsCount: z.number(),
|
|
25656
26637
|
enrolledCount: z.number(),
|
|
25657
26638
|
availableSpots: z.number().nullable(),
|
|
25658
|
-
sessions: z.array(
|
|
25659
|
-
venue:
|
|
26639
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
26640
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
25660
26641
|
});
|
|
25661
|
-
|
|
25662
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
25663
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
26642
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
25664
26643
|
//#endregion
|
|
25665
26644
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
25666
26645
|
const eventPresetSchema = z.enum([
|
|
@@ -25964,6 +26943,7 @@ const publicEventSchema = z.object({
|
|
|
25964
26943
|
timeZone: z.string(),
|
|
25965
26944
|
pricing: publicEventPricingSchema,
|
|
25966
26945
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26946
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
25967
26947
|
accessRestriction: accessRestrictionSchema,
|
|
25968
26948
|
allowedCategoryIds: z.array(z.string()),
|
|
25969
26949
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -25971,7 +26951,7 @@ const publicEventSchema = z.object({
|
|
|
25971
26951
|
acceptsMemberships: z.boolean().optional(),
|
|
25972
26952
|
wholeSeries: z.object({
|
|
25973
26953
|
eventSeriesId: z.string(),
|
|
25974
|
-
pricing:
|
|
26954
|
+
pricing: wholeSeriesPricingSchema,
|
|
25975
26955
|
currency: z.string(),
|
|
25976
26956
|
enrollmentOpen: z.boolean()
|
|
25977
26957
|
}).nullable().optional()
|
|
@@ -25980,24 +26960,19 @@ const publicEventSchema = z.object({
|
|
|
25980
26960
|
* Schema for an array of public events
|
|
25981
26961
|
*/
|
|
25982
26962
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
26963
|
+
//#endregion
|
|
26964
|
+
//#region ../blocks/src/system/blocks/events/shared/fields.ts
|
|
25983
26965
|
/**
|
|
25984
26966
|
* Shared card styling fields for event blocks
|
|
25985
26967
|
*/
|
|
25986
26968
|
const cardStylingFields = [
|
|
25987
|
-
{
|
|
25988
|
-
id: "
|
|
25989
|
-
type: "select",
|
|
26969
|
+
cardStylesField({
|
|
26970
|
+
id: "_cardStyles",
|
|
25990
26971
|
label: "Card style",
|
|
25991
|
-
|
|
25992
|
-
|
|
25993
|
-
|
|
25994
|
-
|
|
25995
|
-
options: cardVariantRoleValues.map((value) => ({
|
|
25996
|
-
value,
|
|
25997
|
-
label: value === "default" ? "Default" : "Alternative"
|
|
25998
|
-
})),
|
|
25999
|
-
ui: { intent: "style" }
|
|
26000
|
-
},
|
|
26972
|
+
controls: "role-only",
|
|
26973
|
+
renderInHeader: false,
|
|
26974
|
+
intent: "style"
|
|
26975
|
+
}),
|
|
26001
26976
|
createButtonVariantField({ description: "Choose a button style from your theme" }),
|
|
26002
26977
|
{
|
|
26003
26978
|
id: "buttonText",
|
|
@@ -26136,14 +27111,7 @@ function normalizeIdList(parts) {
|
|
|
26136
27111
|
}
|
|
26137
27112
|
//#endregion
|
|
26138
27113
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
26139
|
-
const eventSurfacePresetValues =
|
|
26140
|
-
"course",
|
|
26141
|
-
"term",
|
|
26142
|
-
"class",
|
|
26143
|
-
"workshop",
|
|
26144
|
-
"retreat",
|
|
26145
|
-
"performance"
|
|
26146
|
-
];
|
|
27114
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
26147
27115
|
const eventSurfaceScopeValues = [
|
|
26148
27116
|
"all",
|
|
26149
27117
|
"regularClassSchedule",
|
|
@@ -26324,6 +27292,25 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
26324
27292
|
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
26325
27293
|
}
|
|
26326
27294
|
//#endregion
|
|
27295
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
27296
|
+
function planEventRegistrationScope(input) {
|
|
27297
|
+
const subject = input.subject;
|
|
27298
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
27299
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
27300
|
+
kind: "context",
|
|
27301
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
27302
|
+
occurrenceContext: input.occurrenceContext,
|
|
27303
|
+
subject
|
|
27304
|
+
})
|
|
27305
|
+
};
|
|
27306
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
27307
|
+
return {
|
|
27308
|
+
kind: "selectedRun",
|
|
27309
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
27310
|
+
offering: selectedRunOffering
|
|
27311
|
+
};
|
|
27312
|
+
}
|
|
27313
|
+
//#endregion
|
|
26327
27314
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
26328
27315
|
function isRecord$5(value) {
|
|
26329
27316
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -26644,8 +27631,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
26644
27631
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
26645
27632
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
26646
27633
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
26647
|
-
wholeSeriesOfferings:
|
|
26648
|
-
wholeSeriesOffering:
|
|
27634
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
27635
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26649
27636
|
maxTickets: z.string().optional(),
|
|
26650
27637
|
showVenue: z.boolean().optional(),
|
|
26651
27638
|
showCapacity: z.boolean().optional(),
|
|
@@ -26667,12 +27654,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
26667
27654
|
portalToken: z.string().nullable().optional(),
|
|
26668
27655
|
previewToken: z.string().nullable().optional(),
|
|
26669
27656
|
...eventRegistrationHydrationSchemaShape,
|
|
27657
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26670
27658
|
className: z.string().nullable().optional(),
|
|
26671
27659
|
buttonText: z.string().nullable().optional(),
|
|
26672
27660
|
maxTickets: z.string().nullable().optional(),
|
|
26673
27661
|
stage: previewStageSchema.optional()
|
|
26674
27662
|
});
|
|
26675
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
27663
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
26676
27664
|
kind: z.literal("event-registration"),
|
|
26677
27665
|
state: z.literal("generic-shell"),
|
|
26678
27666
|
className: z.string().nullable(),
|
|
@@ -26680,7 +27668,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
26680
27668
|
bodyText: z.string(),
|
|
26681
27669
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
26682
27670
|
summaryButtonText: z.string()
|
|
26683
|
-
})
|
|
27671
|
+
}), z.object({
|
|
27672
|
+
kind: z.literal("event-registration"),
|
|
27673
|
+
state: z.literal("registration-closed"),
|
|
27674
|
+
className: z.string().nullable(),
|
|
27675
|
+
titleText: z.string(),
|
|
27676
|
+
bodyText: z.string()
|
|
27677
|
+
})]);
|
|
26684
27678
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
26685
27679
|
const eventRegistrationRenderSchema = z.object({
|
|
26686
27680
|
display: eventRegistrationDisplaySchema,
|
|
@@ -26694,6 +27688,13 @@ z.object({
|
|
|
26694
27688
|
stage: previewStageSchema.optional()
|
|
26695
27689
|
});
|
|
26696
27690
|
function buildEventRegistrationDisplay(source) {
|
|
27691
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
27692
|
+
kind: "event-registration",
|
|
27693
|
+
state: "registration-closed",
|
|
27694
|
+
className: source.className ?? null,
|
|
27695
|
+
titleText: "Registration closed",
|
|
27696
|
+
bodyText: "This run is no longer open for bookings."
|
|
27697
|
+
};
|
|
26697
27698
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
26698
27699
|
return {
|
|
26699
27700
|
kind: "event-registration",
|
|
@@ -26705,6 +27706,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
26705
27706
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
26706
27707
|
};
|
|
26707
27708
|
}
|
|
27709
|
+
function resolveWholeSeriesOffering(source) {
|
|
27710
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27711
|
+
}
|
|
26708
27712
|
function buildEventRegistrationShellStepLabels(source) {
|
|
26709
27713
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
26710
27714
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -26720,10 +27724,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
26720
27724
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
26721
27725
|
}
|
|
26722
27726
|
function scopeEventRegistrationEvents(source) {
|
|
26723
|
-
|
|
27727
|
+
const scope = planEventRegistrationScope({
|
|
27728
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
27729
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
26724
27730
|
occurrenceContext: source.occurrenceContext,
|
|
26725
27731
|
subject: source.subject
|
|
26726
27732
|
});
|
|
27733
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
26727
27734
|
}
|
|
26728
27735
|
function shellLabelForRegistrationStep(step, events) {
|
|
26729
27736
|
switch (step) {
|
|
@@ -26762,7 +27769,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
26762
27769
|
subject: source.subject ?? null,
|
|
26763
27770
|
events: source.events ?? null,
|
|
26764
27771
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
26765
|
-
wholeSeriesOffering: source
|
|
27772
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
26766
27773
|
maxTickets: source.maxTickets ?? void 0,
|
|
26767
27774
|
showVenue: source.showVenue,
|
|
26768
27775
|
showCapacity: source.showCapacity,
|
|
@@ -26983,7 +27990,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26983
27990
|
fallback: false
|
|
26984
27991
|
} },
|
|
26985
27992
|
events: { $bind: { from: "data.events" } },
|
|
26986
|
-
wholeSeriesOffering: { $bind: { from: "data.
|
|
27993
|
+
wholeSeriesOffering: { $bind: { from: "data.selectedRunOffering.offering" } },
|
|
27994
|
+
subjectWholeSeriesOffering: { $bind: { from: "data.subjectWholeSeriesOffering.offering" } },
|
|
27995
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
26987
27996
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
26988
27997
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
26989
27998
|
stage: { $bind: {
|
|
@@ -26997,7 +28006,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26997
28006
|
runtime: eventRegistrationBlockRuntime,
|
|
26998
28007
|
dataSchemas: {
|
|
26999
28008
|
events: publicEventsArraySchema.optional(),
|
|
27000
|
-
|
|
28009
|
+
selectedRunOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
28010
|
+
subjectWholeSeriesOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
28011
|
+
wholeSeriesOfferings: z.array(publicWholeSeriesOfferingSchema).optional(),
|
|
27001
28012
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
27002
28013
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
27003
28014
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
@@ -27014,11 +28025,29 @@ const eventRegistrationBlockDefinition = {
|
|
|
27014
28025
|
} },
|
|
27015
28026
|
readProfile: "registration",
|
|
27016
28027
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28028
|
+
seriesIds: { $bind: {
|
|
28029
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28030
|
+
transforms: [{ id: "value.csv" }]
|
|
28031
|
+
} },
|
|
28032
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27017
28033
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27018
28034
|
},
|
|
27019
28035
|
mode: "server"
|
|
27020
28036
|
},
|
|
27021
|
-
|
|
28037
|
+
selectedRunOffering: {
|
|
28038
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
28039
|
+
params: {
|
|
28040
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
28041
|
+
eventSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
28042
|
+
stage: { $bind: {
|
|
28043
|
+
from: "$root.previewStage",
|
|
28044
|
+
fallback: "published"
|
|
28045
|
+
} }
|
|
28046
|
+
},
|
|
28047
|
+
requiredParams: ["eventSeriesId"],
|
|
28048
|
+
mode: "server"
|
|
28049
|
+
},
|
|
28050
|
+
subjectWholeSeriesOffering: {
|
|
27022
28051
|
endpoint: "getPublicWholeSeriesOffering",
|
|
27023
28052
|
when: { $bind: {
|
|
27024
28053
|
from: "$root.subject.isWholeSeriesBooking",
|
|
@@ -27035,6 +28064,22 @@ const eventRegistrationBlockDefinition = {
|
|
|
27035
28064
|
requiredParams: ["eventSeriesId"],
|
|
27036
28065
|
mode: "server"
|
|
27037
28066
|
},
|
|
28067
|
+
wholeSeriesOfferings: {
|
|
28068
|
+
endpoint: "listPublicWholeSeriesOfferings",
|
|
28069
|
+
params: {
|
|
28070
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
28071
|
+
eventSeriesIds: { $bind: {
|
|
28072
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28073
|
+
transforms: [{ id: "value.csv" }]
|
|
28074
|
+
} },
|
|
28075
|
+
stage: { $bind: {
|
|
28076
|
+
from: "$root.previewStage",
|
|
28077
|
+
fallback: "published"
|
|
28078
|
+
} }
|
|
28079
|
+
},
|
|
28080
|
+
requiredParams: ["eventSeriesIds"],
|
|
28081
|
+
mode: "server"
|
|
28082
|
+
},
|
|
27038
28083
|
sitePasses: {
|
|
27039
28084
|
endpoint: "listPublicPasses",
|
|
27040
28085
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -27049,13 +28094,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
27049
28094
|
};
|
|
27050
28095
|
//#endregion
|
|
27051
28096
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27052
|
-
const
|
|
27053
|
-
siteId: z.string().optional(),
|
|
27054
|
-
apiBaseUrl: z.string().optional(),
|
|
27055
|
-
portalToken: z.string().nullable().optional(),
|
|
28097
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
27056
28098
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27057
|
-
courses: z.array(
|
|
27058
|
-
className: z.string().nullable().optional(),
|
|
28099
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
27059
28100
|
showSessions: z.boolean().optional(),
|
|
27060
28101
|
showPrice: z.boolean().optional(),
|
|
27061
28102
|
showCapacity: z.boolean().optional(),
|
|
@@ -27063,8 +28104,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
27063
28104
|
successMessage: z.string().optional(),
|
|
27064
28105
|
waitlistMessage: z.string().optional(),
|
|
27065
28106
|
membershipMessage: z.string().optional(),
|
|
28107
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28108
|
+
};
|
|
28109
|
+
const courseRegistrationSourceSchema = z.object({
|
|
28110
|
+
siteId: z.string().optional(),
|
|
28111
|
+
apiBaseUrl: z.string().optional(),
|
|
28112
|
+
portalToken: z.string().nullable().optional(),
|
|
28113
|
+
...courseRegistrationHydrationSchemaShape,
|
|
28114
|
+
className: z.string().nullable().optional(),
|
|
27066
28115
|
buttonText: z.string().nullable().optional(),
|
|
27067
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27068
28116
|
stage: previewStageSchema.optional()
|
|
27069
28117
|
});
|
|
27070
28118
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -27073,18 +28121,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
27073
28121
|
className: z.string().nullable(),
|
|
27074
28122
|
summaryButtonText: z.string()
|
|
27075
28123
|
});
|
|
27076
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
27077
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27078
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
27079
|
-
showSessions: z.boolean().optional(),
|
|
27080
|
-
showPrice: z.boolean().optional(),
|
|
27081
|
-
showCapacity: z.boolean().optional(),
|
|
27082
|
-
showVenue: z.boolean().optional(),
|
|
27083
|
-
successMessage: z.string().optional(),
|
|
27084
|
-
waitlistMessage: z.string().optional(),
|
|
27085
|
-
membershipMessage: z.string().optional(),
|
|
27086
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
27087
|
-
});
|
|
28124
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
27088
28125
|
const courseRegistrationRenderSchema = z.object({
|
|
27089
28126
|
display: courseRegistrationDisplaySchema,
|
|
27090
28127
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -27289,7 +28326,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
27289
28326
|
})]
|
|
27290
28327
|
}),
|
|
27291
28328
|
runtime: courseRegistrationBlockRuntime,
|
|
27292
|
-
dataSchemas: { courses:
|
|
28329
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27293
28330
|
dataLoaders: { courses: {
|
|
27294
28331
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27295
28332
|
params: {
|
|
@@ -27360,6 +28397,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27360
28397
|
defaultValue: true,
|
|
27361
28398
|
ui: { intent: "display" }
|
|
27362
28399
|
},
|
|
28400
|
+
{
|
|
28401
|
+
id: "showTitle",
|
|
28402
|
+
type: "boolean",
|
|
28403
|
+
label: "Show event title",
|
|
28404
|
+
required: false,
|
|
28405
|
+
defaultValue: false,
|
|
28406
|
+
ui: { intent: "display" }
|
|
28407
|
+
},
|
|
28408
|
+
{
|
|
28409
|
+
id: "showDescription",
|
|
28410
|
+
type: "boolean",
|
|
28411
|
+
label: "Show event description",
|
|
28412
|
+
required: false,
|
|
28413
|
+
defaultValue: false,
|
|
28414
|
+
ui: { intent: "display" }
|
|
28415
|
+
},
|
|
27363
28416
|
{
|
|
27364
28417
|
id: "showMap",
|
|
27365
28418
|
type: "boolean",
|
|
@@ -27396,10 +28449,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27396
28449
|
{
|
|
27397
28450
|
value: "10",
|
|
27398
28451
|
label: "10 dates"
|
|
28452
|
+
},
|
|
28453
|
+
{
|
|
28454
|
+
value: "all",
|
|
28455
|
+
label: "All dates"
|
|
27399
28456
|
}
|
|
27400
28457
|
],
|
|
27401
28458
|
ui: { intent: "display" }
|
|
27402
28459
|
},
|
|
28460
|
+
{
|
|
28461
|
+
id: "showCapacity",
|
|
28462
|
+
type: "boolean",
|
|
28463
|
+
label: "Show capacity",
|
|
28464
|
+
required: false,
|
|
28465
|
+
defaultValue: false,
|
|
28466
|
+
ui: { intent: "display" }
|
|
28467
|
+
},
|
|
27403
28468
|
{
|
|
27404
28469
|
id: "showCost",
|
|
27405
28470
|
type: "boolean",
|
|
@@ -27442,6 +28507,8 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27442
28507
|
} },
|
|
27443
28508
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
27444
28509
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28510
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
28511
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
27445
28512
|
showMap: { $bind: { from: "content.showMap" } },
|
|
27446
28513
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
27447
28514
|
otherDatesLimit: { $bind: {
|
|
@@ -27452,6 +28519,10 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27452
28519
|
from: "content.showCost",
|
|
27453
28520
|
fallback: true
|
|
27454
28521
|
} },
|
|
28522
|
+
showCapacity: { $bind: {
|
|
28523
|
+
from: "content.showCapacity",
|
|
28524
|
+
fallback: false
|
|
28525
|
+
} },
|
|
27455
28526
|
showAcceptedPasses: { $bind: {
|
|
27456
28527
|
from: "content.showAcceptedPasses",
|
|
27457
28528
|
fallback: true
|
|
@@ -27506,6 +28577,11 @@ const eventDetailsBlockDefinition = {
|
|
|
27506
28577
|
limit: "100",
|
|
27507
28578
|
readProfile: "details",
|
|
27508
28579
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28580
|
+
seriesIds: { $bind: {
|
|
28581
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28582
|
+
transforms: [{ id: "value.csv" }]
|
|
28583
|
+
} },
|
|
28584
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27509
28585
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27510
28586
|
},
|
|
27511
28587
|
mode: "server"
|
|
@@ -27691,7 +28767,7 @@ const courseDetailsBlockDefinition = {
|
|
|
27691
28767
|
})], { gap: "lg" })
|
|
27692
28768
|
})]
|
|
27693
28769
|
}),
|
|
27694
|
-
dataSchemas: { courses:
|
|
28770
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27695
28771
|
dataLoaders: { courses: {
|
|
27696
28772
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27697
28773
|
params: {
|
|
@@ -27810,8 +28886,8 @@ const eventSpotlightBlockDefinition = {
|
|
|
27810
28886
|
from: "content.columns",
|
|
27811
28887
|
fallback: "3"
|
|
27812
28888
|
} },
|
|
27813
|
-
|
|
27814
|
-
from: "content.
|
|
28889
|
+
cardRole: { $bind: {
|
|
28890
|
+
from: "content._cardStyles.role",
|
|
27815
28891
|
fallback: "default"
|
|
27816
28892
|
} },
|
|
27817
28893
|
buttonVariant: { $bind: {
|
|
@@ -27973,6 +29049,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
27973
29049
|
showVenue: z.boolean().nullable().optional(),
|
|
27974
29050
|
showMap: z.boolean().nullable().optional(),
|
|
27975
29051
|
showCapacity: z.boolean().nullable().optional(),
|
|
29052
|
+
cardRole: cardRoleSchema.optional(),
|
|
27976
29053
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
27977
29054
|
buttonText: z.string().optional(),
|
|
27978
29055
|
emptyMessage: z.string().optional(),
|
|
@@ -28000,6 +29077,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
28000
29077
|
showVenue: z.boolean(),
|
|
28001
29078
|
showMap: z.boolean(),
|
|
28002
29079
|
showCapacity: z.boolean(),
|
|
29080
|
+
cardRole: cardRoleSchema,
|
|
28003
29081
|
buttonVariant: eventButtonVariantSchema,
|
|
28004
29082
|
buttonText: z.string(),
|
|
28005
29083
|
emptyMessage: z.string()
|
|
@@ -28049,6 +29127,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
28049
29127
|
showVenue: source.showVenue ?? true,
|
|
28050
29128
|
showMap: source.showMap ?? true,
|
|
28051
29129
|
showCapacity: source.showCapacity ?? true,
|
|
29130
|
+
cardRole: source.cardRole ?? "default",
|
|
28052
29131
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28053
29132
|
buttonText: source.buttonText ?? "Book",
|
|
28054
29133
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -28066,8 +29145,6 @@ function buildEventCollectionHydration(source) {
|
|
|
28066
29145
|
}
|
|
28067
29146
|
//#endregion
|
|
28068
29147
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
28069
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
28070
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
28071
29148
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
28072
29149
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
28073
29150
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -28082,7 +29159,7 @@ const eventListingSourceSchema = z.object({
|
|
|
28082
29159
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
28083
29160
|
seeAllUrl: z.string().optional(),
|
|
28084
29161
|
loadMoreText: z.string().optional(),
|
|
28085
|
-
|
|
29162
|
+
cardRole: cardRoleSchema.optional(),
|
|
28086
29163
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
28087
29164
|
buttonText: z.string().optional(),
|
|
28088
29165
|
showVenue: z.boolean().optional(),
|
|
@@ -28104,7 +29181,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
28104
29181
|
emptyMessage: z.string(),
|
|
28105
29182
|
loadingMessage: z.string(),
|
|
28106
29183
|
containerClass: z.string(),
|
|
28107
|
-
|
|
29184
|
+
cardRole: cardRoleSchema,
|
|
28108
29185
|
buttonVariant: eventButtonVariantSchema,
|
|
28109
29186
|
buttonText: z.string(),
|
|
28110
29187
|
showVenue: z.boolean(),
|
|
@@ -28160,7 +29237,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
28160
29237
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
28161
29238
|
loadingMessage: "Loading events…",
|
|
28162
29239
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
28163
|
-
|
|
29240
|
+
cardRole: source.cardRole ?? "default",
|
|
28164
29241
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28165
29242
|
buttonText: source.buttonText ?? "Book",
|
|
28166
29243
|
showVenue: source.showVenue ?? true,
|
|
@@ -28482,8 +29559,8 @@ const eventListingBlockDefinition = {
|
|
|
28482
29559
|
from: "content.loadMoreText",
|
|
28483
29560
|
fallback: "Load more events"
|
|
28484
29561
|
} },
|
|
28485
|
-
|
|
28486
|
-
from: "content.
|
|
29562
|
+
cardRole: { $bind: {
|
|
29563
|
+
from: "content._cardStyles.role",
|
|
28487
29564
|
fallback: "default"
|
|
28488
29565
|
} },
|
|
28489
29566
|
buttonVariant: { $bind: {
|
|
@@ -28753,6 +29830,10 @@ const eventCalendarLayout = [styledSection({
|
|
|
28753
29830
|
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
28754
29831
|
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
28755
29832
|
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
29833
|
+
cardRole: { $bind: {
|
|
29834
|
+
from: "content._cardStyles.role",
|
|
29835
|
+
fallback: "default"
|
|
29836
|
+
} },
|
|
28756
29837
|
buttonVariant: { $bind: {
|
|
28757
29838
|
from: "content.buttonVariant",
|
|
28758
29839
|
fallback: "primary"
|
|
@@ -29385,11 +30466,11 @@ const eventCalendarAdditionalFields = [
|
|
|
29385
30466
|
searchThreshold: 8
|
|
29386
30467
|
}
|
|
29387
30468
|
}),
|
|
29388
|
-
...cardStylingFields.
|
|
30469
|
+
...cardStylingFields.map((field) => ({
|
|
29389
30470
|
...field,
|
|
29390
30471
|
ui: {
|
|
29391
30472
|
...field.ui ?? {},
|
|
29392
|
-
intent: field.id === "buttonVariant" ? "style" : "content"
|
|
30473
|
+
intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
|
|
29393
30474
|
}
|
|
29394
30475
|
})),
|
|
29395
30476
|
{
|
|
@@ -29862,7 +30943,7 @@ const publicRouteCandidatesSchema = z.object({ routes: z.array(z.object({
|
|
|
29862
30943
|
entityId: z.string(),
|
|
29863
30944
|
path: z.string(),
|
|
29864
30945
|
title: z.string(),
|
|
29865
|
-
kind: z.enum(
|
|
30946
|
+
kind: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
29866
30947
|
contentTypeKey: z.string().nullable().optional()
|
|
29867
30948
|
})) });
|
|
29868
30949
|
const groupOverrideFields = [
|
|
@@ -30156,7 +31237,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
30156
31237
|
dataSchemas: {
|
|
30157
31238
|
...offeringsPreviewEventDataSchemas,
|
|
30158
31239
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
30159
|
-
courses:
|
|
31240
|
+
courses: publicWholeSeriesOfferingsArraySchema.optional()
|
|
30160
31241
|
},
|
|
30161
31242
|
dataLoaders: {
|
|
30162
31243
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31628,7 +32709,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
31628
32709
|
}
|
|
31629
32710
|
],
|
|
31630
32711
|
layout: styledSection({
|
|
31631
|
-
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: "
|
|
32712
|
+
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: boxStyleClassNames({ role: "default" }, {}) }, [media({
|
|
31632
32713
|
className: "card-media rb-aspect-video rb-w-full rb-object-cover",
|
|
31633
32714
|
size: {
|
|
31634
32715
|
width: 960,
|
|
@@ -34680,16 +35761,27 @@ function eventListCapable() {
|
|
|
34680
35761
|
looks: "supported",
|
|
34681
35762
|
sectionSurfaces: "supported",
|
|
34682
35763
|
contentFrames: ["plain", "panel"],
|
|
34683
|
-
cardRoles: "
|
|
35764
|
+
cardRoles: "supported",
|
|
34684
35765
|
eventListTreatments
|
|
34685
35766
|
});
|
|
34686
35767
|
}
|
|
35768
|
+
function eventSpotlightCapable() {
|
|
35769
|
+
return declareBlockDesignCapability({
|
|
35770
|
+
sectionSurfaces: "supported",
|
|
35771
|
+
contentFrames: ["plain"],
|
|
35772
|
+
cardRoles: "supported"
|
|
35773
|
+
});
|
|
35774
|
+
}
|
|
34687
35775
|
function offeringsPreviewCapable() {
|
|
34688
35776
|
return declareBlockDesignCapability({
|
|
34689
35777
|
looks: "supported",
|
|
34690
35778
|
sectionSurfaces: "supported",
|
|
34691
35779
|
contentFrames: ["plain"],
|
|
34692
|
-
cardRoles: "supported"
|
|
35780
|
+
cardRoles: "supported",
|
|
35781
|
+
compositions: {
|
|
35782
|
+
kind: "offerings-preview",
|
|
35783
|
+
treatments: offeringsPreviewCompositionTreatmentValues
|
|
35784
|
+
}
|
|
34693
35785
|
});
|
|
34694
35786
|
}
|
|
34695
35787
|
function defaultBoundaryBias(visualWeight) {
|
|
@@ -34982,7 +36074,7 @@ const systemBlockDefinitions = [
|
|
|
34982
36074
|
cardRoles: "supported",
|
|
34983
36075
|
compositions: {
|
|
34984
36076
|
kind: "testimonials",
|
|
34985
|
-
treatments:
|
|
36077
|
+
treatments: testimonialsCompositionTreatmentValues
|
|
34986
36078
|
},
|
|
34987
36079
|
headingDecorationCapability: {
|
|
34988
36080
|
kind: "supported",
|
|
@@ -35137,7 +36229,7 @@ const systemBlockDefinitions = [
|
|
|
35137
36229
|
weight: "standard"
|
|
35138
36230
|
})]
|
|
35139
36231
|
})),
|
|
35140
|
-
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition,
|
|
36232
|
+
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
35141
36233
|
flow: offeringsFlow,
|
|
35142
36234
|
layoutProfiles: [layoutProfile({
|
|
35143
36235
|
variantKey: "default",
|
|
@@ -36376,184 +37468,29 @@ const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ..
|
|
|
36376
37468
|
[...EVENT_ATTENDEE_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
36377
37469
|
[...STANDARD_LINE_ITEM_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
36378
37470
|
//#endregion
|
|
36379
|
-
//#region ../api/src/
|
|
36380
|
-
|
|
36381
|
-
|
|
36382
|
-
|
|
36383
|
-
|
|
36384
|
-
|
|
36385
|
-
|
|
36386
|
-
|
|
36387
|
-
|
|
36388
|
-
|
|
36389
|
-
|
|
36390
|
-
|
|
36391
|
-
|
|
36392
|
-
|
|
36393
|
-
|
|
36394
|
-
|
|
36395
|
-
|
|
36396
|
-
|
|
36397
|
-
|
|
36398
|
-
|
|
36399
|
-
|
|
36400
|
-
|
|
36401
|
-
//#region ../api/src/bookingVerticalCatalog.ts
|
|
36402
|
-
const VERTICAL_BOOKING_PRESETS = [
|
|
36403
|
-
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
36404
|
-
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
36405
|
-
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
36406
|
-
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
36407
|
-
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
36408
|
-
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
36409
|
-
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
36410
|
-
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
36411
|
-
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
36412
|
-
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
36413
|
-
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
36414
|
-
verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
36415
|
-
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
36416
|
-
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
36417
|
-
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
36418
|
-
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
36419
|
-
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
36420
|
-
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
36421
|
-
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
36422
|
-
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
36423
|
-
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
36424
|
-
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
36425
|
-
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
36426
|
-
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
36427
|
-
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
36428
|
-
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
36429
|
-
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
36430
|
-
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
36431
|
-
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
36432
|
-
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
36433
|
-
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
36434
|
-
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
36435
|
-
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
36436
|
-
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
36437
|
-
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
36438
|
-
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
36439
|
-
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
36440
|
-
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
36441
|
-
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
36442
|
-
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
36443
|
-
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
36444
|
-
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
36445
|
-
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
36446
|
-
verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
36447
|
-
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
36448
|
-
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
36449
|
-
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
36450
|
-
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
36451
|
-
verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
36452
|
-
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
36453
|
-
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
36454
|
-
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
36455
|
-
verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
36456
|
-
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
36457
|
-
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
36458
|
-
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
36459
|
-
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
36460
|
-
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
36461
|
-
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
36462
|
-
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
36463
|
-
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
36464
|
-
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
36465
|
-
];
|
|
36466
|
-
const VERTICAL_ID_SET = /* @__PURE__ */ new Set([
|
|
36467
|
-
"yoga_wellness",
|
|
36468
|
-
"fitness_pt",
|
|
36469
|
-
"dance_school",
|
|
36470
|
-
"physiotherapy_physical_health",
|
|
36471
|
-
"massage_bodywork",
|
|
36472
|
-
"therapist_practitioner",
|
|
36473
|
-
"beauty_spa",
|
|
36474
|
-
"consultant_coach",
|
|
36475
|
-
"training_provider",
|
|
36476
|
-
"retreat_centre",
|
|
36477
|
-
"music_school",
|
|
36478
|
-
"voice_singing",
|
|
36479
|
-
"performing_arts_school",
|
|
36480
|
-
"community_wellbeing",
|
|
36481
|
-
"venue_event_space"
|
|
36482
|
-
]);
|
|
36483
|
-
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
36484
|
-
function parseVerticalId(value) {
|
|
36485
|
-
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
36486
|
-
}
|
|
36487
|
-
function parseVerticalPresetId(value) {
|
|
36488
|
-
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
36489
|
-
}
|
|
36490
|
-
function getVerticalPresetDefinition(presetId) {
|
|
36491
|
-
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
36492
|
-
if (!definition) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
36493
|
-
return definition;
|
|
36494
|
-
}
|
|
36495
|
-
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
36496
|
-
const firstPresetId = presetIds[0];
|
|
36497
|
-
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
36498
|
-
}
|
|
36499
|
-
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
36500
|
-
return {
|
|
36501
|
-
verticalId,
|
|
36502
|
-
selectedPresetIds
|
|
36503
|
-
};
|
|
36504
|
-
}
|
|
36505
|
-
function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
36506
|
-
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
36507
|
-
return nonEmptyPresetIds ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
36508
|
-
}
|
|
36509
|
-
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
36510
|
-
if (!rawConfig) return {
|
|
36511
|
-
kind: "unconfigured",
|
|
36512
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
36513
|
-
};
|
|
36514
|
-
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
36515
|
-
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
36516
|
-
const config = {
|
|
36517
|
-
verticalId,
|
|
36518
|
-
selectedPresetIds
|
|
36519
|
-
};
|
|
36520
|
-
if (!verticalId && selectedPresetIds.length === 0) return {
|
|
36521
|
-
kind: "unconfigured",
|
|
36522
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
36523
|
-
};
|
|
36524
|
-
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
36525
|
-
if (issues.length > 0) return {
|
|
36526
|
-
kind: "invalid",
|
|
36527
|
-
config,
|
|
36528
|
-
issues
|
|
36529
|
-
};
|
|
36530
|
-
const configuredConfig = verticalId ? createSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
|
|
36531
|
-
if (!configuredConfig) return {
|
|
36532
|
-
kind: "invalid",
|
|
36533
|
-
config,
|
|
36534
|
-
issues: ["empty_selected_presets"]
|
|
36535
|
-
};
|
|
36536
|
-
return {
|
|
36537
|
-
kind: "configured",
|
|
36538
|
-
config: configuredConfig,
|
|
36539
|
-
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
36540
|
-
};
|
|
36541
|
-
}
|
|
36542
|
-
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
36543
|
-
const issues = /* @__PURE__ */ new Set();
|
|
36544
|
-
if (rawConfig.verticalId != null && !config.verticalId) issues.add("unknown_vertical");
|
|
36545
|
-
if (!config.verticalId && config.selectedPresetIds.length > 0) issues.add("missing_vertical");
|
|
36546
|
-
if ((Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).some((presetId) => parseVerticalPresetId(presetId) === null)) issues.add("unknown_preset");
|
|
36547
|
-
if (config.verticalId && config.selectedPresetIds.length === 0) issues.add("empty_selected_presets");
|
|
36548
|
-
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
36549
|
-
for (const presetId of config.selectedPresetIds) {
|
|
36550
|
-
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
36551
|
-
if (config.verticalId && presetDefinition.verticalId !== config.verticalId) issues.add("preset_vertical_mismatch");
|
|
36552
|
-
if (presetDefinition.availability === "future") issues.add("future_preset_selected");
|
|
36553
|
-
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues.add("duplicate_canonical_behaviour");
|
|
36554
|
-
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
37471
|
+
//#region ../api/src/bookingVerticals.ts
|
|
37472
|
+
/**
|
|
37473
|
+
* Transport adapters for the booking-vertical domain.
|
|
37474
|
+
*
|
|
37475
|
+
* The domain catalog and all pure resolution/selection rules live in core;
|
|
37476
|
+
* this module owns only the Zod boundary used by API payloads.
|
|
37477
|
+
*/
|
|
37478
|
+
function formatRawDiagnosticValue(value) {
|
|
37479
|
+
const serialized = JSON.stringify(value);
|
|
37480
|
+
return serialized === void 0 ? String(value) : serialized;
|
|
37481
|
+
}
|
|
37482
|
+
function describeSiteVerticalConfigIssue(issue) {
|
|
37483
|
+
switch (issue.code) {
|
|
37484
|
+
case "unknown_vertical": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
37485
|
+
case "unknown_preset": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
37486
|
+
case "missing_vertical":
|
|
37487
|
+
case "empty_selected_presets":
|
|
37488
|
+
case "preset_vertical_mismatch":
|
|
37489
|
+
case "duplicate_preset_id":
|
|
37490
|
+
case "duplicate_canonical_behaviour":
|
|
37491
|
+
case "future_preset_selected": return issue.code;
|
|
37492
|
+
default: return assertNever$2(issue);
|
|
36555
37493
|
}
|
|
36556
|
-
return [...issues];
|
|
36557
37494
|
}
|
|
36558
37495
|
const VerticalIdSchema = z.string().trim().transform((value, ctx) => {
|
|
36559
37496
|
const parsed = parseVerticalId(value);
|
|
@@ -36585,16 +37522,12 @@ z.object({
|
|
|
36585
37522
|
if (resolved.kind === "invalid") {
|
|
36586
37523
|
ctx.addIssue({
|
|
36587
37524
|
code: z.ZodIssueCode.custom,
|
|
36588
|
-
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
37525
|
+
message: `Invalid booking vertical config: ${resolved.issues.map(describeSiteVerticalConfigIssue).join(", ")}`
|
|
36589
37526
|
});
|
|
36590
37527
|
return z.NEVER;
|
|
36591
37528
|
}
|
|
36592
37529
|
return resolved.config;
|
|
36593
37530
|
});
|
|
36594
|
-
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
36595
|
-
verticalId: null,
|
|
36596
|
-
selectedPresetIds: []
|
|
36597
|
-
};
|
|
36598
37531
|
//#endregion
|
|
36599
37532
|
//#region ../api/src/utils/isRecord.ts
|
|
36600
37533
|
function isRecord(value) {
|