@riverbankcms/sdk 0.180.0 → 0.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/{BlocksIslandsHydrator-DC_AvZwy.d.ts → BlocksIslandsHydrator-CVCasDPz.d.ts} +1 -1
- package/dist/_dts/{Page-DQOxVtp3.d.ts → Page-Dtj2Ui3S.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-DrLgY9_f.d.ts → SdkPreviewMode-D1f_60WW.d.ts} +2 -2
- package/dist/_dts/{client-BP7VBRvs.d.ts → client-Chr9pNVW.d.ts} +58 -70
- package/dist/_dts/{content-types-1-K2qi__.d.ts → content-types-kjccgopX.d.ts} +2 -2
- package/dist/_dts/{contracts-Dfqz0Tcu.d.ts → contracts-BodaiS00.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-CSfAqmry.d.ts → generatePageMetadata-BS6kaJFp.d.ts} +2 -2
- package/dist/_dts/{index-BeM5Ylwf.d.ts → index-Brl6_I2j.d.ts} +1 -2
- package/dist/_dts/{index-CB5Csefo.d.ts → index-CJkefwYh.d.ts} +2 -2
- package/dist/_dts/{index-DQBGwBPx.d.ts → index-D1WpKwQe.d.ts} +1 -1
- package/dist/_dts/{index-DQr358-m.d.ts → index-DG0OvBs0.d.ts} +8 -8
- package/dist/_dts/{index-Blrw2oVk.d.ts → index-Diqt0PvG.d.ts} +1 -1
- package/dist/_dts/{index-DCcxLa8p.d.ts → index-Dy50xUMK.d.ts} +2 -2
- package/dist/_dts/{loadContent-BG2tLGXj.d.ts → loadContent-BgxshKrA.d.ts} +7 -7
- package/dist/_dts/{request-P08l6mkr.d.ts → request-CA0izds5.d.ts} +2498 -1108
- package/dist/_dts/{resolveBlockData-BDHc8lFs.d.ts → resolveBlockData-ChQmwEd3.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-Y3IZBbtL.d.ts → resolvePageContent-BvGyvblj.d.ts} +1 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- 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 +2 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
- package/dist/_dts/sdk/src/index.d.ts +104 -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 +83 -52
- 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 +43 -56
- package/dist/_dts/sdk/src/portal/index.d.ts +3 -18
- 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 +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +6 -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 → serviceBookingOutline-BgFbJQhU.d.ts} +6 -6
- package/dist/_dts/{types-HAy1-Jjo.d.ts → types-CQrsP1x_.d.ts} +3 -3
- package/dist/_dts/{types-DpEAnP4F.d.ts → types-CgS3xLk8.d.ts} +2 -2
- package/dist/_dts/{types-BrK6SS5c.d.ts → types-R65DKjPn.d.ts} +7 -7
- package/dist/_dts/{validation-D6q3tOBA.d.ts → validation-6LTIbuBA.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DJSmdNUJ.mjs → BlocksIslandsHydrator-DqZPz6oW.mjs} +19 -19
- package/dist/client/{BookingMailingListNote-CGxg37zx.mjs → BookingMailingListNote-uWfR2kaG.mjs} +93 -18
- package/dist/client/{BookingQuestionFields-DXegGSnS.mjs → BookingQuestionFields-CyNIKw6k.mjs} +7 -87
- package/dist/client/CalendarAction-D_Glwvz2.mjs +105 -0
- package/dist/client/{CalendarNavigationChevron-VfP50sYm.mjs → CalendarNavigationChevron-BGCX3zwG.mjs} +6 -6
- package/dist/client/{CheckboxChoice-BZPLCgTU.mjs → CheckboxChoice-C8i4NraK.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-0Ua44F1j.mjs → DemoBookingPortalAccess-DFLPyuqe.mjs} +9 -6
- package/dist/client/{EventCalendar.client-CrpiyDSP.mjs → EventCalendar.client-zDL4-t-B.mjs} +10 -10
- package/dist/client/{EventCombined.client-D0me9wnz.mjs → EventCombined.client-uciDKLID.mjs} +60 -10
- package/dist/client/{EventEmbeddedCheckoutStep-BDnicDM6.mjs → EventEmbeddedCheckoutStep-BGkbUhuw.mjs} +1 -1
- package/dist/client/{EventItem-CJITrGkF.mjs → EventItem-CwzrjcRw.mjs} +6 -6
- package/dist/client/{EventListWeekNavigation-BlEm_xjq.mjs → EventListWeekNavigation-ChvcnPma.mjs} +1 -1
- package/dist/client/{EventListing.client-BNM_HuS0.mjs → EventListing.client-DA57Qoyx.mjs} +3 -3
- package/dist/client/{EventListing.view-CXfb7RRy.mjs → EventListing.view-DZ0qMFF4.mjs} +6 -6
- package/dist/client/{EventRegistrationPayment-DiD9uYs6.mjs → EventRegistrationPayment-DSqCJL8E.mjs} +700 -514
- package/dist/client/{Page-bX7iy_MK.mjs → Page-C7mygH_f.mjs} +389 -248
- package/dist/client/{ProtectedSubmitButton-De6AzhE6.mjs → ProtectedSubmitButton-BNnKuir8.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-BAdW5DvE.mjs → SiteTermsAgreementField-B4z-e4Wq.mjs} +7 -11
- package/dist/client/{StepIndicator-DCfdcb7s.mjs → StepIndicator-Dn_DY4oY.mjs} +1 -1
- package/dist/client/{StepIndicator-DCqorVne.mjs → StepIndicator-atfDU82W.mjs} +21 -13
- package/dist/client/{ThemedButton-CnSa7o-I.mjs → ThemedButton-PFOhXktM.mjs} +1 -33
- package/dist/client/{accessibleSurfaces-Wl8-_OVJ.mjs → accessibleSurfaces-n6kS6Hct.mjs} +77 -1
- package/dist/client/{accordion-wofJY8xY.mjs → accordion-CsW8U3ff.mjs} +1 -1
- package/dist/client/{booking-form.client-CYl9NrqS.mjs → booking-form.client-cBWM392H.mjs} +52 -29
- package/dist/client/bookingCalendar--aWnqFDn.mjs +180 -0
- package/dist/client/{bookingForm-kgVWtuMe.mjs → bookingForm-DgySpp6C.mjs} +4 -4
- package/dist/client/bookings.mjs +17 -11
- package/dist/client/{boxStyleClassNames-CQHWz5gJ.mjs → boxStyleClassNames-BpGVdLFD.mjs} +2 -2
- package/dist/client/{carousel-BE1dEFsD.mjs → carousel-DJoleFV3.mjs} +2 -2
- package/dist/client/{carousel.client-DMtGYTTM.mjs → carousel.client-BtLwHefX.mjs} +1 -1
- package/dist/client/{cart-BsjsdGZE.mjs → cart-EO5o6uPH.mjs} +3 -3
- package/dist/client/{cart.client-DylGUWXY.mjs → cart.client-D_gPw45z.mjs} +1 -1
- package/dist/client/{checkout-B5KxEUDr.mjs → checkout-NVfZW0kR.mjs} +3 -3
- package/dist/client/{checkout.client-C98fhch3.mjs → checkout.client-DD3JuqOy.mjs} +1 -1
- package/dist/client/{checkoutUrls-BMLYTf38.mjs → checkoutUrls-z2gXvlGw.mjs} +1 -1
- package/dist/client/client.mjs +87 -43
- package/dist/client/{constants-PfYJsEZF.mjs → constants-CoOkvw__.mjs} +1 -2
- package/dist/client/{context-DtKdUdkO.mjs → context-CRhn9qzS.mjs} +732 -370
- package/dist/client/{dateFormatting-BaGPvQS3.mjs → dateFormatting-BnWB4L1s.mjs} +15 -25
- package/dist/client/{demoPortalMagicLink-B8eDjhuG.mjs → demoPortalMagicLink-CWDGSTBu.mjs} +2 -3
- package/dist/client/{enhanceHeaderSection-DvhD-8eE.mjs → enhanceHeaderSection-tdP_-Z9o.mjs} +4 -5
- package/dist/client/{event-registration.client-Du9a_xAN.mjs → event-registration.client-D7YYKySQ.mjs} +191 -210
- package/dist/client/{eventCalendar-Di9wDfzl.mjs → eventCalendar-CsAfu5d0.mjs} +4 -4
- package/dist/client/{eventCombined-CNW6nBsB.mjs → eventCombined-VXJB5CoS.mjs} +4 -4
- package/dist/client/{eventListing-CQMxQ8By.mjs → eventListing-B3KIZNfY.mjs} +4 -4
- package/dist/client/{eventRegistration-CprS9k1D.mjs → eventRegistration-BP-dEk1c.mjs} +4 -4
- package/dist/client/{form-Zl1_8RJ6.mjs → form-DM8Zbxbv.mjs} +3 -3
- package/dist/client/{form.client-TaMUys6I.mjs → form.client-e2z_Tlgk.mjs} +5 -5
- package/dist/client/{form.parts-CpNPbPPM.mjs → form.parts-Ctljy1a3.mjs} +3 -3
- package/dist/client/gifting/client.mjs +32 -29
- package/dist/client/{gifting-DNVa7-Wj.mjs → gifting-DWIsqQru.mjs} +4 -4
- package/dist/client/{gifting.client-CFUq3GVx.mjs → gifting.client-QsSWF0uA.mjs} +5 -5
- package/dist/client/{gifting.parts-CDQvxA4A.mjs → gifting.parts-CedLgwa_.mjs} +2 -2
- package/dist/client/{headerSection-Cg6083rn.mjs → headerSection-DAkRkwb-.mjs} +2 -2
- package/dist/client/{mediaAssets-B99AP7ai.mjs → mediaAssets-COfQolI3.mjs} +1 -1
- package/dist/client/{mediaContext-Fusweriw.mjs → mediaContext-DzvnjYXm.mjs} +1 -1
- package/dist/client/{newsletter-form.client-VuL9I96G.mjs → newsletter-form.client-WYja9-WN.mjs} +7 -7
- package/dist/client/{newsletter-form.interactive-7Of3eYn0.mjs → newsletter-form.interactive-RuM86VAv.mjs} +23 -24
- package/dist/client/{newsletter-form.parts-OBqsfT24.mjs → newsletter-form.parts-2petDnWv.mjs} +2 -2
- package/dist/client/{newsletterForm-BkJe_RTv.mjs → newsletterForm-BUbXdA_e.mjs} +3 -3
- package/dist/client/{lookSurfaces-gJ3OqPf9.mjs → noop-Dl4mZ-rr.mjs} +167 -49
- package/dist/client/portal/client.mjs +13040 -8190
- package/dist/client/portalOrders-COGn4BKG.mjs +596 -0
- package/dist/client/portalRoutes-D72yvtDh.mjs +862 -0
- package/dist/client/{product-detail.client-B2hdxqJN.mjs → product-detail.client-pOAryevt.mjs} +1 -1
- package/dist/client/{product-list.client-CCEgu9rx.mjs → product-list.client-CcUpUiud.mjs} +1 -1
- package/dist/client/{productDetail-CRX_ZRfS.mjs → productDetail-BZJCfqat.mjs} +3 -3
- package/dist/client/{productList-BAdJ6z5S.mjs → productList-CiRs3mNb.mjs} +3 -3
- package/dist/client/{propsDecoder-BLKAmX0S.mjs → propsDecoder--uHW4tFM.mjs} +2 -2
- package/dist/client/{registry.server-Bj9cmHHF.mjs → registry.server-CDNNd8wC.mjs} +247 -203
- package/dist/client/{renderableMediaAssetAdmission-BlfqYLJW.mjs → renderableMediaAssetAdmission-BsOWd9lf.mjs} +1 -1
- package/dist/client/rendering/client.mjs +26 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +16 -8
- package/dist/client/{richText-coerce-Z45OLLEX.mjs → richText-coerce-CQGE_wHV.mjs} +2 -1
- package/dist/client/{routeIslandApiConfig-DHpTTK77.mjs → routeIslandApiConfig-BtCg87-N.mjs} +1 -1
- package/dist/client/{runtimeResponse-D2j2-mOk.mjs → runtimeResponse-DL_ARBpa.mjs} +1 -1
- package/dist/client/{runtimeResponse-DtWSfWSZ.mjs → runtimeResponse-Ds9cmBUf.mjs} +1 -1
- package/dist/client/{shop-BKsgxm_-.mjs → shop-Rx_gEMK8.mjs} +3 -3
- package/dist/client/{shop-commerce-Cbtk_kUW.mjs → shop-commerce-D8evQnMT.mjs} +53 -16
- package/dist/client/{shop-commerce-store-B-rv2p5h.mjs → shop-commerce-store-C9PcsSTj.mjs} +22 -5
- package/dist/client/{shop-discount-apply.state-CiCDLNh7.mjs → shop-discount-apply.state-D5CtGfJI.mjs} +2 -2
- package/dist/client/{shop.client-Rnqa74Tk.mjs → shop.client-D4lzQ9oY.mjs} +17 -39
- package/dist/client/{shopShared-BaBfhjCq.mjs → shopShared-BVbq7Nm-.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/src-Al4ooTl_.mjs +164 -0
- package/dist/client/{src-o7WEvbK1.mjs → src-ZSqRK3dD.mjs} +228 -90
- package/dist/client/{timetableModel-BOff1Kk5.mjs → timetableModel-BQJrSK0K.mjs} +9 -78
- package/dist/client/{shop-add-feedback-DvC2kP1K.mjs → urlParams-C2QHo1Pa.mjs} +1 -42
- package/dist/client/{useAvailableSlots-DQJNh10g.mjs → useAvailableSlots-Dm3lKJKR.mjs} +2 -3
- package/dist/client/{useDiscountCodeUi-BcFQRI_7.mjs → useDiscountCodeUi-klgfGn7f.mjs} +1 -1
- package/dist/client/{useEventPagination-BvdcexDC.mjs → useEventPagination-Jnjt7_ly.mjs} +8 -8
- package/dist/client/{view-CTBwSpKv.mjs → view-CC_yQLSA.mjs} +4 -4
- package/dist/client/{wizardSteps-CWIQyRIw.mjs → wizardSteps-BliJOzEX.mjs} +953 -279
- package/dist/preview-next/client/{PageSectionToolbar-CG6KwITA.mjs → PageSectionToolbar-BhL0uADo.mjs} +3 -3
- package/dist/preview-next/client/{PreviewEditorSidebar-BGBqrC9m.mjs → PreviewEditorSidebar-Ct8eIm0i.mjs} +5 -5
- package/dist/preview-next/client/{PreviewEditorUI-Bwkyx28x.mjs → PreviewEditorUI-BS32G4V9.mjs} +4 -4
- package/dist/preview-next/client/{PreviewShell-DB1l6JNU.mjs → PreviewShell-RL0WfZXD.mjs} +5 -5
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Bs6Cwzr3.mjs → SdkPreviewModeRuntime-MK_gHeGy.mjs} +29 -5
- package/dist/preview-next/client/{previewAssistantSlot-T-oDD_Dd.mjs → previewAssistantSlot-CQyS8pcq.mjs} +5011 -2074
- package/dist/preview-next/client/{previewChromeRoot-BeukcDRy.mjs → previewChromeRoot-BSxp3Mfu.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-ceDW_9q2.mjs → sdk-runtime-DKnTzy74.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-CCB9bScO.mjs → siteStyleAccess-BlmbvbLN.mjs} +3 -3
- package/dist/preview-next/client/{useAutosaveStatus-D4o0CKq7.mjs → useAutosaveStatus-D-7GwZOQ.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-Seccrvwu.mjs → useOpenBlockForSetup-BNZtGM5g.mjs} +1 -1
- package/dist/preview-next/container-responsive.css +203 -174
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-FwFj8zGL.mjs → route-contract-R3PcMmax.mjs} +71 -37
- package/dist/server/{Block.shared-D6WrRCxX.mjs → Block.shared-CniF9tSu.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-BQzjDQ2q.mjs → ThemeScopeCore-BQWsnGT6.mjs} +126 -120
- package/dist/server/{accessibleSurfaces-CM3QANtw.mjs → accessibleSurfaces-WPzUAHp4.mjs} +33 -2
- package/dist/server/accordions-By_0Ykks.mjs +111 -0
- package/dist/server/{bindings-CS6ih1Yc.mjs → bindings-DxojjtK3.mjs} +7 -7
- package/dist/server/{client-m0ylCj_f.mjs → client-CDndhbYO.mjs} +86 -42
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/constants-VyF5nEhL.mjs +1474 -0
- package/dist/server/{customCss-BZ8YSrQg.mjs → customCss-C9kgPHvr.mjs} +41 -5
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-vgWMz1uD.mjs → loadContent-BKstMBmX.mjs} +5 -4
- package/dist/server/{loadPage-CIOL3-9t.mjs → loadPage-IgNnZaqr.mjs} +3 -3
- package/dist/server/{lookMediaFrame-m-91jGGn.mjs → lookMediaFrame-TFjgNG61.mjs} +38 -18
- package/dist/server/manifest.mjs +36 -25
- package/dist/server/{mapLocation-BM5WX7FY.mjs → mapLocation-MDDSubTp.mjs} +1 -1
- package/dist/server/media-BRmYrnzb.mjs +31 -0
- package/dist/server/{media-luf7RF22.mjs → media-gvfIw3z8.mjs} +2 -31
- package/dist/server/{navigation-BcNfYYuu.mjs → navigation-quBYlSKD.mjs} +2 -2
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +134 -81
- package/dist/server/{overrideResolution-BiHmsvTZ.mjs → overrideResolution-CCaAPpIa.mjs} +1 -1
- package/dist/server/page-converter.mjs +3 -3
- package/dist/server/{pageRenderPlan-DJo_obpi.mjs → pageRenderPlan-B7iULvKe.mjs} +8 -7
- package/dist/server/{pageRuntimeSupport-BnSuoHON.mjs → pageRuntimeSupport-BytMroxn.mjs} +5 -5
- package/dist/server/{pageShared-BJuOzxzn.mjs → pageShared-Dcs_XTIO.mjs} +243 -323
- package/dist/server/{parseThemeForPersistence-DOsfofCy.mjs → parseThemeForPersistence-Bihl4W5K.mjs} +3 -2
- package/dist/server/{portal-B4JVkdjc.mjs → portal-CMW_b9mG.mjs} +62 -46
- package/dist/server/portal.mjs +3 -3
- package/dist/server/portalQuestions-oUyohgL9.mjs +225 -0
- package/dist/server/{prebuild-Cr8p8T7V.mjs → prebuild-agaH-vZV.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-BZh57-ua.mjs → prefetchBlockData-DwpRjqw4.mjs} +4 -3
- package/dist/server/{registry-CvhFwbXJ.mjs → registry-DM9dHfDC.mjs} +345 -449
- 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 +4 -4
- package/dist/server/rendering.mjs +10 -9
- package/dist/server/{resolveBlockData-Cv_W1LVB.mjs → resolveBlockData-CinHGf8l.mjs} +2 -2
- package/dist/server/{resolveButtonColourStates--6yJp9Tq.mjs → resolveButtonColourStates-B0O1IM16.mjs} +2 -1028
- package/dist/server/{responseMedia-KRKguBC5.mjs → responseMedia-IfH65QAH.mjs} +1 -1
- package/dist/server/{schema-BpsqaSSU.mjs → schema-CwfxQjc4.mjs} +10 -113
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-CRKbTm_7.mjs → servicePageContent-BBBhOtdE.mjs} +21 -20
- package/dist/server/theme-bridge.mjs +3 -2
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-39SXCCnh.mjs → three-pass-converter-DPaUPTfl.mjs} +34 -16
- package/dist/server/titleSourceSchema-NhK6azFS.mjs +2018 -0
- package/dist/server/typeGuards-CTW_9AXq.mjs +413 -0
- package/dist/server/types-BKaBZFjD.mjs +1085 -0
- package/dist/server/{validation-DCl-FCk_.mjs → validation-DG5jX3jH.mjs} +70 -17
- package/dist/server/{version-DT_R5JAR.mjs → version-CipbxPHL.mjs} +1 -1
- package/dist/server/video-Cdr3wh-q.mjs +272 -0
- package/dist/styles/index.css +1013 -1840
- package/package.json +2 -1
- package/dist/_dts/index-B0_2-65A.d.ts +0 -101
- package/dist/client/TabBarFragment-DlKQRhP4.mjs +0 -56
- package/dist/client/checkoutRoute-DKlZRNZD.mjs +0 -22
- package/dist/client/creditProducts-BQ1t1erI.mjs +0 -266
- package/dist/client/formatDate-hhI1-tzt.mjs +0 -26
- package/dist/server/constants-Cj7hfbrA.mjs +0 -41
- package/dist/server/richTextSchema-QLaQrbII.mjs +0 -212
- package/dist/server/titleSourceSchema-Cu-3PRvv.mjs +0 -122
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riverbankcms/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.181.0",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"**/*.css"
|
|
6
6
|
],
|
|
@@ -291,6 +291,7 @@
|
|
|
291
291
|
"@riverbankcms/media-core": "workspace:*",
|
|
292
292
|
"@riverbankcms/path-utils": "workspace:*",
|
|
293
293
|
"@riverbankcms/preview-next": "workspace:*",
|
|
294
|
+
"@riverbankcms/site-contracts": "workspace:*",
|
|
294
295
|
"@riverbankcms/site-renderer": "workspace:*",
|
|
295
296
|
"@riverbankcms/surfaces": "workspace:*",
|
|
296
297
|
"@riverbankcms/test-support": "workspace:*",
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { I as SiteResponse, _ as PublicEndpointName, l as HTTPMethod, m as PublicAPIEndpoints, o as EntriesResponse, p as PageResponse, r as ApiResult } from "./contracts-Dfqz0Tcu.js";
|
|
2
|
-
import { a as GetEntriesBaseParams, i as EntriesResponseWithMeta } from "./types-DpEAnP4F.js";
|
|
3
|
-
import { i as NavigationCacheFile, r as FormsCacheFile, s as PrebuildManifest } from "./index-CB5Csefo.js";
|
|
4
|
-
|
|
5
|
-
//#region .cache/declarations/sdk/src/prebuild/loader.d.ts
|
|
6
|
-
interface PrebuildLoaderConfig {
|
|
7
|
-
/** Path to prebuild cache directory */
|
|
8
|
-
prebuildDir: string;
|
|
9
|
-
/** Maximum age in seconds for prebuild cache */
|
|
10
|
-
maxPrebuildAgeSec?: number;
|
|
11
|
-
/** Filesystem adapter for tests and non-standard runtimes. */
|
|
12
|
-
fileSystem?: PrebuildFileSystem;
|
|
13
|
-
}
|
|
14
|
-
interface LoadResult<T> {
|
|
15
|
-
/** Loaded data */
|
|
16
|
-
data: T;
|
|
17
|
-
/** Age of prebuild in seconds */
|
|
18
|
-
prebuildAgeSec: number;
|
|
19
|
-
}
|
|
20
|
-
interface PrebuildFileSystem {
|
|
21
|
-
existsSync(filePath: string): boolean;
|
|
22
|
-
readFileSync(filePath: string, encoding: 'utf-8'): string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Check if we're running in a Node.js environment with filesystem access.
|
|
26
|
-
* Edge runtimes (Vercel Edge, Cloudflare Workers) don't have fs access.
|
|
27
|
-
*/
|
|
28
|
-
declare function canUsePrebuild(fileSystem?: PrebuildFileSystem): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Loader for reading data from the prebuild cache.
|
|
31
|
-
*
|
|
32
|
-
* Used as a last-resort fallback when the CMS is unavailable and
|
|
33
|
-
* there's no cached data.
|
|
34
|
-
*/
|
|
35
|
-
declare class PrebuildLoader {
|
|
36
|
-
private readonly prebuildDir;
|
|
37
|
-
private readonly maxPrebuildAgeSec;
|
|
38
|
-
private readonly fileSystem;
|
|
39
|
-
constructor(config: PrebuildLoaderConfig);
|
|
40
|
-
/**
|
|
41
|
-
* Check if prebuild is available and not expired.
|
|
42
|
-
*/
|
|
43
|
-
isAvailable(): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Load site data from prebuild cache.
|
|
46
|
-
*/
|
|
47
|
-
loadSite(siteId: string): LoadResult<SiteResponse> | null;
|
|
48
|
-
/**
|
|
49
|
-
* Load page data from prebuild cache.
|
|
50
|
-
*/
|
|
51
|
-
loadPage(siteId: string, pagePath: string): LoadResult<PageResponse> | null;
|
|
52
|
-
/**
|
|
53
|
-
* Load entries from prebuild cache with runtime filtering.
|
|
54
|
-
*
|
|
55
|
-
* The prebuild stores ALL entries for each content type.
|
|
56
|
-
* Filtering, ordering, and pagination are applied at runtime.
|
|
57
|
-
*/
|
|
58
|
-
loadEntries(siteId: string, params: GetEntriesBaseParams & {
|
|
59
|
-
includeMeta?: boolean;
|
|
60
|
-
}): LoadResult<EntriesResponse | EntriesResponseWithMeta> | null;
|
|
61
|
-
/**
|
|
62
|
-
* Load navigation data from prebuild cache.
|
|
63
|
-
*/
|
|
64
|
-
loadNavigation(): LoadResult<NavigationCacheFile['menus']> | null;
|
|
65
|
-
/**
|
|
66
|
-
* Load forms data from prebuild cache.
|
|
67
|
-
*/
|
|
68
|
-
loadForms(): LoadResult<FormsCacheFile['forms']> | null;
|
|
69
|
-
/**
|
|
70
|
-
* Get the manifest for inspection.
|
|
71
|
-
*/
|
|
72
|
-
getManifest(): PrebuildManifest | null;
|
|
73
|
-
/**
|
|
74
|
-
* Clear the cached manifest (for testing).
|
|
75
|
-
*/
|
|
76
|
-
clearCache(): void;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Create a prebuild loader instance.
|
|
80
|
-
*/
|
|
81
|
-
declare function createPrebuildLoader(config: PrebuildLoaderConfig): PrebuildLoader;
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region .cache/declarations/sdk/src/public-api/runtime.d.ts
|
|
84
|
-
type ApiClient = <E extends PublicEndpointName>(params: {
|
|
85
|
-
endpoint: E;
|
|
86
|
-
params?: PublicAPIEndpoints[E]['query'];
|
|
87
|
-
body?: PublicAPIEndpoints[E]['body'];
|
|
88
|
-
options?: RequestInit;
|
|
89
|
-
}) => Promise<ApiResult<NonNullable<PublicAPIEndpoints[E]['response']>>>;
|
|
90
|
-
type PublicEndpointDefinition = Readonly<{
|
|
91
|
-
path: string;
|
|
92
|
-
method: HTTPMethod;
|
|
93
|
-
auth?: string;
|
|
94
|
-
responseKind?: string;
|
|
95
|
-
revalidate?: number;
|
|
96
|
-
tags?: readonly string[];
|
|
97
|
-
}>;
|
|
98
|
-
declare const API_ENDPOINTS: Readonly<Record<PublicEndpointName, PublicEndpointDefinition>>;
|
|
99
|
-
declare function buildEndpointURL(baseURL: string, endpoint: PublicEndpointName): string;
|
|
100
|
-
//#endregion
|
|
101
|
-
export { PrebuildLoader as a, createPrebuildLoader as c, LoadResult as i, ApiClient as n, PrebuildLoaderConfig as o, buildEndpointURL as r, canUsePrebuild as s, API_ENDPOINTS as t };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { S as clsx } from "./ThemedButton-CnSa7o-I.mjs";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
//#region ../blocks/src/system/runtime/shared/components/TabBarFragment.tsx
|
|
6
|
-
function clampIndex(idx, len) {
|
|
7
|
-
if (len <= 0) return 0;
|
|
8
|
-
const mod = idx % len;
|
|
9
|
-
return mod < 0 ? mod + len : mod;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* TabBarFragment
|
|
13
|
-
*
|
|
14
|
-
* Shared tablist behavior for blocks. Styling is delegated to passed classNames,
|
|
15
|
-
* so blocks can keep their own look (e.g. customer portal pills vs. event underline tabs).
|
|
16
|
-
*
|
|
17
|
-
* Includes basic keyboard navigation (ArrowLeft/Right, Home/End) and focuses the next tab.
|
|
18
|
-
*/
|
|
19
|
-
function TabBarFragment({ tabs, activeTab, onTabChange, ariaLabel, listAttributes, tabAttributes, className, tabClassName, activeTabClassName }) {
|
|
20
|
-
return /* @__PURE__ */ jsx("div", {
|
|
21
|
-
className,
|
|
22
|
-
...listAttributes,
|
|
23
|
-
role: "tablist",
|
|
24
|
-
"aria-label": ariaLabel,
|
|
25
|
-
children: tabs.map((tab, idx) => {
|
|
26
|
-
const isActive = tab.id === activeTab;
|
|
27
|
-
return /* @__PURE__ */ jsx("button", {
|
|
28
|
-
type: "button",
|
|
29
|
-
...tabAttributes?.(isActive),
|
|
30
|
-
role: "tab",
|
|
31
|
-
"aria-selected": isActive,
|
|
32
|
-
tabIndex: isActive ? 0 : -1,
|
|
33
|
-
className: clsx(tabClassName, isActive && activeTabClassName),
|
|
34
|
-
onClick: () => onTabChange(tab.id),
|
|
35
|
-
onKeyDown: (e) => handleTabKey(e, tabs, idx, onTabChange),
|
|
36
|
-
children: tab.label
|
|
37
|
-
}, tab.id);
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function handleTabKey(e, tabs, idx, onTabChange) {
|
|
42
|
-
if (tabs.length === 0) return;
|
|
43
|
-
if (!(e.currentTarget instanceof HTMLButtonElement)) return;
|
|
44
|
-
const nextIdx = e.key === "ArrowRight" ? clampIndex(idx + 1, tabs.length) : e.key === "ArrowLeft" ? clampIndex(idx - 1, tabs.length) : e.key === "Home" ? 0 : e.key === "End" ? tabs.length - 1 : null;
|
|
45
|
-
if (nextIdx === null) return;
|
|
46
|
-
e.preventDefault();
|
|
47
|
-
const nextId = tabs[nextIdx]?.id;
|
|
48
|
-
if (!nextId) return;
|
|
49
|
-
onTabChange(nextId);
|
|
50
|
-
const tabList = e.currentTarget.closest("[role=\"tablist\"]");
|
|
51
|
-
requestAnimationFrame(() => {
|
|
52
|
-
(tabList?.querySelectorAll("[role=\"tab\"]") ?? null)?.[nextIdx]?.focus();
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
export { TabBarFragment as t };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
//#region ../blocks/src/system/runtime/shared/utils/checkoutRoute.ts
|
|
3
|
-
function resolveDedicatedCheckoutTarget(pathname) {
|
|
4
|
-
const internalPublishedMatch = pathname.match(/^\/internal-sites\/([^/]+)\/([^/]+)\/published(?:\/.*)?$/);
|
|
5
|
-
if (internalPublishedMatch) {
|
|
6
|
-
const hostKey = internalPublishedMatch[1];
|
|
7
|
-
const siteIdentifier = internalPublishedMatch[2];
|
|
8
|
-
if (hostKey && siteIdentifier) return {
|
|
9
|
-
kind: "internal_published_preview",
|
|
10
|
-
hostKey,
|
|
11
|
-
siteIdentifier
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
return { kind: "public" };
|
|
15
|
-
}
|
|
16
|
-
function resolveDedicatedCheckoutPath(pathname) {
|
|
17
|
-
const target = resolveDedicatedCheckoutTarget(pathname);
|
|
18
|
-
if (target.kind === "internal_published_preview") return `/internal-sites/${target.hostKey}/${target.siteIdentifier}/published/checkout`;
|
|
19
|
-
return "/checkout";
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
export { resolveDedicatedCheckoutPath as t };
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { d as parseUuidBrand } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
|
|
3
|
-
//#region ../core/src/branded/appointments.ts
|
|
4
|
-
const unsafeAsAppointmentServiceId = (id) => id;
|
|
5
|
-
const unsafeAsAppointmentResourceId = (id) => id;
|
|
6
|
-
const parseAppointmentServiceId = (value) => parseUuidBrand(value, unsafeAsAppointmentServiceId);
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region ../core/src/assert-never.ts
|
|
9
|
-
function assertNever$2(value, message = "Unexpected variant") {
|
|
10
|
-
throw new Error(`${message}: ${String(value)}`);
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region ../core/src/booking-instalments.ts
|
|
14
|
-
function isDepositBearingBookingInstalmentPlan(plan) {
|
|
15
|
-
switch (plan.kind) {
|
|
16
|
-
case "deposit_plus_one_remainder":
|
|
17
|
-
case "deposit_plus_scheduled_instalments": return true;
|
|
18
|
-
case "equal_scheduled_instalments": return false;
|
|
19
|
-
default: return assertNever$1(plan);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
function getBookingInstalmentDepositRefundability(plan) {
|
|
23
|
-
return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositRefundability : null;
|
|
24
|
-
}
|
|
25
|
-
function getBookingInstalmentProtectedDepositAmountCents(plan) {
|
|
26
|
-
return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositAmountCents : null;
|
|
27
|
-
}
|
|
28
|
-
function clampConfiguredAmount(amountCents, totalAmountCents) {
|
|
29
|
-
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
30
|
-
}
|
|
31
|
-
function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
|
|
32
|
-
if (partCount <= 0) return [];
|
|
33
|
-
const baseAmountCents = Math.floor(totalAmountCents / partCount);
|
|
34
|
-
const remainderCents = totalAmountCents - baseAmountCents * partCount;
|
|
35
|
-
return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
|
|
36
|
-
}
|
|
37
|
-
function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
|
|
38
|
-
const date = new Date(isoString);
|
|
39
|
-
if (!Number.isFinite(date.getTime())) return isoString;
|
|
40
|
-
switch (intervalUnit) {
|
|
41
|
-
case "day":
|
|
42
|
-
date.setUTCDate(date.getUTCDate() + intervalCount);
|
|
43
|
-
return date.toISOString();
|
|
44
|
-
case "week":
|
|
45
|
-
date.setUTCDate(date.getUTCDate() + intervalCount * 7);
|
|
46
|
-
return date.toISOString();
|
|
47
|
-
case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
48
|
-
default: return assertNever$1(intervalUnit);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function getBookingInstalmentPlanIntervalCount(plan) {
|
|
52
|
-
switch (plan.kind) {
|
|
53
|
-
case "deposit_plus_one_remainder": return plan.remainderDueCount;
|
|
54
|
-
case "deposit_plus_scheduled_instalments":
|
|
55
|
-
case "equal_scheduled_instalments": return plan.intervalCount;
|
|
56
|
-
default: return assertNever$1(plan);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function omitZeroAmountFutureRows(rows) {
|
|
60
|
-
if (rows.length <= 1) return rows;
|
|
61
|
-
const firstRow = rows[0];
|
|
62
|
-
if (firstRow === void 0) return [];
|
|
63
|
-
return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
|
|
64
|
-
}
|
|
65
|
-
function formatOrderInstalmentStatusLabel(input) {
|
|
66
|
-
switch (input.status) {
|
|
67
|
-
case "pending_initial_payment": return input.phaseKind === "initial" ? "Due today" : "Scheduled";
|
|
68
|
-
case "scheduled": return "Scheduled";
|
|
69
|
-
case "paid": return input.phaseKind === "initial" ? "Paid today" : "Paid";
|
|
70
|
-
case "failed": return "Payment failed";
|
|
71
|
-
case "waived": return "Waived";
|
|
72
|
-
case "cancelled": return "Cancelled";
|
|
73
|
-
case "cancelled_as_paid_early": return "Paid early";
|
|
74
|
-
case "refunded": return "Refunded";
|
|
75
|
-
default: return assertNever$1(input.status);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
79
|
-
const anchorDay = date.getUTCDate();
|
|
80
|
-
const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
|
|
81
|
-
const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
|
|
82
|
-
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
83
|
-
return nextMonth;
|
|
84
|
-
}
|
|
85
|
-
function assertNever$1(value) {
|
|
86
|
-
throw new Error(`Unexpected value: ${String(value)}`);
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region ../core/src/credit-product-nouns.ts
|
|
90
|
-
const CREDIT_PRODUCT_NOUNS = {
|
|
91
|
-
event_pass: {
|
|
92
|
-
product: {
|
|
93
|
-
singular: "pass",
|
|
94
|
-
plural: "passes"
|
|
95
|
-
},
|
|
96
|
-
productTitle: {
|
|
97
|
-
singular: "Pass",
|
|
98
|
-
plural: "Passes"
|
|
99
|
-
},
|
|
100
|
-
unit: {
|
|
101
|
-
singular: "class",
|
|
102
|
-
plural: "classes"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
appointment_package: {
|
|
106
|
-
product: {
|
|
107
|
-
singular: "package",
|
|
108
|
-
plural: "packages"
|
|
109
|
-
},
|
|
110
|
-
productTitle: {
|
|
111
|
-
singular: "Package",
|
|
112
|
-
plural: "Packages"
|
|
113
|
-
},
|
|
114
|
-
unit: {
|
|
115
|
-
singular: "session",
|
|
116
|
-
plural: "sessions"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
function countedNoun(noun, count) {
|
|
121
|
-
return count === 1 ? noun.singular : noun.plural;
|
|
122
|
-
}
|
|
123
|
-
/** "class" or "classes", to follow a number the caller formats. */
|
|
124
|
-
function creditProductUnitNoun(useCase, count) {
|
|
125
|
-
return countedNoun(CREDIT_PRODUCT_NOUNS[useCase].unit, count);
|
|
126
|
-
}
|
|
127
|
-
/** "1 class", "4 sessions". */
|
|
128
|
-
function formatCreditProductUnits(useCase, count) {
|
|
129
|
-
return `${count} ${creditProductUnitNoun(useCase, count)}`;
|
|
130
|
-
}
|
|
131
|
-
/** "4 of 10 sessions left". */
|
|
132
|
-
function formatCreditProductBalance(useCase, balance) {
|
|
133
|
-
return `${balance.remaining} of ${balance.total} ${creditProductUnitNoun(useCase, balance.total)} left`;
|
|
134
|
-
}
|
|
135
|
-
/** Confirmation copy shared by booking screens and editable email wording. */
|
|
136
|
-
function formatCreditProductPayment(input) {
|
|
137
|
-
const used = input.creditsUsed;
|
|
138
|
-
return (used !== void 0 && used !== 0 && !Number.isNaN(used) ? `${used} credit${used === 1 ? "" : "s"} from your ${input.name}` : `Paid with your ${input.name}`) + (input.creditsRemaining === void 0 ? "" : ` (${input.creditsRemaining} left)`);
|
|
139
|
-
}
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region ../blocks/src/system/runtime/shared/bookingQuestionValues.ts
|
|
142
|
-
function getInitialFieldValue(field, answers) {
|
|
143
|
-
const value = answers[field.id];
|
|
144
|
-
if (value !== void 0) return value;
|
|
145
|
-
if (field.type === "checkbox" && field.options && field.options.length > 1) return [];
|
|
146
|
-
if (field.type === "checkbox") return false;
|
|
147
|
-
if (field.type === "document_upload") return null;
|
|
148
|
-
return "";
|
|
149
|
-
}
|
|
150
|
-
/** One value per question, taken from earlier answers where there are any. */
|
|
151
|
-
function initialBookingQuestionValues(sections, answers = {}) {
|
|
152
|
-
return Object.fromEntries(sections.flatMap((section) => section.items.map((field) => [field.id, getInitialFieldValue(field, answers)])));
|
|
153
|
-
}
|
|
154
|
-
/** Where a booker starts: keeping earlier answers when we already have them. */
|
|
155
|
-
function initialBookingQuestionsAnswerMode(presentation) {
|
|
156
|
-
return presentation.kind === "already_answered" ? "keep_existing" : "answers";
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* What the submission sends. Keeping earlier answers is only possible when the
|
|
160
|
-
* presentation says we have them, so a mode left over from an earlier
|
|
161
|
-
* presentation (say the booker switched service) can't send `keep_existing`
|
|
162
|
-
* beside questions they can see and edit.
|
|
163
|
-
*/
|
|
164
|
-
function resolveBookingQuestionsAnswerMode(presentation, answerMode) {
|
|
165
|
-
return presentation.kind === "already_answered" ? answerMode : "answers";
|
|
166
|
-
}
|
|
167
|
-
/** Both booking flows submit the same decision made from the current presentation. */
|
|
168
|
-
function buildBookingQuestionsSubmission(presentation, answerMode, values) {
|
|
169
|
-
if (presentation.kind === "none" || presentation.kind === "unavailable") return void 0;
|
|
170
|
-
const requirementId = presentation.set.requirementId;
|
|
171
|
-
return resolveBookingQuestionsAnswerMode(presentation, answerMode) === "keep_existing" ? {
|
|
172
|
-
requirementId,
|
|
173
|
-
kind: "keep_existing"
|
|
174
|
-
} : {
|
|
175
|
-
requirementId,
|
|
176
|
-
kind: "answers",
|
|
177
|
-
raw: values
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
/** Starting values, seeded from earlier answers when the presentation carries them. */
|
|
181
|
-
function initialBookingQuestionsValues(presentation) {
|
|
182
|
-
switch (presentation.kind) {
|
|
183
|
-
case "none":
|
|
184
|
-
case "unavailable": return {};
|
|
185
|
-
case "ask": return initialBookingQuestionValues(presentation.set.sections);
|
|
186
|
-
case "prefill":
|
|
187
|
-
case "already_answered": return initialBookingQuestionValues(presentation.set.sections, presentation.answers);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
/** No answer given: blank text, nothing chosen, an unticked box, or no file. Mirrors the server's required check. */
|
|
191
|
-
function isUnansweredBookingQuestion(value) {
|
|
192
|
-
if (value === void 0 || value === null || value === false) return true;
|
|
193
|
-
if (typeof value === "string") return value.trim() === "";
|
|
194
|
-
if (Array.isArray(value)) return value.every((item) => item.trim() === "");
|
|
195
|
-
return false;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* The required questions still without an answer, so a flow can point at
|
|
199
|
-
* them before sending; the server makes the same check and has the last word.
|
|
200
|
-
*/
|
|
201
|
-
function unansweredRequiredBookingQuestions(sections, values) {
|
|
202
|
-
return sections.flatMap((section) => section.items.flatMap((field) => field.required && isUnansweredBookingQuestion(values[field.id]) ? [field.id] : []));
|
|
203
|
-
}
|
|
204
|
-
/** The same words the server uses when it refuses an unanswered question. */
|
|
205
|
-
const UNANSWERED_QUESTION_MESSAGE = "Please answer this question.";
|
|
206
|
-
const UNANSWERED_QUESTIONS_SUMMARY = "Some questions still need an answer.";
|
|
207
|
-
/**
|
|
208
|
-
* The during-booking questions before the details step moves on: required
|
|
209
|
-
* questions need an answer, unless the booker is keeping earlier ones. Format
|
|
210
|
-
* checks (length, email and so on) are left to the server.
|
|
211
|
-
*/
|
|
212
|
-
function checkBookingQuestionsAnswered(view) {
|
|
213
|
-
const { presentation } = view;
|
|
214
|
-
if (presentation.kind === "none") return { kind: "ok" };
|
|
215
|
-
if (presentation.kind === "unavailable") return {
|
|
216
|
-
kind: "refused",
|
|
217
|
-
message: presentation.message
|
|
218
|
-
};
|
|
219
|
-
if (view.answerMode === "keep_existing") return { kind: "ok" };
|
|
220
|
-
const missing = unansweredRequiredBookingQuestions(presentation.set.sections, view.values);
|
|
221
|
-
return missing.length === 0 ? { kind: "ok" } : {
|
|
222
|
-
kind: "unanswered",
|
|
223
|
-
message: UNANSWERED_QUESTIONS_SUMMARY,
|
|
224
|
-
fieldErrors: Object.fromEntries(missing.map((fieldId) => [fieldId, UNANSWERED_QUESTION_MESSAGE]))
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region ../blocks/src/system/runtime/api/creditProducts.ts
|
|
229
|
-
function assertNever(value) {
|
|
230
|
-
throw new Error(`Unhandled credit product case: ${String(value)}`);
|
|
231
|
-
}
|
|
232
|
-
function useCasesFromModules(modules) {
|
|
233
|
-
if (!modules) return [];
|
|
234
|
-
return [...modules.events ? ["event_pass"] : [], ...modules.appointments ? ["appointment_package"] : []];
|
|
235
|
-
}
|
|
236
|
-
function deriveUseCases(products, modules) {
|
|
237
|
-
if (products.length > 0) return products.map((product) => product.productUseCase);
|
|
238
|
-
return useCasesFromModules(modules);
|
|
239
|
-
}
|
|
240
|
-
function getCreditProductTypeLabel(useCase) {
|
|
241
|
-
switch (useCase) {
|
|
242
|
-
case "event_pass": return "Event pass";
|
|
243
|
-
case "appointment_package": return "Appointment package";
|
|
244
|
-
default: return assertNever(useCase);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
function deriveCreditProductLabels(products, options = {}) {
|
|
248
|
-
const style = options.style ?? "generic";
|
|
249
|
-
const useCases = deriveUseCases(products, options.modules);
|
|
250
|
-
const hasEventPass = useCases.includes("event_pass");
|
|
251
|
-
const hasAppointmentPackage = useCases.includes("appointment_package");
|
|
252
|
-
if (hasEventPass && hasAppointmentPackage) return {
|
|
253
|
-
heading: "Passes & Packages",
|
|
254
|
-
emptyMessage: "You don't have any passes or packages yet."
|
|
255
|
-
};
|
|
256
|
-
if (hasAppointmentPackage) return {
|
|
257
|
-
heading: style === "class" ? "Appointment Packages" : "Packages",
|
|
258
|
-
emptyMessage: "You don't have any packages yet."
|
|
259
|
-
};
|
|
260
|
-
return {
|
|
261
|
-
heading: style === "class" ? "Class Passes" : "Passes",
|
|
262
|
-
emptyMessage: "You don't have any passes yet."
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
//#endregion
|
|
266
|
-
export { omitZeroAmountFutureRows as C, unsafeAsAppointmentResourceId as D, parseAppointmentServiceId as E, unsafeAsAppointmentServiceId as O, getBookingInstalmentProtectedDepositAmountCents as S, assertNever$2 as T, addIntervalPreservingMonthAnchor as _, buildBookingQuestionsSubmission as a, getBookingInstalmentDepositRefundability as b, initialBookingQuestionValues as c, resolveBookingQuestionsAnswerMode as d, unansweredRequiredBookingQuestions as f, formatCreditProductUnits as g, formatCreditProductPayment as h, UNANSWERED_QUESTION_MESSAGE as i, initialBookingQuestionsAnswerMode as l, formatCreditProductBalance as m, getCreditProductTypeLabel as n, checkBookingQuestionsAnswered as o, creditProductUnitNoun as p, UNANSWERED_QUESTIONS_SUMMARY as r, getInitialFieldValue as s, deriveCreditProductLabels as t, initialBookingQuestionsValues as u, clampConfiguredAmount as v, splitAmountWithRemainderInFirst as w, getBookingInstalmentPlanIntervalCount as x, formatOrderInstalmentStatusLabel as y };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { $t as formatDateTime, Zt as formatDate$1, _n as parseUtcIsoDateTimeString, hn as parseBookingLocalDate } from "./src-o7WEvbK1.mjs";
|
|
3
|
-
//#region ../blocks/src/bindings/formatDate.ts
|
|
4
|
-
/** Admit stored civil dates or offset-aware instants before core projection. */
|
|
5
|
-
function formatDate(value, context, options) {
|
|
6
|
-
if (typeof value !== "string" || !value) return null;
|
|
7
|
-
if (/^\d{4}-\d{2}-\d{2}$/u.test(value)) try {
|
|
8
|
-
return formatDate$1({
|
|
9
|
-
kind: "civil",
|
|
10
|
-
value: parseBookingLocalDate(value)
|
|
11
|
-
}, context, options);
|
|
12
|
-
} catch {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
const instant = parseUtcIsoDateTimeString(value);
|
|
16
|
-
if (!instant.ok) return null;
|
|
17
|
-
return options.includeTime ? formatDateTime(instant.value, context, {
|
|
18
|
-
date: options.date,
|
|
19
|
-
zone: "omit"
|
|
20
|
-
}) : formatDate$1({
|
|
21
|
-
kind: "instant",
|
|
22
|
-
value: instant.value
|
|
23
|
-
}, context, options);
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { formatDate as t };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
//#region src/portal/constants.ts
|
|
2
|
-
/**
|
|
3
|
-
* Portal Authentication Constants
|
|
4
|
-
*/
|
|
5
|
-
/** Cookie name for storing the portal session token */
|
|
6
|
-
const PORTAL_TOKEN_COOKIE = "portal_token";
|
|
7
|
-
/** Cookie max age in seconds (30 days) */
|
|
8
|
-
const PORTAL_COOKIE_MAX_AGE = 720 * 60 * 60;
|
|
9
|
-
/** Query parameter carrying an emailed sign-in token to the callback. GET stores it and consumes nothing. */
|
|
10
|
-
const PORTAL_ENTRY_PARAM = "portal_entry";
|
|
11
|
-
/** Short-lived private cookie holding the token and its destination, so neither is in the page's URL */
|
|
12
|
-
const PORTAL_ENTRY_COOKIE = "rb_portal_entry";
|
|
13
|
-
/**
|
|
14
|
-
* Entry cookie max age in seconds (one day). People often open the email, get distracted and press
|
|
15
|
-
* Continue later. The token already sits in their inbox for 30 days, so a day in a private cookie
|
|
16
|
-
* on the same device adds little.
|
|
17
|
-
*/
|
|
18
|
-
const PORTAL_ENTRY_COOKIE_MAX_AGE = 1440 * 60;
|
|
19
|
-
/** The fixed callback address on every site */
|
|
20
|
-
const PORTAL_CALLBACK_PATH = "/api/portal/callback";
|
|
21
|
-
/** The site page that shows Continue */
|
|
22
|
-
const PORTAL_ENTRY_PATH = "/portal/continue";
|
|
23
|
-
/** Query/form parameter name for redirect destination */
|
|
24
|
-
const REDIRECT_TO_PARAM = "redirect_to";
|
|
25
|
-
/** Canonical published-site path for the customer portal */
|
|
26
|
-
const CUSTOMER_PORTAL_PATH = "/portal";
|
|
27
|
-
/** Default redirect path for callback */
|
|
28
|
-
const DEFAULT_PORTAL_REDIRECT = CUSTOMER_PORTAL_PATH;
|
|
29
|
-
/** Default redirect path for logout */
|
|
30
|
-
const DEFAULT_LOGOUT_REDIRECT = "/";
|
|
31
|
-
/** Query parameter added to the redirect URL after a successful magic link login */
|
|
32
|
-
const PORTAL_LOGIN_SUCCESS_PARAM = "portal_login";
|
|
33
|
-
/** Where a booking email lands. The tab also tells the Continue page to say "See my booking". */
|
|
34
|
-
const PORTAL_TAB_PARAM = "portal_tab";
|
|
35
|
-
const PORTAL_EVENTS_TAB = "events";
|
|
36
|
-
const PORTAL_APPOINTMENTS_TAB = "appointments";
|
|
37
|
-
const PORTAL_MEMBERSHIPS_TAB = "passes-memberships";
|
|
38
|
-
const PORTAL_EVENTS_PATH = `${CUSTOMER_PORTAL_PATH}?${PORTAL_TAB_PARAM}=${PORTAL_EVENTS_TAB}`;
|
|
39
|
-
const PORTAL_APPOINTMENTS_PATH = `${CUSTOMER_PORTAL_PATH}?${PORTAL_TAB_PARAM}=${PORTAL_APPOINTMENTS_TAB}`;
|
|
40
|
-
//#endregion
|
|
41
|
-
export { PORTAL_TOKEN_COOKIE as _, PORTAL_APPOINTMENTS_TAB as a, PORTAL_ENTRY_COOKIE as c, PORTAL_ENTRY_PATH as d, PORTAL_EVENTS_PATH as f, PORTAL_TAB_PARAM as g, PORTAL_MEMBERSHIPS_TAB as h, PORTAL_APPOINTMENTS_PATH as i, PORTAL_ENTRY_COOKIE_MAX_AGE as l, PORTAL_LOGIN_SUCCESS_PARAM as m, DEFAULT_LOGOUT_REDIRECT as n, PORTAL_CALLBACK_PATH as o, PORTAL_EVENTS_TAB as p, DEFAULT_PORTAL_REDIRECT as r, PORTAL_COOKIE_MAX_AGE as s, CUSTOMER_PORTAL_PATH as t, PORTAL_ENTRY_PARAM as u, REDIRECT_TO_PARAM as v };
|