@riverbankcms/sdk 0.144.0 → 0.146.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 +17 -0
- package/dist/{PreviewEditorSidebar-CQZNnFiM.mjs → PreviewEditorSidebar-kg2r2Fyi.mjs} +4 -4
- package/dist/{PreviewEditorUI-DCNxnmI0.mjs → PreviewEditorUI-sWMLp5dT.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BCYICImX.mjs → PreviewQueryProvider-Cg51xq1w.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BJolUbr1.mjs → SdkPreviewModeRuntime-h2ti3Hch.mjs} +688 -519
- package/dist/{SiteChromeCustomizeContext-CKgEpoxi.mjs → SiteChromeCustomizeContext-DEACFH9m.mjs} +3381 -2017
- package/dist/_dts/ai/src/contracts/proposals.d.ts +5643 -66
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +513 -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/bookingConfig.d.ts +8 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +10 -26
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +45 -1
- package/dist/_dts/api/src/clientErrorReporting.d.ts +50 -0
- package/dist/_dts/api/src/communications.d.ts +32 -24
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -5
- package/dist/_dts/api/src/endpoints.d.ts +316 -134
- package/dist/_dts/api/src/event-visibility.d.ts +20 -0
- package/dist/_dts/api/src/eventManagementContracts.d.ts +56 -3
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +24 -0
- package/dist/_dts/api/src/eventPageWords.d.ts +19 -0
- package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +14 -0
- package/dist/_dts/api/src/index.d.ts +7 -1
- 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/launchReadiness.d.ts +22 -2
- package/dist/_dts/api/src/launchRequirementPriority.d.ts +3 -0
- package/dist/_dts/api/src/newsletterCampaignCommandEndpoints.d.ts +13 -0
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +30 -11
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +10 -0
- package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +3 -0
- package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +44 -0
- package/dist/_dts/api/src/participantMessaging.d.ts +11 -1
- package/dist/_dts/api/src/publicBookingService.d.ts +35 -1
- 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/sdk-event-upsert.d.ts +40 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -42
- package/dist/_dts/api/src/sdkCourseBooking.d.ts +30 -0
- package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +76 -0
- package/dist/_dts/api/src/sdkEventLifecycle.d.ts +37 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkPageDesign.d.ts +388 -0
- package/dist/_dts/api/src/sdkPageDesignEndpointDefinitions.d.ts +22 -0
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +46 -0
- package/dist/_dts/api/src/siteAddressEndpoints.d.ts +29 -0
- package/dist/_dts/api/src/siteManagementEndpointDefinitions.d.ts +49 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +4 -38
- package/dist/_dts/api/src/siteOnboarding.d.ts +75 -9
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/types.d.ts +8 -1
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +14 -0
- 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 +24 -0
- package/dist/_dts/blocks/src/index.d.ts +3 -1
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +10 -0
- 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 -1
- 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/events/shared/schemas.d.ts +27 -5
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +14 -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/icons/social.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +29 -3
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -1
- 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/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/event-registration/eventSourceRecovery.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +23 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/form.fields.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +36 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.parts.d.ts +46 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +20 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/primitives/previewEditableOutline.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/editorBlockEquality.d.ts +3 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -3
- 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/block-content-identity.d.ts +5 -0
- package/dist/_dts/core/src/editor-state.d.ts +2 -1
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +3 -1
- package/dist/_dts/core/src/public-event-booking-availability.d.ts +20 -1
- package/dist/_dts/core/src/public-profile.d.ts +12 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +711 -242
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/block-editor/EmptyState.d.ts +13 -1
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/index.d.ts +1 -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/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 +3 -3
- 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 -1
- package/dist/_dts/sdk/src/client/runtimeCacheKeys.d.ts +8 -0
- package/dist/_dts/sdk/src/client/types.d.ts +1 -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/next/renderSdkContent.d.ts +0 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -8
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +5 -2
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +6 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +6 -2
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +5 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +10 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/checkable.d.ts +42 -0
- package/dist/_dts/theme-core/src/inputs/inputGroup.d.ts +19 -0
- 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/ui/src/navigation-tabs.d.ts +2 -1
- package/dist/client/{BookingConsentAgreement-DoAILrkN.mjs → BookingConsentAgreement-BQKL045f.mjs} +2 -2
- package/dist/client/CheckboxChoice--W2n6yKs.mjs +24 -0
- package/dist/client/{DiscountCodeDisclosure-X528hUTf.mjs → DiscountCodeDisclosure-CsOtjFY7.mjs} +1 -1
- package/dist/client/{EventCombined.client-DSBVwq5m.mjs → EventCombined.client-BdRjVbhH.mjs} +6 -6
- package/dist/client/{EventListing.client-DmFAX7Vb.mjs → EventListing.client-DBxC6xOU.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BAqXdfhq.mjs → LeafletStaticMap-mHEJKrTs.mjs} +1 -1
- package/dist/client/{ThemedButton-BwNFVwi4.mjs → ThemedButton-CE5KYT6z.mjs} +1 -1
- package/dist/client/{accordion-DRhMdkbd.mjs → accordion-BEQNSptH.mjs} +1 -1
- package/dist/client/{bookingForm-iJ_nCsNF.mjs → bookingForm-AMr-s5vw.mjs} +168 -95
- package/dist/client/bookings.mjs +239 -110
- package/dist/client/{carousel-D8zuffZr.mjs → carousel-Bbt_QgJy.mjs} +1 -1
- package/dist/client/{cart-DeMGJViN.mjs → cart-CnWi30zJ.mjs} +3 -3
- package/dist/client/{checkout-DXc06Km2.mjs → checkout-f3nkWgd4.mjs} +3 -3
- package/dist/client/client.mjs +3222 -1612
- package/dist/client/{context-CDLCfDep.mjs → context-Bc8T6pCe.mjs} +1 -1
- package/dist/client/{dates-ClFx7Epy.mjs → dates-DUsCEzLb.mjs} +2 -3
- package/dist/client/{eventCalendar-BaGpnOGN.mjs → eventCalendar-CKwgXui5.mjs} +9 -9
- package/dist/client/{eventCombined-ywONOx2m.mjs → eventCombined-CBAOSTGR.mjs} +4 -4
- package/dist/client/{eventDetails-B2LlOTYY.mjs → eventDetails-Dh-_WiBD.mjs} +4 -4
- package/dist/client/{eventListing-CMgxWpqP.mjs → eventListing-CA3frIH5.mjs} +4 -4
- package/dist/client/{eventRegistration-BarLDNHR.mjs → eventRegistration-BHtsgdcg.mjs} +21 -22
- package/dist/client/{form-BjqKaBJ7.mjs → form-C2h3YAcg.mjs} +135 -104
- package/dist/client/{headerSection-CP4XDwz1.mjs → headerSection-lwMuMTH9.mjs} +3 -3
- package/dist/client/hooks.mjs +1023 -148
- package/dist/client/{locationMap-C5gW-d-w.mjs → locationMap-DJ2bLODV.mjs} +3 -3
- package/dist/client/{newsletterForm-afXlVSA0.mjs → newsletterForm-8Pu5K32g.mjs} +225 -102
- package/dist/client/{pricing-Bl1CAl28.mjs → pricing-HHx3IgBz.mjs} +1 -1
- package/dist/client/{productDetail-CvQ3jWQe.mjs → productDetail-C_1odnAf.mjs} +3 -3
- package/dist/client/{productList-U874PGO7.mjs → productList-CtCv-Nmx.mjs} +3 -3
- package/dist/client/{propsDecoder-DPXtCZWP.mjs → propsDecoder-Dcgsncxb.mjs} +111 -55
- package/dist/client/rendering/client.mjs +1389 -722
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +3136 -1400
- package/dist/client/{routeIslandApiConfig-NGYiUWXu.mjs → routeIslandApiConfig-CWLP7wu3.mjs} +1 -1
- package/dist/client/{scrollToBlock-0-C3DVhK.mjs → scrollToBlock-BNgaEUpo.mjs} +1 -1
- package/dist/client/{shop-BXjXhM9P.mjs → shop-DQXrQ8kJ.mjs} +7 -7
- package/dist/client/{shop-commerce-BZ6UlWJ7.mjs → shop-commerce-B88zmWWo.mjs} +6 -6
- package/dist/client/{shop-commerce-store-DlSBXb3D.mjs → shop-commerce-store-DtSfkKuX.mjs} +1 -1
- package/dist/client/{shopShared-kkEOiLPA.mjs → shopShared-cuaONpkJ.mjs} +4 -4
- package/dist/client/{useEventFilters-zvnnE1ro.mjs → useEventFilters-Bukew6Gb.mjs} +6 -6
- package/dist/preview-next/before-render.mjs +500 -165
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-base.css +11 -0
- package/dist/preview-next/keepAlive.mjs +460 -165
- package/dist/preview-next/middleware.mjs +461 -165
- package/dist/{previewAuthStore-JA6-I_sL.mjs → previewAuthStore-h5IgbSp4.mjs} +485 -165
- package/dist/{sdk-runtime-DFJlQt3q.mjs → sdk-runtime-DTc1uIXn.mjs} +2 -2
- package/dist/{separator-o8GHb1xh.mjs → separator-BpHS1KZK.mjs} +1 -1
- package/dist/server/components.mjs +3088 -1307
- package/dist/server/config-validation.mjs +927 -109
- package/dist/server/config.mjs +927 -109
- package/dist/server/data.mjs +939 -110
- package/dist/server/index.mjs +513 -169
- package/dist/server/next.mjs +2874 -1195
- package/dist/server/page-converter.mjs +420 -79
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3071 -1289
- package/dist/server/rendering.mjs +3169 -1350
- package/dist/server/routing.mjs +1085 -159
- package/dist/server/server.mjs +1042 -291
- package/dist/server/theme-bridge.mjs +1658 -137
- package/dist/server/theme.mjs +6 -4
- package/dist/styles/index.css +186 -65
- package/package.json +2 -1
|
@@ -1,19 +1,60 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { C as unsafeAsPassId, b as unsafeAsCustomerPassId, v as unsafeAsAppointmentResourceId, x as unsafeAsFormId, y as unsafeAsAppointmentServiceId } from "./colorStyles-CuJBiS-1.mjs";
|
|
3
|
-
import { i as buildBookingPaymentSelectionViewModel, n as StepIndicator, r as usePolling, t as BookingConsentAgreement } from "./BookingConsentAgreement-
|
|
4
|
-
import {
|
|
5
|
-
import { n as useBlockApi, t as BlockApiProvider } from "./context-
|
|
3
|
+
import { i as buildBookingPaymentSelectionViewModel, n as StepIndicator, r as usePolling, t as BookingConsentAgreement } from "./BookingConsentAgreement-BQKL045f.mjs";
|
|
4
|
+
import { At as resolveAppointmentCheckoutVerificationState, Ct as formatBookingSubmissionPreparationError, Dt as isBookingServiceSlidingAmountInRange, Et as getBookingSuccessMessage, Ft as projectSelectedAppointmentConsentIntoForm, Gt as okWith, Ht as clearWorkflowFeedback, It as resolveSelectedAppointmentConsent, Kt as reportWorkflowError, Lt as BOOKING_FORM_DATA_RESERVED_KEYS, Mt as resolveBookingSiteId, Nt as resolveDefaultBookingServiceId, Ot as parseBookingCurrencyInputToCents, Pt as toSelectedCollectionOptionKind, Rt as isBookingRequirementConsentFieldId, St as formatBookingCentsAsCurrencyInput, Tt as getBookingServiceSlidingScale, Ut as err, Vt as assertNever, Zt as addLocalScheduleDays, bt as logger, jt as resolveBookingPaymentStep, kt as prepareBookingSubmission, on as parseBookingLocalDate, qt as reportWorkflowSuccess, rn as formatLocalScheduleDate, sn as resolveBookingTimeZoneId, t as defineIslandPropsDecoder, tn as formatBookingInstant, wt as getBookingRedirectStateFromLocation, xt as deriveBookingFormViewState, yn as formatCurrencyAmount } from "./propsDecoder-Dcgsncxb.mjs";
|
|
5
|
+
import { n as useBlockApi, t as BlockApiProvider } from "./context-Bc8T6pCe.mjs";
|
|
6
6
|
import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
|
|
7
|
-
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-
|
|
8
|
-
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-
|
|
9
|
-
import { i as SpinnerNode, t as ThemedButton } from "./ThemedButton-
|
|
7
|
+
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-BNgaEUpo.mjs";
|
|
8
|
+
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-CsOtjFY7.mjs";
|
|
9
|
+
import { i as SpinnerNode, t as ThemedButton } from "./ThemedButton-CE5KYT6z.mjs";
|
|
10
10
|
import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
|
|
11
11
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
|
|
12
12
|
import { t as buildCheckoutReturnUrls } from "./checkoutUrls-CW3-78uu.mjs";
|
|
13
|
+
import { t as CheckboxChoice } from "./CheckboxChoice--W2n6yKs.mjs";
|
|
13
14
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
14
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
15
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-CWLP7wu3.mjs";
|
|
15
16
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
16
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
//#region ../core/src/appointment-service-categories.ts
|
|
19
|
+
/**
|
|
20
|
+
* Groups services under their categories.
|
|
21
|
+
*
|
|
22
|
+
* A service whose `categoryId` names no category in `categories` lands in
|
|
23
|
+
* Other. The composite foreign key keeps that from happening with stored data,
|
|
24
|
+
* so this is only the total, safe answer for a caller holding a stale list.
|
|
25
|
+
*/
|
|
26
|
+
function layoutServicesByCategory(categories, services, options) {
|
|
27
|
+
if (categories.length === 0) return {
|
|
28
|
+
kind: "uncategorized-site",
|
|
29
|
+
services: [...services]
|
|
30
|
+
};
|
|
31
|
+
const buckets = new Map(categories.map((category) => [category.id, []]));
|
|
32
|
+
const other = [];
|
|
33
|
+
for (const service of services) {
|
|
34
|
+
const bucket = service.categoryId === null ? void 0 : buckets.get(service.categoryId);
|
|
35
|
+
if (bucket !== void 0) bucket.push(service);
|
|
36
|
+
else other.push(service);
|
|
37
|
+
}
|
|
38
|
+
const groups = [];
|
|
39
|
+
for (const category of categories) {
|
|
40
|
+
const groupServices = buckets.get(category.id) ?? [];
|
|
41
|
+
if (groupServices.length === 0 && !options.keepEmptyGroups) continue;
|
|
42
|
+
groups.push({
|
|
43
|
+
category,
|
|
44
|
+
services: groupServices
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (groups.length === 0 && !options.keepEmptyGroups) return {
|
|
48
|
+
kind: "uncategorized-site",
|
|
49
|
+
services: other
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
kind: "categorized-site",
|
|
53
|
+
groups,
|
|
54
|
+
other
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
17
58
|
//#region ../blocks/src/system/runtime/components/booking/SuccessMessage.tsx
|
|
18
59
|
const SuccessMessage = ({ message, resourceName, className }) => {
|
|
19
60
|
return /* @__PURE__ */ jsx(TerminalPanel, {
|
|
@@ -1897,6 +1938,7 @@ function useHeadlessBookingFlow(options) {
|
|
|
1897
1938
|
data,
|
|
1898
1939
|
services: {
|
|
1899
1940
|
items: options.services,
|
|
1941
|
+
categories: readServiceCategories(options),
|
|
1900
1942
|
selected: selectedService,
|
|
1901
1943
|
defaultServiceId,
|
|
1902
1944
|
requiresSelection: Boolean(options.requiresServiceSelection)
|
|
@@ -1961,6 +2003,10 @@ function useHeadlessBookingFlow(options) {
|
|
|
1961
2003
|
actions
|
|
1962
2004
|
};
|
|
1963
2005
|
}
|
|
2006
|
+
const EMPTY_SERVICE_CATEGORIES = [];
|
|
2007
|
+
function readServiceCategories(options) {
|
|
2008
|
+
return options.serviceCategories ?? EMPTY_SERVICE_CATEGORIES;
|
|
2009
|
+
}
|
|
1964
2010
|
function navigateToCheckout(checkoutUrl) {
|
|
1965
2011
|
window.location.href = checkoutUrl;
|
|
1966
2012
|
}
|
|
@@ -2182,10 +2228,97 @@ const TimeSlotSelector = ({ value, onChange, slots, isLoading, timezone, require
|
|
|
2182
2228
|
});
|
|
2183
2229
|
};
|
|
2184
2230
|
//#endregion
|
|
2185
|
-
//#region ../blocks/src/system/runtime/nodes/booking-form.
|
|
2231
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.service-choices.tsx
|
|
2186
2232
|
function optionCardClassName(isSelected) {
|
|
2187
2233
|
return `rb-option-card${isSelected ? " rb-option-card--selected" : ""}`;
|
|
2188
2234
|
}
|
|
2235
|
+
function SelectedCheck() {
|
|
2236
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2237
|
+
className: "rb-option-check",
|
|
2238
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
/**
|
|
2242
|
+
* The service buttons. A site with no categories keeps its single grid; a
|
|
2243
|
+
* categorised site gets a heading per category, then "Other", above the same
|
|
2244
|
+
* grid (issue 1403). Empty categories are skipped, and there are no intros
|
|
2245
|
+
* here, to keep the step compact.
|
|
2246
|
+
*/
|
|
2247
|
+
function DefaultServiceChoices({ booking }) {
|
|
2248
|
+
const layout = layoutServicesByCategory(booking.services.categories, booking.services.items.map((service) => ({
|
|
2249
|
+
service,
|
|
2250
|
+
categoryId: service.categoryId ?? null
|
|
2251
|
+
})), { keepEmptyGroups: false });
|
|
2252
|
+
switch (layout.kind) {
|
|
2253
|
+
case "uncategorized-site": return /* @__PURE__ */ jsxs("div", {
|
|
2254
|
+
className: "rb-reg-stack rb-reg-stack--sm",
|
|
2255
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2256
|
+
className: "ab-subtitle",
|
|
2257
|
+
children: "Service"
|
|
2258
|
+
}), /* @__PURE__ */ jsx(ServiceChoiceGrid, {
|
|
2259
|
+
booking,
|
|
2260
|
+
choices: layout.services
|
|
2261
|
+
})]
|
|
2262
|
+
});
|
|
2263
|
+
case "categorized-site": return /* @__PURE__ */ jsx("div", {
|
|
2264
|
+
className: "rb-reg-stack",
|
|
2265
|
+
children: [...layout.groups.map((group) => ({
|
|
2266
|
+
key: group.category.id,
|
|
2267
|
+
heading: group.category.name,
|
|
2268
|
+
choices: group.services
|
|
2269
|
+
})), ...layout.other.length > 0 ? [{
|
|
2270
|
+
key: "other",
|
|
2271
|
+
heading: "Other",
|
|
2272
|
+
choices: layout.other
|
|
2273
|
+
}] : []].map((group) => /* @__PURE__ */ jsxs("div", {
|
|
2274
|
+
className: "rb-reg-stack rb-reg-stack--sm",
|
|
2275
|
+
"data-booking-service-group": group.key,
|
|
2276
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
2277
|
+
className: "ab-subtitle",
|
|
2278
|
+
children: group.heading
|
|
2279
|
+
}), /* @__PURE__ */ jsx(ServiceChoiceGrid, {
|
|
2280
|
+
booking,
|
|
2281
|
+
choices: group.choices
|
|
2282
|
+
})]
|
|
2283
|
+
}, group.key))
|
|
2284
|
+
});
|
|
2285
|
+
default: return assertNever(layout);
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
function ServiceChoiceGrid({ booking, choices }) {
|
|
2289
|
+
const selectedServiceId = booking.services.selected?.id;
|
|
2290
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2291
|
+
className: "rb-reg-grid",
|
|
2292
|
+
children: choices.map(({ service }) => {
|
|
2293
|
+
const isSelected = selectedServiceId === service.id;
|
|
2294
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
2295
|
+
type: "button",
|
|
2296
|
+
onClick: () => booking.actions.selectService(service.id),
|
|
2297
|
+
className: optionCardClassName(isSelected),
|
|
2298
|
+
"aria-pressed": isSelected,
|
|
2299
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
2300
|
+
className: "rb-flex-1",
|
|
2301
|
+
children: [
|
|
2302
|
+
/* @__PURE__ */ jsx("div", {
|
|
2303
|
+
className: "ab-subtitle",
|
|
2304
|
+
children: service.title
|
|
2305
|
+
}),
|
|
2306
|
+
service.description ? /* @__PURE__ */ jsx("div", {
|
|
2307
|
+
className: "ab-text rb-on-surface--muted",
|
|
2308
|
+
children: service.description
|
|
2309
|
+
}) : null,
|
|
2310
|
+
service.durationMinutes ? /* @__PURE__ */ jsxs("div", {
|
|
2311
|
+
className: "ab-text rb-on-surface--muted",
|
|
2312
|
+
children: [service.durationMinutes, " minutes"]
|
|
2313
|
+
}) : null
|
|
2314
|
+
]
|
|
2315
|
+
}), isSelected ? /* @__PURE__ */ jsx(SelectedCheck, {}) : null]
|
|
2316
|
+
}, service.id);
|
|
2317
|
+
})
|
|
2318
|
+
});
|
|
2319
|
+
}
|
|
2320
|
+
//#endregion
|
|
2321
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.default-ui.tsx
|
|
2189
2322
|
function formatBookingAmount(amount, currency) {
|
|
2190
2323
|
return formatCurrencyAmount(amount, currency, { decimals: "auto" });
|
|
2191
2324
|
}
|
|
@@ -2276,7 +2409,6 @@ function DefaultBookingStepContent({ booking, errorSummaryId }) {
|
|
|
2276
2409
|
function DefaultServiceSelectionStep({ booking }) {
|
|
2277
2410
|
const services = booking.services.items;
|
|
2278
2411
|
const resources = booking.resources.items;
|
|
2279
|
-
const selectedServiceId = booking.services.selected?.id;
|
|
2280
2412
|
const selectedResourceId = booking.resources.selectedResourceId;
|
|
2281
2413
|
const showServiceSelect = booking.services.requiresSelection || services.length > 1;
|
|
2282
2414
|
const showResourceSelect = booking.resources.requiresSelection || resources.length > 1;
|
|
@@ -2291,41 +2423,7 @@ function DefaultServiceSelectionStep({ booking }) {
|
|
|
2291
2423
|
className: "ab-text rb-on-surface--muted",
|
|
2292
2424
|
children: "Choose the service you'd like to book"
|
|
2293
2425
|
})] }),
|
|
2294
|
-
showServiceSelect ? /* @__PURE__ */
|
|
2295
|
-
className: "rb-reg-stack rb-reg-stack--sm",
|
|
2296
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
2297
|
-
className: "ab-subtitle",
|
|
2298
|
-
children: "Service"
|
|
2299
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
2300
|
-
className: "rb-reg-grid",
|
|
2301
|
-
children: services.map((service) => {
|
|
2302
|
-
const isSelected = selectedServiceId === service.id;
|
|
2303
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
2304
|
-
type: "button",
|
|
2305
|
-
onClick: () => booking.actions.selectService(service.id),
|
|
2306
|
-
className: optionCardClassName(isSelected),
|
|
2307
|
-
"aria-pressed": isSelected,
|
|
2308
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
2309
|
-
className: "rb-flex-1",
|
|
2310
|
-
children: [
|
|
2311
|
-
/* @__PURE__ */ jsx("div", {
|
|
2312
|
-
className: "ab-subtitle",
|
|
2313
|
-
children: service.title
|
|
2314
|
-
}),
|
|
2315
|
-
service.description ? /* @__PURE__ */ jsx("div", {
|
|
2316
|
-
className: "ab-text rb-on-surface--muted",
|
|
2317
|
-
children: service.description
|
|
2318
|
-
}) : null,
|
|
2319
|
-
service.durationMinutes ? /* @__PURE__ */ jsxs("div", {
|
|
2320
|
-
className: "ab-text rb-on-surface--muted",
|
|
2321
|
-
children: [service.durationMinutes, " minutes"]
|
|
2322
|
-
}) : null
|
|
2323
|
-
]
|
|
2324
|
-
}), isSelected ? /* @__PURE__ */ jsx(SelectedCheck, {}) : null]
|
|
2325
|
-
}, service.id);
|
|
2326
|
-
})
|
|
2327
|
-
})]
|
|
2328
|
-
}) : null,
|
|
2426
|
+
showServiceSelect ? /* @__PURE__ */ jsx(DefaultServiceChoices, { booking }) : null,
|
|
2329
2427
|
booking.resources.state.tag === "loading" ? /* @__PURE__ */ jsxs("div", {
|
|
2330
2428
|
className: "ab-center",
|
|
2331
2429
|
children: [/* @__PURE__ */ jsx(SpinnerNode, {
|
|
@@ -2715,7 +2813,7 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
|
|
|
2715
2813
|
case "radio": return /* @__PURE__ */ jsx("div", {
|
|
2716
2814
|
className: "rb-space-y-2",
|
|
2717
2815
|
children: field.field.options?.map((option) => /* @__PURE__ */ jsxs("label", {
|
|
2718
|
-
className: "
|
|
2816
|
+
className: "form-check",
|
|
2719
2817
|
children: [/* @__PURE__ */ jsx("input", {
|
|
2720
2818
|
type: "radio",
|
|
2721
2819
|
name: field.id,
|
|
@@ -2727,7 +2825,7 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
|
|
|
2727
2825
|
...validationProps,
|
|
2728
2826
|
className: "form-radio"
|
|
2729
2827
|
}), /* @__PURE__ */ jsx("span", {
|
|
2730
|
-
className: "
|
|
2828
|
+
className: "form-check-label",
|
|
2731
2829
|
children: option.label
|
|
2732
2830
|
})]
|
|
2733
2831
|
}, option.value))
|
|
@@ -2737,47 +2835,20 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
|
|
|
2737
2835
|
const checkedValues = toStringArray(value);
|
|
2738
2836
|
return /* @__PURE__ */ jsx("div", {
|
|
2739
2837
|
className: "rb-space-y-2",
|
|
2740
|
-
children: field.field.options.map((option) => /* @__PURE__ */
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
value: option.value
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
onBlur,
|
|
2751
|
-
...validationProps,
|
|
2752
|
-
className: "form-checkbox"
|
|
2753
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
2754
|
-
className: "rb-caption",
|
|
2755
|
-
children: option.label
|
|
2756
|
-
})]
|
|
2838
|
+
children: field.field.options.map((option) => /* @__PURE__ */ jsx(CheckboxChoice, {
|
|
2839
|
+
name: field.id,
|
|
2840
|
+
value: option.value,
|
|
2841
|
+
checked: checkedValues.includes(option.value),
|
|
2842
|
+
onChange: (event) => {
|
|
2843
|
+
onChange(event.target.checked ? [...checkedValues, option.value] : checkedValues.filter((item) => item !== option.value));
|
|
2844
|
+
},
|
|
2845
|
+
onBlur,
|
|
2846
|
+
...validationProps,
|
|
2847
|
+
label: option.label
|
|
2757
2848
|
}, option.value))
|
|
2758
2849
|
});
|
|
2759
2850
|
}
|
|
2760
|
-
return /* @__PURE__ */
|
|
2761
|
-
className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer",
|
|
2762
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
2763
|
-
type: "checkbox",
|
|
2764
|
-
id: field.inputId,
|
|
2765
|
-
name: field.id,
|
|
2766
|
-
checked: Boolean(value),
|
|
2767
|
-
onChange: (event) => onChange(event.target.checked),
|
|
2768
|
-
onBlur,
|
|
2769
|
-
required: field.required,
|
|
2770
|
-
...validationProps,
|
|
2771
|
-
className: "form-checkbox"
|
|
2772
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
2773
|
-
className: "rb-caption",
|
|
2774
|
-
children: field.field.placeholder || field.label
|
|
2775
|
-
})]
|
|
2776
|
-
});
|
|
2777
|
-
case "booking_requirement_consent": return /* @__PURE__ */ jsxs("label", {
|
|
2778
|
-
className: "rb-flex rb-items-start rb-gap-2 rb-cursor-pointer",
|
|
2779
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
2780
|
-
type: "checkbox",
|
|
2851
|
+
return /* @__PURE__ */ jsx(CheckboxChoice, {
|
|
2781
2852
|
id: field.inputId,
|
|
2782
2853
|
name: field.id,
|
|
2783
2854
|
checked: Boolean(value),
|
|
@@ -2785,11 +2856,18 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
|
|
|
2785
2856
|
onBlur,
|
|
2786
2857
|
required: field.required,
|
|
2787
2858
|
...validationProps,
|
|
2788
|
-
|
|
2789
|
-
})
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2859
|
+
label: field.field.placeholder || field.label
|
|
2860
|
+
});
|
|
2861
|
+
case "booking_requirement_consent": return /* @__PURE__ */ jsx(CheckboxChoice, {
|
|
2862
|
+
id: field.inputId,
|
|
2863
|
+
name: field.id,
|
|
2864
|
+
checked: Boolean(value),
|
|
2865
|
+
onChange: (event) => onChange(event.target.checked),
|
|
2866
|
+
onBlur,
|
|
2867
|
+
required: field.required,
|
|
2868
|
+
...validationProps,
|
|
2869
|
+
label: field.field.checkboxLabel,
|
|
2870
|
+
presentation: "tile"
|
|
2793
2871
|
});
|
|
2794
2872
|
case "number": return /* @__PURE__ */ jsx("input", {
|
|
2795
2873
|
...commonProps,
|
|
@@ -2904,12 +2982,6 @@ function DefaultBookingErrorSummary({ errors, id }) {
|
|
|
2904
2982
|
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))]
|
|
2905
2983
|
});
|
|
2906
2984
|
}
|
|
2907
|
-
function SelectedCheck() {
|
|
2908
|
-
return /* @__PURE__ */ jsx("div", {
|
|
2909
|
-
className: "rb-option-check",
|
|
2910
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
2911
|
-
});
|
|
2912
|
-
}
|
|
2913
2985
|
//#endregion
|
|
2914
2986
|
//#region ../blocks/src/system/runtime/nodes/booking-form.client.tsx
|
|
2915
2987
|
const PORTAL_REBOOK_QUERY_PARAM = "rebook";
|
|
@@ -2962,6 +3034,7 @@ const BookingFormClient = ({ siteId: siteIdProp, render }) => {
|
|
|
2962
3034
|
formId: render.hydration.formId ?? form?.id ?? "booking-form",
|
|
2963
3035
|
form,
|
|
2964
3036
|
services,
|
|
3037
|
+
serviceCategories: render.hydration.serviceCategories,
|
|
2965
3038
|
initialServiceId,
|
|
2966
3039
|
initialResourceId,
|
|
2967
3040
|
initialData: render.hydration.initialData ?? void 0,
|