@riverbankcms/sdk 0.143.0 → 0.145.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/dist/{PreviewEditorSidebar-DROGfMKi.mjs → PreviewEditorSidebar-O-V6Pl5a.mjs} +20 -26
- package/dist/{PreviewEditorUI-BaRjhFu-.mjs → PreviewEditorUI-1UlX_9cw.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BCYICImX.mjs → PreviewQueryProvider-BxGwdOCV.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-OIABYLES.mjs → SdkPreviewModeRuntime-DYbA_4iv.mjs} +431 -351
- package/dist/{SiteChromeCustomizeContext-ohjTvZbc.mjs → SiteChromeCustomizeContext-CNTKQ9nx.mjs} +3989 -2769
- package/dist/_dts/ai/src/contracts/proposals.d.ts +4719 -66
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +429 -6
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +49 -0
- package/dist/_dts/api/src/appointmentServiceCategoryEndpoints.d.ts +75 -0
- package/dist/_dts/api/src/appointmentServiceContracts.d.ts +80 -0
- package/dist/_dts/api/src/appointmentSetup.d.ts +8 -1
- package/dist/_dts/api/src/billing.d.ts +1 -1
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +8 -2
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -12
- package/dist/_dts/api/src/communications.d.ts +14 -22
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -0
- package/dist/_dts/api/src/endpoints.d.ts +105 -58
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +2 -0
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +4 -4
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +0 -23
- package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +3 -0
- package/dist/_dts/api/src/publicBookingService.d.ts +35 -1
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/publicExperience/newsletterEndpoints.d.ts +13 -0
- package/dist/_dts/api/src/publicNewsletterEndpointDefinitions.d.ts +58 -0
- package/dist/_dts/api/src/schemas/admin-observability-logs.d.ts +3 -3
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +8 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -6
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -8
- package/dist/_dts/api/src/siteSettings.d.ts +17 -7
- package/dist/_dts/api/src/types.d.ts +2 -1
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/block-form/src/backend/types.d.ts +14 -0
- package/dist/_dts/block-form/src/client/index.d.ts +1 -0
- package/dist/_dts/block-form/src/context/RepeaterHostActionsContext.d.ts +30 -0
- package/dist/_dts/block-form/src/context/index.d.ts +1 -0
- package/dist/_dts/block-form/src/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +4 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +5 -2
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +11 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useEmptyStateFocusAfterRemoval.d.ts +8 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +15 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +5 -2
- package/dist/_dts/blocks/src/PageRenderer.d.ts +4 -4
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +58 -10
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/pageRenderJoins.d.ts +68 -0
- package/dist/_dts/blocks/src/pageRenderPlan.d.ts +8 -27
- package/dist/_dts/blocks/src/pageRenderPreparation.d.ts +7 -4
- package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +40 -23
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -0
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-services.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
- package/dist/_dts/blocks/src/system/constants/events.d.ts +10 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +29 -3
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/api/context.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/api/readAuthority.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +7 -13
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +9 -4
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +1 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +22 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +7 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +57 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.service-categories.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.service-choices.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +13 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/cart.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +7 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +5 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +6 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/header-control.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/layout.d.ts +6 -21
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +20 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/product-detail.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/product-list.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/ThemedButton.d.ts +58 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/chromeLogo.d.ts +23 -0
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +3 -1
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +4 -1
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +1 -1
- package/dist/_dts/core/src/appointment-service-categories.d.ts +108 -0
- package/dist/_dts/core/src/editor-state.d.ts +6 -0
- package/dist/_dts/core/src/event-catalogue.d.ts +27 -0
- package/dist/_dts/core/src/event-preset-vocabulary.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +3 -0
- package/dist/_dts/core/src/public-profile.d.ts +9 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +676 -241
- package/dist/_dts/db/src/schemas/forms.d.ts +286 -2
- package/dist/_dts/editor-blocks/src/block-editor/{BlockCardHeader.d.ts → BlockCardFrame.d.ts} +11 -3
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +6 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +16 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/types.d.ts +13 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/utils.d.ts +29 -0
- package/dist/_dts/logger/src/console.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/blocks/BoundaryControl.d.ts +7 -2
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +1 -3
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -0
- package/dist/_dts/sdk/src/client/publicEventReadOperations.d.ts +1 -0
- package/dist/_dts/sdk/src/client/runtimeCacheKeys.d.ts +8 -0
- package/dist/_dts/sdk/src/client/types.d.ts +4 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +7 -2
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +5 -0
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +2 -2
- package/dist/_dts/sdk/src/navigation/index.d.ts +27 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +21 -15
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/client.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/enhancers/routeIslandApiConfig.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/islands/enhancers/shopShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +3 -13
- package/dist/_dts/theme-core/src/customCss/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/customCss/patch.d.ts +0 -5
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/layout/boundaryCss.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/compositionBudget.d.ts +8 -0
- package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +3 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +1 -3
- package/dist/_dts/theme-core/src/site-styles/generatedDesignPipeline.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/joinTreatment.d.ts +132 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorBoundaries.d.ts +31 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +33 -29
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/pageFlowPresets.d.ts +36 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -10
- package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +17 -4
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +20 -74
- package/dist/_dts/theme-core/src/site-styles/sectionBoundaryComposition.d.ts +95 -0
- package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +80 -518
- package/dist/_dts/theme-core/src/site-styles/siteStyleBlockPolicies.d.ts +9 -4
- package/dist/_dts/theme-core/src/site-styles/transitionCatalogue.d.ts +320 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +3 -18
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/logoVariant.d.ts +26 -0
- package/dist/_dts/theme-core/src/utils/colorStyles.d.ts +10 -0
- package/dist/_dts/ui/src/editor-item-card.d.ts +116 -0
- package/dist/_dts/ui/src/index.d.ts +1 -0
- package/dist/client/{BookingConsentAgreement-BoCtvzzu.mjs → BookingConsentAgreement-DlVOmpW4.mjs} +4 -55
- package/dist/client/{DiscountCodeDisclosure-B5S30nZk.mjs → DiscountCodeDisclosure-T9q623PQ.mjs} +27 -17
- package/dist/client/{EventCombined.client-CeZ2-zSt.mjs → EventCombined.client-DnsUeONl.mjs} +54 -46
- package/dist/client/{EventListing.client-DJN3j8B3.mjs → EventListing.client-CNBFqJS4.mjs} +3 -4
- package/dist/client/{LeafletStaticMap-RjtGzDQT.mjs → LeafletStaticMap-C7higg52.mjs} +1 -1
- package/dist/client/ThemedButton-LAJTNrS8.mjs +412 -0
- package/dist/client/{accordion-DOmnDoyg.mjs → accordion-BcNF9TjX.mjs} +1 -1
- package/dist/client/{bookingForm-C0vk7pgS.mjs → bookingForm-BUaQ3S03.mjs} +161 -75
- package/dist/client/bookings.mjs +392 -182
- package/dist/client/{carousel-BZJ7pno3.mjs → carousel-CTdF6e0V.mjs} +2 -2
- package/dist/client/{carousel.client-DQTjCVQT.mjs → carousel.client-jahpU9Vz.mjs} +1 -1
- package/dist/client/{cart-CaeVAHJl.mjs → cart-pGtyf_XU.mjs} +3 -3
- package/dist/client/{checkout-7wmoNDtG.mjs → checkout-Da9WSn7Y.mjs} +3 -3
- package/dist/client/{checkoutUrls-FL6lRkrt.mjs → checkoutUrls-CW3-78uu.mjs} +1 -1
- package/dist/client/client.mjs +3819 -2717
- package/dist/client/{colorStyles-3013aRAY.mjs → colorStyles-CuJBiS-1.mjs} +16 -4
- package/dist/client/{context-BOimxE3U.mjs → context-BFeY_Wbm.mjs} +24 -8
- package/dist/client/{dates-BnzVksi4.mjs → dates-BhwVSxDg.mjs} +2 -2
- package/dist/client/{eventCalendar-l-fpaslC.mjs → eventCalendar-BAtdnR4s.mjs} +39 -50
- package/dist/client/{eventCombined-DGGvssK6.mjs → eventCombined-RksA3tRC.mjs} +5 -4
- package/dist/client/{eventDetails-DRiCm_hL.mjs → eventDetails-BB9hB4wR.mjs} +4 -4
- package/dist/client/{eventListing-dph8loYX.mjs → eventListing-BpJBkviM.mjs} +5 -4
- package/dist/client/{eventRegistration-ClBohmbY.mjs → eventRegistration-B18jFq_o.mjs} +83 -68
- package/dist/client/{form-BLVVAnd3.mjs → form-Dodt8Y8t.mjs} +9 -10
- package/dist/client/{headerSection-DHy4C8Ix.mjs → headerSection-B0qj9ttg.mjs} +23 -30
- package/dist/client/hooks.mjs +807 -162
- package/dist/client/{locationMap-6HuS28ck.mjs → locationMap-gn-iMk7a.mjs} +9 -10
- package/dist/client/{media-DHpfFwd3.mjs → media-BtJ37tzS.mjs} +1 -1
- package/dist/client/{newsletterForm-xOdcOhZP.mjs → newsletterForm-oByLdFkr.mjs} +31 -11
- package/dist/client/{pricing-ChinRYFt.mjs → pricing-BOU0_Hai.mjs} +1 -1
- package/dist/client/{productDetail-0chA5gbK.mjs → productDetail-D9v1zH2j.mjs} +3 -3
- package/dist/client/{productList-OoINA0h1.mjs → productList-D-mItx1n.mjs} +3 -3
- package/dist/client/{propsDecoder-CIZ-hbIG.mjs → propsDecoder-C3TP_z4x.mjs} +158 -61
- package/dist/client/rendering/client.mjs +2785 -2000
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3855 -2694
- package/dist/client/{routeIslandApiConfig-UNsfPcYq.mjs → routeIslandApiConfig-DzN1W0sq.mjs} +8 -1
- package/dist/client/{scrollToBlock-BPZl0gPZ.mjs → scrollToBlock-CWs8EIdo.mjs} +1 -1
- package/dist/client/{shop-CLJFqNIq.mjs → shop-Dufw7N7o.mjs} +45 -58
- package/dist/client/{shop-commerce-PpANg5wB.mjs → shop-commerce-gklw_hLF.mjs} +42 -55
- package/dist/client/{shop-commerce-store-TA_Kz2ku.mjs → shop-commerce-store-Sf1eyTaZ.mjs} +1 -1
- package/dist/client/{shopShared-DzcFcA5g.mjs → shopShared-B5nyA41S.mjs} +6 -5
- package/dist/client/{useEventFilters-CFU21QZo.mjs → useEventFilters-CLL829vy.mjs} +66 -355
- package/dist/preview-next/before-render.mjs +147 -77
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-chrome.css +8 -0
- package/dist/preview-next/keepAlive.mjs +147 -77
- package/dist/preview-next/middleware.mjs +147 -77
- package/dist/{previewAuthStore-JA6-I_sL.mjs → previewAuthStore-BxAFlu-j.mjs} +147 -77
- package/dist/{sdk-runtime-CDKl0Fr7.mjs → sdk-runtime-D0uZFev7.mjs} +2 -2
- package/dist/{separator-BTp96X32.mjs → separator-EvdCAn4V.mjs} +1 -1
- package/dist/server/components.mjs +2548 -1607
- package/dist/server/config-validation.mjs +794 -160
- package/dist/server/config.mjs +794 -160
- package/dist/server/data.mjs +806 -161
- package/dist/server/index.mjs +167 -85
- package/dist/server/navigation.mjs +28 -1
- package/dist/server/next.mjs +14930 -14036
- package/dist/server/page-converter.mjs +494 -113
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2537 -1590
- package/dist/server/rendering.mjs +2571 -1618
- package/dist/server/routing.mjs +918 -200
- package/dist/server/server.mjs +819 -205
- package/dist/server/theme-bridge.mjs +1232 -28
- package/dist/server/theme.mjs +6 -4
- package/dist/styles/index.css +6 -0
- package/package.json +2 -1
package/dist/client/bookings.mjs
CHANGED
|
@@ -2382,6 +2382,27 @@ function AltchaWidget({ challengeUrl, onSolutionChange, auto = true, hidelogo =
|
|
|
2382
2382
|
function isSpamProtectionEnabled() {
|
|
2383
2383
|
return process.env.NEXT_PUBLIC_SPAM_PROTECTION_ENABLED === "true";
|
|
2384
2384
|
}
|
|
2385
|
+
z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
2386
|
+
kind: z.literal("preview"),
|
|
2387
|
+
token: z.string().min(1)
|
|
2388
|
+
}).strict()]);
|
|
2389
|
+
function createHostedBlockApiConfig(input) {
|
|
2390
|
+
const { baseUrl, siteId, readAuthority, portalToken } = input;
|
|
2391
|
+
return {
|
|
2392
|
+
baseUrl,
|
|
2393
|
+
siteId,
|
|
2394
|
+
readAuthority,
|
|
2395
|
+
auth: readAuthority.kind === "preview" ? {
|
|
2396
|
+
type: "bearer",
|
|
2397
|
+
token: readAuthority.token
|
|
2398
|
+
} : { type: "none" },
|
|
2399
|
+
isPreview: readAuthority.kind === "preview",
|
|
2400
|
+
authOverrides: { portal: portalToken ? {
|
|
2401
|
+
type: "bearer",
|
|
2402
|
+
token: portalToken
|
|
2403
|
+
} : { type: "none" } }
|
|
2404
|
+
};
|
|
2405
|
+
}
|
|
2385
2406
|
//#endregion
|
|
2386
2407
|
//#region ../blocks/src/system/runtime/api/deduplication.ts
|
|
2387
2408
|
/**
|
|
@@ -2765,7 +2786,7 @@ function parseEventPageSurfaceDestinationMode(value) {
|
|
|
2765
2786
|
return value === "cms-managed" || value === "system-managed" ? value : void 0;
|
|
2766
2787
|
}
|
|
2767
2788
|
function parseEventPageSurfaceSubject(value) {
|
|
2768
|
-
if (!isRecord$
|
|
2789
|
+
if (!isRecord$7(value)) return err$1({ kind: "notObject" });
|
|
2769
2790
|
switch (value.kind) {
|
|
2770
2791
|
case "eventSeries": {
|
|
2771
2792
|
const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
|
|
@@ -2820,7 +2841,7 @@ function parseEventSeriesIdList(values) {
|
|
|
2820
2841
|
}
|
|
2821
2842
|
return ok$1(parsed);
|
|
2822
2843
|
}
|
|
2823
|
-
function isRecord$
|
|
2844
|
+
function isRecord$7(value) {
|
|
2824
2845
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2825
2846
|
}
|
|
2826
2847
|
//#endregion
|
|
@@ -3101,6 +3122,46 @@ function addLocalScheduleDays(date, days) {
|
|
|
3101
3122
|
day: utcDate.getUTCDate()
|
|
3102
3123
|
};
|
|
3103
3124
|
}
|
|
3125
|
+
//#endregion
|
|
3126
|
+
//#region ../core/src/appointment-service-categories.ts
|
|
3127
|
+
/**
|
|
3128
|
+
* Groups services under their categories.
|
|
3129
|
+
*
|
|
3130
|
+
* A service whose `categoryId` names no category in `categories` lands in
|
|
3131
|
+
* Other. The composite foreign key keeps that from happening with stored data,
|
|
3132
|
+
* so this is only the total, safe answer for a caller holding a stale list.
|
|
3133
|
+
*/
|
|
3134
|
+
function layoutServicesByCategory(categories, services, options) {
|
|
3135
|
+
if (categories.length === 0) return {
|
|
3136
|
+
kind: "uncategorized-site",
|
|
3137
|
+
services: [...services]
|
|
3138
|
+
};
|
|
3139
|
+
const buckets = new Map(categories.map((category) => [category.id, []]));
|
|
3140
|
+
const other = [];
|
|
3141
|
+
for (const service of services) {
|
|
3142
|
+
const bucket = service.categoryId === null ? void 0 : buckets.get(service.categoryId);
|
|
3143
|
+
if (bucket !== void 0) bucket.push(service);
|
|
3144
|
+
else other.push(service);
|
|
3145
|
+
}
|
|
3146
|
+
const groups = [];
|
|
3147
|
+
for (const category of categories) {
|
|
3148
|
+
const groupServices = buckets.get(category.id) ?? [];
|
|
3149
|
+
if (groupServices.length === 0 && !options.keepEmptyGroups) continue;
|
|
3150
|
+
groups.push({
|
|
3151
|
+
category,
|
|
3152
|
+
services: groupServices
|
|
3153
|
+
});
|
|
3154
|
+
}
|
|
3155
|
+
if (groups.length === 0 && !options.keepEmptyGroups) return {
|
|
3156
|
+
kind: "uncategorized-site",
|
|
3157
|
+
services: other
|
|
3158
|
+
};
|
|
3159
|
+
return {
|
|
3160
|
+
kind: "categorized-site",
|
|
3161
|
+
groups,
|
|
3162
|
+
other
|
|
3163
|
+
};
|
|
3164
|
+
}
|
|
3104
3165
|
function sessionStartMs(session) {
|
|
3105
3166
|
return Date.parse(session.startsAt);
|
|
3106
3167
|
}
|
|
@@ -3923,13 +3984,6 @@ function themeButtonVariantClassNames(variant) {
|
|
|
3923
3984
|
function themeButtonSizeClassName(size) {
|
|
3924
3985
|
return `btn-${size}`;
|
|
3925
3986
|
}
|
|
3926
|
-
function themeButtonClassName(spec) {
|
|
3927
|
-
return [
|
|
3928
|
-
...themeButtonVariantClassNames(spec.variant),
|
|
3929
|
-
themeButtonSizeClassName(spec.size),
|
|
3930
|
-
spec.extraClassName
|
|
3931
|
-
].filter(Boolean).join(" ");
|
|
3932
|
-
}
|
|
3933
3987
|
shadeBackgroundEffect({
|
|
3934
3988
|
id: "darken-background",
|
|
3935
3989
|
name: "Darken on Hover",
|
|
@@ -6763,16 +6817,18 @@ const themeV2RuntimeStyleFieldNames = [
|
|
|
6763
6817
|
"_frameStyles",
|
|
6764
6818
|
"_sectionStyles",
|
|
6765
6819
|
"_containerStyles",
|
|
6766
|
-
"_cardStyles"
|
|
6767
|
-
"_transitionStyles",
|
|
6768
|
-
"styleGroup"
|
|
6820
|
+
"_cardStyles"
|
|
6769
6821
|
];
|
|
6770
6822
|
const themeV2BlockSpecificRawStyleFieldNames = [
|
|
6771
6823
|
"_contentCardStyles",
|
|
6772
6824
|
"_heroLayoutStyles",
|
|
6773
6825
|
"_textCardStyles"
|
|
6774
6826
|
];
|
|
6775
|
-
const themeV2NormalEditorRawStyleFieldNames = [
|
|
6827
|
+
const themeV2NormalEditorRawStyleFieldNames = [
|
|
6828
|
+
...themeV2RuntimeStyleFieldNames,
|
|
6829
|
+
...themeV2BlockSpecificRawStyleFieldNames,
|
|
6830
|
+
"styleGroup"
|
|
6831
|
+
];
|
|
6776
6832
|
new Set(themeV2NormalEditorRawStyleFieldNames);
|
|
6777
6833
|
[...themeV2RuntimeStyleFieldNames, ...themeV2BlockSpecificRawStyleFieldNames];
|
|
6778
6834
|
const pageDesignEditorBackgroundOverrideOwner = "page-design-editor";
|
|
@@ -6961,7 +7017,7 @@ const boxBackgroundSchema = z.discriminatedUnion("type", [
|
|
|
6961
7017
|
})
|
|
6962
7018
|
]);
|
|
6963
7019
|
function normalizeAuthoringOpacity(value) {
|
|
6964
|
-
if (!isRecord$
|
|
7020
|
+
if (!isRecord$6(value)) return value;
|
|
6965
7021
|
return {
|
|
6966
7022
|
...value,
|
|
6967
7023
|
opacity: normalizeOpacity(value.opacity)
|
|
@@ -6970,7 +7026,7 @@ function normalizeAuthoringOpacity(value) {
|
|
|
6970
7026
|
function normalizeOpacity(value) {
|
|
6971
7027
|
return typeof value === "number" && value > 1 && value <= 100 ? value / 100 : value;
|
|
6972
7028
|
}
|
|
6973
|
-
function isRecord$
|
|
7029
|
+
function isRecord$6(value) {
|
|
6974
7030
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6975
7031
|
}
|
|
6976
7032
|
//#endregion
|
|
@@ -8335,15 +8391,18 @@ const BOOKINGS = {
|
|
|
8335
8391
|
const EVENTS = {
|
|
8336
8392
|
calendarWindow: {
|
|
8337
8393
|
path: "/public/sites/{siteId}/events/calendar-window",
|
|
8338
|
-
method: "GET"
|
|
8394
|
+
method: "GET",
|
|
8395
|
+
previewRead: true
|
|
8339
8396
|
},
|
|
8340
8397
|
list: {
|
|
8341
8398
|
path: "/public/sites/{siteId}/events",
|
|
8342
|
-
method: "GET"
|
|
8399
|
+
method: "GET",
|
|
8400
|
+
previewRead: true
|
|
8343
8401
|
},
|
|
8344
8402
|
filters: {
|
|
8345
8403
|
path: "/public/sites/{siteId}/events/filters",
|
|
8346
|
-
method: "GET"
|
|
8404
|
+
method: "GET",
|
|
8405
|
+
previewRead: true
|
|
8347
8406
|
},
|
|
8348
8407
|
register: {
|
|
8349
8408
|
path: "/public/sites/{siteId}/events/register",
|
|
@@ -8381,7 +8440,8 @@ const WHOLE_SERIES = { waitlistClaimResolve: {
|
|
|
8381
8440
|
const SHOP = {
|
|
8382
8441
|
listProducts: {
|
|
8383
8442
|
path: "/public/sites/{siteId}/products",
|
|
8384
|
-
method: "GET"
|
|
8443
|
+
method: "GET",
|
|
8444
|
+
previewRead: true
|
|
8385
8445
|
},
|
|
8386
8446
|
checkout: {
|
|
8387
8447
|
path: "/public/sites/{siteId}/bookings/checkout",
|
|
@@ -8648,7 +8708,7 @@ var BlockApiError = class extends Error {
|
|
|
8648
8708
|
this.name = "BlockApiError";
|
|
8649
8709
|
}
|
|
8650
8710
|
};
|
|
8651
|
-
function isRecord$
|
|
8711
|
+
function isRecord$5(value) {
|
|
8652
8712
|
return typeof value === "object" && value !== null;
|
|
8653
8713
|
}
|
|
8654
8714
|
function isJsonResponseContentType(contentType) {
|
|
@@ -8672,15 +8732,15 @@ async function parseJsonBody(response) {
|
|
|
8672
8732
|
}
|
|
8673
8733
|
}
|
|
8674
8734
|
function isFieldError(value) {
|
|
8675
|
-
return isRecord$
|
|
8735
|
+
return isRecord$5(value) && !Array.isArray(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string";
|
|
8676
8736
|
}
|
|
8677
8737
|
function fieldErrorsFromUnknown(value) {
|
|
8678
8738
|
if (!Array.isArray(value)) return void 0;
|
|
8679
8739
|
return value.every(isFieldError) ? value : void 0;
|
|
8680
8740
|
}
|
|
8681
8741
|
function getBlockApiErrorDetails(data) {
|
|
8682
|
-
if (!isRecord$
|
|
8683
|
-
const nestedError = isRecord$
|
|
8742
|
+
if (!isRecord$5(data)) return {};
|
|
8743
|
+
const nestedError = isRecord$5(data.error) ? data.error : void 0;
|
|
8684
8744
|
const message = typeof nestedError?.message === "string" ? nestedError.message : typeof data.message === "string" ? data.message : void 0;
|
|
8685
8745
|
const code = typeof nestedError?.code === "string" ? nestedError.code : typeof data.code === "string" ? data.code : void 0;
|
|
8686
8746
|
const fieldErrors = fieldErrorsFromUnknown(nestedError?.fieldErrors) ?? fieldErrorsFromUnknown(data.fieldErrors);
|
|
@@ -8775,7 +8835,11 @@ function publicEventsQuery(params) {
|
|
|
8775
8835
|
return { ...params ?? {} };
|
|
8776
8836
|
}
|
|
8777
8837
|
function createBlockApi(config) {
|
|
8778
|
-
const { baseUrl,
|
|
8838
|
+
const { baseUrl, authOverrides, siteId, isPreview, readAuthority } = config;
|
|
8839
|
+
const auth = readAuthority ? readAuthority.kind === "preview" ? {
|
|
8840
|
+
type: "bearer",
|
|
8841
|
+
token: readAuthority.token
|
|
8842
|
+
} : { type: "none" } : config.auth;
|
|
8779
8843
|
const dedup = createDeduplicationCache({ ttl: 100 });
|
|
8780
8844
|
const shouldUsePreviewStageForNonPortalRequests = isPreview && auth.type !== "none";
|
|
8781
8845
|
function isPortalEndpoint(endpoint) {
|
|
@@ -8783,17 +8847,25 @@ function createBlockApi(config) {
|
|
|
8783
8847
|
}
|
|
8784
8848
|
function selectAuth(endpoint) {
|
|
8785
8849
|
if (endpoint.authScope === "portal" && authOverrides?.portal) return authOverrides.portal;
|
|
8850
|
+
if (readAuthority && !endpoint.previewRead) return { type: "none" };
|
|
8786
8851
|
return auth;
|
|
8787
8852
|
}
|
|
8788
8853
|
/**
|
|
8789
8854
|
* Make an API request
|
|
8790
8855
|
*/
|
|
8856
|
+
function bindReadQuery(endpoint, query) {
|
|
8857
|
+
const queryParams = { ...query };
|
|
8858
|
+
if (readAuthority) {
|
|
8859
|
+
if (!endpoint.previewRead) delete queryParams.stage;
|
|
8860
|
+
else if (readAuthority.kind === "preview" || queryParams.stage != null) queryParams.stage = readAuthority.kind;
|
|
8861
|
+
} else if (shouldUsePreviewStageForNonPortalRequests && !isPortalEndpoint(endpoint) && queryParams.stage == null) queryParams.stage = "preview";
|
|
8862
|
+
return queryParams;
|
|
8863
|
+
}
|
|
8791
8864
|
async function request(endpoint, options) {
|
|
8792
8865
|
const { path, body, query, skipDedup = false } = options ?? {};
|
|
8793
8866
|
let url = `${baseUrl}${path ?? endpoint.path}`;
|
|
8794
8867
|
const selectedAuth = selectAuth(endpoint);
|
|
8795
|
-
const queryParams =
|
|
8796
|
-
if (shouldUsePreviewStageForNonPortalRequests && !isPortalEndpoint(endpoint) && (queryParams.stage === void 0 || queryParams.stage === null)) queryParams.stage = "preview";
|
|
8868
|
+
const queryParams = bindReadQuery(endpoint, query);
|
|
8797
8869
|
if (Object.keys(queryParams).length > 0) url = appendQuery(url, queryParams);
|
|
8798
8870
|
const headers = {
|
|
8799
8871
|
Accept: "application/json",
|
|
@@ -9639,12 +9711,12 @@ function resolveBookingSiteId(siteId, form) {
|
|
|
9639
9711
|
return siteId || form?.siteId || "";
|
|
9640
9712
|
}
|
|
9641
9713
|
function normalizeBookingFormConfig(form) {
|
|
9642
|
-
if (!isRecord$
|
|
9714
|
+
if (!isRecord$4(form)) return null;
|
|
9643
9715
|
const id = readNonEmptyString(form.id);
|
|
9644
9716
|
const name = readNonEmptyString(form.name);
|
|
9645
9717
|
if (!id || !name) return null;
|
|
9646
|
-
const schemaSource = isRecord$
|
|
9647
|
-
const settingsSource = isRecord$
|
|
9718
|
+
const schemaSource = isRecord$4(form.schema) ? form.schema : isRecord$4(form.schemaJson) ? form.schemaJson : null;
|
|
9719
|
+
const settingsSource = isRecord$4(form.settings) ? form.settings : isRecord$4(form.settingsJson) ? form.settingsJson : null;
|
|
9648
9720
|
return {
|
|
9649
9721
|
id,
|
|
9650
9722
|
name,
|
|
@@ -9664,8 +9736,8 @@ function normalizeBookingServices(services) {
|
|
|
9664
9736
|
};
|
|
9665
9737
|
if (!services) return [];
|
|
9666
9738
|
if (Array.isArray(services)) return services.filter(isBookingFormService).map(normalizeService);
|
|
9667
|
-
if (isRecord$
|
|
9668
|
-
return isRecord$
|
|
9739
|
+
if (isRecord$4(services) && "services" in services) return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
9740
|
+
return isRecord$4(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
9669
9741
|
}
|
|
9670
9742
|
function normalizeBookingSchema(value) {
|
|
9671
9743
|
if (!value) return void 0;
|
|
@@ -9676,7 +9748,7 @@ function normalizeBookingSchema(value) {
|
|
|
9676
9748
|
};
|
|
9677
9749
|
}
|
|
9678
9750
|
function readBookingFormField(value) {
|
|
9679
|
-
if (!isRecord$
|
|
9751
|
+
if (!isRecord$4(value)) return null;
|
|
9680
9752
|
const id = readNonEmptyString(value.id);
|
|
9681
9753
|
const label = readNonEmptyString(value.label);
|
|
9682
9754
|
const type = readBookingFieldType(value.type);
|
|
@@ -9719,7 +9791,7 @@ function readBookingFieldOptions(value) {
|
|
|
9719
9791
|
return options.length > 0 ? options : void 0;
|
|
9720
9792
|
}
|
|
9721
9793
|
function readBookingFieldOption(value) {
|
|
9722
|
-
if (!isRecord$
|
|
9794
|
+
if (!isRecord$4(value)) return null;
|
|
9723
9795
|
const optionValue = readNonEmptyString(value.value);
|
|
9724
9796
|
const label = readNonEmptyString(value.label);
|
|
9725
9797
|
return optionValue && label ? {
|
|
@@ -9739,7 +9811,7 @@ function normalizeBookingSettings(value) {
|
|
|
9739
9811
|
};
|
|
9740
9812
|
}
|
|
9741
9813
|
function isBookingFormService(value) {
|
|
9742
|
-
return isRecord$
|
|
9814
|
+
return isRecord$4(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success);
|
|
9743
9815
|
}
|
|
9744
9816
|
function collectBookingCustomFields(data) {
|
|
9745
9817
|
const customFields = {};
|
|
@@ -9789,7 +9861,7 @@ function readStringArray(value) {
|
|
|
9789
9861
|
const strings = value.filter((item) => typeof item === "string");
|
|
9790
9862
|
return strings.length > 0 ? strings : void 0;
|
|
9791
9863
|
}
|
|
9792
|
-
function isRecord$
|
|
9864
|
+
function isRecord$4(value) {
|
|
9793
9865
|
return typeof value === "object" && value !== null;
|
|
9794
9866
|
}
|
|
9795
9867
|
function getBookingServicePaymentSelectionMode(service) {
|
|
@@ -11048,6 +11120,38 @@ function formatScheduleDate(isoString, locale) {
|
|
|
11048
11120
|
return new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(date);
|
|
11049
11121
|
}
|
|
11050
11122
|
//#endregion
|
|
11123
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.service-categories.ts
|
|
11124
|
+
function isRecord$3(value) {
|
|
11125
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11126
|
+
}
|
|
11127
|
+
function readCategory(value) {
|
|
11128
|
+
if (!isRecord$3(value)) return [];
|
|
11129
|
+
const { id, name, description } = value;
|
|
11130
|
+
if (typeof id !== "string" || id.trim() === "" || typeof name !== "string") return [];
|
|
11131
|
+
return [{
|
|
11132
|
+
id,
|
|
11133
|
+
name,
|
|
11134
|
+
description: typeof description === "string" ? description : null
|
|
11135
|
+
}];
|
|
11136
|
+
}
|
|
11137
|
+
/**
|
|
11138
|
+
* The ordered service categories carried by a catalogue-shaped services
|
|
11139
|
+
* source (`{ services, categories }`). Every other shape has none, which
|
|
11140
|
+
* reads as a site without categories. Order is preserved: the database owns
|
|
11141
|
+
* it.
|
|
11142
|
+
*/
|
|
11143
|
+
function normalizeBookingServiceCategories(services) {
|
|
11144
|
+
if (!isRecord$3(services) || !Array.isArray(services.categories)) return [];
|
|
11145
|
+
return services.categories.flatMap(readCategory);
|
|
11146
|
+
}
|
|
11147
|
+
/**
|
|
11148
|
+
* The ordered service categories a headless booking override was given in
|
|
11149
|
+
* its loader data (`data.services`).
|
|
11150
|
+
*/
|
|
11151
|
+
function readOverrideServiceCategories(data) {
|
|
11152
|
+
return isRecord$3(data) ? normalizeBookingServiceCategories(data.services) : [];
|
|
11153
|
+
}
|
|
11154
|
+
//#endregion
|
|
11051
11155
|
//#region ../blocks/src/system/runtime/nodes/booking-form.validationErrors.ts
|
|
11052
11156
|
function omitRecordKey(record, key) {
|
|
11053
11157
|
if (!(key in record)) return record;
|
|
@@ -11657,6 +11761,7 @@ function getAppointmentBookingOverrideInput(props) {
|
|
|
11657
11761
|
formId,
|
|
11658
11762
|
form,
|
|
11659
11763
|
services,
|
|
11764
|
+
serviceCategories: readOverrideServiceCategories(props.data),
|
|
11660
11765
|
initialServiceId: defaultServiceId,
|
|
11661
11766
|
initialResourceId: toOptionalAppointmentResourceId(content.resourceId ?? form.settings?.resourceId),
|
|
11662
11767
|
requiresServiceSelection: Boolean(content.requiresServiceSelection),
|
|
@@ -12370,6 +12475,7 @@ function useHeadlessBookingFlow(options) {
|
|
|
12370
12475
|
data,
|
|
12371
12476
|
services: {
|
|
12372
12477
|
items: options.services,
|
|
12478
|
+
categories: readServiceCategories(options),
|
|
12373
12479
|
selected: selectedService,
|
|
12374
12480
|
defaultServiceId,
|
|
12375
12481
|
requiresSelection: Boolean(options.requiresServiceSelection)
|
|
@@ -12434,6 +12540,10 @@ function useHeadlessBookingFlow(options) {
|
|
|
12434
12540
|
actions
|
|
12435
12541
|
};
|
|
12436
12542
|
}
|
|
12543
|
+
const EMPTY_SERVICE_CATEGORIES = [];
|
|
12544
|
+
function readServiceCategories(options) {
|
|
12545
|
+
return options.serviceCategories ?? EMPTY_SERVICE_CATEGORIES;
|
|
12546
|
+
}
|
|
12437
12547
|
function navigateToCheckout(checkoutUrl) {
|
|
12438
12548
|
window.location.href = checkoutUrl;
|
|
12439
12549
|
}
|
|
@@ -12713,6 +12823,114 @@ function useAppointmentCheckoutVerificationWithDeps(config, deps) {
|
|
|
12713
12823
|
};
|
|
12714
12824
|
}
|
|
12715
12825
|
//#endregion
|
|
12826
|
+
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
12827
|
+
function r(e) {
|
|
12828
|
+
var t, f, n = "";
|
|
12829
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
12830
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
12831
|
+
var o = e.length;
|
|
12832
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
12833
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
12834
|
+
return n;
|
|
12835
|
+
}
|
|
12836
|
+
function clsx() {
|
|
12837
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
12838
|
+
return n;
|
|
12839
|
+
}
|
|
12840
|
+
//#endregion
|
|
12841
|
+
//#region ../blocks/src/system/runtime/nodes/spinner.tsx
|
|
12842
|
+
function resolveColorStyle(color) {
|
|
12843
|
+
switch (color) {
|
|
12844
|
+
case void 0: return;
|
|
12845
|
+
case "inherit": return { color: "inherit" };
|
|
12846
|
+
case "foreground": return { color: "rgb(var(--tb-foreground))" };
|
|
12847
|
+
case "text": return { color: "rgb(var(--tb-text))" };
|
|
12848
|
+
default: return;
|
|
12849
|
+
}
|
|
12850
|
+
}
|
|
12851
|
+
function SpinnerNode({ className, size = "md", color, strokeWidth = 3, srLabel, style, ...rest }) {
|
|
12852
|
+
const hasExplicitAriaLabel = typeof rest["aria-label"] === "string" && rest["aria-label"].trim().length > 0;
|
|
12853
|
+
const accessibilityProps = srLabel ? {
|
|
12854
|
+
role: "status",
|
|
12855
|
+
"aria-live": "polite"
|
|
12856
|
+
} : hasExplicitAriaLabel ? {} : { "aria-hidden": true };
|
|
12857
|
+
const trackStroke = color === "inherit" ? "currentColor" : "var(--rb-spinner-track-color)";
|
|
12858
|
+
const trackOpacity = color === "inherit" ? .25 : 1;
|
|
12859
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
12860
|
+
...accessibilityProps,
|
|
12861
|
+
className: clsx("rb-spinner", size ? `rb-spinner--${size}` : null, color === "inherit" ? "rb-spinner--inherit" : null, className),
|
|
12862
|
+
style: {
|
|
12863
|
+
...resolveColorStyle(color),
|
|
12864
|
+
...style ?? {}
|
|
12865
|
+
},
|
|
12866
|
+
...rest,
|
|
12867
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
12868
|
+
viewBox: "0 0 24 24",
|
|
12869
|
+
fill: "none",
|
|
12870
|
+
"aria-hidden": "true",
|
|
12871
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
12872
|
+
cx: "12",
|
|
12873
|
+
cy: "12",
|
|
12874
|
+
r: "10",
|
|
12875
|
+
stroke: trackStroke,
|
|
12876
|
+
strokeWidth,
|
|
12877
|
+
opacity: trackOpacity
|
|
12878
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
12879
|
+
d: "M12 2a10 10 0 0 1 10 10",
|
|
12880
|
+
stroke: "currentColor",
|
|
12881
|
+
strokeWidth,
|
|
12882
|
+
strokeLinecap: "round"
|
|
12883
|
+
})]
|
|
12884
|
+
}), srLabel ? /* @__PURE__ */ jsx("span", {
|
|
12885
|
+
className: "rb-sr-only",
|
|
12886
|
+
children: srLabel
|
|
12887
|
+
}) : null]
|
|
12888
|
+
});
|
|
12889
|
+
}
|
|
12890
|
+
//#endregion
|
|
12891
|
+
//#region ../blocks/src/system/runtime/shared/components/ThemedButton.tsx
|
|
12892
|
+
function themedButtonClasses(variant, size, extraClassName) {
|
|
12893
|
+
return [
|
|
12894
|
+
...themeButtonVariantClassNames(variant),
|
|
12895
|
+
themeButtonSizeClassName(size),
|
|
12896
|
+
extraClassName
|
|
12897
|
+
].filter(Boolean).join(" ");
|
|
12898
|
+
}
|
|
12899
|
+
function ThemedButtonLabel(props) {
|
|
12900
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12901
|
+
props.pending ? /* @__PURE__ */ jsx(SpinnerNode, {
|
|
12902
|
+
size: props.pending.spinnerSize ?? "sm",
|
|
12903
|
+
color: "inherit",
|
|
12904
|
+
className: props.pending.spinnerClassName ?? "rb-mr-2",
|
|
12905
|
+
srLabel: props.pending.srLabel
|
|
12906
|
+
}) : null,
|
|
12907
|
+
props.labelClassName ? /* @__PURE__ */ jsx("span", {
|
|
12908
|
+
className: props.labelClassName,
|
|
12909
|
+
children: props.pending?.label ?? props.label
|
|
12910
|
+
}) : props.pending?.label ?? props.label,
|
|
12911
|
+
props.screenReaderSuffix ? /* @__PURE__ */ jsx("span", {
|
|
12912
|
+
className: "rb-sr-only",
|
|
12913
|
+
children: props.screenReaderSuffix
|
|
12914
|
+
}) : null
|
|
12915
|
+
] });
|
|
12916
|
+
return props.pending?.contentClassName ? /* @__PURE__ */ jsx("span", {
|
|
12917
|
+
className: props.pending.contentClassName,
|
|
12918
|
+
children: content
|
|
12919
|
+
}) : content;
|
|
12920
|
+
}
|
|
12921
|
+
function ThemedButton({ variant, size, extraClassName, screenReaderSuffix, labelClassName, pending, label, ...buttonProps }) {
|
|
12922
|
+
return /* @__PURE__ */ jsx("button", {
|
|
12923
|
+
...buttonProps,
|
|
12924
|
+
className: themedButtonClasses(variant, size, extraClassName),
|
|
12925
|
+
children: /* @__PURE__ */ jsx(ThemedButtonLabel, {
|
|
12926
|
+
label,
|
|
12927
|
+
pending,
|
|
12928
|
+
screenReaderSuffix,
|
|
12929
|
+
labelClassName
|
|
12930
|
+
})
|
|
12931
|
+
});
|
|
12932
|
+
}
|
|
12933
|
+
//#endregion
|
|
12716
12934
|
//#region ../blocks/src/system/runtime/shared/components/FeedbackMessage.tsx
|
|
12717
12935
|
function joinClasses(...parts) {
|
|
12718
12936
|
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
@@ -12925,71 +13143,6 @@ const TimeSlotSelector = ({ value, onChange, slots, isLoading, timezone, require
|
|
|
12925
13143
|
});
|
|
12926
13144
|
};
|
|
12927
13145
|
//#endregion
|
|
12928
|
-
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
12929
|
-
function r(e) {
|
|
12930
|
-
var t, f, n = "";
|
|
12931
|
-
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
12932
|
-
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
12933
|
-
var o = e.length;
|
|
12934
|
-
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
12935
|
-
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
12936
|
-
return n;
|
|
12937
|
-
}
|
|
12938
|
-
function clsx() {
|
|
12939
|
-
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
12940
|
-
return n;
|
|
12941
|
-
}
|
|
12942
|
-
//#endregion
|
|
12943
|
-
//#region ../blocks/src/system/runtime/nodes/spinner.tsx
|
|
12944
|
-
function resolveColorStyle(color) {
|
|
12945
|
-
switch (color) {
|
|
12946
|
-
case void 0: return;
|
|
12947
|
-
case "inherit": return { color: "inherit" };
|
|
12948
|
-
case "foreground": return { color: "rgb(var(--tb-foreground))" };
|
|
12949
|
-
case "text": return { color: "rgb(var(--tb-text))" };
|
|
12950
|
-
default: return;
|
|
12951
|
-
}
|
|
12952
|
-
}
|
|
12953
|
-
function SpinnerNode({ className, size = "md", color, strokeWidth = 3, srLabel, style, ...rest }) {
|
|
12954
|
-
const hasExplicitAriaLabel = typeof rest["aria-label"] === "string" && rest["aria-label"].trim().length > 0;
|
|
12955
|
-
const accessibilityProps = srLabel ? {
|
|
12956
|
-
role: "status",
|
|
12957
|
-
"aria-live": "polite"
|
|
12958
|
-
} : hasExplicitAriaLabel ? {} : { "aria-hidden": true };
|
|
12959
|
-
const trackStroke = color === "inherit" ? "currentColor" : "var(--rb-spinner-track-color)";
|
|
12960
|
-
const trackOpacity = color === "inherit" ? .25 : 1;
|
|
12961
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
12962
|
-
...accessibilityProps,
|
|
12963
|
-
className: clsx("rb-spinner", size ? `rb-spinner--${size}` : null, color === "inherit" ? "rb-spinner--inherit" : null, className),
|
|
12964
|
-
style: {
|
|
12965
|
-
...resolveColorStyle(color),
|
|
12966
|
-
...style ?? {}
|
|
12967
|
-
},
|
|
12968
|
-
...rest,
|
|
12969
|
-
children: [/* @__PURE__ */ jsxs("svg", {
|
|
12970
|
-
viewBox: "0 0 24 24",
|
|
12971
|
-
fill: "none",
|
|
12972
|
-
"aria-hidden": "true",
|
|
12973
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
12974
|
-
cx: "12",
|
|
12975
|
-
cy: "12",
|
|
12976
|
-
r: "10",
|
|
12977
|
-
stroke: trackStroke,
|
|
12978
|
-
strokeWidth,
|
|
12979
|
-
opacity: trackOpacity
|
|
12980
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
12981
|
-
d: "M12 2a10 10 0 0 1 10 10",
|
|
12982
|
-
stroke: "currentColor",
|
|
12983
|
-
strokeWidth,
|
|
12984
|
-
strokeLinecap: "round"
|
|
12985
|
-
})]
|
|
12986
|
-
}), srLabel ? /* @__PURE__ */ jsx("span", {
|
|
12987
|
-
className: "rb-sr-only",
|
|
12988
|
-
children: srLabel
|
|
12989
|
-
}) : null]
|
|
12990
|
-
});
|
|
12991
|
-
}
|
|
12992
|
-
//#endregion
|
|
12993
13146
|
//#region ../blocks/src/system/runtime/shared/components/StepIndicator.tsx
|
|
12994
13147
|
/**
|
|
12995
13148
|
* Shared step indicator component for registration wizards.
|
|
@@ -13074,14 +13227,8 @@ const themeFormClasses = {
|
|
|
13074
13227
|
label: "form-label",
|
|
13075
13228
|
row: "rb-flex rb-flex-col rb-gap-2 rb-sm-flex-row",
|
|
13076
13229
|
input: "form-input",
|
|
13077
|
-
apply:
|
|
13078
|
-
|
|
13079
|
-
size: "sm"
|
|
13080
|
-
}),
|
|
13081
|
-
remove: themeButtonClassName({
|
|
13082
|
-
variant: "secondary",
|
|
13083
|
-
size: "sm"
|
|
13084
|
-
}),
|
|
13230
|
+
apply: "",
|
|
13231
|
+
remove: "",
|
|
13085
13232
|
hint: "rb-caption status-muted",
|
|
13086
13233
|
feedback: "rb-caption"
|
|
13087
13234
|
};
|
|
@@ -13089,6 +13236,22 @@ function getDiscountCodeDisclosureClasses(surface) {
|
|
|
13089
13236
|
if (surface === "theme-form") return themeFormClasses;
|
|
13090
13237
|
return BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES[surface];
|
|
13091
13238
|
}
|
|
13239
|
+
function DiscountActionButton(props) {
|
|
13240
|
+
return props.surface === "theme-form" ? /* @__PURE__ */ jsx(ThemedButton, {
|
|
13241
|
+
type: "button",
|
|
13242
|
+
variant: "secondary",
|
|
13243
|
+
size: "sm",
|
|
13244
|
+
label: props.label,
|
|
13245
|
+
onClick: props.onClick,
|
|
13246
|
+
disabled: props.disabled
|
|
13247
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
13248
|
+
type: "button",
|
|
13249
|
+
className: props.className,
|
|
13250
|
+
onClick: props.onClick,
|
|
13251
|
+
disabled: props.disabled,
|
|
13252
|
+
children: props.label
|
|
13253
|
+
});
|
|
13254
|
+
}
|
|
13092
13255
|
function DiscountCodeDisclosure({ surface, isOpen, code, onOpen, onChange, onRemove, onApply, id, toggleLabel = "Have a discount code?", label = "Discount code", placeholder = "Enter code", applyLabel = "Apply", removeLabel = "Remove", hint = "Applied at checkout.", feedback = null, isApplying = false, applyDisabled = false, disabled = false }) {
|
|
13093
13256
|
const generatedId = useId();
|
|
13094
13257
|
const inputId = id ?? `discount-code-${generatedId}`;
|
|
@@ -13130,19 +13293,19 @@ function DiscountCodeDisclosure({ surface, isOpen, code, onOpen, onChange, onRem
|
|
|
13130
13293
|
autoComplete: "off",
|
|
13131
13294
|
disabled: disabled || isApplying
|
|
13132
13295
|
}),
|
|
13133
|
-
onApply ? /* @__PURE__ */ jsx(
|
|
13134
|
-
|
|
13296
|
+
onApply ? /* @__PURE__ */ jsx(DiscountActionButton, {
|
|
13297
|
+
surface,
|
|
13135
13298
|
className: classes.apply,
|
|
13299
|
+
label: isApplying ? "Applying..." : applyLabel,
|
|
13136
13300
|
onClick: onApply,
|
|
13137
|
-
disabled: disabled || isApplying || applyDisabled
|
|
13138
|
-
children: isApplying ? "Applying..." : applyLabel
|
|
13301
|
+
disabled: disabled || isApplying || applyDisabled
|
|
13139
13302
|
}) : null,
|
|
13140
|
-
/* @__PURE__ */ jsx(
|
|
13141
|
-
|
|
13303
|
+
/* @__PURE__ */ jsx(DiscountActionButton, {
|
|
13304
|
+
surface,
|
|
13142
13305
|
className: classes.remove,
|
|
13306
|
+
label: removeLabel,
|
|
13143
13307
|
onClick: onRemove,
|
|
13144
|
-
disabled: disabled || isApplying
|
|
13145
|
-
children: removeLabel
|
|
13308
|
+
disabled: disabled || isApplying
|
|
13146
13309
|
})
|
|
13147
13310
|
]
|
|
13148
13311
|
}),
|
|
@@ -13943,10 +14106,97 @@ function BookingConsentAgreement({ agreement, showTitle = true, title, titleId }
|
|
|
13943
14106
|
})] });
|
|
13944
14107
|
}
|
|
13945
14108
|
//#endregion
|
|
13946
|
-
//#region ../blocks/src/system/runtime/nodes/booking-form.
|
|
14109
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.service-choices.tsx
|
|
13947
14110
|
function optionCardClassName(isSelected) {
|
|
13948
14111
|
return `rb-option-card${isSelected ? " rb-option-card--selected" : ""}`;
|
|
13949
14112
|
}
|
|
14113
|
+
function SelectedCheck() {
|
|
14114
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14115
|
+
className: "rb-option-check",
|
|
14116
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
14117
|
+
});
|
|
14118
|
+
}
|
|
14119
|
+
/**
|
|
14120
|
+
* The service buttons. A site with no categories keeps its single grid; a
|
|
14121
|
+
* categorised site gets a heading per category, then "Other", above the same
|
|
14122
|
+
* grid (issue 1403). Empty categories are skipped, and there are no intros
|
|
14123
|
+
* here, to keep the step compact.
|
|
14124
|
+
*/
|
|
14125
|
+
function DefaultServiceChoices({ booking }) {
|
|
14126
|
+
const layout = layoutServicesByCategory(booking.services.categories, booking.services.items.map((service) => ({
|
|
14127
|
+
service,
|
|
14128
|
+
categoryId: service.categoryId ?? null
|
|
14129
|
+
})), { keepEmptyGroups: false });
|
|
14130
|
+
switch (layout.kind) {
|
|
14131
|
+
case "uncategorized-site": return /* @__PURE__ */ jsxs("div", {
|
|
14132
|
+
className: "rb-reg-stack rb-reg-stack--sm",
|
|
14133
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
14134
|
+
className: "ab-subtitle",
|
|
14135
|
+
children: "Service"
|
|
14136
|
+
}), /* @__PURE__ */ jsx(ServiceChoiceGrid, {
|
|
14137
|
+
booking,
|
|
14138
|
+
choices: layout.services
|
|
14139
|
+
})]
|
|
14140
|
+
});
|
|
14141
|
+
case "categorized-site": return /* @__PURE__ */ jsx("div", {
|
|
14142
|
+
className: "rb-reg-stack",
|
|
14143
|
+
children: [...layout.groups.map((group) => ({
|
|
14144
|
+
key: group.category.id,
|
|
14145
|
+
heading: group.category.name,
|
|
14146
|
+
choices: group.services
|
|
14147
|
+
})), ...layout.other.length > 0 ? [{
|
|
14148
|
+
key: "other",
|
|
14149
|
+
heading: "Other",
|
|
14150
|
+
choices: layout.other
|
|
14151
|
+
}] : []].map((group) => /* @__PURE__ */ jsxs("div", {
|
|
14152
|
+
className: "rb-reg-stack rb-reg-stack--sm",
|
|
14153
|
+
"data-booking-service-group": group.key,
|
|
14154
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
14155
|
+
className: "ab-subtitle",
|
|
14156
|
+
children: group.heading
|
|
14157
|
+
}), /* @__PURE__ */ jsx(ServiceChoiceGrid, {
|
|
14158
|
+
booking,
|
|
14159
|
+
choices: group.choices
|
|
14160
|
+
})]
|
|
14161
|
+
}, group.key))
|
|
14162
|
+
});
|
|
14163
|
+
default: return assertNever(layout);
|
|
14164
|
+
}
|
|
14165
|
+
}
|
|
14166
|
+
function ServiceChoiceGrid({ booking, choices }) {
|
|
14167
|
+
const selectedServiceId = booking.services.selected?.id;
|
|
14168
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14169
|
+
className: "rb-reg-grid",
|
|
14170
|
+
children: choices.map(({ service }) => {
|
|
14171
|
+
const isSelected = selectedServiceId === service.id;
|
|
14172
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
14173
|
+
type: "button",
|
|
14174
|
+
onClick: () => booking.actions.selectService(service.id),
|
|
14175
|
+
className: optionCardClassName(isSelected),
|
|
14176
|
+
"aria-pressed": isSelected,
|
|
14177
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
14178
|
+
className: "rb-flex-1",
|
|
14179
|
+
children: [
|
|
14180
|
+
/* @__PURE__ */ jsx("div", {
|
|
14181
|
+
className: "ab-subtitle",
|
|
14182
|
+
children: service.title
|
|
14183
|
+
}),
|
|
14184
|
+
service.description ? /* @__PURE__ */ jsx("div", {
|
|
14185
|
+
className: "ab-text rb-on-surface--muted",
|
|
14186
|
+
children: service.description
|
|
14187
|
+
}) : null,
|
|
14188
|
+
service.durationMinutes ? /* @__PURE__ */ jsxs("div", {
|
|
14189
|
+
className: "ab-text rb-on-surface--muted",
|
|
14190
|
+
children: [service.durationMinutes, " minutes"]
|
|
14191
|
+
}) : null
|
|
14192
|
+
]
|
|
14193
|
+
}), isSelected ? /* @__PURE__ */ jsx(SelectedCheck, {}) : null]
|
|
14194
|
+
}, service.id);
|
|
14195
|
+
})
|
|
14196
|
+
});
|
|
14197
|
+
}
|
|
14198
|
+
//#endregion
|
|
14199
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.default-ui.tsx
|
|
13950
14200
|
function formatBookingAmount(amount, currency) {
|
|
13951
14201
|
return formatCurrencyAmount(amount, currency, { decimals: "auto" });
|
|
13952
14202
|
}
|
|
@@ -13990,30 +14240,25 @@ function HeadlessBookingDefaultForm({ booking, onSubmit }) {
|
|
|
13990
14240
|
}),
|
|
13991
14241
|
/* @__PURE__ */ jsxs("div", {
|
|
13992
14242
|
className: "rb-wizard-actions",
|
|
13993
|
-
children: [!isFirstStep ? /* @__PURE__ */ jsx(
|
|
14243
|
+
children: [!isFirstStep ? /* @__PURE__ */ jsx(ThemedButton, {
|
|
13994
14244
|
type: "button",
|
|
13995
14245
|
onClick: booking.actions.back,
|
|
13996
|
-
|
|
13997
|
-
|
|
13998
|
-
|
|
13999
|
-
|
|
14000
|
-
children: "Back"
|
|
14001
|
-
}) : null, /* @__PURE__ */ jsx("button", {
|
|
14246
|
+
variant: "outline",
|
|
14247
|
+
size: "md",
|
|
14248
|
+
label: "Back"
|
|
14249
|
+
}) : null, /* @__PURE__ */ jsx(ThemedButton, {
|
|
14002
14250
|
type: "button",
|
|
14003
14251
|
onClick: () => {
|
|
14004
14252
|
handlePrimaryAction();
|
|
14005
14253
|
},
|
|
14006
14254
|
disabled: isSubmitting,
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
|
|
14010
|
-
|
|
14011
|
-
|
|
14012
|
-
size: "sm",
|
|
14013
|
-
color: "inherit",
|
|
14014
|
-
className: "rb-mr-2",
|
|
14255
|
+
variant: "primary",
|
|
14256
|
+
size: "md",
|
|
14257
|
+
label: isLastStep ? "Complete" : "Continue",
|
|
14258
|
+
pending: isSubmitting ? {
|
|
14259
|
+
label: "Submitting...",
|
|
14015
14260
|
srLabel: "Submitting"
|
|
14016
|
-
}
|
|
14261
|
+
} : void 0
|
|
14017
14262
|
})]
|
|
14018
14263
|
}),
|
|
14019
14264
|
/* @__PURE__ */ jsx(DefaultBookingDiscount, { booking }),
|
|
@@ -14042,7 +14287,6 @@ function DefaultBookingStepContent({ booking, errorSummaryId }) {
|
|
|
14042
14287
|
function DefaultServiceSelectionStep({ booking }) {
|
|
14043
14288
|
const services = booking.services.items;
|
|
14044
14289
|
const resources = booking.resources.items;
|
|
14045
|
-
const selectedServiceId = booking.services.selected?.id;
|
|
14046
14290
|
const selectedResourceId = booking.resources.selectedResourceId;
|
|
14047
14291
|
const showServiceSelect = booking.services.requiresSelection || services.length > 1;
|
|
14048
14292
|
const showResourceSelect = booking.resources.requiresSelection || resources.length > 1;
|
|
@@ -14057,41 +14301,7 @@ function DefaultServiceSelectionStep({ booking }) {
|
|
|
14057
14301
|
className: "ab-text rb-on-surface--muted",
|
|
14058
14302
|
children: "Choose the service you'd like to book"
|
|
14059
14303
|
})] }),
|
|
14060
|
-
showServiceSelect ? /* @__PURE__ */
|
|
14061
|
-
className: "rb-reg-stack rb-reg-stack--sm",
|
|
14062
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
14063
|
-
className: "ab-subtitle",
|
|
14064
|
-
children: "Service"
|
|
14065
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
14066
|
-
className: "rb-reg-grid",
|
|
14067
|
-
children: services.map((service) => {
|
|
14068
|
-
const isSelected = selectedServiceId === service.id;
|
|
14069
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
14070
|
-
type: "button",
|
|
14071
|
-
onClick: () => booking.actions.selectService(service.id),
|
|
14072
|
-
className: optionCardClassName(isSelected),
|
|
14073
|
-
"aria-pressed": isSelected,
|
|
14074
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
14075
|
-
className: "rb-flex-1",
|
|
14076
|
-
children: [
|
|
14077
|
-
/* @__PURE__ */ jsx("div", {
|
|
14078
|
-
className: "ab-subtitle",
|
|
14079
|
-
children: service.title
|
|
14080
|
-
}),
|
|
14081
|
-
service.description ? /* @__PURE__ */ jsx("div", {
|
|
14082
|
-
className: "ab-text rb-on-surface--muted",
|
|
14083
|
-
children: service.description
|
|
14084
|
-
}) : null,
|
|
14085
|
-
service.durationMinutes ? /* @__PURE__ */ jsxs("div", {
|
|
14086
|
-
className: "ab-text rb-on-surface--muted",
|
|
14087
|
-
children: [service.durationMinutes, " minutes"]
|
|
14088
|
-
}) : null
|
|
14089
|
-
]
|
|
14090
|
-
}), isSelected ? /* @__PURE__ */ jsx(SelectedCheck, {}) : null]
|
|
14091
|
-
}, service.id);
|
|
14092
|
-
})
|
|
14093
|
-
})]
|
|
14094
|
-
}) : null,
|
|
14304
|
+
showServiceSelect ? /* @__PURE__ */ jsx(DefaultServiceChoices, { booking }) : null,
|
|
14095
14305
|
booking.resources.state.tag === "loading" ? /* @__PURE__ */ jsxs("div", {
|
|
14096
14306
|
className: "ab-center",
|
|
14097
14307
|
children: [/* @__PURE__ */ jsx(SpinnerNode, {
|
|
@@ -14641,14 +14851,12 @@ function DefaultBookingFeedback({ booking }) {
|
|
|
14641
14851
|
children: [/* @__PURE__ */ jsx("p", {
|
|
14642
14852
|
className: "ab-text",
|
|
14643
14853
|
children: booking.feedback.message
|
|
14644
|
-
}), /* @__PURE__ */ jsx(
|
|
14854
|
+
}), /* @__PURE__ */ jsx(ThemedButton, {
|
|
14645
14855
|
type: "button",
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
onClick: booking.actions.clearFeedback,
|
|
14651
|
-
children: "Dismiss"
|
|
14856
|
+
variant: "secondary",
|
|
14857
|
+
size: "sm",
|
|
14858
|
+
label: "Dismiss",
|
|
14859
|
+
onClick: booking.actions.clearFeedback
|
|
14652
14860
|
})]
|
|
14653
14861
|
});
|
|
14654
14862
|
}
|
|
@@ -14672,12 +14880,6 @@ function DefaultBookingErrorSummary({ errors, id }) {
|
|
|
14672
14880
|
children: [errors.formError ? /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: errors.formError }) }) : null, Object.entries(errors.fieldErrors).map(([key, message]) => /* @__PURE__ */ jsx("p", { children: message }, key))]
|
|
14673
14881
|
});
|
|
14674
14882
|
}
|
|
14675
|
-
function SelectedCheck() {
|
|
14676
|
-
return /* @__PURE__ */ jsx("div", {
|
|
14677
|
-
className: "rb-option-check",
|
|
14678
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
14679
|
-
});
|
|
14680
|
-
}
|
|
14681
14883
|
//#endregion
|
|
14682
14884
|
//#region ../blocks/src/system/runtime/shared/utils/checkoutUrls.ts
|
|
14683
14885
|
/**
|
|
@@ -14795,6 +14997,7 @@ const BookingFormClient$1 = ({ siteId: siteIdProp, render }) => {
|
|
|
14795
14997
|
formId: render.hydration.formId ?? form?.id ?? "booking-form",
|
|
14796
14998
|
form,
|
|
14797
14999
|
services,
|
|
15000
|
+
serviceCategories: render.hydration.serviceCategories,
|
|
14798
15001
|
initialServiceId,
|
|
14799
15002
|
initialResourceId,
|
|
14800
15003
|
initialData: render.hydration.initialData ?? void 0,
|
|
@@ -16872,6 +17075,12 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
16872
17075
|
//#endregion
|
|
16873
17076
|
//#region ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.ts
|
|
16874
17077
|
function createEventRegistrationBlockApiConfig(input) {
|
|
17078
|
+
if (input.readAuthority) return createHostedBlockApiConfig({
|
|
17079
|
+
baseUrl: input.apiBaseUrl,
|
|
17080
|
+
siteId: input.siteId,
|
|
17081
|
+
readAuthority: input.readAuthority,
|
|
17082
|
+
portalToken: input.portalToken
|
|
17083
|
+
});
|
|
16875
17084
|
return {
|
|
16876
17085
|
baseUrl: input.apiBaseUrl,
|
|
16877
17086
|
auth: input.previewToken ? {
|
|
@@ -16908,6 +17117,7 @@ function getEventRegistrationOverrideInput(props) {
|
|
|
16908
17117
|
apiBaseUrl: props.apiBaseUrl,
|
|
16909
17118
|
portalToken: props.portalToken ?? null,
|
|
16910
17119
|
previewToken: props.previewToken ?? null,
|
|
17120
|
+
readAuthority: props.readAuthority,
|
|
16911
17121
|
events,
|
|
16912
17122
|
...props.stage ? { stage: props.stage } : {},
|
|
16913
17123
|
...props.occurrenceContext ? { occurrenceContext: props.occurrenceContext } : {},
|