@riverbankcms/sdk 0.130.2 → 0.134.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -3
- package/dist/{PreviewEditorSidebar-BY-1QdE2.mjs → PreviewEditorSidebar-DfRhJPFQ.mjs} +351 -95
- package/dist/{PreviewEditorUI-BS34jI9_.mjs → PreviewEditorUI-Dppxcr_g.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BD0kOjtI.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-B1pWnhu-.mjs → SdkPreviewModeRuntime-8CyGCXir.mjs} +91 -21
- package/dist/{SiteChromeCustomizeContext-BhUG_72i.mjs → SiteChromeCustomizeContext-DVMTMvqA.mjs} +6896 -4335
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1105 -533
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +363 -276
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +13 -9
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +8 -19
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +31 -2
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -14
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/bookings.d.ts +2 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +45 -12
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -2
- package/dist/_dts/api/src/courseEndpointDefinitions.d.ts +2 -2
- package/dist/_dts/api/src/courses.d.ts +1 -19
- package/dist/_dts/api/src/endpoints.d.ts +469 -349
- package/dist/_dts/api/src/event-destination-policy.d.ts +1 -1
- package/dist/_dts/api/src/eventManagementContracts.d.ts +91 -1
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +32 -0
- package/dist/_dts/api/src/giftingDashboard.d.ts +117 -0
- package/dist/_dts/api/src/giftingEndpointDefinitions.d.ts +124 -0
- package/dist/_dts/api/src/index.d.ts +4 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/media.d.ts +1 -0
- package/dist/_dts/api/src/navigation/contracts.d.ts +9 -6
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +3 -4
- package/dist/_dts/api/src/navigation/linkResolver.d.ts +6 -2
- package/dist/_dts/api/src/navigation/types.d.ts +23 -6
- package/dist/_dts/api/src/navigation.d.ts +1 -1
- package/dist/_dts/api/src/publicBookingService.d.ts +15 -0
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +28 -13
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +3 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -3
- package/dist/_dts/api/src/sdkBookingVerticalContracts.d.ts +29 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +9 -32
- package/dist/_dts/api/src/sdkEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +25 -0
- package/dist/_dts/api/src/sdkThemeCatalogContracts.d.ts +20 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +64 -54
- package/dist/_dts/api/src/siteBanner.d.ts +4 -2
- package/dist/_dts/api/src/siteOnboarding.d.ts +3 -3
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +4 -10
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +0 -3
- package/dist/_dts/api/src/types.d.ts +2 -3
- package/dist/_dts/api/src/webhooks.d.ts +12 -12
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -13
- package/dist/_dts/blocks/src/client.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +9 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +54 -116
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- package/dist/_dts/blocks/src/primitives/content/components/RichText.d.ts +2 -2
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +1 -0
- package/dist/_dts/blocks/src/subroutes/fold.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/index.d.ts +0 -3
- package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +2 -50
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +1 -929
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -97
- package/dist/_dts/blocks/src/system/blocks/event-details.d.ts +39 -6
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -3
- package/dist/_dts/blocks/src/system/blocks/events/shared/filtering.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -20
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +5 -9
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/index.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/pricing.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +135 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +84 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +148 -148
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/shared/bookingConsent.d.ts +36 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +7 -8
- package/dist/_dts/blocks/src/system/manifest/hydrateLinks.d.ts +9 -2
- package/dist/_dts/blocks/src/system/manifest/resolveBlockData.d.ts +8 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +79 -79
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -11
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/blockComposition.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/DynamicFormFields.d.ts +3 -19
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +45 -72
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +22 -37
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useSelectedAppointmentConsentForm.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.consent.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.field-values.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.fields.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +38 -144
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -19
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-page-surface-scope.d.ts +2 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.client.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +19 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +25 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +75 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/view.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +21 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/siteCreditPreview.d.ts +51 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +6 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/validation.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/BookingModeStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/CheckIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/ErrorStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/MembershipHero.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PaymentFailedStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/StepIndicator.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/VerifyingTimeoutStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationActiveSteps.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/CourseRegistrationErrorBoundary.d.ts → event-registration/whole-series/WholeSeriesRegistrationErrorBoundary.d.ts} +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationTerminalContent.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +46 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/index.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/presentation.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/pricing.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/types.d.ts +18 -16
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseEligibility.d.ts → event-registration/whole-series/useWholeSeriesEligibility.d.ts} +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesPaymentVerification.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationActions.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseRegistrationPortal.d.ts → event-registration/whole-series/useWholeSeriesRegistrationPortal.d.ts} +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationSelection.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationWizard.d.ts +185 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseWaitlistSelection.d.ts → event-registration/whole-series/useWholeSeriesWaitlistSelection.d.ts} +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/utils.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.contract.d.ts +7 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesPageSurfaceScope.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/courseRegistrationViewState.d.ts → event-registration/whole-series/wholeSeriesRegistrationViewState.d.ts} +7 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/wizardSteps.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -54
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +12 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.server.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventSpotlight.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalCloseButton.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +51 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingConsentAgreement.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +12 -12
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/boxStyleClassNames.d.ts +30 -11
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +15 -4
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -4
- package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +13 -0
- package/dist/_dts/commerce/src/purchase/cancellationPolicy.d.ts +7 -0
- package/dist/_dts/commerce/src/purchase/canonicalRefundPlanner.d.ts +48 -0
- package/dist/_dts/commerce/src/purchase/checkoutCollectionPlan.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/checkoutDiscountContextPlanning.d.ts +80 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/checkoutOrderItemProjection.d.ts +22 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentFlow.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +30 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +53 -0
- package/dist/_dts/commerce/src/purchase/checkoutQuantity.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +76 -0
- package/dist/_dts/commerce/src/purchase/checkoutSettlement.d.ts +46 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +125 -0
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +91 -0
- package/dist/_dts/commerce/src/purchase/discountApplication.d.ts +74 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/order-number.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/orderCancellationPlan.d.ts +19 -0
- package/dist/_dts/commerce/src/purchase/orderCompletionEmailPlan.d.ts +71 -0
- package/dist/_dts/commerce/src/purchase/orderConfirmationPlanning.d.ts +120 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentPlan.d.ts +81 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentResult.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/orderHistoryLedgerFilters.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/orderHistorySource.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentAdminSettlement.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +29 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +44 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +24 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +151 -0
- package/dist/_dts/commerce/src/purchase/orderItemSupport.d.ts +14 -0
- package/dist/_dts/commerce/src/purchase/orderListFilters.d.ts +3 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentLinkPlanning.d.ts +60 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentReceipt.d.ts +184 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentState.d.ts +135 -0
- package/dist/_dts/commerce/src/purchase/orderPlanningTypes.d.ts +102 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPlanning.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPolicy.d.ts +36 -0
- package/dist/_dts/commerce/src/purchase/orderTotals.d.ts +23 -0
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/pendingCheckoutSessionClaim.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/persistedCheckoutLines.d.ts +27 -0
- package/dist/_dts/commerce/src/purchase/protectedDepositRefundPolicy.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/refundPolicy.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/result.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +97 -0
- package/dist/_dts/commerce/src/purchase/shopRefundPlanning.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +31 -0
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +168 -0
- package/dist/_dts/commerce/src/shop/shipmentEligibility.d.ts +14 -0
- package/dist/_dts/commerce/src/utils/assertNever.d.ts +1 -0
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -0
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +4 -4
- package/dist/_dts/core/src/booking-consent.d.ts +8 -0
- package/dist/_dts/core/src/booking-vertical-catalog.d.ts +741 -0
- package/dist/_dts/core/src/booking-vertical-config.d.ts +66 -0
- package/dist/_dts/core/src/booking-vertical-definitions.d.ts +68 -0
- package/dist/_dts/{api/src/bookingVerticalPreset.d.ts → core/src/booking-vertical-preset.d.ts} +1 -1
- package/dist/_dts/core/src/booking-verticals.d.ts +98 -0
- package/dist/_dts/core/src/event-page-selection.d.ts +22 -0
- package/dist/_dts/core/src/event-pricing.d.ts +5 -0
- package/dist/_dts/core/src/event-series-behaviour.d.ts +16 -0
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -3
- package/dist/_dts/db/src/schemas/forms.d.ts +25 -25
- package/dist/_dts/db/src/types/jsonb.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/linkPopoverUtils.d.ts +3 -2
- package/dist/_dts/editor/src/primitives/rich-text/useRichTextEditor.d.ts +3 -4
- package/dist/_dts/media-core/src/fileUploadCompletion.d.ts +3 -0
- package/dist/_dts/media-core/src/fileUploadDurableFinalization.d.ts +2 -0
- package/dist/_dts/media-core/src/identifiers.d.ts +10 -0
- package/dist/_dts/media-core/src/mediaWriteNormalizer.d.ts +2 -6
- package/dist/_dts/media-core/src/types.d.ts +2 -1
- package/dist/_dts/media-core/src/usageScanner.d.ts +1 -1
- package/dist/_dts/media-editor/src/index.d.ts +2 -2
- package/dist/_dts/media-editor/src/mediaSelection.d.ts +1 -22
- package/dist/_dts/media-editor/src/useMediaSelection.d.ts +0 -9
- package/dist/_dts/preview-next/src/client/preview/ButtonHoverRoleControls.d.ts +10 -0
- package/dist/_dts/preview-next/src/client/preview/ButtonStylePicker.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfiguratorWarningNotice.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -1
- package/dist/_dts/sdk/src/bookings/types.d.ts +7 -89
- package/dist/_dts/sdk/src/client/eventSubrouteReadOperations.d.ts +11 -0
- package/dist/_dts/sdk/src/client/types.d.ts +12 -5
- package/dist/_dts/sdk/src/components.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +30 -30
- package/dist/_dts/sdk/src/contracts/content.d.ts +10 -36
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -13
- package/dist/_dts/sdk/src/contracts/rendering.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -16
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +9 -9
- package/dist/_dts/sdk/src/next/pageMetadataProjection.d.ts +7 -0
- package/dist/_dts/sdk/src/next/resolveEventPageSubroute.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -38
- package/dist/_dts/sdk/src/public-api/eventSubrouteContracts.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +44 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/entrySubroutes.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/resolveOccurrence.d.ts +4 -3
- package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +7 -3
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/contextualHover.d.ts +41 -0
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +3 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonHoverTreatment.d.ts +14 -0
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +21 -4
- package/dist/_dts/theme-core/src/buttons/styles/recipes/flatInk.d.ts +92 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +10 -150
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +57 -102
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +50 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +41 -12
- package/dist/_dts/theme-core/src/cards/types.d.ts +7 -29
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +90 -75
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +98 -110
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/buttonSelectionCompiler.d.ts +18 -0
- package/dist/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +2 -11
- package/dist/_dts/theme-core/src/site-styles/selectionFallbackWarning.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +13 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -0
- package/dist/client/{StepIndicator-CLjQhkDb.mjs → BookingConsentAgreement-BxgpGEFD.mjs} +26 -4
- package/dist/client/{DiscountCodeDisclosure-BPZ-yfGI.mjs → DiscountCodeDisclosure-CfuPOHD0.mjs} +12 -12
- package/dist/client/{EventCombined.client-Cjt3kKYR.mjs → EventCombined.client-DB8Qfzi-.mjs} +37 -49
- package/dist/client/{EventListing.client-DY9dn6Fh.mjs → EventListing.client-DD4X8hp4.mjs} +2 -2
- package/dist/client/{LeafletStaticMap--2c61XYn.mjs → LeafletStaticMap-QhgIBQbv.mjs} +1 -1
- package/dist/client/{CourseRegistrationWizard-DGW9F0SQ.mjs → WholeSeriesRegistrationWizard-DwtC7bCs.mjs} +1460 -1247
- package/dist/client/{accordion-_boYwHHi.mjs → accordion-DFXpLvwg.mjs} +1 -1
- package/dist/client/{bookingForm--AqEfyBX.mjs → bookingForm-sI05d3lk.mjs} +73 -47
- package/dist/client/bookings.mjs +1719 -706
- package/dist/client/{carousel-CVI2dqZr.mjs → carousel-wjyWTZCh.mjs} +1 -1
- package/dist/client/{cart-DR6IiPz9.mjs → cart-DCwdpA4i.mjs} +3 -3
- package/dist/client/{checkout-CsrGAfQt.mjs → checkout-DTDW3l0R.mjs} +3 -3
- package/dist/client/checkoutUrls-DQYC_Br-.mjs +187 -0
- package/dist/client/client.mjs +6830 -3672
- package/dist/client/{context-B83PiNzm.mjs → context-TSK1CGx8.mjs} +1 -14
- package/dist/client/{courseRegistration-aNJVaLa3.mjs → courseRegistration-A-Tg7qw_.mjs} +11 -5
- package/dist/client/{eventCalendar-OZ7h59VN.mjs → eventCalendar-B0Zg-i_w.mjs} +41 -44
- package/dist/client/{eventCombined-BbJ6bFKz.mjs → eventCombined-B8Y2wizd.mjs} +3 -3
- package/dist/client/{eventDetails-BLyUBiCT.mjs → eventDetails-DPDOwURJ.mjs} +276 -94
- package/dist/client/{eventListing-DuP1yhBS.mjs → eventListing-CjBcmSLn.mjs} +3 -3
- package/dist/client/{eventRegistration-BXyECPa-.mjs → eventRegistration-CK30HsAq.mjs} +730 -190
- package/dist/client/{form-BA4t3kKU.mjs → form-CUXfsABE.mjs} +2 -2
- package/dist/client/{headerSection-CpNaJxhW.mjs → headerSection-N-mN3rjr.mjs} +2 -2
- package/dist/client/hooks.mjs +1418 -484
- package/dist/client/{locationMap-3HGMCL7_.mjs → locationMap-oiIDQMBt.mjs} +2 -2
- package/dist/client/{newsletterForm-C2s6Mw67.mjs → newsletterForm-CkQ2tTrM.mjs} +2 -2
- package/dist/client/pricing-Caa0QWzh.mjs +195 -0
- package/dist/client/{productDetail-C9joWhdE.mjs → productDetail-CnidyrsN.mjs} +3 -3
- package/dist/client/{productList-CjzdU3pB.mjs → productList-CttYcS_S.mjs} +3 -3
- package/dist/client/{propsDecoder-CBPGXEYX.mjs → propsDecoder-CeUMxI9a.mjs} +677 -350
- package/dist/client/rendering/client.mjs +6075 -4150
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +7589 -4388
- package/dist/client/{scrollToBlock-DZ73aEX6.mjs → scrollToBlock-lPr1oqxB.mjs} +1 -1
- package/dist/client/{shop-CQRai7hj.mjs → shop-DXQtMo2O.mjs} +6 -6
- package/dist/client/{shop-commerce-hP9UboOx.mjs → shop-commerce-quDL411J.mjs} +7 -164
- package/dist/client/{shop-commerce-store-DiD5a32e.mjs → shop-commerce-store-Dnu-8Iub.mjs} +1 -1
- package/dist/client/{shopShared-DP8DXTkF.mjs → shopShared-BWPUURvG.mjs} +3 -3
- package/dist/client/{useEventFilters-pF_OJNQP.mjs → useEventFilters-DRhWp2_5.mjs} +196 -7
- package/dist/client/{usePolling-Cls91SD2.mjs → usePolling-UN4WKnaM.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +247 -60
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +247 -60
- package/dist/preview-next/middleware.mjs +247 -60
- package/dist/{previewAuthStore-CX1C_KJ4.mjs → previewAuthStore-BFKd4LrN.mjs} +247 -60
- package/dist/{sdk-runtime-5CcPAI14.mjs → sdk-runtime-Ca5RD78X.mjs} +2 -2
- package/dist/{separator-BXlYN_gr.mjs → separator-CMhj6BTi.mjs} +1 -1
- package/dist/server/components.mjs +3578 -1614
- package/dist/server/config-validation.mjs +1418 -485
- package/dist/server/config.mjs +1418 -485
- package/dist/server/data.mjs +1418 -484
- package/dist/server/index.mjs +289 -81
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +3761 -1794
- package/dist/server/page-converter.mjs +911 -261
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3580 -1613
- package/dist/server/rendering.mjs +3578 -1614
- package/dist/server/routing.mjs +1687 -689
- package/dist/server/server.mjs +1458 -563
- package/dist/server/theme-bridge.mjs +1996 -935
- package/dist/server/theme.mjs +346 -133
- package/dist/styles/index.css +1602 -796
- package/package.json +2 -2
- package/dist/_dts/api/src/bookingVerticalCatalog.d.ts +0 -746
- package/dist/_dts/api/src/eventSeriesPresentationPreset.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/CourseRegistrationWizard.d.ts +0 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/StepIndicator.d.ts +0 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +0 -45
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/pricing.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCoursePaymentVerification.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationActions.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationSelection.d.ts +0 -31
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +0 -102
- package/dist/client/checkoutUrls-Ct8Mxna3.mjs +0 -26
- package/dist/client/eventProductEligibility-AVxyCB1u.mjs +0 -50
- package/dist/client/pricing-BiqIMgZk.mjs +0 -174
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PortalAuthSidebar.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/SuccessStep.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/WaitlistStep.d.ts +0 -0
package/dist/server/server.mjs
CHANGED
|
@@ -1383,6 +1383,17 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1383
1383
|
}
|
|
1384
1384
|
});
|
|
1385
1385
|
//#endregion
|
|
1386
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1387
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1388
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1389
|
+
method: "GET",
|
|
1390
|
+
revalidate: 60,
|
|
1391
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1392
|
+
auth: "public",
|
|
1393
|
+
responseKind: "json",
|
|
1394
|
+
errors: []
|
|
1395
|
+
} });
|
|
1396
|
+
//#endregion
|
|
1386
1397
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1387
1398
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1388
1399
|
listSiteApiKeys: {
|
|
@@ -1509,10 +1520,244 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1509
1520
|
"resource:conflict",
|
|
1510
1521
|
"server:internal_error"
|
|
1511
1522
|
]
|
|
1523
|
+
},
|
|
1524
|
+
updateEventIdentity: {
|
|
1525
|
+
path: "/sites/{siteId}/bookings/events/{eventId}",
|
|
1526
|
+
method: "PATCH",
|
|
1527
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1528
|
+
auth: "user",
|
|
1529
|
+
responseKind: "json",
|
|
1530
|
+
errors: [
|
|
1531
|
+
"validation:invalid_input",
|
|
1532
|
+
"resource:not_found",
|
|
1533
|
+
"server:internal_error"
|
|
1534
|
+
]
|
|
1535
|
+
},
|
|
1536
|
+
createWholeSeriesRun: {
|
|
1537
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
1538
|
+
method: "POST",
|
|
1539
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1540
|
+
auth: "user",
|
|
1541
|
+
responseKind: "json",
|
|
1542
|
+
errors: [
|
|
1543
|
+
"validation:invalid_input",
|
|
1544
|
+
"resource:not_found",
|
|
1545
|
+
"resource:already_exists",
|
|
1546
|
+
"server:internal_error"
|
|
1547
|
+
]
|
|
1548
|
+
},
|
|
1549
|
+
updateWholeSeriesRun: {
|
|
1550
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}",
|
|
1551
|
+
method: "PATCH",
|
|
1552
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1553
|
+
auth: "user",
|
|
1554
|
+
responseKind: "json",
|
|
1555
|
+
errors: [
|
|
1556
|
+
"validation:invalid_input",
|
|
1557
|
+
"resource:not_found",
|
|
1558
|
+
"resource:conflict",
|
|
1559
|
+
"server:internal_error"
|
|
1560
|
+
]
|
|
1561
|
+
},
|
|
1562
|
+
cancelWholeSeriesRun: {
|
|
1563
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
1564
|
+
method: "POST",
|
|
1565
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1566
|
+
auth: "user",
|
|
1567
|
+
responseKind: "json",
|
|
1568
|
+
errors: [
|
|
1569
|
+
"validation:invalid_input",
|
|
1570
|
+
"resource:not_found",
|
|
1571
|
+
"resource:conflict",
|
|
1572
|
+
"server:internal_error"
|
|
1573
|
+
]
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
//#endregion
|
|
1577
|
+
//#region ../api/src/giftingEndpointDefinitions.ts
|
|
1578
|
+
/**
|
|
1579
|
+
* Gifting endpoints (gift cards & vouchers) — the dashboard surface that manages
|
|
1580
|
+
* offers, gifts and settings, plus the public buy/claim surface.
|
|
1581
|
+
*/
|
|
1582
|
+
const GIFTING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1583
|
+
createGiftingOffer: {
|
|
1584
|
+
path: "/sites/{siteId}/gifting/offers",
|
|
1585
|
+
method: "POST",
|
|
1586
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1587
|
+
auth: "user",
|
|
1588
|
+
responseKind: "json",
|
|
1589
|
+
errors: [
|
|
1590
|
+
"validation:invalid_input",
|
|
1591
|
+
"auth:forbidden",
|
|
1592
|
+
"server:internal_error"
|
|
1593
|
+
]
|
|
1594
|
+
},
|
|
1595
|
+
updateGiftingOffer: {
|
|
1596
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1597
|
+
method: "PATCH",
|
|
1598
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1599
|
+
auth: "user",
|
|
1600
|
+
responseKind: "json",
|
|
1601
|
+
errors: [
|
|
1602
|
+
"validation:invalid_input",
|
|
1603
|
+
"auth:forbidden",
|
|
1604
|
+
"resource:not_found",
|
|
1605
|
+
"resource:conflict",
|
|
1606
|
+
"server:internal_error"
|
|
1607
|
+
]
|
|
1608
|
+
},
|
|
1609
|
+
deleteGiftingOffer: {
|
|
1610
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1611
|
+
method: "DELETE",
|
|
1612
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1613
|
+
auth: "user",
|
|
1614
|
+
responseKind: "json",
|
|
1615
|
+
errors: [
|
|
1616
|
+
"auth:forbidden",
|
|
1617
|
+
"resource:not_found",
|
|
1618
|
+
"resource:conflict",
|
|
1619
|
+
"server:internal_error"
|
|
1620
|
+
]
|
|
1621
|
+
},
|
|
1622
|
+
duplicateGiftingOffer: {
|
|
1623
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}/duplicate",
|
|
1624
|
+
method: "POST",
|
|
1625
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1626
|
+
auth: "user",
|
|
1627
|
+
responseKind: "json",
|
|
1628
|
+
errors: [
|
|
1629
|
+
"auth:forbidden",
|
|
1630
|
+
"resource:not_found",
|
|
1631
|
+
"server:internal_error"
|
|
1632
|
+
]
|
|
1633
|
+
},
|
|
1634
|
+
reorderGiftingOffers: {
|
|
1635
|
+
path: "/sites/{siteId}/gifting/offers/order",
|
|
1636
|
+
method: "PUT",
|
|
1637
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1638
|
+
auth: "user",
|
|
1639
|
+
responseKind: "json",
|
|
1640
|
+
errors: [
|
|
1641
|
+
"validation:invalid_input",
|
|
1642
|
+
"auth:forbidden",
|
|
1643
|
+
"resource:not_found",
|
|
1644
|
+
"server:internal_error"
|
|
1645
|
+
]
|
|
1646
|
+
},
|
|
1647
|
+
sendGift: {
|
|
1648
|
+
path: "/sites/{siteId}/gifting/gifts",
|
|
1649
|
+
method: "POST",
|
|
1650
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1651
|
+
auth: "user",
|
|
1652
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1653
|
+
responseKind: "json",
|
|
1654
|
+
errors: [
|
|
1655
|
+
"validation:invalid_input",
|
|
1656
|
+
"auth:forbidden",
|
|
1657
|
+
"resource:not_found",
|
|
1658
|
+
"server:internal_error"
|
|
1659
|
+
]
|
|
1660
|
+
},
|
|
1661
|
+
resendGift: {
|
|
1662
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/resend",
|
|
1663
|
+
method: "POST",
|
|
1664
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1665
|
+
auth: "user",
|
|
1666
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1667
|
+
responseKind: "json",
|
|
1668
|
+
errors: [
|
|
1669
|
+
"auth:forbidden",
|
|
1670
|
+
"resource:not_found",
|
|
1671
|
+
"resource:conflict",
|
|
1672
|
+
"server:internal_error"
|
|
1673
|
+
]
|
|
1674
|
+
},
|
|
1675
|
+
correctGiftEmailAndResend: {
|
|
1676
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/correct-email-and-resend",
|
|
1677
|
+
method: "POST",
|
|
1678
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1679
|
+
auth: "user",
|
|
1680
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1681
|
+
responseKind: "json",
|
|
1682
|
+
errors: [
|
|
1683
|
+
"validation:invalid_input",
|
|
1684
|
+
"auth:forbidden",
|
|
1685
|
+
"resource:not_found",
|
|
1686
|
+
"resource:conflict",
|
|
1687
|
+
"server:internal_error"
|
|
1688
|
+
]
|
|
1689
|
+
},
|
|
1690
|
+
updateGiftingSettings: {
|
|
1691
|
+
path: "/sites/{siteId}/gifting/settings",
|
|
1692
|
+
method: "PATCH",
|
|
1693
|
+
tags: [
|
|
1694
|
+
"site-{siteId}",
|
|
1695
|
+
"gifting-offers-{siteId}",
|
|
1696
|
+
"gifting-gifts-{siteId}"
|
|
1697
|
+
],
|
|
1698
|
+
auth: "user",
|
|
1699
|
+
responseKind: "json",
|
|
1700
|
+
errors: [
|
|
1701
|
+
"validation:invalid_input",
|
|
1702
|
+
"auth:forbidden",
|
|
1703
|
+
"server:internal_error"
|
|
1704
|
+
]
|
|
1705
|
+
},
|
|
1706
|
+
listPublicGiftingOffers: {
|
|
1707
|
+
path: "/public/sites/{siteId}/gifting/offers",
|
|
1708
|
+
method: "GET",
|
|
1709
|
+
revalidate: 300,
|
|
1710
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1711
|
+
errors: [],
|
|
1712
|
+
auth: "public",
|
|
1713
|
+
responseKind: "json"
|
|
1714
|
+
},
|
|
1715
|
+
createPublicGiftingCheckout: {
|
|
1716
|
+
path: "/public/sites/{siteId}/gifting/checkout",
|
|
1717
|
+
method: "POST",
|
|
1718
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1719
|
+
errors: [],
|
|
1720
|
+
auth: "public",
|
|
1721
|
+
responseKind: "json"
|
|
1722
|
+
},
|
|
1723
|
+
claimGiftCardPublic: {
|
|
1724
|
+
path: "/public/sites/{siteId}/gifting/claim",
|
|
1725
|
+
method: "POST",
|
|
1726
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1727
|
+
errors: [],
|
|
1728
|
+
auth: "public",
|
|
1729
|
+
responseKind: "json"
|
|
1730
|
+
}
|
|
1731
|
+
});
|
|
1732
|
+
//#endregion
|
|
1733
|
+
//#region ../api/src/sdkEndpointDefinitions.ts
|
|
1734
|
+
/** SDK management endpoints that do not belong to a CRUD resource family. */
|
|
1735
|
+
const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1736
|
+
sdkUpdateSettings: {
|
|
1737
|
+
path: "/sdk/{siteId}/settings",
|
|
1738
|
+
method: "PATCH",
|
|
1739
|
+
auth: "service",
|
|
1740
|
+
responseKind: "json",
|
|
1741
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1742
|
+
},
|
|
1743
|
+
sdkConfigureBookingVertical: {
|
|
1744
|
+
path: "/sdk/{siteId}/settings/booking/vertical",
|
|
1745
|
+
method: "POST",
|
|
1746
|
+
auth: "service",
|
|
1747
|
+
responseKind: "json"
|
|
1748
|
+
},
|
|
1749
|
+
sdkSetupRevalidationWebhook: {
|
|
1750
|
+
path: "/sdk/{siteId}/webhooks/revalidation/setup",
|
|
1751
|
+
method: "POST",
|
|
1752
|
+
auth: "service",
|
|
1753
|
+
responseKind: "json",
|
|
1754
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1512
1755
|
}
|
|
1513
1756
|
});
|
|
1514
1757
|
const API_ENDPOINTS$1 = {
|
|
1515
1758
|
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
1759
|
+
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
1760
|
+
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
1516
1761
|
aiContentUpdateChat: {
|
|
1517
1762
|
path: "/ai/content-update-chat",
|
|
1518
1763
|
method: "POST",
|
|
@@ -3837,14 +4082,6 @@ const API_ENDPOINTS$1 = {
|
|
|
3837
4082
|
auth: "user",
|
|
3838
4083
|
responseKind: "json"
|
|
3839
4084
|
},
|
|
3840
|
-
mediaAssignIdentifier: {
|
|
3841
|
-
path: "/media/{assetId}/identifier",
|
|
3842
|
-
method: "POST",
|
|
3843
|
-
tags: ["media", "media-{assetId}"],
|
|
3844
|
-
errors: ["resource:not_found", "server:internal_error"],
|
|
3845
|
-
auth: "user",
|
|
3846
|
-
responseKind: "json"
|
|
3847
|
-
},
|
|
3848
4085
|
mediaDelete: {
|
|
3849
4086
|
path: "/media/{assetId}",
|
|
3850
4087
|
method: "DELETE",
|
|
@@ -4798,31 +5035,6 @@ const API_ENDPOINTS$1 = {
|
|
|
4798
5035
|
auth: "public",
|
|
4799
5036
|
responseKind: "json"
|
|
4800
5037
|
},
|
|
4801
|
-
listPublicGiftingOffers: {
|
|
4802
|
-
path: "/public/sites/{siteId}/gifting/offers",
|
|
4803
|
-
method: "GET",
|
|
4804
|
-
revalidate: 300,
|
|
4805
|
-
tags: [TAG_TEMPLATES.publicGifting],
|
|
4806
|
-
errors: [],
|
|
4807
|
-
auth: "public",
|
|
4808
|
-
responseKind: "json"
|
|
4809
|
-
},
|
|
4810
|
-
createPublicGiftingCheckout: {
|
|
4811
|
-
path: "/public/sites/{siteId}/gifting/checkout",
|
|
4812
|
-
method: "POST",
|
|
4813
|
-
tags: [TAG_TEMPLATES.publicGifting],
|
|
4814
|
-
errors: [],
|
|
4815
|
-
auth: "public",
|
|
4816
|
-
responseKind: "json"
|
|
4817
|
-
},
|
|
4818
|
-
claimGiftCardPublic: {
|
|
4819
|
-
path: "/public/sites/{siteId}/gifting/claim",
|
|
4820
|
-
method: "POST",
|
|
4821
|
-
tags: [TAG_TEMPLATES.publicGifting],
|
|
4822
|
-
errors: [],
|
|
4823
|
-
auth: "public",
|
|
4824
|
-
responseKind: "json"
|
|
4825
|
-
},
|
|
4826
5038
|
createShopCheckout: {
|
|
4827
5039
|
path: "/public/sites/{siteId}/bookings/checkout",
|
|
4828
5040
|
method: "POST",
|
|
@@ -4873,14 +5085,6 @@ const API_ENDPOINTS$1 = {
|
|
|
4873
5085
|
responseKind: "json",
|
|
4874
5086
|
errors: []
|
|
4875
5087
|
},
|
|
4876
|
-
resolveEventOccurrence: {
|
|
4877
|
-
path: "/public/sites/{siteId}/events/occurrences/resolve",
|
|
4878
|
-
method: "GET",
|
|
4879
|
-
revalidate: 60,
|
|
4880
|
-
tags: [TAG_TEMPLATES.publicEvents, "event-occurrence"],
|
|
4881
|
-
auth: "public",
|
|
4882
|
-
responseKind: "json"
|
|
4883
|
-
},
|
|
4884
5088
|
registerForEvent: {
|
|
4885
5089
|
path: "/public/sites/{siteId}/events/register",
|
|
4886
5090
|
method: "POST",
|
|
@@ -6505,12 +6709,6 @@ const API_ENDPOINTS$1 = {
|
|
|
6505
6709
|
auth: "service",
|
|
6506
6710
|
responseKind: "json"
|
|
6507
6711
|
},
|
|
6508
|
-
sdkMediaAssignIdentifier: {
|
|
6509
|
-
path: "/sdk/{siteId}/media/assign-identifier",
|
|
6510
|
-
method: "POST",
|
|
6511
|
-
auth: "service",
|
|
6512
|
-
responseKind: "json"
|
|
6513
|
-
},
|
|
6514
6712
|
sdkUpdateWorkflowRunStatus: {
|
|
6515
6713
|
path: "/sdk/{siteId}/workflows/runs/{runId}/status",
|
|
6516
6714
|
method: "POST",
|
|
@@ -6592,6 +6790,7 @@ const API_ENDPOINTS$1 = {
|
|
|
6592
6790
|
sdkPullSettings: {
|
|
6593
6791
|
path: "/sdk/{siteId}/pull/settings",
|
|
6594
6792
|
method: "GET",
|
|
6793
|
+
errors: ["resource:conflict", "server:internal_error"],
|
|
6595
6794
|
auth: "service",
|
|
6596
6795
|
responseKind: "json"
|
|
6597
6796
|
},
|
|
@@ -6643,6 +6842,7 @@ const API_ENDPOINTS$1 = {
|
|
|
6643
6842
|
auth: "service",
|
|
6644
6843
|
responseKind: "json"
|
|
6645
6844
|
},
|
|
6845
|
+
...SDK_ENDPOINT_DEFINITIONS,
|
|
6646
6846
|
sdkUpsertPage: {
|
|
6647
6847
|
path: "/sdk/{siteId}/pages",
|
|
6648
6848
|
method: "POST",
|
|
@@ -6927,19 +7127,6 @@ const API_ENDPOINTS$1 = {
|
|
|
6927
7127
|
auth: "service",
|
|
6928
7128
|
responseKind: "json"
|
|
6929
7129
|
},
|
|
6930
|
-
sdkUpdateSettings: {
|
|
6931
|
-
path: "/sdk/{siteId}/settings",
|
|
6932
|
-
method: "PATCH",
|
|
6933
|
-
auth: "service",
|
|
6934
|
-
responseKind: "json"
|
|
6935
|
-
},
|
|
6936
|
-
sdkSetupRevalidationWebhook: {
|
|
6937
|
-
path: "/sdk/{siteId}/webhooks/revalidation/setup",
|
|
6938
|
-
method: "POST",
|
|
6939
|
-
auth: "service",
|
|
6940
|
-
responseKind: "json",
|
|
6941
|
-
errors: ["validation:invalid_input", "server:internal_error"]
|
|
6942
|
-
},
|
|
6943
7130
|
portalGetProfile: {
|
|
6944
7131
|
path: "/portal/me",
|
|
6945
7132
|
method: "GET",
|
|
@@ -8009,7 +8196,7 @@ var SimpleCache = class {
|
|
|
8009
8196
|
* 1. This constant
|
|
8010
8197
|
* 2. The "version" field in package.json
|
|
8011
8198
|
*/
|
|
8012
|
-
const SDK_VERSION = "0.
|
|
8199
|
+
const SDK_VERSION = "0.134.0";
|
|
8013
8200
|
//#endregion
|
|
8014
8201
|
//#region src/client/error.ts
|
|
8015
8202
|
let _Symbol$for;
|
|
@@ -8214,7 +8401,7 @@ const PUBLIC_ENDPOINT_NAMES = [
|
|
|
8214
8401
|
"listPublicProducts",
|
|
8215
8402
|
"listPublicPasses",
|
|
8216
8403
|
"listPublicMemberships",
|
|
8217
|
-
"
|
|
8404
|
+
"resolveEventSubroute",
|
|
8218
8405
|
"checkRedirect",
|
|
8219
8406
|
"getRoutableContent",
|
|
8220
8407
|
"getPublicRoutableContent",
|
|
@@ -8363,11 +8550,11 @@ const API_ENDPOINTS = Object.freeze({
|
|
|
8363
8550
|
auth: "public",
|
|
8364
8551
|
responseKind: "json"
|
|
8365
8552
|
},
|
|
8366
|
-
|
|
8367
|
-
path: "/public/sites/{siteId}/events/
|
|
8553
|
+
resolveEventSubroute: {
|
|
8554
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
8368
8555
|
method: "GET",
|
|
8369
8556
|
revalidate: 60,
|
|
8370
|
-
tags: ["riverbank:site:{siteId}:public-events", "event-
|
|
8557
|
+
tags: ["riverbank:site:{siteId}:public-events", "event-subroute"],
|
|
8371
8558
|
auth: "public",
|
|
8372
8559
|
responseKind: "json"
|
|
8373
8560
|
},
|
|
@@ -8564,7 +8751,7 @@ const RUNTIME_CACHE_DURABILITY_OVERRIDES = {
|
|
|
8564
8751
|
kind: "live-only",
|
|
8565
8752
|
reason: "safety_sensitive_booking"
|
|
8566
8753
|
},
|
|
8567
|
-
|
|
8754
|
+
resolveEventSubroute: {
|
|
8568
8755
|
kind: "memory-only",
|
|
8569
8756
|
reason: "durable_rollout_pending"
|
|
8570
8757
|
},
|
|
@@ -8594,7 +8781,7 @@ function isTruthyParam(value) {
|
|
|
8594
8781
|
}
|
|
8595
8782
|
function isPreviewRequest(endpoint, params) {
|
|
8596
8783
|
if (endpoint === "getContentByPath") return isTruthyParam(params.preview);
|
|
8597
|
-
if (endpoint === "listPublishedEntries" || endpoint === "
|
|
8784
|
+
if (endpoint === "listPublishedEntries" || endpoint === "resolveEventSubroute") return params.stage === "preview";
|
|
8598
8785
|
return false;
|
|
8599
8786
|
}
|
|
8600
8787
|
function getEndpointFreshTtlSec(endpoint) {
|
|
@@ -8784,6 +8971,36 @@ function createWholeSeriesReadOperations(deps) {
|
|
|
8784
8971
|
} };
|
|
8785
8972
|
}
|
|
8786
8973
|
//#endregion
|
|
8974
|
+
//#region src/client/eventSubrouteReadOperations.ts
|
|
8975
|
+
function createEventSubrouteReadOperations(deps) {
|
|
8976
|
+
async function resolveEventSubroute(params, kind) {
|
|
8977
|
+
const { siteId, subject, segment, signal } = params;
|
|
8978
|
+
if (!siteId || !segment) throw new Error(`${kind === "event-run" ? "resolveEventRun" : "resolveEventOccurrence"}() requires siteId, subject, and segment`);
|
|
8979
|
+
const subjectId = subject.kind === "eventOffering" ? subject.eventOfferingId : subject.eventSeriesId;
|
|
8980
|
+
return deps.resilientFetchData(`${kind}:${siteId}:${subject.kind}:${subjectId}:${segment}`, (requestSignal) => deps.apiClient({
|
|
8981
|
+
endpoint: "resolveEventSubroute",
|
|
8982
|
+
params: {
|
|
8983
|
+
siteId,
|
|
8984
|
+
kind,
|
|
8985
|
+
subjectKind: subject.kind,
|
|
8986
|
+
subjectId,
|
|
8987
|
+
segment
|
|
8988
|
+
},
|
|
8989
|
+
options: { signal: requestSignal }
|
|
8990
|
+
}), { signal });
|
|
8991
|
+
}
|
|
8992
|
+
return {
|
|
8993
|
+
async resolveEventOccurrence(params) {
|
|
8994
|
+
const response = await resolveEventSubroute(params, "event-occurrence");
|
|
8995
|
+
return { occurrence: response.subroute?.kind === "event-occurrence" ? response.subroute.occurrence : null };
|
|
8996
|
+
},
|
|
8997
|
+
async resolveEventRun(params) {
|
|
8998
|
+
const response = await resolveEventSubroute(params, "event-run");
|
|
8999
|
+
return { run: response.subroute?.kind === "event-run" ? response.subroute.run : null };
|
|
9000
|
+
}
|
|
9001
|
+
};
|
|
9002
|
+
}
|
|
9003
|
+
//#endregion
|
|
8787
9004
|
//#region src/client/combineAbortSignals.ts
|
|
8788
9005
|
/** Combine signals into one that aborts when any input aborts. */
|
|
8789
9006
|
function combineAbortSignals(...signals) {
|
|
@@ -9594,6 +9811,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
9594
9811
|
apiClient,
|
|
9595
9812
|
resilientFetchData
|
|
9596
9813
|
});
|
|
9814
|
+
const eventSubrouteReads = createEventSubrouteReadOperations({
|
|
9815
|
+
apiClient,
|
|
9816
|
+
resilientFetchData
|
|
9817
|
+
});
|
|
9597
9818
|
async function getEntriesInternal(params) {
|
|
9598
9819
|
const { siteId, contentType, limit, offset, order, preview = false, mode, entryIds, includeMeta, signal } = params;
|
|
9599
9820
|
const entryIdsCacheKey = mode === "manual" && entryIds?.length ? entryIds.join(",") : "";
|
|
@@ -9876,20 +10097,7 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
9876
10097
|
});
|
|
9877
10098
|
}, { signal });
|
|
9878
10099
|
},
|
|
9879
|
-
|
|
9880
|
-
const { siteId, eventSeriesIds, segment, signal } = params;
|
|
9881
|
-
if (!siteId || eventSeriesIds.length === 0 || !segment) throw new Error("resolveEventOccurrence() requires siteId, eventSeriesIds, and segment");
|
|
9882
|
-
const seriesScope = [...new Set(eventSeriesIds)].sort();
|
|
9883
|
-
return resilientFetchData(`event-occurrence:${siteId}:${seriesScope.join(",")}:${segment}`, async (sig) => apiClient({
|
|
9884
|
-
endpoint: "resolveEventOccurrence",
|
|
9885
|
-
params: {
|
|
9886
|
-
siteId,
|
|
9887
|
-
eventSeriesIds: seriesScope.join(","),
|
|
9888
|
-
segment
|
|
9889
|
-
},
|
|
9890
|
-
options: { signal: sig }
|
|
9891
|
-
}), { signal });
|
|
9892
|
-
},
|
|
10100
|
+
...eventSubrouteReads,
|
|
9893
10101
|
async checkRedirect(params) {
|
|
9894
10102
|
const { siteId, path, signal } = params;
|
|
9895
10103
|
if (!siteId || !path) throw new Error("checkRedirect() requires siteId and path");
|
|
@@ -10882,6 +11090,298 @@ function parseManagementKey(raw) {
|
|
|
10882
11090
|
if (typeof raw !== "string" || !raw.startsWith("bld_mgmt_sk_") || raw.length === 12) return err$1({ kind: "invalid-management-key" });
|
|
10883
11091
|
return ok$1(createSecretInternal("management-key", raw));
|
|
10884
11092
|
}
|
|
11093
|
+
//#endregion
|
|
11094
|
+
//#region ../core/src/event-series-behaviour.ts
|
|
11095
|
+
const SURFACE_EVENT_PRESET_VALUES = [
|
|
11096
|
+
"class",
|
|
11097
|
+
"course",
|
|
11098
|
+
"term",
|
|
11099
|
+
"workshop",
|
|
11100
|
+
"retreat",
|
|
11101
|
+
"performance"
|
|
11102
|
+
];
|
|
11103
|
+
//#endregion
|
|
11104
|
+
//#region ../core/src/booking-vertical-preset.ts
|
|
11105
|
+
const BOOKING_ENGINE_BY_BEHAVIOUR = {
|
|
11106
|
+
class: "event_series",
|
|
11107
|
+
workshop: "event_series",
|
|
11108
|
+
course: "event_series",
|
|
11109
|
+
retreat: "event_series",
|
|
11110
|
+
performance: "event_series",
|
|
11111
|
+
appointment: "appointment_service"
|
|
11112
|
+
};
|
|
11113
|
+
function verticalBookingPreset(id, verticalId, canonicalBehaviour, label, pluralLabel, description, availability = "onboarding") {
|
|
11114
|
+
return {
|
|
11115
|
+
id,
|
|
11116
|
+
verticalId,
|
|
11117
|
+
canonicalBehaviour,
|
|
11118
|
+
engine: BOOKING_ENGINE_BY_BEHAVIOUR[canonicalBehaviour],
|
|
11119
|
+
availability,
|
|
11120
|
+
label,
|
|
11121
|
+
pluralLabel,
|
|
11122
|
+
description
|
|
11123
|
+
};
|
|
11124
|
+
}
|
|
11125
|
+
//#endregion
|
|
11126
|
+
//#region ../core/src/booking-vertical-definitions.ts
|
|
11127
|
+
const VERTICAL_DEFINITIONS = [
|
|
11128
|
+
{
|
|
11129
|
+
id: "yoga_wellness",
|
|
11130
|
+
label: "Yoga, meditation or mindfulness",
|
|
11131
|
+
description: "Yoga studios, wellness teachers, and movement practitioners."
|
|
11132
|
+
},
|
|
11133
|
+
{
|
|
11134
|
+
id: "fitness_pt",
|
|
11135
|
+
label: "Fitness and personal training",
|
|
11136
|
+
description: "Personal trainers, group training, and fitness programmes."
|
|
11137
|
+
},
|
|
11138
|
+
{
|
|
11139
|
+
id: "dance_school",
|
|
11140
|
+
label: "Dance school",
|
|
11141
|
+
description: "Dance classes, courses or terms, workshops, private lessons, and shows."
|
|
11142
|
+
},
|
|
11143
|
+
{
|
|
11144
|
+
id: "physiotherapy_physical_health",
|
|
11145
|
+
label: "Physiotherapy & physical health",
|
|
11146
|
+
description: "Physiotherapists, chiropractors, osteopaths, sports therapists, and rehabilitation practitioners."
|
|
11147
|
+
},
|
|
11148
|
+
{
|
|
11149
|
+
id: "massage_bodywork",
|
|
11150
|
+
label: "Massage & bodywork",
|
|
11151
|
+
description: "Massage therapists, bodyworkers, and somatic practitioners."
|
|
11152
|
+
},
|
|
11153
|
+
{
|
|
11154
|
+
id: "therapist_practitioner",
|
|
11155
|
+
label: "Therapist or practitioner",
|
|
11156
|
+
description: "Appointments, sessions, consultations, and occasional group work."
|
|
11157
|
+
},
|
|
11158
|
+
{
|
|
11159
|
+
id: "beauty_spa",
|
|
11160
|
+
label: "Beauty or spa",
|
|
11161
|
+
description: "Treatment-led businesses with optional workshops."
|
|
11162
|
+
},
|
|
11163
|
+
{
|
|
11164
|
+
id: "consultant_coach",
|
|
11165
|
+
label: "Consultant or coach",
|
|
11166
|
+
description: "One-to-one calls, workshops, courses, and retreats."
|
|
11167
|
+
},
|
|
11168
|
+
{
|
|
11169
|
+
id: "training_provider",
|
|
11170
|
+
label: "Training provider",
|
|
11171
|
+
description: "Courses, workshops, classes, appointments, and residential training."
|
|
11172
|
+
},
|
|
11173
|
+
{
|
|
11174
|
+
id: "retreat_centre",
|
|
11175
|
+
label: "Retreat centre",
|
|
11176
|
+
description: "Residential retreats, workshops, classes, courses, and private sessions."
|
|
11177
|
+
},
|
|
11178
|
+
{
|
|
11179
|
+
id: "music_school",
|
|
11180
|
+
label: "Music teacher or school",
|
|
11181
|
+
description: "Lessons, classes, terms, workshops, and performances."
|
|
11182
|
+
},
|
|
11183
|
+
{
|
|
11184
|
+
id: "voice_singing",
|
|
11185
|
+
label: "Voice & Singing",
|
|
11186
|
+
description: "Singing lessons, choirs, voice circles, workshops, and performances."
|
|
11187
|
+
},
|
|
11188
|
+
{
|
|
11189
|
+
id: "performing_arts_school",
|
|
11190
|
+
label: "Theatre or performing arts school",
|
|
11191
|
+
description: "Classes, terms, workshops, performances, and lessons."
|
|
11192
|
+
},
|
|
11193
|
+
{
|
|
11194
|
+
id: "community_wellbeing",
|
|
11195
|
+
label: "Community or wellbeing centre",
|
|
11196
|
+
description: "Groups, workshops, courses, appointments, and retreats."
|
|
11197
|
+
},
|
|
11198
|
+
{
|
|
11199
|
+
id: "venue_event_space",
|
|
11200
|
+
label: "Venue or event space",
|
|
11201
|
+
description: "Room, resource, or access bookings. Depends on the future capacity-booking domain."
|
|
11202
|
+
}
|
|
11203
|
+
];
|
|
11204
|
+
VERTICAL_DEFINITIONS.map(({ id }) => id);
|
|
11205
|
+
//#endregion
|
|
11206
|
+
//#region ../core/src/booking-vertical-catalog.ts
|
|
11207
|
+
const VERTICAL_BOOKING_PRESETS = [
|
|
11208
|
+
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
11209
|
+
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
11210
|
+
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
11211
|
+
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
11212
|
+
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
11213
|
+
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
11214
|
+
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
11215
|
+
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
11216
|
+
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
11217
|
+
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
11218
|
+
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
11219
|
+
{
|
|
11220
|
+
...verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
11221
|
+
eventPresetOverride: "term"
|
|
11222
|
+
},
|
|
11223
|
+
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
11224
|
+
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
11225
|
+
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
11226
|
+
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
11227
|
+
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
11228
|
+
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
11229
|
+
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
11230
|
+
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
11231
|
+
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
11232
|
+
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
11233
|
+
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
11234
|
+
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
11235
|
+
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
11236
|
+
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
11237
|
+
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
11238
|
+
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
11239
|
+
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
11240
|
+
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
11241
|
+
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
11242
|
+
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
11243
|
+
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
11244
|
+
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
11245
|
+
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
11246
|
+
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
11247
|
+
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
11248
|
+
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
11249
|
+
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
11250
|
+
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
11251
|
+
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
11252
|
+
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
11253
|
+
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
11254
|
+
{
|
|
11255
|
+
...verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
11256
|
+
eventPresetOverride: "term"
|
|
11257
|
+
},
|
|
11258
|
+
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
11259
|
+
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
11260
|
+
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
11261
|
+
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
11262
|
+
{
|
|
11263
|
+
...verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
11264
|
+
eventPresetOverride: "term"
|
|
11265
|
+
},
|
|
11266
|
+
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
11267
|
+
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
11268
|
+
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
11269
|
+
{
|
|
11270
|
+
...verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
11271
|
+
eventPresetOverride: "term"
|
|
11272
|
+
},
|
|
11273
|
+
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
11274
|
+
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
11275
|
+
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
11276
|
+
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
11277
|
+
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
11278
|
+
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
11279
|
+
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
11280
|
+
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
11281
|
+
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
11282
|
+
];
|
|
11283
|
+
//#endregion
|
|
11284
|
+
//#region ../core/src/booking-vertical-config.ts
|
|
11285
|
+
const VERTICAL_ID_SET = new Set(VERTICAL_DEFINITIONS.map(({ id }) => id));
|
|
11286
|
+
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
11287
|
+
function parseVerticalId(value) {
|
|
11288
|
+
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
11289
|
+
}
|
|
11290
|
+
function parseVerticalPresetId(value) {
|
|
11291
|
+
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
11292
|
+
}
|
|
11293
|
+
function getVerticalPresetDefinition(presetId) {
|
|
11294
|
+
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
11295
|
+
if (definition === void 0) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
11296
|
+
return definition;
|
|
11297
|
+
}
|
|
11298
|
+
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
11299
|
+
return {
|
|
11300
|
+
verticalId,
|
|
11301
|
+
selectedPresetIds
|
|
11302
|
+
};
|
|
11303
|
+
}
|
|
11304
|
+
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
11305
|
+
const firstPresetId = presetIds[0];
|
|
11306
|
+
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
11307
|
+
}
|
|
11308
|
+
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
11309
|
+
verticalId: null,
|
|
11310
|
+
selectedPresetIds: []
|
|
11311
|
+
};
|
|
11312
|
+
function appendUniqueIssue(issues, issue) {
|
|
11313
|
+
return issues.some((existing) => existing.code === issue.code) ? issues : [...issues, issue];
|
|
11314
|
+
}
|
|
11315
|
+
function collectRawConfigIssues(rawConfig, config) {
|
|
11316
|
+
const rawPresetValue = rawConfig.selectedPresetIds;
|
|
11317
|
+
const rawPresetIds = Array.isArray(rawPresetValue) ? rawPresetValue : [];
|
|
11318
|
+
let issues = [];
|
|
11319
|
+
if (rawConfig.verticalId != null && config.verticalId === null) issues = appendUniqueIssue(issues, {
|
|
11320
|
+
code: "unknown_vertical",
|
|
11321
|
+
rawValue: rawConfig.verticalId
|
|
11322
|
+
});
|
|
11323
|
+
if (config.verticalId === null && config.selectedPresetIds.length > 0) issues = appendUniqueIssue(issues, { code: "missing_vertical" });
|
|
11324
|
+
if (rawPresetValue !== void 0 && !Array.isArray(rawPresetValue) || rawPresetIds.some((presetId) => parseVerticalPresetId(presetId) === null)) issues = appendUniqueIssue(issues, {
|
|
11325
|
+
code: "unknown_preset",
|
|
11326
|
+
rawValue: rawPresetValue
|
|
11327
|
+
});
|
|
11328
|
+
if (rawConfig.verticalId != null && config.selectedPresetIds.length === 0) issues = appendUniqueIssue(issues, { code: "empty_selected_presets" });
|
|
11329
|
+
return issues;
|
|
11330
|
+
}
|
|
11331
|
+
function collectPresetConfigIssues(config) {
|
|
11332
|
+
const seenPresetIds = /* @__PURE__ */ new Set();
|
|
11333
|
+
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
11334
|
+
let issues = [];
|
|
11335
|
+
for (const presetId of config.selectedPresetIds) {
|
|
11336
|
+
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
11337
|
+
if (seenPresetIds.has(presetId)) issues = appendUniqueIssue(issues, { code: "duplicate_preset_id" });
|
|
11338
|
+
seenPresetIds.add(presetId);
|
|
11339
|
+
if (config.verticalId !== null && presetDefinition.verticalId !== config.verticalId) issues = appendUniqueIssue(issues, { code: "preset_vertical_mismatch" });
|
|
11340
|
+
if (presetDefinition.availability === "future") issues = appendUniqueIssue(issues, { code: "future_preset_selected" });
|
|
11341
|
+
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues = appendUniqueIssue(issues, { code: "duplicate_canonical_behaviour" });
|
|
11342
|
+
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
11343
|
+
}
|
|
11344
|
+
return issues;
|
|
11345
|
+
}
|
|
11346
|
+
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
11347
|
+
let issues = collectRawConfigIssues(rawConfig, config);
|
|
11348
|
+
for (const issue of collectPresetConfigIssues(config)) issues = appendUniqueIssue(issues, issue);
|
|
11349
|
+
return issues;
|
|
11350
|
+
}
|
|
11351
|
+
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
11352
|
+
if (rawConfig == null) return {
|
|
11353
|
+
kind: "unconfigured",
|
|
11354
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
11355
|
+
};
|
|
11356
|
+
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
11357
|
+
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
11358
|
+
const config = {
|
|
11359
|
+
verticalId,
|
|
11360
|
+
selectedPresetIds
|
|
11361
|
+
};
|
|
11362
|
+
if (rawConfig.verticalId == null && selectedPresetIds.length === 0) return {
|
|
11363
|
+
kind: "unconfigured",
|
|
11364
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
11365
|
+
};
|
|
11366
|
+
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
11367
|
+
if (issues.length > 0) return {
|
|
11368
|
+
kind: "invalid",
|
|
11369
|
+
config,
|
|
11370
|
+
issues
|
|
11371
|
+
};
|
|
11372
|
+
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
11373
|
+
const configuredConfig = verticalId !== null && nonEmptyPresetIds !== null ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
11374
|
+
if (configuredConfig === null) return {
|
|
11375
|
+
kind: "invalid",
|
|
11376
|
+
config,
|
|
11377
|
+
issues: [{ code: "empty_selected_presets" }]
|
|
11378
|
+
};
|
|
11379
|
+
return {
|
|
11380
|
+
kind: "configured",
|
|
11381
|
+
config: configuredConfig,
|
|
11382
|
+
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
11383
|
+
};
|
|
11384
|
+
}
|
|
10885
11385
|
z.object({
|
|
10886
11386
|
formulaVersion: z.literal("managed-domain-overage-v1"),
|
|
10887
11387
|
conversionRule: z.literal("usd-to-gbp-1-to-1-v1"),
|
|
@@ -10893,6 +11393,68 @@ z.object({
|
|
|
10893
11393
|
monthlyCurrency: z.literal("gbp")
|
|
10894
11394
|
});
|
|
10895
11395
|
//#endregion
|
|
11396
|
+
//#region ../blocks/src/system/types/link.ts
|
|
11397
|
+
const nullableString = z.union([z.string().min(1), z.null()]);
|
|
11398
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
11399
|
+
"page",
|
|
11400
|
+
"content",
|
|
11401
|
+
"pageSurface"
|
|
11402
|
+
];
|
|
11403
|
+
const resolvedInternalLinkKeys = [
|
|
11404
|
+
"entityId",
|
|
11405
|
+
"entityType",
|
|
11406
|
+
"href",
|
|
11407
|
+
"title",
|
|
11408
|
+
"typeLabel"
|
|
11409
|
+
];
|
|
11410
|
+
const internalRouteOnlyLinkSchema = z.object({
|
|
11411
|
+
kind: z.literal("internal"),
|
|
11412
|
+
routeId: z.string().min(1)
|
|
11413
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
11414
|
+
if (!resolvedInternalLinkKeys.some((key) => value[key] != null)) return;
|
|
11415
|
+
ctx.addIssue({
|
|
11416
|
+
code: "custom",
|
|
11417
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
11418
|
+
});
|
|
11419
|
+
});
|
|
11420
|
+
const internalResolvedLinkSchema = z.object({
|
|
11421
|
+
kind: z.literal("internal"),
|
|
11422
|
+
routeId: z.string().min(1),
|
|
11423
|
+
entityId: z.string().min(1),
|
|
11424
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
11425
|
+
href: z.string().min(1),
|
|
11426
|
+
title: z.string().min(1),
|
|
11427
|
+
typeLabel: z.string().min(1),
|
|
11428
|
+
contentTypeKey: nullableString.optional(),
|
|
11429
|
+
contentTypeName: nullableString.optional(),
|
|
11430
|
+
updatedAt: nullableString.optional()
|
|
11431
|
+
}).passthrough();
|
|
11432
|
+
const internalLinkSchema = z.union([internalResolvedLinkSchema, internalRouteOnlyLinkSchema]);
|
|
11433
|
+
const externalLinkSchema$1 = z.object({
|
|
11434
|
+
kind: z.literal("external"),
|
|
11435
|
+
href: z.string().min(1)
|
|
11436
|
+
}).passthrough();
|
|
11437
|
+
const customLinkSchema$1 = z.object({
|
|
11438
|
+
kind: z.literal("url"),
|
|
11439
|
+
href: z.string().min(1)
|
|
11440
|
+
}).passthrough();
|
|
11441
|
+
const pageLinkSchema$1 = z.object({
|
|
11442
|
+
kind: z.literal("page"),
|
|
11443
|
+
identifier: z.string().min(1)
|
|
11444
|
+
}).passthrough();
|
|
11445
|
+
const entryLinkSchema$1 = z.object({
|
|
11446
|
+
kind: z.literal("entry"),
|
|
11447
|
+
contentType: z.string().min(1),
|
|
11448
|
+
identifier: z.string().min(1)
|
|
11449
|
+
}).passthrough();
|
|
11450
|
+
z.union([
|
|
11451
|
+
internalLinkSchema,
|
|
11452
|
+
externalLinkSchema$1,
|
|
11453
|
+
customLinkSchema$1,
|
|
11454
|
+
pageLinkSchema$1,
|
|
11455
|
+
entryLinkSchema$1
|
|
11456
|
+
]);
|
|
11457
|
+
//#endregion
|
|
10896
11458
|
//#region ../api/src/navigation/contracts.ts
|
|
10897
11459
|
/**
|
|
10898
11460
|
* Canonical navigation/link Zod contracts.
|
|
@@ -10922,7 +11484,7 @@ const internalLinkPayloadSchema = z.object({
|
|
|
10922
11484
|
kind: z.literal("internal"),
|
|
10923
11485
|
routeId: z.string().uuid(),
|
|
10924
11486
|
entityId: z.string().uuid(),
|
|
10925
|
-
entityType: z.enum(
|
|
11487
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
10926
11488
|
href: z.string().min(1),
|
|
10927
11489
|
title: z.string().min(1),
|
|
10928
11490
|
typeLabel: z.string().min(1),
|
|
@@ -12794,6 +13356,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
12794
13356
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
12795
13357
|
return token;
|
|
12796
13358
|
});
|
|
13359
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
13360
|
+
kind: z.literal("shade-shift"),
|
|
13361
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
13362
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
13363
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
13364
|
+
});
|
|
12797
13365
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
12798
13366
|
const buttonShadowIntensitySchema = z.enum([
|
|
12799
13367
|
"subtle",
|
|
@@ -13133,6 +13701,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
13133
13701
|
shadow: variantShadowSchema.optional(),
|
|
13134
13702
|
border: buttonBorderSchema.optional(),
|
|
13135
13703
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
13704
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
13136
13705
|
effects: variantEffectsSchema.optional(),
|
|
13137
13706
|
sizes: variantSizeOverridesSchema.optional(),
|
|
13138
13707
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -13405,6 +13974,139 @@ function validateButtonTextContrast(input) {
|
|
|
13405
13974
|
};
|
|
13406
13975
|
}
|
|
13407
13976
|
//#endregion
|
|
13977
|
+
//#region ../theme-core/src/buttons/contextualHover.ts
|
|
13978
|
+
function resolveContextualHoverPreference(input) {
|
|
13979
|
+
const preferred = input.instruction.preferredToken;
|
|
13980
|
+
if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
|
|
13981
|
+
kind: "resolved",
|
|
13982
|
+
token: preferred,
|
|
13983
|
+
repair: null
|
|
13984
|
+
};
|
|
13985
|
+
const contextual = resolveContextualHover(input);
|
|
13986
|
+
return contextual.kind === "resolved" ? {
|
|
13987
|
+
kind: "resolved",
|
|
13988
|
+
token: contextual.token,
|
|
13989
|
+
repair: preferred ? {
|
|
13990
|
+
kind: "preferred-token-replaced",
|
|
13991
|
+
preferredToken: preferred,
|
|
13992
|
+
contextualToken: contextual.token
|
|
13993
|
+
} : null
|
|
13994
|
+
} : contextual;
|
|
13995
|
+
}
|
|
13996
|
+
/**
|
|
13997
|
+
* Resolves semantic shade movement from real palette steps. The persisted
|
|
13998
|
+
* instruction owns the colour family and deterministic unknown-surface
|
|
13999
|
+
* fallback; a proven surface may select the opposite direction when it gives
|
|
14000
|
+
* the button stronger separation while retaining the shared contrast contract.
|
|
14001
|
+
*/
|
|
14002
|
+
function resolveContextualHover(input) {
|
|
14003
|
+
const candidates = shadeCandidates(input.instruction.seedToken, input.palette);
|
|
14004
|
+
if (candidates.length === 0) return {
|
|
14005
|
+
kind: "unavailable",
|
|
14006
|
+
reason: "no-distinct-shade"
|
|
14007
|
+
};
|
|
14008
|
+
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
|
|
14009
|
+
if (textSafe.length === 0) return {
|
|
14010
|
+
kind: "unavailable",
|
|
14011
|
+
reason: "no-text-safe-candidate"
|
|
14012
|
+
};
|
|
14013
|
+
if (!input.surface) {
|
|
14014
|
+
const selected = textSafe.find((candidate) => candidate.direction === input.instruction.fallbackDirection) ?? textSafe[0];
|
|
14015
|
+
return selected ? {
|
|
14016
|
+
kind: "resolved",
|
|
14017
|
+
token: selected.token,
|
|
14018
|
+
direction: selected.direction,
|
|
14019
|
+
evidence: "fallback-direction"
|
|
14020
|
+
} : {
|
|
14021
|
+
kind: "unavailable",
|
|
14022
|
+
reason: "no-text-safe-candidate"
|
|
14023
|
+
};
|
|
14024
|
+
}
|
|
14025
|
+
const selected = textSafe.map((candidate) => ({
|
|
14026
|
+
...candidate,
|
|
14027
|
+
surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface?.backgroundHex ?? "")
|
|
14028
|
+
})).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
|
|
14029
|
+
const distanceDifference = left.distance - right.distance;
|
|
14030
|
+
if (distanceDifference !== 0) return distanceDifference;
|
|
14031
|
+
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
14032
|
+
if (contrastDifference !== 0) return contrastDifference;
|
|
14033
|
+
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
14034
|
+
return left.direction === input.instruction.fallbackDirection ? -1 : 1;
|
|
14035
|
+
})[0];
|
|
14036
|
+
return selected ? {
|
|
14037
|
+
kind: "resolved",
|
|
14038
|
+
token: selected.token,
|
|
14039
|
+
direction: selected.direction,
|
|
14040
|
+
evidence: "known-surface"
|
|
14041
|
+
} : {
|
|
14042
|
+
kind: "unavailable",
|
|
14043
|
+
reason: "no-surface-safe-candidate"
|
|
14044
|
+
};
|
|
14045
|
+
}
|
|
14046
|
+
function shadeCandidates(seedToken, palette) {
|
|
14047
|
+
const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
|
|
14048
|
+
const family = match?.[1] ?? String(seedToken);
|
|
14049
|
+
const currentShade = match?.[2] ? Number(match[2]) : 500;
|
|
14050
|
+
const seedHex = palette[seedToken];
|
|
14051
|
+
const shades = Object.keys(palette).flatMap((token) => {
|
|
14052
|
+
const shade = token.match(new RegExp(`^${escapeRegExp(family)}-(\\d{2,3})$`));
|
|
14053
|
+
return shade?.[1] ? [Number(shade[1])] : [];
|
|
14054
|
+
}).filter((shade) => Number.isFinite(shade)).sort((left, right) => left - right);
|
|
14055
|
+
const lower = [...shades].filter((shade) => shade < currentShade).sort((left, right) => right - left);
|
|
14056
|
+
const higher = shades.filter((shade) => shade > currentShade);
|
|
14057
|
+
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);
|
|
14058
|
+
}
|
|
14059
|
+
function candidate(family, shade, currentShade, direction, seedHex, palette) {
|
|
14060
|
+
const token = parseOpaqueButtonColourToken(`${family}-${shade}`);
|
|
14061
|
+
if (token === null) return null;
|
|
14062
|
+
const candidateHex = palette[token];
|
|
14063
|
+
if (!candidateHex || candidateHex === seedHex) return null;
|
|
14064
|
+
return {
|
|
14065
|
+
token,
|
|
14066
|
+
direction,
|
|
14067
|
+
distance: Math.abs(shade - currentShade),
|
|
14068
|
+
surfaceContrast: null
|
|
14069
|
+
};
|
|
14070
|
+
}
|
|
14071
|
+
function hasSafeTextContrast(token, palette) {
|
|
14072
|
+
const background = palette[token];
|
|
14073
|
+
const foreground = palette[onColorTokenName(token)];
|
|
14074
|
+
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
14075
|
+
}
|
|
14076
|
+
function isSafeCandidate(token, palette, surface) {
|
|
14077
|
+
if (!hasSafeTextContrast(token, palette)) return false;
|
|
14078
|
+
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
14079
|
+
}
|
|
14080
|
+
function escapeRegExp(value) {
|
|
14081
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
14082
|
+
}
|
|
14083
|
+
//#endregion
|
|
14084
|
+
//#region ../theme-core/src/buttons/resolveButtonHoverTreatment.ts
|
|
14085
|
+
function resolveButtonHoverTreatment(input) {
|
|
14086
|
+
if (input.variant.contextualHover) {
|
|
14087
|
+
const contextual = resolveContextualHoverPreference({
|
|
14088
|
+
instruction: input.variant.contextualHover,
|
|
14089
|
+
palette: input.palette,
|
|
14090
|
+
surface: input.surface
|
|
14091
|
+
});
|
|
14092
|
+
if (contextual.kind === "resolved") return {
|
|
14093
|
+
treatment: {
|
|
14094
|
+
type: "solid",
|
|
14095
|
+
colorToken: contextual.token
|
|
14096
|
+
},
|
|
14097
|
+
repair: contextual.repair
|
|
14098
|
+
};
|
|
14099
|
+
}
|
|
14100
|
+
const token = input.variant.hoverBackgroundToken ?? (input.global.hoverColor === "token" ? input.global.hoverColorToken : void 0);
|
|
14101
|
+
return {
|
|
14102
|
+
treatment: token === void 0 ? input.fallback : {
|
|
14103
|
+
type: "solid",
|
|
14104
|
+
colorToken: token
|
|
14105
|
+
},
|
|
14106
|
+
repair: null
|
|
14107
|
+
};
|
|
14108
|
+
}
|
|
14109
|
+
//#endregion
|
|
13408
14110
|
//#region ../theme-core/src/buttons/resolveButtonColourStates.ts
|
|
13409
14111
|
function compileButtonColourStates(input) {
|
|
13410
14112
|
const baseTransition = applyColourEffects({
|
|
@@ -13415,9 +14117,16 @@ function compileButtonColourStates(input) {
|
|
|
13415
14117
|
palette: input.palette
|
|
13416
14118
|
});
|
|
13417
14119
|
if (!baseTransition.ok) return baseTransition;
|
|
14120
|
+
const hover = resolveButtonHoverTreatment({
|
|
14121
|
+
variant: input.variant,
|
|
14122
|
+
global: input.global,
|
|
14123
|
+
fallback: baseTransition.treatment,
|
|
14124
|
+
palette: input.palette,
|
|
14125
|
+
surface: input.surface
|
|
14126
|
+
});
|
|
13418
14127
|
const stateTreatments = {
|
|
13419
14128
|
base: baseTransition.treatment,
|
|
13420
|
-
hover:
|
|
14129
|
+
hover: hover.treatment,
|
|
13421
14130
|
focus: baseTransition.treatment,
|
|
13422
14131
|
active: baseTransition.treatment,
|
|
13423
14132
|
disabled: baseTransition.treatment
|
|
@@ -13456,14 +14165,8 @@ function compileButtonColourStates(input) {
|
|
|
13456
14165
|
ok: true,
|
|
13457
14166
|
states: resolved,
|
|
13458
14167
|
focusIndicator: resolveFocusIndicator(resolved.focus),
|
|
13459
|
-
nonColourEffects
|
|
13460
|
-
|
|
13461
|
-
}
|
|
13462
|
-
function hoverTreatment(variant, global, fallback) {
|
|
13463
|
-
const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
|
|
13464
|
-
return token === void 0 ? fallback : {
|
|
13465
|
-
type: "solid",
|
|
13466
|
-
colorToken: token
|
|
14168
|
+
nonColourEffects,
|
|
14169
|
+
contextualHoverRepair: hover.repair
|
|
13467
14170
|
};
|
|
13468
14171
|
}
|
|
13469
14172
|
function applyColourEffects(input) {
|
|
@@ -14274,13 +14977,24 @@ function resolveContextualButtonRole(input) {
|
|
|
14274
14977
|
};
|
|
14275
14978
|
const rejected = [];
|
|
14276
14979
|
const preferred = compileCandidate(requested, input.buttonSystem, input.palette, input.surface);
|
|
14277
|
-
if (preferred.ok)
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
|
|
14980
|
+
if (preferred.ok) {
|
|
14981
|
+
if (preferred.contextualHoverRepair) return {
|
|
14982
|
+
kind: "repaired",
|
|
14983
|
+
requestedRole: input.role,
|
|
14984
|
+
candidate: "contextual-hover",
|
|
14985
|
+
states: preferred.states,
|
|
14986
|
+
focusIndicator: preferred.focusIndicator,
|
|
14987
|
+
boundary: boundaryForVariant(requested),
|
|
14988
|
+
rejectedCandidates: []
|
|
14989
|
+
};
|
|
14990
|
+
return {
|
|
14991
|
+
kind: "preferred",
|
|
14992
|
+
requestedRole: input.role,
|
|
14993
|
+
states: preferred.states,
|
|
14994
|
+
focusIndicator: preferred.focusIndicator,
|
|
14995
|
+
boundary: boundaryForVariant(requested)
|
|
14996
|
+
};
|
|
14997
|
+
}
|
|
14284
14998
|
rejected.push({
|
|
14285
14999
|
candidate: "preferred",
|
|
14286
15000
|
error: preferred.error
|
|
@@ -14400,6 +15114,7 @@ function candidateVariant(fallback, requested, system) {
|
|
|
14400
15114
|
},
|
|
14401
15115
|
border: { widthClass: "border" },
|
|
14402
15116
|
hoverBackgroundToken: void 0,
|
|
15117
|
+
contextualHover: void 0,
|
|
14403
15118
|
effects: void 0
|
|
14404
15119
|
},
|
|
14405
15120
|
boundary: {
|
|
@@ -14511,13 +15226,7 @@ function readNonEmptyString(value) {
|
|
|
14511
15226
|
buttonSizeNameSchema.options;
|
|
14512
15227
|
//#endregion
|
|
14513
15228
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
14514
|
-
const PUBLIC_BUTTON_ROLES =
|
|
14515
|
-
"primary",
|
|
14516
|
-
"secondary",
|
|
14517
|
-
"outline",
|
|
14518
|
-
"ghost",
|
|
14519
|
-
"accent"
|
|
14520
|
-
];
|
|
15229
|
+
const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
|
|
14521
15230
|
function defineButtonStyleRecipe(recipe) {
|
|
14522
15231
|
return recipe;
|
|
14523
15232
|
}
|
|
@@ -14613,6 +15322,14 @@ const BUTTON_STYLE_IDS = [
|
|
|
14613
15322
|
"quiet-arrow"
|
|
14614
15323
|
];
|
|
14615
15324
|
const quietArrowParametersSchema = z.object({ secondaryTreatment: z.enum(["outlined", "solid-accent"]) }).strict();
|
|
15325
|
+
const flatInkHoverTreatmentSchema = z.enum([
|
|
15326
|
+
"contextual",
|
|
15327
|
+
"secondary",
|
|
15328
|
+
"accent"
|
|
15329
|
+
]);
|
|
15330
|
+
const flatInkHoverPreferencesShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, flatInkHoverTreatmentSchema.optional()]));
|
|
15331
|
+
const flatInkHoverPreferencesSchema = z.strictObject(flatInkHoverPreferencesShape);
|
|
15332
|
+
const flatInkParametersSchema = z.strictObject({ hoverPreferences: flatInkHoverPreferencesSchema.optional() });
|
|
14616
15333
|
const emptyParametersSchema$1 = z.object({}).strict();
|
|
14617
15334
|
function selectionBranch(styleId, parameters) {
|
|
14618
15335
|
return z.object({
|
|
@@ -14627,7 +15344,7 @@ const buttonStyleSelectionSchema = z.discriminatedUnion("styleId", [
|
|
|
14627
15344
|
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
14628
15345
|
selectionBranch("pebble", emptyParametersSchema$1),
|
|
14629
15346
|
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
14630
|
-
selectionBranch("flat-ink",
|
|
15347
|
+
selectionBranch("flat-ink", flatInkParametersSchema),
|
|
14631
15348
|
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
14632
15349
|
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
14633
15350
|
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
@@ -14764,6 +15481,189 @@ const quietArrowRecipe = defineButtonStyleRecipe({
|
|
|
14764
15481
|
})
|
|
14765
15482
|
});
|
|
14766
15483
|
//#endregion
|
|
15484
|
+
//#region ../theme-core/src/buttons/styles/recipes/flatInk.ts
|
|
15485
|
+
const contextualRoleConfig = {
|
|
15486
|
+
primary: {
|
|
15487
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("primary"),
|
|
15488
|
+
fallbackDirection: "darker"
|
|
15489
|
+
},
|
|
15490
|
+
secondary: {
|
|
15491
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
15492
|
+
fallbackDirection: "darker"
|
|
15493
|
+
},
|
|
15494
|
+
outline: {
|
|
15495
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
15496
|
+
fallbackDirection: "darker"
|
|
15497
|
+
},
|
|
15498
|
+
ghost: {
|
|
15499
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
15500
|
+
fallbackDirection: "darker"
|
|
15501
|
+
},
|
|
15502
|
+
accent: {
|
|
15503
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("accent"),
|
|
15504
|
+
fallbackDirection: "darker"
|
|
15505
|
+
}
|
|
15506
|
+
};
|
|
15507
|
+
const hoverControl = {
|
|
15508
|
+
kind: "button-hover-by-role",
|
|
15509
|
+
parameter: "hoverPreferences",
|
|
15510
|
+
label: "Button hover",
|
|
15511
|
+
roles: contextualRoleConfig,
|
|
15512
|
+
options: [
|
|
15513
|
+
{
|
|
15514
|
+
value: "contextual",
|
|
15515
|
+
label: "Contextual shade shift"
|
|
15516
|
+
},
|
|
15517
|
+
{
|
|
15518
|
+
value: "secondary",
|
|
15519
|
+
label: "Secondary button colour"
|
|
15520
|
+
},
|
|
15521
|
+
{
|
|
15522
|
+
value: "accent",
|
|
15523
|
+
label: "Accent button colour"
|
|
15524
|
+
}
|
|
15525
|
+
]
|
|
15526
|
+
};
|
|
15527
|
+
const lift = { effectId: "lift" };
|
|
15528
|
+
const flatInkRecipe = defineButtonStyleRecipe({
|
|
15529
|
+
id: "flat-ink",
|
|
15530
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
15531
|
+
tags: {
|
|
15532
|
+
tone: "classic",
|
|
15533
|
+
energy: "calm",
|
|
15534
|
+
motion: "subtle",
|
|
15535
|
+
era: "editorial"
|
|
15536
|
+
},
|
|
15537
|
+
parameterSchema: flatInkParametersSchema,
|
|
15538
|
+
defaultParameters: {},
|
|
15539
|
+
controls: [hoverControl],
|
|
15540
|
+
defineSystem: (parameters) => ({
|
|
15541
|
+
global: {
|
|
15542
|
+
cornerStyle: "rounded",
|
|
15543
|
+
textTransform: "none",
|
|
15544
|
+
fontWeight: 600,
|
|
15545
|
+
typography: "body",
|
|
15546
|
+
letterSpacing: "tight",
|
|
15547
|
+
paddingPreset: "default",
|
|
15548
|
+
hoverTransform: "lift",
|
|
15549
|
+
hoverColor: "none"
|
|
15550
|
+
},
|
|
15551
|
+
sizes: {
|
|
15552
|
+
sm: {
|
|
15553
|
+
padding: "0.625rem 1.125rem",
|
|
15554
|
+
fontSize: "text-sm"
|
|
15555
|
+
},
|
|
15556
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
15557
|
+
lg: {
|
|
15558
|
+
padding: "0.9375rem 1.625rem",
|
|
15559
|
+
fontSize: "text-lg"
|
|
15560
|
+
},
|
|
15561
|
+
xl: {
|
|
15562
|
+
padding: "1.0625rem 2rem",
|
|
15563
|
+
fontSize: "text-xl"
|
|
15564
|
+
}
|
|
15565
|
+
},
|
|
15566
|
+
roles: {
|
|
15567
|
+
primary: {
|
|
15568
|
+
kind: "complete",
|
|
15569
|
+
appearance: {
|
|
15570
|
+
background: {
|
|
15571
|
+
type: "solid",
|
|
15572
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
15573
|
+
},
|
|
15574
|
+
borderRadius: "rounded-lg",
|
|
15575
|
+
affordance: { iconId: "ArrowRight" },
|
|
15576
|
+
...hoverAppearance("primary", parameters, [lift, {
|
|
15577
|
+
effectId: "background-on-hover",
|
|
15578
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
15579
|
+
}])
|
|
15580
|
+
}
|
|
15581
|
+
},
|
|
15582
|
+
secondary: {
|
|
15583
|
+
kind: "complete",
|
|
15584
|
+
appearance: {
|
|
15585
|
+
background: {
|
|
15586
|
+
type: "surface",
|
|
15587
|
+
role: "link"
|
|
15588
|
+
},
|
|
15589
|
+
borderRadius: "rounded-lg",
|
|
15590
|
+
border: { widthClass: "border" },
|
|
15591
|
+
...hoverAppearance("secondary", parameters, [lift, {
|
|
15592
|
+
effectId: "background-on-hover",
|
|
15593
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
15594
|
+
}])
|
|
15595
|
+
}
|
|
15596
|
+
},
|
|
15597
|
+
outline: {
|
|
15598
|
+
kind: "complete",
|
|
15599
|
+
appearance: {
|
|
15600
|
+
background: {
|
|
15601
|
+
type: "surface",
|
|
15602
|
+
role: "link"
|
|
15603
|
+
},
|
|
15604
|
+
borderRadius: "rounded-lg",
|
|
15605
|
+
border: { widthClass: "border" },
|
|
15606
|
+
...hoverAppearance("outline", parameters, [lift, {
|
|
15607
|
+
effectId: "background-on-hover",
|
|
15608
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
15609
|
+
}])
|
|
15610
|
+
}
|
|
15611
|
+
},
|
|
15612
|
+
ghost: {
|
|
15613
|
+
kind: "complete",
|
|
15614
|
+
appearance: {
|
|
15615
|
+
background: {
|
|
15616
|
+
type: "surface",
|
|
15617
|
+
role: "link"
|
|
15618
|
+
},
|
|
15619
|
+
borderRadius: "rounded-lg",
|
|
15620
|
+
...hoverAppearance("ghost", parameters, [lift])
|
|
15621
|
+
}
|
|
15622
|
+
},
|
|
15623
|
+
accent: {
|
|
15624
|
+
kind: "complete",
|
|
15625
|
+
appearance: {
|
|
15626
|
+
background: {
|
|
15627
|
+
type: "solid",
|
|
15628
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
15629
|
+
},
|
|
15630
|
+
borderRadius: "rounded-lg",
|
|
15631
|
+
affordance: { iconId: "ArrowRight" },
|
|
15632
|
+
...hoverAppearance("accent", parameters, [lift])
|
|
15633
|
+
}
|
|
15634
|
+
}
|
|
15635
|
+
}
|
|
15636
|
+
})
|
|
15637
|
+
});
|
|
15638
|
+
function hoverAppearance(role, parameters, recommended) {
|
|
15639
|
+
const preference = parameters.hoverPreferences?.[role];
|
|
15640
|
+
if (preference === void 0) return { effects: { hover: [...recommended] } };
|
|
15641
|
+
if (preference === "contextual") {
|
|
15642
|
+
const config = contextualRoleConfig[role];
|
|
15643
|
+
return {
|
|
15644
|
+
effects: { hover: [lift] },
|
|
15645
|
+
contextualHover: {
|
|
15646
|
+
kind: "shade-shift",
|
|
15647
|
+
seedToken: config.contextualSeedToken,
|
|
15648
|
+
fallbackDirection: config.fallbackDirection
|
|
15649
|
+
}
|
|
15650
|
+
};
|
|
15651
|
+
}
|
|
15652
|
+
const config = contextualRoleConfig[role];
|
|
15653
|
+
return {
|
|
15654
|
+
effects: { hover: [lift] },
|
|
15655
|
+
contextualHover: {
|
|
15656
|
+
kind: "shade-shift",
|
|
15657
|
+
seedToken: config.contextualSeedToken,
|
|
15658
|
+
fallbackDirection: config.fallbackDirection,
|
|
15659
|
+
preferredToken: unsafeAsOpaqueButtonColourToken(paletteRole(preference))
|
|
15660
|
+
}
|
|
15661
|
+
};
|
|
15662
|
+
}
|
|
15663
|
+
function paletteRole(preference) {
|
|
15664
|
+
return preference;
|
|
15665
|
+
}
|
|
15666
|
+
//#endregion
|
|
14767
15667
|
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
14768
15668
|
const emptyParametersSchema = z.object({}).strict();
|
|
14769
15669
|
function defineStaticButtonStyleRecipe(input) {
|
|
@@ -15610,113 +16510,6 @@ const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
|
15610
16510
|
}
|
|
15611
16511
|
}
|
|
15612
16512
|
});
|
|
15613
|
-
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
15614
|
-
id: "flat-ink",
|
|
15615
|
-
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
15616
|
-
tags: {
|
|
15617
|
-
tone: "classic",
|
|
15618
|
-
energy: "calm",
|
|
15619
|
-
motion: "subtle",
|
|
15620
|
-
era: "editorial"
|
|
15621
|
-
},
|
|
15622
|
-
system: {
|
|
15623
|
-
global: {
|
|
15624
|
-
cornerStyle: "rounded",
|
|
15625
|
-
textTransform: "none",
|
|
15626
|
-
fontWeight: 600,
|
|
15627
|
-
typography: "body",
|
|
15628
|
-
letterSpacing: "tight",
|
|
15629
|
-
paddingPreset: "default",
|
|
15630
|
-
hoverTransform: "lift",
|
|
15631
|
-
hoverColor: "none"
|
|
15632
|
-
},
|
|
15633
|
-
sizes: {
|
|
15634
|
-
sm: {
|
|
15635
|
-
padding: "0.625rem 1.125rem",
|
|
15636
|
-
fontSize: "text-sm"
|
|
15637
|
-
},
|
|
15638
|
-
md: { padding: "0.8125rem 1.375rem" },
|
|
15639
|
-
lg: {
|
|
15640
|
-
padding: "0.9375rem 1.625rem",
|
|
15641
|
-
fontSize: "text-lg"
|
|
15642
|
-
},
|
|
15643
|
-
xl: {
|
|
15644
|
-
padding: "1.0625rem 2rem",
|
|
15645
|
-
fontSize: "text-xl"
|
|
15646
|
-
}
|
|
15647
|
-
},
|
|
15648
|
-
roles: {
|
|
15649
|
-
primary: {
|
|
15650
|
-
kind: "complete",
|
|
15651
|
-
appearance: {
|
|
15652
|
-
background: {
|
|
15653
|
-
type: "solid",
|
|
15654
|
-
colorToken: "primary"
|
|
15655
|
-
},
|
|
15656
|
-
borderRadius: "rounded-lg",
|
|
15657
|
-
affordance: { iconId: "ArrowRight" },
|
|
15658
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
15659
|
-
effectId: "background-on-hover",
|
|
15660
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
15661
|
-
}] }
|
|
15662
|
-
}
|
|
15663
|
-
},
|
|
15664
|
-
secondary: {
|
|
15665
|
-
kind: "complete",
|
|
15666
|
-
appearance: {
|
|
15667
|
-
background: {
|
|
15668
|
-
type: "surface",
|
|
15669
|
-
role: "link"
|
|
15670
|
-
},
|
|
15671
|
-
borderRadius: "rounded-lg",
|
|
15672
|
-
border: { widthClass: "border" },
|
|
15673
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
15674
|
-
effectId: "background-on-hover",
|
|
15675
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
15676
|
-
}] }
|
|
15677
|
-
}
|
|
15678
|
-
},
|
|
15679
|
-
outline: {
|
|
15680
|
-
kind: "complete",
|
|
15681
|
-
appearance: {
|
|
15682
|
-
background: {
|
|
15683
|
-
type: "surface",
|
|
15684
|
-
role: "link"
|
|
15685
|
-
},
|
|
15686
|
-
borderRadius: "rounded-lg",
|
|
15687
|
-
border: { widthClass: "border" },
|
|
15688
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
15689
|
-
effectId: "background-on-hover",
|
|
15690
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
15691
|
-
}] }
|
|
15692
|
-
}
|
|
15693
|
-
},
|
|
15694
|
-
ghost: {
|
|
15695
|
-
kind: "complete",
|
|
15696
|
-
appearance: {
|
|
15697
|
-
background: {
|
|
15698
|
-
type: "surface",
|
|
15699
|
-
role: "link"
|
|
15700
|
-
},
|
|
15701
|
-
borderRadius: "rounded-lg",
|
|
15702
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
15703
|
-
}
|
|
15704
|
-
},
|
|
15705
|
-
accent: {
|
|
15706
|
-
kind: "complete",
|
|
15707
|
-
appearance: {
|
|
15708
|
-
background: {
|
|
15709
|
-
type: "solid",
|
|
15710
|
-
colorToken: "accent"
|
|
15711
|
-
},
|
|
15712
|
-
borderRadius: "rounded-lg",
|
|
15713
|
-
affordance: { iconId: "ArrowRight" },
|
|
15714
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
15715
|
-
}
|
|
15716
|
-
}
|
|
15717
|
-
}
|
|
15718
|
-
}
|
|
15719
|
-
});
|
|
15720
16513
|
const showtimePillRecipe = defineStaticButtonStyleRecipe({
|
|
15721
16514
|
id: "showtime-pill",
|
|
15722
16515
|
accessibilityLabel: "Bold uppercase pill buttons with playful movement",
|
|
@@ -16138,8 +16931,8 @@ const openCardRoleValue = "open";
|
|
|
16138
16931
|
*/
|
|
16139
16932
|
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
16140
16933
|
/**
|
|
16141
|
-
* The closed
|
|
16142
|
-
*
|
|
16934
|
+
* The closed role vocabulary Looks and blocks use for surfaced and boxless
|
|
16935
|
+
* card choices.
|
|
16143
16936
|
*
|
|
16144
16937
|
* - `none` — no site-style card surface; the block's own composition and
|
|
16145
16938
|
* the author's own card fields govern the item. This is *not*
|
|
@@ -16151,11 +16944,6 @@ const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
|
16151
16944
|
* - `alternative` — the statement card carrying the site's personality
|
|
16152
16945
|
*/
|
|
16153
16946
|
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
16154
|
-
const legacyCardVariantRoleAliases = {
|
|
16155
|
-
variant1: "alternative",
|
|
16156
|
-
variant2: "alternative",
|
|
16157
|
-
statement: "alternative"
|
|
16158
|
-
};
|
|
16159
16947
|
const cardSpacingSchema = z.enum([
|
|
16160
16948
|
"none",
|
|
16161
16949
|
"compact",
|
|
@@ -16185,33 +16973,21 @@ const gradientDirectionSchema = z.enum([
|
|
|
16185
16973
|
"to-br",
|
|
16186
16974
|
"to-bl"
|
|
16187
16975
|
]);
|
|
16188
|
-
|
|
16976
|
+
z.enum(cardVariantRoleValues);
|
|
16189
16977
|
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
16190
16978
|
const cardRoleSchema = z.enum(cardRoleValues);
|
|
16191
|
-
/**
|
|
16192
|
-
* Historical name for the role vocabulary as it reaches box styles. Widened to
|
|
16193
|
-
* the full `CardRole` set — old values keep parsing, `open` now parses too.
|
|
16194
|
-
*/
|
|
16195
|
-
const boxStylesCardVariantSchema = cardRoleSchema;
|
|
16196
16979
|
function isCardVariantRole(value) {
|
|
16197
16980
|
return typeof value === "string" && cardVariantRoleValues.includes(value);
|
|
16198
16981
|
}
|
|
16199
16982
|
function normalizeCardVariantRole(value) {
|
|
16200
|
-
|
|
16201
|
-
if (typeof value !== "string") return null;
|
|
16202
|
-
return legacyCardVariantRoleAliases[value] ?? null;
|
|
16983
|
+
return isCardVariantRole(value) ? value : null;
|
|
16203
16984
|
}
|
|
16204
|
-
/**
|
|
16205
|
-
* The one untrusted-input boundary for the role vocabulary. Legacy alias values
|
|
16206
|
-
* (`variant1`, `variant2`, `statement`) normalize here and nowhere else.
|
|
16207
|
-
*/
|
|
16985
|
+
/** The one untrusted-input boundary for the closed role vocabulary. */
|
|
16208
16986
|
function normalizeCardRole(value) {
|
|
16209
16987
|
if (value === "none") return boxlessCardVariantValue;
|
|
16210
16988
|
if (value === "open") return openCardRoleValue;
|
|
16211
16989
|
return normalizeCardVariantRole(value);
|
|
16212
16990
|
}
|
|
16213
|
-
/** Historical name for {@link normalizeCardRole}. */
|
|
16214
|
-
const normalizeBoxStylesCardVariant = normalizeCardRole;
|
|
16215
16991
|
const PRIORITY_ROLE_INFERENCE = {
|
|
16216
16992
|
1: "default",
|
|
16217
16993
|
2: "alternative"
|
|
@@ -17156,6 +17932,21 @@ const eventListTreatmentValues = [
|
|
|
17156
17932
|
"editorial-register",
|
|
17157
17933
|
"dense-index"
|
|
17158
17934
|
];
|
|
17935
|
+
const testimonialsCompositionTreatmentValues = [
|
|
17936
|
+
"open-editorial",
|
|
17937
|
+
"evergreen-lead",
|
|
17938
|
+
"room-and-response",
|
|
17939
|
+
"open-floor"
|
|
17940
|
+
];
|
|
17941
|
+
/**
|
|
17942
|
+
* How an offerings preview arranges its groups. Structure only — the group
|
|
17943
|
+
* card surface is the Look's `cardRole` and the site style's card system.
|
|
17944
|
+
*/
|
|
17945
|
+
const offeringsPreviewCompositionTreatmentValues = [
|
|
17946
|
+
"paired-feature-cards",
|
|
17947
|
+
"open-editorial-columns",
|
|
17948
|
+
"joined-programme-panel"
|
|
17949
|
+
];
|
|
17159
17950
|
const eyebrowTreatmentValues = [
|
|
17160
17951
|
"plain",
|
|
17161
17952
|
"accent",
|
|
@@ -17689,8 +18480,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
17689
18480
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
17690
18481
|
raised: z.boolean().nullable().optional(),
|
|
17691
18482
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
17692
|
-
role: cardRoleSchema.nullable().optional()
|
|
17693
|
-
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
18483
|
+
role: cardRoleSchema.nullable().optional()
|
|
17694
18484
|
});
|
|
17695
18485
|
const blockStyleOverridesSchema = z.object({
|
|
17696
18486
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
@@ -18579,7 +19369,12 @@ defineBlockAppearancePreset({
|
|
|
18579
19369
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
18580
19370
|
design: {
|
|
18581
19371
|
sectionSurface: "base",
|
|
18582
|
-
contentFrame: plainFrame
|
|
19372
|
+
contentFrame: plainFrame,
|
|
19373
|
+
cardRole: "alternative",
|
|
19374
|
+
composition: {
|
|
19375
|
+
kind: "offerings-preview",
|
|
19376
|
+
treatment: "paired-feature-cards"
|
|
19377
|
+
}
|
|
18583
19378
|
}
|
|
18584
19379
|
}), defineBlockAppearancePreset({
|
|
18585
19380
|
id: "offerings-preview-open-editorial-columns",
|
|
@@ -18589,7 +19384,12 @@ defineBlockAppearancePreset({
|
|
|
18589
19384
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
18590
19385
|
design: {
|
|
18591
19386
|
sectionSurface: "base",
|
|
18592
|
-
contentFrame: plainFrame
|
|
19387
|
+
contentFrame: plainFrame,
|
|
19388
|
+
cardRole: "open",
|
|
19389
|
+
composition: {
|
|
19390
|
+
kind: "offerings-preview",
|
|
19391
|
+
treatment: "open-editorial-columns"
|
|
19392
|
+
}
|
|
18593
19393
|
}
|
|
18594
19394
|
}), defineBlockAppearancePreset({
|
|
18595
19395
|
id: "offerings-preview-joined-programme-panel",
|
|
@@ -18599,7 +19399,12 @@ defineBlockAppearancePreset({
|
|
|
18599
19399
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
18600
19400
|
design: {
|
|
18601
19401
|
sectionSurface: "base",
|
|
18602
|
-
contentFrame: plainFrame
|
|
19402
|
+
contentFrame: plainFrame,
|
|
19403
|
+
cardRole: "default",
|
|
19404
|
+
composition: {
|
|
19405
|
+
kind: "offerings-preview",
|
|
19406
|
+
treatment: "joined-programme-panel"
|
|
19407
|
+
}
|
|
18603
19408
|
}
|
|
18604
19409
|
}), defineBlockAppearancePreset({
|
|
18605
19410
|
id: "feature-cards-raised-rule",
|
|
@@ -18841,7 +19646,11 @@ defineBlockAppearancePreset({
|
|
|
18841
19646
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
18842
19647
|
design: {
|
|
18843
19648
|
sectionSurface: "base",
|
|
18844
|
-
contentFrame: plainFrame
|
|
19649
|
+
contentFrame: plainFrame,
|
|
19650
|
+
composition: {
|
|
19651
|
+
kind: "testimonials",
|
|
19652
|
+
treatment: "evergreen-lead"
|
|
19653
|
+
}
|
|
18845
19654
|
}
|
|
18846
19655
|
}), defineBlockAppearancePreset({
|
|
18847
19656
|
id: "testimonials-room-and-response",
|
|
@@ -18851,7 +19660,11 @@ defineBlockAppearancePreset({
|
|
|
18851
19660
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
18852
19661
|
design: {
|
|
18853
19662
|
sectionSurface: "base",
|
|
18854
|
-
contentFrame: plainFrame
|
|
19663
|
+
contentFrame: plainFrame,
|
|
19664
|
+
composition: {
|
|
19665
|
+
kind: "testimonials",
|
|
19666
|
+
treatment: "room-and-response"
|
|
19667
|
+
}
|
|
18855
19668
|
}
|
|
18856
19669
|
}), defineBlockAppearancePreset({
|
|
18857
19670
|
id: "testimonials-open-floor",
|
|
@@ -18861,7 +19674,11 @@ defineBlockAppearancePreset({
|
|
|
18861
19674
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
18862
19675
|
design: {
|
|
18863
19676
|
sectionSurface: "base",
|
|
18864
|
-
contentFrame: plainFrame
|
|
19677
|
+
contentFrame: plainFrame,
|
|
19678
|
+
composition: {
|
|
19679
|
+
kind: "testimonials",
|
|
19680
|
+
treatment: "open-floor"
|
|
19681
|
+
}
|
|
18865
19682
|
}
|
|
18866
19683
|
}), defineBlockAppearancePreset({
|
|
18867
19684
|
id: "faq-base-accordion",
|
|
@@ -21888,7 +22705,8 @@ const curatedSiteStyles = [
|
|
|
21888
22705
|
buttonStyleChoices: [
|
|
21889
22706
|
buttonChoice("soft-pill"),
|
|
21890
22707
|
buttonChoice("pebble"),
|
|
21891
|
-
buttonChoice("confident-chip")
|
|
22708
|
+
buttonChoice("confident-chip"),
|
|
22709
|
+
buttonChoice("flat-ink")
|
|
21892
22710
|
],
|
|
21893
22711
|
paletteRecommendations: [
|
|
21894
22712
|
paletteRecommendation("soft-natural-sage"),
|
|
@@ -24733,8 +25551,41 @@ function containerStylesField(options = {}) {
|
|
|
24733
25551
|
return createBoxStylesFieldWithDepth("container", options);
|
|
24734
25552
|
}
|
|
24735
25553
|
function cardStylesField(options = {}) {
|
|
25554
|
+
if (options.controls === "role-only") return createRoleOnlyCardStylesField(options);
|
|
24736
25555
|
return createBoxStylesFieldWithDepth("card", options);
|
|
24737
25556
|
}
|
|
25557
|
+
function createRoleOnlyCardStylesField(options) {
|
|
25558
|
+
const { id = "_cardStyles", label = "Card styles", renderInHeader, intent } = options;
|
|
25559
|
+
return {
|
|
25560
|
+
id,
|
|
25561
|
+
type: "modal",
|
|
25562
|
+
label,
|
|
25563
|
+
required: false,
|
|
25564
|
+
schema: { fields: [{
|
|
25565
|
+
id: "role",
|
|
25566
|
+
type: "select",
|
|
25567
|
+
label: "Card style",
|
|
25568
|
+
description: "Choose a semantic card style from the active site style.",
|
|
25569
|
+
required: false,
|
|
25570
|
+
multiple: false,
|
|
25571
|
+
defaultValue: "default",
|
|
25572
|
+
options: cardVariantRoleValues.map((value) => ({
|
|
25573
|
+
value,
|
|
25574
|
+
label: value === "default" ? "Default" : "Alternative"
|
|
25575
|
+
}))
|
|
25576
|
+
}] },
|
|
25577
|
+
ui: {
|
|
25578
|
+
...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
|
|
25579
|
+
...intent ? { intent } : {},
|
|
25580
|
+
modalConfig: {
|
|
25581
|
+
buttonLabel: label,
|
|
25582
|
+
description: "Choose the site-style card role.",
|
|
25583
|
+
buttonVariant: "outline",
|
|
25584
|
+
showCustomizedIndicator: true
|
|
25585
|
+
}
|
|
25586
|
+
}
|
|
25587
|
+
};
|
|
25588
|
+
}
|
|
24738
25589
|
//#endregion
|
|
24739
25590
|
//#region ../blocks/src/system/fields/imageShape.ts
|
|
24740
25591
|
const standardImageShapeOptions = [
|
|
@@ -25930,21 +26781,29 @@ function cardRoleClass(role) {
|
|
|
25930
26781
|
return `card-role-${role}`;
|
|
25931
26782
|
}
|
|
25932
26783
|
/**
|
|
26784
|
+
* The role class for a card slot the *block* owns structurally, where a Look
|
|
26785
|
+
* may still name the surface.
|
|
26786
|
+
*
|
|
26787
|
+
* Some layouts have more than one card slot and decide themselves which one is
|
|
26788
|
+
* the statement — the featured-editorial testimonials field is a lead voice
|
|
26789
|
+
* beside its supporting voices, and that is structure, not composition. Those
|
|
26790
|
+
* slots still have to honour a Look that picks a surface, or a role-picking
|
|
26791
|
+
* Look would silently no-op under the layout. So the slot carries a default
|
|
26792
|
+
* role and the Look's compiled role wins over it when there is one.
|
|
26793
|
+
*
|
|
26794
|
+
* An explicit `none` is honoured as boxlessness and emits no class, matching
|
|
26795
|
+
* how the composite emitter reads it.
|
|
26796
|
+
*/
|
|
26797
|
+
/**
|
|
25933
26798
|
* The role a card renders with, and the one place a set of card styles becomes
|
|
25934
26799
|
* a role.
|
|
25935
26800
|
*
|
|
25936
|
-
* Precedence: a per-item override, then the `role` a Look
|
|
25937
|
-
* block's card styles
|
|
25938
|
-
*
|
|
25939
|
-
* vocabulary — an explicit `role` wins when a record carries both.
|
|
25940
|
-
*
|
|
25941
|
-
* Compiled and freshly authored card styles carry only `role`. `cardVariant`
|
|
25942
|
-
* survives on content persisted before the role contract, and normalizes here
|
|
25943
|
-
* rather than in `cardStylesOverrideSchema` because that content reaches the
|
|
25944
|
-
* renderer as a raw record without ever passing through the schema.
|
|
26801
|
+
* Precedence: a per-item override, then the `role` a Look or semantic field
|
|
26802
|
+
* compiled onto the block's card styles. Persisted inputs are normalized at
|
|
26803
|
+
* this boundary because raw block records do not pass through the theme schema.
|
|
25945
26804
|
*/
|
|
25946
26805
|
function resolveCardRoleForBoxStyles(input, override) {
|
|
25947
|
-
return override ?? normalizeCardRole(input.role)
|
|
26806
|
+
return override ?? normalizeCardRole(input.role);
|
|
25948
26807
|
}
|
|
25949
26808
|
/**
|
|
25950
26809
|
* Parse a block's own per-item surface vocabulary into a card role. The alias
|
|
@@ -25961,8 +26820,8 @@ function resolveItemCardRole(value, aliases) {
|
|
|
25961
26820
|
* The card surface for a set of box styles: one role, one class vocabulary, so
|
|
25962
26821
|
* a site-style swap re-skins the card whichever field named it.
|
|
25963
26822
|
*/
|
|
25964
|
-
function cardSurface(input, override) {
|
|
25965
|
-
const role = resolveCardRoleForBoxStyles(input, override);
|
|
26823
|
+
function cardSurface(input, override, fallback) {
|
|
26824
|
+
const role = resolveCardRoleForBoxStyles(input, override) ?? fallback ?? null;
|
|
25966
26825
|
if (!role) return {
|
|
25967
26826
|
role: null,
|
|
25968
26827
|
classes: []
|
|
@@ -26059,10 +26918,9 @@ function raisedClassFor(options) {
|
|
|
26059
26918
|
* of keeping a copy that drifts.
|
|
26060
26919
|
*/
|
|
26061
26920
|
function boxStyleClassNames(value, options) {
|
|
26062
|
-
|
|
26063
|
-
const input = value;
|
|
26921
|
+
const input = value && typeof value === "object" ? value : {};
|
|
26064
26922
|
const borderOverride = borderOverrideClass(input);
|
|
26065
|
-
const surface = cardSurface(input, options.cardRoleOverride);
|
|
26923
|
+
const surface = cardSurface(input, options.cardRoleOverride, options.cardRoleFallback);
|
|
26066
26924
|
const cardOwnsBorder = surface.role !== null && surface.role !== "none";
|
|
26067
26925
|
return [
|
|
26068
26926
|
borderOverride || cardOwnsBorder ? withoutBorderClasses(options.baseClass ?? "") : options.baseClass ?? "",
|
|
@@ -26210,29 +27068,41 @@ const cardRoleClassTransform = {
|
|
|
26210
27068
|
return baseClass ? `${baseClass.trim()} ${hook}` : hook;
|
|
26211
27069
|
}
|
|
26212
27070
|
};
|
|
26213
|
-
|
|
26214
|
-
|
|
27071
|
+
/**
|
|
27072
|
+
* The role class for a layout's own card slot, bound from the block's compiled
|
|
27073
|
+
* card styles so a Look that picks a surface still reaches a slot the layout
|
|
27074
|
+
* assigned a default role to.
|
|
27075
|
+
*/
|
|
27076
|
+
const cardSlotRoleTransform = {
|
|
27077
|
+
id: "boxStyles.cardSlotRole",
|
|
26215
27078
|
kind: "string",
|
|
26216
|
-
summary: "
|
|
26217
|
-
run: (value, options) => {
|
|
26218
|
-
|
|
26219
|
-
|
|
26220
|
-
|
|
26221
|
-
|
|
26222
|
-
return baseClass ? `${baseClass} ${roleClass}` : roleClass;
|
|
26223
|
-
}
|
|
27079
|
+
summary: "Resolve a layout card slot's role class, defaulting to the slot's own role",
|
|
27080
|
+
run: (value, options) => boxStyleClassNames(value, {
|
|
27081
|
+
baseClass: options?.baseClass,
|
|
27082
|
+
cardRoleFallback: options.slotDefault,
|
|
27083
|
+
includeSpacing: false
|
|
27084
|
+
})
|
|
26224
27085
|
};
|
|
27086
|
+
function resolveBorderColorState(value, options, viewModel) {
|
|
27087
|
+
const input = asPartialObject(options?.stylesPath ? readPath(viewModel, options.stylesPath) : value);
|
|
27088
|
+
if (!input) return null;
|
|
27089
|
+
return {
|
|
27090
|
+
input,
|
|
27091
|
+
role: resolveCardRoleForBoxStyles(input, options?.stylesPath ? resolveItemCardRole(value, options.itemRoleAliases) : void 0)
|
|
27092
|
+
};
|
|
27093
|
+
}
|
|
26225
27094
|
const boxStylesBorderColorTransform = {
|
|
26226
27095
|
id: "boxStyles.borderColor",
|
|
26227
27096
|
kind: "string",
|
|
26228
27097
|
summary: "Resolve border color from box styles border.colorToken",
|
|
26229
|
-
run: (value, options,
|
|
27098
|
+
run: (value, options, context) => {
|
|
26230
27099
|
const fallbackToken = options?.fallbackToken ?? "border";
|
|
26231
27100
|
const returnEmptyForDefault = options?.returnEmptyForDefault ?? false;
|
|
26232
27101
|
let explicitToken = null;
|
|
26233
|
-
const
|
|
26234
|
-
if (
|
|
26235
|
-
|
|
27102
|
+
const state = resolveBorderColorState(value, options, context.viewModel);
|
|
27103
|
+
if (state) {
|
|
27104
|
+
if (state.role && state.role !== "none") return "";
|
|
27105
|
+
const border = normalizeBoxStylesBorder(state.input.border);
|
|
26236
27106
|
if (border && border.enabled === true && border.colorToken) explicitToken = border.colorToken;
|
|
26237
27107
|
}
|
|
26238
27108
|
if (explicitToken) {
|
|
@@ -26452,7 +27322,7 @@ const boxStylesTransforms = [
|
|
|
26452
27322
|
roundedTransform,
|
|
26453
27323
|
boxStylesCompositeTransform,
|
|
26454
27324
|
cardRoleClassTransform,
|
|
26455
|
-
|
|
27325
|
+
cardSlotRoleTransform,
|
|
26456
27326
|
boxStylesBorderColorTransform,
|
|
26457
27327
|
sectionClassNameTransform,
|
|
26458
27328
|
containerStylesResolveClassName,
|
|
@@ -26559,10 +27429,16 @@ function styledCard(children, opts, ...mods) {
|
|
|
26559
27429
|
const style = {
|
|
26560
27430
|
...opts.style ?? {},
|
|
26561
27431
|
borderColor: { $bind: {
|
|
26562
|
-
from: opts.stylesFrom,
|
|
27432
|
+
from: opts.itemRole?.from ?? opts.stylesFrom,
|
|
26563
27433
|
transforms: [{
|
|
26564
27434
|
id: "boxStyles.borderColor",
|
|
26565
|
-
options: {
|
|
27435
|
+
options: {
|
|
27436
|
+
returnEmptyForDefault: true,
|
|
27437
|
+
...opts.itemRole ? {
|
|
27438
|
+
stylesPath: opts.stylesFrom,
|
|
27439
|
+
...opts.itemRole.aliases ? { itemRoleAliases: opts.itemRole.aliases } : {}
|
|
27440
|
+
} : {}
|
|
27441
|
+
}
|
|
26566
27442
|
}]
|
|
26567
27443
|
} }
|
|
26568
27444
|
};
|
|
@@ -27687,18 +28563,73 @@ function buildGridCardsLayout(className) {
|
|
|
27687
28563
|
return el("div", { className }, buildResponsiveGridCards());
|
|
27688
28564
|
}
|
|
27689
28565
|
/**
|
|
28566
|
+
* The card slots the featured-editorial layout has, and the role each one
|
|
28567
|
+
* defaults to.
|
|
28568
|
+
*
|
|
28569
|
+
* Which slot is the statement is *structure*, so the layout decides it: this
|
|
28570
|
+
* variant exists to put one lead voice beside its supporting voices. But a Look
|
|
28571
|
+
* that picks a surface has to keep meaning something here, so the lead slot's
|
|
28572
|
+
* role is a default the Look's compiled `cardRole` wins over — see
|
|
28573
|
+
* `cardSlotRoleClass`. Supporting voices stay the quiet everyday card.
|
|
28574
|
+
*/
|
|
28575
|
+
const FEATURED_EDITORIAL_SLOTS = {
|
|
28576
|
+
lead: {
|
|
28577
|
+
/** Composition CSS addresses the lead card's geometry through this. */
|
|
28578
|
+
variantClass: "rb-testimonials-fe-card--feature",
|
|
28579
|
+
slotDefault: "alternative",
|
|
28580
|
+
followsLook: true
|
|
28581
|
+
},
|
|
28582
|
+
support: {
|
|
28583
|
+
variantClass: null,
|
|
28584
|
+
slotDefault: "default",
|
|
28585
|
+
followsLook: false
|
|
28586
|
+
}
|
|
28587
|
+
};
|
|
28588
|
+
/** Where the testimonials block's compiled card styles live. */
|
|
28589
|
+
const TESTIMONIALS_CARD_STYLES_PATH = "content._cardStyles";
|
|
28590
|
+
/**
|
|
28591
|
+
* The class list for one featured-editorial card slot.
|
|
28592
|
+
*
|
|
28593
|
+
* A slot that follows the Look has to resolve at render time, so it binds
|
|
28594
|
+
* through the shared card-class emitter rather than naming a role class here;
|
|
28595
|
+
* a slot that does not is a plain string built by the same composite emitter.
|
|
28596
|
+
*/
|
|
28597
|
+
function featuredEditorialCardClassName(slot) {
|
|
28598
|
+
const { variantClass, slotDefault, followsLook } = FEATURED_EDITORIAL_SLOTS[slot];
|
|
28599
|
+
const baseClass = ["rb-testimonials-fe-card", variantClass].filter(Boolean).join(" ");
|
|
28600
|
+
if (!followsLook) return boxStyleClassNames({}, {
|
|
28601
|
+
baseClass,
|
|
28602
|
+
cardRoleFallback: slotDefault,
|
|
28603
|
+
includeSpacing: false
|
|
28604
|
+
});
|
|
28605
|
+
return { $bind: {
|
|
28606
|
+
from: TESTIMONIALS_CARD_STYLES_PATH,
|
|
28607
|
+
transforms: [{
|
|
28608
|
+
id: "boxStyles.cardSlotRole",
|
|
28609
|
+
options: {
|
|
28610
|
+
baseClass,
|
|
28611
|
+
slotDefault
|
|
28612
|
+
}
|
|
28613
|
+
}],
|
|
28614
|
+
fallback: boxStyleClassNames({}, {
|
|
28615
|
+
baseClass,
|
|
28616
|
+
cardRoleFallback: slotDefault,
|
|
28617
|
+
includeSpacing: false
|
|
28618
|
+
})
|
|
28619
|
+
} };
|
|
28620
|
+
}
|
|
28621
|
+
/**
|
|
27690
28622
|
* Build a single "featured editorial" testimonial card.
|
|
27691
28623
|
*
|
|
27692
|
-
* This card type deliberately renders NO avatar/headshot:
|
|
27693
|
-
*
|
|
27694
|
-
*
|
|
27695
|
-
*
|
|
27696
|
-
* - `rb-testimonials-fe-card--plain` → white surface card
|
|
28624
|
+
* This card type deliberately renders NO avatar/headshot: a quote mark, the
|
|
28625
|
+
* quote body, then the author name and a context line. The card surface comes
|
|
28626
|
+
* from the slot's card role — the site style owns the fill, border, corners and
|
|
28627
|
+
* padding.
|
|
27697
28628
|
*
|
|
27698
28629
|
* Extra modifiers (`repeat`, `when`) are forwarded to the card node so the
|
|
27699
28630
|
* caller can drive first-vs-rest branching.
|
|
27700
28631
|
*/
|
|
27701
|
-
function buildFeaturedEditorialCard(
|
|
28632
|
+
function buildFeaturedEditorialCard(slot, ...mods) {
|
|
27702
28633
|
const quoteMark = text({
|
|
27703
28634
|
as: "span",
|
|
27704
28635
|
className: "rb-testimonials-fe-qmark",
|
|
@@ -27712,11 +28643,11 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
27712
28643
|
as: "span",
|
|
27713
28644
|
className: "rb-testimonials-fe-context"
|
|
27714
28645
|
}, when("testimonial.content.jobTitle"), bind("testimonial.content.jobTitle"))]);
|
|
27715
|
-
return el("div", { className:
|
|
28646
|
+
return el("div", { className: featuredEditorialCardClassName(slot) }, [el("div", { className: "card-content rb-testimonials-fe-card-body" }, [
|
|
27716
28647
|
quoteMark,
|
|
27717
28648
|
quote,
|
|
27718
28649
|
meta
|
|
27719
|
-
], ...mods);
|
|
28650
|
+
])], ...mods);
|
|
27720
28651
|
}
|
|
27721
28652
|
/**
|
|
27722
28653
|
* Build the "featured editorial" layout: an asymmetric two-column arrangement
|
|
@@ -27730,7 +28661,7 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
27730
28661
|
* index scope in context, so entry 0 produces no node in the rest column.
|
|
27731
28662
|
*/
|
|
27732
28663
|
function buildFeaturedEditorialLayout() {
|
|
27733
|
-
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("
|
|
28664
|
+
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", {
|
|
27734
28665
|
equals: 0,
|
|
27735
28666
|
not: true
|
|
27736
28667
|
}))])]);
|
|
@@ -28457,7 +29388,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
28457
29388
|
});
|
|
28458
29389
|
//#endregion
|
|
28459
29390
|
//#region ../blocks/src/system/fragments/library/card.ts
|
|
28460
|
-
const cardVariantOptions
|
|
29391
|
+
const cardVariantOptions = cardVariantRoleValues.map((value) => ({
|
|
28461
29392
|
value,
|
|
28462
29393
|
label: value === "default" ? "Default" : "Alternative"
|
|
28463
29394
|
}));
|
|
@@ -28555,7 +29486,7 @@ const cardFragment = defineFragment({
|
|
|
28555
29486
|
description: "Choose a card style from your theme",
|
|
28556
29487
|
required: false,
|
|
28557
29488
|
defaultValue: "default",
|
|
28558
|
-
options: cardVariantOptions
|
|
29489
|
+
options: cardVariantOptions,
|
|
28559
29490
|
ui: { intent: "style" }
|
|
28560
29491
|
}
|
|
28561
29492
|
],
|
|
@@ -28564,7 +29495,10 @@ const cardFragment = defineFragment({
|
|
|
28564
29495
|
className: { $bind: {
|
|
28565
29496
|
from: "variant",
|
|
28566
29497
|
fallback: "default",
|
|
28567
|
-
transforms: [{
|
|
29498
|
+
transforms: [{
|
|
29499
|
+
id: "boxStyles.cardRoleClass",
|
|
29500
|
+
options: { baseClass: "" }
|
|
29501
|
+
}]
|
|
28568
29502
|
} }
|
|
28569
29503
|
}, [media({
|
|
28570
29504
|
className: "card-media rb-w-full rb-h-auto rb-object-cover",
|
|
@@ -34530,19 +35464,30 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
34530
35464
|
]);
|
|
34531
35465
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
34532
35466
|
//#endregion
|
|
34533
|
-
//#region ../blocks/src/system/blocks/
|
|
34534
|
-
|
|
34535
|
-
|
|
34536
|
-
|
|
34537
|
-
|
|
35467
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
35468
|
+
const blockBookingConsentSchema = z.object({
|
|
35469
|
+
requirementId: z.string(),
|
|
35470
|
+
title: z.string(),
|
|
35471
|
+
agreement: RichTextDocSchema,
|
|
35472
|
+
checkboxLabel: z.string()
|
|
35473
|
+
});
|
|
35474
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
35475
|
+
id: z.string(),
|
|
35476
|
+
label: z.string(),
|
|
35477
|
+
type: z.literal("booking_requirement_consent"),
|
|
35478
|
+
required: z.literal(true),
|
|
35479
|
+
agreement: RichTextDocSchema,
|
|
35480
|
+
checkboxLabel: z.string().min(1)
|
|
35481
|
+
});
|
|
35482
|
+
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
35483
|
+
//#endregion
|
|
35484
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
35485
|
+
const wholeSeriesVenueSchema = z.object({
|
|
34538
35486
|
id: z.string(),
|
|
34539
35487
|
name: z.string(),
|
|
34540
35488
|
address: z.string().nullable()
|
|
34541
35489
|
});
|
|
34542
|
-
|
|
34543
|
-
* Zod schema for course session (occurrence) data
|
|
34544
|
-
*/
|
|
34545
|
-
const courseSessionSchema = z.object({
|
|
35490
|
+
const wholeSeriesSessionSchema = z.object({
|
|
34546
35491
|
id: z.string(),
|
|
34547
35492
|
startsAt: z.string(),
|
|
34548
35493
|
endsAt: z.string(),
|
|
@@ -34550,14 +35495,14 @@ const courseSessionSchema = z.object({
|
|
|
34550
35495
|
capacityOverride: z.number().nullable().optional(),
|
|
34551
35496
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
34552
35497
|
});
|
|
34553
|
-
const
|
|
35498
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
34554
35499
|
id: z.string(),
|
|
34555
35500
|
name: z.string(),
|
|
34556
35501
|
roleLabel: z.string().nullable(),
|
|
34557
35502
|
summary: z.string().nullable(),
|
|
34558
35503
|
profilePath: z.string().nullable()
|
|
34559
35504
|
});
|
|
34560
|
-
const
|
|
35505
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
34561
35506
|
id: z.string(),
|
|
34562
35507
|
name: z.string(),
|
|
34563
35508
|
description: z.string().nullable(),
|
|
@@ -34573,7 +35518,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
34573
35518
|
"both"
|
|
34574
35519
|
]).nullable().optional()
|
|
34575
35520
|
});
|
|
34576
|
-
const
|
|
35521
|
+
const wholeSeriesPricingSchema = z.object({
|
|
34577
35522
|
bookingRequirement: z.enum(["none", "required"]),
|
|
34578
35523
|
pricingStrategy: z.enum([
|
|
34579
35524
|
"free",
|
|
@@ -34587,22 +35532,20 @@ const coursePricingSchema = z.object({
|
|
|
34587
35532
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
34588
35533
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
34589
35534
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
34590
|
-
options: z.array(
|
|
35535
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
34591
35536
|
});
|
|
34592
|
-
/**
|
|
34593
|
-
* Zod schema for public course data
|
|
34594
|
-
*/
|
|
34595
35537
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
34596
35538
|
eventSeriesId: z.string(),
|
|
34597
35539
|
eventOfferingId: z.string(),
|
|
34598
35540
|
title: z.string(),
|
|
34599
35541
|
slug: z.string(),
|
|
34600
35542
|
description: z.unknown().nullable(),
|
|
34601
|
-
teamMembers: z.array(
|
|
35543
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
34602
35544
|
enrollmentOpen: z.boolean(),
|
|
34603
|
-
pricing:
|
|
35545
|
+
pricing: wholeSeriesPricingSchema,
|
|
34604
35546
|
currency: z.string(),
|
|
34605
35547
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
35548
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
34606
35549
|
enrollmentCapacity: z.number().nullable(),
|
|
34607
35550
|
acceptsMemberships: z.boolean(),
|
|
34608
35551
|
status: z.enum([
|
|
@@ -34613,12 +35556,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
34613
35556
|
sessionsCount: z.number(),
|
|
34614
35557
|
enrolledCount: z.number(),
|
|
34615
35558
|
availableSpots: z.number().nullable(),
|
|
34616
|
-
sessions: z.array(
|
|
34617
|
-
venue:
|
|
35559
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
35560
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
34618
35561
|
});
|
|
34619
|
-
|
|
34620
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
34621
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
35562
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
34622
35563
|
//#endregion
|
|
34623
35564
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
34624
35565
|
const eventPresetSchema = z.enum([
|
|
@@ -34922,6 +35863,7 @@ const publicEventSchema = z.object({
|
|
|
34922
35863
|
timeZone: z.string(),
|
|
34923
35864
|
pricing: publicEventPricingSchema,
|
|
34924
35865
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
35866
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
34925
35867
|
accessRestriction: accessRestrictionSchema,
|
|
34926
35868
|
allowedCategoryIds: z.array(z.string()),
|
|
34927
35869
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -34929,7 +35871,7 @@ const publicEventSchema = z.object({
|
|
|
34929
35871
|
acceptsMemberships: z.boolean().optional(),
|
|
34930
35872
|
wholeSeries: z.object({
|
|
34931
35873
|
eventSeriesId: z.string(),
|
|
34932
|
-
pricing:
|
|
35874
|
+
pricing: wholeSeriesPricingSchema,
|
|
34933
35875
|
currency: z.string(),
|
|
34934
35876
|
enrollmentOpen: z.boolean()
|
|
34935
35877
|
}).nullable().optional()
|
|
@@ -34938,24 +35880,19 @@ const publicEventSchema = z.object({
|
|
|
34938
35880
|
* Schema for an array of public events
|
|
34939
35881
|
*/
|
|
34940
35882
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
35883
|
+
//#endregion
|
|
35884
|
+
//#region ../blocks/src/system/blocks/events/shared/fields.ts
|
|
34941
35885
|
/**
|
|
34942
35886
|
* Shared card styling fields for event blocks
|
|
34943
35887
|
*/
|
|
34944
35888
|
const cardStylingFields = [
|
|
34945
|
-
{
|
|
34946
|
-
id: "
|
|
34947
|
-
type: "select",
|
|
35889
|
+
cardStylesField({
|
|
35890
|
+
id: "_cardStyles",
|
|
34948
35891
|
label: "Card style",
|
|
34949
|
-
|
|
34950
|
-
|
|
34951
|
-
|
|
34952
|
-
|
|
34953
|
-
options: cardVariantRoleValues.map((value) => ({
|
|
34954
|
-
value,
|
|
34955
|
-
label: value === "default" ? "Default" : "Alternative"
|
|
34956
|
-
})),
|
|
34957
|
-
ui: { intent: "style" }
|
|
34958
|
-
},
|
|
35892
|
+
controls: "role-only",
|
|
35893
|
+
renderInHeader: false,
|
|
35894
|
+
intent: "style"
|
|
35895
|
+
}),
|
|
34959
35896
|
createButtonVariantField({ description: "Choose a button style from your theme" }),
|
|
34960
35897
|
{
|
|
34961
35898
|
id: "buttonText",
|
|
@@ -35094,14 +36031,7 @@ function normalizeIdList(parts) {
|
|
|
35094
36031
|
}
|
|
35095
36032
|
//#endregion
|
|
35096
36033
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
35097
|
-
const eventSurfacePresetValues =
|
|
35098
|
-
"course",
|
|
35099
|
-
"term",
|
|
35100
|
-
"class",
|
|
35101
|
-
"workshop",
|
|
35102
|
-
"retreat",
|
|
35103
|
-
"performance"
|
|
35104
|
-
];
|
|
36034
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
35105
36035
|
const eventSurfaceScopeValues = [
|
|
35106
36036
|
"all",
|
|
35107
36037
|
"regularClassSchedule",
|
|
@@ -35282,6 +36212,25 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
35282
36212
|
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
35283
36213
|
}
|
|
35284
36214
|
//#endregion
|
|
36215
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
36216
|
+
function planEventRegistrationScope(input) {
|
|
36217
|
+
const subject = input.subject;
|
|
36218
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
36219
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
36220
|
+
kind: "context",
|
|
36221
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
36222
|
+
occurrenceContext: input.occurrenceContext,
|
|
36223
|
+
subject
|
|
36224
|
+
})
|
|
36225
|
+
};
|
|
36226
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
36227
|
+
return {
|
|
36228
|
+
kind: "selectedRun",
|
|
36229
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
36230
|
+
offering: selectedRunOffering
|
|
36231
|
+
};
|
|
36232
|
+
}
|
|
36233
|
+
//#endregion
|
|
35285
36234
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
35286
36235
|
function isRecord$10(value) {
|
|
35287
36236
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -35602,8 +36551,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
35602
36551
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
35603
36552
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
35604
36553
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
35605
|
-
wholeSeriesOfferings:
|
|
35606
|
-
wholeSeriesOffering:
|
|
36554
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
36555
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
35607
36556
|
maxTickets: z.string().optional(),
|
|
35608
36557
|
showVenue: z.boolean().optional(),
|
|
35609
36558
|
showCapacity: z.boolean().optional(),
|
|
@@ -35625,12 +36574,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
35625
36574
|
portalToken: z.string().nullable().optional(),
|
|
35626
36575
|
previewToken: z.string().nullable().optional(),
|
|
35627
36576
|
...eventRegistrationHydrationSchemaShape,
|
|
36577
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
35628
36578
|
className: z.string().nullable().optional(),
|
|
35629
36579
|
buttonText: z.string().nullable().optional(),
|
|
35630
36580
|
maxTickets: z.string().nullable().optional(),
|
|
35631
36581
|
stage: previewStageSchema.optional()
|
|
35632
36582
|
});
|
|
35633
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
36583
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
35634
36584
|
kind: z.literal("event-registration"),
|
|
35635
36585
|
state: z.literal("generic-shell"),
|
|
35636
36586
|
className: z.string().nullable(),
|
|
@@ -35638,7 +36588,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
35638
36588
|
bodyText: z.string(),
|
|
35639
36589
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
35640
36590
|
summaryButtonText: z.string()
|
|
35641
|
-
})
|
|
36591
|
+
}), z.object({
|
|
36592
|
+
kind: z.literal("event-registration"),
|
|
36593
|
+
state: z.literal("registration-closed"),
|
|
36594
|
+
className: z.string().nullable(),
|
|
36595
|
+
titleText: z.string(),
|
|
36596
|
+
bodyText: z.string()
|
|
36597
|
+
})]);
|
|
35642
36598
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
35643
36599
|
const eventRegistrationRenderSchema = z.object({
|
|
35644
36600
|
display: eventRegistrationDisplaySchema,
|
|
@@ -35652,6 +36608,13 @@ z.object({
|
|
|
35652
36608
|
stage: previewStageSchema.optional()
|
|
35653
36609
|
});
|
|
35654
36610
|
function buildEventRegistrationDisplay(source) {
|
|
36611
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
36612
|
+
kind: "event-registration",
|
|
36613
|
+
state: "registration-closed",
|
|
36614
|
+
className: source.className ?? null,
|
|
36615
|
+
titleText: "Registration closed",
|
|
36616
|
+
bodyText: "This run is no longer open for bookings."
|
|
36617
|
+
};
|
|
35655
36618
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
35656
36619
|
return {
|
|
35657
36620
|
kind: "event-registration",
|
|
@@ -35663,6 +36626,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
35663
36626
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
35664
36627
|
};
|
|
35665
36628
|
}
|
|
36629
|
+
function resolveWholeSeriesOffering(source) {
|
|
36630
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
36631
|
+
}
|
|
35666
36632
|
function buildEventRegistrationShellStepLabels(source) {
|
|
35667
36633
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
35668
36634
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -35678,10 +36644,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
35678
36644
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
35679
36645
|
}
|
|
35680
36646
|
function scopeEventRegistrationEvents(source) {
|
|
35681
|
-
|
|
36647
|
+
const scope = planEventRegistrationScope({
|
|
36648
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
36649
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
35682
36650
|
occurrenceContext: source.occurrenceContext,
|
|
35683
36651
|
subject: source.subject
|
|
35684
36652
|
});
|
|
36653
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
35685
36654
|
}
|
|
35686
36655
|
function shellLabelForRegistrationStep(step, events) {
|
|
35687
36656
|
switch (step) {
|
|
@@ -35720,7 +36689,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
35720
36689
|
subject: source.subject ?? null,
|
|
35721
36690
|
events: source.events ?? null,
|
|
35722
36691
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
35723
|
-
wholeSeriesOffering: source
|
|
36692
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
35724
36693
|
maxTickets: source.maxTickets ?? void 0,
|
|
35725
36694
|
showVenue: source.showVenue,
|
|
35726
36695
|
showCapacity: source.showCapacity,
|
|
@@ -35941,7 +36910,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
35941
36910
|
fallback: false
|
|
35942
36911
|
} },
|
|
35943
36912
|
events: { $bind: { from: "data.events" } },
|
|
35944
|
-
wholeSeriesOffering: { $bind: { from: "data.
|
|
36913
|
+
wholeSeriesOffering: { $bind: { from: "data.selectedRunOffering.offering" } },
|
|
36914
|
+
subjectWholeSeriesOffering: { $bind: { from: "data.subjectWholeSeriesOffering.offering" } },
|
|
36915
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
35945
36916
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
35946
36917
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
35947
36918
|
stage: { $bind: {
|
|
@@ -35955,7 +36926,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
35955
36926
|
runtime: eventRegistrationBlockRuntime,
|
|
35956
36927
|
dataSchemas: {
|
|
35957
36928
|
events: publicEventsArraySchema.optional(),
|
|
35958
|
-
|
|
36929
|
+
selectedRunOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
36930
|
+
subjectWholeSeriesOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
36931
|
+
wholeSeriesOfferings: z.array(publicWholeSeriesOfferingSchema).optional(),
|
|
35959
36932
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
35960
36933
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
35961
36934
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
@@ -35972,11 +36945,29 @@ const eventRegistrationBlockDefinition = {
|
|
|
35972
36945
|
} },
|
|
35973
36946
|
readProfile: "registration",
|
|
35974
36947
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
36948
|
+
seriesIds: { $bind: {
|
|
36949
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
36950
|
+
transforms: [{ id: "value.csv" }]
|
|
36951
|
+
} },
|
|
36952
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
35975
36953
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
35976
36954
|
},
|
|
35977
36955
|
mode: "server"
|
|
35978
36956
|
},
|
|
35979
|
-
|
|
36957
|
+
selectedRunOffering: {
|
|
36958
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
36959
|
+
params: {
|
|
36960
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
36961
|
+
eventSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
36962
|
+
stage: { $bind: {
|
|
36963
|
+
from: "$root.previewStage",
|
|
36964
|
+
fallback: "published"
|
|
36965
|
+
} }
|
|
36966
|
+
},
|
|
36967
|
+
requiredParams: ["eventSeriesId"],
|
|
36968
|
+
mode: "server"
|
|
36969
|
+
},
|
|
36970
|
+
subjectWholeSeriesOffering: {
|
|
35980
36971
|
endpoint: "getPublicWholeSeriesOffering",
|
|
35981
36972
|
when: { $bind: {
|
|
35982
36973
|
from: "$root.subject.isWholeSeriesBooking",
|
|
@@ -35993,6 +36984,22 @@ const eventRegistrationBlockDefinition = {
|
|
|
35993
36984
|
requiredParams: ["eventSeriesId"],
|
|
35994
36985
|
mode: "server"
|
|
35995
36986
|
},
|
|
36987
|
+
wholeSeriesOfferings: {
|
|
36988
|
+
endpoint: "listPublicWholeSeriesOfferings",
|
|
36989
|
+
params: {
|
|
36990
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
36991
|
+
eventSeriesIds: { $bind: {
|
|
36992
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
36993
|
+
transforms: [{ id: "value.csv" }]
|
|
36994
|
+
} },
|
|
36995
|
+
stage: { $bind: {
|
|
36996
|
+
from: "$root.previewStage",
|
|
36997
|
+
fallback: "published"
|
|
36998
|
+
} }
|
|
36999
|
+
},
|
|
37000
|
+
requiredParams: ["eventSeriesIds"],
|
|
37001
|
+
mode: "server"
|
|
37002
|
+
},
|
|
35996
37003
|
sitePasses: {
|
|
35997
37004
|
endpoint: "listPublicPasses",
|
|
35998
37005
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -36007,13 +37014,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
36007
37014
|
};
|
|
36008
37015
|
//#endregion
|
|
36009
37016
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
36010
|
-
const
|
|
36011
|
-
siteId: z.string().optional(),
|
|
36012
|
-
apiBaseUrl: z.string().optional(),
|
|
36013
|
-
portalToken: z.string().nullable().optional(),
|
|
37017
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
36014
37018
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
36015
|
-
courses: z.array(
|
|
36016
|
-
className: z.string().nullable().optional(),
|
|
37019
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
36017
37020
|
showSessions: z.boolean().optional(),
|
|
36018
37021
|
showPrice: z.boolean().optional(),
|
|
36019
37022
|
showCapacity: z.boolean().optional(),
|
|
@@ -36021,8 +37024,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
36021
37024
|
successMessage: z.string().optional(),
|
|
36022
37025
|
waitlistMessage: z.string().optional(),
|
|
36023
37026
|
membershipMessage: z.string().optional(),
|
|
37027
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
37028
|
+
};
|
|
37029
|
+
const courseRegistrationSourceSchema = z.object({
|
|
37030
|
+
siteId: z.string().optional(),
|
|
37031
|
+
apiBaseUrl: z.string().optional(),
|
|
37032
|
+
portalToken: z.string().nullable().optional(),
|
|
37033
|
+
...courseRegistrationHydrationSchemaShape,
|
|
37034
|
+
className: z.string().nullable().optional(),
|
|
36024
37035
|
buttonText: z.string().nullable().optional(),
|
|
36025
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
36026
37036
|
stage: previewStageSchema.optional()
|
|
36027
37037
|
});
|
|
36028
37038
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -36031,18 +37041,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
36031
37041
|
className: z.string().nullable(),
|
|
36032
37042
|
summaryButtonText: z.string()
|
|
36033
37043
|
});
|
|
36034
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
36035
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
36036
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
36037
|
-
showSessions: z.boolean().optional(),
|
|
36038
|
-
showPrice: z.boolean().optional(),
|
|
36039
|
-
showCapacity: z.boolean().optional(),
|
|
36040
|
-
showVenue: z.boolean().optional(),
|
|
36041
|
-
successMessage: z.string().optional(),
|
|
36042
|
-
waitlistMessage: z.string().optional(),
|
|
36043
|
-
membershipMessage: z.string().optional(),
|
|
36044
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
36045
|
-
});
|
|
37044
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
36046
37045
|
const courseRegistrationRenderSchema = z.object({
|
|
36047
37046
|
display: courseRegistrationDisplaySchema,
|
|
36048
37047
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -36247,7 +37246,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
36247
37246
|
})]
|
|
36248
37247
|
}),
|
|
36249
37248
|
runtime: courseRegistrationBlockRuntime,
|
|
36250
|
-
dataSchemas: { courses:
|
|
37249
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
36251
37250
|
dataLoaders: { courses: {
|
|
36252
37251
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
36253
37252
|
params: {
|
|
@@ -36318,6 +37317,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
36318
37317
|
defaultValue: true,
|
|
36319
37318
|
ui: { intent: "display" }
|
|
36320
37319
|
},
|
|
37320
|
+
{
|
|
37321
|
+
id: "showTitle",
|
|
37322
|
+
type: "boolean",
|
|
37323
|
+
label: "Show event title",
|
|
37324
|
+
required: false,
|
|
37325
|
+
defaultValue: false,
|
|
37326
|
+
ui: { intent: "display" }
|
|
37327
|
+
},
|
|
37328
|
+
{
|
|
37329
|
+
id: "showDescription",
|
|
37330
|
+
type: "boolean",
|
|
37331
|
+
label: "Show event description",
|
|
37332
|
+
required: false,
|
|
37333
|
+
defaultValue: false,
|
|
37334
|
+
ui: { intent: "display" }
|
|
37335
|
+
},
|
|
36321
37336
|
{
|
|
36322
37337
|
id: "showMap",
|
|
36323
37338
|
type: "boolean",
|
|
@@ -36354,10 +37369,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
36354
37369
|
{
|
|
36355
37370
|
value: "10",
|
|
36356
37371
|
label: "10 dates"
|
|
37372
|
+
},
|
|
37373
|
+
{
|
|
37374
|
+
value: "all",
|
|
37375
|
+
label: "All dates"
|
|
36357
37376
|
}
|
|
36358
37377
|
],
|
|
36359
37378
|
ui: { intent: "display" }
|
|
36360
37379
|
},
|
|
37380
|
+
{
|
|
37381
|
+
id: "showCapacity",
|
|
37382
|
+
type: "boolean",
|
|
37383
|
+
label: "Show capacity",
|
|
37384
|
+
required: false,
|
|
37385
|
+
defaultValue: false,
|
|
37386
|
+
ui: { intent: "display" }
|
|
37387
|
+
},
|
|
36361
37388
|
{
|
|
36362
37389
|
id: "showCost",
|
|
36363
37390
|
type: "boolean",
|
|
@@ -36400,6 +37427,8 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
36400
37427
|
} },
|
|
36401
37428
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
36402
37429
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
37430
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
37431
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
36403
37432
|
showMap: { $bind: { from: "content.showMap" } },
|
|
36404
37433
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
36405
37434
|
otherDatesLimit: { $bind: {
|
|
@@ -36410,6 +37439,10 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
36410
37439
|
from: "content.showCost",
|
|
36411
37440
|
fallback: true
|
|
36412
37441
|
} },
|
|
37442
|
+
showCapacity: { $bind: {
|
|
37443
|
+
from: "content.showCapacity",
|
|
37444
|
+
fallback: false
|
|
37445
|
+
} },
|
|
36413
37446
|
showAcceptedPasses: { $bind: {
|
|
36414
37447
|
from: "content.showAcceptedPasses",
|
|
36415
37448
|
fallback: true
|
|
@@ -36464,6 +37497,11 @@ const eventDetailsBlockDefinition = {
|
|
|
36464
37497
|
limit: "100",
|
|
36465
37498
|
readProfile: "details",
|
|
36466
37499
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
37500
|
+
seriesIds: { $bind: {
|
|
37501
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
37502
|
+
transforms: [{ id: "value.csv" }]
|
|
37503
|
+
} },
|
|
37504
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
36467
37505
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
36468
37506
|
},
|
|
36469
37507
|
mode: "server"
|
|
@@ -36649,7 +37687,7 @@ const courseDetailsBlockDefinition = {
|
|
|
36649
37687
|
})], { gap: "lg" })
|
|
36650
37688
|
})]
|
|
36651
37689
|
}),
|
|
36652
|
-
dataSchemas: { courses:
|
|
37690
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
36653
37691
|
dataLoaders: { courses: {
|
|
36654
37692
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
36655
37693
|
params: {
|
|
@@ -36768,8 +37806,8 @@ const eventSpotlightBlockDefinition = {
|
|
|
36768
37806
|
from: "content.columns",
|
|
36769
37807
|
fallback: "3"
|
|
36770
37808
|
} },
|
|
36771
|
-
|
|
36772
|
-
from: "content.
|
|
37809
|
+
cardRole: { $bind: {
|
|
37810
|
+
from: "content._cardStyles.role",
|
|
36773
37811
|
fallback: "default"
|
|
36774
37812
|
} },
|
|
36775
37813
|
buttonVariant: { $bind: {
|
|
@@ -36931,6 +37969,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
36931
37969
|
showVenue: z.boolean().nullable().optional(),
|
|
36932
37970
|
showMap: z.boolean().nullable().optional(),
|
|
36933
37971
|
showCapacity: z.boolean().nullable().optional(),
|
|
37972
|
+
cardRole: cardRoleSchema.optional(),
|
|
36934
37973
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
36935
37974
|
buttonText: z.string().optional(),
|
|
36936
37975
|
emptyMessage: z.string().optional(),
|
|
@@ -36958,6 +37997,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
36958
37997
|
showVenue: z.boolean(),
|
|
36959
37998
|
showMap: z.boolean(),
|
|
36960
37999
|
showCapacity: z.boolean(),
|
|
38000
|
+
cardRole: cardRoleSchema,
|
|
36961
38001
|
buttonVariant: eventButtonVariantSchema,
|
|
36962
38002
|
buttonText: z.string(),
|
|
36963
38003
|
emptyMessage: z.string()
|
|
@@ -37007,6 +38047,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
37007
38047
|
showVenue: source.showVenue ?? true,
|
|
37008
38048
|
showMap: source.showMap ?? true,
|
|
37009
38049
|
showCapacity: source.showCapacity ?? true,
|
|
38050
|
+
cardRole: source.cardRole ?? "default",
|
|
37010
38051
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
37011
38052
|
buttonText: source.buttonText ?? "Book",
|
|
37012
38053
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -37024,8 +38065,6 @@ function buildEventCollectionHydration(source) {
|
|
|
37024
38065
|
}
|
|
37025
38066
|
//#endregion
|
|
37026
38067
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
37027
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
37028
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
37029
38068
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
37030
38069
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
37031
38070
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -37040,7 +38079,7 @@ const eventListingSourceSchema = z.object({
|
|
|
37040
38079
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
37041
38080
|
seeAllUrl: z.string().optional(),
|
|
37042
38081
|
loadMoreText: z.string().optional(),
|
|
37043
|
-
|
|
38082
|
+
cardRole: cardRoleSchema.optional(),
|
|
37044
38083
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
37045
38084
|
buttonText: z.string().optional(),
|
|
37046
38085
|
showVenue: z.boolean().optional(),
|
|
@@ -37062,7 +38101,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
37062
38101
|
emptyMessage: z.string(),
|
|
37063
38102
|
loadingMessage: z.string(),
|
|
37064
38103
|
containerClass: z.string(),
|
|
37065
|
-
|
|
38104
|
+
cardRole: cardRoleSchema,
|
|
37066
38105
|
buttonVariant: eventButtonVariantSchema,
|
|
37067
38106
|
buttonText: z.string(),
|
|
37068
38107
|
showVenue: z.boolean(),
|
|
@@ -37118,7 +38157,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
37118
38157
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
37119
38158
|
loadingMessage: "Loading events…",
|
|
37120
38159
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
37121
|
-
|
|
38160
|
+
cardRole: source.cardRole ?? "default",
|
|
37122
38161
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
37123
38162
|
buttonText: source.buttonText ?? "Book",
|
|
37124
38163
|
showVenue: source.showVenue ?? true,
|
|
@@ -37440,8 +38479,8 @@ const eventListingBlockDefinition = {
|
|
|
37440
38479
|
from: "content.loadMoreText",
|
|
37441
38480
|
fallback: "Load more events"
|
|
37442
38481
|
} },
|
|
37443
|
-
|
|
37444
|
-
from: "content.
|
|
38482
|
+
cardRole: { $bind: {
|
|
38483
|
+
from: "content._cardStyles.role",
|
|
37445
38484
|
fallback: "default"
|
|
37446
38485
|
} },
|
|
37447
38486
|
buttonVariant: { $bind: {
|
|
@@ -37711,6 +38750,10 @@ const eventCalendarLayout = [styledSection({
|
|
|
37711
38750
|
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
37712
38751
|
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
37713
38752
|
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
38753
|
+
cardRole: { $bind: {
|
|
38754
|
+
from: "content._cardStyles.role",
|
|
38755
|
+
fallback: "default"
|
|
38756
|
+
} },
|
|
37714
38757
|
buttonVariant: { $bind: {
|
|
37715
38758
|
from: "content.buttonVariant",
|
|
37716
38759
|
fallback: "primary"
|
|
@@ -38343,11 +39386,11 @@ const eventCalendarAdditionalFields = [
|
|
|
38343
39386
|
searchThreshold: 8
|
|
38344
39387
|
}
|
|
38345
39388
|
}),
|
|
38346
|
-
...cardStylingFields.
|
|
39389
|
+
...cardStylingFields.map((field) => ({
|
|
38347
39390
|
...field,
|
|
38348
39391
|
ui: {
|
|
38349
39392
|
...field.ui ?? {},
|
|
38350
|
-
intent: field.id === "buttonVariant" ? "style" : "content"
|
|
39393
|
+
intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
|
|
38351
39394
|
}
|
|
38352
39395
|
})),
|
|
38353
39396
|
{
|
|
@@ -39044,7 +40087,7 @@ const publicRouteCandidatesSchema = z.object({ routes: z.array(z.object({
|
|
|
39044
40087
|
entityId: z.string(),
|
|
39045
40088
|
path: z.string(),
|
|
39046
40089
|
title: z.string(),
|
|
39047
|
-
kind: z.enum(
|
|
40090
|
+
kind: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
39048
40091
|
contentTypeKey: z.string().nullable().optional()
|
|
39049
40092
|
})) });
|
|
39050
40093
|
const groupOverrideFields = [
|
|
@@ -39338,7 +40381,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
39338
40381
|
dataSchemas: {
|
|
39339
40382
|
...offeringsPreviewEventDataSchemas,
|
|
39340
40383
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
39341
|
-
courses:
|
|
40384
|
+
courses: publicWholeSeriesOfferingsArraySchema.optional()
|
|
39342
40385
|
},
|
|
39343
40386
|
dataLoaders: {
|
|
39344
40387
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -40810,7 +41853,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
40810
41853
|
}
|
|
40811
41854
|
],
|
|
40812
41855
|
layout: styledSection({
|
|
40813
|
-
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: "
|
|
41856
|
+
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: boxStyleClassNames({ role: "default" }, {}) }, [media({
|
|
40814
41857
|
className: "card-media rb-aspect-video rb-w-full rb-object-cover",
|
|
40815
41858
|
size: {
|
|
40816
41859
|
width: 960,
|
|
@@ -43882,16 +44925,27 @@ function eventListCapable() {
|
|
|
43882
44925
|
looks: "supported",
|
|
43883
44926
|
sectionSurfaces: "supported",
|
|
43884
44927
|
contentFrames: ["plain", "panel"],
|
|
43885
|
-
cardRoles: "
|
|
44928
|
+
cardRoles: "supported",
|
|
43886
44929
|
eventListTreatments
|
|
43887
44930
|
});
|
|
43888
44931
|
}
|
|
44932
|
+
function eventSpotlightCapable() {
|
|
44933
|
+
return declareBlockDesignCapability({
|
|
44934
|
+
sectionSurfaces: "supported",
|
|
44935
|
+
contentFrames: ["plain"],
|
|
44936
|
+
cardRoles: "supported"
|
|
44937
|
+
});
|
|
44938
|
+
}
|
|
43889
44939
|
function offeringsPreviewCapable() {
|
|
43890
44940
|
return declareBlockDesignCapability({
|
|
43891
44941
|
looks: "supported",
|
|
43892
44942
|
sectionSurfaces: "supported",
|
|
43893
44943
|
contentFrames: ["plain"],
|
|
43894
|
-
cardRoles: "supported"
|
|
44944
|
+
cardRoles: "supported",
|
|
44945
|
+
compositions: {
|
|
44946
|
+
kind: "offerings-preview",
|
|
44947
|
+
treatments: offeringsPreviewCompositionTreatmentValues
|
|
44948
|
+
}
|
|
43895
44949
|
});
|
|
43896
44950
|
}
|
|
43897
44951
|
function defaultBoundaryBias(visualWeight) {
|
|
@@ -44184,7 +45238,7 @@ const systemBlockDefinitions = [
|
|
|
44184
45238
|
cardRoles: "supported",
|
|
44185
45239
|
compositions: {
|
|
44186
45240
|
kind: "testimonials",
|
|
44187
|
-
treatments:
|
|
45241
|
+
treatments: testimonialsCompositionTreatmentValues
|
|
44188
45242
|
},
|
|
44189
45243
|
headingDecorationCapability: {
|
|
44190
45244
|
kind: "supported",
|
|
@@ -44339,7 +45393,7 @@ const systemBlockDefinitions = [
|
|
|
44339
45393
|
weight: "standard"
|
|
44340
45394
|
})]
|
|
44341
45395
|
})),
|
|
44342
|
-
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition,
|
|
45396
|
+
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
44343
45397
|
flow: offeringsFlow,
|
|
44344
45398
|
layoutProfiles: [layoutProfile({
|
|
44345
45399
|
variantKey: "default",
|
|
@@ -46030,184 +47084,29 @@ const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ..
|
|
|
46030
47084
|
[...EVENT_ATTENDEE_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
46031
47085
|
[...STANDARD_LINE_ITEM_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
46032
47086
|
//#endregion
|
|
46033
|
-
//#region ../api/src/
|
|
46034
|
-
|
|
46035
|
-
|
|
46036
|
-
|
|
46037
|
-
|
|
46038
|
-
|
|
46039
|
-
|
|
46040
|
-
|
|
46041
|
-
|
|
46042
|
-
|
|
46043
|
-
|
|
46044
|
-
|
|
46045
|
-
|
|
46046
|
-
|
|
46047
|
-
|
|
46048
|
-
|
|
46049
|
-
|
|
46050
|
-
|
|
46051
|
-
|
|
46052
|
-
|
|
46053
|
-
|
|
46054
|
-
|
|
46055
|
-
//#region ../api/src/bookingVerticalCatalog.ts
|
|
46056
|
-
const VERTICAL_BOOKING_PRESETS = [
|
|
46057
|
-
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
46058
|
-
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
46059
|
-
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
46060
|
-
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
46061
|
-
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
46062
|
-
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
46063
|
-
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
46064
|
-
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
46065
|
-
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
46066
|
-
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
46067
|
-
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
46068
|
-
verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
46069
|
-
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
46070
|
-
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
46071
|
-
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
46072
|
-
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
46073
|
-
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
46074
|
-
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
46075
|
-
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
46076
|
-
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
46077
|
-
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
46078
|
-
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
46079
|
-
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
46080
|
-
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
46081
|
-
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
46082
|
-
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
46083
|
-
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
46084
|
-
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
46085
|
-
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
46086
|
-
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
46087
|
-
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
46088
|
-
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
46089
|
-
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
46090
|
-
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
46091
|
-
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
46092
|
-
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
46093
|
-
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
46094
|
-
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
46095
|
-
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
46096
|
-
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
46097
|
-
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
46098
|
-
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
46099
|
-
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
46100
|
-
verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
46101
|
-
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
46102
|
-
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
46103
|
-
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
46104
|
-
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
46105
|
-
verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
46106
|
-
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
46107
|
-
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
46108
|
-
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
46109
|
-
verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
46110
|
-
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
46111
|
-
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
46112
|
-
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
46113
|
-
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
46114
|
-
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
46115
|
-
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
46116
|
-
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
46117
|
-
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
46118
|
-
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
46119
|
-
];
|
|
46120
|
-
const VERTICAL_ID_SET = /* @__PURE__ */ new Set([
|
|
46121
|
-
"yoga_wellness",
|
|
46122
|
-
"fitness_pt",
|
|
46123
|
-
"dance_school",
|
|
46124
|
-
"physiotherapy_physical_health",
|
|
46125
|
-
"massage_bodywork",
|
|
46126
|
-
"therapist_practitioner",
|
|
46127
|
-
"beauty_spa",
|
|
46128
|
-
"consultant_coach",
|
|
46129
|
-
"training_provider",
|
|
46130
|
-
"retreat_centre",
|
|
46131
|
-
"music_school",
|
|
46132
|
-
"voice_singing",
|
|
46133
|
-
"performing_arts_school",
|
|
46134
|
-
"community_wellbeing",
|
|
46135
|
-
"venue_event_space"
|
|
46136
|
-
]);
|
|
46137
|
-
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
46138
|
-
function parseVerticalId(value) {
|
|
46139
|
-
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
46140
|
-
}
|
|
46141
|
-
function parseVerticalPresetId(value) {
|
|
46142
|
-
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
46143
|
-
}
|
|
46144
|
-
function getVerticalPresetDefinition(presetId) {
|
|
46145
|
-
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
46146
|
-
if (!definition) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
46147
|
-
return definition;
|
|
46148
|
-
}
|
|
46149
|
-
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
46150
|
-
const firstPresetId = presetIds[0];
|
|
46151
|
-
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
46152
|
-
}
|
|
46153
|
-
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
46154
|
-
return {
|
|
46155
|
-
verticalId,
|
|
46156
|
-
selectedPresetIds
|
|
46157
|
-
};
|
|
46158
|
-
}
|
|
46159
|
-
function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
46160
|
-
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
46161
|
-
return nonEmptyPresetIds ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
46162
|
-
}
|
|
46163
|
-
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
46164
|
-
if (!rawConfig) return {
|
|
46165
|
-
kind: "unconfigured",
|
|
46166
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
46167
|
-
};
|
|
46168
|
-
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
46169
|
-
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
46170
|
-
const config = {
|
|
46171
|
-
verticalId,
|
|
46172
|
-
selectedPresetIds
|
|
46173
|
-
};
|
|
46174
|
-
if (!verticalId && selectedPresetIds.length === 0) return {
|
|
46175
|
-
kind: "unconfigured",
|
|
46176
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
46177
|
-
};
|
|
46178
|
-
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
46179
|
-
if (issues.length > 0) return {
|
|
46180
|
-
kind: "invalid",
|
|
46181
|
-
config,
|
|
46182
|
-
issues
|
|
46183
|
-
};
|
|
46184
|
-
const configuredConfig = verticalId ? createSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
|
|
46185
|
-
if (!configuredConfig) return {
|
|
46186
|
-
kind: "invalid",
|
|
46187
|
-
config,
|
|
46188
|
-
issues: ["empty_selected_presets"]
|
|
46189
|
-
};
|
|
46190
|
-
return {
|
|
46191
|
-
kind: "configured",
|
|
46192
|
-
config: configuredConfig,
|
|
46193
|
-
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
46194
|
-
};
|
|
46195
|
-
}
|
|
46196
|
-
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
46197
|
-
const issues = /* @__PURE__ */ new Set();
|
|
46198
|
-
if (rawConfig.verticalId != null && !config.verticalId) issues.add("unknown_vertical");
|
|
46199
|
-
if (!config.verticalId && config.selectedPresetIds.length > 0) issues.add("missing_vertical");
|
|
46200
|
-
if ((Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).some((presetId) => parseVerticalPresetId(presetId) === null)) issues.add("unknown_preset");
|
|
46201
|
-
if (config.verticalId && config.selectedPresetIds.length === 0) issues.add("empty_selected_presets");
|
|
46202
|
-
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
46203
|
-
for (const presetId of config.selectedPresetIds) {
|
|
46204
|
-
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
46205
|
-
if (config.verticalId && presetDefinition.verticalId !== config.verticalId) issues.add("preset_vertical_mismatch");
|
|
46206
|
-
if (presetDefinition.availability === "future") issues.add("future_preset_selected");
|
|
46207
|
-
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues.add("duplicate_canonical_behaviour");
|
|
46208
|
-
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
47087
|
+
//#region ../api/src/bookingVerticals.ts
|
|
47088
|
+
/**
|
|
47089
|
+
* Transport adapters for the booking-vertical domain.
|
|
47090
|
+
*
|
|
47091
|
+
* The domain catalog and all pure resolution/selection rules live in core;
|
|
47092
|
+
* this module owns only the Zod boundary used by API payloads.
|
|
47093
|
+
*/
|
|
47094
|
+
function formatRawDiagnosticValue(value) {
|
|
47095
|
+
const serialized = JSON.stringify(value);
|
|
47096
|
+
return serialized === void 0 ? String(value) : serialized;
|
|
47097
|
+
}
|
|
47098
|
+
function describeSiteVerticalConfigIssue(issue) {
|
|
47099
|
+
switch (issue.code) {
|
|
47100
|
+
case "unknown_vertical": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
47101
|
+
case "unknown_preset": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
47102
|
+
case "missing_vertical":
|
|
47103
|
+
case "empty_selected_presets":
|
|
47104
|
+
case "preset_vertical_mismatch":
|
|
47105
|
+
case "duplicate_preset_id":
|
|
47106
|
+
case "duplicate_canonical_behaviour":
|
|
47107
|
+
case "future_preset_selected": return issue.code;
|
|
47108
|
+
default: return assertNever$3(issue);
|
|
46209
47109
|
}
|
|
46210
|
-
return [...issues];
|
|
46211
47110
|
}
|
|
46212
47111
|
const VerticalIdSchema = z.string().trim().transform((value, ctx) => {
|
|
46213
47112
|
const parsed = parseVerticalId(value);
|
|
@@ -46239,16 +47138,12 @@ z.object({
|
|
|
46239
47138
|
if (resolved.kind === "invalid") {
|
|
46240
47139
|
ctx.addIssue({
|
|
46241
47140
|
code: z.ZodIssueCode.custom,
|
|
46242
|
-
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
47141
|
+
message: `Invalid booking vertical config: ${resolved.issues.map(describeSiteVerticalConfigIssue).join(", ")}`
|
|
46243
47142
|
});
|
|
46244
47143
|
return z.NEVER;
|
|
46245
47144
|
}
|
|
46246
47145
|
return resolved.config;
|
|
46247
47146
|
});
|
|
46248
|
-
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
46249
|
-
verticalId: null,
|
|
46250
|
-
selectedPresetIds: []
|
|
46251
|
-
};
|
|
46252
47147
|
//#endregion
|
|
46253
47148
|
//#region ../api/src/utils/isRecord.ts
|
|
46254
47149
|
function isRecord$3(value) {
|