@riverbankcms/sdk 0.168.0 → 0.169.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-CiD_VVGM.d.ts → BlocksIslandsHydrator-DpROiz12.d.ts} +1 -1
- package/dist/_dts/{Page-Bj6VJRS5.d.ts → Page-DHBBDRC_.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-ChpsnwDX.d.ts → SdkPreviewMode-CG7Qib7u.d.ts} +2 -2
- package/dist/_dts/{client-C8mfUxrJ.d.ts → client-MURxFla9.d.ts} +39 -397
- package/dist/_dts/{content-types-_vXZyR4H.d.ts → content-types-ClBGjxBV.d.ts} +2 -2
- package/dist/_dts/{contracts-CJFfrVKU.d.ts → contracts-CHNvzh0y.d.ts} +4 -3
- package/dist/_dts/{footerPageOutline-CMegb23G.d.ts → footerPageOutline-DQM934Fm.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-D9YdAIMh.d.ts → generatePageMetadata-ConZaEqB.d.ts} +2 -2
- package/dist/_dts/{index-BQXaZ7aY.d.ts → index-BaDqRekr.d.ts} +4 -4
- package/dist/_dts/{index-vR3p9Bu-.d.ts → index-CVB5wgbz.d.ts} +2 -2
- package/dist/_dts/{index-Cx2BQlHL.d.ts → index-CiR_oPYT.d.ts} +1 -1
- package/dist/_dts/{index-Bpr-wT5k.d.ts → index-CovKPftP.d.ts} +2 -2
- package/dist/_dts/{index-Dgz6yhsy.d.ts → index-DCw8LO4M.d.ts} +1 -1
- package/dist/_dts/{index-Vh8B9FSa.d.ts → index-DDaX-K2D.d.ts} +1 -1
- package/dist/_dts/{index-C7_Rz8EY.d.ts → index-rfAssXq0.d.ts} +3 -3
- package/dist/_dts/{loadContent-dhWSgLeS.d.ts → loadContent-CRLKVVDP.d.ts} +7 -7
- package/dist/_dts/{request-BrYhNV9Z.d.ts → request-DeVetKBr.d.ts} +1840 -599
- package/dist/_dts/{resolveBlockData-BfSHm8Ms.d.ts → resolveBlockData-C5KYFeig.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-gZJ4i1wN.d.ts → resolvePageContent-D8MZWyNO.d.ts} +2 -2
- 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/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 +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- 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 +1 -1
- 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 +5 -5
- 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/{types-FOsJ-KYb.d.ts → types-B4MBlP_B.d.ts} +2 -2
- package/dist/_dts/{types-BVFXYtRg.d.ts → types-Fj31kIi2.d.ts} +7 -7
- package/dist/_dts/{types-BB33-Spd.d.ts → types-OwqfS8Gn.d.ts} +3 -3
- package/dist/_dts/{validation-DckTc6TQ.d.ts → validation-B1Fa8o_b.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DcwEaliO.mjs → BlocksIslandsHydrator-qq4Vhs7k.mjs} +16 -16
- package/dist/client/{BookingMailingListNote-Dsugoe-n.mjs → BookingMailingListNote-y3qWjnOo.mjs} +17 -6
- package/dist/client/{BookingQuestionFields-Bhh0cvsl.mjs → BookingQuestionFields-DjLjd0vc.mjs} +3 -3
- package/dist/client/{CalendarNavigationChevron-CNe3ZjdC.mjs → CalendarNavigationChevron-VM7C2fdh.mjs} +7 -7
- package/dist/client/{DemoBookingPortalAccess-BeiZxEUJ.mjs → DemoBookingPortalAccess-C2QCj_Ta.mjs} +65 -9
- package/dist/client/{EventCalendar.client-BL943-tl.mjs → EventCalendar.client-DDjz7tuX.mjs} +9 -9
- package/dist/client/{EventCombined.client-BFVxECTp.mjs → EventCombined.client-CeYbNsch.mjs} +7 -7
- package/dist/client/{EventItem-BIc4gjiD.mjs → EventItem-B5J0IeF4.mjs} +3 -3
- package/dist/client/{EventListWeekNavigation-a0QEIEf0.mjs → EventListWeekNavigation-eH04D8-V.mjs} +1 -1
- package/dist/client/{EventListing.client-CEFTC3jH.mjs → EventListing.client-slpvrTrM.mjs} +3 -3
- package/dist/client/{EventListing.view-Bt2sBBms.mjs → EventListing.view-BYBaElec.mjs} +5 -5
- package/dist/client/{EventRegistrationPayment-D9YBNb_E.mjs → EventRegistrationPayment-Do7Q0wRG.mjs} +121 -59
- package/dist/client/{LocationMapActions-gqzt5gkW.mjs → LocationMapActions-BFp2uQQQ.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-13JQI7_z.mjs → MapDrawingSvg-DDWfmgpA.mjs} +1 -1
- package/dist/client/{Page-D_M2Vxz3.mjs → Page-Dv9eIOGr.mjs} +20 -15
- package/dist/client/{StepIndicator-CaN8snZ8.mjs → StepIndicator-BZNUd0-v.mjs} +2 -2
- package/dist/client/{accordion-DE7OG--d.mjs → accordion-BCtVxnDZ.mjs} +1 -1
- package/dist/client/{booking-form.client-CS1PPjw7.mjs → booking-form.client-Cr5G-HHO.mjs} +504 -216
- package/dist/client/{bookingForm-DE2CwIU9.mjs → bookingForm-B1Fc62Sl.mjs} +8 -5
- package/dist/client/{bookingRoute-Bqlyu5Vb.mjs → bookingRoute-D6DlxYx6.mjs} +6 -2
- package/dist/client/bookings.mjs +16 -13
- package/dist/client/{carousel-DZyUdnFh.mjs → carousel-DW-HgjvT.mjs} +1 -1
- package/dist/client/{cart-D7HkkNwe.mjs → cart-D1zWe4R7.mjs} +3 -3
- package/dist/client/{cart.client-H4sv2TpD.mjs → cart.client-CIfbTLHS.mjs} +1 -1
- package/dist/client/{checkout-2qVyG-Sh.mjs → checkout-fDCNZ3IT.mjs} +3 -3
- package/dist/client/{checkout.client-DAjrBZ74.mjs → checkout.client-C4l2KjtV.mjs} +1 -1
- package/dist/client/{checkoutUrls-CYj06rX1.mjs → checkoutUrls-cWL6I-Vz.mjs} +3 -2
- package/dist/client/client.mjs +50 -3
- package/dist/client/{context-DXmIbXCK.mjs → context-DQnTyApV.mjs} +24 -2
- package/dist/client/{bookingQuestionValues-BjcyCru5.mjs → creditProducts-CMOmhWm2.mjs} +71 -11
- package/dist/client/{cta-DP_IBnq3.mjs → cta-Bj5WHgcv.mjs} +2 -2
- package/dist/client/{dateFormatting-CwrkFZTr.mjs → dateFormatting-Bv6kjUW3.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-DQXK-Fh6.mjs → demoPortalMagicLink-3uVu3WgG.mjs} +1 -1
- package/dist/client/{wizardSteps-CFulHWnT.mjs → display-CT8KMSpH.mjs} +893 -68
- package/dist/client/{enhanceHeaderSection-DheQj7rg.mjs → enhanceHeaderSection-B27KFGDv.mjs} +3 -2
- package/dist/client/{event-details.client-C5UufcRp.mjs → event-details.client-CL4Lqz2c.mjs} +1 -1
- package/dist/client/{event-registration.client-CMGg63IU.mjs → event-registration.client-Dj3Kyp5X.mjs} +56 -16
- package/dist/client/{eventCalendar-DlD0GCEy.mjs → eventCalendar-DGsdSF8J.mjs} +4 -4
- package/dist/client/{eventCombined-DoSi8p_l.mjs → eventCombined-DFSVDJ3D.mjs} +4 -4
- package/dist/client/{eventDetails-DzuQYgmO.mjs → eventDetails-DzMskXYA.mjs} +2 -2
- package/dist/client/{eventListing-CkiMjl0g.mjs → eventListing-CpFFcAUr.mjs} +4 -4
- package/dist/client/{eventRegistration-CjS3Zpjp.mjs → eventRegistration-BipMUOCw.mjs} +8 -5
- package/dist/client/{form-DgQqm7T2.mjs → form-57k2JQnm.mjs} +3 -3
- package/dist/client/{form.client-BI9Dcsq5.mjs → form.client-CCl6CpRJ.mjs} +4 -4
- package/dist/client/{form.parts-DevF0L_A.mjs → form.parts-BOJ1yDDf.mjs} +1 -1
- package/dist/client/{formatDate-DDyURjoe.mjs → formatDate-BGlhrmhF.mjs} +1 -1
- package/dist/client/gifting/client.mjs +2 -2
- package/dist/client/{headerSection-DYIG6Pwb.mjs → headerSection-q_bEzfhW.mjs} +2 -2
- package/dist/client/{newsletter-form.client-BWp7Y1e1.mjs → newsletter-form.client-CiqKAmPs.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-Dg8s9NwJ.mjs → newsletter-form.parts-x1RzAMNO.mjs} +1 -1
- package/dist/client/{newsletterForm-DnPraMzx.mjs → newsletterForm-Cn7h4zFe.mjs} +3 -3
- package/dist/client/{noop-ByFRHYQ2.mjs → noop-B_f7RqLD.mjs} +111 -2
- package/dist/client/portal/client.mjs +20 -12
- package/dist/client/{product-detail.client-BFAgHrdg.mjs → product-detail.client-rWUvpVvZ.mjs} +1 -1
- package/dist/client/{product-list.client-DVrs_DyY.mjs → product-list.client-J0wDOmKv.mjs} +1 -1
- package/dist/client/{productDetail-D4rvl6Xg.mjs → productDetail-LtCkMrJ0.mjs} +3 -3
- package/dist/client/{productList-B8o5AOMX.mjs → productList-C0MLeh-v.mjs} +3 -3
- package/dist/client/{propsDecoder-hhotPP6P.mjs → propsDecoder-CAmEkJ6Y.mjs} +3 -3
- package/dist/client/{registry.server-Ch3EpupA.mjs → registry.server-Bf2YX_4v.mjs} +22 -19
- package/dist/client/rendering/client.mjs +25 -25
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +4 -4
- package/dist/client/{richText-coerce-C3LabQ1O.mjs → richText-coerce-BTurYEao.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-CQGlxId8.mjs → routeIslandApiConfig-UdAlnZGQ.mjs} +1 -1
- package/dist/client/{shop-rRXplPGZ.mjs → shop-Dkn6EasY.mjs} +3 -3
- package/dist/client/{shop-commerce-VDbVaKY-.mjs → shop-commerce-bo0Z6kwf.mjs} +11 -11
- package/dist/client/{shop-commerce-store-DqdgJ8Zw.mjs → shop-commerce-store-Ckxa4_jI.mjs} +1 -1
- package/dist/client/{shop.client-DdwvMvaK.mjs → shop.client-B_GqU6_U.mjs} +109 -30
- package/dist/client/{shop.interactive-C8OvFY06.mjs → shop.interactive-C6L_Ig5F.mjs} +7 -523
- package/dist/client/{shopShared-BeuJiGPU.mjs → shopShared-CO1Y8lFd.mjs} +2 -2
- package/dist/client/src-BozhJ43Z.mjs +3 -0
- package/dist/client/{src-1PJxc8KO.mjs → src-xrjaKaCj.mjs} +6 -8
- package/dist/client/{timetableModel-Cko9LRKy.mjs → timetableModel-D62jfOxZ.mjs} +10 -10
- package/dist/client/{useAvailableSlots-M6QIEiWf.mjs → useAvailableSlots-CStfVmyY.mjs} +3 -3
- package/dist/client/{useDiscountApply-BJSnyO0f.mjs → useDiscountApply-Ca2pHUDu.mjs} +5 -3
- package/dist/client/{useDiscountCodeUi-D3XnOSCi.mjs → useDiscountCodeUi-AEifktGO.mjs} +1 -1
- package/dist/client/{useEventPagination-PhTIoFVX.mjs → useEventPagination-uxnUWI2v.mjs} +6 -6
- package/dist/client/{view-448wvvEY.mjs → view-B6KSxQMO.mjs} +7 -7
- package/dist/client/{view-L_mkgtnk.mjs → view-SVnWic7i.mjs} +2 -3
- package/dist/preview-next/client/{ArrangementLookControls-BpvnOGlN.mjs → ArrangementLookControls-kbdqYkWM.mjs} +3 -3
- package/dist/preview-next/client/{PreviewEditorSidebar-C0OtdWu_.mjs → PreviewEditorSidebar-DI_LhsMQ.mjs} +89 -39
- package/dist/preview-next/client/{PreviewEditorUI-Csc5vH5k.mjs → PreviewEditorUI-yyD-ZREP.mjs} +5 -5
- package/dist/preview-next/client/{PreviewShell-BOLH_pm-.mjs → PreviewShell-YauP65Gi.mjs} +5 -5
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CKodLReY.mjs → SdkPreviewModeRuntime-Bl7jQMI1.mjs} +8 -7
- package/dist/preview-next/client/{SiteChromeCustomizeButton-BeEZpeKn.mjs → SiteChromeCustomizeButton-CQFRP9aM.mjs} +1057 -316
- package/dist/preview-next/client/{previewAssistantSlot-BBdN5kfY.mjs → previewAssistantSlot-DSR0IdAw.mjs} +417 -56
- package/dist/preview-next/client/{previewChromeSurface-VZtGwPuH.mjs → previewChromeSurface-uSnVzeNs.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-kiZkMcuR.mjs → sdk-runtime-6Q0RVJTQ.mjs} +2 -2
- package/dist/preview-next/client/{src-DY8JCJdE.mjs → src-DzXUmsyK.mjs} +6 -8
- package/dist/preview-next/client/src-LUhVXBEQ.mjs +3 -0
- package/dist/preview-next/client/{useAutosaveStatus-BiIHEeE0.mjs → useAutosaveStatus-Cdx3kAGm.mjs} +1 -1
- package/dist/preview-next/client/{useBlockCustomizeControls-BuFLIpmX.mjs → useBlockCustomizeControls-ZrWdhcB6.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-DlxYgmh_.mjs → useOpenBlockForSetup-CK-GWb9k.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-C0sCvCYL.mjs → route-contract-BU1m9SV3.mjs} +47 -0
- package/dist/server/{Block.shared-Dnhc0Wu5.mjs → Block.shared-4vx7wzxj.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-NAQ_zsFu.mjs → ThemeScopeCore-C3HLgqBF.mjs} +6 -3
- package/dist/server/{bindings-DLoZYUxG.mjs → bindings-TAQbo2P5.mjs} +1 -1
- package/dist/server/{booking-form.reserved-fields-BWRF7509.mjs → booking-form.reserved-fields-Cqp13TKc.mjs} +1 -0
- package/dist/server/{client-Bc8jI8zN.mjs → client-DzCxEl3L.mjs} +48 -1
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +1 -1
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{headerVariant-BwR9NV4b.mjs → headerVariant-8O5MvxIU.mjs} +2 -1
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-D61gpqHB.mjs → loadContent-BO1M9Hdf.mjs} +4 -4
- package/dist/server/{loadPage-B4ZYpIcd.mjs → loadPage-BvWzmZcD.mjs} +2 -2
- package/dist/server/next.mjs +6 -6
- package/dist/server/{overrideResolution-CDReKy2P.mjs → overrideResolution-fxuB1zZg.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-ByVTA7-4.mjs → pageRenderPlan-DzduDSqY.mjs} +2 -2
- package/dist/server/{pageRuntimeSupport-Dzz_Dze6.mjs → pageRuntimeSupport-BU8pwTNx.mjs} +2 -2
- package/dist/server/{pageShared-Dk5Ku6hs.mjs → pageShared-CSOJ8p8E.mjs} +24 -16
- package/dist/server/{parseThemeForPersistence-pJPGfMrf.mjs → parseThemeForPersistence-BebSeE17.mjs} +1 -1
- package/dist/server/{prebuild-CW4M0WEZ.mjs → prebuild-C5ZYo7wA.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Bvx0SiIM.mjs → prefetchBlockData-BvbxqeKn.mjs} +2 -2
- package/dist/server/{registry-Bh0Y25zH.mjs → registry-Fv-7D8o2.mjs} +264 -48
- 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 +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-CnHHst9r.mjs → resolveBlockData-xPgkvoWS.mjs} +1 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{validation-D2bHWSxJ.mjs → validation-DddhgNdb.mjs} +4 -4
- package/dist/server/{version-DkM1eAxG.mjs → version-D_W2mt8w.mjs} +1 -1
- package/dist/styles/index.css +6 -3
- package/package.json +1 -1
- package/dist/client/creditProducts-BOWi1QLp.mjs +0 -62
- package/dist/client/src-CdRISvQp.mjs +0 -3
- package/dist/preview-next/client/src-BP8771hw.mjs +0 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as BookingFormClient } from "./booking-form.client-
|
|
3
|
-
import { t as BlockApiProvider } from "./context-
|
|
4
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
+
import { t as BookingFormClient } from "./booking-form.client-Cr5G-HHO.mjs";
|
|
3
|
+
import { t as BlockApiProvider } from "./context-DQnTyApV.mjs";
|
|
4
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CAmEkJ6Y.mjs";
|
|
5
5
|
import { t as mountReactIsland } from "./reactMount-BGJVsHRb.mjs";
|
|
6
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
6
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UdAlnZGQ.mjs";
|
|
7
7
|
import "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
//#region src/rendering/islands/enhancers/bookingForm.tsx
|
|
@@ -22,7 +22,10 @@ const enhance = (root, props) => {
|
|
|
22
22
|
});
|
|
23
23
|
return mountReactIsland(root, ({ root: reactRoot }) => {
|
|
24
24
|
reactRoot.render(/* @__PURE__ */ jsx(BlockApiProvider, {
|
|
25
|
-
config:
|
|
25
|
+
config: {
|
|
26
|
+
...apiConfig,
|
|
27
|
+
pageNavigation: props.render.hydration.pageNavigation
|
|
28
|
+
},
|
|
26
29
|
children: /* @__PURE__ */ jsx(BookingFormClient, { ...props })
|
|
27
30
|
}));
|
|
28
31
|
});
|
|
@@ -4,9 +4,11 @@ const BOOK_TARGET_PARAMS = {
|
|
|
4
4
|
service: "service",
|
|
5
5
|
resource: "resource",
|
|
6
6
|
occurrence: "occurrence",
|
|
7
|
-
event: "event"
|
|
7
|
+
event: "event",
|
|
8
|
+
category: "category"
|
|
8
9
|
};
|
|
9
10
|
function resolveDedicatedBookingTarget(pathname) {
|
|
11
|
+
if (pathname === "/embed" || pathname.startsWith("/embed/")) return { kind: "embed" };
|
|
10
12
|
const internalPublishedMatch = pathname.match(/^\/internal-sites\/([^/]+)\/([^/]+)\/published(?:\/.*)?$/);
|
|
11
13
|
if (internalPublishedMatch) {
|
|
12
14
|
const hostKey = internalPublishedMatch[1];
|
|
@@ -22,7 +24,7 @@ function resolveDedicatedBookingTarget(pathname) {
|
|
|
22
24
|
function resolveDedicatedBookingPath(pathname) {
|
|
23
25
|
const target = resolveDedicatedBookingTarget(pathname);
|
|
24
26
|
if (target.kind === "internal_published_preview") return `/internal-sites/${target.hostKey}/${target.siteIdentifier}/published/book`;
|
|
25
|
-
return "/book";
|
|
27
|
+
return target.kind === "embed" ? "/embed/book" : "/book";
|
|
26
28
|
}
|
|
27
29
|
function resolveDedicatedBookingHref(pathname, bookingTarget = { kind: "chooser" }) {
|
|
28
30
|
const bookingPath = resolveDedicatedBookingPath(pathname);
|
|
@@ -44,5 +46,7 @@ function resolveDedicatedBookingHref(pathname, bookingTarget = { kind: "chooser"
|
|
|
44
46
|
const queryString = params.toString();
|
|
45
47
|
return queryString ? `${bookingPath}?${queryString}` : bookingPath;
|
|
46
48
|
}
|
|
49
|
+
const EMBED_SEGMENT = "[a-z0-9][a-z0-9-]*";
|
|
50
|
+
new RegExp(`^/(?:events/${EMBED_SEGMENT}(?:/${EMBED_SEGMENT})?|services/${EMBED_SEGMENT})$`, "i");
|
|
47
51
|
//#endregion
|
|
48
52
|
export { resolveDedicatedBookingHref as t };
|
package/dist/client/bookings.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { a as useHeadlessBookingFlow, i as HeadlessBookingProvider$1, o as createBookingBlockApiConfig, r as HeadlessBookingPaymentSelectionStep$1, s as getAppointmentBookingOverrideInput, t as BookingFormClient$1 } from "./booking-form.client-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { n as useBlockApi, t as BlockApiProvider } from "./context-
|
|
7
|
-
import { n as EventRegistrationPayment, r as useEventRegistrationWizard } from "./EventRegistrationPayment-
|
|
2
|
+
import { $ as resolveHeadlessEventRegistrationStatus, Ci as readRuntimeNow, Ei as createHostedBlockApiConfig, Li as normalizeEventRegistrationPageSurfaceSubject, Q as resolveEventRegistrationSubmitPlan, Sr as normalizeBookingServices, Xt as getSingleSelectedPricingOptionId, Y as deriveEventRegistrationSteps, Yr as BOOKING_FORM_DATA_RESERVED_KEY_VALUES, Z as normalizeEventRegistrationMaxTickets, Zn as resolveRuntimeEventDestination, et as resolveHeadlessEventRegistrationView, nt as toInternalPaymentSelection, tt as toHeadlessPaymentSelection, xn as resolveRegistrationDisplay, xr as normalizeBookingFormConfig } from "./display-CT8KMSpH.mjs";
|
|
3
|
+
import { a as useHeadlessBookingFlow, i as HeadlessBookingProvider$1, o as createBookingBlockApiConfig, r as HeadlessBookingPaymentSelectionStep$1, s as getAppointmentBookingOverrideInput, t as BookingFormClient$1 } from "./booking-form.client-Cr5G-HHO.mjs";
|
|
4
|
+
import { R as publicEventSchema } from "./noop-B_f7RqLD.mjs";
|
|
5
|
+
import { h as assertNever } from "./creditProducts-CMOmhWm2.mjs";
|
|
6
|
+
import { n as useBlockApi, t as BlockApiProvider } from "./context-DQnTyApV.mjs";
|
|
7
|
+
import { n as EventRegistrationPayment, r as useEventRegistrationWizard } from "./EventRegistrationPayment-Do7Q0wRG.mjs";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import React, { useCallback, useEffect, useMemo, useReducer } from "react";
|
|
10
10
|
//#region ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.ts
|
|
@@ -185,10 +185,7 @@ function useEventRegistrationControllerWithDeps(options, deps) {
|
|
|
185
185
|
isAuthenticated: wizard.portalAuthState === "authenticated",
|
|
186
186
|
showMagicLinkModal: wizard.showMagicLinkModal
|
|
187
187
|
},
|
|
188
|
-
|
|
189
|
-
state: resolveExistingRegistrationState(wizard),
|
|
190
|
-
registration: wizard.existingRegistration
|
|
191
|
-
},
|
|
188
|
+
existingRegistrations: resolveExistingRegistrations(wizard),
|
|
192
189
|
waitlistClaim: wizard.waitlistClaim,
|
|
193
190
|
terminal: projectRegistrationTerminal(wizard),
|
|
194
191
|
actions: {
|
|
@@ -334,19 +331,25 @@ function useEventRegistrationWizardControllerWithDeps(options, deps) {
|
|
|
334
331
|
siteName: options.siteName
|
|
335
332
|
}) };
|
|
336
333
|
}
|
|
334
|
+
function resolveExistingRegistrations(wizard) {
|
|
335
|
+
return {
|
|
336
|
+
state: resolveExistingRegistrationState(wizard),
|
|
337
|
+
registrations: wizard.existingRegistrations
|
|
338
|
+
};
|
|
339
|
+
}
|
|
337
340
|
function resolveExistingRegistrationState(wizard) {
|
|
338
341
|
switch (wizard.existingRegistrationState.tag) {
|
|
339
342
|
case "idle": return {
|
|
340
343
|
tag: "idle",
|
|
341
|
-
value: wizard.
|
|
344
|
+
value: wizard.existingRegistrations
|
|
342
345
|
};
|
|
343
346
|
case "loading": return {
|
|
344
347
|
tag: "loading",
|
|
345
|
-
value: wizard.
|
|
348
|
+
value: wizard.existingRegistrations
|
|
346
349
|
};
|
|
347
350
|
case "resolved": return {
|
|
348
351
|
tag: "loaded",
|
|
349
|
-
value: wizard.
|
|
352
|
+
value: wizard.existingRegistrations
|
|
350
353
|
};
|
|
351
354
|
}
|
|
352
355
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CAmEkJ6Y.mjs";
|
|
3
3
|
import { i as carouselRegionAttributes } from "./carousel.shared-BFQ3kBEw.mjs";
|
|
4
4
|
import { t as CarouselNodeClient } from "./carousel.client-BD4DXMtI.mjs";
|
|
5
5
|
import { t as mountReactIsland } from "./reactMount-BGJVsHRb.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as CartClient } from "./cart.client-
|
|
4
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CAmEkJ6Y.mjs";
|
|
3
|
+
import { t as CartClient } from "./cart.client-CIfbTLHS.mjs";
|
|
4
|
+
import { t as mountShopBlockIsland } from "./shopShared-CO1Y8lFd.mjs";
|
|
5
5
|
//#region src/rendering/islands/enhancers/cart.tsx
|
|
6
6
|
const decode = defineIslandPropsDecoder("cart");
|
|
7
7
|
const enhance = (root, props) => mountShopBlockIsland(root, props, CartClient, "cart");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as CartController } from "./shop-commerce-
|
|
2
|
+
import { t as CartController } from "./shop-commerce-bo0Z6kwf.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/cart.client.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as CheckoutClient } from "./checkout.client-
|
|
4
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CAmEkJ6Y.mjs";
|
|
3
|
+
import { t as CheckoutClient } from "./checkout.client-C4l2KjtV.mjs";
|
|
4
|
+
import { t as mountShopBlockIsland } from "./shopShared-CO1Y8lFd.mjs";
|
|
5
5
|
//#region src/rendering/islands/enhancers/checkout.tsx
|
|
6
6
|
const decode = defineIslandPropsDecoder("checkout");
|
|
7
7
|
const enhance = (root, props) => mountShopBlockIsland(root, props, CheckoutClient, "checkout");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as CheckoutController } from "./shop-commerce-
|
|
2
|
+
import { n as CheckoutController } from "./shop-commerce-bo0Z6kwf.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/checkout.client.tsx
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { ki as canonicalUrl } from "./display-CT8KMSpH.mjs";
|
|
2
3
|
//#region ../blocks/src/system/runtime/shared/utils/checkoutUrls.ts
|
|
3
4
|
/**
|
|
4
5
|
* Build return URLs for Stripe checkout redirect.
|
|
@@ -10,8 +11,8 @@
|
|
|
10
11
|
* @param anchorId - Block anchor ID for the return URL hash fragment.
|
|
11
12
|
* @returns Object with success and cancel URLs
|
|
12
13
|
*/
|
|
13
|
-
function buildCheckoutReturnUrls(paramName, anchorId, returnParams = {}) {
|
|
14
|
-
const currentUrl = new URL(window.location.href);
|
|
14
|
+
function buildCheckoutReturnUrls(paramName, anchorId, returnParams = {}, navigation) {
|
|
15
|
+
const currentUrl = new URL(canonicalUrl(window.location.href, navigation));
|
|
15
16
|
const hash = `#${anchorId}`;
|
|
16
17
|
const successParams = new URLSearchParams(currentUrl.search);
|
|
17
18
|
successParams.set(paramName, "success");
|
package/dist/client/client.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { C as resolveSiteCustomBlocks, D as prefetchBlockDataWithFailures, E as requireSdkTheme, K as encodePublicProductCategorySelector, O as materializeEntriesMedia, S as siteLocationRenderContext, g as collectMediaAssetSidecar, h as buildSiteRenderSupport, m as buildRenderablePageOutline, q as isSupportedLoaderEndpoint, t as Page, v as projectRenderablePageOutline } from "./Page-
|
|
2
|
+
import { Ro as parseSiteId } from "./display-CT8KMSpH.mjs";
|
|
3
|
+
import { C as resolveSiteCustomBlocks, D as prefetchBlockDataWithFailures, E as requireSdkTheme, K as encodePublicProductCategorySelector, O as materializeEntriesMedia, S as siteLocationRenderContext, g as collectMediaAssetSidecar, h as buildSiteRenderSupport, m as buildRenderablePageOutline, q as isSupportedLoaderEndpoint, t as Page, v as projectRenderablePageOutline } from "./Page-Dv9eIOGr.mjs";
|
|
4
4
|
import { t as BEFORE_BOOKING_QUESTIONS_ROUTE } from "./bookingQuestions-BHq83mzS.mjs";
|
|
5
5
|
import { t as restoreRuntimeResponse } from "./runtimeResponse-Dg4XFsuM.mjs";
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
@@ -2509,6 +2509,14 @@ const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
2509
2509
|
//#endregion
|
|
2510
2510
|
//#region ../api/src/siteManagementEndpointDefinitions.ts
|
|
2511
2511
|
const SITE_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
2512
|
+
switchDemoView: {
|
|
2513
|
+
path: "/sites/{siteId}/demo/view",
|
|
2514
|
+
method: "POST",
|
|
2515
|
+
auth: "user",
|
|
2516
|
+
responseKind: "json",
|
|
2517
|
+
demoMutation: DEMO_MUTATION_ALLOWED,
|
|
2518
|
+
errors: []
|
|
2519
|
+
},
|
|
2512
2520
|
createSite: {
|
|
2513
2521
|
path: "/sites/manage",
|
|
2514
2522
|
method: "POST",
|
|
@@ -5019,6 +5027,21 @@ const API_ENDPOINTS$1 = {
|
|
|
5019
5027
|
errors: ["resource:not_found", "server:internal_error"],
|
|
5020
5028
|
responseKind: "json"
|
|
5021
5029
|
},
|
|
5030
|
+
updateBookingEmbed: {
|
|
5031
|
+
path: "/sites/{siteId}/settings/embed",
|
|
5032
|
+
method: "POST",
|
|
5033
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
5034
|
+
auth: "user",
|
|
5035
|
+
demoMutation: DEMO_MUTATION_ALLOWED,
|
|
5036
|
+
errors: [
|
|
5037
|
+
"auth:forbidden",
|
|
5038
|
+
"validation:invalid_input",
|
|
5039
|
+
"resource:not_found",
|
|
5040
|
+
"resource:conflict",
|
|
5041
|
+
"server:internal_error"
|
|
5042
|
+
],
|
|
5043
|
+
responseKind: "json"
|
|
5044
|
+
},
|
|
5022
5045
|
updateFooterCredit: {
|
|
5023
5046
|
path: "/sites/{siteId}/settings/footer-credit",
|
|
5024
5047
|
method: "POST",
|
|
@@ -7357,6 +7380,30 @@ const API_ENDPOINTS$1 = {
|
|
|
7357
7380
|
auth: "user",
|
|
7358
7381
|
responseKind: "json"
|
|
7359
7382
|
},
|
|
7383
|
+
archiveVenue: {
|
|
7384
|
+
path: "/sites/{siteId}/bookings/venues/{venueId}/archive",
|
|
7385
|
+
method: "POST",
|
|
7386
|
+
tags: [
|
|
7387
|
+
"site-{siteId}",
|
|
7388
|
+
"venues-{siteId}",
|
|
7389
|
+
"venue-{venueId}"
|
|
7390
|
+
],
|
|
7391
|
+
auth: "user",
|
|
7392
|
+
responseKind: "json",
|
|
7393
|
+
errors: ["resource:not_found"]
|
|
7394
|
+
},
|
|
7395
|
+
restoreVenue: {
|
|
7396
|
+
path: "/sites/{siteId}/bookings/venues/{venueId}/restore",
|
|
7397
|
+
method: "POST",
|
|
7398
|
+
tags: [
|
|
7399
|
+
"site-{siteId}",
|
|
7400
|
+
"venues-{siteId}",
|
|
7401
|
+
"venue-{venueId}"
|
|
7402
|
+
],
|
|
7403
|
+
auth: "user",
|
|
7404
|
+
responseKind: "json",
|
|
7405
|
+
errors: ["resource:not_found"]
|
|
7406
|
+
},
|
|
7360
7407
|
createVenue: {
|
|
7361
7408
|
path: "/sites/{siteId}/bookings/venues",
|
|
7362
7409
|
method: "POST",
|
|
@@ -10286,7 +10333,7 @@ var SimpleCache = class {
|
|
|
10286
10333
|
//#endregion
|
|
10287
10334
|
//#region src/request-options.ts
|
|
10288
10335
|
/** Every API client the SDK creates sends its version as `x-sdk-version`. */
|
|
10289
|
-
const sdkRequestOptions = { sdkVersion: "0.
|
|
10336
|
+
const sdkRequestOptions = { sdkVersion: "0.169.0" };
|
|
10290
10337
|
//#endregion
|
|
10291
10338
|
//#region src/client/error.ts
|
|
10292
10339
|
let _Symbol$for;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { G as beforeBookingQuestionsPresentationSchema, an as toNonNegativeCents, at as normalizeCurrencyCode, i as EVENT_BOOKING_ARRIVAL_QUERY, n as blockSiteTermsSchema, p as calendarWindowPageSchema, rn as parsePositiveCents, s as publicPassProductCollectionSchema } from "./noop-B_f7RqLD.mjs";
|
|
3
3
|
import { t as BEFORE_BOOKING_QUESTIONS_ROUTE } from "./bookingQuestions-BHq83mzS.mjs";
|
|
4
4
|
import { n as submissionProof } from "./protection-C0PoH1lT.mjs";
|
|
5
5
|
import { createContext, useContext, useMemo } from "react";
|
|
@@ -531,6 +531,11 @@ const WHOLE_SERIES = { waitlistClaimResolve: {
|
|
|
531
531
|
authScope: "portal"
|
|
532
532
|
} };
|
|
533
533
|
const SHOP = {
|
|
534
|
+
listPublicPasses: {
|
|
535
|
+
path: "/public/sites/{siteId}/bookings/products/passes",
|
|
536
|
+
method: "GET",
|
|
537
|
+
authScope: "public"
|
|
538
|
+
},
|
|
534
539
|
listProducts: {
|
|
535
540
|
path: "/public/sites/{siteId}/products",
|
|
536
541
|
method: "GET",
|
|
@@ -1101,6 +1106,14 @@ function createBlockApi(config) {
|
|
|
1101
1106
|
async submitBookingWithPackage(data) {
|
|
1102
1107
|
return request(BOOKINGS.createAppointmentWithPackage, { body: data });
|
|
1103
1108
|
},
|
|
1109
|
+
async listPublicPasses(params) {
|
|
1110
|
+
const path = buildPath(SHOP.listPublicPasses.path, { siteId: requireSiteId() });
|
|
1111
|
+
const result = await request(SHOP.listPublicPasses, {
|
|
1112
|
+
path,
|
|
1113
|
+
query: params
|
|
1114
|
+
});
|
|
1115
|
+
return publicPassProductCollectionSchema.parse(result);
|
|
1116
|
+
},
|
|
1104
1117
|
async getEligibleAppointmentPackages(params) {
|
|
1105
1118
|
return request(BOOKINGS.getEligibleAppointmentPackages, { query: {
|
|
1106
1119
|
serviceId: params.serviceId,
|
|
@@ -1669,5 +1682,14 @@ function useBlockApi() {
|
|
|
1669
1682
|
if (!client) throw new Error("useBlockApi must be used within a BlockApiProvider. Make sure your component is wrapped with <BlockApiProvider>.");
|
|
1670
1683
|
return client;
|
|
1671
1684
|
}
|
|
1685
|
+
/**
|
|
1686
|
+
* Hook to optionally access the Block API Client
|
|
1687
|
+
*
|
|
1688
|
+
* Returns null if not within a BlockApiProvider.
|
|
1689
|
+
* Useful for components that can work with or without the API client.
|
|
1690
|
+
*/
|
|
1691
|
+
function useBlockApiOptional() {
|
|
1692
|
+
return useContext(BlockApiContext);
|
|
1693
|
+
}
|
|
1672
1694
|
//#endregion
|
|
1673
|
-
export { createBlockApi as i, useBlockApi as n,
|
|
1695
|
+
export { createBlockApi as a, BlockApiError as i, useBlockApi as n, useBlockApiOptional as r, BlockApiProvider as t };
|
|
@@ -15,7 +15,7 @@ function subtractDaysFromIso(isoString, dayCount) {
|
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region ../core/src/assert-never.ts
|
|
18
|
-
function assertNever$
|
|
18
|
+
function assertNever$4(value, message = "Unexpected variant") {
|
|
19
19
|
throw new Error(`${message}: ${String(value)}`);
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
@@ -30,7 +30,7 @@ function resolveFlexibleBalanceDueAt(input) {
|
|
|
30
30
|
switch (input.dueDateRule.kind) {
|
|
31
31
|
case "relative_to_start_date": return subtractDaysFromIso(input.bookingStartAt, input.dueDateRule.daysBeforeStart);
|
|
32
32
|
case "fixed_calendar_date": return input.dueDateRule.dueAt;
|
|
33
|
-
default: return assertNever$
|
|
33
|
+
default: return assertNever$3(input.dueDateRule);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
function calculateFlexibleBalanceMinimumPaymentCents(input) {
|
|
@@ -79,10 +79,10 @@ function resolveFlexibleBalancePaymentEligibility(input) {
|
|
|
79
79
|
suggestedPayFullAmountCents: input.remainingBalanceCents
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
default: return assertNever$
|
|
82
|
+
default: return assertNever$3(input.status);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
function assertNever$
|
|
85
|
+
function assertNever$3(value) {
|
|
86
86
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
@@ -92,7 +92,7 @@ function isDepositBearingBookingInstalmentPlan(plan) {
|
|
|
92
92
|
case "deposit_plus_one_remainder":
|
|
93
93
|
case "deposit_plus_scheduled_instalments": return true;
|
|
94
94
|
case "equal_scheduled_instalments": return false;
|
|
95
|
-
default: return assertNever$
|
|
95
|
+
default: return assertNever$2(plan);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
function getBookingInstalmentDepositRefundability(plan) {
|
|
@@ -118,7 +118,7 @@ function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit
|
|
|
118
118
|
date.setUTCDate(date.getUTCDate() + intervalCount * 7);
|
|
119
119
|
return date.toISOString();
|
|
120
120
|
case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
121
|
-
default: return assertNever$
|
|
121
|
+
default: return assertNever$2(intervalUnit);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
function getBookingInstalmentPlanIntervalCount(plan) {
|
|
@@ -126,7 +126,7 @@ function getBookingInstalmentPlanIntervalCount(plan) {
|
|
|
126
126
|
case "deposit_plus_one_remainder": return plan.remainderDueCount;
|
|
127
127
|
case "deposit_plus_scheduled_instalments":
|
|
128
128
|
case "equal_scheduled_instalments": return plan.intervalCount;
|
|
129
|
-
default: return assertNever$
|
|
129
|
+
default: return assertNever$2(plan);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
function omitZeroAmountFutureRows(rows) {
|
|
@@ -145,7 +145,7 @@ function formatOrderInstalmentStatusLabel(input) {
|
|
|
145
145
|
case "cancelled": return "Cancelled";
|
|
146
146
|
case "cancelled_as_paid_early": return "Paid early";
|
|
147
147
|
case "refunded": return "Refunded";
|
|
148
|
-
default: return assertNever$
|
|
148
|
+
default: return assertNever$2(input.status);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
@@ -155,7 +155,7 @@ function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
|
155
155
|
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
156
156
|
return nextMonth;
|
|
157
157
|
}
|
|
158
|
-
function assertNever$
|
|
158
|
+
function assertNever$2(value) {
|
|
159
159
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
@@ -210,7 +210,7 @@ function err(error) {
|
|
|
210
210
|
error
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
|
-
function assertNever(value, message) {
|
|
213
|
+
function assertNever$1(value, message) {
|
|
214
214
|
throw new Error(message ?? `Unexpected value: ${String(value)}`);
|
|
215
215
|
}
|
|
216
216
|
//#endregion
|
|
@@ -301,4 +301,64 @@ function checkBookingQuestionsAnswered(view) {
|
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
303
|
//#endregion
|
|
304
|
-
|
|
304
|
+
//#region ../blocks/src/system/runtime/api/creditProducts.ts
|
|
305
|
+
function assertNever(value) {
|
|
306
|
+
throw new Error(`Unhandled credit product case: ${String(value)}`);
|
|
307
|
+
}
|
|
308
|
+
function useCasesFromModules(modules) {
|
|
309
|
+
if (!modules) return [];
|
|
310
|
+
return [...modules.events ? ["event_pass"] : [], ...modules.appointments ? ["appointment_package"] : []];
|
|
311
|
+
}
|
|
312
|
+
function deriveUseCases(products, modules) {
|
|
313
|
+
if (products.length > 0) return products.map((product) => product.productUseCase);
|
|
314
|
+
return useCasesFromModules(modules);
|
|
315
|
+
}
|
|
316
|
+
function getCreditProductTypeLabel(useCase) {
|
|
317
|
+
switch (useCase) {
|
|
318
|
+
case "event_pass": return "Event pass";
|
|
319
|
+
case "appointment_package": return "Appointment package";
|
|
320
|
+
default: return assertNever(useCase);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
function getCreditProductCreditUnit(useCase) {
|
|
324
|
+
switch (useCase) {
|
|
325
|
+
case "event_pass": return {
|
|
326
|
+
singular: "class",
|
|
327
|
+
plural: "classes",
|
|
328
|
+
perCreditSuffix: "class"
|
|
329
|
+
};
|
|
330
|
+
case "appointment_package": return {
|
|
331
|
+
singular: "credit",
|
|
332
|
+
plural: "credits",
|
|
333
|
+
perCreditSuffix: "credit"
|
|
334
|
+
};
|
|
335
|
+
default: return assertNever(useCase);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
function getPortalCreditProductCreditNoun(useCase, count) {
|
|
339
|
+
switch (useCase) {
|
|
340
|
+
case "event_pass": return count === 1 ? "pass credit" : "pass credits";
|
|
341
|
+
case "appointment_package": return count === 1 ? "package credit" : "package credits";
|
|
342
|
+
default: return assertNever(useCase);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
function deriveCreditProductLabels(products, options = {}) {
|
|
346
|
+
const style = options.style ?? "generic";
|
|
347
|
+
const useCases = deriveUseCases(products, options.modules);
|
|
348
|
+
const hasEventPass = useCases.includes("event_pass");
|
|
349
|
+
const hasAppointmentPackage = useCases.includes("appointment_package");
|
|
350
|
+
if (hasEventPass && hasAppointmentPackage) return {
|
|
351
|
+
heading: "Passes & Packages",
|
|
352
|
+
emptyMessage: "You don't have any passes or packages yet."
|
|
353
|
+
};
|
|
354
|
+
if (hasAppointmentPackage) return {
|
|
355
|
+
heading: style === "class" ? "Appointment Packages" : "Packages",
|
|
356
|
+
emptyMessage: "You don't have any packages yet."
|
|
357
|
+
};
|
|
358
|
+
return {
|
|
359
|
+
heading: style === "class" ? "Class Passes" : "Passes",
|
|
360
|
+
emptyMessage: "You don't have any passes yet."
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
//#endregion
|
|
364
|
+
export { resolveFlexibleBalanceInitialPaymentCents as A, clampConfiguredAmount as C, omitZeroAmountFutureRows as D, getBookingInstalmentPlanIntervalCount as E, assertNever$4 as M, splitAmountWithRemainderInFirst as O, addIntervalPreservingMonthAnchor as S, getBookingInstalmentDepositRefundability as T, ok as _, UNANSWERED_QUESTIONS_SUMMARY as a, reportWorkflowError as b, checkBookingQuestionsAnswered as c, initialBookingQuestionsAnswerMode as d, initialBookingQuestionsValues as f, err as g, assertNever$1 as h, getPortalCreditProductCreditNoun as i, resolveFlexibleBalancePaymentEligibility as j, resolveFlexibleBalanceDueAt as k, getInitialFieldValue as l, unansweredRequiredBookingQuestions as m, getCreditProductCreditUnit as n, UNANSWERED_QUESTION_MESSAGE as o, resolveBookingQuestionsAnswerMode as p, getCreditProductTypeLabel as r, buildBookingQuestionsSubmission as s, deriveCreditProductLabels as t, initialBookingQuestionValues as u, okWith as v, formatOrderInstalmentStatusLabel as w, reportWorkflowSuccess as x, clearWorkflowFeedback as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { $n as canJoinEventWaitlistOnAnyMode, Zn as resolveRuntimeEventDestination, er as formatEventRemainingPlaces, ir as getEventAvailabilityStatus, or as isEventFull } from "./display-CT8KMSpH.mjs";
|
|
3
|
+
import { M as assertNever } from "./creditProducts-CMOmhWm2.mjs";
|
|
4
4
|
//#region ../blocks/src/system/runtime/nodes/events/domain/cta.ts
|
|
5
5
|
/**
|
|
6
6
|
* Booking call-to-action resolution for events: where an event links to and
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Bt as resolveBookingDisplayContext, Ft as formatDateTimeRange, It as formatTime, Mt as formatDate$1, Pt as formatDateTime$1, Qt as resolveBookingTimeZoneId, en as parseUtcIsoDateTimeString, tn as toUtcIsoDateTimeString } from "./noop-B_f7RqLD.mjs";
|
|
3
3
|
//#region ../blocks/src/portal/dateFormatting.ts
|
|
4
4
|
/** Optional API timestamps enter the display model here; invalid values never render a Date. */
|
|
5
5
|
function readInstant(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { i as BlockApiError } from "./context-DQnTyApV.mjs";
|
|
3
3
|
//#region ../blocks/src/system/runtime/shared/utils/demoBookingPassStorage.ts
|
|
4
4
|
const STORAGE_KEY = "riverbank:demo-booking-passes:v1";
|
|
5
5
|
const CHECKOUT_RETURN_EMAIL_KEY = "riverbank:demo-booking-checkout-email:v1";
|