@riverbankcms/sdk 0.178.0 → 0.180.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/README.md +15 -8
- package/dist/_dts/{BlocksIslandsHydrator-CrKsXtpD.d.ts → BlocksIslandsHydrator-DC_AvZwy.d.ts} +1 -1
- package/dist/_dts/{Page-C9i27wZA.d.ts → Page-DQOxVtp3.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-DzGSR3jh.d.ts → SdkPreviewMode-DrLgY9_f.d.ts} +3 -2
- package/dist/_dts/{client-BnYN6XsH.d.ts → client-BP7VBRvs.d.ts} +281 -72
- package/dist/_dts/{content-types-CXj6lp3d.d.ts → content-types-1-K2qi__.d.ts} +2 -2
- package/dist/_dts/{contracts-BZLwkTwL.d.ts → contracts-Dfqz0Tcu.d.ts} +6 -116
- package/dist/_dts/{generatePageMetadata-ByEWwe9j.d.ts → generatePageMetadata-CSfAqmry.d.ts} +2 -2
- package/dist/_dts/{index-BE9dWIsr.d.ts → index-B0_2-65A.d.ts} +3 -3
- package/dist/_dts/{index-0HFgCnGz.d.ts → index-BeM5Ylwf.d.ts} +5 -3
- package/dist/_dts/{index-D9-N1d9v.d.ts → index-Blrw2oVk.d.ts} +1 -1
- package/dist/_dts/{index-cTpvQg_Q.d.ts → index-CB5Csefo.d.ts} +2 -2
- package/dist/_dts/{index-nnEdgc3Z.d.ts → index-DCcxLa8p.d.ts} +4 -2
- package/dist/_dts/{index-DCa-8TEY.d.ts → index-DQBGwBPx.d.ts} +1 -1
- package/dist/_dts/{index-CKDRr54L.d.ts → index-DQr358-m.d.ts} +4 -4
- package/dist/_dts/{loadContent-DYkVV6w4.d.ts → loadContent-BG2tLGXj.d.ts} +15 -13
- package/dist/_dts/{request-B20VRWHH.d.ts → request-P08l6mkr.d.ts} +3641 -994
- package/dist/_dts/{resolveBlockData-C_aK5GIS.d.ts → resolveBlockData-BDHc8lFs.d.ts} +8 -5
- package/dist/_dts/resolvePageContent-Y3IZBbtL.d.ts +61 -0
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +3 -3
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +7 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +16 -8
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +3 -3
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +19 -6
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/serviceBookingOutline-BvtNagjw.d.ts +583 -0
- package/dist/_dts/{types-CYcd15BQ.d.ts → types-BrK6SS5c.d.ts} +9 -7
- package/dist/_dts/{types-CMZ5mkpv.d.ts → types-DpEAnP4F.d.ts} +10 -39
- package/dist/_dts/{types-rm2M4LGx.d.ts → types-HAy1-Jjo.d.ts} +3 -3
- package/dist/_dts/{validation-BSxnRhyy.d.ts → validation-D6q3tOBA.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-D1n09bu-.mjs → BlocksIslandsHydrator-DJSmdNUJ.mjs} +17 -18
- package/dist/client/{BookingMailingListNote-DSD4gS96.mjs → BookingMailingListNote-CGxg37zx.mjs} +92 -60
- package/dist/client/{BookingQuestionFields-B57oGPcj.mjs → BookingQuestionFields-DXegGSnS.mjs} +26 -5
- package/dist/client/{CalendarNavigationChevron-qXvsFYOg.mjs → CalendarNavigationChevron-VfP50sYm.mjs} +42 -9
- package/dist/client/{CheckboxChoice-b-PJLEXe.mjs → CheckboxChoice-BZPLCgTU.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-Olvrwi3Z.mjs → DemoBookingPortalAccess-0Ua44F1j.mjs} +13 -8
- package/dist/client/{EventCalendar.client-DwFNFb-0.mjs → EventCalendar.client-CrpiyDSP.mjs} +10 -10
- package/dist/client/{EventCombined.client-Ffu-aVOb.mjs → EventCombined.client-D0me9wnz.mjs} +10 -10
- package/dist/client/{EventEmbeddedCheckoutStep-B18VbNS_.mjs → EventEmbeddedCheckoutStep-BDnicDM6.mjs} +1 -1
- package/dist/client/{EventItem-b8tVkNHA.mjs → EventItem-CJITrGkF.mjs} +249 -8
- package/dist/client/{EventListWeekNavigation-BxnJW_Gf.mjs → EventListWeekNavigation-BlEm_xjq.mjs} +1 -1
- package/dist/client/{EventListing.client-ViCnrNg4.mjs → EventListing.client-BNM_HuS0.mjs} +3 -3
- package/dist/client/{EventListing.view-CdjiepMf.mjs → EventListing.view-CXfb7RRy.mjs} +7 -16
- package/dist/client/{EventRegistrationPayment-BVd70XkH.mjs → EventRegistrationPayment-DiD9uYs6.mjs} +1439 -293
- package/dist/client/{Page-DqETUt-U.mjs → Page-bX7iy_MK.mjs} +24299 -20103
- package/dist/client/{ProtectedSubmitButton-C-ql101B.mjs → ProtectedSubmitButton-De6AzhE6.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-DkFnbzf_.mjs → SiteTermsAgreementField-BAdW5DvE.mjs} +23 -16
- package/dist/client/{BookingPanelArrangement--EkA1ZQd.mjs → StepIndicator-DCfdcb7s.mjs} +12 -12
- package/dist/client/{StepIndicator-JO2PS03n.mjs → StepIndicator-DCqorVne.mjs} +7 -7
- package/dist/client/{TabBarFragment-BqfRLojo.mjs → TabBarFragment-DlKQRhP4.mjs} +1 -1
- package/dist/client/{ThemedButton-DuaYtnvG.mjs → ThemedButton-CnSa7o-I.mjs} +66 -66
- package/dist/client/{accessibleSurfaces-DN8it_Cx.mjs → accessibleSurfaces-Wl8-_OVJ.mjs} +1 -1
- package/dist/client/{accordion-XgNxl0Wg.mjs → accordion-wofJY8xY.mjs} +1 -1
- package/dist/client/{booking-form.client-ljJoDwuI.mjs → booking-form.client-CYl9NrqS.mjs} +412 -79
- package/dist/client/{bookingForm-DtEHwY4W.mjs → bookingForm-kgVWtuMe.mjs} +4 -4
- package/dist/client/bookings.mjs +40 -10
- package/dist/client/{boxStyleClassNames-BHoMAcun.mjs → boxStyleClassNames-CQHWz5gJ.mjs} +19 -19
- package/dist/client/{carousel-B3UhbFu7.mjs → carousel-BE1dEFsD.mjs} +2 -2
- package/dist/client/{carousel.client-h65clfUO.mjs → carousel.client-DMtGYTTM.mjs} +1 -1
- package/dist/client/{cart-DzOJfYOR.mjs → cart-BsjsdGZE.mjs} +3 -3
- package/dist/client/{cart.client-DBG77v-5.mjs → cart.client-DylGUWXY.mjs} +1 -1
- package/dist/client/{checkout-LmePoEgM.mjs → checkout-B5KxEUDr.mjs} +3 -3
- package/dist/client/{checkout.client-DmgZuLBT.mjs → checkout.client-C98fhch3.mjs} +1 -1
- package/dist/client/{checkoutUrls-CMZI8o_V.mjs → checkoutUrls-BMLYTf38.mjs} +1 -1
- package/dist/client/client.mjs +502 -341
- package/dist/client/constants-PfYJsEZF.mjs +101 -0
- package/dist/client/{context-CJIz4FdL.mjs → context-DtKdUdkO.mjs} +200 -27
- package/dist/client/{dateFormatting-UoXqBh10.mjs → dateFormatting-BaGPvQS3.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-6CgFZNvu.mjs → demoPortalMagicLink-B8eDjhuG.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-DaMo6len.mjs → enhanceHeaderSection-DvhD-8eE.mjs} +4 -4
- package/dist/client/{event-registration.client-b6APrFQe.mjs → event-registration.client-Du9a_xAN.mjs} +1982 -1519
- package/dist/client/{eventCalendar-DJYz7yZf.mjs → eventCalendar-Di9wDfzl.mjs} +4 -4
- package/dist/client/{eventCombined-j9VCVgMW.mjs → eventCombined-CNW6nBsB.mjs} +4 -4
- package/dist/client/{eventListing-DWgpGuFM.mjs → eventListing-CQMxQ8By.mjs} +4 -4
- package/dist/client/{eventRegistration-DCinRot3.mjs → eventRegistration-CprS9k1D.mjs} +4 -4
- package/dist/client/events-9LPvwbWp.mjs +28 -0
- package/dist/client/{form-BBBtRwvy.mjs → form-Zl1_8RJ6.mjs} +3 -3
- package/dist/client/{form.client-CZeRQLGF.mjs → form.client-TaMUys6I.mjs} +5 -5
- package/dist/client/{form.parts-DhGGv4_L.mjs → form.parts-CpNPbPPM.mjs} +3 -3
- package/dist/client/{formatDate-DVFVDcDW.mjs → formatDate-hhI1-tzt.mjs} +1 -1
- package/dist/client/gifting/client.mjs +6 -6
- package/dist/client/{gifting-Di9-SpwW.mjs → gifting-DNVa7-Wj.mjs} +4 -4
- package/dist/client/{gifting.client-CjT5PrAZ.mjs → gifting.client-CFUq3GVx.mjs} +5 -5
- package/dist/client/{gifting.parts-ffP6mjMd.mjs → gifting.parts-CDQvxA4A.mjs} +2 -2
- package/dist/client/{headerSection-jjAvtSZk.mjs → headerSection-Cg6083rn.mjs} +2 -2
- package/dist/client/{lookSurfaces-C2VzJfyG.mjs → lookSurfaces-gJ3OqPf9.mjs} +258 -86
- package/dist/client/{newsletter-form.client-D45frHoa.mjs → newsletter-form.client-VuL9I96G.mjs} +6 -6
- package/dist/client/{shop.interactive-D7wky1GL.mjs → newsletter-form.interactive-7Of3eYn0.mjs} +4023 -4029
- package/dist/client/{newsletter-form.parts-CHdg82ct.mjs → newsletter-form.parts-OBqsfT24.mjs} +2 -2
- package/dist/client/{newsletterForm-tS465_vl.mjs → newsletterForm-BkJe_RTv.mjs} +3 -3
- package/dist/client/portal/client.mjs +301 -117
- package/dist/client/{product-detail.client-DIWSeW7P.mjs → product-detail.client-B2hdxqJN.mjs} +1 -1
- package/dist/client/{product-list.client-BRf14h_e.mjs → product-list.client-CCEgu9rx.mjs} +1 -1
- package/dist/client/{productDetail-gxF5whea.mjs → productDetail-CRX_ZRfS.mjs} +3 -3
- package/dist/client/{productList-B9t0XJrN.mjs → productList-BAdJ6z5S.mjs} +3 -3
- package/dist/client/{propsDecoder-Db8wAmgr.mjs → propsDecoder-BLKAmX0S.mjs} +2 -48
- package/dist/client/{registry.server-Bn0gE0uP.mjs → registry.server-Bj9cmHHF.mjs} +10464 -9113
- package/dist/client/rendering/client.mjs +41 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +23 -2836
- package/dist/client/{richText-coerce-COnKrLO7.mjs → richText-coerce-Z45OLLEX.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-Bok1Oy50.mjs → routeIslandApiConfig-DHpTTK77.mjs} +1 -1
- package/dist/client/runtimeResponse-D2j2-mOk.mjs +3 -0
- package/dist/client/{runtimeResponse-9v8q2NBc.mjs → runtimeResponse-DtWSfWSZ.mjs} +1 -1
- package/dist/client/{shop-D1oTPDxm.mjs → shop-BKsgxm_-.mjs} +3 -3
- package/dist/client/{shop-commerce-DyMZLC0a.mjs → shop-commerce-Cbtk_kUW.mjs} +14 -14
- package/dist/client/{shop-commerce-store-FODNS63D.mjs → shop-commerce-store-B-rv2p5h.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-C4xcmFzZ.mjs → shop-discount-apply.state-CiCDLNh7.mjs} +2 -2
- package/dist/client/{shop.client-CRgRulfI.mjs → shop.client-Rnqa74Tk.mjs} +14 -14
- package/dist/client/{shopShared-Bd_hy9ZO.mjs → shopShared-BaBfhjCq.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{noop-D11X-B6n.mjs → src-o7WEvbK1.mjs} +398 -308
- package/dist/client/{timetableModel-UlWfP1gh.mjs → timetableModel-BOff1Kk5.mjs} +259 -11
- package/dist/client/{types-DjWUR_O6.mjs → types-BEaKfam_.mjs} +65 -65
- package/dist/client/{useAvailableSlots-D-qoooLy.mjs → useAvailableSlots-DQJNh10g.mjs} +3 -23
- package/dist/client/useDiscountCodeUi-BcFQRI_7.mjs +196 -0
- package/dist/client/{useEventPagination-CQH2e9sQ.mjs → useEventPagination-BvdcexDC.mjs} +8 -8
- package/dist/client/{view-bGU1ws-m.mjs → view-CTBwSpKv.mjs} +4 -4
- package/dist/client/{display-D1oVR5Eh.mjs → wizardSteps-CWIQyRIw.mjs} +10263 -9078
- package/dist/preview-next/before-render.mjs +5 -3
- package/dist/preview-next/client/{LocationPickerEnvironment-BHAT81Wx.mjs → LocationPickerEnvironment-BW3dRFIv.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-B52hkdIZ.mjs → MapLibreEditMap-Db9BHyXh.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-D-Le7O3o.mjs → PageSectionToolbar-CG6KwITA.mjs} +4 -4
- package/dist/preview-next/client/{PreviewEditorSidebar-DNy5j_ce.mjs → PreviewEditorSidebar-BGBqrC9m.mjs} +8 -7
- package/dist/preview-next/client/{PreviewEditorUI-CzJvgbqt.mjs → PreviewEditorUI-Bwkyx28x.mjs} +5 -5
- package/dist/preview-next/client/{PreviewShell-xhJ6ca1i.mjs → PreviewShell-DB1l6JNU.mjs} +7 -7
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BmYO1TdT.mjs → SdkPreviewModeRuntime-Bs6Cwzr3.mjs} +15 -7
- package/dist/preview-next/client/{lucide-react-McYZeSMb.mjs → lucide-react-00FF_oar.mjs} +13 -1
- package/dist/preview-next/client/{previewAssistantSlot-BN93X9o1.mjs → previewAssistantSlot-T-oDD_Dd.mjs} +6252 -2461
- package/dist/preview-next/client/{previewChromeRoot-C51RQseo.mjs → previewChromeRoot-BeukcDRy.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-oeGquJM-.mjs → sdk-runtime-ceDW_9q2.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-BGTAcPud.mjs → siteStyleAccess-CCB9bScO.mjs} +35 -23
- package/dist/preview-next/client/{useAutosaveStatus-BMGXjGZq.mjs → useAutosaveStatus-D4o0CKq7.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-CTDoR_gQ.mjs → useOpenBlockForSetup-Seccrvwu.mjs} +2 -2
- package/dist/preview-next/container-responsive.css +103 -10
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BtdzkSUg.mjs → route-contract-FwFj8zGL.mjs} +71 -10
- package/dist/server/{Block.shared-Bp3OlOjj.mjs → Block.shared-D6WrRCxX.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-DFEM1a85.mjs → ThemeScopeCore-BQzjDQ2q.mjs} +8 -1
- package/dist/server/{bindings-DrbJuftt.mjs → bindings-CS6ih1Yc.mjs} +37 -6
- package/dist/server/{client-Bf06n9oj.mjs → client-m0ylCj_f.mjs} +436 -526
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/contentTypeResolver-B9vy8BrF.mjs +19 -0
- package/dist/server/data/dataLoaderContext.mjs +1 -1
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{dataLoaderContext-B3fXA54R.mjs → dataLoaderContext-lMRTfG5Z.mjs} +1 -0
- package/dist/server/error-f4g44bKx.mjs +387 -0
- package/dist/server/index.mjs +3 -2
- package/dist/server/loadContent-vgWMz1uD.mjs +694 -0
- package/dist/server/{loadPage-5iZefzDd.mjs → loadPage-CIOL3-9t.mjs} +22 -4
- package/dist/server/{lookMediaFrame-CaH018pK.mjs → lookMediaFrame-m-91jGGn.mjs} +36 -0
- package/dist/server/next.mjs +67 -94
- package/dist/server/{overrideResolution-CUHtm7tW.mjs → overrideResolution-BiHmsvTZ.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-GmPXForc.mjs → pageRenderPlan-DJo_obpi.mjs} +15 -8
- package/dist/server/{pageRuntimeSupport-Dd8LFzfa.mjs → pageRuntimeSupport-BnSuoHON.mjs} +54 -2
- package/dist/server/{pageShared-tz-GVWft.mjs → pageShared-BJuOzxzn.mjs} +554 -304
- package/dist/server/{prebuild-JmsuYCIH.mjs → prebuild-Cr8p8T7V.mjs} +5 -4
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Ce9DDwON.mjs → prefetchBlockData-BZh57-ua.mjs} +5 -3
- package/dist/server/{registry-D12XF_h1.mjs → registry-CvhFwbXJ.mjs} +358 -95
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +5 -4
- package/dist/server/rendering.mjs +9 -8
- package/dist/server/{resolveBlockData-D9yZIN3V.mjs → resolveBlockData-Cv_W1LVB.mjs} +61 -34
- package/dist/server/resolvePageContent-BWKUZUIn.mjs +89 -0
- package/dist/server/{responseMedia-F-ElH2Rd.mjs → responseMedia-KRKguBC5.mjs} +56 -1
- package/dist/server/routing.mjs +271 -57
- package/dist/server/server.mjs +3 -3
- package/dist/server/{loadContent-eaTY7RPg.mjs → servicePageContent-CRKbTm_7.mjs} +719 -459
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/{validation-CLq5cw6M.mjs → validation-DCl-FCk_.mjs} +4 -4
- package/dist/server/{version-oPbhAx8E.mjs → version-DT_R5JAR.mjs} +1 -1
- package/dist/styles/index.css +504 -27
- package/package.json +1 -1
- package/dist/_dts/footerPageOutline-D_XbQW_o.d.ts +0 -256
- package/dist/_dts/resolvePageContent-YT6ndha1.d.ts +0 -162
- package/dist/client/LocationMapActions-CiMtl1Ha.mjs +0 -62
- package/dist/client/MapDrawingSvg-BCZa3dpf.mjs +0 -200
- package/dist/client/constants-4o4_hl34.mjs +0 -6
- package/dist/client/course-DBEU9IA9.mjs +0 -244
- package/dist/client/duration-Q6_QNgiv.mjs +0 -37
- package/dist/client/event-details.client-BwASwKIq.mjs +0 -53
- package/dist/client/eventDetails-BzGOVDI-.mjs +0 -13
- package/dist/client/runtimeResponse-CVkM0dHy.mjs +0 -3
- package/dist/client/useDiscountCodeUi-B9DODAkj.mjs +0 -237
- package/dist/client/view-DNX59QwM.mjs +0 -1372
- package/dist/server/resolvePageContent-CAELMBEJ.mjs +0 -438
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $
|
|
3
|
-
import { Jt as formatDate,
|
|
2
|
+
import { $a as RichText, Ga as getEventAvailabilityStatus, Ho as parseInlineTextFromUnknown, Jo as resolveDateRuntimeContext, Va as formatEventRemainingPlaces, Vo as isInlineTextEmpty, _o as resolveEventTimeZone, go as groupEventsByDate, po as formatEventTimeRange, qa as isEventFull, ro as eventDateOptions, so as formatEventClockLabel } from "./wizardSteps-CWIQyRIw.mjs";
|
|
3
|
+
import { Bt as normalizeLocationAddressText, Jt as mapDrawingSchema, Zt as formatDate, cn as formatBookingCompactEnglishTime, gn as parseLocalScheduleTime, ln as toScheduledBookingDateTime } from "./src-o7WEvbK1.mjs";
|
|
4
4
|
import { T as assertNever } from "./creditProducts-BQ1t1erI.mjs";
|
|
5
|
-
import { t as
|
|
5
|
+
import { n as CALENDAR_LOAD_FAILURE_MESSAGE, t as CalendarNavigationChevron } from "./CalendarNavigationChevron-VfP50sYm.mjs";
|
|
6
|
+
import { q as textColorStyle } from "./accessibleSurfaces-Wl8-_OVJ.mjs";
|
|
7
|
+
import { C as parseThemeButtonVariantId, S as clsx, i as ThemedButtonLink, n as ThemedAuthoredButton, r as ThemedButton } from "./ThemedButton-CnSa7o-I.mjs";
|
|
6
8
|
import { d as formatDateKey, f as getDayOfWeek, i as buildTimetableModel$1, v as isToday } from "./src-uwCpbHXG.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { c as resolveEventLinkProps, n as eventDisplayTitleText } from "./course-DBEU9IA9.mjs";
|
|
10
|
-
import { l as formatEventTeacherLine } from "./EventItem-b8tVkNHA.mjs";
|
|
11
|
-
import { n as CALENDAR_LOAD_FAILURE_MESSAGE, t as CalendarNavigationChevron } from "./CalendarNavigationChevron-qXvsFYOg.mjs";
|
|
12
|
-
import { r as readableMapDrawing, t as AdmittedMapDrawingSvg } from "./MapDrawingSvg-BCZa3dpf.mjs";
|
|
13
|
-
import { t as coerceRichTextDoc } from "./richText-coerce-COnKrLO7.mjs";
|
|
9
|
+
import { t as coerceRichTextDoc } from "./richText-coerce-Z45OLLEX.mjs";
|
|
10
|
+
import { _ as resolveEventLinkProps, m as formatEventTeacherLine, u as eventDisplayTitleText } from "./EventItem-CJITrGkF.mjs";
|
|
14
11
|
import "react";
|
|
15
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
//#region ../core/src/locationLinks.ts
|
|
14
|
+
/** Both outbound actions use the arrival pin, never match evidence. */
|
|
15
|
+
function locationMapLinks(input) {
|
|
16
|
+
const target = input.location != null ? `${input.location.lat},${input.location.lng}` : normalizeLocationAddressText(input.addressText);
|
|
17
|
+
if (target === null) return {
|
|
18
|
+
directions: null,
|
|
19
|
+
googleMaps: null
|
|
20
|
+
};
|
|
21
|
+
const directions = new URL("https://www.google.com/maps/dir/");
|
|
22
|
+
directions.searchParams.set("api", "1");
|
|
23
|
+
directions.searchParams.set("destination", target);
|
|
24
|
+
const search = new URL("https://www.google.com/maps/search/");
|
|
25
|
+
search.searchParams.set("api", "1");
|
|
26
|
+
search.searchParams.set("query", target);
|
|
27
|
+
return {
|
|
28
|
+
directions: directions.toString(),
|
|
29
|
+
googleMaps: search.toString()
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
16
33
|
//#region ../core/src/opening-hours.ts
|
|
17
34
|
const openingHoursWeekdayLabels = {
|
|
18
35
|
monday: "Monday",
|
|
@@ -170,6 +187,237 @@ function renderMark(mark, key, child) {
|
|
|
170
187
|
}
|
|
171
188
|
}
|
|
172
189
|
//#endregion
|
|
190
|
+
//#region ../blocks/src/system/runtime/nodes/shared/LocationMapActions.tsx
|
|
191
|
+
/**
|
|
192
|
+
* `compact` (event details) is one plain Google Maps text link under the venue;
|
|
193
|
+
* `block` (the map block) leads with a secondary directions button and keeps
|
|
194
|
+
* the same Google Maps text link beside it.
|
|
195
|
+
*/
|
|
196
|
+
function LocationMapActions(props) {
|
|
197
|
+
const links = locationMapLinks(props);
|
|
198
|
+
const directionsLabel = props.directionsLabel ?? "Get directions";
|
|
199
|
+
const googleMapsLabel = props.googleMapsLabel ?? "Open in Google Maps";
|
|
200
|
+
if (props.layout === "block") return /* @__PURE__ */ jsxs("div", {
|
|
201
|
+
className: "rb-location-map-actions",
|
|
202
|
+
children: [links.directions ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
203
|
+
href: links.directions,
|
|
204
|
+
target: "_blank",
|
|
205
|
+
rel: "noreferrer",
|
|
206
|
+
variant: "secondary",
|
|
207
|
+
size: "sm",
|
|
208
|
+
label: directionsLabel
|
|
209
|
+
}) : null, links.googleMaps ? /* @__PURE__ */ jsx("a", {
|
|
210
|
+
className: "rb-location-map-link",
|
|
211
|
+
href: links.googleMaps,
|
|
212
|
+
target: "_blank",
|
|
213
|
+
rel: "noreferrer",
|
|
214
|
+
children: googleMapsLabel
|
|
215
|
+
}) : null]
|
|
216
|
+
});
|
|
217
|
+
return links.googleMaps ? /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("a", {
|
|
218
|
+
className: "rb-location-map-link",
|
|
219
|
+
href: links.googleMaps,
|
|
220
|
+
target: "_blank",
|
|
221
|
+
rel: "noreferrer",
|
|
222
|
+
children: googleMapsLabel
|
|
223
|
+
}) }) : null;
|
|
224
|
+
}
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region ../blocks/src/system/runtime/nodes/svg.tsx
|
|
227
|
+
/**
|
|
228
|
+
* Strict SVG-`transform` validator.
|
|
229
|
+
*
|
|
230
|
+
* Accepts only a whitespace/comma-separated list of the geometric transform
|
|
231
|
+
* functions (`translate`/`rotate`/`scale`/`skewX`/`skewY`/`matrix`) whose
|
|
232
|
+
* arguments are plain numbers. This deliberately rejects anything else —
|
|
233
|
+
* `url(...)`, CSS functions, `javascript:`, angle/length units, stray letters —
|
|
234
|
+
* so a persisted custom-block tree can't smuggle an executable or exfiltrating
|
|
235
|
+
* value into the attribute.
|
|
236
|
+
*/
|
|
237
|
+
const TRANSFORM_NUMBER = String.raw`-?(?:\d+\.?\d*|\.\d+)(?:e-?\d+)?`;
|
|
238
|
+
const TRANSFORM_ARGS = String.raw`${TRANSFORM_NUMBER}(?:[\s,]+${TRANSFORM_NUMBER})*`;
|
|
239
|
+
const TRANSFORM_FN = String.raw`(?:translate|rotate|scale|skewX|skewY|matrix)\(\s*${TRANSFORM_ARGS}\s*\)`;
|
|
240
|
+
const SAFE_TRANSFORM_RE = new RegExp(String.raw`^\s*${TRANSFORM_FN}(?:[\s,]*${TRANSFORM_FN})*\s*$`);
|
|
241
|
+
function safeTransform(value) {
|
|
242
|
+
if (typeof value !== "string") return void 0;
|
|
243
|
+
const trimmed = value.trim();
|
|
244
|
+
if (trimmed.length === 0) return void 0;
|
|
245
|
+
return SAFE_TRANSFORM_RE.test(trimmed) ? trimmed : void 0;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Turn paint props into a CSS style object. Colour values pass through as-is so
|
|
249
|
+
* they may reference theme tokens via `var()`, which only resolves in a CSS
|
|
250
|
+
* property context (not in a bare presentation attribute).
|
|
251
|
+
*/
|
|
252
|
+
function paintStyle(shape) {
|
|
253
|
+
const style = {};
|
|
254
|
+
if (shape.fill !== void 0) style.fill = shape.fill;
|
|
255
|
+
if (shape.stroke !== void 0) style.stroke = shape.stroke;
|
|
256
|
+
if (shape.strokeWidth !== void 0) style.strokeWidth = shape.strokeWidth;
|
|
257
|
+
if (shape.fillOpacity !== void 0) style.fillOpacity = shape.fillOpacity;
|
|
258
|
+
if (shape.strokeOpacity !== void 0) style.strokeOpacity = shape.strokeOpacity;
|
|
259
|
+
if (shape.strokeLinecap !== void 0) style.strokeLinecap = shape.strokeLinecap;
|
|
260
|
+
if (shape.strokeLinejoin !== void 0) style.strokeLinejoin = shape.strokeLinejoin;
|
|
261
|
+
if (shape.strokeDasharray !== void 0) style.strokeDasharray = shape.strokeDasharray;
|
|
262
|
+
return style;
|
|
263
|
+
}
|
|
264
|
+
function renderShape(shape, key) {
|
|
265
|
+
const style = paintStyle(shape);
|
|
266
|
+
const transform = safeTransform(shape.transform);
|
|
267
|
+
switch (shape.kind) {
|
|
268
|
+
case "text": return /* @__PURE__ */ jsx("text", {
|
|
269
|
+
className: shape.className,
|
|
270
|
+
x: shape.x,
|
|
271
|
+
y: shape.y,
|
|
272
|
+
transform,
|
|
273
|
+
children: shape.text
|
|
274
|
+
}, key);
|
|
275
|
+
case "path": return /* @__PURE__ */ jsx("path", {
|
|
276
|
+
d: shape.d,
|
|
277
|
+
className: shape.className,
|
|
278
|
+
fillRule: shape.fillRule,
|
|
279
|
+
style,
|
|
280
|
+
transform
|
|
281
|
+
}, key);
|
|
282
|
+
case "ellipse": return /* @__PURE__ */ jsx("ellipse", {
|
|
283
|
+
cx: shape.cx,
|
|
284
|
+
cy: shape.cy,
|
|
285
|
+
rx: shape.rx,
|
|
286
|
+
ry: shape.ry,
|
|
287
|
+
style,
|
|
288
|
+
transform
|
|
289
|
+
}, key);
|
|
290
|
+
case "circle": return /* @__PURE__ */ jsx("circle", {
|
|
291
|
+
cx: shape.cx,
|
|
292
|
+
cy: shape.cy,
|
|
293
|
+
r: shape.r,
|
|
294
|
+
style,
|
|
295
|
+
transform
|
|
296
|
+
}, key);
|
|
297
|
+
case "rect": return /* @__PURE__ */ jsx("rect", {
|
|
298
|
+
x: shape.x,
|
|
299
|
+
y: shape.y,
|
|
300
|
+
className: shape.className,
|
|
301
|
+
width: shape.width,
|
|
302
|
+
height: shape.height,
|
|
303
|
+
rx: shape.rx,
|
|
304
|
+
ry: shape.ry,
|
|
305
|
+
style,
|
|
306
|
+
transform
|
|
307
|
+
}, key);
|
|
308
|
+
case "line": return /* @__PURE__ */ jsx("line", {
|
|
309
|
+
x1: shape.x1,
|
|
310
|
+
y1: shape.y1,
|
|
311
|
+
x2: shape.x2,
|
|
312
|
+
y2: shape.y2,
|
|
313
|
+
style,
|
|
314
|
+
transform
|
|
315
|
+
}, key);
|
|
316
|
+
default: return null;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
const SvgNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, viewBox, width, height, className, style, ariaHidden = true, ariaLabel, shapes }) => {
|
|
320
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
321
|
+
viewBox,
|
|
322
|
+
width,
|
|
323
|
+
height,
|
|
324
|
+
className,
|
|
325
|
+
style,
|
|
326
|
+
"aria-hidden": ariaHidden || void 0,
|
|
327
|
+
role: ariaLabel ? "img" : void 0,
|
|
328
|
+
"aria-label": ariaLabel,
|
|
329
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
330
|
+
fill: "none",
|
|
331
|
+
children: (Array.isArray(shapes) ? shapes : []).map((shape, index) => renderShape(shape, index))
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region ../blocks/src/system/runtime/nodes/shared/MapDrawingSvg.tsx
|
|
336
|
+
const PIN_PATH = "M0 0C-3.5-9-13-15-13-25A13 13 0 1 1 13-25C13-15 3.5-9 0 0ZM0-20.5A4.5 4.5 0 1 0 0-29.5A4.5 4.5 0 1 0 0-20.5Z";
|
|
337
|
+
const commands = (points) => points.map(([x, y], index) => `${index ? "L" : "M"}${x} ${y}`).join(" ");
|
|
338
|
+
function pathShape(path) {
|
|
339
|
+
return path.kind === "polygon" ? {
|
|
340
|
+
kind: "path",
|
|
341
|
+
className: path.className,
|
|
342
|
+
fillRule: path.fillRule,
|
|
343
|
+
d: path.rings.map((ring) => `${commands(ring)} Z`).join(" ")
|
|
344
|
+
} : {
|
|
345
|
+
kind: "path",
|
|
346
|
+
className: path.className,
|
|
347
|
+
d: commands(path.points)
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
function labelShapes(label) {
|
|
351
|
+
const [x, y] = label.point, transform = `rotate(${label.angle} ${x} ${y})`;
|
|
352
|
+
return [label.haloClassName, label.className].map((className) => ({
|
|
353
|
+
kind: "text",
|
|
354
|
+
className,
|
|
355
|
+
x,
|
|
356
|
+
y,
|
|
357
|
+
transform,
|
|
358
|
+
text: label.text
|
|
359
|
+
}));
|
|
360
|
+
}
|
|
361
|
+
/** The drawing the renderer below would show, or null when there's nothing it can draw. */
|
|
362
|
+
function readableMapDrawing(drawing) {
|
|
363
|
+
const parsed = mapDrawingSchema.safeParse(drawing);
|
|
364
|
+
return parsed.success ? parsed.data : null;
|
|
365
|
+
}
|
|
366
|
+
/** Untrusted standalone callers retain boundary admission. */
|
|
367
|
+
function MapDrawingSvg(props) {
|
|
368
|
+
const drawing = readableMapDrawing(props.drawing);
|
|
369
|
+
return drawing ? /* @__PURE__ */ jsx(AdmittedMapDrawingSvg, {
|
|
370
|
+
...props,
|
|
371
|
+
drawing
|
|
372
|
+
}) : null;
|
|
373
|
+
}
|
|
374
|
+
/** Render an already admitted value without allocating another validation copy. */
|
|
375
|
+
function AdmittedMapDrawingSvg(props) {
|
|
376
|
+
const drawing = props.drawing;
|
|
377
|
+
const name = props.wider ? "wider" : "neighbourhood", frame = drawing.frames[name];
|
|
378
|
+
const shapes = [
|
|
379
|
+
{
|
|
380
|
+
kind: "rect",
|
|
381
|
+
className: frame.backgroundClass,
|
|
382
|
+
x: 0,
|
|
383
|
+
y: 0,
|
|
384
|
+
width: 800,
|
|
385
|
+
height: 800
|
|
386
|
+
},
|
|
387
|
+
...frame.paths.map(pathShape),
|
|
388
|
+
...frame.labels.flatMap(labelShapes),
|
|
389
|
+
{
|
|
390
|
+
kind: "path",
|
|
391
|
+
className: frame.pin.className,
|
|
392
|
+
fillRule: "evenodd",
|
|
393
|
+
d: PIN_PATH,
|
|
394
|
+
transform: `translate(${frame.pin.point.join(" ")})`
|
|
395
|
+
}
|
|
396
|
+
];
|
|
397
|
+
return /* @__PURE__ */ jsxs("figure", {
|
|
398
|
+
className: `rb-map-drawing ${props.className ?? ""}`.trim(),
|
|
399
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
400
|
+
className: "rb-map-drawing-crop",
|
|
401
|
+
style: cropHeightStyle(Math.max(255, props.height ?? 320), props.heightAs ?? "fixed"),
|
|
402
|
+
children: /* @__PURE__ */ jsx(SvgNode, {
|
|
403
|
+
className: `map-${name}`,
|
|
404
|
+
viewBox: frame.viewBox.join(" "),
|
|
405
|
+
shapes,
|
|
406
|
+
ariaHidden: false,
|
|
407
|
+
ariaLabel: props.label ? `Map showing ${props.label}` : "Map showing the arrival pin"
|
|
408
|
+
})
|
|
409
|
+
}), /* @__PURE__ */ jsxs("figcaption", { children: ["© ", /* @__PURE__ */ jsx("a", {
|
|
410
|
+
href: "https://www.openstreetmap.org/copyright",
|
|
411
|
+
target: "_blank",
|
|
412
|
+
rel: "noreferrer",
|
|
413
|
+
children: "OpenStreetMap contributors"
|
|
414
|
+
})] })]
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
function cropHeightStyle(height, heightAs) {
|
|
418
|
+
return heightAs === "minimum" ? { minHeight: height } : { height };
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
173
421
|
//#region ../blocks/src/system/runtime/nodes/location-map.view.tsx
|
|
174
422
|
function OpeningHoursTable({ hours, lookLayout }) {
|
|
175
423
|
if (!hours) return null;
|
|
@@ -844,4 +1092,4 @@ function formatDayLabel(date, timeZone, options) {
|
|
|
844
1092
|
}), options);
|
|
845
1093
|
}
|
|
846
1094
|
//#endregion
|
|
847
|
-
export { CalendarRecurringWeek as a, LinkNode as c, LocationMapView as d,
|
|
1095
|
+
export { CalendarRecurringWeek as a, LinkNode as c, LocationMapView as d, MapDrawingSvg as f, Text as h, buildWeekBoardViewProps as i, RichTextNode as l, LocationMapActions as m, WeekBoardView as n, RecurringSchedule as o, SvgNode as p, buildWeekBoardNavigationState as r, ButtonNode as s, buildTimetableModel as t, TextNode as u };
|
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
//#region ../site-contracts/src/identity/blockKinds.ts
|
|
4
|
+
/**
|
|
5
|
+
* Standard semantic variant roles a theme exposes.
|
|
6
|
+
*
|
|
7
|
+
* Block content references variants by role; the active theme determines
|
|
8
|
+
* what each role looks like.
|
|
9
|
+
*/
|
|
10
|
+
const VARIANT_ROLES = [
|
|
11
|
+
"primary",
|
|
12
|
+
"secondary",
|
|
13
|
+
"outline",
|
|
14
|
+
"ghost",
|
|
15
|
+
"accent"
|
|
16
|
+
];
|
|
17
|
+
const variantRoleSchema = z.enum(VARIANT_ROLES);
|
|
18
|
+
const SYSTEM_BLOCK_KINDS = [
|
|
19
|
+
"block.hero",
|
|
20
|
+
"block.intro",
|
|
21
|
+
"block.columns",
|
|
22
|
+
"block.collection",
|
|
23
|
+
"block.class-prices",
|
|
24
|
+
"block.feature-cards",
|
|
25
|
+
"block.media-text",
|
|
26
|
+
"block.cta-full",
|
|
27
|
+
"block.single-button",
|
|
28
|
+
"block.body-text",
|
|
29
|
+
"block.location-map",
|
|
30
|
+
"block.faq",
|
|
31
|
+
"block.list",
|
|
32
|
+
"block.testimonials",
|
|
33
|
+
"block.team-members",
|
|
34
|
+
"block.embed",
|
|
35
|
+
"block.blog-post",
|
|
36
|
+
"block.blog-listing",
|
|
37
|
+
"block.site-header",
|
|
38
|
+
"block.site-footer",
|
|
39
|
+
"block.form",
|
|
40
|
+
"block.contact-newsletter",
|
|
41
|
+
"block.appointment-booking",
|
|
42
|
+
"block.appointment-services",
|
|
43
|
+
"block.service-details",
|
|
44
|
+
"block.weekly-slot-availability",
|
|
45
|
+
"block.event-registration",
|
|
46
|
+
...[
|
|
47
|
+
"block.event-details",
|
|
48
|
+
"block.event-spotlight",
|
|
49
|
+
"block.event-listing",
|
|
50
|
+
"block.event-calendar",
|
|
51
|
+
"block.recurring-schedule",
|
|
52
|
+
"block.offerings-preview"
|
|
53
|
+
],
|
|
54
|
+
"block.shop",
|
|
55
|
+
"block.product-list",
|
|
56
|
+
"block.product-detail",
|
|
57
|
+
"block.cart",
|
|
58
|
+
"block.checkout",
|
|
59
|
+
"block.gifting",
|
|
60
|
+
"block.newsletter-signup",
|
|
61
|
+
"block.image-gallery",
|
|
62
|
+
"block.video-grid",
|
|
63
|
+
"block.audio-player",
|
|
64
|
+
"block.file-download"
|
|
65
|
+
];
|
|
66
|
+
//#endregion
|
|
3
67
|
//#region ../site-contracts/src/tokens.ts
|
|
4
68
|
const blockColorTokenNames = [
|
|
5
69
|
"text",
|
|
@@ -235,70 +299,6 @@ function paletteColorEntries(colors) {
|
|
|
235
299
|
}));
|
|
236
300
|
}
|
|
237
301
|
//#endregion
|
|
238
|
-
//#region ../site-contracts/src/identity/blockKinds.ts
|
|
239
|
-
/**
|
|
240
|
-
* Standard semantic variant roles a theme exposes.
|
|
241
|
-
*
|
|
242
|
-
* Block content references variants by role; the active theme determines
|
|
243
|
-
* what each role looks like.
|
|
244
|
-
*/
|
|
245
|
-
const VARIANT_ROLES = [
|
|
246
|
-
"primary",
|
|
247
|
-
"secondary",
|
|
248
|
-
"outline",
|
|
249
|
-
"ghost",
|
|
250
|
-
"accent"
|
|
251
|
-
];
|
|
252
|
-
const variantRoleSchema = z.enum(VARIANT_ROLES);
|
|
253
|
-
const SYSTEM_BLOCK_KINDS = [
|
|
254
|
-
"block.hero",
|
|
255
|
-
"block.intro",
|
|
256
|
-
"block.columns",
|
|
257
|
-
"block.collection",
|
|
258
|
-
"block.class-prices",
|
|
259
|
-
"block.feature-cards",
|
|
260
|
-
"block.media-text",
|
|
261
|
-
"block.cta-full",
|
|
262
|
-
"block.single-button",
|
|
263
|
-
"block.body-text",
|
|
264
|
-
"block.location-map",
|
|
265
|
-
"block.faq",
|
|
266
|
-
"block.list",
|
|
267
|
-
"block.testimonials",
|
|
268
|
-
"block.team-members",
|
|
269
|
-
"block.embed",
|
|
270
|
-
"block.blog-post",
|
|
271
|
-
"block.blog-listing",
|
|
272
|
-
"block.site-header",
|
|
273
|
-
"block.site-footer",
|
|
274
|
-
"block.form",
|
|
275
|
-
"block.contact-newsletter",
|
|
276
|
-
"block.appointment-booking",
|
|
277
|
-
"block.appointment-services",
|
|
278
|
-
"block.service-details",
|
|
279
|
-
"block.weekly-slot-availability",
|
|
280
|
-
"block.event-registration",
|
|
281
|
-
...[
|
|
282
|
-
"block.event-details",
|
|
283
|
-
"block.event-spotlight",
|
|
284
|
-
"block.event-listing",
|
|
285
|
-
"block.event-calendar",
|
|
286
|
-
"block.recurring-schedule",
|
|
287
|
-
"block.offerings-preview"
|
|
288
|
-
],
|
|
289
|
-
"block.shop",
|
|
290
|
-
"block.product-list",
|
|
291
|
-
"block.product-detail",
|
|
292
|
-
"block.cart",
|
|
293
|
-
"block.checkout",
|
|
294
|
-
"block.gifting",
|
|
295
|
-
"block.newsletter-signup",
|
|
296
|
-
"block.image-gallery",
|
|
297
|
-
"block.video-grid",
|
|
298
|
-
"block.audio-player",
|
|
299
|
-
"block.file-download"
|
|
300
|
-
];
|
|
301
|
-
//#endregion
|
|
302
302
|
//#region ../site-contracts/src/theme/buttonTypography.ts
|
|
303
303
|
const textTransformSchema = z.enum([
|
|
304
304
|
"none",
|
|
@@ -775,4 +775,4 @@ const buttonSizeNameSchema = z.enum([
|
|
|
775
775
|
"xl"
|
|
776
776
|
]);
|
|
777
777
|
//#endregion
|
|
778
|
-
export {
|
|
778
|
+
export { paletteModeSchema as C, SYSTEM_BLOCK_KINDS as D, themeColorTokenSchema as E, VARIANT_ROLES as O, paletteColorsSchema as S, parseThemeColorToken as T, hexColorSchema as _, createStandardButtonSurfacePolicy as a, paletteColorEntries as b, buttonEffectApplicationSchema as c, buttonVariantIdSchema as d, buttonVisualStatesSchema as f, blockColorTokenNames as g, PALETTE_TOKEN_NAMES as h, buttonSizeNameSchema as i, buttonPressOffsetSchema as l, parseOpaqueButtonColourToken as m, STANDARD_BUTTON_SURFACE_POLICY as n, isVariantRole as o, opaqueButtonColourTokenSchema as p, asSpecialVariantId as r, unsafeAsOpaqueButtonColourToken as s, DEFAULT_VARIANT_ALIAS_ID as t, buttonSystemSchema as u, isThemeColorToken as v, parseColorTokenParts as w, paletteColorsFromEntries as x, normalizePaletteHex as y };
|
|
@@ -1,28 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Zt as formatDate$1, _n as parseUtcIsoDateTimeString, bn as resolveBookingTimeZoneId, fn as formatLocalScheduleDate, hn as parseBookingLocalDate, mn as getLocalScheduleDate, rn as formatTime$1, t as assertNever, un as addLocalScheduleDays } from "./src-o7WEvbK1.mjs";
|
|
3
3
|
import { D as unsafeAsAppointmentResourceId } from "./creditProducts-BQ1t1erI.mjs";
|
|
4
|
-
import { n as useBlockApi } from "./context-
|
|
4
|
+
import { n as useBlockApi } from "./context-DtKdUdkO.mjs";
|
|
5
5
|
import { useCallback, useEffect, useReducer, useRef } from "react";
|
|
6
|
-
function clientPersonPhrases(noun) {
|
|
7
|
-
if (noun == null) return {
|
|
8
|
-
label: "Who with",
|
|
9
|
-
chooseAnother: "Choose someone else",
|
|
10
|
-
anyone: "Anyone who's free",
|
|
11
|
-
chooseYours: "Choose who you'd like to see",
|
|
12
|
-
withName: (name) => `With ${name}`,
|
|
13
|
-
listLabel: () => "With"
|
|
14
|
-
};
|
|
15
|
-
const singularLabel = capitalize(noun.singular);
|
|
16
|
-
return {
|
|
17
|
-
label: singularLabel,
|
|
18
|
-
chooseAnother: `Choose another ${noun.singular}`,
|
|
19
|
-
anyone: `Any ${noun.singular}`,
|
|
20
|
-
chooseYours: `Choose your ${noun.singular}`,
|
|
21
|
-
withName: (name) => `${singularLabel}: ${name}`,
|
|
22
|
-
listLabel: (count) => count === 1 ? singularLabel : capitalize(noun.plural)
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
6
|
//#region ../blocks/src/utils/date-formatting.ts
|
|
27
7
|
/**
|
|
28
8
|
* Resolve the browser/runtime timezone for booking surfaces.
|
|
@@ -490,4 +470,4 @@ function useAvailableSlots({ serviceId, resourceId, selectedDate, timezone }) {
|
|
|
490
470
|
};
|
|
491
471
|
}
|
|
492
472
|
//#endregion
|
|
493
|
-
export { formatTime as a, formatDatePillParts as i, useAvailableDates as n, getRuntimeTimeZone as o, formatDate as r,
|
|
473
|
+
export { formatTime as a, formatDatePillParts as i, useAvailableDates as n, getRuntimeTimeZone as o, formatDate as r, useAvailableSlots as t };
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { _ as getAutoAppliedDiscountPreview, g as discountAvailabilityHasDiscounts, h as discountAvailabilityAllowsManualEntry } from "./DemoBookingPortalAccess-0Ua44F1j.mjs";
|
|
3
|
+
import { useEffect, useReducer, useState } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region ../blocks/src/system/runtime/shared/components/StateIcon.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Circular icon wrapper for terminal state screens (success, error, waitlist, etc.).
|
|
8
|
+
*
|
|
9
|
+
* Layout is provided by shared `rb-state-icon` CSS; color variants are
|
|
10
|
+
* block-scoped by the owning registration surface.
|
|
11
|
+
*/
|
|
12
|
+
function StateIcon({ variant, children }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: `rb-state-icon rb-state-icon--${variant}`,
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
children
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region ../blocks/src/system/runtime/shared/components/TerminalPanel.tsx
|
|
21
|
+
function joinClasses(...parts) {
|
|
22
|
+
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
23
|
+
}
|
|
24
|
+
function TerminalPanel({ tone, title, titleAs: Title = "h3", body, secondaryBody, icon, actions, className, titleClassName, bodyClassName, secondaryBodyClassName, iconClassName, actionsClassName, role, live }) {
|
|
25
|
+
const resolvedRole = role ?? (tone === "error" ? "alert" : "status");
|
|
26
|
+
const resolvedLive = live ?? (resolvedRole === "alert" ? "assertive" : "polite");
|
|
27
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className,
|
|
29
|
+
"data-terminal-panel": true,
|
|
30
|
+
"data-terminal-tone": tone,
|
|
31
|
+
role: resolvedRole,
|
|
32
|
+
"aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
|
|
33
|
+
children: [
|
|
34
|
+
icon ? /* @__PURE__ */ jsx("div", {
|
|
35
|
+
className: joinClasses(iconClassName),
|
|
36
|
+
"data-terminal-icon": true,
|
|
37
|
+
children: icon
|
|
38
|
+
}) : null,
|
|
39
|
+
/* @__PURE__ */ jsx(Title, {
|
|
40
|
+
className: joinClasses(titleClassName),
|
|
41
|
+
"data-terminal-title": true,
|
|
42
|
+
children: title
|
|
43
|
+
}),
|
|
44
|
+
body ? /* @__PURE__ */ jsx("div", {
|
|
45
|
+
className: joinClasses(bodyClassName),
|
|
46
|
+
"data-terminal-body": true,
|
|
47
|
+
children: body
|
|
48
|
+
}) : null,
|
|
49
|
+
actions ? /* @__PURE__ */ jsx("div", {
|
|
50
|
+
className: joinClasses(actionsClassName),
|
|
51
|
+
"data-terminal-actions": true,
|
|
52
|
+
children: actions
|
|
53
|
+
}) : null,
|
|
54
|
+
secondaryBody ? /* @__PURE__ */ jsx("div", {
|
|
55
|
+
className: joinClasses(secondaryBodyClassName),
|
|
56
|
+
"data-terminal-secondary-body": true,
|
|
57
|
+
children: secondaryBody
|
|
58
|
+
}) : null
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.ts
|
|
64
|
+
const initialDiscountCodeUiState = {
|
|
65
|
+
discountUiOpen: false,
|
|
66
|
+
discountCode: "",
|
|
67
|
+
discountCodeRestored: false
|
|
68
|
+
};
|
|
69
|
+
function discountCodeUiReducer(state, event) {
|
|
70
|
+
switch (event.type) {
|
|
71
|
+
case "manual-entry-unavailable": return state.discountCodeRestored ? state : {
|
|
72
|
+
...state,
|
|
73
|
+
discountCode: "",
|
|
74
|
+
discountUiOpen: false
|
|
75
|
+
};
|
|
76
|
+
case "discount-code-changed": return {
|
|
77
|
+
...state,
|
|
78
|
+
discountCode: event.code,
|
|
79
|
+
discountCodeRestored: Boolean(event.code.trim()) && state.discountCodeRestored
|
|
80
|
+
};
|
|
81
|
+
case "discount-code-restored": return {
|
|
82
|
+
...state,
|
|
83
|
+
discountCode: event.code,
|
|
84
|
+
discountUiOpen: true,
|
|
85
|
+
discountCodeRestored: true
|
|
86
|
+
};
|
|
87
|
+
case "discount-ui-open-changed": return {
|
|
88
|
+
...state,
|
|
89
|
+
discountUiOpen: event.isOpen
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.ts
|
|
95
|
+
function useStandaloneDiscountAvailability(api, context, scopeKey, subtotalCents) {
|
|
96
|
+
const key = JSON.stringify([
|
|
97
|
+
scopeKey,
|
|
98
|
+
context,
|
|
99
|
+
subtotalCents
|
|
100
|
+
]);
|
|
101
|
+
const [loaded, setLoaded] = useState(null);
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
const lifetime = { current: true };
|
|
104
|
+
if (context) api.getDiscountsAvailable({
|
|
105
|
+
context,
|
|
106
|
+
...subtotalCents === void 0 ? {} : { subtotalCents }
|
|
107
|
+
}).then((response) => {
|
|
108
|
+
if (lifetime.current) setLoaded({
|
|
109
|
+
key,
|
|
110
|
+
response
|
|
111
|
+
});
|
|
112
|
+
}, () => {
|
|
113
|
+
if (lifetime.current) setLoaded({
|
|
114
|
+
key,
|
|
115
|
+
response: null
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
return () => {
|
|
119
|
+
lifetime.current = false;
|
|
120
|
+
};
|
|
121
|
+
}, [api, key]);
|
|
122
|
+
return {
|
|
123
|
+
response: context && loaded?.key === key ? loaded.response : null,
|
|
124
|
+
loading: context !== null && loaded?.key !== key
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function standaloneDiscountContext(context) {
|
|
128
|
+
return context?.type === "appointment" || context?.type === "pass" || context?.type === "membership" ? context : null;
|
|
129
|
+
}
|
|
130
|
+
function discountAvailabilityPlan(options) {
|
|
131
|
+
const registration = "preview" in options ? options : null;
|
|
132
|
+
const context = standaloneDiscountContext(options.discountContext);
|
|
133
|
+
return {
|
|
134
|
+
context,
|
|
135
|
+
scopeKey: registration?.scopeKey ?? "",
|
|
136
|
+
subtotalCents: "subtotalCents" in options ? options.subtotalCents : void 0,
|
|
137
|
+
standalonePurchase: registration === null || context !== null
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function quotedRegistrationPreview(preview) {
|
|
141
|
+
return preview?.kind === "quoted" ? preview : null;
|
|
142
|
+
}
|
|
143
|
+
function discountAvailabilityView(options, standalonePurchase, standalone) {
|
|
144
|
+
if (standalonePurchase) return standaloneDiscountView(standalone);
|
|
145
|
+
const registration = "preview" in options ? options : null;
|
|
146
|
+
const quoted = quotedRegistrationPreview(registration?.preview);
|
|
147
|
+
const manualCodeEntryAllowed = quoted?.manualCodeEntryAllowed ?? false;
|
|
148
|
+
return {
|
|
149
|
+
manualCodeEntryAllowed,
|
|
150
|
+
discountsAvailable: manualCodeEntryAllowed || quoted?.automaticCode != null,
|
|
151
|
+
autoAppliedDiscount: null,
|
|
152
|
+
discountsAvailableLoading: registration?.loading ?? false
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function standaloneDiscountView(standalone) {
|
|
156
|
+
const response = standalone.response;
|
|
157
|
+
return {
|
|
158
|
+
manualCodeEntryAllowed: response !== null && discountAvailabilityAllowsManualEntry(response),
|
|
159
|
+
discountsAvailable: response !== null && discountAvailabilityHasDiscounts(response),
|
|
160
|
+
autoAppliedDiscount: response ? getAutoAppliedDiscountPreview(response) : null,
|
|
161
|
+
discountsAvailableLoading: standalone.loading
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function useDiscountCodeUi(options) {
|
|
165
|
+
const [state, dispatch] = useReducer(discountCodeUiReducer, initialDiscountCodeUiState);
|
|
166
|
+
const plan = discountAvailabilityPlan(options);
|
|
167
|
+
const standalone = useStandaloneDiscountAvailability(options.api, plan.context, plan.scopeKey, plan.subtotalCents);
|
|
168
|
+
const view = discountAvailabilityView(options, plan.standalonePurchase, standalone);
|
|
169
|
+
const { manualCodeEntryAllowed } = view;
|
|
170
|
+
const standalonePurchase = plan.standalonePurchase;
|
|
171
|
+
useEffect(() => {
|
|
172
|
+
if (standalonePurchase && !standalone.loading && !manualCodeEntryAllowed) dispatch({ type: "manual-entry-unavailable" });
|
|
173
|
+
}, [
|
|
174
|
+
standalonePurchase,
|
|
175
|
+
standalone.loading,
|
|
176
|
+
manualCodeEntryAllowed
|
|
177
|
+
]);
|
|
178
|
+
return {
|
|
179
|
+
...state,
|
|
180
|
+
setDiscountUiOpen: (isOpen) => dispatch({
|
|
181
|
+
type: "discount-ui-open-changed",
|
|
182
|
+
isOpen
|
|
183
|
+
}),
|
|
184
|
+
setDiscountCode: (code) => dispatch({
|
|
185
|
+
type: "discount-code-changed",
|
|
186
|
+
code
|
|
187
|
+
}),
|
|
188
|
+
restoreDiscountCode: (code) => dispatch({
|
|
189
|
+
type: "discount-code-restored",
|
|
190
|
+
code
|
|
191
|
+
}),
|
|
192
|
+
...view
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
export { TerminalPanel as n, StateIcon as r, useDiscountCodeUi as t };
|