@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/client/hooks.mjs
CHANGED
|
@@ -1334,6 +1334,17 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1334
1334
|
}
|
|
1335
1335
|
});
|
|
1336
1336
|
//#endregion
|
|
1337
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1338
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1339
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1340
|
+
method: "GET",
|
|
1341
|
+
revalidate: 60,
|
|
1342
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1343
|
+
auth: "public",
|
|
1344
|
+
responseKind: "json",
|
|
1345
|
+
errors: []
|
|
1346
|
+
} });
|
|
1347
|
+
//#endregion
|
|
1337
1348
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1338
1349
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1339
1350
|
listSiteApiKeys: {
|
|
@@ -1460,13 +1471,249 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1460
1471
|
"resource:conflict",
|
|
1461
1472
|
"server:internal_error"
|
|
1462
1473
|
]
|
|
1474
|
+
},
|
|
1475
|
+
updateEventIdentity: {
|
|
1476
|
+
path: "/sites/{siteId}/bookings/events/{eventId}",
|
|
1477
|
+
method: "PATCH",
|
|
1478
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1479
|
+
auth: "user",
|
|
1480
|
+
responseKind: "json",
|
|
1481
|
+
errors: [
|
|
1482
|
+
"validation:invalid_input",
|
|
1483
|
+
"resource:not_found",
|
|
1484
|
+
"server:internal_error"
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
createWholeSeriesRun: {
|
|
1488
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
1489
|
+
method: "POST",
|
|
1490
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1491
|
+
auth: "user",
|
|
1492
|
+
responseKind: "json",
|
|
1493
|
+
errors: [
|
|
1494
|
+
"validation:invalid_input",
|
|
1495
|
+
"resource:not_found",
|
|
1496
|
+
"resource:already_exists",
|
|
1497
|
+
"server:internal_error"
|
|
1498
|
+
]
|
|
1499
|
+
},
|
|
1500
|
+
updateWholeSeriesRun: {
|
|
1501
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}",
|
|
1502
|
+
method: "PATCH",
|
|
1503
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1504
|
+
auth: "user",
|
|
1505
|
+
responseKind: "json",
|
|
1506
|
+
errors: [
|
|
1507
|
+
"validation:invalid_input",
|
|
1508
|
+
"resource:not_found",
|
|
1509
|
+
"resource:conflict",
|
|
1510
|
+
"server:internal_error"
|
|
1511
|
+
]
|
|
1512
|
+
},
|
|
1513
|
+
cancelWholeSeriesRun: {
|
|
1514
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
1515
|
+
method: "POST",
|
|
1516
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1517
|
+
auth: "user",
|
|
1518
|
+
responseKind: "json",
|
|
1519
|
+
errors: [
|
|
1520
|
+
"validation:invalid_input",
|
|
1521
|
+
"resource:not_found",
|
|
1522
|
+
"resource:conflict",
|
|
1523
|
+
"server:internal_error"
|
|
1524
|
+
]
|
|
1463
1525
|
}
|
|
1464
1526
|
});
|
|
1465
|
-
|
|
1527
|
+
//#endregion
|
|
1528
|
+
//#region ../api/src/giftingEndpointDefinitions.ts
|
|
1529
|
+
/**
|
|
1530
|
+
* Gifting endpoints (gift cards & vouchers) — the dashboard surface that manages
|
|
1531
|
+
* offers, gifts and settings, plus the public buy/claim surface.
|
|
1532
|
+
*/
|
|
1533
|
+
const GIFTING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1534
|
+
createGiftingOffer: {
|
|
1535
|
+
path: "/sites/{siteId}/gifting/offers",
|
|
1536
|
+
method: "POST",
|
|
1537
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1538
|
+
auth: "user",
|
|
1539
|
+
responseKind: "json",
|
|
1540
|
+
errors: [
|
|
1541
|
+
"validation:invalid_input",
|
|
1542
|
+
"auth:forbidden",
|
|
1543
|
+
"server:internal_error"
|
|
1544
|
+
]
|
|
1545
|
+
},
|
|
1546
|
+
updateGiftingOffer: {
|
|
1547
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1548
|
+
method: "PATCH",
|
|
1549
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1550
|
+
auth: "user",
|
|
1551
|
+
responseKind: "json",
|
|
1552
|
+
errors: [
|
|
1553
|
+
"validation:invalid_input",
|
|
1554
|
+
"auth:forbidden",
|
|
1555
|
+
"resource:not_found",
|
|
1556
|
+
"resource:conflict",
|
|
1557
|
+
"server:internal_error"
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1560
|
+
deleteGiftingOffer: {
|
|
1561
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1562
|
+
method: "DELETE",
|
|
1563
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1564
|
+
auth: "user",
|
|
1565
|
+
responseKind: "json",
|
|
1566
|
+
errors: [
|
|
1567
|
+
"auth:forbidden",
|
|
1568
|
+
"resource:not_found",
|
|
1569
|
+
"resource:conflict",
|
|
1570
|
+
"server:internal_error"
|
|
1571
|
+
]
|
|
1572
|
+
},
|
|
1573
|
+
duplicateGiftingOffer: {
|
|
1574
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}/duplicate",
|
|
1575
|
+
method: "POST",
|
|
1576
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1577
|
+
auth: "user",
|
|
1578
|
+
responseKind: "json",
|
|
1579
|
+
errors: [
|
|
1580
|
+
"auth:forbidden",
|
|
1581
|
+
"resource:not_found",
|
|
1582
|
+
"server:internal_error"
|
|
1583
|
+
]
|
|
1584
|
+
},
|
|
1585
|
+
reorderGiftingOffers: {
|
|
1586
|
+
path: "/sites/{siteId}/gifting/offers/order",
|
|
1587
|
+
method: "PUT",
|
|
1588
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1589
|
+
auth: "user",
|
|
1590
|
+
responseKind: "json",
|
|
1591
|
+
errors: [
|
|
1592
|
+
"validation:invalid_input",
|
|
1593
|
+
"auth:forbidden",
|
|
1594
|
+
"resource:not_found",
|
|
1595
|
+
"server:internal_error"
|
|
1596
|
+
]
|
|
1597
|
+
},
|
|
1598
|
+
sendGift: {
|
|
1599
|
+
path: "/sites/{siteId}/gifting/gifts",
|
|
1600
|
+
method: "POST",
|
|
1601
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1602
|
+
auth: "user",
|
|
1603
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1604
|
+
responseKind: "json",
|
|
1605
|
+
errors: [
|
|
1606
|
+
"validation:invalid_input",
|
|
1607
|
+
"auth:forbidden",
|
|
1608
|
+
"resource:not_found",
|
|
1609
|
+
"server:internal_error"
|
|
1610
|
+
]
|
|
1611
|
+
},
|
|
1612
|
+
resendGift: {
|
|
1613
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/resend",
|
|
1614
|
+
method: "POST",
|
|
1615
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1616
|
+
auth: "user",
|
|
1617
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1618
|
+
responseKind: "json",
|
|
1619
|
+
errors: [
|
|
1620
|
+
"auth:forbidden",
|
|
1621
|
+
"resource:not_found",
|
|
1622
|
+
"resource:conflict",
|
|
1623
|
+
"server:internal_error"
|
|
1624
|
+
]
|
|
1625
|
+
},
|
|
1626
|
+
correctGiftEmailAndResend: {
|
|
1627
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/correct-email-and-resend",
|
|
1628
|
+
method: "POST",
|
|
1629
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1630
|
+
auth: "user",
|
|
1631
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1632
|
+
responseKind: "json",
|
|
1633
|
+
errors: [
|
|
1634
|
+
"validation:invalid_input",
|
|
1635
|
+
"auth:forbidden",
|
|
1636
|
+
"resource:not_found",
|
|
1637
|
+
"resource:conflict",
|
|
1638
|
+
"server:internal_error"
|
|
1639
|
+
]
|
|
1640
|
+
},
|
|
1641
|
+
updateGiftingSettings: {
|
|
1642
|
+
path: "/sites/{siteId}/gifting/settings",
|
|
1643
|
+
method: "PATCH",
|
|
1644
|
+
tags: [
|
|
1645
|
+
"site-{siteId}",
|
|
1646
|
+
"gifting-offers-{siteId}",
|
|
1647
|
+
"gifting-gifts-{siteId}"
|
|
1648
|
+
],
|
|
1649
|
+
auth: "user",
|
|
1650
|
+
responseKind: "json",
|
|
1651
|
+
errors: [
|
|
1652
|
+
"validation:invalid_input",
|
|
1653
|
+
"auth:forbidden",
|
|
1654
|
+
"server:internal_error"
|
|
1655
|
+
]
|
|
1656
|
+
},
|
|
1657
|
+
listPublicGiftingOffers: {
|
|
1658
|
+
path: "/public/sites/{siteId}/gifting/offers",
|
|
1659
|
+
method: "GET",
|
|
1660
|
+
revalidate: 300,
|
|
1661
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1662
|
+
errors: [],
|
|
1663
|
+
auth: "public",
|
|
1664
|
+
responseKind: "json"
|
|
1665
|
+
},
|
|
1666
|
+
createPublicGiftingCheckout: {
|
|
1667
|
+
path: "/public/sites/{siteId}/gifting/checkout",
|
|
1668
|
+
method: "POST",
|
|
1669
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1670
|
+
errors: [],
|
|
1671
|
+
auth: "public",
|
|
1672
|
+
responseKind: "json"
|
|
1673
|
+
},
|
|
1674
|
+
claimGiftCardPublic: {
|
|
1675
|
+
path: "/public/sites/{siteId}/gifting/claim",
|
|
1676
|
+
method: "POST",
|
|
1677
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1678
|
+
errors: [],
|
|
1679
|
+
auth: "public",
|
|
1680
|
+
responseKind: "json"
|
|
1681
|
+
}
|
|
1682
|
+
});
|
|
1683
|
+
//#endregion
|
|
1684
|
+
//#region ../api/src/sdkEndpointDefinitions.ts
|
|
1685
|
+
/** SDK management endpoints that do not belong to a CRUD resource family. */
|
|
1686
|
+
const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1687
|
+
sdkUpdateSettings: {
|
|
1688
|
+
path: "/sdk/{siteId}/settings",
|
|
1689
|
+
method: "PATCH",
|
|
1690
|
+
auth: "service",
|
|
1691
|
+
responseKind: "json",
|
|
1692
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1693
|
+
},
|
|
1694
|
+
sdkConfigureBookingVertical: {
|
|
1695
|
+
path: "/sdk/{siteId}/settings/booking/vertical",
|
|
1696
|
+
method: "POST",
|
|
1697
|
+
auth: "service",
|
|
1698
|
+
responseKind: "json"
|
|
1699
|
+
},
|
|
1700
|
+
sdkSetupRevalidationWebhook: {
|
|
1701
|
+
path: "/sdk/{siteId}/webhooks/revalidation/setup",
|
|
1702
|
+
method: "POST",
|
|
1703
|
+
auth: "service",
|
|
1704
|
+
responseKind: "json",
|
|
1705
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1706
|
+
}
|
|
1707
|
+
});
|
|
1708
|
+
({
|
|
1709
|
+
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
1710
|
+
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
1711
|
+
...GIFTING_ENDPOINT_DEFINITIONS
|
|
1712
|
+
}), 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, {
|
|
1466
1713
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
1467
1714
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
1468
1715
|
...COURSE_ENDPOINT_DEFINITIONS
|
|
1469
|
-
}, 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.
|
|
1716
|
+
}, 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 };
|
|
1470
1717
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
1471
1718
|
z.object({
|
|
1472
1719
|
accessToken: z.string().min(1).max(4096),
|
|
@@ -1936,6 +2183,298 @@ function parseManagementKey(raw) {
|
|
|
1936
2183
|
if (typeof raw !== "string" || !raw.startsWith("bld_mgmt_sk_") || raw.length === 12) return err({ kind: "invalid-management-key" });
|
|
1937
2184
|
return ok(createSecretInternal("management-key", raw));
|
|
1938
2185
|
}
|
|
2186
|
+
//#endregion
|
|
2187
|
+
//#region ../core/src/event-series-behaviour.ts
|
|
2188
|
+
const SURFACE_EVENT_PRESET_VALUES = [
|
|
2189
|
+
"class",
|
|
2190
|
+
"course",
|
|
2191
|
+
"term",
|
|
2192
|
+
"workshop",
|
|
2193
|
+
"retreat",
|
|
2194
|
+
"performance"
|
|
2195
|
+
];
|
|
2196
|
+
//#endregion
|
|
2197
|
+
//#region ../core/src/booking-vertical-preset.ts
|
|
2198
|
+
const BOOKING_ENGINE_BY_BEHAVIOUR = {
|
|
2199
|
+
class: "event_series",
|
|
2200
|
+
workshop: "event_series",
|
|
2201
|
+
course: "event_series",
|
|
2202
|
+
retreat: "event_series",
|
|
2203
|
+
performance: "event_series",
|
|
2204
|
+
appointment: "appointment_service"
|
|
2205
|
+
};
|
|
2206
|
+
function verticalBookingPreset(id, verticalId, canonicalBehaviour, label, pluralLabel, description, availability = "onboarding") {
|
|
2207
|
+
return {
|
|
2208
|
+
id,
|
|
2209
|
+
verticalId,
|
|
2210
|
+
canonicalBehaviour,
|
|
2211
|
+
engine: BOOKING_ENGINE_BY_BEHAVIOUR[canonicalBehaviour],
|
|
2212
|
+
availability,
|
|
2213
|
+
label,
|
|
2214
|
+
pluralLabel,
|
|
2215
|
+
description
|
|
2216
|
+
};
|
|
2217
|
+
}
|
|
2218
|
+
//#endregion
|
|
2219
|
+
//#region ../core/src/booking-vertical-definitions.ts
|
|
2220
|
+
const VERTICAL_DEFINITIONS = [
|
|
2221
|
+
{
|
|
2222
|
+
id: "yoga_wellness",
|
|
2223
|
+
label: "Yoga, meditation or mindfulness",
|
|
2224
|
+
description: "Yoga studios, wellness teachers, and movement practitioners."
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
id: "fitness_pt",
|
|
2228
|
+
label: "Fitness and personal training",
|
|
2229
|
+
description: "Personal trainers, group training, and fitness programmes."
|
|
2230
|
+
},
|
|
2231
|
+
{
|
|
2232
|
+
id: "dance_school",
|
|
2233
|
+
label: "Dance school",
|
|
2234
|
+
description: "Dance classes, courses or terms, workshops, private lessons, and shows."
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
id: "physiotherapy_physical_health",
|
|
2238
|
+
label: "Physiotherapy & physical health",
|
|
2239
|
+
description: "Physiotherapists, chiropractors, osteopaths, sports therapists, and rehabilitation practitioners."
|
|
2240
|
+
},
|
|
2241
|
+
{
|
|
2242
|
+
id: "massage_bodywork",
|
|
2243
|
+
label: "Massage & bodywork",
|
|
2244
|
+
description: "Massage therapists, bodyworkers, and somatic practitioners."
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
id: "therapist_practitioner",
|
|
2248
|
+
label: "Therapist or practitioner",
|
|
2249
|
+
description: "Appointments, sessions, consultations, and occasional group work."
|
|
2250
|
+
},
|
|
2251
|
+
{
|
|
2252
|
+
id: "beauty_spa",
|
|
2253
|
+
label: "Beauty or spa",
|
|
2254
|
+
description: "Treatment-led businesses with optional workshops."
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
id: "consultant_coach",
|
|
2258
|
+
label: "Consultant or coach",
|
|
2259
|
+
description: "One-to-one calls, workshops, courses, and retreats."
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
id: "training_provider",
|
|
2263
|
+
label: "Training provider",
|
|
2264
|
+
description: "Courses, workshops, classes, appointments, and residential training."
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
id: "retreat_centre",
|
|
2268
|
+
label: "Retreat centre",
|
|
2269
|
+
description: "Residential retreats, workshops, classes, courses, and private sessions."
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
id: "music_school",
|
|
2273
|
+
label: "Music teacher or school",
|
|
2274
|
+
description: "Lessons, classes, terms, workshops, and performances."
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
id: "voice_singing",
|
|
2278
|
+
label: "Voice & Singing",
|
|
2279
|
+
description: "Singing lessons, choirs, voice circles, workshops, and performances."
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
id: "performing_arts_school",
|
|
2283
|
+
label: "Theatre or performing arts school",
|
|
2284
|
+
description: "Classes, terms, workshops, performances, and lessons."
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
id: "community_wellbeing",
|
|
2288
|
+
label: "Community or wellbeing centre",
|
|
2289
|
+
description: "Groups, workshops, courses, appointments, and retreats."
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
id: "venue_event_space",
|
|
2293
|
+
label: "Venue or event space",
|
|
2294
|
+
description: "Room, resource, or access bookings. Depends on the future capacity-booking domain."
|
|
2295
|
+
}
|
|
2296
|
+
];
|
|
2297
|
+
VERTICAL_DEFINITIONS.map(({ id }) => id);
|
|
2298
|
+
//#endregion
|
|
2299
|
+
//#region ../core/src/booking-vertical-catalog.ts
|
|
2300
|
+
const VERTICAL_BOOKING_PRESETS = [
|
|
2301
|
+
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
2302
|
+
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
2303
|
+
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
2304
|
+
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
2305
|
+
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
2306
|
+
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
2307
|
+
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
2308
|
+
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
2309
|
+
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
2310
|
+
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
2311
|
+
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
2312
|
+
{
|
|
2313
|
+
...verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2314
|
+
eventPresetOverride: "term"
|
|
2315
|
+
},
|
|
2316
|
+
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
2317
|
+
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2318
|
+
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
2319
|
+
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
2320
|
+
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
2321
|
+
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
2322
|
+
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
2323
|
+
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
2324
|
+
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
2325
|
+
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
2326
|
+
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
2327
|
+
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
2328
|
+
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
2329
|
+
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
2330
|
+
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
2331
|
+
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
2332
|
+
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
2333
|
+
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
2334
|
+
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
2335
|
+
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
2336
|
+
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
2337
|
+
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
2338
|
+
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
2339
|
+
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
2340
|
+
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
2341
|
+
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
2342
|
+
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
2343
|
+
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
2344
|
+
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
2345
|
+
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
2346
|
+
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
2347
|
+
{
|
|
2348
|
+
...verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
2349
|
+
eventPresetOverride: "term"
|
|
2350
|
+
},
|
|
2351
|
+
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2352
|
+
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
2353
|
+
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
2354
|
+
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
2355
|
+
{
|
|
2356
|
+
...verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
2357
|
+
eventPresetOverride: "term"
|
|
2358
|
+
},
|
|
2359
|
+
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
2360
|
+
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
2361
|
+
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
2362
|
+
{
|
|
2363
|
+
...verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2364
|
+
eventPresetOverride: "term"
|
|
2365
|
+
},
|
|
2366
|
+
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2367
|
+
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
2368
|
+
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
2369
|
+
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
2370
|
+
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
2371
|
+
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
2372
|
+
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
2373
|
+
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
2374
|
+
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
2375
|
+
];
|
|
2376
|
+
//#endregion
|
|
2377
|
+
//#region ../core/src/booking-vertical-config.ts
|
|
2378
|
+
const VERTICAL_ID_SET = new Set(VERTICAL_DEFINITIONS.map(({ id }) => id));
|
|
2379
|
+
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
2380
|
+
function parseVerticalId(value) {
|
|
2381
|
+
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
2382
|
+
}
|
|
2383
|
+
function parseVerticalPresetId(value) {
|
|
2384
|
+
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
2385
|
+
}
|
|
2386
|
+
function getVerticalPresetDefinition(presetId) {
|
|
2387
|
+
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
2388
|
+
if (definition === void 0) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
2389
|
+
return definition;
|
|
2390
|
+
}
|
|
2391
|
+
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
2392
|
+
return {
|
|
2393
|
+
verticalId,
|
|
2394
|
+
selectedPresetIds
|
|
2395
|
+
};
|
|
2396
|
+
}
|
|
2397
|
+
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
2398
|
+
const firstPresetId = presetIds[0];
|
|
2399
|
+
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
2400
|
+
}
|
|
2401
|
+
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
2402
|
+
verticalId: null,
|
|
2403
|
+
selectedPresetIds: []
|
|
2404
|
+
};
|
|
2405
|
+
function appendUniqueIssue(issues, issue) {
|
|
2406
|
+
return issues.some((existing) => existing.code === issue.code) ? issues : [...issues, issue];
|
|
2407
|
+
}
|
|
2408
|
+
function collectRawConfigIssues(rawConfig, config) {
|
|
2409
|
+
const rawPresetValue = rawConfig.selectedPresetIds;
|
|
2410
|
+
const rawPresetIds = Array.isArray(rawPresetValue) ? rawPresetValue : [];
|
|
2411
|
+
let issues = [];
|
|
2412
|
+
if (rawConfig.verticalId != null && config.verticalId === null) issues = appendUniqueIssue(issues, {
|
|
2413
|
+
code: "unknown_vertical",
|
|
2414
|
+
rawValue: rawConfig.verticalId
|
|
2415
|
+
});
|
|
2416
|
+
if (config.verticalId === null && config.selectedPresetIds.length > 0) issues = appendUniqueIssue(issues, { code: "missing_vertical" });
|
|
2417
|
+
if (rawPresetValue !== void 0 && !Array.isArray(rawPresetValue) || rawPresetIds.some((presetId) => parseVerticalPresetId(presetId) === null)) issues = appendUniqueIssue(issues, {
|
|
2418
|
+
code: "unknown_preset",
|
|
2419
|
+
rawValue: rawPresetValue
|
|
2420
|
+
});
|
|
2421
|
+
if (rawConfig.verticalId != null && config.selectedPresetIds.length === 0) issues = appendUniqueIssue(issues, { code: "empty_selected_presets" });
|
|
2422
|
+
return issues;
|
|
2423
|
+
}
|
|
2424
|
+
function collectPresetConfigIssues(config) {
|
|
2425
|
+
const seenPresetIds = /* @__PURE__ */ new Set();
|
|
2426
|
+
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
2427
|
+
let issues = [];
|
|
2428
|
+
for (const presetId of config.selectedPresetIds) {
|
|
2429
|
+
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
2430
|
+
if (seenPresetIds.has(presetId)) issues = appendUniqueIssue(issues, { code: "duplicate_preset_id" });
|
|
2431
|
+
seenPresetIds.add(presetId);
|
|
2432
|
+
if (config.verticalId !== null && presetDefinition.verticalId !== config.verticalId) issues = appendUniqueIssue(issues, { code: "preset_vertical_mismatch" });
|
|
2433
|
+
if (presetDefinition.availability === "future") issues = appendUniqueIssue(issues, { code: "future_preset_selected" });
|
|
2434
|
+
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues = appendUniqueIssue(issues, { code: "duplicate_canonical_behaviour" });
|
|
2435
|
+
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
2436
|
+
}
|
|
2437
|
+
return issues;
|
|
2438
|
+
}
|
|
2439
|
+
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
2440
|
+
let issues = collectRawConfigIssues(rawConfig, config);
|
|
2441
|
+
for (const issue of collectPresetConfigIssues(config)) issues = appendUniqueIssue(issues, issue);
|
|
2442
|
+
return issues;
|
|
2443
|
+
}
|
|
2444
|
+
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
2445
|
+
if (rawConfig == null) return {
|
|
2446
|
+
kind: "unconfigured",
|
|
2447
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2448
|
+
};
|
|
2449
|
+
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
2450
|
+
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
2451
|
+
const config = {
|
|
2452
|
+
verticalId,
|
|
2453
|
+
selectedPresetIds
|
|
2454
|
+
};
|
|
2455
|
+
if (rawConfig.verticalId == null && selectedPresetIds.length === 0) return {
|
|
2456
|
+
kind: "unconfigured",
|
|
2457
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2458
|
+
};
|
|
2459
|
+
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
2460
|
+
if (issues.length > 0) return {
|
|
2461
|
+
kind: "invalid",
|
|
2462
|
+
config,
|
|
2463
|
+
issues
|
|
2464
|
+
};
|
|
2465
|
+
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
2466
|
+
const configuredConfig = verticalId !== null && nonEmptyPresetIds !== null ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
2467
|
+
if (configuredConfig === null) return {
|
|
2468
|
+
kind: "invalid",
|
|
2469
|
+
config,
|
|
2470
|
+
issues: [{ code: "empty_selected_presets" }]
|
|
2471
|
+
};
|
|
2472
|
+
return {
|
|
2473
|
+
kind: "configured",
|
|
2474
|
+
config: configuredConfig,
|
|
2475
|
+
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
2476
|
+
};
|
|
2477
|
+
}
|
|
1939
2478
|
z.object({
|
|
1940
2479
|
formulaVersion: z.literal("managed-domain-overage-v1"),
|
|
1941
2480
|
conversionRule: z.literal("usd-to-gbp-1-to-1-v1"),
|
|
@@ -1947,6 +2486,68 @@ z.object({
|
|
|
1947
2486
|
monthlyCurrency: z.literal("gbp")
|
|
1948
2487
|
});
|
|
1949
2488
|
//#endregion
|
|
2489
|
+
//#region ../blocks/src/system/types/link.ts
|
|
2490
|
+
const nullableString = z.union([z.string().min(1), z.null()]);
|
|
2491
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
2492
|
+
"page",
|
|
2493
|
+
"content",
|
|
2494
|
+
"pageSurface"
|
|
2495
|
+
];
|
|
2496
|
+
const resolvedInternalLinkKeys = [
|
|
2497
|
+
"entityId",
|
|
2498
|
+
"entityType",
|
|
2499
|
+
"href",
|
|
2500
|
+
"title",
|
|
2501
|
+
"typeLabel"
|
|
2502
|
+
];
|
|
2503
|
+
const internalRouteOnlyLinkSchema = z.object({
|
|
2504
|
+
kind: z.literal("internal"),
|
|
2505
|
+
routeId: z.string().min(1)
|
|
2506
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
2507
|
+
if (!resolvedInternalLinkKeys.some((key) => value[key] != null)) return;
|
|
2508
|
+
ctx.addIssue({
|
|
2509
|
+
code: "custom",
|
|
2510
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
2511
|
+
});
|
|
2512
|
+
});
|
|
2513
|
+
const internalResolvedLinkSchema = z.object({
|
|
2514
|
+
kind: z.literal("internal"),
|
|
2515
|
+
routeId: z.string().min(1),
|
|
2516
|
+
entityId: z.string().min(1),
|
|
2517
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
2518
|
+
href: z.string().min(1),
|
|
2519
|
+
title: z.string().min(1),
|
|
2520
|
+
typeLabel: z.string().min(1),
|
|
2521
|
+
contentTypeKey: nullableString.optional(),
|
|
2522
|
+
contentTypeName: nullableString.optional(),
|
|
2523
|
+
updatedAt: nullableString.optional()
|
|
2524
|
+
}).passthrough();
|
|
2525
|
+
const internalLinkSchema = z.union([internalResolvedLinkSchema, internalRouteOnlyLinkSchema]);
|
|
2526
|
+
const externalLinkSchema$1 = z.object({
|
|
2527
|
+
kind: z.literal("external"),
|
|
2528
|
+
href: z.string().min(1)
|
|
2529
|
+
}).passthrough();
|
|
2530
|
+
const customLinkSchema$1 = z.object({
|
|
2531
|
+
kind: z.literal("url"),
|
|
2532
|
+
href: z.string().min(1)
|
|
2533
|
+
}).passthrough();
|
|
2534
|
+
const pageLinkSchema$1 = z.object({
|
|
2535
|
+
kind: z.literal("page"),
|
|
2536
|
+
identifier: z.string().min(1)
|
|
2537
|
+
}).passthrough();
|
|
2538
|
+
const entryLinkSchema$1 = z.object({
|
|
2539
|
+
kind: z.literal("entry"),
|
|
2540
|
+
contentType: z.string().min(1),
|
|
2541
|
+
identifier: z.string().min(1)
|
|
2542
|
+
}).passthrough();
|
|
2543
|
+
z.union([
|
|
2544
|
+
internalLinkSchema,
|
|
2545
|
+
externalLinkSchema$1,
|
|
2546
|
+
customLinkSchema$1,
|
|
2547
|
+
pageLinkSchema$1,
|
|
2548
|
+
entryLinkSchema$1
|
|
2549
|
+
]);
|
|
2550
|
+
//#endregion
|
|
1950
2551
|
//#region ../api/src/navigation/contracts.ts
|
|
1951
2552
|
/**
|
|
1952
2553
|
* Canonical navigation/link Zod contracts.
|
|
@@ -1976,7 +2577,7 @@ const internalLinkPayloadSchema = z.object({
|
|
|
1976
2577
|
kind: z.literal("internal"),
|
|
1977
2578
|
routeId: z.string().uuid(),
|
|
1978
2579
|
entityId: z.string().uuid(),
|
|
1979
|
-
entityType: z.enum(
|
|
2580
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
1980
2581
|
href: z.string().min(1),
|
|
1981
2582
|
title: z.string().min(1),
|
|
1982
2583
|
typeLabel: z.string().min(1),
|
|
@@ -3848,6 +4449,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
3848
4449
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
3849
4450
|
return token;
|
|
3850
4451
|
});
|
|
4452
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
4453
|
+
kind: z.literal("shade-shift"),
|
|
4454
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
4455
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
4456
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
4457
|
+
});
|
|
3851
4458
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
3852
4459
|
const buttonShadowIntensitySchema = z.enum([
|
|
3853
4460
|
"subtle",
|
|
@@ -4187,6 +4794,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
4187
4794
|
shadow: variantShadowSchema.optional(),
|
|
4188
4795
|
border: buttonBorderSchema.optional(),
|
|
4189
4796
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
4797
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
4190
4798
|
effects: variantEffectsSchema.optional(),
|
|
4191
4799
|
sizes: variantSizeOverridesSchema.optional(),
|
|
4192
4800
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -4459,6 +5067,139 @@ function validateButtonTextContrast(input) {
|
|
|
4459
5067
|
};
|
|
4460
5068
|
}
|
|
4461
5069
|
//#endregion
|
|
5070
|
+
//#region ../theme-core/src/buttons/contextualHover.ts
|
|
5071
|
+
function resolveContextualHoverPreference(input) {
|
|
5072
|
+
const preferred = input.instruction.preferredToken;
|
|
5073
|
+
if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
|
|
5074
|
+
kind: "resolved",
|
|
5075
|
+
token: preferred,
|
|
5076
|
+
repair: null
|
|
5077
|
+
};
|
|
5078
|
+
const contextual = resolveContextualHover(input);
|
|
5079
|
+
return contextual.kind === "resolved" ? {
|
|
5080
|
+
kind: "resolved",
|
|
5081
|
+
token: contextual.token,
|
|
5082
|
+
repair: preferred ? {
|
|
5083
|
+
kind: "preferred-token-replaced",
|
|
5084
|
+
preferredToken: preferred,
|
|
5085
|
+
contextualToken: contextual.token
|
|
5086
|
+
} : null
|
|
5087
|
+
} : contextual;
|
|
5088
|
+
}
|
|
5089
|
+
/**
|
|
5090
|
+
* Resolves semantic shade movement from real palette steps. The persisted
|
|
5091
|
+
* instruction owns the colour family and deterministic unknown-surface
|
|
5092
|
+
* fallback; a proven surface may select the opposite direction when it gives
|
|
5093
|
+
* the button stronger separation while retaining the shared contrast contract.
|
|
5094
|
+
*/
|
|
5095
|
+
function resolveContextualHover(input) {
|
|
5096
|
+
const candidates = shadeCandidates(input.instruction.seedToken, input.palette);
|
|
5097
|
+
if (candidates.length === 0) return {
|
|
5098
|
+
kind: "unavailable",
|
|
5099
|
+
reason: "no-distinct-shade"
|
|
5100
|
+
};
|
|
5101
|
+
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
|
|
5102
|
+
if (textSafe.length === 0) return {
|
|
5103
|
+
kind: "unavailable",
|
|
5104
|
+
reason: "no-text-safe-candidate"
|
|
5105
|
+
};
|
|
5106
|
+
if (!input.surface) {
|
|
5107
|
+
const selected = textSafe.find((candidate) => candidate.direction === input.instruction.fallbackDirection) ?? textSafe[0];
|
|
5108
|
+
return selected ? {
|
|
5109
|
+
kind: "resolved",
|
|
5110
|
+
token: selected.token,
|
|
5111
|
+
direction: selected.direction,
|
|
5112
|
+
evidence: "fallback-direction"
|
|
5113
|
+
} : {
|
|
5114
|
+
kind: "unavailable",
|
|
5115
|
+
reason: "no-text-safe-candidate"
|
|
5116
|
+
};
|
|
5117
|
+
}
|
|
5118
|
+
const selected = textSafe.map((candidate) => ({
|
|
5119
|
+
...candidate,
|
|
5120
|
+
surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface?.backgroundHex ?? "")
|
|
5121
|
+
})).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
|
|
5122
|
+
const distanceDifference = left.distance - right.distance;
|
|
5123
|
+
if (distanceDifference !== 0) return distanceDifference;
|
|
5124
|
+
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
5125
|
+
if (contrastDifference !== 0) return contrastDifference;
|
|
5126
|
+
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
5127
|
+
return left.direction === input.instruction.fallbackDirection ? -1 : 1;
|
|
5128
|
+
})[0];
|
|
5129
|
+
return selected ? {
|
|
5130
|
+
kind: "resolved",
|
|
5131
|
+
token: selected.token,
|
|
5132
|
+
direction: selected.direction,
|
|
5133
|
+
evidence: "known-surface"
|
|
5134
|
+
} : {
|
|
5135
|
+
kind: "unavailable",
|
|
5136
|
+
reason: "no-surface-safe-candidate"
|
|
5137
|
+
};
|
|
5138
|
+
}
|
|
5139
|
+
function shadeCandidates(seedToken, palette) {
|
|
5140
|
+
const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
|
|
5141
|
+
const family = match?.[1] ?? String(seedToken);
|
|
5142
|
+
const currentShade = match?.[2] ? Number(match[2]) : 500;
|
|
5143
|
+
const seedHex = palette[seedToken];
|
|
5144
|
+
const shades = Object.keys(palette).flatMap((token) => {
|
|
5145
|
+
const shade = token.match(new RegExp(`^${escapeRegExp(family)}-(\\d{2,3})$`));
|
|
5146
|
+
return shade?.[1] ? [Number(shade[1])] : [];
|
|
5147
|
+
}).filter((shade) => Number.isFinite(shade)).sort((left, right) => left - right);
|
|
5148
|
+
const lower = [...shades].filter((shade) => shade < currentShade).sort((left, right) => right - left);
|
|
5149
|
+
const higher = shades.filter((shade) => shade > currentShade);
|
|
5150
|
+
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);
|
|
5151
|
+
}
|
|
5152
|
+
function candidate(family, shade, currentShade, direction, seedHex, palette) {
|
|
5153
|
+
const token = parseOpaqueButtonColourToken(`${family}-${shade}`);
|
|
5154
|
+
if (token === null) return null;
|
|
5155
|
+
const candidateHex = palette[token];
|
|
5156
|
+
if (!candidateHex || candidateHex === seedHex) return null;
|
|
5157
|
+
return {
|
|
5158
|
+
token,
|
|
5159
|
+
direction,
|
|
5160
|
+
distance: Math.abs(shade - currentShade),
|
|
5161
|
+
surfaceContrast: null
|
|
5162
|
+
};
|
|
5163
|
+
}
|
|
5164
|
+
function hasSafeTextContrast(token, palette) {
|
|
5165
|
+
const background = palette[token];
|
|
5166
|
+
const foreground = palette[onColorTokenName(token)];
|
|
5167
|
+
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
5168
|
+
}
|
|
5169
|
+
function isSafeCandidate(token, palette, surface) {
|
|
5170
|
+
if (!hasSafeTextContrast(token, palette)) return false;
|
|
5171
|
+
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
5172
|
+
}
|
|
5173
|
+
function escapeRegExp(value) {
|
|
5174
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5175
|
+
}
|
|
5176
|
+
//#endregion
|
|
5177
|
+
//#region ../theme-core/src/buttons/resolveButtonHoverTreatment.ts
|
|
5178
|
+
function resolveButtonHoverTreatment(input) {
|
|
5179
|
+
if (input.variant.contextualHover) {
|
|
5180
|
+
const contextual = resolveContextualHoverPreference({
|
|
5181
|
+
instruction: input.variant.contextualHover,
|
|
5182
|
+
palette: input.palette,
|
|
5183
|
+
surface: input.surface
|
|
5184
|
+
});
|
|
5185
|
+
if (contextual.kind === "resolved") return {
|
|
5186
|
+
treatment: {
|
|
5187
|
+
type: "solid",
|
|
5188
|
+
colorToken: contextual.token
|
|
5189
|
+
},
|
|
5190
|
+
repair: contextual.repair
|
|
5191
|
+
};
|
|
5192
|
+
}
|
|
5193
|
+
const token = input.variant.hoverBackgroundToken ?? (input.global.hoverColor === "token" ? input.global.hoverColorToken : void 0);
|
|
5194
|
+
return {
|
|
5195
|
+
treatment: token === void 0 ? input.fallback : {
|
|
5196
|
+
type: "solid",
|
|
5197
|
+
colorToken: token
|
|
5198
|
+
},
|
|
5199
|
+
repair: null
|
|
5200
|
+
};
|
|
5201
|
+
}
|
|
5202
|
+
//#endregion
|
|
4462
5203
|
//#region ../theme-core/src/buttons/resolveButtonColourStates.ts
|
|
4463
5204
|
function compileButtonColourStates(input) {
|
|
4464
5205
|
const baseTransition = applyColourEffects({
|
|
@@ -4469,9 +5210,16 @@ function compileButtonColourStates(input) {
|
|
|
4469
5210
|
palette: input.palette
|
|
4470
5211
|
});
|
|
4471
5212
|
if (!baseTransition.ok) return baseTransition;
|
|
5213
|
+
const hover = resolveButtonHoverTreatment({
|
|
5214
|
+
variant: input.variant,
|
|
5215
|
+
global: input.global,
|
|
5216
|
+
fallback: baseTransition.treatment,
|
|
5217
|
+
palette: input.palette,
|
|
5218
|
+
surface: input.surface
|
|
5219
|
+
});
|
|
4472
5220
|
const stateTreatments = {
|
|
4473
5221
|
base: baseTransition.treatment,
|
|
4474
|
-
hover:
|
|
5222
|
+
hover: hover.treatment,
|
|
4475
5223
|
focus: baseTransition.treatment,
|
|
4476
5224
|
active: baseTransition.treatment,
|
|
4477
5225
|
disabled: baseTransition.treatment
|
|
@@ -4510,14 +5258,8 @@ function compileButtonColourStates(input) {
|
|
|
4510
5258
|
ok: true,
|
|
4511
5259
|
states: resolved,
|
|
4512
5260
|
focusIndicator: resolveFocusIndicator(resolved.focus),
|
|
4513
|
-
nonColourEffects
|
|
4514
|
-
|
|
4515
|
-
}
|
|
4516
|
-
function hoverTreatment(variant, global, fallback) {
|
|
4517
|
-
const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
|
|
4518
|
-
return token === void 0 ? fallback : {
|
|
4519
|
-
type: "solid",
|
|
4520
|
-
colorToken: token
|
|
5261
|
+
nonColourEffects,
|
|
5262
|
+
contextualHoverRepair: hover.repair
|
|
4521
5263
|
};
|
|
4522
5264
|
}
|
|
4523
5265
|
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) {
|
|
@@ -17501,7 +18410,7 @@ const boxStylesTransforms = [
|
|
|
17501
18410
|
roundedTransform,
|
|
17502
18411
|
boxStylesCompositeTransform,
|
|
17503
18412
|
cardRoleClassTransform,
|
|
17504
|
-
|
|
18413
|
+
cardSlotRoleTransform,
|
|
17505
18414
|
boxStylesBorderColorTransform,
|
|
17506
18415
|
sectionClassNameTransform,
|
|
17507
18416
|
containerStylesResolveClassName,
|
|
@@ -17608,10 +18517,16 @@ function styledCard(children, opts, ...mods) {
|
|
|
17608
18517
|
const style = {
|
|
17609
18518
|
...opts.style ?? {},
|
|
17610
18519
|
borderColor: { $bind: {
|
|
17611
|
-
from: opts.stylesFrom,
|
|
18520
|
+
from: opts.itemRole?.from ?? opts.stylesFrom,
|
|
17612
18521
|
transforms: [{
|
|
17613
18522
|
id: "boxStyles.borderColor",
|
|
17614
|
-
options: {
|
|
18523
|
+
options: {
|
|
18524
|
+
returnEmptyForDefault: true,
|
|
18525
|
+
...opts.itemRole ? {
|
|
18526
|
+
stylesPath: opts.stylesFrom,
|
|
18527
|
+
...opts.itemRole.aliases ? { itemRoleAliases: opts.itemRole.aliases } : {}
|
|
18528
|
+
} : {}
|
|
18529
|
+
}
|
|
17615
18530
|
}]
|
|
17616
18531
|
} }
|
|
17617
18532
|
};
|
|
@@ -18736,18 +19651,73 @@ function buildGridCardsLayout(className) {
|
|
|
18736
19651
|
return el("div", { className }, buildResponsiveGridCards());
|
|
18737
19652
|
}
|
|
18738
19653
|
/**
|
|
19654
|
+
* The card slots the featured-editorial layout has, and the role each one
|
|
19655
|
+
* defaults to.
|
|
19656
|
+
*
|
|
19657
|
+
* Which slot is the statement is *structure*, so the layout decides it: this
|
|
19658
|
+
* variant exists to put one lead voice beside its supporting voices. But a Look
|
|
19659
|
+
* that picks a surface has to keep meaning something here, so the lead slot's
|
|
19660
|
+
* role is a default the Look's compiled `cardRole` wins over — see
|
|
19661
|
+
* `cardSlotRoleClass`. Supporting voices stay the quiet everyday card.
|
|
19662
|
+
*/
|
|
19663
|
+
const FEATURED_EDITORIAL_SLOTS = {
|
|
19664
|
+
lead: {
|
|
19665
|
+
/** Composition CSS addresses the lead card's geometry through this. */
|
|
19666
|
+
variantClass: "rb-testimonials-fe-card--feature",
|
|
19667
|
+
slotDefault: "alternative",
|
|
19668
|
+
followsLook: true
|
|
19669
|
+
},
|
|
19670
|
+
support: {
|
|
19671
|
+
variantClass: null,
|
|
19672
|
+
slotDefault: "default",
|
|
19673
|
+
followsLook: false
|
|
19674
|
+
}
|
|
19675
|
+
};
|
|
19676
|
+
/** Where the testimonials block's compiled card styles live. */
|
|
19677
|
+
const TESTIMONIALS_CARD_STYLES_PATH = "content._cardStyles";
|
|
19678
|
+
/**
|
|
19679
|
+
* The class list for one featured-editorial card slot.
|
|
19680
|
+
*
|
|
19681
|
+
* A slot that follows the Look has to resolve at render time, so it binds
|
|
19682
|
+
* through the shared card-class emitter rather than naming a role class here;
|
|
19683
|
+
* a slot that does not is a plain string built by the same composite emitter.
|
|
19684
|
+
*/
|
|
19685
|
+
function featuredEditorialCardClassName(slot) {
|
|
19686
|
+
const { variantClass, slotDefault, followsLook } = FEATURED_EDITORIAL_SLOTS[slot];
|
|
19687
|
+
const baseClass = ["rb-testimonials-fe-card", variantClass].filter(Boolean).join(" ");
|
|
19688
|
+
if (!followsLook) return boxStyleClassNames({}, {
|
|
19689
|
+
baseClass,
|
|
19690
|
+
cardRoleFallback: slotDefault,
|
|
19691
|
+
includeSpacing: false
|
|
19692
|
+
});
|
|
19693
|
+
return { $bind: {
|
|
19694
|
+
from: TESTIMONIALS_CARD_STYLES_PATH,
|
|
19695
|
+
transforms: [{
|
|
19696
|
+
id: "boxStyles.cardSlotRole",
|
|
19697
|
+
options: {
|
|
19698
|
+
baseClass,
|
|
19699
|
+
slotDefault
|
|
19700
|
+
}
|
|
19701
|
+
}],
|
|
19702
|
+
fallback: boxStyleClassNames({}, {
|
|
19703
|
+
baseClass,
|
|
19704
|
+
cardRoleFallback: slotDefault,
|
|
19705
|
+
includeSpacing: false
|
|
19706
|
+
})
|
|
19707
|
+
} };
|
|
19708
|
+
}
|
|
19709
|
+
/**
|
|
18739
19710
|
* Build a single "featured editorial" testimonial card.
|
|
18740
19711
|
*
|
|
18741
|
-
* This card type deliberately renders NO avatar/headshot:
|
|
18742
|
-
*
|
|
18743
|
-
*
|
|
18744
|
-
*
|
|
18745
|
-
* - `rb-testimonials-fe-card--plain` → white surface card
|
|
19712
|
+
* This card type deliberately renders NO avatar/headshot: a quote mark, the
|
|
19713
|
+
* quote body, then the author name and a context line. The card surface comes
|
|
19714
|
+
* from the slot's card role — the site style owns the fill, border, corners and
|
|
19715
|
+
* padding.
|
|
18746
19716
|
*
|
|
18747
19717
|
* Extra modifiers (`repeat`, `when`) are forwarded to the card node so the
|
|
18748
19718
|
* caller can drive first-vs-rest branching.
|
|
18749
19719
|
*/
|
|
18750
|
-
function buildFeaturedEditorialCard(
|
|
19720
|
+
function buildFeaturedEditorialCard(slot, ...mods) {
|
|
18751
19721
|
const quoteMark = text({
|
|
18752
19722
|
as: "span",
|
|
18753
19723
|
className: "rb-testimonials-fe-qmark",
|
|
@@ -18761,11 +19731,11 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18761
19731
|
as: "span",
|
|
18762
19732
|
className: "rb-testimonials-fe-context"
|
|
18763
19733
|
}, when("testimonial.content.jobTitle"), bind("testimonial.content.jobTitle"))]);
|
|
18764
|
-
return el("div", { className:
|
|
19734
|
+
return el("div", { className: featuredEditorialCardClassName(slot) }, [el("div", { className: "card-content rb-testimonials-fe-card-body" }, [
|
|
18765
19735
|
quoteMark,
|
|
18766
19736
|
quote,
|
|
18767
19737
|
meta
|
|
18768
|
-
], ...mods);
|
|
19738
|
+
])], ...mods);
|
|
18769
19739
|
}
|
|
18770
19740
|
/**
|
|
18771
19741
|
* Build the "featured editorial" layout: an asymmetric two-column arrangement
|
|
@@ -18779,7 +19749,7 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18779
19749
|
* index scope in context, so entry 0 produces no node in the rest column.
|
|
18780
19750
|
*/
|
|
18781
19751
|
function buildFeaturedEditorialLayout() {
|
|
18782
|
-
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("
|
|
19752
|
+
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", {
|
|
18783
19753
|
equals: 0,
|
|
18784
19754
|
not: true
|
|
18785
19755
|
}))])]);
|
|
@@ -19506,7 +20476,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
19506
20476
|
});
|
|
19507
20477
|
//#endregion
|
|
19508
20478
|
//#region ../blocks/src/system/fragments/library/card.ts
|
|
19509
|
-
const cardVariantOptions
|
|
20479
|
+
const cardVariantOptions = cardVariantRoleValues.map((value) => ({
|
|
19510
20480
|
value,
|
|
19511
20481
|
label: value === "default" ? "Default" : "Alternative"
|
|
19512
20482
|
}));
|
|
@@ -19604,7 +20574,7 @@ const cardFragment = defineFragment({
|
|
|
19604
20574
|
description: "Choose a card style from your theme",
|
|
19605
20575
|
required: false,
|
|
19606
20576
|
defaultValue: "default",
|
|
19607
|
-
options: cardVariantOptions
|
|
20577
|
+
options: cardVariantOptions,
|
|
19608
20578
|
ui: { intent: "style" }
|
|
19609
20579
|
}
|
|
19610
20580
|
],
|
|
@@ -19613,7 +20583,10 @@ const cardFragment = defineFragment({
|
|
|
19613
20583
|
className: { $bind: {
|
|
19614
20584
|
from: "variant",
|
|
19615
20585
|
fallback: "default",
|
|
19616
|
-
transforms: [{
|
|
20586
|
+
transforms: [{
|
|
20587
|
+
id: "boxStyles.cardRoleClass",
|
|
20588
|
+
options: { baseClass: "" }
|
|
20589
|
+
}]
|
|
19617
20590
|
} }
|
|
19618
20591
|
}, [media({
|
|
19619
20592
|
className: "card-media rb-w-full rb-h-auto rb-object-cover",
|
|
@@ -25569,19 +26542,30 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
25569
26542
|
]);
|
|
25570
26543
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
25571
26544
|
//#endregion
|
|
25572
|
-
//#region ../blocks/src/system/blocks/
|
|
25573
|
-
|
|
25574
|
-
|
|
25575
|
-
|
|
25576
|
-
|
|
26545
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
26546
|
+
const blockBookingConsentSchema = z.object({
|
|
26547
|
+
requirementId: z.string(),
|
|
26548
|
+
title: z.string(),
|
|
26549
|
+
agreement: RichTextDocSchema,
|
|
26550
|
+
checkboxLabel: z.string()
|
|
26551
|
+
});
|
|
26552
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
26553
|
+
id: z.string(),
|
|
26554
|
+
label: z.string(),
|
|
26555
|
+
type: z.literal("booking_requirement_consent"),
|
|
26556
|
+
required: z.literal(true),
|
|
26557
|
+
agreement: RichTextDocSchema,
|
|
26558
|
+
checkboxLabel: z.string().min(1)
|
|
26559
|
+
});
|
|
26560
|
+
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
26561
|
+
//#endregion
|
|
26562
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26563
|
+
const wholeSeriesVenueSchema = z.object({
|
|
25577
26564
|
id: z.string(),
|
|
25578
26565
|
name: z.string(),
|
|
25579
26566
|
address: z.string().nullable()
|
|
25580
26567
|
});
|
|
25581
|
-
|
|
25582
|
-
* Zod schema for course session (occurrence) data
|
|
25583
|
-
*/
|
|
25584
|
-
const courseSessionSchema = z.object({
|
|
26568
|
+
const wholeSeriesSessionSchema = z.object({
|
|
25585
26569
|
id: z.string(),
|
|
25586
26570
|
startsAt: z.string(),
|
|
25587
26571
|
endsAt: z.string(),
|
|
@@ -25589,14 +26573,14 @@ const courseSessionSchema = z.object({
|
|
|
25589
26573
|
capacityOverride: z.number().nullable().optional(),
|
|
25590
26574
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
25591
26575
|
});
|
|
25592
|
-
const
|
|
26576
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
25593
26577
|
id: z.string(),
|
|
25594
26578
|
name: z.string(),
|
|
25595
26579
|
roleLabel: z.string().nullable(),
|
|
25596
26580
|
summary: z.string().nullable(),
|
|
25597
26581
|
profilePath: z.string().nullable()
|
|
25598
26582
|
});
|
|
25599
|
-
const
|
|
26583
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
25600
26584
|
id: z.string(),
|
|
25601
26585
|
name: z.string(),
|
|
25602
26586
|
description: z.string().nullable(),
|
|
@@ -25612,7 +26596,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
25612
26596
|
"both"
|
|
25613
26597
|
]).nullable().optional()
|
|
25614
26598
|
});
|
|
25615
|
-
const
|
|
26599
|
+
const wholeSeriesPricingSchema = z.object({
|
|
25616
26600
|
bookingRequirement: z.enum(["none", "required"]),
|
|
25617
26601
|
pricingStrategy: z.enum([
|
|
25618
26602
|
"free",
|
|
@@ -25626,22 +26610,20 @@ const coursePricingSchema = z.object({
|
|
|
25626
26610
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
25627
26611
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
25628
26612
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25629
|
-
options: z.array(
|
|
26613
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
25630
26614
|
});
|
|
25631
|
-
/**
|
|
25632
|
-
* Zod schema for public course data
|
|
25633
|
-
*/
|
|
25634
26615
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
25635
26616
|
eventSeriesId: z.string(),
|
|
25636
26617
|
eventOfferingId: z.string(),
|
|
25637
26618
|
title: z.string(),
|
|
25638
26619
|
slug: z.string(),
|
|
25639
26620
|
description: z.unknown().nullable(),
|
|
25640
|
-
teamMembers: z.array(
|
|
26621
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
25641
26622
|
enrollmentOpen: z.boolean(),
|
|
25642
|
-
pricing:
|
|
26623
|
+
pricing: wholeSeriesPricingSchema,
|
|
25643
26624
|
currency: z.string(),
|
|
25644
26625
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26626
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
25645
26627
|
enrollmentCapacity: z.number().nullable(),
|
|
25646
26628
|
acceptsMemberships: z.boolean(),
|
|
25647
26629
|
status: z.enum([
|
|
@@ -25652,12 +26634,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
25652
26634
|
sessionsCount: z.number(),
|
|
25653
26635
|
enrolledCount: z.number(),
|
|
25654
26636
|
availableSpots: z.number().nullable(),
|
|
25655
|
-
sessions: z.array(
|
|
25656
|
-
venue:
|
|
26637
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
26638
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
25657
26639
|
});
|
|
25658
|
-
|
|
25659
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
25660
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
26640
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
25661
26641
|
//#endregion
|
|
25662
26642
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
25663
26643
|
const eventPresetSchema = z.enum([
|
|
@@ -25961,6 +26941,7 @@ const publicEventSchema = z.object({
|
|
|
25961
26941
|
timeZone: z.string(),
|
|
25962
26942
|
pricing: publicEventPricingSchema,
|
|
25963
26943
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26944
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
25964
26945
|
accessRestriction: accessRestrictionSchema,
|
|
25965
26946
|
allowedCategoryIds: z.array(z.string()),
|
|
25966
26947
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -25968,7 +26949,7 @@ const publicEventSchema = z.object({
|
|
|
25968
26949
|
acceptsMemberships: z.boolean().optional(),
|
|
25969
26950
|
wholeSeries: z.object({
|
|
25970
26951
|
eventSeriesId: z.string(),
|
|
25971
|
-
pricing:
|
|
26952
|
+
pricing: wholeSeriesPricingSchema,
|
|
25972
26953
|
currency: z.string(),
|
|
25973
26954
|
enrollmentOpen: z.boolean()
|
|
25974
26955
|
}).nullable().optional()
|
|
@@ -25977,24 +26958,19 @@ const publicEventSchema = z.object({
|
|
|
25977
26958
|
* Schema for an array of public events
|
|
25978
26959
|
*/
|
|
25979
26960
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
26961
|
+
//#endregion
|
|
26962
|
+
//#region ../blocks/src/system/blocks/events/shared/fields.ts
|
|
25980
26963
|
/**
|
|
25981
26964
|
* Shared card styling fields for event blocks
|
|
25982
26965
|
*/
|
|
25983
26966
|
const cardStylingFields = [
|
|
25984
|
-
{
|
|
25985
|
-
id: "
|
|
25986
|
-
type: "select",
|
|
26967
|
+
cardStylesField({
|
|
26968
|
+
id: "_cardStyles",
|
|
25987
26969
|
label: "Card style",
|
|
25988
|
-
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
25992
|
-
options: cardVariantRoleValues.map((value) => ({
|
|
25993
|
-
value,
|
|
25994
|
-
label: value === "default" ? "Default" : "Alternative"
|
|
25995
|
-
})),
|
|
25996
|
-
ui: { intent: "style" }
|
|
25997
|
-
},
|
|
26970
|
+
controls: "role-only",
|
|
26971
|
+
renderInHeader: false,
|
|
26972
|
+
intent: "style"
|
|
26973
|
+
}),
|
|
25998
26974
|
createButtonVariantField({ description: "Choose a button style from your theme" }),
|
|
25999
26975
|
{
|
|
26000
26976
|
id: "buttonText",
|
|
@@ -26133,14 +27109,7 @@ function normalizeIdList(parts) {
|
|
|
26133
27109
|
}
|
|
26134
27110
|
//#endregion
|
|
26135
27111
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
26136
|
-
const eventSurfacePresetValues =
|
|
26137
|
-
"course",
|
|
26138
|
-
"term",
|
|
26139
|
-
"class",
|
|
26140
|
-
"workshop",
|
|
26141
|
-
"retreat",
|
|
26142
|
-
"performance"
|
|
26143
|
-
];
|
|
27112
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
26144
27113
|
const eventSurfaceScopeValues = [
|
|
26145
27114
|
"all",
|
|
26146
27115
|
"regularClassSchedule",
|
|
@@ -26321,6 +27290,25 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
26321
27290
|
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
26322
27291
|
}
|
|
26323
27292
|
//#endregion
|
|
27293
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
27294
|
+
function planEventRegistrationScope(input) {
|
|
27295
|
+
const subject = input.subject;
|
|
27296
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
27297
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
27298
|
+
kind: "context",
|
|
27299
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
27300
|
+
occurrenceContext: input.occurrenceContext,
|
|
27301
|
+
subject
|
|
27302
|
+
})
|
|
27303
|
+
};
|
|
27304
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
27305
|
+
return {
|
|
27306
|
+
kind: "selectedRun",
|
|
27307
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
27308
|
+
offering: selectedRunOffering
|
|
27309
|
+
};
|
|
27310
|
+
}
|
|
27311
|
+
//#endregion
|
|
26324
27312
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
26325
27313
|
function isRecord$7(value) {
|
|
26326
27314
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -26641,8 +27629,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
26641
27629
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
26642
27630
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
26643
27631
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
26644
|
-
wholeSeriesOfferings:
|
|
26645
|
-
wholeSeriesOffering:
|
|
27632
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
27633
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26646
27634
|
maxTickets: z.string().optional(),
|
|
26647
27635
|
showVenue: z.boolean().optional(),
|
|
26648
27636
|
showCapacity: z.boolean().optional(),
|
|
@@ -26664,12 +27652,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
26664
27652
|
portalToken: z.string().nullable().optional(),
|
|
26665
27653
|
previewToken: z.string().nullable().optional(),
|
|
26666
27654
|
...eventRegistrationHydrationSchemaShape,
|
|
27655
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26667
27656
|
className: z.string().nullable().optional(),
|
|
26668
27657
|
buttonText: z.string().nullable().optional(),
|
|
26669
27658
|
maxTickets: z.string().nullable().optional(),
|
|
26670
27659
|
stage: previewStageSchema.optional()
|
|
26671
27660
|
});
|
|
26672
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
27661
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
26673
27662
|
kind: z.literal("event-registration"),
|
|
26674
27663
|
state: z.literal("generic-shell"),
|
|
26675
27664
|
className: z.string().nullable(),
|
|
@@ -26677,7 +27666,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
26677
27666
|
bodyText: z.string(),
|
|
26678
27667
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
26679
27668
|
summaryButtonText: z.string()
|
|
26680
|
-
})
|
|
27669
|
+
}), z.object({
|
|
27670
|
+
kind: z.literal("event-registration"),
|
|
27671
|
+
state: z.literal("registration-closed"),
|
|
27672
|
+
className: z.string().nullable(),
|
|
27673
|
+
titleText: z.string(),
|
|
27674
|
+
bodyText: z.string()
|
|
27675
|
+
})]);
|
|
26681
27676
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
26682
27677
|
const eventRegistrationRenderSchema = z.object({
|
|
26683
27678
|
display: eventRegistrationDisplaySchema,
|
|
@@ -26691,6 +27686,13 @@ z.object({
|
|
|
26691
27686
|
stage: previewStageSchema.optional()
|
|
26692
27687
|
});
|
|
26693
27688
|
function buildEventRegistrationDisplay(source) {
|
|
27689
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
27690
|
+
kind: "event-registration",
|
|
27691
|
+
state: "registration-closed",
|
|
27692
|
+
className: source.className ?? null,
|
|
27693
|
+
titleText: "Registration closed",
|
|
27694
|
+
bodyText: "This run is no longer open for bookings."
|
|
27695
|
+
};
|
|
26694
27696
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
26695
27697
|
return {
|
|
26696
27698
|
kind: "event-registration",
|
|
@@ -26702,6 +27704,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
26702
27704
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
26703
27705
|
};
|
|
26704
27706
|
}
|
|
27707
|
+
function resolveWholeSeriesOffering(source) {
|
|
27708
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27709
|
+
}
|
|
26705
27710
|
function buildEventRegistrationShellStepLabels(source) {
|
|
26706
27711
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
26707
27712
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -26717,10 +27722,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
26717
27722
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
26718
27723
|
}
|
|
26719
27724
|
function scopeEventRegistrationEvents(source) {
|
|
26720
|
-
|
|
27725
|
+
const scope = planEventRegistrationScope({
|
|
27726
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
27727
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
26721
27728
|
occurrenceContext: source.occurrenceContext,
|
|
26722
27729
|
subject: source.subject
|
|
26723
27730
|
});
|
|
27731
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
26724
27732
|
}
|
|
26725
27733
|
function shellLabelForRegistrationStep(step, events) {
|
|
26726
27734
|
switch (step) {
|
|
@@ -26759,7 +27767,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
26759
27767
|
subject: source.subject ?? null,
|
|
26760
27768
|
events: source.events ?? null,
|
|
26761
27769
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
26762
|
-
wholeSeriesOffering: source
|
|
27770
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
26763
27771
|
maxTickets: source.maxTickets ?? void 0,
|
|
26764
27772
|
showVenue: source.showVenue,
|
|
26765
27773
|
showCapacity: source.showCapacity,
|
|
@@ -26980,7 +27988,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26980
27988
|
fallback: false
|
|
26981
27989
|
} },
|
|
26982
27990
|
events: { $bind: { from: "data.events" } },
|
|
26983
|
-
wholeSeriesOffering: { $bind: { from: "data.
|
|
27991
|
+
wholeSeriesOffering: { $bind: { from: "data.selectedRunOffering.offering" } },
|
|
27992
|
+
subjectWholeSeriesOffering: { $bind: { from: "data.subjectWholeSeriesOffering.offering" } },
|
|
27993
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
26984
27994
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
26985
27995
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
26986
27996
|
stage: { $bind: {
|
|
@@ -26994,7 +28004,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26994
28004
|
runtime: eventRegistrationBlockRuntime,
|
|
26995
28005
|
dataSchemas: {
|
|
26996
28006
|
events: publicEventsArraySchema.optional(),
|
|
26997
|
-
|
|
28007
|
+
selectedRunOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
28008
|
+
subjectWholeSeriesOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
28009
|
+
wholeSeriesOfferings: z.array(publicWholeSeriesOfferingSchema).optional(),
|
|
26998
28010
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
26999
28011
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
27000
28012
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
@@ -27011,11 +28023,29 @@ const eventRegistrationBlockDefinition = {
|
|
|
27011
28023
|
} },
|
|
27012
28024
|
readProfile: "registration",
|
|
27013
28025
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28026
|
+
seriesIds: { $bind: {
|
|
28027
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28028
|
+
transforms: [{ id: "value.csv" }]
|
|
28029
|
+
} },
|
|
28030
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27014
28031
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27015
28032
|
},
|
|
27016
28033
|
mode: "server"
|
|
27017
28034
|
},
|
|
27018
|
-
|
|
28035
|
+
selectedRunOffering: {
|
|
28036
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
28037
|
+
params: {
|
|
28038
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
28039
|
+
eventSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
28040
|
+
stage: { $bind: {
|
|
28041
|
+
from: "$root.previewStage",
|
|
28042
|
+
fallback: "published"
|
|
28043
|
+
} }
|
|
28044
|
+
},
|
|
28045
|
+
requiredParams: ["eventSeriesId"],
|
|
28046
|
+
mode: "server"
|
|
28047
|
+
},
|
|
28048
|
+
subjectWholeSeriesOffering: {
|
|
27019
28049
|
endpoint: "getPublicWholeSeriesOffering",
|
|
27020
28050
|
when: { $bind: {
|
|
27021
28051
|
from: "$root.subject.isWholeSeriesBooking",
|
|
@@ -27032,6 +28062,22 @@ const eventRegistrationBlockDefinition = {
|
|
|
27032
28062
|
requiredParams: ["eventSeriesId"],
|
|
27033
28063
|
mode: "server"
|
|
27034
28064
|
},
|
|
28065
|
+
wholeSeriesOfferings: {
|
|
28066
|
+
endpoint: "listPublicWholeSeriesOfferings",
|
|
28067
|
+
params: {
|
|
28068
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
28069
|
+
eventSeriesIds: { $bind: {
|
|
28070
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28071
|
+
transforms: [{ id: "value.csv" }]
|
|
28072
|
+
} },
|
|
28073
|
+
stage: { $bind: {
|
|
28074
|
+
from: "$root.previewStage",
|
|
28075
|
+
fallback: "published"
|
|
28076
|
+
} }
|
|
28077
|
+
},
|
|
28078
|
+
requiredParams: ["eventSeriesIds"],
|
|
28079
|
+
mode: "server"
|
|
28080
|
+
},
|
|
27035
28081
|
sitePasses: {
|
|
27036
28082
|
endpoint: "listPublicPasses",
|
|
27037
28083
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -27046,13 +28092,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
27046
28092
|
};
|
|
27047
28093
|
//#endregion
|
|
27048
28094
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27049
|
-
const
|
|
27050
|
-
siteId: z.string().optional(),
|
|
27051
|
-
apiBaseUrl: z.string().optional(),
|
|
27052
|
-
portalToken: z.string().nullable().optional(),
|
|
28095
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
27053
28096
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27054
|
-
courses: z.array(
|
|
27055
|
-
className: z.string().nullable().optional(),
|
|
28097
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
27056
28098
|
showSessions: z.boolean().optional(),
|
|
27057
28099
|
showPrice: z.boolean().optional(),
|
|
27058
28100
|
showCapacity: z.boolean().optional(),
|
|
@@ -27060,8 +28102,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
27060
28102
|
successMessage: z.string().optional(),
|
|
27061
28103
|
waitlistMessage: z.string().optional(),
|
|
27062
28104
|
membershipMessage: z.string().optional(),
|
|
28105
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28106
|
+
};
|
|
28107
|
+
const courseRegistrationSourceSchema = z.object({
|
|
28108
|
+
siteId: z.string().optional(),
|
|
28109
|
+
apiBaseUrl: z.string().optional(),
|
|
28110
|
+
portalToken: z.string().nullable().optional(),
|
|
28111
|
+
...courseRegistrationHydrationSchemaShape,
|
|
28112
|
+
className: z.string().nullable().optional(),
|
|
27063
28113
|
buttonText: z.string().nullable().optional(),
|
|
27064
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27065
28114
|
stage: previewStageSchema.optional()
|
|
27066
28115
|
});
|
|
27067
28116
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -27070,18 +28119,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
27070
28119
|
className: z.string().nullable(),
|
|
27071
28120
|
summaryButtonText: z.string()
|
|
27072
28121
|
});
|
|
27073
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
27074
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27075
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
27076
|
-
showSessions: z.boolean().optional(),
|
|
27077
|
-
showPrice: z.boolean().optional(),
|
|
27078
|
-
showCapacity: z.boolean().optional(),
|
|
27079
|
-
showVenue: z.boolean().optional(),
|
|
27080
|
-
successMessage: z.string().optional(),
|
|
27081
|
-
waitlistMessage: z.string().optional(),
|
|
27082
|
-
membershipMessage: z.string().optional(),
|
|
27083
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
27084
|
-
});
|
|
28122
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
27085
28123
|
const courseRegistrationRenderSchema = z.object({
|
|
27086
28124
|
display: courseRegistrationDisplaySchema,
|
|
27087
28125
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -27286,7 +28324,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
27286
28324
|
})]
|
|
27287
28325
|
}),
|
|
27288
28326
|
runtime: courseRegistrationBlockRuntime,
|
|
27289
|
-
dataSchemas: { courses:
|
|
28327
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27290
28328
|
dataLoaders: { courses: {
|
|
27291
28329
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27292
28330
|
params: {
|
|
@@ -27357,6 +28395,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27357
28395
|
defaultValue: true,
|
|
27358
28396
|
ui: { intent: "display" }
|
|
27359
28397
|
},
|
|
28398
|
+
{
|
|
28399
|
+
id: "showTitle",
|
|
28400
|
+
type: "boolean",
|
|
28401
|
+
label: "Show event title",
|
|
28402
|
+
required: false,
|
|
28403
|
+
defaultValue: false,
|
|
28404
|
+
ui: { intent: "display" }
|
|
28405
|
+
},
|
|
28406
|
+
{
|
|
28407
|
+
id: "showDescription",
|
|
28408
|
+
type: "boolean",
|
|
28409
|
+
label: "Show event description",
|
|
28410
|
+
required: false,
|
|
28411
|
+
defaultValue: false,
|
|
28412
|
+
ui: { intent: "display" }
|
|
28413
|
+
},
|
|
27360
28414
|
{
|
|
27361
28415
|
id: "showMap",
|
|
27362
28416
|
type: "boolean",
|
|
@@ -27393,10 +28447,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27393
28447
|
{
|
|
27394
28448
|
value: "10",
|
|
27395
28449
|
label: "10 dates"
|
|
28450
|
+
},
|
|
28451
|
+
{
|
|
28452
|
+
value: "all",
|
|
28453
|
+
label: "All dates"
|
|
27396
28454
|
}
|
|
27397
28455
|
],
|
|
27398
28456
|
ui: { intent: "display" }
|
|
27399
28457
|
},
|
|
28458
|
+
{
|
|
28459
|
+
id: "showCapacity",
|
|
28460
|
+
type: "boolean",
|
|
28461
|
+
label: "Show capacity",
|
|
28462
|
+
required: false,
|
|
28463
|
+
defaultValue: false,
|
|
28464
|
+
ui: { intent: "display" }
|
|
28465
|
+
},
|
|
27400
28466
|
{
|
|
27401
28467
|
id: "showCost",
|
|
27402
28468
|
type: "boolean",
|
|
@@ -27439,6 +28505,8 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27439
28505
|
} },
|
|
27440
28506
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
27441
28507
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28508
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
28509
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
27442
28510
|
showMap: { $bind: { from: "content.showMap" } },
|
|
27443
28511
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
27444
28512
|
otherDatesLimit: { $bind: {
|
|
@@ -27449,6 +28517,10 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27449
28517
|
from: "content.showCost",
|
|
27450
28518
|
fallback: true
|
|
27451
28519
|
} },
|
|
28520
|
+
showCapacity: { $bind: {
|
|
28521
|
+
from: "content.showCapacity",
|
|
28522
|
+
fallback: false
|
|
28523
|
+
} },
|
|
27452
28524
|
showAcceptedPasses: { $bind: {
|
|
27453
28525
|
from: "content.showAcceptedPasses",
|
|
27454
28526
|
fallback: true
|
|
@@ -27503,6 +28575,11 @@ const eventDetailsBlockDefinition = {
|
|
|
27503
28575
|
limit: "100",
|
|
27504
28576
|
readProfile: "details",
|
|
27505
28577
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28578
|
+
seriesIds: { $bind: {
|
|
28579
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28580
|
+
transforms: [{ id: "value.csv" }]
|
|
28581
|
+
} },
|
|
28582
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27506
28583
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27507
28584
|
},
|
|
27508
28585
|
mode: "server"
|
|
@@ -27688,7 +28765,7 @@ const courseDetailsBlockDefinition = {
|
|
|
27688
28765
|
})], { gap: "lg" })
|
|
27689
28766
|
})]
|
|
27690
28767
|
}),
|
|
27691
|
-
dataSchemas: { courses:
|
|
28768
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27692
28769
|
dataLoaders: { courses: {
|
|
27693
28770
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27694
28771
|
params: {
|
|
@@ -27807,8 +28884,8 @@ const eventSpotlightBlockDefinition = {
|
|
|
27807
28884
|
from: "content.columns",
|
|
27808
28885
|
fallback: "3"
|
|
27809
28886
|
} },
|
|
27810
|
-
|
|
27811
|
-
from: "content.
|
|
28887
|
+
cardRole: { $bind: {
|
|
28888
|
+
from: "content._cardStyles.role",
|
|
27812
28889
|
fallback: "default"
|
|
27813
28890
|
} },
|
|
27814
28891
|
buttonVariant: { $bind: {
|
|
@@ -27970,6 +29047,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
27970
29047
|
showVenue: z.boolean().nullable().optional(),
|
|
27971
29048
|
showMap: z.boolean().nullable().optional(),
|
|
27972
29049
|
showCapacity: z.boolean().nullable().optional(),
|
|
29050
|
+
cardRole: cardRoleSchema.optional(),
|
|
27973
29051
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
27974
29052
|
buttonText: z.string().optional(),
|
|
27975
29053
|
emptyMessage: z.string().optional(),
|
|
@@ -27997,6 +29075,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
27997
29075
|
showVenue: z.boolean(),
|
|
27998
29076
|
showMap: z.boolean(),
|
|
27999
29077
|
showCapacity: z.boolean(),
|
|
29078
|
+
cardRole: cardRoleSchema,
|
|
28000
29079
|
buttonVariant: eventButtonVariantSchema,
|
|
28001
29080
|
buttonText: z.string(),
|
|
28002
29081
|
emptyMessage: z.string()
|
|
@@ -28046,6 +29125,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
28046
29125
|
showVenue: source.showVenue ?? true,
|
|
28047
29126
|
showMap: source.showMap ?? true,
|
|
28048
29127
|
showCapacity: source.showCapacity ?? true,
|
|
29128
|
+
cardRole: source.cardRole ?? "default",
|
|
28049
29129
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28050
29130
|
buttonText: source.buttonText ?? "Book",
|
|
28051
29131
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -28063,8 +29143,6 @@ function buildEventCollectionHydration(source) {
|
|
|
28063
29143
|
}
|
|
28064
29144
|
//#endregion
|
|
28065
29145
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
28066
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
28067
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
28068
29146
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
28069
29147
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
28070
29148
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -28079,7 +29157,7 @@ const eventListingSourceSchema = z.object({
|
|
|
28079
29157
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
28080
29158
|
seeAllUrl: z.string().optional(),
|
|
28081
29159
|
loadMoreText: z.string().optional(),
|
|
28082
|
-
|
|
29160
|
+
cardRole: cardRoleSchema.optional(),
|
|
28083
29161
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
28084
29162
|
buttonText: z.string().optional(),
|
|
28085
29163
|
showVenue: z.boolean().optional(),
|
|
@@ -28101,7 +29179,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
28101
29179
|
emptyMessage: z.string(),
|
|
28102
29180
|
loadingMessage: z.string(),
|
|
28103
29181
|
containerClass: z.string(),
|
|
28104
|
-
|
|
29182
|
+
cardRole: cardRoleSchema,
|
|
28105
29183
|
buttonVariant: eventButtonVariantSchema,
|
|
28106
29184
|
buttonText: z.string(),
|
|
28107
29185
|
showVenue: z.boolean(),
|
|
@@ -28157,7 +29235,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
28157
29235
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
28158
29236
|
loadingMessage: "Loading events…",
|
|
28159
29237
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
28160
|
-
|
|
29238
|
+
cardRole: source.cardRole ?? "default",
|
|
28161
29239
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28162
29240
|
buttonText: source.buttonText ?? "Book",
|
|
28163
29241
|
showVenue: source.showVenue ?? true,
|
|
@@ -28479,8 +29557,8 @@ const eventListingBlockDefinition = {
|
|
|
28479
29557
|
from: "content.loadMoreText",
|
|
28480
29558
|
fallback: "Load more events"
|
|
28481
29559
|
} },
|
|
28482
|
-
|
|
28483
|
-
from: "content.
|
|
29560
|
+
cardRole: { $bind: {
|
|
29561
|
+
from: "content._cardStyles.role",
|
|
28484
29562
|
fallback: "default"
|
|
28485
29563
|
} },
|
|
28486
29564
|
buttonVariant: { $bind: {
|
|
@@ -28750,6 +29828,10 @@ const eventCalendarLayout = [styledSection({
|
|
|
28750
29828
|
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
28751
29829
|
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
28752
29830
|
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
29831
|
+
cardRole: { $bind: {
|
|
29832
|
+
from: "content._cardStyles.role",
|
|
29833
|
+
fallback: "default"
|
|
29834
|
+
} },
|
|
28753
29835
|
buttonVariant: { $bind: {
|
|
28754
29836
|
from: "content.buttonVariant",
|
|
28755
29837
|
fallback: "primary"
|
|
@@ -29382,11 +30464,11 @@ const eventCalendarAdditionalFields = [
|
|
|
29382
30464
|
searchThreshold: 8
|
|
29383
30465
|
}
|
|
29384
30466
|
}),
|
|
29385
|
-
...cardStylingFields.
|
|
30467
|
+
...cardStylingFields.map((field) => ({
|
|
29386
30468
|
...field,
|
|
29387
30469
|
ui: {
|
|
29388
30470
|
...field.ui ?? {},
|
|
29389
|
-
intent: field.id === "buttonVariant" ? "style" : "content"
|
|
30471
|
+
intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
|
|
29390
30472
|
}
|
|
29391
30473
|
})),
|
|
29392
30474
|
{
|
|
@@ -30083,7 +31165,7 @@ const publicRouteCandidatesSchema = z.object({ routes: z.array(z.object({
|
|
|
30083
31165
|
entityId: z.string(),
|
|
30084
31166
|
path: z.string(),
|
|
30085
31167
|
title: z.string(),
|
|
30086
|
-
kind: z.enum(
|
|
31168
|
+
kind: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
30087
31169
|
contentTypeKey: z.string().nullable().optional()
|
|
30088
31170
|
})) });
|
|
30089
31171
|
const groupOverrideFields = [
|
|
@@ -30377,7 +31459,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
30377
31459
|
dataSchemas: {
|
|
30378
31460
|
...offeringsPreviewEventDataSchemas,
|
|
30379
31461
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
30380
|
-
courses:
|
|
31462
|
+
courses: publicWholeSeriesOfferingsArraySchema.optional()
|
|
30381
31463
|
},
|
|
30382
31464
|
dataLoaders: {
|
|
30383
31465
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31849,7 +32931,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
31849
32931
|
}
|
|
31850
32932
|
],
|
|
31851
32933
|
layout: styledSection({
|
|
31852
|
-
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: "
|
|
32934
|
+
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: boxStyleClassNames({ role: "default" }, {}) }, [media({
|
|
31853
32935
|
className: "card-media rb-aspect-video rb-w-full rb-object-cover",
|
|
31854
32936
|
size: {
|
|
31855
32937
|
width: 960,
|
|
@@ -34901,16 +35983,27 @@ function eventListCapable() {
|
|
|
34901
35983
|
looks: "supported",
|
|
34902
35984
|
sectionSurfaces: "supported",
|
|
34903
35985
|
contentFrames: ["plain", "panel"],
|
|
34904
|
-
cardRoles: "
|
|
35986
|
+
cardRoles: "supported",
|
|
34905
35987
|
eventListTreatments
|
|
34906
35988
|
});
|
|
34907
35989
|
}
|
|
35990
|
+
function eventSpotlightCapable() {
|
|
35991
|
+
return declareBlockDesignCapability({
|
|
35992
|
+
sectionSurfaces: "supported",
|
|
35993
|
+
contentFrames: ["plain"],
|
|
35994
|
+
cardRoles: "supported"
|
|
35995
|
+
});
|
|
35996
|
+
}
|
|
34908
35997
|
function offeringsPreviewCapable() {
|
|
34909
35998
|
return declareBlockDesignCapability({
|
|
34910
35999
|
looks: "supported",
|
|
34911
36000
|
sectionSurfaces: "supported",
|
|
34912
36001
|
contentFrames: ["plain"],
|
|
34913
|
-
cardRoles: "supported"
|
|
36002
|
+
cardRoles: "supported",
|
|
36003
|
+
compositions: {
|
|
36004
|
+
kind: "offerings-preview",
|
|
36005
|
+
treatments: offeringsPreviewCompositionTreatmentValues
|
|
36006
|
+
}
|
|
34914
36007
|
});
|
|
34915
36008
|
}
|
|
34916
36009
|
function defaultBoundaryBias(visualWeight) {
|
|
@@ -35203,7 +36296,7 @@ const systemBlockDefinitions = [
|
|
|
35203
36296
|
cardRoles: "supported",
|
|
35204
36297
|
compositions: {
|
|
35205
36298
|
kind: "testimonials",
|
|
35206
|
-
treatments:
|
|
36299
|
+
treatments: testimonialsCompositionTreatmentValues
|
|
35207
36300
|
},
|
|
35208
36301
|
headingDecorationCapability: {
|
|
35209
36302
|
kind: "supported",
|
|
@@ -35358,7 +36451,7 @@ const systemBlockDefinitions = [
|
|
|
35358
36451
|
weight: "standard"
|
|
35359
36452
|
})]
|
|
35360
36453
|
})),
|
|
35361
|
-
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition,
|
|
36454
|
+
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
35362
36455
|
flow: offeringsFlow,
|
|
35363
36456
|
layoutProfiles: [layoutProfile({
|
|
35364
36457
|
variantKey: "default",
|
|
@@ -37054,184 +38147,29 @@ const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ..
|
|
|
37054
38147
|
[...EVENT_ATTENDEE_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
37055
38148
|
[...STANDARD_LINE_ITEM_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
37056
38149
|
//#endregion
|
|
37057
|
-
//#region ../api/src/
|
|
37058
|
-
|
|
37059
|
-
|
|
37060
|
-
|
|
37061
|
-
|
|
37062
|
-
|
|
37063
|
-
|
|
37064
|
-
|
|
37065
|
-
|
|
37066
|
-
|
|
37067
|
-
|
|
37068
|
-
|
|
37069
|
-
|
|
37070
|
-
|
|
37071
|
-
|
|
37072
|
-
|
|
37073
|
-
|
|
37074
|
-
|
|
37075
|
-
|
|
37076
|
-
|
|
37077
|
-
|
|
37078
|
-
|
|
37079
|
-
//#region ../api/src/bookingVerticalCatalog.ts
|
|
37080
|
-
const VERTICAL_BOOKING_PRESETS = [
|
|
37081
|
-
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
37082
|
-
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
37083
|
-
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
37084
|
-
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
37085
|
-
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
37086
|
-
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
37087
|
-
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
37088
|
-
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
37089
|
-
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
37090
|
-
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
37091
|
-
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
37092
|
-
verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
37093
|
-
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
37094
|
-
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37095
|
-
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
37096
|
-
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
37097
|
-
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
37098
|
-
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
37099
|
-
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
37100
|
-
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
37101
|
-
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
37102
|
-
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
37103
|
-
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
37104
|
-
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
37105
|
-
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
37106
|
-
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
37107
|
-
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
37108
|
-
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
37109
|
-
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
37110
|
-
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
37111
|
-
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
37112
|
-
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
37113
|
-
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
37114
|
-
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
37115
|
-
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
37116
|
-
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
37117
|
-
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
37118
|
-
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
37119
|
-
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
37120
|
-
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
37121
|
-
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
37122
|
-
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
37123
|
-
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
37124
|
-
verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
37125
|
-
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37126
|
-
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
37127
|
-
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
37128
|
-
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
37129
|
-
verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
37130
|
-
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
37131
|
-
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
37132
|
-
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
37133
|
-
verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
37134
|
-
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37135
|
-
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
37136
|
-
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
37137
|
-
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
37138
|
-
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
37139
|
-
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
37140
|
-
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
37141
|
-
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
37142
|
-
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
37143
|
-
];
|
|
37144
|
-
const VERTICAL_ID_SET = /* @__PURE__ */ new Set([
|
|
37145
|
-
"yoga_wellness",
|
|
37146
|
-
"fitness_pt",
|
|
37147
|
-
"dance_school",
|
|
37148
|
-
"physiotherapy_physical_health",
|
|
37149
|
-
"massage_bodywork",
|
|
37150
|
-
"therapist_practitioner",
|
|
37151
|
-
"beauty_spa",
|
|
37152
|
-
"consultant_coach",
|
|
37153
|
-
"training_provider",
|
|
37154
|
-
"retreat_centre",
|
|
37155
|
-
"music_school",
|
|
37156
|
-
"voice_singing",
|
|
37157
|
-
"performing_arts_school",
|
|
37158
|
-
"community_wellbeing",
|
|
37159
|
-
"venue_event_space"
|
|
37160
|
-
]);
|
|
37161
|
-
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
37162
|
-
function parseVerticalId(value) {
|
|
37163
|
-
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
37164
|
-
}
|
|
37165
|
-
function parseVerticalPresetId(value) {
|
|
37166
|
-
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
37167
|
-
}
|
|
37168
|
-
function getVerticalPresetDefinition(presetId) {
|
|
37169
|
-
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
37170
|
-
if (!definition) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
37171
|
-
return definition;
|
|
37172
|
-
}
|
|
37173
|
-
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
37174
|
-
const firstPresetId = presetIds[0];
|
|
37175
|
-
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
37176
|
-
}
|
|
37177
|
-
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
37178
|
-
return {
|
|
37179
|
-
verticalId,
|
|
37180
|
-
selectedPresetIds
|
|
37181
|
-
};
|
|
37182
|
-
}
|
|
37183
|
-
function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
37184
|
-
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
37185
|
-
return nonEmptyPresetIds ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
37186
|
-
}
|
|
37187
|
-
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
37188
|
-
if (!rawConfig) return {
|
|
37189
|
-
kind: "unconfigured",
|
|
37190
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
37191
|
-
};
|
|
37192
|
-
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
37193
|
-
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
37194
|
-
const config = {
|
|
37195
|
-
verticalId,
|
|
37196
|
-
selectedPresetIds
|
|
37197
|
-
};
|
|
37198
|
-
if (!verticalId && selectedPresetIds.length === 0) return {
|
|
37199
|
-
kind: "unconfigured",
|
|
37200
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
37201
|
-
};
|
|
37202
|
-
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
37203
|
-
if (issues.length > 0) return {
|
|
37204
|
-
kind: "invalid",
|
|
37205
|
-
config,
|
|
37206
|
-
issues
|
|
37207
|
-
};
|
|
37208
|
-
const configuredConfig = verticalId ? createSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
|
|
37209
|
-
if (!configuredConfig) return {
|
|
37210
|
-
kind: "invalid",
|
|
37211
|
-
config,
|
|
37212
|
-
issues: ["empty_selected_presets"]
|
|
37213
|
-
};
|
|
37214
|
-
return {
|
|
37215
|
-
kind: "configured",
|
|
37216
|
-
config: configuredConfig,
|
|
37217
|
-
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
37218
|
-
};
|
|
37219
|
-
}
|
|
37220
|
-
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
37221
|
-
const issues = /* @__PURE__ */ new Set();
|
|
37222
|
-
if (rawConfig.verticalId != null && !config.verticalId) issues.add("unknown_vertical");
|
|
37223
|
-
if (!config.verticalId && config.selectedPresetIds.length > 0) issues.add("missing_vertical");
|
|
37224
|
-
if ((Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).some((presetId) => parseVerticalPresetId(presetId) === null)) issues.add("unknown_preset");
|
|
37225
|
-
if (config.verticalId && config.selectedPresetIds.length === 0) issues.add("empty_selected_presets");
|
|
37226
|
-
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
37227
|
-
for (const presetId of config.selectedPresetIds) {
|
|
37228
|
-
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
37229
|
-
if (config.verticalId && presetDefinition.verticalId !== config.verticalId) issues.add("preset_vertical_mismatch");
|
|
37230
|
-
if (presetDefinition.availability === "future") issues.add("future_preset_selected");
|
|
37231
|
-
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues.add("duplicate_canonical_behaviour");
|
|
37232
|
-
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
38150
|
+
//#region ../api/src/bookingVerticals.ts
|
|
38151
|
+
/**
|
|
38152
|
+
* Transport adapters for the booking-vertical domain.
|
|
38153
|
+
*
|
|
38154
|
+
* The domain catalog and all pure resolution/selection rules live in core;
|
|
38155
|
+
* this module owns only the Zod boundary used by API payloads.
|
|
38156
|
+
*/
|
|
38157
|
+
function formatRawDiagnosticValue(value) {
|
|
38158
|
+
const serialized = JSON.stringify(value);
|
|
38159
|
+
return serialized === void 0 ? String(value) : serialized;
|
|
38160
|
+
}
|
|
38161
|
+
function describeSiteVerticalConfigIssue(issue) {
|
|
38162
|
+
switch (issue.code) {
|
|
38163
|
+
case "unknown_vertical": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
38164
|
+
case "unknown_preset": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
38165
|
+
case "missing_vertical":
|
|
38166
|
+
case "empty_selected_presets":
|
|
38167
|
+
case "preset_vertical_mismatch":
|
|
38168
|
+
case "duplicate_preset_id":
|
|
38169
|
+
case "duplicate_canonical_behaviour":
|
|
38170
|
+
case "future_preset_selected": return issue.code;
|
|
38171
|
+
default: return assertNever$2(issue);
|
|
37233
38172
|
}
|
|
37234
|
-
return [...issues];
|
|
37235
38173
|
}
|
|
37236
38174
|
const VerticalIdSchema = z.string().trim().transform((value, ctx) => {
|
|
37237
38175
|
const parsed = parseVerticalId(value);
|
|
@@ -37263,16 +38201,12 @@ z.object({
|
|
|
37263
38201
|
if (resolved.kind === "invalid") {
|
|
37264
38202
|
ctx.addIssue({
|
|
37265
38203
|
code: z.ZodIssueCode.custom,
|
|
37266
|
-
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
38204
|
+
message: `Invalid booking vertical config: ${resolved.issues.map(describeSiteVerticalConfigIssue).join(", ")}`
|
|
37267
38205
|
});
|
|
37268
38206
|
return z.NEVER;
|
|
37269
38207
|
}
|
|
37270
38208
|
return resolved.config;
|
|
37271
38209
|
});
|
|
37272
|
-
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
37273
|
-
verticalId: null,
|
|
37274
|
-
selectedPresetIds: []
|
|
37275
|
-
};
|
|
37276
38210
|
//#endregion
|
|
37277
38211
|
//#region ../api/src/utils/isRecord.ts
|
|
37278
38212
|
function isRecord$1(value) {
|