@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
package/dist/client/bookings.mjs
CHANGED
|
@@ -2786,7 +2786,7 @@ function parseEventPageSurfaceDestinationMode(value) {
|
|
|
2786
2786
|
return value === "cms-managed" || value === "system-managed" ? value : void 0;
|
|
2787
2787
|
}
|
|
2788
2788
|
function parseEventPageSurfaceSubject(value) {
|
|
2789
|
-
if (!isRecord$
|
|
2789
|
+
if (!isRecord$7(value)) return err$1({ kind: "notObject" });
|
|
2790
2790
|
switch (value.kind) {
|
|
2791
2791
|
case "eventSeries": {
|
|
2792
2792
|
const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
|
|
@@ -2841,7 +2841,7 @@ function parseEventSeriesIdList(values) {
|
|
|
2841
2841
|
}
|
|
2842
2842
|
return ok$1(parsed);
|
|
2843
2843
|
}
|
|
2844
|
-
function isRecord$
|
|
2844
|
+
function isRecord$7(value) {
|
|
2845
2845
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2846
2846
|
}
|
|
2847
2847
|
//#endregion
|
|
@@ -3122,6 +3122,46 @@ function addLocalScheduleDays(date, days) {
|
|
|
3122
3122
|
day: utcDate.getUTCDate()
|
|
3123
3123
|
};
|
|
3124
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
|
+
}
|
|
3125
3165
|
function sessionStartMs(session) {
|
|
3126
3166
|
return Date.parse(session.startsAt);
|
|
3127
3167
|
}
|
|
@@ -6777,16 +6817,18 @@ const themeV2RuntimeStyleFieldNames = [
|
|
|
6777
6817
|
"_frameStyles",
|
|
6778
6818
|
"_sectionStyles",
|
|
6779
6819
|
"_containerStyles",
|
|
6780
|
-
"_cardStyles"
|
|
6781
|
-
"_transitionStyles",
|
|
6782
|
-
"styleGroup"
|
|
6820
|
+
"_cardStyles"
|
|
6783
6821
|
];
|
|
6784
6822
|
const themeV2BlockSpecificRawStyleFieldNames = [
|
|
6785
6823
|
"_contentCardStyles",
|
|
6786
6824
|
"_heroLayoutStyles",
|
|
6787
6825
|
"_textCardStyles"
|
|
6788
6826
|
];
|
|
6789
|
-
const themeV2NormalEditorRawStyleFieldNames = [
|
|
6827
|
+
const themeV2NormalEditorRawStyleFieldNames = [
|
|
6828
|
+
...themeV2RuntimeStyleFieldNames,
|
|
6829
|
+
...themeV2BlockSpecificRawStyleFieldNames,
|
|
6830
|
+
"styleGroup"
|
|
6831
|
+
];
|
|
6790
6832
|
new Set(themeV2NormalEditorRawStyleFieldNames);
|
|
6791
6833
|
[...themeV2RuntimeStyleFieldNames, ...themeV2BlockSpecificRawStyleFieldNames];
|
|
6792
6834
|
const pageDesignEditorBackgroundOverrideOwner = "page-design-editor";
|
|
@@ -6975,7 +7017,7 @@ const boxBackgroundSchema = z.discriminatedUnion("type", [
|
|
|
6975
7017
|
})
|
|
6976
7018
|
]);
|
|
6977
7019
|
function normalizeAuthoringOpacity(value) {
|
|
6978
|
-
if (!isRecord$
|
|
7020
|
+
if (!isRecord$6(value)) return value;
|
|
6979
7021
|
return {
|
|
6980
7022
|
...value,
|
|
6981
7023
|
opacity: normalizeOpacity(value.opacity)
|
|
@@ -6984,7 +7026,7 @@ function normalizeAuthoringOpacity(value) {
|
|
|
6984
7026
|
function normalizeOpacity(value) {
|
|
6985
7027
|
return typeof value === "number" && value > 1 && value <= 100 ? value / 100 : value;
|
|
6986
7028
|
}
|
|
6987
|
-
function isRecord$
|
|
7029
|
+
function isRecord$6(value) {
|
|
6988
7030
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6989
7031
|
}
|
|
6990
7032
|
//#endregion
|
|
@@ -7901,6 +7943,7 @@ const publicEventLoaderQuerySchemaShape = {
|
|
|
7901
7943
|
seriesSlug: z.string().optional(),
|
|
7902
7944
|
includeOccurrenceId: z.string().optional(),
|
|
7903
7945
|
readIntent: z.string().optional(),
|
|
7946
|
+
detailAdmission: z.string().optional(),
|
|
7904
7947
|
detailLevel: z.string().optional(),
|
|
7905
7948
|
readProfile: z.string().optional()
|
|
7906
7949
|
};
|
|
@@ -8067,11 +8110,11 @@ const publicEventBookingAvailabilitySchema = z.discriminatedUnion("kind", [z.obj
|
|
|
8067
8110
|
"series_archived",
|
|
8068
8111
|
"parent_archived",
|
|
8069
8112
|
"parent_inconsistent",
|
|
8070
|
-
"not_public",
|
|
8071
8113
|
"already_started",
|
|
8072
8114
|
"enrollment_closed"
|
|
8073
8115
|
])
|
|
8074
8116
|
})]);
|
|
8117
|
+
const publicEventBookingClosedDetailSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("opensSoon") }), z.object({ kind: z.literal("paused") })]);
|
|
8075
8118
|
const publicRunSessionSchema = z.object({
|
|
8076
8119
|
occurrenceId: z.string(),
|
|
8077
8120
|
startsAt: z.string(),
|
|
@@ -8116,6 +8159,7 @@ const publicEventBaseSchema = z.object({
|
|
|
8116
8159
|
destination: publicEventDestinationSchema,
|
|
8117
8160
|
requiresRegistration: z.boolean(),
|
|
8118
8161
|
bookingAvailability: publicEventBookingAvailabilitySchema,
|
|
8162
|
+
bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
|
|
8119
8163
|
deliveryMode: z.enum([
|
|
8120
8164
|
"in_person",
|
|
8121
8165
|
"online",
|
|
@@ -8666,7 +8710,7 @@ var BlockApiError = class extends Error {
|
|
|
8666
8710
|
this.name = "BlockApiError";
|
|
8667
8711
|
}
|
|
8668
8712
|
};
|
|
8669
|
-
function isRecord$
|
|
8713
|
+
function isRecord$5(value) {
|
|
8670
8714
|
return typeof value === "object" && value !== null;
|
|
8671
8715
|
}
|
|
8672
8716
|
function isJsonResponseContentType(contentType) {
|
|
@@ -8690,15 +8734,15 @@ async function parseJsonBody(response) {
|
|
|
8690
8734
|
}
|
|
8691
8735
|
}
|
|
8692
8736
|
function isFieldError(value) {
|
|
8693
|
-
return isRecord$
|
|
8737
|
+
return isRecord$5(value) && !Array.isArray(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string";
|
|
8694
8738
|
}
|
|
8695
8739
|
function fieldErrorsFromUnknown(value) {
|
|
8696
8740
|
if (!Array.isArray(value)) return void 0;
|
|
8697
8741
|
return value.every(isFieldError) ? value : void 0;
|
|
8698
8742
|
}
|
|
8699
8743
|
function getBlockApiErrorDetails(data) {
|
|
8700
|
-
if (!isRecord$
|
|
8701
|
-
const nestedError = isRecord$
|
|
8744
|
+
if (!isRecord$5(data)) return {};
|
|
8745
|
+
const nestedError = isRecord$5(data.error) ? data.error : void 0;
|
|
8702
8746
|
const message = typeof nestedError?.message === "string" ? nestedError.message : typeof data.message === "string" ? data.message : void 0;
|
|
8703
8747
|
const code = typeof nestedError?.code === "string" ? nestedError.code : typeof data.code === "string" ? data.code : void 0;
|
|
8704
8748
|
const fieldErrors = fieldErrorsFromUnknown(nestedError?.fieldErrors) ?? fieldErrorsFromUnknown(data.fieldErrors);
|
|
@@ -9669,12 +9713,12 @@ function resolveBookingSiteId(siteId, form) {
|
|
|
9669
9713
|
return siteId || form?.siteId || "";
|
|
9670
9714
|
}
|
|
9671
9715
|
function normalizeBookingFormConfig(form) {
|
|
9672
|
-
if (!isRecord$
|
|
9716
|
+
if (!isRecord$4(form)) return null;
|
|
9673
9717
|
const id = readNonEmptyString(form.id);
|
|
9674
9718
|
const name = readNonEmptyString(form.name);
|
|
9675
9719
|
if (!id || !name) return null;
|
|
9676
|
-
const schemaSource = isRecord$
|
|
9677
|
-
const settingsSource = isRecord$
|
|
9720
|
+
const schemaSource = isRecord$4(form.schema) ? form.schema : isRecord$4(form.schemaJson) ? form.schemaJson : null;
|
|
9721
|
+
const settingsSource = isRecord$4(form.settings) ? form.settings : isRecord$4(form.settingsJson) ? form.settingsJson : null;
|
|
9678
9722
|
return {
|
|
9679
9723
|
id,
|
|
9680
9724
|
name,
|
|
@@ -9694,8 +9738,8 @@ function normalizeBookingServices(services) {
|
|
|
9694
9738
|
};
|
|
9695
9739
|
if (!services) return [];
|
|
9696
9740
|
if (Array.isArray(services)) return services.filter(isBookingFormService).map(normalizeService);
|
|
9697
|
-
if (isRecord$
|
|
9698
|
-
return isRecord$
|
|
9741
|
+
if (isRecord$4(services) && "services" in services) return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
9742
|
+
return isRecord$4(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
9699
9743
|
}
|
|
9700
9744
|
function normalizeBookingSchema(value) {
|
|
9701
9745
|
if (!value) return void 0;
|
|
@@ -9706,7 +9750,7 @@ function normalizeBookingSchema(value) {
|
|
|
9706
9750
|
};
|
|
9707
9751
|
}
|
|
9708
9752
|
function readBookingFormField(value) {
|
|
9709
|
-
if (!isRecord$
|
|
9753
|
+
if (!isRecord$4(value)) return null;
|
|
9710
9754
|
const id = readNonEmptyString(value.id);
|
|
9711
9755
|
const label = readNonEmptyString(value.label);
|
|
9712
9756
|
const type = readBookingFieldType(value.type);
|
|
@@ -9749,7 +9793,7 @@ function readBookingFieldOptions(value) {
|
|
|
9749
9793
|
return options.length > 0 ? options : void 0;
|
|
9750
9794
|
}
|
|
9751
9795
|
function readBookingFieldOption(value) {
|
|
9752
|
-
if (!isRecord$
|
|
9796
|
+
if (!isRecord$4(value)) return null;
|
|
9753
9797
|
const optionValue = readNonEmptyString(value.value);
|
|
9754
9798
|
const label = readNonEmptyString(value.label);
|
|
9755
9799
|
return optionValue && label ? {
|
|
@@ -9769,7 +9813,7 @@ function normalizeBookingSettings(value) {
|
|
|
9769
9813
|
};
|
|
9770
9814
|
}
|
|
9771
9815
|
function isBookingFormService(value) {
|
|
9772
|
-
return isRecord$
|
|
9816
|
+
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);
|
|
9773
9817
|
}
|
|
9774
9818
|
function collectBookingCustomFields(data) {
|
|
9775
9819
|
const customFields = {};
|
|
@@ -9819,7 +9863,7 @@ function readStringArray(value) {
|
|
|
9819
9863
|
const strings = value.filter((item) => typeof item === "string");
|
|
9820
9864
|
return strings.length > 0 ? strings : void 0;
|
|
9821
9865
|
}
|
|
9822
|
-
function isRecord$
|
|
9866
|
+
function isRecord$4(value) {
|
|
9823
9867
|
return typeof value === "object" && value !== null;
|
|
9824
9868
|
}
|
|
9825
9869
|
function getBookingServicePaymentSelectionMode(service) {
|
|
@@ -11078,6 +11122,38 @@ function formatScheduleDate(isoString, locale) {
|
|
|
11078
11122
|
return new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(date);
|
|
11079
11123
|
}
|
|
11080
11124
|
//#endregion
|
|
11125
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.service-categories.ts
|
|
11126
|
+
function isRecord$3(value) {
|
|
11127
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11128
|
+
}
|
|
11129
|
+
function readCategory(value) {
|
|
11130
|
+
if (!isRecord$3(value)) return [];
|
|
11131
|
+
const { id, name, description } = value;
|
|
11132
|
+
if (typeof id !== "string" || id.trim() === "" || typeof name !== "string") return [];
|
|
11133
|
+
return [{
|
|
11134
|
+
id,
|
|
11135
|
+
name,
|
|
11136
|
+
description: typeof description === "string" ? description : null
|
|
11137
|
+
}];
|
|
11138
|
+
}
|
|
11139
|
+
/**
|
|
11140
|
+
* The ordered service categories carried by a catalogue-shaped services
|
|
11141
|
+
* source (`{ services, categories }`). Every other shape has none, which
|
|
11142
|
+
* reads as a site without categories. Order is preserved: the database owns
|
|
11143
|
+
* it.
|
|
11144
|
+
*/
|
|
11145
|
+
function normalizeBookingServiceCategories(services) {
|
|
11146
|
+
if (!isRecord$3(services) || !Array.isArray(services.categories)) return [];
|
|
11147
|
+
return services.categories.flatMap(readCategory);
|
|
11148
|
+
}
|
|
11149
|
+
/**
|
|
11150
|
+
* The ordered service categories a headless booking override was given in
|
|
11151
|
+
* its loader data (`data.services`).
|
|
11152
|
+
*/
|
|
11153
|
+
function readOverrideServiceCategories(data) {
|
|
11154
|
+
return isRecord$3(data) ? normalizeBookingServiceCategories(data.services) : [];
|
|
11155
|
+
}
|
|
11156
|
+
//#endregion
|
|
11081
11157
|
//#region ../blocks/src/system/runtime/nodes/booking-form.validationErrors.ts
|
|
11082
11158
|
function omitRecordKey(record, key) {
|
|
11083
11159
|
if (!(key in record)) return record;
|
|
@@ -11687,6 +11763,7 @@ function getAppointmentBookingOverrideInput(props) {
|
|
|
11687
11763
|
formId,
|
|
11688
11764
|
form,
|
|
11689
11765
|
services,
|
|
11766
|
+
serviceCategories: readOverrideServiceCategories(props.data),
|
|
11690
11767
|
initialServiceId: defaultServiceId,
|
|
11691
11768
|
initialResourceId: toOptionalAppointmentResourceId(content.resourceId ?? form.settings?.resourceId),
|
|
11692
11769
|
requiresServiceSelection: Boolean(content.requiresServiceSelection),
|
|
@@ -12400,6 +12477,7 @@ function useHeadlessBookingFlow(options) {
|
|
|
12400
12477
|
data,
|
|
12401
12478
|
services: {
|
|
12402
12479
|
items: options.services,
|
|
12480
|
+
categories: readServiceCategories(options),
|
|
12403
12481
|
selected: selectedService,
|
|
12404
12482
|
defaultServiceId,
|
|
12405
12483
|
requiresSelection: Boolean(options.requiresServiceSelection)
|
|
@@ -12464,6 +12542,10 @@ function useHeadlessBookingFlow(options) {
|
|
|
12464
12542
|
actions
|
|
12465
12543
|
};
|
|
12466
12544
|
}
|
|
12545
|
+
const EMPTY_SERVICE_CATEGORIES = [];
|
|
12546
|
+
function readServiceCategories(options) {
|
|
12547
|
+
return options.serviceCategories ?? EMPTY_SERVICE_CATEGORIES;
|
|
12548
|
+
}
|
|
12467
12549
|
function navigateToCheckout(checkoutUrl) {
|
|
12468
12550
|
window.location.href = checkoutUrl;
|
|
12469
12551
|
}
|
|
@@ -14026,10 +14108,117 @@ function BookingConsentAgreement({ agreement, showTitle = true, title, titleId }
|
|
|
14026
14108
|
})] });
|
|
14027
14109
|
}
|
|
14028
14110
|
//#endregion
|
|
14029
|
-
//#region ../blocks/src/system/runtime/
|
|
14111
|
+
//#region ../blocks/src/system/runtime/shared/components/CheckboxChoice.tsx
|
|
14112
|
+
/**
|
|
14113
|
+
* The customer-facing checkbox every block renders. Styling comes from the
|
|
14114
|
+
* theme's input CSS (`.form-check`, `.form-checkbox`), so it follows each
|
|
14115
|
+
* site's input colours, borders and corners.
|
|
14116
|
+
*/
|
|
14117
|
+
function CheckboxChoice({ label, presentation = "row", className, ...inputProps }) {
|
|
14118
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
14119
|
+
className: clsx("form-check", presentation === "tile" && "form-check--tile", className),
|
|
14120
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
14121
|
+
...inputProps,
|
|
14122
|
+
type: "checkbox",
|
|
14123
|
+
className: "form-checkbox"
|
|
14124
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
14125
|
+
className: "form-check-label",
|
|
14126
|
+
children: label
|
|
14127
|
+
})]
|
|
14128
|
+
});
|
|
14129
|
+
}
|
|
14130
|
+
//#endregion
|
|
14131
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.service-choices.tsx
|
|
14030
14132
|
function optionCardClassName(isSelected) {
|
|
14031
14133
|
return `rb-option-card${isSelected ? " rb-option-card--selected" : ""}`;
|
|
14032
14134
|
}
|
|
14135
|
+
function SelectedCheck() {
|
|
14136
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14137
|
+
className: "rb-option-check",
|
|
14138
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
14139
|
+
});
|
|
14140
|
+
}
|
|
14141
|
+
/**
|
|
14142
|
+
* The service buttons. A site with no categories keeps its single grid; a
|
|
14143
|
+
* categorised site gets a heading per category, then "Other", above the same
|
|
14144
|
+
* grid (issue 1403). Empty categories are skipped, and there are no intros
|
|
14145
|
+
* here, to keep the step compact.
|
|
14146
|
+
*/
|
|
14147
|
+
function DefaultServiceChoices({ booking }) {
|
|
14148
|
+
const layout = layoutServicesByCategory(booking.services.categories, booking.services.items.map((service) => ({
|
|
14149
|
+
service,
|
|
14150
|
+
categoryId: service.categoryId ?? null
|
|
14151
|
+
})), { keepEmptyGroups: false });
|
|
14152
|
+
switch (layout.kind) {
|
|
14153
|
+
case "uncategorized-site": return /* @__PURE__ */ jsxs("div", {
|
|
14154
|
+
className: "rb-reg-stack rb-reg-stack--sm",
|
|
14155
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
14156
|
+
className: "ab-subtitle",
|
|
14157
|
+
children: "Service"
|
|
14158
|
+
}), /* @__PURE__ */ jsx(ServiceChoiceGrid, {
|
|
14159
|
+
booking,
|
|
14160
|
+
choices: layout.services
|
|
14161
|
+
})]
|
|
14162
|
+
});
|
|
14163
|
+
case "categorized-site": return /* @__PURE__ */ jsx("div", {
|
|
14164
|
+
className: "rb-reg-stack",
|
|
14165
|
+
children: [...layout.groups.map((group) => ({
|
|
14166
|
+
key: group.category.id,
|
|
14167
|
+
heading: group.category.name,
|
|
14168
|
+
choices: group.services
|
|
14169
|
+
})), ...layout.other.length > 0 ? [{
|
|
14170
|
+
key: "other",
|
|
14171
|
+
heading: "Other",
|
|
14172
|
+
choices: layout.other
|
|
14173
|
+
}] : []].map((group) => /* @__PURE__ */ jsxs("div", {
|
|
14174
|
+
className: "rb-reg-stack rb-reg-stack--sm",
|
|
14175
|
+
"data-booking-service-group": group.key,
|
|
14176
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
14177
|
+
className: "ab-subtitle",
|
|
14178
|
+
children: group.heading
|
|
14179
|
+
}), /* @__PURE__ */ jsx(ServiceChoiceGrid, {
|
|
14180
|
+
booking,
|
|
14181
|
+
choices: group.choices
|
|
14182
|
+
})]
|
|
14183
|
+
}, group.key))
|
|
14184
|
+
});
|
|
14185
|
+
default: return assertNever(layout);
|
|
14186
|
+
}
|
|
14187
|
+
}
|
|
14188
|
+
function ServiceChoiceGrid({ booking, choices }) {
|
|
14189
|
+
const selectedServiceId = booking.services.selected?.id;
|
|
14190
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14191
|
+
className: "rb-reg-grid",
|
|
14192
|
+
children: choices.map(({ service }) => {
|
|
14193
|
+
const isSelected = selectedServiceId === service.id;
|
|
14194
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
14195
|
+
type: "button",
|
|
14196
|
+
onClick: () => booking.actions.selectService(service.id),
|
|
14197
|
+
className: optionCardClassName(isSelected),
|
|
14198
|
+
"aria-pressed": isSelected,
|
|
14199
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
14200
|
+
className: "rb-flex-1",
|
|
14201
|
+
children: [
|
|
14202
|
+
/* @__PURE__ */ jsx("div", {
|
|
14203
|
+
className: "ab-subtitle",
|
|
14204
|
+
children: service.title
|
|
14205
|
+
}),
|
|
14206
|
+
service.description ? /* @__PURE__ */ jsx("div", {
|
|
14207
|
+
className: "ab-text rb-on-surface--muted",
|
|
14208
|
+
children: service.description
|
|
14209
|
+
}) : null,
|
|
14210
|
+
service.durationMinutes ? /* @__PURE__ */ jsxs("div", {
|
|
14211
|
+
className: "ab-text rb-on-surface--muted",
|
|
14212
|
+
children: [service.durationMinutes, " minutes"]
|
|
14213
|
+
}) : null
|
|
14214
|
+
]
|
|
14215
|
+
}), isSelected ? /* @__PURE__ */ jsx(SelectedCheck, {}) : null]
|
|
14216
|
+
}, service.id);
|
|
14217
|
+
})
|
|
14218
|
+
});
|
|
14219
|
+
}
|
|
14220
|
+
//#endregion
|
|
14221
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.default-ui.tsx
|
|
14033
14222
|
function formatBookingAmount(amount, currency) {
|
|
14034
14223
|
return formatCurrencyAmount(amount, currency, { decimals: "auto" });
|
|
14035
14224
|
}
|
|
@@ -14120,7 +14309,6 @@ function DefaultBookingStepContent({ booking, errorSummaryId }) {
|
|
|
14120
14309
|
function DefaultServiceSelectionStep({ booking }) {
|
|
14121
14310
|
const services = booking.services.items;
|
|
14122
14311
|
const resources = booking.resources.items;
|
|
14123
|
-
const selectedServiceId = booking.services.selected?.id;
|
|
14124
14312
|
const selectedResourceId = booking.resources.selectedResourceId;
|
|
14125
14313
|
const showServiceSelect = booking.services.requiresSelection || services.length > 1;
|
|
14126
14314
|
const showResourceSelect = booking.resources.requiresSelection || resources.length > 1;
|
|
@@ -14135,41 +14323,7 @@ function DefaultServiceSelectionStep({ booking }) {
|
|
|
14135
14323
|
className: "ab-text rb-on-surface--muted",
|
|
14136
14324
|
children: "Choose the service you'd like to book"
|
|
14137
14325
|
})] }),
|
|
14138
|
-
showServiceSelect ? /* @__PURE__ */
|
|
14139
|
-
className: "rb-reg-stack rb-reg-stack--sm",
|
|
14140
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
14141
|
-
className: "ab-subtitle",
|
|
14142
|
-
children: "Service"
|
|
14143
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
14144
|
-
className: "rb-reg-grid",
|
|
14145
|
-
children: services.map((service) => {
|
|
14146
|
-
const isSelected = selectedServiceId === service.id;
|
|
14147
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
14148
|
-
type: "button",
|
|
14149
|
-
onClick: () => booking.actions.selectService(service.id),
|
|
14150
|
-
className: optionCardClassName(isSelected),
|
|
14151
|
-
"aria-pressed": isSelected,
|
|
14152
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
14153
|
-
className: "rb-flex-1",
|
|
14154
|
-
children: [
|
|
14155
|
-
/* @__PURE__ */ jsx("div", {
|
|
14156
|
-
className: "ab-subtitle",
|
|
14157
|
-
children: service.title
|
|
14158
|
-
}),
|
|
14159
|
-
service.description ? /* @__PURE__ */ jsx("div", {
|
|
14160
|
-
className: "ab-text rb-on-surface--muted",
|
|
14161
|
-
children: service.description
|
|
14162
|
-
}) : null,
|
|
14163
|
-
service.durationMinutes ? /* @__PURE__ */ jsxs("div", {
|
|
14164
|
-
className: "ab-text rb-on-surface--muted",
|
|
14165
|
-
children: [service.durationMinutes, " minutes"]
|
|
14166
|
-
}) : null
|
|
14167
|
-
]
|
|
14168
|
-
}), isSelected ? /* @__PURE__ */ jsx(SelectedCheck, {}) : null]
|
|
14169
|
-
}, service.id);
|
|
14170
|
-
})
|
|
14171
|
-
})]
|
|
14172
|
-
}) : null,
|
|
14326
|
+
showServiceSelect ? /* @__PURE__ */ jsx(DefaultServiceChoices, { booking }) : null,
|
|
14173
14327
|
booking.resources.state.tag === "loading" ? /* @__PURE__ */ jsxs("div", {
|
|
14174
14328
|
className: "ab-center",
|
|
14175
14329
|
children: [/* @__PURE__ */ jsx(SpinnerNode, {
|
|
@@ -14559,7 +14713,7 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
|
|
|
14559
14713
|
case "radio": return /* @__PURE__ */ jsx("div", {
|
|
14560
14714
|
className: "rb-space-y-2",
|
|
14561
14715
|
children: field.field.options?.map((option) => /* @__PURE__ */ jsxs("label", {
|
|
14562
|
-
className: "
|
|
14716
|
+
className: "form-check",
|
|
14563
14717
|
children: [/* @__PURE__ */ jsx("input", {
|
|
14564
14718
|
type: "radio",
|
|
14565
14719
|
name: field.id,
|
|
@@ -14571,7 +14725,7 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
|
|
|
14571
14725
|
...validationProps,
|
|
14572
14726
|
className: "form-radio"
|
|
14573
14727
|
}), /* @__PURE__ */ jsx("span", {
|
|
14574
|
-
className: "
|
|
14728
|
+
className: "form-check-label",
|
|
14575
14729
|
children: option.label
|
|
14576
14730
|
})]
|
|
14577
14731
|
}, option.value))
|
|
@@ -14581,47 +14735,20 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
|
|
|
14581
14735
|
const checkedValues = toStringArray(value);
|
|
14582
14736
|
return /* @__PURE__ */ jsx("div", {
|
|
14583
14737
|
className: "rb-space-y-2",
|
|
14584
|
-
children: field.field.options.map((option) => /* @__PURE__ */
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14589
|
-
value: option.value
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14594
|
-
onBlur,
|
|
14595
|
-
...validationProps,
|
|
14596
|
-
className: "form-checkbox"
|
|
14597
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
14598
|
-
className: "rb-caption",
|
|
14599
|
-
children: option.label
|
|
14600
|
-
})]
|
|
14738
|
+
children: field.field.options.map((option) => /* @__PURE__ */ jsx(CheckboxChoice, {
|
|
14739
|
+
name: field.id,
|
|
14740
|
+
value: option.value,
|
|
14741
|
+
checked: checkedValues.includes(option.value),
|
|
14742
|
+
onChange: (event) => {
|
|
14743
|
+
onChange(event.target.checked ? [...checkedValues, option.value] : checkedValues.filter((item) => item !== option.value));
|
|
14744
|
+
},
|
|
14745
|
+
onBlur,
|
|
14746
|
+
...validationProps,
|
|
14747
|
+
label: option.label
|
|
14601
14748
|
}, option.value))
|
|
14602
14749
|
});
|
|
14603
14750
|
}
|
|
14604
|
-
return /* @__PURE__ */
|
|
14605
|
-
className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer",
|
|
14606
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
14607
|
-
type: "checkbox",
|
|
14608
|
-
id: field.inputId,
|
|
14609
|
-
name: field.id,
|
|
14610
|
-
checked: Boolean(value),
|
|
14611
|
-
onChange: (event) => onChange(event.target.checked),
|
|
14612
|
-
onBlur,
|
|
14613
|
-
required: field.required,
|
|
14614
|
-
...validationProps,
|
|
14615
|
-
className: "form-checkbox"
|
|
14616
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
14617
|
-
className: "rb-caption",
|
|
14618
|
-
children: field.field.placeholder || field.label
|
|
14619
|
-
})]
|
|
14620
|
-
});
|
|
14621
|
-
case "booking_requirement_consent": return /* @__PURE__ */ jsxs("label", {
|
|
14622
|
-
className: "rb-flex rb-items-start rb-gap-2 rb-cursor-pointer",
|
|
14623
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
14624
|
-
type: "checkbox",
|
|
14751
|
+
return /* @__PURE__ */ jsx(CheckboxChoice, {
|
|
14625
14752
|
id: field.inputId,
|
|
14626
14753
|
name: field.id,
|
|
14627
14754
|
checked: Boolean(value),
|
|
@@ -14629,11 +14756,18 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
|
|
|
14629
14756
|
onBlur,
|
|
14630
14757
|
required: field.required,
|
|
14631
14758
|
...validationProps,
|
|
14632
|
-
|
|
14633
|
-
})
|
|
14634
|
-
|
|
14635
|
-
|
|
14636
|
-
|
|
14759
|
+
label: field.field.placeholder || field.label
|
|
14760
|
+
});
|
|
14761
|
+
case "booking_requirement_consent": return /* @__PURE__ */ jsx(CheckboxChoice, {
|
|
14762
|
+
id: field.inputId,
|
|
14763
|
+
name: field.id,
|
|
14764
|
+
checked: Boolean(value),
|
|
14765
|
+
onChange: (event) => onChange(event.target.checked),
|
|
14766
|
+
onBlur,
|
|
14767
|
+
required: field.required,
|
|
14768
|
+
...validationProps,
|
|
14769
|
+
label: field.field.checkboxLabel,
|
|
14770
|
+
presentation: "tile"
|
|
14637
14771
|
});
|
|
14638
14772
|
case "number": return /* @__PURE__ */ jsx("input", {
|
|
14639
14773
|
...commonProps,
|
|
@@ -14748,12 +14882,6 @@ function DefaultBookingErrorSummary({ errors, id }) {
|
|
|
14748
14882
|
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))]
|
|
14749
14883
|
});
|
|
14750
14884
|
}
|
|
14751
|
-
function SelectedCheck() {
|
|
14752
|
-
return /* @__PURE__ */ jsx("div", {
|
|
14753
|
-
className: "rb-option-check",
|
|
14754
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
14755
|
-
});
|
|
14756
|
-
}
|
|
14757
14885
|
//#endregion
|
|
14758
14886
|
//#region ../blocks/src/system/runtime/shared/utils/checkoutUrls.ts
|
|
14759
14887
|
/**
|
|
@@ -14871,6 +14999,7 @@ const BookingFormClient$1 = ({ siteId: siteIdProp, render }) => {
|
|
|
14871
14999
|
formId: render.hydration.formId ?? form?.id ?? "booking-form",
|
|
14872
15000
|
form,
|
|
14873
15001
|
services,
|
|
15002
|
+
serviceCategories: render.hydration.serviceCategories,
|
|
14874
15003
|
initialServiceId,
|
|
14875
15004
|
initialResourceId,
|
|
14876
15005
|
initialData: render.hydration.initialData ?? void 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-Dcgsncxb.mjs";
|
|
2
2
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
3
3
|
import { n as normalizeCarouselProps, t as CarouselNodeClient } from "./carousel.client-jahpU9Vz.mjs";
|
|
4
4
|
import "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { t as CartController } from "./shop-commerce-
|
|
3
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-Dcgsncxb.mjs";
|
|
2
|
+
import { t as CartController } from "./shop-commerce-B88zmWWo.mjs";
|
|
3
|
+
import { t as mountShopBlockIsland } from "./shopShared-cuaONpkJ.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region ../blocks/src/system/runtime/nodes/cart.client.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { n as CheckoutController } from "./shop-commerce-
|
|
3
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-Dcgsncxb.mjs";
|
|
2
|
+
import { n as CheckoutController } from "./shop-commerce-B88zmWWo.mjs";
|
|
3
|
+
import { t as mountShopBlockIsland } from "./shopShared-cuaONpkJ.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region ../blocks/src/system/runtime/nodes/checkout.client.tsx
|