@riverbankcms/sdk 0.182.0 → 0.184.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/README.md +83 -4
- package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-DjBTJYiF.d.ts} +1 -1
- package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-BpXEM2ET.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-Bb3h7KRE.d.ts} +2 -2
- package/dist/_dts/{client-D6T430bk.d.ts → client-DgTRRtl_.d.ts} +14 -1
- package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-DZQJp_ak.d.ts} +9 -16
- package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-Ww1fmd-c.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-BGc7dju6.d.ts} +2 -2
- package/dist/_dts/{index-CciRW_w1.d.ts → index-BECaUNYs.d.ts} +2 -2
- package/dist/_dts/{index-CEyYMhLJ.d.ts → index-Cc85KVLW.d.ts} +3 -3
- package/dist/_dts/{index-CQrb3Ccc.d.ts → index-Cni4jykw.d.ts} +4 -4
- package/dist/_dts/{index-DIU-wL1M.d.ts → index-DxxTQ_0V.d.ts} +2 -2
- package/dist/_dts/{index-Cqxis-nv.d.ts → index-W9-7djG3.d.ts} +1 -1
- package/dist/_dts/{index-DqPKdeTk.d.ts → index-ukS-Ffem.d.ts} +1 -1
- package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-BlSWTlbD.d.ts} +7 -7
- package/dist/_dts/{request-DEwxUSw8.d.ts → request-CZz2BoXJ.d.ts} +89478 -88093
- package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D12HXnS3.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-BteMsSGP.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 +7 -7
- 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 -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 +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/portal/index.d.ts +10 -2
- 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 +126 -2
- package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-aTlOvO3U.d.ts} +16 -8
- package/dist/_dts/{types-B3RjeBLV.d.ts → types-Bi7R07RX.d.ts} +45 -4
- package/dist/_dts/{types-BvUSGQrw.d.ts → types-CCcQlRBi.d.ts} +22 -12
- package/dist/_dts/{types-CkRFtBqd.d.ts → types-Du4aMnWC.d.ts} +13 -15
- package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-CjCWVmwe.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-CFLWxjxR.mjs} +22 -18
- package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-C4LcfwyA.mjs} +8 -8
- package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DdcmoHqQ.mjs} +2 -2
- package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-DYGewmvh.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-ZfrUiiiI.mjs} +25 -8
- package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-pzkGVkgG.mjs} +7 -5
- package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-Ct1B3xI4.mjs} +10 -10
- package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DgfNtcgW.mjs} +9 -9
- package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-CjoaG1zy.mjs} +1 -1
- package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-KGKkK19N.mjs} +29 -14
- package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-Ba9ezxuC.mjs} +1 -1
- package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-xFKRDLwC.mjs} +3 -3
- package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-Dy36vWHi.mjs} +84 -7
- package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-Dth9L00x.mjs} +118 -76
- package/dist/client/{Page-sV6BJkXX.mjs → Page-DB5KODiu.mjs} +4491 -1398
- package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-BDVP_HeK.mjs} +3 -3
- package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-CLgDVzCs.mjs} +1 -1
- package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DRyZ8igu.mjs} +7 -7
- package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-C4rCsPCt.mjs} +52 -10
- package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-CqroimVQ.mjs} +1024 -619
- package/dist/client/{accordion-6cuswD_s.mjs → accordion-BQYRP5xV.mjs} +1 -1
- package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-B7ckDuOC.mjs} +191 -71
- package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-BeD4650p.mjs} +7 -6
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CA7FirMH.mjs} +2 -2
- package/dist/client/buttonParts-C39GC0kz.mjs +1518 -0
- package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DJ9Aa1m3.mjs} +2 -2
- package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
- package/dist/client/{cart-BYOe7MCh.mjs → cart-DdCenbTy.mjs} +3 -3
- package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-BQm06qNw.mjs} +1 -1
- package/dist/client/{checkout-Dwd7Di77.mjs → checkout-45wPQULN.mjs} +3 -3
- package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-bSv4cc5z.mjs} +1 -1
- package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-CwlaMl3W.mjs} +1 -1
- package/dist/client/client.mjs +460 -119
- package/dist/client/{constants-DdxFG3Ic.mjs → constants-DXV4KR7l.mjs} +1 -1
- package/dist/client/{context-Hi1RuYEM.mjs → context-lCPfX-xe.mjs} +15 -5
- package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-Ce3Gyin_.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CGcDE9aE.mjs} +4 -4
- package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DlPfn4YG.mjs} +52 -29
- package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-CioAdryV.mjs} +4 -4
- package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-Dwt0G6ez.mjs} +4 -4
- package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-B3H9ifOC.mjs} +4 -4
- package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-Do7cAhXb.mjs} +7 -6
- package/dist/client/{form-DWnlEVSK.mjs → form-CsqzgC6v.mjs} +3 -3
- package/dist/client/{form.client-D7zmeqNI.mjs → form.client-DVDB7hY6.mjs} +5 -5
- package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-1q2rzSYt.mjs} +3 -3
- package/dist/client/gifting/client.mjs +16 -9
- package/dist/client/{gifting-Cn0jidP5.mjs → gifting-BrXQGX-k.mjs} +4 -4
- package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--zAjnY5N.mjs} +155 -85
- package/dist/client/gifting.interactive-CrwHpUJG.mjs +207 -0
- package/dist/client/gifting.parts-CcKdDaQq.mjs +124 -0
- package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-DlcDH4bi.mjs} +2 -2
- package/dist/client/{noop-jesvJXEE.mjs → islands-dMh0Oxli.mjs} +16103 -7965
- package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-BxA1PsdS.mjs} +6 -6
- package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-D0iRg7p2.mjs} +229 -197
- package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-Dmuklz0r.mjs} +2 -2
- package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CBzvgIfg.mjs} +3 -3
- package/dist/client/portal/client.mjs +51 -35
- package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
- package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DiGibcZI.mjs} +31 -9
- package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
- package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-D9MP8hvH.mjs} +1 -1
- package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-wCz1qcUY.mjs} +1 -1
- package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-D9-fCY6c.mjs} +3 -3
- package/dist/client/{productList-BuLemmod.mjs → productList-PJyxXSac.mjs} +3 -3
- package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-B8lrKGPw.mjs} +4 -2
- package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-CI63JVHW.mjs} +2444 -1078
- package/dist/client/rendering/client.mjs +32 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +5 -5
- package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-Jt9hDHdh.mjs} +2 -2
- package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-ZSPcJWx1.mjs} +1 -1
- package/dist/client/runtimeResponse-DlPBWBd9.mjs +3 -0
- package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-_iW9oEYc.mjs} +1 -1
- package/dist/client/{shop-GuMqnDL-.mjs → shop-CbdJlWOw.mjs} +3 -3
- package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-BqLbzUUn.mjs} +47 -28
- package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-BT0-zRqN.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-Cws0lnSb.mjs} +2 -2
- package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-0cNErhJT.mjs} +54 -24
- package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-COuQ2MhQ.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{src-CmXh3JWs.mjs → src-Do_s2lqH.mjs} +11 -18
- package/dist/client/{timetableModel-GA-hn1qM.mjs → timetableModel-DqI6U1BS.mjs} +11 -8
- package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CeVUVzGf.mjs} +44 -1
- package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-B0mjVhZr.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-B_hfgdAP.mjs} +6 -2
- package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Ct4A6iR1.mjs} +14 -16
- package/dist/client/{view-DOyZc-DF.mjs → view-Cj151w4m.mjs} +24 -9
- package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-B3gsXNnb.mjs} +283 -222
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-Dv4CW0AQ.mjs} +952 -138
- package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-B7WW58uE.mjs} +4774 -2040
- package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-BnJ1ughv.mjs} +71 -47
- package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-C7qWzAe4.mjs} +72 -40
- package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CYi4UHtG.mjs} +135 -30
- package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-CRgbU75r.mjs} +799 -17
- package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-B4c6U3ZU.mjs} +11 -1
- package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-DrUoRNu9.mjs} +24203 -9291
- package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-CEYp90mM.mjs} +3 -90
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-DnO2_c0A.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-B3PwHw2z.mjs} +46 -11
- package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-DrdQ4ier.mjs} +49 -3
- package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-kuGRKaRL.mjs} +2008 -448
- package/dist/preview-next/container-responsive.css +469 -2
- package/dist/preview-next/editor-chrome.css +23 -2
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BHTBA48n.mjs → route-contract-CwrXkLT3.mjs} +177 -43
- package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-C5ucphCJ.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DvbqYXdK.mjs} +46 -10
- package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-CAcf1lHT.mjs} +732 -176
- package/dist/server/{accordions-By_0Ykks.mjs → accordions-DjcsqjCK.mjs} +1 -1
- package/dist/server/{bindings-DMJH4bvo.mjs → bindings-CFw4M-gZ.mjs} +69 -248
- package/dist/server/{client-DrwlRNAH.mjs → client-D0XCgITW.mjs} +488 -119
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{constants-CeMywaiD.mjs → constants-BZduY8jG.mjs} +31 -8
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +4 -4
- package/dist/server/{loadContent-D0prFflT.mjs → loadContent-C-qyB8Tq.mjs} +11 -10
- package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-BpKKmi8E.mjs} +3 -3
- package/dist/server/lookMediaFrame-EFws7tAj.mjs +31835 -0
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/{navigation-wrcuWmgp.mjs → navigation-DYkuiNXa.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-DmZn4xUE.mjs} +1 -1
- package/dist/server/page-converter.mjs +18 -5
- package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-DRB7cUZ0.mjs} +674 -298
- package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-Uv1xDieJ.mjs} +13 -6
- package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-BdQF875z.mjs} +911 -516
- package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CwcWZL7u.mjs} +3 -3
- package/dist/server/{portal-pG_uhsI2.mjs → portal-BQ8qiQnk.mjs} +22 -2
- package/dist/server/portal.mjs +3 -3
- package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-B51QZVNe.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-CppDAfJW.mjs} +4 -4
- package/dist/server/{registry-Cc88-23f.mjs → registry-Bf4W8Qa7.mjs} +7585 -24378
- 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 -10
- package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-DMHAZooQ.mjs} +2 -2
- package/dist/server/{expandPalette-ehuW8r2g.mjs → resolveButtonColourStates-BMtAAPzp.mjs} +1670 -1346
- package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-DKYfR518.mjs} +1 -1
- package/dist/server/{schema-CwfxQjc4.mjs → schema-DGaihVwp.mjs} +300 -29
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-CRvmreX7.mjs} +40 -16
- package/dist/server/theme-bridge.mjs +5 -4
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-mcy2E1Yd.mjs} +2 -2
- package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-B2qFOUwZ.mjs} +4 -5
- package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
- package/dist/server/{types-BKaBZFjD.mjs → types-C_S0pWbR.mjs} +487 -9
- package/dist/server/{validation-BovmbS8N.mjs → validation-CUtNT_EZ.mjs} +14 -10
- package/dist/server/{version-hws4hgyX.mjs → version-DebJQ4zn.mjs} +1 -1
- package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
- package/dist/styles/index.css +2987 -168
- package/package.json +1 -1
- package/dist/client/gifting.parts-Bak93gD2.mjs +0 -86
- package/dist/client/runtimeResponse-nXT8VAMl.mjs +0 -3
- package/dist/client/types-BEaKfam_.mjs +0 -778
- package/dist/server/customCss-C9kgPHvr.mjs +0 -247
- package/dist/server/lookMediaFrame-H0fi4bJk.mjs +0 -2701
- package/dist/server/media-gvfIw3z8.mjs +0 -216
package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-Dth9L00x.mjs}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { m as ok, p as err } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
|
|
3
|
-
import { An as formatCurrencyAmount, St as roomChoicesSchema, dn as inferSiteDateLocale, t as assertNever, wn as resolveBookingBusinessTimeZone, xt as reviewedRoomsSchema } from "./src-
|
|
4
|
-
import { $n as serverPricedTotalCents, $
|
|
5
|
-
import { i as portalPath } from "./portalRoutes-
|
|
3
|
+
import { An as formatCurrencyAmount, St as roomChoicesSchema, dn as inferSiteDateLocale, t as assertNever, wn as resolveBookingBusinessTimeZone, xt as reviewedRoomsSchema } from "./src-Do_s2lqH.mjs";
|
|
4
|
+
import { $n as serverPricedTotalCents, $t as toWholeSeriesRegistrationEvents, A as ownCoverPaysEveryDate, Ar as normalizeTicketSelectionLines, At as resolveEventRequiresPayment, Bs as eventRegistrationErrorEndsCommand, Bt as defaultTicketOptions, C as currentSelectionFundingLookup, Ca as toBookingQuestionsPaymentSnapshot, Cn as primarySelectionItem, Cr as withRegistrationAvailability, Ct as beginWaitlistInvitation, D as fundingOptionPick, Dt as buildRegistrationSelectionRequest, E as fundingOptionKey, Ea as formatPrice, Et as withOfferedEvent, F as selectionFundingRequest, Ft as validateFormData, G as planRegistrationDetailsContinuation, Gn as combinationHintCopy, Gt as selectRoomOffer, H as getTicketSelectionPurpose, Hn as severalRunsChoiceMessage, Hs as eventRegistrationRefusalMessage, Ht as presentRoomChooser, I as buildEventRegistrationPaymentOptionsViewModel, J as resolveRegistrationAdmission, Jn as combinationWorking, Js as getStripeMinimumChargeRequirement, Kt as isSameWaitlistClaim, L as buildSelectionCollectionOptions, Ls as decideSelectionAttendance, Lt as bookingLines, M as selectionFundingBasis, Mt as resolveRouteRequiresPayment, N as selectionFundingFetchWanted, Ni as groupPublicEventsByRun, Nn as selectionIncludes, Nt as toRegistrationRequestSubject, O as initialSelectionFundingLookup, P as selectionFundingReducer, Pn as selectionItemPrice, Pt as registrationQuestionsMessage, Q as visitorHoldsOwnPlace, Qn as selectionPreviewLines, R as decideEventRegistrationPayment, Rt as dayOptionsOf, S as chosenFundingOption, Sn as planSelectionPrice, Sr as shouldLoadRegistrationOptions, St as entryStart, T as fundingMoneyDates, Tr as getSingleSelectedPricingOptionId, Tt as invitationBooking, Un as summariseSelectionPayment, Us as parseEventRegistrationErrorReason, Ut as roomChoiceMessage, Vn as severalItemsOf, Vs as eventRegistrationErrors, Vt as isRoomChoiceRefusal, W as planRegistrationDetailsCheck, Wn as toggleSelectionItem, Wr as appliedDiscountHint, Ws as planCheckoutPaymentFlow, Wt as roomSubmission, X as resolveRegistrationTicketContinuation, Xn as selectionCombinationHint, Xt as getRegistrationStartAt, Yn as paymentCaption, Zr as formatCommercePrice, Zt as toRegistrationEvents, _ as pickCollections, _r as getSlidingScaleForEvent, _t as bookingOccurrenceContext, a as registrationPresentation, ac as resolveBookingSignupOffer, an as buildSelectionRequirementsSubmission, ao as leavePage, b as selectionPaysNothing, ba as needsBookingQuestionsRefresh, bi as resolveEventRegistrationScopedEvents, bn as effectiveSelection, br as parseCurrencyInputToCents, bt as entryPageEvent, cn as deriveRunRequirements, cr as getPortalSubjectEmail, ct as calculateEventRegistrationPreviewTotal, d as decideEventChoice, dn as runsKeepingAnswers, dt as paymentChoiceDetails, ec as orderedLiveRunSessions, en as EVENT_SIGN_IN_FORM_ID, er as findSelectedTicketType, f as isRegistrationLocked, fi as closedDatesCopy, fn as toRunRequirementsSnapshots, fr as transformRegistrationOptionsResponse, ft as paymentChoicePrice, g as paymentOptionFor, gr as getRegistrationOccurrenceId, gt as createBookingBrowserDraftStore, h as moneyCollections, hi as closedDateCopy, hn as ATTENDANCE_CHOICE_MESSAGE, hr as getCurrentTicketSelection, ht as restorableBrowserDraftCode, i as registrationPaymentRoute, in as toEventSignInDraft, j as selectionDatesQuote, jt as resolveRegistrationTarget, k as lookupChosenOption, kr as hasValidPricingOptionSelection, kt as resolveDiscountContext, ln as nextRunToRead, m as collectionsOf, ma as bookingQuestionsOwnerOf, mn as paymentReturnRestoration, mt as registrationBrowserDraftSchema, nn as eventSignInEnds, nt as resolveEventRegistrationSubmitPlan, o as registrationRoute, on as checkRunRequirements, p as registrationFlowReducer, pi as closedRunCopy, pn as withoutKeptAnswers, pt as registrationBrowserDraft, q as resolveGuestNextStepCheck, qn as combinationOffersOf, qt as toWaitlistClaimResolveFailure, rn as eventSignInRestoration, ro as PAGE_NAVIGATION, sn as decideSelectionRequirementsLayout, so as requestSignIn, sr as getImplicitSingleTicketType, tc as resolveWholeSeriesBookingPhase, tn as eventSignInDraftStore, tr as formatBookingWhen, u as createInitialRegistrationFlowState, un as runFieldErrors, ur as getVisibleTicketTypes, v as runsSelectionPaymentRequest, va as deriveBookingQuestions, vn as attendanceChoicePending, vr as getSlidingScaleSelectionMessage, vt as decideRegistrationEntry, w as fundingChoice, wn as quoteReductions, wt as invitationSubmission, x as cardStepServesDates, xn as incompleteRunChoiceMessage, xr as resolveHeldTicketPlaces, xt as entrySelectionMode, y as selectionItemLabels, ya as isBookingQuestionsOwner, yc as publicEventPricingCurrency, yi as resolveEventRegistrationChoices, yn as canToggleSelectionItem, yr as getTicketSelectionRemainingPlaces, yt as entryChoosesEvent, zn as selectionTicketInputs, zs as defaultEventRegistrationErrorAppearance, zt as decideRoomStay } from "./wizardSteps-B3gsXNnb.mjs";
|
|
5
|
+
import { i as portalPath } from "./portalRoutes-DiGibcZI.mjs";
|
|
6
6
|
import { c as checkBookingQuestionsAnswered } from "./bookingCalendar--aWnqFDn.mjs";
|
|
7
|
-
import { i as useSiteTermsAgreement, r as siteTermsFailureKind } from "./SiteTermsAgreementField-
|
|
7
|
+
import { i as useSiteTermsAgreement, r as siteTermsFailureKind } from "./SiteTermsAgreementField-BDVP_HeK.mjs";
|
|
8
8
|
import { t as generateUuidV4 } from "./uuid-BETKW8rS.mjs";
|
|
9
|
-
import { s as indefiniteArticle } from "./BookingQuestionFields-
|
|
10
|
-
import { i as BlockApiError, n as useBlockApi } from "./context-
|
|
11
|
-
import { n as EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM, r as paidInFullNote, t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-
|
|
9
|
+
import { s as indefiniteArticle } from "./BookingQuestionFields-DdcmoHqQ.mjs";
|
|
10
|
+
import { i as BlockApiError, n as useBlockApi } from "./context-lCPfX-xe.mjs";
|
|
11
|
+
import { n as EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM, r as paidInFullNote, t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-DXV4KR7l.mjs";
|
|
12
12
|
import { t as resolveDedicatedBookingHref } from "./bookingRoute-D6DlxYx6.mjs";
|
|
13
|
-
import { i as discountEmailProblem } from "./DemoBookingPortalAccess-
|
|
14
|
-
import { c as parseBookingSubmissionFailure, d as useSignInReturn, f as useBookingQuestionsRefresh, l as useBookingNowIso, s as usePolling, u as portalSessionIdentity } from "./BookingMailingListNote-
|
|
15
|
-
import { t as useDiscountCodeUi } from "./useDiscountCodeUi-
|
|
16
|
-
import { s as storeDemoBookingPass } from "./demoPortalMagicLink-
|
|
13
|
+
import { i as discountEmailProblem } from "./DemoBookingPortalAccess-pzkGVkgG.mjs";
|
|
14
|
+
import { c as parseBookingSubmissionFailure, d as useSignInReturn, f as useBookingQuestionsRefresh, l as useBookingNowIso, s as usePolling, u as portalSessionIdentity } from "./BookingMailingListNote-C4LcfwyA.mjs";
|
|
15
|
+
import { t as useDiscountCodeUi } from "./useDiscountCodeUi-B_hfgdAP.mjs";
|
|
16
|
+
import { s as storeDemoBookingPass } from "./demoPortalMagicLink-Ce3Gyin_.mjs";
|
|
17
17
|
import { Suspense, lazy, useCallback, useEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -455,36 +455,10 @@ function receiveHandOff(outcome, receive) {
|
|
|
455
455
|
//#region ../blocks/src/system/runtime/nodes/event-registration/sessionStorage.ts
|
|
456
456
|
const STORAGE_PREFIX = "riverbank:event-registration:";
|
|
457
457
|
const STALE_THRESHOLD_MS = 1440 * 60 * 1e3;
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
});
|
|
463
|
-
/** This tab's unfinished form is scoped to the site and booking surface, not a checkout attempt. */
|
|
464
|
-
function saveRegistrationBrowserDraft(scope, draft) {
|
|
465
|
-
try {
|
|
466
|
-
const entry = browserDraftEntry.parse({
|
|
467
|
-
version: 1,
|
|
468
|
-
timestamp: Date.now(),
|
|
469
|
-
draft
|
|
470
|
-
});
|
|
471
|
-
sessionStorage.setItem(`riverbank:event-draft:${scope}`, JSON.stringify(entry));
|
|
472
|
-
} catch {}
|
|
473
|
-
}
|
|
474
|
-
function getRegistrationBrowserDraft(scope) {
|
|
475
|
-
try {
|
|
476
|
-
const stored = sessionStorage.getItem(`riverbank:event-draft:${scope}`);
|
|
477
|
-
const entry = browserDraftEntry.safeParse(stored ? JSON.parse(stored) : null);
|
|
478
|
-
if (entry.success && Date.now() - entry.data.timestamp <= 108e5) return entry.data.draft;
|
|
479
|
-
clearRegistrationBrowserDraft(scope);
|
|
480
|
-
} catch {}
|
|
481
|
-
return null;
|
|
482
|
-
}
|
|
483
|
-
function clearRegistrationBrowserDraft(scope) {
|
|
484
|
-
try {
|
|
485
|
-
sessionStorage.removeItem(`riverbank:event-draft:${scope}`);
|
|
486
|
-
} catch {}
|
|
487
|
-
}
|
|
458
|
+
const browserDraftStore = createBookingBrowserDraftStore("riverbank:event-draft:", registrationBrowserDraftSchema);
|
|
459
|
+
const saveRegistrationBrowserDraft = browserDraftStore.save;
|
|
460
|
+
const getRegistrationBrowserDraft = browserDraftStore.read;
|
|
461
|
+
const clearRegistrationBrowserDraft = browserDraftStore.clear;
|
|
488
462
|
const paymentSelection = z.discriminatedUnion("method", [
|
|
489
463
|
z.object({ method: z.literal("free") }),
|
|
490
464
|
z.object({
|
|
@@ -648,7 +622,12 @@ function useRegistrationBrowserDraft(input) {
|
|
|
648
622
|
/** Called once the code is known, which is later in the wizard than the restore above. */
|
|
649
623
|
function useSaveRegistrationBrowserDraft(input) {
|
|
650
624
|
const { ready } = input;
|
|
625
|
+
const owner = useRef(bookingQuestionsOwnerOf(input.identity));
|
|
651
626
|
useEffect(() => {
|
|
627
|
+
if (!isBookingQuestionsOwner(owner.current, input.identity)) {
|
|
628
|
+
clearRegistrationBrowserDraft(input.scope);
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
652
631
|
if (!ready) return;
|
|
653
632
|
if (input.flow.step === "success" || input.flow.step === "payment") {
|
|
654
633
|
clearRegistrationBrowserDraft(input.scope);
|
|
@@ -1102,7 +1081,8 @@ function eligibilityLookupReducer(state, action) {
|
|
|
1102
1081
|
eligibility: null,
|
|
1103
1082
|
settledRequestKey: action.requestKey,
|
|
1104
1083
|
error: action.message,
|
|
1105
|
-
closed: action.closed
|
|
1084
|
+
closed: action.closed,
|
|
1085
|
+
organiserContact: action.organiserContact
|
|
1106
1086
|
};
|
|
1107
1087
|
default: return assertNever(action);
|
|
1108
1088
|
}
|
|
@@ -1240,14 +1220,17 @@ async function loadEligibility(input) {
|
|
|
1240
1220
|
});
|
|
1241
1221
|
} catch (error) {
|
|
1242
1222
|
if (!input.isCurrent()) return;
|
|
1223
|
+
const organiserContact = error instanceof BlockApiError ? error.organiserContact : void 0;
|
|
1243
1224
|
input.dispatch(isBookingsClosedRefusal(error) ? {
|
|
1244
1225
|
type: "failed",
|
|
1245
1226
|
requestKey: input.requestKey,
|
|
1227
|
+
organiserContact,
|
|
1246
1228
|
closed: true,
|
|
1247
1229
|
message: "Bookings for this event have closed."
|
|
1248
1230
|
} : {
|
|
1249
1231
|
type: "failed",
|
|
1250
1232
|
requestKey: input.requestKey,
|
|
1233
|
+
organiserContact,
|
|
1251
1234
|
closed: false,
|
|
1252
1235
|
message: "We couldn’t load the booking options for this event. Try again, or contact the organiser if this keeps happening."
|
|
1253
1236
|
});
|
|
@@ -1297,6 +1280,7 @@ function useEligibilityWithDeps(params, deps) {
|
|
|
1297
1280
|
}, [api, requestKey]);
|
|
1298
1281
|
const effectiveState = effectiveEligibilityState(state, requestKey, request !== null);
|
|
1299
1282
|
return {
|
|
1283
|
+
organiserContact: effectiveState.tag === "failed" ? effectiveState.organiserContact : effectiveState.tag === "resolved" ? effectiveState.eligibility.organiserContact : effectiveState.tag === "loading" ? effectiveState.previousEligibility?.organiserContact : void 0,
|
|
1300
1284
|
state: effectiveState,
|
|
1301
1285
|
eligibility: effectiveState.tag === "loading" ? effectiveState.previousEligibility : effectiveState.eligibility,
|
|
1302
1286
|
settledRequestKey: effectiveState.settledRequestKey,
|
|
@@ -1555,6 +1539,12 @@ function parseEventRegistrationFailure(error) {
|
|
|
1555
1539
|
* know, as a form built before that reason was added won't, reads as a general refusal.
|
|
1556
1540
|
*/
|
|
1557
1541
|
function registrationErrorPresentation(failure, bookings = "one") {
|
|
1542
|
+
return {
|
|
1543
|
+
...defaultEventRegistrationErrorAppearance,
|
|
1544
|
+
...registrationErrorContent(failure, bookings)
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
function registrationErrorContent(failure, bookings) {
|
|
1558
1548
|
if (failure.discountRefused) return {
|
|
1559
1549
|
message: failure.message,
|
|
1560
1550
|
action: "payment-options"
|
|
@@ -1564,10 +1554,15 @@ function registrationErrorPresentation(failure, bookings = "one") {
|
|
|
1564
1554
|
action: "details"
|
|
1565
1555
|
};
|
|
1566
1556
|
const reason = failure.reason;
|
|
1567
|
-
if (reason)
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1557
|
+
if (reason) {
|
|
1558
|
+
const entry = eventRegistrationErrors[reason];
|
|
1559
|
+
return {
|
|
1560
|
+
heading: entry.heading ?? defaultEventRegistrationErrorAppearance.heading,
|
|
1561
|
+
tone: entry.tone ?? defaultEventRegistrationErrorAppearance.tone,
|
|
1562
|
+
message: eventRegistrationRefusalMessage(reason, failure.message, bookings),
|
|
1563
|
+
action: entry.action
|
|
1564
|
+
};
|
|
1565
|
+
}
|
|
1571
1566
|
if (failure.isClientError) {
|
|
1572
1567
|
const { message, action } = eventRegistrationErrors.invalidCommitInput;
|
|
1573
1568
|
return {
|
|
@@ -1848,6 +1843,7 @@ function registrationRequestIntentKey(request) {
|
|
|
1848
1843
|
...intent,
|
|
1849
1844
|
checkout: checkout ? {
|
|
1850
1845
|
discountCode: checkout.discountCode,
|
|
1846
|
+
quotedAutomaticDiscountCode: checkout.quotedAutomaticDiscountCode,
|
|
1851
1847
|
collectionOptionKind: checkout.collectionOptionKind
|
|
1852
1848
|
} : void 0
|
|
1853
1849
|
});
|
|
@@ -1858,6 +1854,7 @@ function buildRegistrationRequest(options, prepared, invitation, method, members
|
|
|
1858
1854
|
checkout: {
|
|
1859
1855
|
returnUrl: eventPaymentReturnUrl(prepared.registrationCommandId),
|
|
1860
1856
|
discountCode: options.discountCode.trim() || void 0,
|
|
1857
|
+
quotedAutomaticDiscountCode: options.quotedAutomaticDiscountCode,
|
|
1861
1858
|
collectionOptionKind: prepared.selectionSnapshot.method === "stripe" ? prepared.selectionSnapshot.collectionOptionKind : void 0
|
|
1862
1859
|
},
|
|
1863
1860
|
ticketSelections: toTicketSelectionRequests(prepared.ticketSelections),
|
|
@@ -1929,7 +1926,7 @@ function bookingCount(target) {
|
|
|
1929
1926
|
/** Keep feedback, field errors and navigation together when a submission fails. */
|
|
1930
1927
|
function reportFailedRegistration(options, error) {
|
|
1931
1928
|
const parsed = parseEventRegistrationFailure(error);
|
|
1932
|
-
const { message, action } = registrationErrorPresentation(parsed, bookingCount(options.registrationTarget));
|
|
1929
|
+
const { message, action, heading, tone } = registrationErrorPresentation(parsed, bookingCount(options.registrationTarget));
|
|
1933
1930
|
const failure = {
|
|
1934
1931
|
message,
|
|
1935
1932
|
questionFieldErrors: parsed.questionFieldErrors,
|
|
@@ -1937,7 +1934,10 @@ function reportFailedRegistration(options, error) {
|
|
|
1937
1934
|
};
|
|
1938
1935
|
if (parsed.discountRefused) options.onDiscountRefused?.(message);
|
|
1939
1936
|
options.setErrorAction?.(action);
|
|
1940
|
-
options.setErrorMessage(message
|
|
1937
|
+
options.setErrorMessage(message, {
|
|
1938
|
+
heading,
|
|
1939
|
+
tone
|
|
1940
|
+
});
|
|
1941
1941
|
options.setSubmissionFailure(failure);
|
|
1942
1942
|
if (isRoomChoiceRefusal(parsed.reason)) options.refreshOptions?.();
|
|
1943
1943
|
options.setStep(failedRegistrationStep(parsed, options.selectionFunding));
|
|
@@ -2010,6 +2010,26 @@ function decideSelectionQuoteAnswer(pending, result) {
|
|
|
2010
2010
|
fundingChanged: result.type === "fundingChanged" ? result : null
|
|
2011
2011
|
};
|
|
2012
2012
|
}
|
|
2013
|
+
/** A refused submission invalidates the old automatic fallback, independently of the typed draft. */
|
|
2014
|
+
function decideAutomaticSelectionQuoteAnswer(pending, result, message) {
|
|
2015
|
+
const answer = decideSelectionQuoteAnswer({
|
|
2016
|
+
...pending,
|
|
2017
|
+
draftCode: "",
|
|
2018
|
+
uncoded: void 0
|
|
2019
|
+
}, result);
|
|
2020
|
+
return {
|
|
2021
|
+
...answer,
|
|
2022
|
+
state: pending.draftCode.trim() && answer.state.status === "priced" ? {
|
|
2023
|
+
...pending,
|
|
2024
|
+
status: "refused",
|
|
2025
|
+
message,
|
|
2026
|
+
uncoded: answer.state.preview
|
|
2027
|
+
} : {
|
|
2028
|
+
...answer.state,
|
|
2029
|
+
draftCode: pending.draftCode
|
|
2030
|
+
}
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2013
2033
|
function decideSelectionQuoteResponse(pending, result) {
|
|
2014
2034
|
const typed = Boolean(pending.draftCode.trim());
|
|
2015
2035
|
if (result.type === "rejected" || result.type === "fundingChanged") return unpricedQuote(pending, typed, result);
|
|
@@ -2082,20 +2102,26 @@ function pricedPreview(state) {
|
|
|
2082
2102
|
function selectionPriceSettled(input, state) {
|
|
2083
2103
|
return !(!serverPricesTotal(input) && state.key !== null && Boolean(state.draftCode.trim()) && state.status !== "priced") && (pricedPreview(state) !== null || freeSelection(input) || singleBookingNeedsNoAnswer(input, state));
|
|
2084
2104
|
}
|
|
2105
|
+
/** The automatic code is carried separately, so it never becomes a visitor's typed code. */
|
|
2106
|
+
function quotedAutomaticCode(quote) {
|
|
2107
|
+
return quote?.source === "automatic" && quote.preview.type === "applied" ? quote.preview.code : void 0;
|
|
2108
|
+
}
|
|
2085
2109
|
/** The only projection that can expose a selection's payable total and submitted code. */
|
|
2086
2110
|
function decidedSelectionPricing(input, state, apply) {
|
|
2087
2111
|
const priced = state.status === "priced" ? state : null;
|
|
2088
2112
|
const fallback = priced === null ? pricedPreview(state) : null;
|
|
2113
|
+
const quote = selectionQuoteOf(priced) ?? (fallback ? {
|
|
2114
|
+
preview: fallback,
|
|
2115
|
+
source: "automatic"
|
|
2116
|
+
} : null);
|
|
2089
2117
|
const settled = selectionPriceSettled(input, state);
|
|
2090
2118
|
const waiting = quoteWaiting(input, state, settled);
|
|
2091
2119
|
return {
|
|
2092
2120
|
state,
|
|
2093
|
-
quote
|
|
2094
|
-
preview: fallback,
|
|
2095
|
-
source: "automatic"
|
|
2096
|
-
} : null),
|
|
2121
|
+
quote,
|
|
2097
2122
|
draftCode: state.draftCode,
|
|
2098
2123
|
decidedCode: priced?.decidedCode,
|
|
2124
|
+
quotedAutomaticDiscountCode: quotedAutomaticCode(quote),
|
|
2099
2125
|
ready: settled,
|
|
2100
2126
|
payableCents: selectionPayable(input, state),
|
|
2101
2127
|
quoting: waiting.quoting,
|
|
@@ -2214,13 +2240,22 @@ function presentSelectionCombination(input) {
|
|
|
2214
2240
|
/** The checkout and quote both consume the code decided by this response. */
|
|
2215
2241
|
async function requestSelectionQuote(input) {
|
|
2216
2242
|
try {
|
|
2217
|
-
const code = "selection" in input.request && input.request.selection.funding.kind === "entitlement" ? "" : input.pending.draftCode.trim();
|
|
2243
|
+
const code = "selection" in input.request && input.request.selection.funding.kind === "entitlement" || input.automaticRefusal !== void 0 ? "" : input.pending.draftCode.trim();
|
|
2244
|
+
const emailProblem = code ? discountEmailProblem(input.email) : null;
|
|
2245
|
+
if (emailProblem) return {
|
|
2246
|
+
state: {
|
|
2247
|
+
...input.pending,
|
|
2248
|
+
status: "refused",
|
|
2249
|
+
message: emailProblem
|
|
2250
|
+
},
|
|
2251
|
+
fundingChanged: null
|
|
2252
|
+
};
|
|
2218
2253
|
const result = await input.api.applyDiscountCode({
|
|
2219
2254
|
customerEmail: input.email.trim(),
|
|
2220
2255
|
...input.request,
|
|
2221
2256
|
...code ? { discountCode: code } : {}
|
|
2222
2257
|
});
|
|
2223
|
-
return decideSelectionQuoteAnswer(input.pending, result);
|
|
2258
|
+
return input.automaticRefusal === void 0 ? decideSelectionQuoteAnswer(input.pending, result) : decideAutomaticSelectionQuoteAnswer(input.pending, result, input.automaticRefusal);
|
|
2224
2259
|
} catch {
|
|
2225
2260
|
return {
|
|
2226
2261
|
state: {
|
|
@@ -2248,20 +2283,12 @@ function useSelectionCombinationPricing(input) {
|
|
|
2248
2283
|
latestKey.current = key;
|
|
2249
2284
|
const registrationPreview = seededFromOptions ? input.registrationPreview : null;
|
|
2250
2285
|
const current = seedRegistrationQuote(currentSelectionQuote(state, key), registrationPreview);
|
|
2251
|
-
const apply = async () => {
|
|
2286
|
+
const apply = async (automaticRefusal) => {
|
|
2252
2287
|
if (key === null || request === null) return;
|
|
2253
|
-
const emailProblem = current.draftCode.trim() ? discountEmailProblem(input.email) : null;
|
|
2254
|
-
if (emailProblem) {
|
|
2255
|
-
setState({
|
|
2256
|
-
...current,
|
|
2257
|
-
status: "refused",
|
|
2258
|
-
message: emailProblem
|
|
2259
|
-
});
|
|
2260
|
-
return;
|
|
2261
|
-
}
|
|
2262
2288
|
const pending = {
|
|
2263
2289
|
...current,
|
|
2264
|
-
status: "pending"
|
|
2290
|
+
status: "pending",
|
|
2291
|
+
...automaticRefusal === void 0 ? {} : { uncoded: void 0 }
|
|
2265
2292
|
};
|
|
2266
2293
|
setCarried(false);
|
|
2267
2294
|
setState(pending);
|
|
@@ -2270,11 +2297,12 @@ function useSelectionCombinationPricing(input) {
|
|
|
2270
2297
|
api: input.api,
|
|
2271
2298
|
email: input.email,
|
|
2272
2299
|
request,
|
|
2273
|
-
pending
|
|
2300
|
+
pending,
|
|
2301
|
+
automaticRefusal
|
|
2274
2302
|
});
|
|
2275
2303
|
setState((previous) => latestKey.current === pending.key && previous === pending ? answer.state : previous);
|
|
2276
2304
|
if (latestPending.current !== pending || latestKey.current !== pending.key || answer.fundingChanged === null) return;
|
|
2277
|
-
setCarried(Boolean(pending.draftCode.trim()));
|
|
2305
|
+
setCarried(automaticRefusal === void 0 && Boolean(pending.draftCode.trim()));
|
|
2278
2306
|
input.onFundingChanged(answer.fundingChanged.funding, answer.fundingChanged.message);
|
|
2279
2307
|
};
|
|
2280
2308
|
useEffect(() => {
|
|
@@ -2305,14 +2333,10 @@ function useSelectionCombinationPricing(input) {
|
|
|
2305
2333
|
};
|
|
2306
2334
|
return {
|
|
2307
2335
|
...decidedSelectionPricing(input, current, apply),
|
|
2336
|
+
refreshAutomatic: (message) => apply(message),
|
|
2308
2337
|
editCode,
|
|
2309
2338
|
carryCode,
|
|
2310
|
-
reset
|
|
2311
|
-
refuse: (message) => setState({
|
|
2312
|
-
...current,
|
|
2313
|
-
status: "refused",
|
|
2314
|
-
message
|
|
2315
|
-
})
|
|
2339
|
+
reset
|
|
2316
2340
|
};
|
|
2317
2341
|
}
|
|
2318
2342
|
//#endregion
|
|
@@ -3720,7 +3744,11 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3720
3744
|
});
|
|
3721
3745
|
clearWaitlistClaimLocation();
|
|
3722
3746
|
}, []);
|
|
3723
|
-
const [
|
|
3747
|
+
const [submissionError, setSubmissionError] = useState({
|
|
3748
|
+
message: "",
|
|
3749
|
+
...defaultEventRegistrationErrorAppearance
|
|
3750
|
+
});
|
|
3751
|
+
const submissionErrorMessage = submissionError.message;
|
|
3724
3752
|
const [submissionErrorAction, setErrorAction] = useState("retry");
|
|
3725
3753
|
const [optionsRefreshKey, setOptionsRefreshKey] = useState(0);
|
|
3726
3754
|
const { authState: portalAuthState, profile: portalProfile } = deps.usePortalAuth();
|
|
@@ -3853,6 +3881,14 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3853
3881
|
const existingRegistrations = useMemo(() => existingRegistrationResult.registrations.filter((registration) => registration.occurrenceId === registrationOccurrenceId), [existingRegistrationResult.registrations, registrationOccurrenceId]);
|
|
3854
3882
|
const registrationOptionsState = eligibilityResult.state;
|
|
3855
3883
|
const eligibility = eligibilityResult.eligibility;
|
|
3884
|
+
const organiserContact = eligibilityResult.organiserContact ?? eligibility?.organiserContact;
|
|
3885
|
+
const setErrorMessage = useCallback((message, appearance = defaultEventRegistrationErrorAppearance) => {
|
|
3886
|
+
setSubmissionError({
|
|
3887
|
+
message,
|
|
3888
|
+
...appearance,
|
|
3889
|
+
organiserContact
|
|
3890
|
+
});
|
|
3891
|
+
}, [organiserContact]);
|
|
3856
3892
|
const eligibilityLoading = eligibilityResult.isLoading;
|
|
3857
3893
|
const eligibilityError = eligibilityResult.error;
|
|
3858
3894
|
const portalCreditState = eligibilityResult.creditState;
|
|
@@ -3999,6 +4035,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3999
4035
|
const admission = resolveRegistrationAdmission({
|
|
4000
4036
|
eligibility,
|
|
4001
4037
|
eligibilityError,
|
|
4038
|
+
organiserContact,
|
|
4002
4039
|
bookingsClosed: eligibilityResult.bookingsClosed,
|
|
4003
4040
|
eligibilityLoading,
|
|
4004
4041
|
holdsOwnPlace: visitorHoldsOwnPlace({
|
|
@@ -4434,9 +4471,11 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
4434
4471
|
requireGuestDetails,
|
|
4435
4472
|
guests,
|
|
4436
4473
|
discountCode: discountView.submittedCode,
|
|
4474
|
+
quotedAutomaticDiscountCode: combinationPricing.quotedAutomaticDiscountCode,
|
|
4437
4475
|
onDiscountRefused: (message) => {
|
|
4438
4476
|
discountUi.setDiscountUiOpen(true);
|
|
4439
|
-
|
|
4477
|
+
setOptionsRefreshKey((value) => value + 1);
|
|
4478
|
+
combinationPricing.refreshAutomatic(message);
|
|
4440
4479
|
},
|
|
4441
4480
|
quoteReady: combinationPricing.ready,
|
|
4442
4481
|
selectionFunding: funding.choice,
|
|
@@ -4729,6 +4768,9 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
4729
4768
|
guestSectionShake,
|
|
4730
4769
|
handleGuestShakeEnd,
|
|
4731
4770
|
errorMessage,
|
|
4771
|
+
errorHeading: submissionError.heading,
|
|
4772
|
+
errorTone: submissionError.tone,
|
|
4773
|
+
organiserContact: submissionError.organiserContact ?? organiserContact,
|
|
4732
4774
|
questionFieldErrors: flowState.questionFieldErrors,
|
|
4733
4775
|
bookingQuestions: questions,
|
|
4734
4776
|
/** How the selection's questions and agreement are asked: once, or once per run. */
|
|
@@ -5248,7 +5290,7 @@ function availableCreditCents(state, currency) {
|
|
|
5248
5290
|
}
|
|
5249
5291
|
//#endregion
|
|
5250
5292
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.tsx
|
|
5251
|
-
const Payment = lazy(() => import("./EventEmbeddedCheckoutStep-
|
|
5293
|
+
const Payment = lazy(() => import("./EventEmbeddedCheckoutStep-CjoaG1zy.mjs"));
|
|
5252
5294
|
/** The one Stripe mount, shared by the standard wizard and headless arrangements. */
|
|
5253
5295
|
function EventPaymentMount({ state, onComplete, onRetry, onBack, buttonVariant }) {
|
|
5254
5296
|
if (state.kind === "abandoning") return /* @__PURE__ */ jsx("p", {
|