@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
package/dist/server/data.mjs
CHANGED
|
@@ -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
|
+
]
|
|
1462
1524
|
}
|
|
1463
1525
|
});
|
|
1464
|
-
|
|
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"
|
|
1680
|
+
}
|
|
1681
|
+
});
|
|
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",
|
|
@@ -12941,7 +13797,8 @@ const curatedSiteStyles = [
|
|
|
12941
13797
|
buttonStyleChoices: [
|
|
12942
13798
|
buttonChoice("soft-pill"),
|
|
12943
13799
|
buttonChoice("pebble"),
|
|
12944
|
-
buttonChoice("confident-chip")
|
|
13800
|
+
buttonChoice("confident-chip"),
|
|
13801
|
+
buttonChoice("flat-ink")
|
|
12945
13802
|
],
|
|
12946
13803
|
paletteRecommendations: [
|
|
12947
13804
|
paletteRecommendation("soft-natural-sage"),
|
|
@@ -15786,8 +16643,41 @@ function containerStylesField(options = {}) {
|
|
|
15786
16643
|
return createBoxStylesFieldWithDepth("container", options);
|
|
15787
16644
|
}
|
|
15788
16645
|
function cardStylesField(options = {}) {
|
|
16646
|
+
if (options.controls === "role-only") return createRoleOnlyCardStylesField(options);
|
|
15789
16647
|
return createBoxStylesFieldWithDepth("card", options);
|
|
15790
16648
|
}
|
|
16649
|
+
function createRoleOnlyCardStylesField(options) {
|
|
16650
|
+
const { id = "_cardStyles", label = "Card styles", renderInHeader, intent } = options;
|
|
16651
|
+
return {
|
|
16652
|
+
id,
|
|
16653
|
+
type: "modal",
|
|
16654
|
+
label,
|
|
16655
|
+
required: false,
|
|
16656
|
+
schema: { fields: [{
|
|
16657
|
+
id: "role",
|
|
16658
|
+
type: "select",
|
|
16659
|
+
label: "Card style",
|
|
16660
|
+
description: "Choose a semantic card style from the active site style.",
|
|
16661
|
+
required: false,
|
|
16662
|
+
multiple: false,
|
|
16663
|
+
defaultValue: "default",
|
|
16664
|
+
options: cardVariantRoleValues.map((value) => ({
|
|
16665
|
+
value,
|
|
16666
|
+
label: value === "default" ? "Default" : "Alternative"
|
|
16667
|
+
}))
|
|
16668
|
+
}] },
|
|
16669
|
+
ui: {
|
|
16670
|
+
...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
|
|
16671
|
+
...intent ? { intent } : {},
|
|
16672
|
+
modalConfig: {
|
|
16673
|
+
buttonLabel: label,
|
|
16674
|
+
description: "Choose the site-style card role.",
|
|
16675
|
+
buttonVariant: "outline",
|
|
16676
|
+
showCustomizedIndicator: true
|
|
16677
|
+
}
|
|
16678
|
+
}
|
|
16679
|
+
};
|
|
16680
|
+
}
|
|
15791
16681
|
//#endregion
|
|
15792
16682
|
//#region ../blocks/src/system/fields/imageShape.ts
|
|
15793
16683
|
const standardImageShapeOptions = [
|
|
@@ -16983,21 +17873,29 @@ function cardRoleClass(role) {
|
|
|
16983
17873
|
return `card-role-${role}`;
|
|
16984
17874
|
}
|
|
16985
17875
|
/**
|
|
17876
|
+
* The role class for a card slot the *block* owns structurally, where a Look
|
|
17877
|
+
* may still name the surface.
|
|
17878
|
+
*
|
|
17879
|
+
* Some layouts have more than one card slot and decide themselves which one is
|
|
17880
|
+
* the statement — the featured-editorial testimonials field is a lead voice
|
|
17881
|
+
* beside its supporting voices, and that is structure, not composition. Those
|
|
17882
|
+
* slots still have to honour a Look that picks a surface, or a role-picking
|
|
17883
|
+
* Look would silently no-op under the layout. So the slot carries a default
|
|
17884
|
+
* role and the Look's compiled role wins over it when there is one.
|
|
17885
|
+
*
|
|
17886
|
+
* An explicit `none` is honoured as boxlessness and emits no class, matching
|
|
17887
|
+
* how the composite emitter reads it.
|
|
17888
|
+
*/
|
|
17889
|
+
/**
|
|
16986
17890
|
* The role a card renders with, and the one place a set of card styles becomes
|
|
16987
17891
|
* a role.
|
|
16988
17892
|
*
|
|
16989
|
-
* Precedence: a per-item override, then the `role` a Look
|
|
16990
|
-
* block's card styles
|
|
16991
|
-
*
|
|
16992
|
-
* vocabulary — an explicit `role` wins when a record carries both.
|
|
16993
|
-
*
|
|
16994
|
-
* Compiled and freshly authored card styles carry only `role`. `cardVariant`
|
|
16995
|
-
* survives on content persisted before the role contract, and normalizes here
|
|
16996
|
-
* rather than in `cardStylesOverrideSchema` because that content reaches the
|
|
16997
|
-
* renderer as a raw record without ever passing through the schema.
|
|
17893
|
+
* Precedence: a per-item override, then the `role` a Look or semantic field
|
|
17894
|
+
* compiled onto the block's card styles. Persisted inputs are normalized at
|
|
17895
|
+
* this boundary because raw block records do not pass through the theme schema.
|
|
16998
17896
|
*/
|
|
16999
17897
|
function resolveCardRoleForBoxStyles(input, override) {
|
|
17000
|
-
return override ?? normalizeCardRole(input.role)
|
|
17898
|
+
return override ?? normalizeCardRole(input.role);
|
|
17001
17899
|
}
|
|
17002
17900
|
/**
|
|
17003
17901
|
* Parse a block's own per-item surface vocabulary into a card role. The alias
|
|
@@ -17014,8 +17912,8 @@ function resolveItemCardRole(value, aliases) {
|
|
|
17014
17912
|
* The card surface for a set of box styles: one role, one class vocabulary, so
|
|
17015
17913
|
* a site-style swap re-skins the card whichever field named it.
|
|
17016
17914
|
*/
|
|
17017
|
-
function cardSurface(input, override) {
|
|
17018
|
-
const role = resolveCardRoleForBoxStyles(input, override);
|
|
17915
|
+
function cardSurface(input, override, fallback) {
|
|
17916
|
+
const role = resolveCardRoleForBoxStyles(input, override) ?? fallback ?? null;
|
|
17019
17917
|
if (!role) return {
|
|
17020
17918
|
role: null,
|
|
17021
17919
|
classes: []
|
|
@@ -17112,10 +18010,9 @@ function raisedClassFor(options) {
|
|
|
17112
18010
|
* of keeping a copy that drifts.
|
|
17113
18011
|
*/
|
|
17114
18012
|
function boxStyleClassNames(value, options) {
|
|
17115
|
-
|
|
17116
|
-
const input = value;
|
|
18013
|
+
const input = value && typeof value === "object" ? value : {};
|
|
17117
18014
|
const borderOverride = borderOverrideClass(input);
|
|
17118
|
-
const surface = cardSurface(input, options.cardRoleOverride);
|
|
18015
|
+
const surface = cardSurface(input, options.cardRoleOverride, options.cardRoleFallback);
|
|
17119
18016
|
const cardOwnsBorder = surface.role !== null && surface.role !== "none";
|
|
17120
18017
|
return [
|
|
17121
18018
|
borderOverride || cardOwnsBorder ? withoutBorderClasses(options.baseClass ?? "") : options.baseClass ?? "",
|
|
@@ -17263,29 +18160,41 @@ const cardRoleClassTransform = {
|
|
|
17263
18160
|
return baseClass ? `${baseClass.trim()} ${hook}` : hook;
|
|
17264
18161
|
}
|
|
17265
18162
|
};
|
|
17266
|
-
|
|
17267
|
-
|
|
18163
|
+
/**
|
|
18164
|
+
* The role class for a layout's own card slot, bound from the block's compiled
|
|
18165
|
+
* card styles so a Look that picks a surface still reaches a slot the layout
|
|
18166
|
+
* assigned a default role to.
|
|
18167
|
+
*/
|
|
18168
|
+
const cardSlotRoleTransform = {
|
|
18169
|
+
id: "boxStyles.cardSlotRole",
|
|
17268
18170
|
kind: "string",
|
|
17269
|
-
summary: "
|
|
17270
|
-
run: (value, options) => {
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17275
|
-
return baseClass ? `${baseClass} ${roleClass}` : roleClass;
|
|
17276
|
-
}
|
|
18171
|
+
summary: "Resolve a layout card slot's role class, defaulting to the slot's own role",
|
|
18172
|
+
run: (value, options) => boxStyleClassNames(value, {
|
|
18173
|
+
baseClass: options?.baseClass,
|
|
18174
|
+
cardRoleFallback: options.slotDefault,
|
|
18175
|
+
includeSpacing: false
|
|
18176
|
+
})
|
|
17277
18177
|
};
|
|
18178
|
+
function resolveBorderColorState(value, options, viewModel) {
|
|
18179
|
+
const input = asPartialObject(options?.stylesPath ? readPath(viewModel, options.stylesPath) : value);
|
|
18180
|
+
if (!input) return null;
|
|
18181
|
+
return {
|
|
18182
|
+
input,
|
|
18183
|
+
role: resolveCardRoleForBoxStyles(input, options?.stylesPath ? resolveItemCardRole(value, options.itemRoleAliases) : void 0)
|
|
18184
|
+
};
|
|
18185
|
+
}
|
|
17278
18186
|
const boxStylesBorderColorTransform = {
|
|
17279
18187
|
id: "boxStyles.borderColor",
|
|
17280
18188
|
kind: "string",
|
|
17281
18189
|
summary: "Resolve border color from box styles border.colorToken",
|
|
17282
|
-
run: (value, options,
|
|
18190
|
+
run: (value, options, context) => {
|
|
17283
18191
|
const fallbackToken = options?.fallbackToken ?? "border";
|
|
17284
18192
|
const returnEmptyForDefault = options?.returnEmptyForDefault ?? false;
|
|
17285
18193
|
let explicitToken = null;
|
|
17286
|
-
const
|
|
17287
|
-
if (
|
|
17288
|
-
|
|
18194
|
+
const state = resolveBorderColorState(value, options, context.viewModel);
|
|
18195
|
+
if (state) {
|
|
18196
|
+
if (state.role && state.role !== "none") return "";
|
|
18197
|
+
const border = normalizeBoxStylesBorder(state.input.border);
|
|
17289
18198
|
if (border && border.enabled === true && border.colorToken) explicitToken = border.colorToken;
|
|
17290
18199
|
}
|
|
17291
18200
|
if (explicitToken) {
|
|
@@ -17505,7 +18414,7 @@ const boxStylesTransforms = [
|
|
|
17505
18414
|
roundedTransform,
|
|
17506
18415
|
boxStylesCompositeTransform,
|
|
17507
18416
|
cardRoleClassTransform,
|
|
17508
|
-
|
|
18417
|
+
cardSlotRoleTransform,
|
|
17509
18418
|
boxStylesBorderColorTransform,
|
|
17510
18419
|
sectionClassNameTransform,
|
|
17511
18420
|
containerStylesResolveClassName,
|
|
@@ -17612,10 +18521,16 @@ function styledCard(children, opts, ...mods) {
|
|
|
17612
18521
|
const style = {
|
|
17613
18522
|
...opts.style ?? {},
|
|
17614
18523
|
borderColor: { $bind: {
|
|
17615
|
-
from: opts.stylesFrom,
|
|
18524
|
+
from: opts.itemRole?.from ?? opts.stylesFrom,
|
|
17616
18525
|
transforms: [{
|
|
17617
18526
|
id: "boxStyles.borderColor",
|
|
17618
|
-
options: {
|
|
18527
|
+
options: {
|
|
18528
|
+
returnEmptyForDefault: true,
|
|
18529
|
+
...opts.itemRole ? {
|
|
18530
|
+
stylesPath: opts.stylesFrom,
|
|
18531
|
+
...opts.itemRole.aliases ? { itemRoleAliases: opts.itemRole.aliases } : {}
|
|
18532
|
+
} : {}
|
|
18533
|
+
}
|
|
17619
18534
|
}]
|
|
17620
18535
|
} }
|
|
17621
18536
|
};
|
|
@@ -18740,18 +19655,73 @@ function buildGridCardsLayout(className) {
|
|
|
18740
19655
|
return el("div", { className }, buildResponsiveGridCards());
|
|
18741
19656
|
}
|
|
18742
19657
|
/**
|
|
19658
|
+
* The card slots the featured-editorial layout has, and the role each one
|
|
19659
|
+
* defaults to.
|
|
19660
|
+
*
|
|
19661
|
+
* Which slot is the statement is *structure*, so the layout decides it: this
|
|
19662
|
+
* variant exists to put one lead voice beside its supporting voices. But a Look
|
|
19663
|
+
* that picks a surface has to keep meaning something here, so the lead slot's
|
|
19664
|
+
* role is a default the Look's compiled `cardRole` wins over — see
|
|
19665
|
+
* `cardSlotRoleClass`. Supporting voices stay the quiet everyday card.
|
|
19666
|
+
*/
|
|
19667
|
+
const FEATURED_EDITORIAL_SLOTS = {
|
|
19668
|
+
lead: {
|
|
19669
|
+
/** Composition CSS addresses the lead card's geometry through this. */
|
|
19670
|
+
variantClass: "rb-testimonials-fe-card--feature",
|
|
19671
|
+
slotDefault: "alternative",
|
|
19672
|
+
followsLook: true
|
|
19673
|
+
},
|
|
19674
|
+
support: {
|
|
19675
|
+
variantClass: null,
|
|
19676
|
+
slotDefault: "default",
|
|
19677
|
+
followsLook: false
|
|
19678
|
+
}
|
|
19679
|
+
};
|
|
19680
|
+
/** Where the testimonials block's compiled card styles live. */
|
|
19681
|
+
const TESTIMONIALS_CARD_STYLES_PATH = "content._cardStyles";
|
|
19682
|
+
/**
|
|
19683
|
+
* The class list for one featured-editorial card slot.
|
|
19684
|
+
*
|
|
19685
|
+
* A slot that follows the Look has to resolve at render time, so it binds
|
|
19686
|
+
* through the shared card-class emitter rather than naming a role class here;
|
|
19687
|
+
* a slot that does not is a plain string built by the same composite emitter.
|
|
19688
|
+
*/
|
|
19689
|
+
function featuredEditorialCardClassName(slot) {
|
|
19690
|
+
const { variantClass, slotDefault, followsLook } = FEATURED_EDITORIAL_SLOTS[slot];
|
|
19691
|
+
const baseClass = ["rb-testimonials-fe-card", variantClass].filter(Boolean).join(" ");
|
|
19692
|
+
if (!followsLook) return boxStyleClassNames({}, {
|
|
19693
|
+
baseClass,
|
|
19694
|
+
cardRoleFallback: slotDefault,
|
|
19695
|
+
includeSpacing: false
|
|
19696
|
+
});
|
|
19697
|
+
return { $bind: {
|
|
19698
|
+
from: TESTIMONIALS_CARD_STYLES_PATH,
|
|
19699
|
+
transforms: [{
|
|
19700
|
+
id: "boxStyles.cardSlotRole",
|
|
19701
|
+
options: {
|
|
19702
|
+
baseClass,
|
|
19703
|
+
slotDefault
|
|
19704
|
+
}
|
|
19705
|
+
}],
|
|
19706
|
+
fallback: boxStyleClassNames({}, {
|
|
19707
|
+
baseClass,
|
|
19708
|
+
cardRoleFallback: slotDefault,
|
|
19709
|
+
includeSpacing: false
|
|
19710
|
+
})
|
|
19711
|
+
} };
|
|
19712
|
+
}
|
|
19713
|
+
/**
|
|
18743
19714
|
* Build a single "featured editorial" testimonial card.
|
|
18744
19715
|
*
|
|
18745
|
-
* This card type deliberately renders NO avatar/headshot:
|
|
18746
|
-
*
|
|
18747
|
-
*
|
|
18748
|
-
*
|
|
18749
|
-
* - `rb-testimonials-fe-card--plain` → white surface card
|
|
19716
|
+
* This card type deliberately renders NO avatar/headshot: a quote mark, the
|
|
19717
|
+
* quote body, then the author name and a context line. The card surface comes
|
|
19718
|
+
* from the slot's card role — the site style owns the fill, border, corners and
|
|
19719
|
+
* padding.
|
|
18750
19720
|
*
|
|
18751
19721
|
* Extra modifiers (`repeat`, `when`) are forwarded to the card node so the
|
|
18752
19722
|
* caller can drive first-vs-rest branching.
|
|
18753
19723
|
*/
|
|
18754
|
-
function buildFeaturedEditorialCard(
|
|
19724
|
+
function buildFeaturedEditorialCard(slot, ...mods) {
|
|
18755
19725
|
const quoteMark = text({
|
|
18756
19726
|
as: "span",
|
|
18757
19727
|
className: "rb-testimonials-fe-qmark",
|
|
@@ -18765,11 +19735,11 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18765
19735
|
as: "span",
|
|
18766
19736
|
className: "rb-testimonials-fe-context"
|
|
18767
19737
|
}, when("testimonial.content.jobTitle"), bind("testimonial.content.jobTitle"))]);
|
|
18768
|
-
return el("div", { className:
|
|
19738
|
+
return el("div", { className: featuredEditorialCardClassName(slot) }, [el("div", { className: "card-content rb-testimonials-fe-card-body" }, [
|
|
18769
19739
|
quoteMark,
|
|
18770
19740
|
quote,
|
|
18771
19741
|
meta
|
|
18772
|
-
], ...mods);
|
|
19742
|
+
])], ...mods);
|
|
18773
19743
|
}
|
|
18774
19744
|
/**
|
|
18775
19745
|
* Build the "featured editorial" layout: an asymmetric two-column arrangement
|
|
@@ -18783,7 +19753,7 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18783
19753
|
* index scope in context, so entry 0 produces no node in the rest column.
|
|
18784
19754
|
*/
|
|
18785
19755
|
function buildFeaturedEditorialLayout() {
|
|
18786
|
-
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("
|
|
19756
|
+
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", {
|
|
18787
19757
|
equals: 0,
|
|
18788
19758
|
not: true
|
|
18789
19759
|
}))])]);
|
|
@@ -19510,7 +20480,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
19510
20480
|
});
|
|
19511
20481
|
//#endregion
|
|
19512
20482
|
//#region ../blocks/src/system/fragments/library/card.ts
|
|
19513
|
-
const cardVariantOptions
|
|
20483
|
+
const cardVariantOptions = cardVariantRoleValues.map((value) => ({
|
|
19514
20484
|
value,
|
|
19515
20485
|
label: value === "default" ? "Default" : "Alternative"
|
|
19516
20486
|
}));
|
|
@@ -19608,7 +20578,7 @@ const cardFragment = defineFragment({
|
|
|
19608
20578
|
description: "Choose a card style from your theme",
|
|
19609
20579
|
required: false,
|
|
19610
20580
|
defaultValue: "default",
|
|
19611
|
-
options: cardVariantOptions
|
|
20581
|
+
options: cardVariantOptions,
|
|
19612
20582
|
ui: { intent: "style" }
|
|
19613
20583
|
}
|
|
19614
20584
|
],
|
|
@@ -19617,7 +20587,10 @@ const cardFragment = defineFragment({
|
|
|
19617
20587
|
className: { $bind: {
|
|
19618
20588
|
from: "variant",
|
|
19619
20589
|
fallback: "default",
|
|
19620
|
-
transforms: [{
|
|
20590
|
+
transforms: [{
|
|
20591
|
+
id: "boxStyles.cardRoleClass",
|
|
20592
|
+
options: { baseClass: "" }
|
|
20593
|
+
}]
|
|
19621
20594
|
} }
|
|
19622
20595
|
}, [media({
|
|
19623
20596
|
className: "card-media rb-w-full rb-h-auto rb-object-cover",
|
|
@@ -25573,19 +26546,30 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
25573
26546
|
]);
|
|
25574
26547
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
25575
26548
|
//#endregion
|
|
25576
|
-
//#region ../blocks/src/system/blocks/
|
|
25577
|
-
|
|
25578
|
-
|
|
25579
|
-
|
|
25580
|
-
|
|
26549
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
26550
|
+
const blockBookingConsentSchema = z.object({
|
|
26551
|
+
requirementId: z.string(),
|
|
26552
|
+
title: z.string(),
|
|
26553
|
+
agreement: RichTextDocSchema,
|
|
26554
|
+
checkboxLabel: z.string()
|
|
26555
|
+
});
|
|
26556
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
26557
|
+
id: z.string(),
|
|
26558
|
+
label: z.string(),
|
|
26559
|
+
type: z.literal("booking_requirement_consent"),
|
|
26560
|
+
required: z.literal(true),
|
|
26561
|
+
agreement: RichTextDocSchema,
|
|
26562
|
+
checkboxLabel: z.string().min(1)
|
|
26563
|
+
});
|
|
26564
|
+
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
26565
|
+
//#endregion
|
|
26566
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26567
|
+
const wholeSeriesVenueSchema = z.object({
|
|
25581
26568
|
id: z.string(),
|
|
25582
26569
|
name: z.string(),
|
|
25583
26570
|
address: z.string().nullable()
|
|
25584
26571
|
});
|
|
25585
|
-
|
|
25586
|
-
* Zod schema for course session (occurrence) data
|
|
25587
|
-
*/
|
|
25588
|
-
const courseSessionSchema = z.object({
|
|
26572
|
+
const wholeSeriesSessionSchema = z.object({
|
|
25589
26573
|
id: z.string(),
|
|
25590
26574
|
startsAt: z.string(),
|
|
25591
26575
|
endsAt: z.string(),
|
|
@@ -25593,14 +26577,14 @@ const courseSessionSchema = z.object({
|
|
|
25593
26577
|
capacityOverride: z.number().nullable().optional(),
|
|
25594
26578
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
25595
26579
|
});
|
|
25596
|
-
const
|
|
26580
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
25597
26581
|
id: z.string(),
|
|
25598
26582
|
name: z.string(),
|
|
25599
26583
|
roleLabel: z.string().nullable(),
|
|
25600
26584
|
summary: z.string().nullable(),
|
|
25601
26585
|
profilePath: z.string().nullable()
|
|
25602
26586
|
});
|
|
25603
|
-
const
|
|
26587
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
25604
26588
|
id: z.string(),
|
|
25605
26589
|
name: z.string(),
|
|
25606
26590
|
description: z.string().nullable(),
|
|
@@ -25616,7 +26600,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
25616
26600
|
"both"
|
|
25617
26601
|
]).nullable().optional()
|
|
25618
26602
|
});
|
|
25619
|
-
const
|
|
26603
|
+
const wholeSeriesPricingSchema = z.object({
|
|
25620
26604
|
bookingRequirement: z.enum(["none", "required"]),
|
|
25621
26605
|
pricingStrategy: z.enum([
|
|
25622
26606
|
"free",
|
|
@@ -25630,22 +26614,20 @@ const coursePricingSchema = z.object({
|
|
|
25630
26614
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
25631
26615
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
25632
26616
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25633
|
-
options: z.array(
|
|
26617
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
25634
26618
|
});
|
|
25635
|
-
/**
|
|
25636
|
-
* Zod schema for public course data
|
|
25637
|
-
*/
|
|
25638
26619
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
25639
26620
|
eventSeriesId: z.string(),
|
|
25640
26621
|
eventOfferingId: z.string(),
|
|
25641
26622
|
title: z.string(),
|
|
25642
26623
|
slug: z.string(),
|
|
25643
26624
|
description: z.unknown().nullable(),
|
|
25644
|
-
teamMembers: z.array(
|
|
26625
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
25645
26626
|
enrollmentOpen: z.boolean(),
|
|
25646
|
-
pricing:
|
|
26627
|
+
pricing: wholeSeriesPricingSchema,
|
|
25647
26628
|
currency: z.string(),
|
|
25648
26629
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26630
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
25649
26631
|
enrollmentCapacity: z.number().nullable(),
|
|
25650
26632
|
acceptsMemberships: z.boolean(),
|
|
25651
26633
|
status: z.enum([
|
|
@@ -25656,12 +26638,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
25656
26638
|
sessionsCount: z.number(),
|
|
25657
26639
|
enrolledCount: z.number(),
|
|
25658
26640
|
availableSpots: z.number().nullable(),
|
|
25659
|
-
sessions: z.array(
|
|
25660
|
-
venue:
|
|
26641
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
26642
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
25661
26643
|
});
|
|
25662
|
-
|
|
25663
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
25664
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
26644
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
25665
26645
|
//#endregion
|
|
25666
26646
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
25667
26647
|
const eventPresetSchema = z.enum([
|
|
@@ -25965,6 +26945,7 @@ const publicEventSchema = z.object({
|
|
|
25965
26945
|
timeZone: z.string(),
|
|
25966
26946
|
pricing: publicEventPricingSchema,
|
|
25967
26947
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26948
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
25968
26949
|
accessRestriction: accessRestrictionSchema,
|
|
25969
26950
|
allowedCategoryIds: z.array(z.string()),
|
|
25970
26951
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -25972,7 +26953,7 @@ const publicEventSchema = z.object({
|
|
|
25972
26953
|
acceptsMemberships: z.boolean().optional(),
|
|
25973
26954
|
wholeSeries: z.object({
|
|
25974
26955
|
eventSeriesId: z.string(),
|
|
25975
|
-
pricing:
|
|
26956
|
+
pricing: wholeSeriesPricingSchema,
|
|
25976
26957
|
currency: z.string(),
|
|
25977
26958
|
enrollmentOpen: z.boolean()
|
|
25978
26959
|
}).nullable().optional()
|
|
@@ -25981,24 +26962,19 @@ const publicEventSchema = z.object({
|
|
|
25981
26962
|
* Schema for an array of public events
|
|
25982
26963
|
*/
|
|
25983
26964
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
26965
|
+
//#endregion
|
|
26966
|
+
//#region ../blocks/src/system/blocks/events/shared/fields.ts
|
|
25984
26967
|
/**
|
|
25985
26968
|
* Shared card styling fields for event blocks
|
|
25986
26969
|
*/
|
|
25987
26970
|
const cardStylingFields = [
|
|
25988
|
-
{
|
|
25989
|
-
id: "
|
|
25990
|
-
type: "select",
|
|
26971
|
+
cardStylesField({
|
|
26972
|
+
id: "_cardStyles",
|
|
25991
26973
|
label: "Card style",
|
|
25992
|
-
|
|
25993
|
-
|
|
25994
|
-
|
|
25995
|
-
|
|
25996
|
-
options: cardVariantRoleValues.map((value) => ({
|
|
25997
|
-
value,
|
|
25998
|
-
label: value === "default" ? "Default" : "Alternative"
|
|
25999
|
-
})),
|
|
26000
|
-
ui: { intent: "style" }
|
|
26001
|
-
},
|
|
26974
|
+
controls: "role-only",
|
|
26975
|
+
renderInHeader: false,
|
|
26976
|
+
intent: "style"
|
|
26977
|
+
}),
|
|
26002
26978
|
createButtonVariantField({ description: "Choose a button style from your theme" }),
|
|
26003
26979
|
{
|
|
26004
26980
|
id: "buttonText",
|
|
@@ -26137,14 +27113,7 @@ function normalizeIdList(parts) {
|
|
|
26137
27113
|
}
|
|
26138
27114
|
//#endregion
|
|
26139
27115
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
26140
|
-
const eventSurfacePresetValues =
|
|
26141
|
-
"course",
|
|
26142
|
-
"term",
|
|
26143
|
-
"class",
|
|
26144
|
-
"workshop",
|
|
26145
|
-
"retreat",
|
|
26146
|
-
"performance"
|
|
26147
|
-
];
|
|
27116
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
26148
27117
|
const eventSurfaceScopeValues = [
|
|
26149
27118
|
"all",
|
|
26150
27119
|
"regularClassSchedule",
|
|
@@ -26325,6 +27294,25 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
26325
27294
|
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
26326
27295
|
}
|
|
26327
27296
|
//#endregion
|
|
27297
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
27298
|
+
function planEventRegistrationScope(input) {
|
|
27299
|
+
const subject = input.subject;
|
|
27300
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
27301
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
27302
|
+
kind: "context",
|
|
27303
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
27304
|
+
occurrenceContext: input.occurrenceContext,
|
|
27305
|
+
subject
|
|
27306
|
+
})
|
|
27307
|
+
};
|
|
27308
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
27309
|
+
return {
|
|
27310
|
+
kind: "selectedRun",
|
|
27311
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
27312
|
+
offering: selectedRunOffering
|
|
27313
|
+
};
|
|
27314
|
+
}
|
|
27315
|
+
//#endregion
|
|
26328
27316
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
26329
27317
|
function isRecord$7(value) {
|
|
26330
27318
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -26645,8 +27633,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
26645
27633
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
26646
27634
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
26647
27635
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
26648
|
-
wholeSeriesOfferings:
|
|
26649
|
-
wholeSeriesOffering:
|
|
27636
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
27637
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26650
27638
|
maxTickets: z.string().optional(),
|
|
26651
27639
|
showVenue: z.boolean().optional(),
|
|
26652
27640
|
showCapacity: z.boolean().optional(),
|
|
@@ -26668,12 +27656,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
26668
27656
|
portalToken: z.string().nullable().optional(),
|
|
26669
27657
|
previewToken: z.string().nullable().optional(),
|
|
26670
27658
|
...eventRegistrationHydrationSchemaShape,
|
|
27659
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26671
27660
|
className: z.string().nullable().optional(),
|
|
26672
27661
|
buttonText: z.string().nullable().optional(),
|
|
26673
27662
|
maxTickets: z.string().nullable().optional(),
|
|
26674
27663
|
stage: previewStageSchema.optional()
|
|
26675
27664
|
});
|
|
26676
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
27665
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
26677
27666
|
kind: z.literal("event-registration"),
|
|
26678
27667
|
state: z.literal("generic-shell"),
|
|
26679
27668
|
className: z.string().nullable(),
|
|
@@ -26681,7 +27670,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
26681
27670
|
bodyText: z.string(),
|
|
26682
27671
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
26683
27672
|
summaryButtonText: z.string()
|
|
26684
|
-
})
|
|
27673
|
+
}), z.object({
|
|
27674
|
+
kind: z.literal("event-registration"),
|
|
27675
|
+
state: z.literal("registration-closed"),
|
|
27676
|
+
className: z.string().nullable(),
|
|
27677
|
+
titleText: z.string(),
|
|
27678
|
+
bodyText: z.string()
|
|
27679
|
+
})]);
|
|
26685
27680
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
26686
27681
|
const eventRegistrationRenderSchema = z.object({
|
|
26687
27682
|
display: eventRegistrationDisplaySchema,
|
|
@@ -26695,6 +27690,13 @@ z.object({
|
|
|
26695
27690
|
stage: previewStageSchema.optional()
|
|
26696
27691
|
});
|
|
26697
27692
|
function buildEventRegistrationDisplay(source) {
|
|
27693
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
27694
|
+
kind: "event-registration",
|
|
27695
|
+
state: "registration-closed",
|
|
27696
|
+
className: source.className ?? null,
|
|
27697
|
+
titleText: "Registration closed",
|
|
27698
|
+
bodyText: "This run is no longer open for bookings."
|
|
27699
|
+
};
|
|
26698
27700
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
26699
27701
|
return {
|
|
26700
27702
|
kind: "event-registration",
|
|
@@ -26706,6 +27708,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
26706
27708
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
26707
27709
|
};
|
|
26708
27710
|
}
|
|
27711
|
+
function resolveWholeSeriesOffering(source) {
|
|
27712
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27713
|
+
}
|
|
26709
27714
|
function buildEventRegistrationShellStepLabels(source) {
|
|
26710
27715
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
26711
27716
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -26721,10 +27726,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
26721
27726
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
26722
27727
|
}
|
|
26723
27728
|
function scopeEventRegistrationEvents(source) {
|
|
26724
|
-
|
|
27729
|
+
const scope = planEventRegistrationScope({
|
|
27730
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
27731
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
26725
27732
|
occurrenceContext: source.occurrenceContext,
|
|
26726
27733
|
subject: source.subject
|
|
26727
27734
|
});
|
|
27735
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
26728
27736
|
}
|
|
26729
27737
|
function shellLabelForRegistrationStep(step, events) {
|
|
26730
27738
|
switch (step) {
|
|
@@ -26763,7 +27771,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
26763
27771
|
subject: source.subject ?? null,
|
|
26764
27772
|
events: source.events ?? null,
|
|
26765
27773
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
26766
|
-
wholeSeriesOffering: source
|
|
27774
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
26767
27775
|
maxTickets: source.maxTickets ?? void 0,
|
|
26768
27776
|
showVenue: source.showVenue,
|
|
26769
27777
|
showCapacity: source.showCapacity,
|
|
@@ -26984,7 +27992,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26984
27992
|
fallback: false
|
|
26985
27993
|
} },
|
|
26986
27994
|
events: { $bind: { from: "data.events" } },
|
|
26987
|
-
wholeSeriesOffering: { $bind: { from: "data.
|
|
27995
|
+
wholeSeriesOffering: { $bind: { from: "data.selectedRunOffering.offering" } },
|
|
27996
|
+
subjectWholeSeriesOffering: { $bind: { from: "data.subjectWholeSeriesOffering.offering" } },
|
|
27997
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
26988
27998
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
26989
27999
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
26990
28000
|
stage: { $bind: {
|
|
@@ -26998,7 +28008,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26998
28008
|
runtime: eventRegistrationBlockRuntime,
|
|
26999
28009
|
dataSchemas: {
|
|
27000
28010
|
events: publicEventsArraySchema.optional(),
|
|
27001
|
-
|
|
28011
|
+
selectedRunOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
28012
|
+
subjectWholeSeriesOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
28013
|
+
wholeSeriesOfferings: z.array(publicWholeSeriesOfferingSchema).optional(),
|
|
27002
28014
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
27003
28015
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
27004
28016
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
@@ -27015,11 +28027,29 @@ const eventRegistrationBlockDefinition = {
|
|
|
27015
28027
|
} },
|
|
27016
28028
|
readProfile: "registration",
|
|
27017
28029
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28030
|
+
seriesIds: { $bind: {
|
|
28031
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28032
|
+
transforms: [{ id: "value.csv" }]
|
|
28033
|
+
} },
|
|
28034
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27018
28035
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27019
28036
|
},
|
|
27020
28037
|
mode: "server"
|
|
27021
28038
|
},
|
|
27022
|
-
|
|
28039
|
+
selectedRunOffering: {
|
|
28040
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
28041
|
+
params: {
|
|
28042
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
28043
|
+
eventSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
28044
|
+
stage: { $bind: {
|
|
28045
|
+
from: "$root.previewStage",
|
|
28046
|
+
fallback: "published"
|
|
28047
|
+
} }
|
|
28048
|
+
},
|
|
28049
|
+
requiredParams: ["eventSeriesId"],
|
|
28050
|
+
mode: "server"
|
|
28051
|
+
},
|
|
28052
|
+
subjectWholeSeriesOffering: {
|
|
27023
28053
|
endpoint: "getPublicWholeSeriesOffering",
|
|
27024
28054
|
when: { $bind: {
|
|
27025
28055
|
from: "$root.subject.isWholeSeriesBooking",
|
|
@@ -27036,6 +28066,22 @@ const eventRegistrationBlockDefinition = {
|
|
|
27036
28066
|
requiredParams: ["eventSeriesId"],
|
|
27037
28067
|
mode: "server"
|
|
27038
28068
|
},
|
|
28069
|
+
wholeSeriesOfferings: {
|
|
28070
|
+
endpoint: "listPublicWholeSeriesOfferings",
|
|
28071
|
+
params: {
|
|
28072
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
28073
|
+
eventSeriesIds: { $bind: {
|
|
28074
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28075
|
+
transforms: [{ id: "value.csv" }]
|
|
28076
|
+
} },
|
|
28077
|
+
stage: { $bind: {
|
|
28078
|
+
from: "$root.previewStage",
|
|
28079
|
+
fallback: "published"
|
|
28080
|
+
} }
|
|
28081
|
+
},
|
|
28082
|
+
requiredParams: ["eventSeriesIds"],
|
|
28083
|
+
mode: "server"
|
|
28084
|
+
},
|
|
27039
28085
|
sitePasses: {
|
|
27040
28086
|
endpoint: "listPublicPasses",
|
|
27041
28087
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -27050,13 +28096,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
27050
28096
|
};
|
|
27051
28097
|
//#endregion
|
|
27052
28098
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27053
|
-
const
|
|
27054
|
-
siteId: z.string().optional(),
|
|
27055
|
-
apiBaseUrl: z.string().optional(),
|
|
27056
|
-
portalToken: z.string().nullable().optional(),
|
|
28099
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
27057
28100
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27058
|
-
courses: z.array(
|
|
27059
|
-
className: z.string().nullable().optional(),
|
|
28101
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
27060
28102
|
showSessions: z.boolean().optional(),
|
|
27061
28103
|
showPrice: z.boolean().optional(),
|
|
27062
28104
|
showCapacity: z.boolean().optional(),
|
|
@@ -27064,8 +28106,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
27064
28106
|
successMessage: z.string().optional(),
|
|
27065
28107
|
waitlistMessage: z.string().optional(),
|
|
27066
28108
|
membershipMessage: z.string().optional(),
|
|
28109
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28110
|
+
};
|
|
28111
|
+
const courseRegistrationSourceSchema = z.object({
|
|
28112
|
+
siteId: z.string().optional(),
|
|
28113
|
+
apiBaseUrl: z.string().optional(),
|
|
28114
|
+
portalToken: z.string().nullable().optional(),
|
|
28115
|
+
...courseRegistrationHydrationSchemaShape,
|
|
28116
|
+
className: z.string().nullable().optional(),
|
|
27067
28117
|
buttonText: z.string().nullable().optional(),
|
|
27068
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27069
28118
|
stage: previewStageSchema.optional()
|
|
27070
28119
|
});
|
|
27071
28120
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -27074,18 +28123,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
27074
28123
|
className: z.string().nullable(),
|
|
27075
28124
|
summaryButtonText: z.string()
|
|
27076
28125
|
});
|
|
27077
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
27078
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27079
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
27080
|
-
showSessions: z.boolean().optional(),
|
|
27081
|
-
showPrice: z.boolean().optional(),
|
|
27082
|
-
showCapacity: z.boolean().optional(),
|
|
27083
|
-
showVenue: z.boolean().optional(),
|
|
27084
|
-
successMessage: z.string().optional(),
|
|
27085
|
-
waitlistMessage: z.string().optional(),
|
|
27086
|
-
membershipMessage: z.string().optional(),
|
|
27087
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
27088
|
-
});
|
|
28126
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
27089
28127
|
const courseRegistrationRenderSchema = z.object({
|
|
27090
28128
|
display: courseRegistrationDisplaySchema,
|
|
27091
28129
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -27290,7 +28328,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
27290
28328
|
})]
|
|
27291
28329
|
}),
|
|
27292
28330
|
runtime: courseRegistrationBlockRuntime,
|
|
27293
|
-
dataSchemas: { courses:
|
|
28331
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27294
28332
|
dataLoaders: { courses: {
|
|
27295
28333
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27296
28334
|
params: {
|
|
@@ -27361,6 +28399,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27361
28399
|
defaultValue: true,
|
|
27362
28400
|
ui: { intent: "display" }
|
|
27363
28401
|
},
|
|
28402
|
+
{
|
|
28403
|
+
id: "showTitle",
|
|
28404
|
+
type: "boolean",
|
|
28405
|
+
label: "Show event title",
|
|
28406
|
+
required: false,
|
|
28407
|
+
defaultValue: false,
|
|
28408
|
+
ui: { intent: "display" }
|
|
28409
|
+
},
|
|
28410
|
+
{
|
|
28411
|
+
id: "showDescription",
|
|
28412
|
+
type: "boolean",
|
|
28413
|
+
label: "Show event description",
|
|
28414
|
+
required: false,
|
|
28415
|
+
defaultValue: false,
|
|
28416
|
+
ui: { intent: "display" }
|
|
28417
|
+
},
|
|
27364
28418
|
{
|
|
27365
28419
|
id: "showMap",
|
|
27366
28420
|
type: "boolean",
|
|
@@ -27397,10 +28451,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27397
28451
|
{
|
|
27398
28452
|
value: "10",
|
|
27399
28453
|
label: "10 dates"
|
|
28454
|
+
},
|
|
28455
|
+
{
|
|
28456
|
+
value: "all",
|
|
28457
|
+
label: "All dates"
|
|
27400
28458
|
}
|
|
27401
28459
|
],
|
|
27402
28460
|
ui: { intent: "display" }
|
|
27403
28461
|
},
|
|
28462
|
+
{
|
|
28463
|
+
id: "showCapacity",
|
|
28464
|
+
type: "boolean",
|
|
28465
|
+
label: "Show capacity",
|
|
28466
|
+
required: false,
|
|
28467
|
+
defaultValue: false,
|
|
28468
|
+
ui: { intent: "display" }
|
|
28469
|
+
},
|
|
27404
28470
|
{
|
|
27405
28471
|
id: "showCost",
|
|
27406
28472
|
type: "boolean",
|
|
@@ -27443,6 +28509,8 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27443
28509
|
} },
|
|
27444
28510
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
27445
28511
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28512
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
28513
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
27446
28514
|
showMap: { $bind: { from: "content.showMap" } },
|
|
27447
28515
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
27448
28516
|
otherDatesLimit: { $bind: {
|
|
@@ -27453,6 +28521,10 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27453
28521
|
from: "content.showCost",
|
|
27454
28522
|
fallback: true
|
|
27455
28523
|
} },
|
|
28524
|
+
showCapacity: { $bind: {
|
|
28525
|
+
from: "content.showCapacity",
|
|
28526
|
+
fallback: false
|
|
28527
|
+
} },
|
|
27456
28528
|
showAcceptedPasses: { $bind: {
|
|
27457
28529
|
from: "content.showAcceptedPasses",
|
|
27458
28530
|
fallback: true
|
|
@@ -27507,6 +28579,11 @@ const eventDetailsBlockDefinition = {
|
|
|
27507
28579
|
limit: "100",
|
|
27508
28580
|
readProfile: "details",
|
|
27509
28581
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28582
|
+
seriesIds: { $bind: {
|
|
28583
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28584
|
+
transforms: [{ id: "value.csv" }]
|
|
28585
|
+
} },
|
|
28586
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27510
28587
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27511
28588
|
},
|
|
27512
28589
|
mode: "server"
|
|
@@ -27692,7 +28769,7 @@ const courseDetailsBlockDefinition = {
|
|
|
27692
28769
|
})], { gap: "lg" })
|
|
27693
28770
|
})]
|
|
27694
28771
|
}),
|
|
27695
|
-
dataSchemas: { courses:
|
|
28772
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27696
28773
|
dataLoaders: { courses: {
|
|
27697
28774
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27698
28775
|
params: {
|
|
@@ -27811,8 +28888,8 @@ const eventSpotlightBlockDefinition = {
|
|
|
27811
28888
|
from: "content.columns",
|
|
27812
28889
|
fallback: "3"
|
|
27813
28890
|
} },
|
|
27814
|
-
|
|
27815
|
-
from: "content.
|
|
28891
|
+
cardRole: { $bind: {
|
|
28892
|
+
from: "content._cardStyles.role",
|
|
27816
28893
|
fallback: "default"
|
|
27817
28894
|
} },
|
|
27818
28895
|
buttonVariant: { $bind: {
|
|
@@ -27974,6 +29051,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
27974
29051
|
showVenue: z.boolean().nullable().optional(),
|
|
27975
29052
|
showMap: z.boolean().nullable().optional(),
|
|
27976
29053
|
showCapacity: z.boolean().nullable().optional(),
|
|
29054
|
+
cardRole: cardRoleSchema.optional(),
|
|
27977
29055
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
27978
29056
|
buttonText: z.string().optional(),
|
|
27979
29057
|
emptyMessage: z.string().optional(),
|
|
@@ -28001,6 +29079,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
28001
29079
|
showVenue: z.boolean(),
|
|
28002
29080
|
showMap: z.boolean(),
|
|
28003
29081
|
showCapacity: z.boolean(),
|
|
29082
|
+
cardRole: cardRoleSchema,
|
|
28004
29083
|
buttonVariant: eventButtonVariantSchema,
|
|
28005
29084
|
buttonText: z.string(),
|
|
28006
29085
|
emptyMessage: z.string()
|
|
@@ -28050,6 +29129,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
28050
29129
|
showVenue: source.showVenue ?? true,
|
|
28051
29130
|
showMap: source.showMap ?? true,
|
|
28052
29131
|
showCapacity: source.showCapacity ?? true,
|
|
29132
|
+
cardRole: source.cardRole ?? "default",
|
|
28053
29133
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28054
29134
|
buttonText: source.buttonText ?? "Book",
|
|
28055
29135
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -28067,8 +29147,6 @@ function buildEventCollectionHydration(source) {
|
|
|
28067
29147
|
}
|
|
28068
29148
|
//#endregion
|
|
28069
29149
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
28070
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
28071
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
28072
29150
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
28073
29151
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
28074
29152
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -28083,7 +29161,7 @@ const eventListingSourceSchema = z.object({
|
|
|
28083
29161
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
28084
29162
|
seeAllUrl: z.string().optional(),
|
|
28085
29163
|
loadMoreText: z.string().optional(),
|
|
28086
|
-
|
|
29164
|
+
cardRole: cardRoleSchema.optional(),
|
|
28087
29165
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
28088
29166
|
buttonText: z.string().optional(),
|
|
28089
29167
|
showVenue: z.boolean().optional(),
|
|
@@ -28105,7 +29183,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
28105
29183
|
emptyMessage: z.string(),
|
|
28106
29184
|
loadingMessage: z.string(),
|
|
28107
29185
|
containerClass: z.string(),
|
|
28108
|
-
|
|
29186
|
+
cardRole: cardRoleSchema,
|
|
28109
29187
|
buttonVariant: eventButtonVariantSchema,
|
|
28110
29188
|
buttonText: z.string(),
|
|
28111
29189
|
showVenue: z.boolean(),
|
|
@@ -28161,7 +29239,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
28161
29239
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
28162
29240
|
loadingMessage: "Loading events…",
|
|
28163
29241
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
28164
|
-
|
|
29242
|
+
cardRole: source.cardRole ?? "default",
|
|
28165
29243
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28166
29244
|
buttonText: source.buttonText ?? "Book",
|
|
28167
29245
|
showVenue: source.showVenue ?? true,
|
|
@@ -28483,8 +29561,8 @@ const eventListingBlockDefinition = {
|
|
|
28483
29561
|
from: "content.loadMoreText",
|
|
28484
29562
|
fallback: "Load more events"
|
|
28485
29563
|
} },
|
|
28486
|
-
|
|
28487
|
-
from: "content.
|
|
29564
|
+
cardRole: { $bind: {
|
|
29565
|
+
from: "content._cardStyles.role",
|
|
28488
29566
|
fallback: "default"
|
|
28489
29567
|
} },
|
|
28490
29568
|
buttonVariant: { $bind: {
|
|
@@ -28754,6 +29832,10 @@ const eventCalendarLayout = [styledSection({
|
|
|
28754
29832
|
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
28755
29833
|
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
28756
29834
|
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
29835
|
+
cardRole: { $bind: {
|
|
29836
|
+
from: "content._cardStyles.role",
|
|
29837
|
+
fallback: "default"
|
|
29838
|
+
} },
|
|
28757
29839
|
buttonVariant: { $bind: {
|
|
28758
29840
|
from: "content.buttonVariant",
|
|
28759
29841
|
fallback: "primary"
|
|
@@ -29386,11 +30468,11 @@ const eventCalendarAdditionalFields = [
|
|
|
29386
30468
|
searchThreshold: 8
|
|
29387
30469
|
}
|
|
29388
30470
|
}),
|
|
29389
|
-
...cardStylingFields.
|
|
30471
|
+
...cardStylingFields.map((field) => ({
|
|
29390
30472
|
...field,
|
|
29391
30473
|
ui: {
|
|
29392
30474
|
...field.ui ?? {},
|
|
29393
|
-
intent: field.id === "buttonVariant" ? "style" : "content"
|
|
30475
|
+
intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
|
|
29394
30476
|
}
|
|
29395
30477
|
})),
|
|
29396
30478
|
{
|
|
@@ -30087,7 +31169,7 @@ const publicRouteCandidatesSchema = z.object({ routes: z.array(z.object({
|
|
|
30087
31169
|
entityId: z.string(),
|
|
30088
31170
|
path: z.string(),
|
|
30089
31171
|
title: z.string(),
|
|
30090
|
-
kind: z.enum(
|
|
31172
|
+
kind: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
30091
31173
|
contentTypeKey: z.string().nullable().optional()
|
|
30092
31174
|
})) });
|
|
30093
31175
|
const groupOverrideFields = [
|
|
@@ -30381,7 +31463,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
30381
31463
|
dataSchemas: {
|
|
30382
31464
|
...offeringsPreviewEventDataSchemas,
|
|
30383
31465
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
30384
|
-
courses:
|
|
31466
|
+
courses: publicWholeSeriesOfferingsArraySchema.optional()
|
|
30385
31467
|
},
|
|
30386
31468
|
dataLoaders: {
|
|
30387
31469
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31853,7 +32935,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
31853
32935
|
}
|
|
31854
32936
|
],
|
|
31855
32937
|
layout: styledSection({
|
|
31856
|
-
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: "
|
|
32938
|
+
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: boxStyleClassNames({ role: "default" }, {}) }, [media({
|
|
31857
32939
|
className: "card-media rb-aspect-video rb-w-full rb-object-cover",
|
|
31858
32940
|
size: {
|
|
31859
32941
|
width: 960,
|
|
@@ -34905,16 +35987,27 @@ function eventListCapable() {
|
|
|
34905
35987
|
looks: "supported",
|
|
34906
35988
|
sectionSurfaces: "supported",
|
|
34907
35989
|
contentFrames: ["plain", "panel"],
|
|
34908
|
-
cardRoles: "
|
|
35990
|
+
cardRoles: "supported",
|
|
34909
35991
|
eventListTreatments
|
|
34910
35992
|
});
|
|
34911
35993
|
}
|
|
35994
|
+
function eventSpotlightCapable() {
|
|
35995
|
+
return declareBlockDesignCapability({
|
|
35996
|
+
sectionSurfaces: "supported",
|
|
35997
|
+
contentFrames: ["plain"],
|
|
35998
|
+
cardRoles: "supported"
|
|
35999
|
+
});
|
|
36000
|
+
}
|
|
34912
36001
|
function offeringsPreviewCapable() {
|
|
34913
36002
|
return declareBlockDesignCapability({
|
|
34914
36003
|
looks: "supported",
|
|
34915
36004
|
sectionSurfaces: "supported",
|
|
34916
36005
|
contentFrames: ["plain"],
|
|
34917
|
-
cardRoles: "supported"
|
|
36006
|
+
cardRoles: "supported",
|
|
36007
|
+
compositions: {
|
|
36008
|
+
kind: "offerings-preview",
|
|
36009
|
+
treatments: offeringsPreviewCompositionTreatmentValues
|
|
36010
|
+
}
|
|
34918
36011
|
});
|
|
34919
36012
|
}
|
|
34920
36013
|
function defaultBoundaryBias(visualWeight) {
|
|
@@ -35207,7 +36300,7 @@ const systemBlockDefinitions = [
|
|
|
35207
36300
|
cardRoles: "supported",
|
|
35208
36301
|
compositions: {
|
|
35209
36302
|
kind: "testimonials",
|
|
35210
|
-
treatments:
|
|
36303
|
+
treatments: testimonialsCompositionTreatmentValues
|
|
35211
36304
|
},
|
|
35212
36305
|
headingDecorationCapability: {
|
|
35213
36306
|
kind: "supported",
|
|
@@ -35362,7 +36455,7 @@ const systemBlockDefinitions = [
|
|
|
35362
36455
|
weight: "standard"
|
|
35363
36456
|
})]
|
|
35364
36457
|
})),
|
|
35365
|
-
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition,
|
|
36458
|
+
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
35366
36459
|
flow: offeringsFlow,
|
|
35367
36460
|
layoutProfiles: [layoutProfile({
|
|
35368
36461
|
variantKey: "default",
|
|
@@ -37058,184 +38151,29 @@ const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ..
|
|
|
37058
38151
|
[...EVENT_ATTENDEE_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
37059
38152
|
[...STANDARD_LINE_ITEM_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
37060
38153
|
//#endregion
|
|
37061
|
-
//#region ../api/src/
|
|
37062
|
-
|
|
37063
|
-
|
|
37064
|
-
|
|
37065
|
-
|
|
37066
|
-
|
|
37067
|
-
|
|
37068
|
-
|
|
37069
|
-
|
|
37070
|
-
|
|
37071
|
-
|
|
37072
|
-
|
|
37073
|
-
|
|
37074
|
-
|
|
37075
|
-
|
|
37076
|
-
|
|
37077
|
-
|
|
37078
|
-
|
|
37079
|
-
|
|
37080
|
-
|
|
37081
|
-
|
|
37082
|
-
|
|
37083
|
-
//#region ../api/src/bookingVerticalCatalog.ts
|
|
37084
|
-
const VERTICAL_BOOKING_PRESETS = [
|
|
37085
|
-
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
37086
|
-
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
37087
|
-
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
37088
|
-
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
37089
|
-
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
37090
|
-
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
37091
|
-
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
37092
|
-
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
37093
|
-
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
37094
|
-
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
37095
|
-
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
37096
|
-
verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
37097
|
-
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
37098
|
-
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37099
|
-
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
37100
|
-
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
37101
|
-
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
37102
|
-
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
37103
|
-
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
37104
|
-
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
37105
|
-
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
37106
|
-
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
37107
|
-
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
37108
|
-
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
37109
|
-
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
37110
|
-
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
37111
|
-
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
37112
|
-
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
37113
|
-
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
37114
|
-
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
37115
|
-
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
37116
|
-
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
37117
|
-
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
37118
|
-
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
37119
|
-
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
37120
|
-
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
37121
|
-
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
37122
|
-
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
37123
|
-
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
37124
|
-
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
37125
|
-
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
37126
|
-
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
37127
|
-
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
37128
|
-
verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
37129
|
-
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37130
|
-
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
37131
|
-
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
37132
|
-
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
37133
|
-
verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
37134
|
-
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
37135
|
-
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
37136
|
-
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
37137
|
-
verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
37138
|
-
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37139
|
-
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
37140
|
-
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
37141
|
-
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
37142
|
-
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
37143
|
-
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
37144
|
-
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
37145
|
-
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
37146
|
-
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
37147
|
-
];
|
|
37148
|
-
const VERTICAL_ID_SET = /* @__PURE__ */ new Set([
|
|
37149
|
-
"yoga_wellness",
|
|
37150
|
-
"fitness_pt",
|
|
37151
|
-
"dance_school",
|
|
37152
|
-
"physiotherapy_physical_health",
|
|
37153
|
-
"massage_bodywork",
|
|
37154
|
-
"therapist_practitioner",
|
|
37155
|
-
"beauty_spa",
|
|
37156
|
-
"consultant_coach",
|
|
37157
|
-
"training_provider",
|
|
37158
|
-
"retreat_centre",
|
|
37159
|
-
"music_school",
|
|
37160
|
-
"voice_singing",
|
|
37161
|
-
"performing_arts_school",
|
|
37162
|
-
"community_wellbeing",
|
|
37163
|
-
"venue_event_space"
|
|
37164
|
-
]);
|
|
37165
|
-
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
37166
|
-
function parseVerticalId(value) {
|
|
37167
|
-
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
37168
|
-
}
|
|
37169
|
-
function parseVerticalPresetId(value) {
|
|
37170
|
-
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
37171
|
-
}
|
|
37172
|
-
function getVerticalPresetDefinition(presetId) {
|
|
37173
|
-
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
37174
|
-
if (!definition) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
37175
|
-
return definition;
|
|
37176
|
-
}
|
|
37177
|
-
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
37178
|
-
const firstPresetId = presetIds[0];
|
|
37179
|
-
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
37180
|
-
}
|
|
37181
|
-
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
37182
|
-
return {
|
|
37183
|
-
verticalId,
|
|
37184
|
-
selectedPresetIds
|
|
37185
|
-
};
|
|
37186
|
-
}
|
|
37187
|
-
function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
37188
|
-
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
37189
|
-
return nonEmptyPresetIds ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
37190
|
-
}
|
|
37191
|
-
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
37192
|
-
if (!rawConfig) return {
|
|
37193
|
-
kind: "unconfigured",
|
|
37194
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
37195
|
-
};
|
|
37196
|
-
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
37197
|
-
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
37198
|
-
const config = {
|
|
37199
|
-
verticalId,
|
|
37200
|
-
selectedPresetIds
|
|
37201
|
-
};
|
|
37202
|
-
if (!verticalId && selectedPresetIds.length === 0) return {
|
|
37203
|
-
kind: "unconfigured",
|
|
37204
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
37205
|
-
};
|
|
37206
|
-
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
37207
|
-
if (issues.length > 0) return {
|
|
37208
|
-
kind: "invalid",
|
|
37209
|
-
config,
|
|
37210
|
-
issues
|
|
37211
|
-
};
|
|
37212
|
-
const configuredConfig = verticalId ? createSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
|
|
37213
|
-
if (!configuredConfig) return {
|
|
37214
|
-
kind: "invalid",
|
|
37215
|
-
config,
|
|
37216
|
-
issues: ["empty_selected_presets"]
|
|
37217
|
-
};
|
|
37218
|
-
return {
|
|
37219
|
-
kind: "configured",
|
|
37220
|
-
config: configuredConfig,
|
|
37221
|
-
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
37222
|
-
};
|
|
37223
|
-
}
|
|
37224
|
-
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
37225
|
-
const issues = /* @__PURE__ */ new Set();
|
|
37226
|
-
if (rawConfig.verticalId != null && !config.verticalId) issues.add("unknown_vertical");
|
|
37227
|
-
if (!config.verticalId && config.selectedPresetIds.length > 0) issues.add("missing_vertical");
|
|
37228
|
-
if ((Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).some((presetId) => parseVerticalPresetId(presetId) === null)) issues.add("unknown_preset");
|
|
37229
|
-
if (config.verticalId && config.selectedPresetIds.length === 0) issues.add("empty_selected_presets");
|
|
37230
|
-
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
37231
|
-
for (const presetId of config.selectedPresetIds) {
|
|
37232
|
-
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
37233
|
-
if (config.verticalId && presetDefinition.verticalId !== config.verticalId) issues.add("preset_vertical_mismatch");
|
|
37234
|
-
if (presetDefinition.availability === "future") issues.add("future_preset_selected");
|
|
37235
|
-
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues.add("duplicate_canonical_behaviour");
|
|
37236
|
-
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
38154
|
+
//#region ../api/src/bookingVerticals.ts
|
|
38155
|
+
/**
|
|
38156
|
+
* Transport adapters for the booking-vertical domain.
|
|
38157
|
+
*
|
|
38158
|
+
* The domain catalog and all pure resolution/selection rules live in core;
|
|
38159
|
+
* this module owns only the Zod boundary used by API payloads.
|
|
38160
|
+
*/
|
|
38161
|
+
function formatRawDiagnosticValue(value) {
|
|
38162
|
+
const serialized = JSON.stringify(value);
|
|
38163
|
+
return serialized === void 0 ? String(value) : serialized;
|
|
38164
|
+
}
|
|
38165
|
+
function describeSiteVerticalConfigIssue(issue) {
|
|
38166
|
+
switch (issue.code) {
|
|
38167
|
+
case "unknown_vertical": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
38168
|
+
case "unknown_preset": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
38169
|
+
case "missing_vertical":
|
|
38170
|
+
case "empty_selected_presets":
|
|
38171
|
+
case "preset_vertical_mismatch":
|
|
38172
|
+
case "duplicate_preset_id":
|
|
38173
|
+
case "duplicate_canonical_behaviour":
|
|
38174
|
+
case "future_preset_selected": return issue.code;
|
|
38175
|
+
default: return assertNever$3(issue);
|
|
37237
38176
|
}
|
|
37238
|
-
return [...issues];
|
|
37239
38177
|
}
|
|
37240
38178
|
const VerticalIdSchema = z.string().trim().transform((value, ctx) => {
|
|
37241
38179
|
const parsed = parseVerticalId(value);
|
|
@@ -37267,16 +38205,12 @@ z.object({
|
|
|
37267
38205
|
if (resolved.kind === "invalid") {
|
|
37268
38206
|
ctx.addIssue({
|
|
37269
38207
|
code: z.ZodIssueCode.custom,
|
|
37270
|
-
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
38208
|
+
message: `Invalid booking vertical config: ${resolved.issues.map(describeSiteVerticalConfigIssue).join(", ")}`
|
|
37271
38209
|
});
|
|
37272
38210
|
return z.NEVER;
|
|
37273
38211
|
}
|
|
37274
38212
|
return resolved.config;
|
|
37275
38213
|
});
|
|
37276
|
-
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
37277
|
-
verticalId: null,
|
|
37278
|
-
selectedPresetIds: []
|
|
37279
|
-
};
|
|
37280
38214
|
//#endregion
|
|
37281
38215
|
//#region ../api/src/utils/isRecord.ts
|
|
37282
38216
|
function isRecord$1(value) {
|