@riverbankcms/sdk 0.172.0 → 0.173.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-DtrzTJ77.d.ts → BlocksIslandsHydrator-O50mTMCY.d.ts} +1 -1
- package/dist/_dts/{Page-DViYbakk.d.ts → Page-Bk99sJwV.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-D-5OeDbT.d.ts → SdkPreviewMode-DzAue6Kj.d.ts} +2 -2
- package/dist/_dts/{client-DZBOzd3U.d.ts → client-ZlNEIvlU.d.ts} +1002 -139
- package/dist/_dts/{content-types-DS3DrYn_.d.ts → content-types-DBXPNc0h.d.ts} +2 -2
- package/dist/_dts/{contracts-C3QGPCUf.d.ts → contracts-D9bhu0bb.d.ts} +4 -3
- package/dist/_dts/{footerPageOutline-D9Q7VIul.d.ts → footerPageOutline-Bfap3soN.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-R7NeFT1u.d.ts → generatePageMetadata-DwCdg31h.d.ts} +2 -2
- package/dist/_dts/{index-CpOkfBt1.d.ts → index-BnatulTs.d.ts} +3 -3
- package/dist/_dts/{index-Dns7OHyl.d.ts → index-C611wjIL.d.ts} +1 -1
- package/dist/_dts/{index-Da4UMgbs.d.ts → index-CJzs-yIJ.d.ts} +2 -2
- package/dist/_dts/{index-MuMYjetm.d.ts → index-DW3eeNph.d.ts} +4 -4
- package/dist/_dts/{index-DkFV_1Bc.d.ts → index-Dq_AboWN.d.ts} +1 -1
- package/dist/_dts/{index-C0zjLMAW.d.ts → index-DutLU2d2.d.ts} +1 -1
- package/dist/_dts/{index-BnMavhoh.d.ts → index-KXh8FQ2s.d.ts} +2 -2
- package/dist/_dts/{loadContent-DJmXHzfi.d.ts → loadContent-Bde2y870.d.ts} +7 -7
- package/dist/_dts/{request-wQ28JWbr.d.ts → request-Bysk4QPI.d.ts} +1842 -262
- package/dist/_dts/{resolveBlockData-C-IP53u9.d.ts → resolveBlockData-ChbNvpSF.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-Cc4zqaEC.d.ts → resolvePageContent-CGa6QMgc.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 +6 -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-DrinAfeW.d.ts → types-BoEk9ZON.d.ts} +3 -3
- package/dist/_dts/{types-CpjyP5I4.d.ts → types-BwitGNTl.d.ts} +7 -7
- package/dist/_dts/{types-ZuZoGsZV.d.ts → types-kpp8XyXv.d.ts} +2 -2
- package/dist/_dts/{validation-CIZ_fP5l.d.ts → validation-ChftKX-o.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-UFmQB1BE.mjs → BlocksIslandsHydrator-BnUeSE3d.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-VjRYhx1c.mjs → BookingMailingListNote-LHQMODqB.mjs} +13 -7
- package/dist/client/{BookingPanelArrangement-DpqnRo-t.mjs → BookingPanelArrangement-Be704P85.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-CzOT8ZWo.mjs → BookingQuestionFields-BewbU_cV.mjs} +2 -2
- package/dist/client/{CalendarNavigationChevron-CNckKZct.mjs → CalendarNavigationChevron-BMZp3RS3.mjs} +41 -34
- package/dist/client/{DemoBookingPortalAccess-CmZLVXOy.mjs → DemoBookingPortalAccess-CARUWQ_E.mjs} +21 -21
- package/dist/client/{EventCalendar.client-BU-SxLCn.mjs → EventCalendar.client-CaI6upCX.mjs} +11 -10
- package/dist/client/{EventCombined.client-f28VltfY.mjs → EventCombined.client-CoRUaYHY.mjs} +10 -9
- package/dist/client/{EventItem-sKBofjiW.mjs → EventItem-Doe4KodB.mjs} +25 -16
- package/dist/client/{EventListWeekNavigation-IAcax47T.mjs → EventListWeekNavigation-CXWLKDfa.mjs} +1 -1
- package/dist/client/{EventListing.client-BEtnRvZr.mjs → EventListing.client-DvJ5tGTx.mjs} +3 -3
- package/dist/client/{EventListing.view-BZ4l_rmT.mjs → EventListing.view-BmfyK7S5.mjs} +37 -14
- package/dist/client/{EventRegistrationPayment-BWb295cD.mjs → EventRegistrationPayment-DwMlJB2V.mjs} +846 -145
- package/dist/client/{LocationMapActions-Hsj2HC_1.mjs → LocationMapActions-CdRPU6gp.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-C7E7Lyfa.mjs → MapDrawingSvg-DCLtxOnt.mjs} +1 -1
- package/dist/client/{Page-Ds1s3DuC.mjs → Page-D46Dmr7b.mjs} +548 -44
- package/dist/client/{StepIndicator-CSCyAaKY.mjs → StepIndicator-CrSZCZn1.mjs} +82 -11
- package/dist/client/{accessibleSurfaces-OsAseM7H.mjs → accessibleSurfaces-D4DhWo9j.mjs} +1 -20
- package/dist/client/{accordion-DgwFZJSx.mjs → accordion-P8xcfKxq.mjs} +1 -1
- package/dist/client/bookability-SargNwlO.mjs +17 -0
- package/dist/client/{booking-form.client-CKY9oksp.mjs → booking-form.client-BM2s-NqR.mjs} +11 -11
- package/dist/client/{bookingForm-CsHhcdSF.mjs → bookingForm-JnaZPZge.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-B1Z_TGAe.mjs → boxStyleClassNames-Cahps5kR.mjs} +1 -1
- package/dist/client/{carousel-0sw2Kc3a.mjs → carousel-CQQ_m0KA.mjs} +1 -1
- package/dist/client/{cart-CPfvMDGJ.mjs → cart-0Q4fjw_K.mjs} +3 -3
- package/dist/client/{cart.client-BJBPUTmg.mjs → cart.client-BI0IaHX3.mjs} +1 -1
- package/dist/client/{checkout-DU4JFjGT.mjs → checkout-1J-3ftxF.mjs} +3 -3
- package/dist/client/{checkout.client-BbNCO4xa.mjs → checkout.client-DOGYDlDk.mjs} +1 -1
- package/dist/client/{checkoutUrls-BQ3OlWlM.mjs → checkoutUrls-CwHqcqzP.mjs} +1 -1
- package/dist/client/client.mjs +52 -4
- package/dist/client/{context-xNC1Cyjw.mjs → context-D0KCgbOq.mjs} +81 -14
- package/dist/client/{cta-CNVQHLKs.mjs → course-CmOuoZHN.mjs} +76 -2
- package/dist/client/{dateFormatting-B6ea-egy.mjs → dateFormatting-Dmfaczzq.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BhjGxhX3.mjs → demoPortalMagicLink-CL7KGRta.mjs} +1 -1
- package/dist/client/{display-B5DfNb6A.mjs → display-lL-YRApN.mjs} +2462 -426
- package/dist/client/{enhanceHeaderSection-BFcHLuqk.mjs → enhanceHeaderSection-B-eLGs2C.mjs} +3 -3
- package/dist/client/{event-details.client-WHT5GLn2.mjs → event-details.client-DH1-Jxsh.mjs} +1 -1
- package/dist/client/{event-registration.client-CmnRKELC.mjs → event-registration.client-GuuElczW.mjs} +1314 -552
- package/dist/client/{eventCalendar-2NbdCyov.mjs → eventCalendar-BiCINPkV.mjs} +4 -4
- package/dist/client/{eventCombined-D1lH1n2T.mjs → eventCombined-BtzmH6FW.mjs} +4 -4
- package/dist/client/{eventDetails-BHvnF2Tw.mjs → eventDetails-BJpAD10-.mjs} +2 -2
- package/dist/client/{eventListing-EhSDk4UL.mjs → eventListing-jLB8iRqp.mjs} +4 -4
- package/dist/client/{eventRegistration-z_0jN_KS.mjs → eventRegistration-WhtpDEbq.mjs} +4 -4
- package/dist/client/{form-BfChzSkS.mjs → form-DO6qKH3M.mjs} +3 -3
- package/dist/client/{form.client-D1zehtPk.mjs → form.client-D12ljYiX.mjs} +3 -3
- package/dist/client/{form.parts-rMDlUQIv.mjs → form.parts-C8QHaQOI.mjs} +1 -1
- package/dist/client/{formatDate-ymSVT9Y5.mjs → formatDate-BnhfIpCa.mjs} +1 -1
- package/dist/client/gifting/client.mjs +2 -2
- package/dist/client/{headerSection-BX9bQ84k.mjs → headerSection-BtFWtoUm.mjs} +2 -2
- package/dist/client/{newsletter-form.client-DMbuJCtJ.mjs → newsletter-form.client-oHrqM_Ao.mjs} +4 -4
- package/dist/client/{newsletter-form.parts-BxrVsoI0.mjs → newsletter-form.parts-D5U-FuVy.mjs} +1 -1
- package/dist/client/{newsletterForm-B_I3FJFS.mjs → newsletterForm-CBYbFxSx.mjs} +3 -3
- package/dist/client/{noop-CamIX2yK.mjs → noop-CN0o0yjH.mjs} +115 -12
- package/dist/client/portal/client.mjs +7 -7
- package/dist/client/{product-detail.client-qxuiYCof.mjs → product-detail.client-d_sNCapC.mjs} +1 -1
- package/dist/client/{product-list.client-CDL-jihv.mjs → product-list.client-DkSpw6WQ.mjs} +1 -1
- package/dist/client/{productDetail-B97m0uZy.mjs → productDetail-DaqM-LgL.mjs} +3 -3
- package/dist/client/{productList-DE4vSSG_.mjs → productList-CMx4-XlG.mjs} +3 -3
- package/dist/client/{propsDecoder-BTde6Syh.mjs → propsDecoder-BZbUKstC.mjs} +3 -3
- package/dist/client/{registry.server-Cn8XjRte.mjs → registry.server-Cdot3dMk.mjs} +85 -57
- package/dist/client/rendering/client.mjs +25 -25
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +24 -55
- package/dist/client/{richText-coerce-Bcl3vTb4.mjs → richText-coerce-ByApwB4q.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-BjRoLoMD.mjs → routeIslandApiConfig-DTET8f__.mjs} +1 -1
- package/dist/client/{runtimeResponse-B-lrAGhX.mjs → runtimeResponse-IkOwKZD0.mjs} +1 -1
- package/dist/client/runtimeResponse-Wd6kwhE_.mjs +3 -0
- package/dist/client/{shop-BC4H0oYT.mjs → shop-Cy6xXDM7.mjs} +3 -3
- package/dist/client/{shop-commerce-BsY7a71m.mjs → shop-commerce-oDR76k1q.mjs} +11 -10
- package/dist/client/{shop-commerce-store-BZ5j90HD.mjs → shop-commerce-store-DjoUpL3a.mjs} +1 -1
- package/dist/client/shop-discount-apply.state-WsGb9DD8.mjs +166 -0
- package/dist/client/{shop.client-WgGVGelc.mjs → shop.client-Brha4BSM.mjs} +11 -10
- package/dist/client/{shop.interactive-Bb67gPLL.mjs → shop.interactive-CXhYl0DW.mjs} +35 -12
- package/dist/client/{shopShared-BE6TEk2A.mjs → shopShared-JCa_SRhP.mjs} +2 -2
- package/dist/client/stable-json-D0XAEIXc.mjs +22 -0
- package/dist/client/{timetableModel-Bbz_ECL5.mjs → timetableModel-CZeJwMxP.mjs} +10 -10
- package/dist/client/{useAvailableSlots-CdP14E_b.mjs → useAvailableSlots-DfbSkWop.mjs} +17 -6
- package/dist/client/{useDiscountApply-DvOSso2l.mjs → useDiscountApply-Dq-wjb1d.mjs} +4 -167
- package/dist/client/{useDiscountCodeUi-B4fRd2jy.mjs → useDiscountCodeUi-Cyy0meCH.mjs} +1 -1
- package/dist/client/{useEventPagination-M3jC8lgP.mjs → useEventPagination-CCAGQHsD.mjs} +5 -5
- package/dist/client/{view-B0TFnP4y.mjs → view-D6yebI4r.mjs} +51 -31
- package/dist/client/{view-DNNNbnNj.mjs → view-Sw075FOY.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-D59tHj_L.mjs → PageSectionToolbar-DG2rXUmo.mjs} +26 -19
- package/dist/preview-next/client/{PreviewEditorSidebar-CjOIZlUk.mjs → PreviewEditorSidebar-BDY5vdHU.mjs} +27 -360
- package/dist/preview-next/client/{PreviewEditorUI--kS9Cwsc.mjs → PreviewEditorUI-CqZCfOaz.mjs} +4 -4
- package/dist/preview-next/client/{PreviewShell-Bi8-rclb.mjs → PreviewShell-Bv2HZ7JY.mjs} +7 -7
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CWTUw-3L.mjs → SdkPreviewModeRuntime-BMTcR-MW.mjs} +5 -55
- package/dist/preview-next/client/{SiteChromeCustomizeButton-CrgS3I8d.mjs → SiteChromeCustomizeButton-D1MGyN_Z.mjs} +2668 -799
- package/dist/preview-next/client/{previewAssistantSlot-Caofnr1Z.mjs → previewAssistantSlot-La6MerV_.mjs} +3540 -684
- package/dist/preview-next/client/{previewChromeRoot-CbAI_jSH.mjs → previewChromeRoot-BcOQqJIP.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DY65_hLk.mjs → sdk-runtime-BkckHox4.mjs} +2 -2
- package/dist/preview-next/client/{useAutosaveStatus-CakNU3lp.mjs → useAutosaveStatus-CPAHgGqI.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-CCEMkosU.mjs → useOpenBlockForSetup-BDkuSZxQ.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-DsKDQoVW.mjs → route-contract-CPV30ABr.mjs} +48 -0
- package/dist/server/{Block.shared-D7Qy9F4a.mjs → Block.shared-BaMMstO1.mjs} +5 -5
- package/dist/server/{bindings-Bp6OnR3n.mjs → bindings-Dge4sqel.mjs} +4 -4
- package/dist/server/{client-dROAfMRa.mjs → client-VVIQjC4r.mjs} +51 -3
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{identity-20XHqyuO.mjs → identity-DQD_8lNO.mjs} +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-zOIrtqz-.mjs → loadContent-BIJb3WAK.mjs} +5 -6
- package/dist/server/{loadPage-vwFiq1Rk.mjs → loadPage-DjTU19y7.mjs} +2 -2
- package/dist/server/{media-Brn9FW5s.mjs → media-luf7RF22.mjs} +2 -2
- package/dist/server/{navigation-DAwbICEL.mjs → navigation-iC_hXjJI.mjs} +3 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +6 -6
- package/dist/server/{overrideResolution-DjboggbB.mjs → overrideResolution-1Ru3NMQj.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-BR4t1rOw.mjs → pageRenderPlan-CytPhrI9.mjs} +143 -27
- package/dist/server/{pageRuntimeSupport-BKo6XVK-.mjs → pageRuntimeSupport-DWspU5EZ.mjs} +3 -3
- package/dist/server/{pageShared-BJjptSGp.mjs → pageShared-Bhx8bVe1.mjs} +166 -67
- package/dist/server/{parseThemeForPersistence-B18KDEue.mjs → parseThemeForPersistence-CtgRtvo3.mjs} +1 -1
- package/dist/server/{prebuild-CntSkZQI.mjs → prebuild-BjvFb0CA.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-BM9Ds0OQ.mjs → prefetchBlockData-Db3stNpp.mjs} +3 -3
- package/dist/server/{registry-wYH0LH5f.mjs → registry-BMCfcev6.mjs} +809 -191
- 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 +8 -8
- package/dist/server/{resolveBlockData-Bu_p4HxZ.mjs → resolveBlockData--yUbI-Ll.mjs} +1 -1
- package/dist/server/{responseMedia-t6gs0cB7.mjs → responseMedia-DpBC1hTM.mjs} +1 -1
- package/dist/server/{schema-BFOqYIMQ.mjs → schema-D5Vfmqzw.mjs} +394 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{validation-DAQdPDku.mjs → validation-EgTtnTcY.mjs} +4 -4
- package/dist/server/{version-DAB0O3yx.mjs → version-LjgU0Cq1.mjs} +1 -1
- package/dist/styles/index.css +174 -0
- package/package.json +1 -1
- package/dist/client/runtimeResponse-CPcA8xSm.mjs +0 -3
- package/dist/server/rich-text-CRcONdyM.mjs +0 -33
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as DEFAULT_BOOKING_BUTTON_TEXT, L as offeringNounForEvent, M as buildEventRegistrationInteractiveIslandProps, N as displayButtonText, at as courseTitleOf, et as bookingBarPlacement, it as bookingPanelHeading, j as buildEventRegistrationDisplayFromScopedEvents, nt as bookingEntry,
|
|
3
|
-
import { $
|
|
2
|
+
import { $ as DEFAULT_BOOKING_BUTTON_TEXT, L as offeringNounForEvent, M as buildEventRegistrationInteractiveIslandProps, N as displayButtonText, at as courseTitleOf, et as bookingBarPlacement, in as formatEventPriceDisplay, it as bookingPanelHeading, j as buildEventRegistrationDisplayFromScopedEvents, nt as bookingEntry, rt as bookingEntryProgress, tt as bookingCardEntry } from "./shop.interactive-CXhYl0DW.mjs";
|
|
3
|
+
import { $t as runPricingChoice, An as formatDate, B as placeCountCeiling, C as panelShouldOpen, D as registrationStepLabel, Dn as areEntitlementsDisabledForTicketCount, Ec as publicEventPricingCurrency, En as ENTITLEMENT_SINGLE_TICKET_TOOLTIP, G as resolveRegistrationAvailabilityBlocker, Ht as SELECTION_LIMIT_NOTE, L as shouldPromptForLogin, La as resolveEventRegistrationScopedEvents, Ln as getTicketTypeAvailabilityLabel, Mn as formatPassCreditUsageLabel, Nn as formatRegistrationSchedule, O as registrationStepLabelContext, Oc as publicEventPricingStrategy, Oi as formatCentsAsCurrencyInput, Pn as formatTime, Qn as canRequestTicketOption, Qt as runNeedsPricingChoice, R as fullyBookedLabel, Rn as getVisibleTicketTypes, S as getEventSelectionMode, Sn as selectionItemName, Ut as SEVERAL_BOOKINGS_ACCOUNT_NOTE, Vn as withOccurrenceTitle, Wt as canToggleSelectionItem, X as isEventRegistrationAvailable, Xr as canJoinEventWaitlistOnAnyMode, Yr as canJoinEventWaitlist, Z as normalizeEventRegistrationMaxTickets, Zt as runChoiceUsable, _r as shownVenue, ac as INCOMPATIBLE_ATTENDANCE_MESSAGE, ai as selectMostOpenCapacitySource, an as selectionIncludes, ar as setTicketLineQuantity, bt as confirmationPaymentRows, cn as selectionPlacesLabel, ei as getEventAvailability, en as runUnitPriceCents, er as getTicketLineQuantity, fn as severalConfirmationSentence, ii as selectEventCapacitySource, in as selectionEntitlementNote, jn as formatEventDateTime, k as areEventRegistrationPaymentSelectionsEqual, kc as publicEventPricingType, ki as formatPrice$1, kn as formatBookingWhen, ln as selectionPlacesNote, mi as getRegistrationSuccessCopy, mr as placesLeftLabel, ni as getRemainingPlaces, nn as selectionConfirmationHint, nr as getTicketTypeLineMax, oi as groupPublicEventsByRun, ot as paymentChoiceDetails, pr as bookingPresentation, q as settledRemainingPlaces, ri as isEventFull, rn as selectionConsentLabel, sn as selectionItemsLabel, st as paymentChoicePrice, tn as selectionAtLimit, tr as getTicketSelectionTotal, un as selectionRowAvailability, vn as combinationOfferLine, xt as resolveFinishedPresentation, yn as combinationOffersOf, zn as occurrenceTitleOverride } from "./display-lL-YRApN.mjs";
|
|
4
|
+
import { fn as formatCurrencyAmount } from "./noop-CN0o0yjH.mjs";
|
|
4
5
|
import { S as formatCreditProductUnits, p as assertNever } from "./creditProducts-BTRX4edc.mjs";
|
|
5
|
-
import { c as NavigationHandOffPanel,
|
|
6
|
-
import { n as useBlockApi } from "./context-
|
|
7
|
-
import { a as getWaitlistClaimEntryIdFromUrl, i as eventRegistrationCheckoutReturnRequest, o as getWaitlistClaimTokenFromUrl, r as useEventRegistrationWizard, t as EventPaymentMount } from "./EventRegistrationPayment-
|
|
6
|
+
import { c as NavigationHandOffPanel, i as SiteTermsChangedNotice, l as DiscountCodeDisclosure, r as SiteTermsAgreementField, s as eventSiteTermsSurface, t as BookingConfirmation } from "./DemoBookingPortalAccess-CARUWQ_E.mjs";
|
|
7
|
+
import { n as useBlockApi } from "./context-D0KCgbOq.mjs";
|
|
8
|
+
import { a as getWaitlistClaimEntryIdFromUrl, i as eventRegistrationCheckoutReturnRequest, o as getWaitlistClaimTokenFromUrl, r as useEventRegistrationWizard, t as EventPaymentMount } from "./EventRegistrationPayment-DwMlJB2V.mjs";
|
|
8
9
|
import { l as SpinnerNode, r as ThemedButton } from "./ThemedButton-DuaYtnvG.mjs";
|
|
9
|
-
import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, n as BookingEntryBar, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-
|
|
10
|
+
import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, n as BookingEntryBar, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-CrSZCZn1.mjs";
|
|
10
11
|
import { t as createBodyThemePortalRoot } from "./themePortalRoot-DeP49PT8.mjs";
|
|
11
12
|
import { t as CheckboxChoice } from "./CheckboxChoice-b-PJLEXe.mjs";
|
|
12
13
|
import { t as CrossIcon } from "./CrossIcon-CpG9VRyW.mjs";
|
|
13
14
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
|
|
14
15
|
import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
|
|
15
|
-
import { i as useBookingNowIso } from "./BookingQuestionFields-
|
|
16
|
-
import { n as TerminalPanel, r as StateIcon } from "./useDiscountCodeUi-
|
|
16
|
+
import { i as useBookingNowIso } from "./BookingQuestionFields-BewbU_cV.mjs";
|
|
17
|
+
import { n as TerminalPanel, r as StateIcon } from "./useDiscountCodeUi-Cyy0meCH.mjs";
|
|
17
18
|
import { t as ModalShell } from "./ModalShell-B_fHWK71.mjs";
|
|
18
|
-
import { i as BookingConsentAgreement, l as PaymentChoiceRows, n as BookingQuestionSections, r as MagicLinkForm, t as BookingMailingListNote } from "./BookingMailingListNote-
|
|
19
|
+
import { i as BookingConsentAgreement, l as PaymentChoiceRows, n as BookingQuestionSections, r as MagicLinkForm, t as BookingMailingListNote } from "./BookingMailingListNote-LHQMODqB.mjs";
|
|
19
20
|
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-4o4_hl34.mjs";
|
|
20
21
|
import { t as createLucideIcon } from "./createLucideIcon-BrXgHVKN.mjs";
|
|
21
22
|
import React, { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
22
23
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
23
24
|
import { createPortal } from "react-dom";
|
|
25
|
+
//#region ../core/src/event-booking-offer.ts
|
|
26
|
+
/** Entitlements that can pay for the current scope and number of participants. */
|
|
27
|
+
function eventRegistrationEntitlementPolicy(input) {
|
|
28
|
+
return {
|
|
29
|
+
passes: input.participantCount === 1 && input.scope === "occurrence",
|
|
30
|
+
memberships: input.participantCount === 1
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
24
34
|
//#region ../core/src/number-input.ts
|
|
25
35
|
function clampToBounds(value, bounds) {
|
|
26
36
|
const floor = bounds.min ?? Number.NEGATIVE_INFINITY;
|
|
@@ -497,6 +507,58 @@ const ErrorStep = ({ message, onRetry, action = "retry", canJoinWaitlist = false
|
|
|
497
507
|
});
|
|
498
508
|
};
|
|
499
509
|
//#endregion
|
|
510
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/CopyParts.tsx
|
|
511
|
+
/** Copy with its bold parts in <strong>: offer lines and hints (issue 1725). */
|
|
512
|
+
function CopyParts(props) {
|
|
513
|
+
return /* @__PURE__ */ jsx(Fragment, { children: props.parts.map((part, index) => part.strong ? /* @__PURE__ */ jsx("strong", { children: part.text }, index) : /* @__PURE__ */ jsx(React.Fragment, { children: part.text }, index)) });
|
|
514
|
+
}
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/CombinationSummary.tsx
|
|
517
|
+
/** The usual total struck through, then what combination prices bring it to (issue 1725). */
|
|
518
|
+
function CombinationPricing(props) {
|
|
519
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
520
|
+
className: "er-summary-bar-pricing",
|
|
521
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
522
|
+
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
523
|
+
children: formatPrice$1(props.listCents, props.currency)
|
|
524
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
525
|
+
className: "er-summary-bar-price",
|
|
526
|
+
children: formatPrice$1(props.totalCents, props.currency)
|
|
527
|
+
})]
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
/** "4 dates for £40, plus 1 at £12 · You save £8" under the summary row. */
|
|
531
|
+
function CombinationDetail(props) {
|
|
532
|
+
if (!props.working) return null;
|
|
533
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
534
|
+
className: "er-combination-detail",
|
|
535
|
+
children: [
|
|
536
|
+
props.working.working,
|
|
537
|
+
" · ",
|
|
538
|
+
/* @__PURE__ */ jsx("span", {
|
|
539
|
+
className: "er-combination-saving",
|
|
540
|
+
children: props.working.saving
|
|
541
|
+
})
|
|
542
|
+
]
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
/** "Add 1 more date to get 4 dates for £40." under the summary bar. */
|
|
546
|
+
function CombinationHint(props) {
|
|
547
|
+
if (!props.parts) return null;
|
|
548
|
+
return /* @__PURE__ */ jsx("p", {
|
|
549
|
+
className: "er-combination-hint",
|
|
550
|
+
role: "status",
|
|
551
|
+
children: /* @__PURE__ */ jsx(CopyParts, { parts: props.parts })
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSummary.state.ts
|
|
556
|
+
/** Several course runs are one purchase; individual run names belong in the breakdown. */
|
|
557
|
+
function registrationSummaryTitle(input) {
|
|
558
|
+
if (input.severalItems === "runs") return (input.subject?.kind === "eventOffering" ? input.subject.title?.trim() : null) || "Your booking";
|
|
559
|
+
return occurrenceTitleOverride(input.occurrenceContext) ?? input.eventTitle ?? "";
|
|
560
|
+
}
|
|
561
|
+
//#endregion
|
|
500
562
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationSummaryBar.tsx
|
|
501
563
|
function productMethodFor(wizard) {
|
|
502
564
|
return isProductMethod(wizard.paymentSelection.method);
|
|
@@ -590,7 +652,7 @@ function EntitlementSummaryRow(props) {
|
|
|
590
652
|
children: props.copy.productPrice ? /* @__PURE__ */ jsx("span", {
|
|
591
653
|
className: "er-summary-bar-included",
|
|
592
654
|
children: props.copy.productPrice
|
|
593
|
-
}) : productPrice && productCurrency ? formatPrice(productPrice, productCurrency) : null
|
|
655
|
+
}) : productPrice && productCurrency ? formatPrice$1(productPrice, productCurrency) : null
|
|
594
656
|
})]
|
|
595
657
|
});
|
|
596
658
|
}
|
|
@@ -633,20 +695,27 @@ function PaymentProductRow(props) {
|
|
|
633
695
|
showPassEscape: canSwitchPass && wizard.paymentSelection.method === "pass"
|
|
634
696
|
});
|
|
635
697
|
}
|
|
698
|
+
/** "2 tickets" or "1 place"; booking several, "5 dates × 2 places" or the runs by name. */
|
|
699
|
+
function summaryCountLabel(wizard, summaryEvent) {
|
|
700
|
+
if (wizard.severalItems !== null) return selectionPlacesLabel(wizard.severalItems, wizard.selection, wizard.ticketsCount);
|
|
701
|
+
if (wizard.ticketsCount <= 0) return null;
|
|
702
|
+
const unit = summaryEvent && publicEventPricingStrategy(summaryEvent.pricing) === "tiered" ? "ticket" : "place";
|
|
703
|
+
return `${wizard.ticketsCount} ${unit}${wizard.ticketsCount === 1 ? "" : "s"}`;
|
|
704
|
+
}
|
|
636
705
|
/**
|
|
637
706
|
* The footer's one line (issue 1581): how many, the discount's name, then
|
|
638
707
|
* when. Ticket types are tickets; a single price, or a course, is places.
|
|
639
708
|
*/
|
|
640
709
|
function summaryMetaFacts(input) {
|
|
641
710
|
const { wizard, summaryEvent } = input;
|
|
642
|
-
const
|
|
711
|
+
const several = wizard.severalItems;
|
|
643
712
|
return {
|
|
644
|
-
countLabel: wizard
|
|
713
|
+
countLabel: summaryCountLabel(wizard, summaryEvent),
|
|
645
714
|
discount: input.discount && !productMethodFor(wizard) ? {
|
|
646
715
|
label: input.discount.publicLabel,
|
|
647
716
|
description: input.discount.description ?? null
|
|
648
717
|
} : null,
|
|
649
|
-
schedule: summaryEvent ? formatRegistrationSchedule(summaryEvent, wizard.occurrenceContext) : null
|
|
718
|
+
schedule: summaryEvent && several === null ? formatRegistrationSchedule(summaryEvent, wizard.occurrenceContext) : null
|
|
650
719
|
};
|
|
651
720
|
}
|
|
652
721
|
/** The panel's header already says when, so the panel hides the schedule. */
|
|
@@ -698,16 +767,116 @@ function DateStepSummary({ event }) {
|
|
|
698
767
|
}) : null]
|
|
699
768
|
});
|
|
700
769
|
}
|
|
770
|
+
/**
|
|
771
|
+
* A typed code replaces the automatic one. The automatic code is previewed
|
|
772
|
+
* against the first item only, so several items show none until checkout.
|
|
773
|
+
*/
|
|
774
|
+
function previewedAutoDiscount(wizard) {
|
|
775
|
+
if (wizard.discountCode.trim().length > 0 || wizard.severalItems !== null) return null;
|
|
776
|
+
return wizard.autoAppliedDiscount;
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Booking several (issue 1725): how many are ticked and their total. With
|
|
780
|
+
* combination prices the usual total is struck through above the planned
|
|
781
|
+
* one, with the working underneath and the next saving under the bar.
|
|
782
|
+
*/
|
|
783
|
+
function SeveralStepSummary({ wizard }) {
|
|
784
|
+
const several = wizard.severalItems;
|
|
785
|
+
const first = wizard.selectedEvent;
|
|
786
|
+
const { working, hint } = wizard.selectionCombination;
|
|
787
|
+
if (several === null || !first) return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateStepSummary, { event: first }), /* @__PURE__ */ jsx(CombinationHint, { parts: hint })] });
|
|
788
|
+
const currency = publicEventPricingCurrency(first.pricing);
|
|
789
|
+
const { totalCents: total, listTotalCents: list } = wizard.selectionPrice;
|
|
790
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
791
|
+
className: summaryBarClassName(working),
|
|
792
|
+
"data-step": "select-event",
|
|
793
|
+
children: [
|
|
794
|
+
/* @__PURE__ */ jsx("div", {
|
|
795
|
+
className: "er-summary-bar-info",
|
|
796
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
797
|
+
className: "er-summary-bar-meta",
|
|
798
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
799
|
+
className: "er-summary-bar-count",
|
|
800
|
+
children: selectionItemsLabel(several, wizard.selection)
|
|
801
|
+
})
|
|
802
|
+
})
|
|
803
|
+
}),
|
|
804
|
+
currency && total !== null && total > 0 ? working && list !== null ? /* @__PURE__ */ jsx(CombinationPricing, {
|
|
805
|
+
listCents: list,
|
|
806
|
+
totalCents: total,
|
|
807
|
+
currency
|
|
808
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
809
|
+
className: "er-summary-bar-pricing",
|
|
810
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
811
|
+
className: "er-summary-bar-price",
|
|
812
|
+
children: formatPrice$1(total, currency)
|
|
813
|
+
})
|
|
814
|
+
}) : null,
|
|
815
|
+
/* @__PURE__ */ jsx(CombinationDetail, { working })
|
|
816
|
+
]
|
|
817
|
+
}), /* @__PURE__ */ jsx(CombinationHint, { parts: hint })] });
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* The later steps' price for several items with combination prices: the
|
|
821
|
+
* usual total struck through, then what's due. The working shows while the
|
|
822
|
+
* planner's total stands; once the server prices a code, its total alone.
|
|
823
|
+
*/
|
|
824
|
+
function combinationSummary(wizard, subtotalCents) {
|
|
825
|
+
if (wizard.severalItems === null) return null;
|
|
826
|
+
const list = wizard.selectionPrice.listTotalCents;
|
|
827
|
+
const working = wizard.selectionCombination.working;
|
|
828
|
+
if (list === null || list <= subtotalCents || working === null && wizard.combinationCodeField === null) return null;
|
|
829
|
+
return {
|
|
830
|
+
list,
|
|
831
|
+
working: subtotalCents === wizard.selectionPrice.totalCents ? working : null
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
/** A deposit or instalment plan: the total, what's payable now, and what's left. */
|
|
835
|
+
function FlexibleBalancePricing(props) {
|
|
836
|
+
const { summary } = props;
|
|
837
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
838
|
+
summary.total ? /* @__PURE__ */ jsxs("div", {
|
|
839
|
+
className: "er-summary-bar-product-detail",
|
|
840
|
+
children: ["Total: ", summary.total]
|
|
841
|
+
}) : null,
|
|
842
|
+
/* @__PURE__ */ jsx("div", {
|
|
843
|
+
className: "er-summary-bar-price",
|
|
844
|
+
children: summary.dueToday ?? props.fallbackDueToday
|
|
845
|
+
}),
|
|
846
|
+
/* @__PURE__ */ jsx("div", {
|
|
847
|
+
className: "er-summary-bar-included",
|
|
848
|
+
children: "Payable now"
|
|
849
|
+
}),
|
|
850
|
+
summary.remainingBalance ? /* @__PURE__ */ jsxs("div", {
|
|
851
|
+
className: "er-summary-bar-product-detail",
|
|
852
|
+
children: [
|
|
853
|
+
"Remaining balance: ",
|
|
854
|
+
summary.remainingBalance,
|
|
855
|
+
summary.balanceDueBy ? ` due by ${summary.balanceDueBy}` : ""
|
|
856
|
+
]
|
|
857
|
+
}) : null,
|
|
858
|
+
summary.depositPolicy ? /* @__PURE__ */ jsxs("div", {
|
|
859
|
+
className: "er-summary-bar-product-detail",
|
|
860
|
+
children: ["Deposit: ", summary.depositPolicy]
|
|
861
|
+
}) : null
|
|
862
|
+
] });
|
|
863
|
+
}
|
|
864
|
+
function summaryBarClassName(working) {
|
|
865
|
+
return working ? "er-summary-bar er-summary-bar--combination" : "er-summary-bar";
|
|
866
|
+
}
|
|
701
867
|
function EventRegistrationSummaryBar(props) {
|
|
702
868
|
const { wizard } = props;
|
|
703
|
-
if (wizard.step === "select-event") return /* @__PURE__ */ jsx(
|
|
869
|
+
if (wizard.step === "select-event") return /* @__PURE__ */ jsx(SeveralStepSummary, { wizard });
|
|
704
870
|
const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
705
|
-
const summaryTitle =
|
|
871
|
+
const summaryTitle = registrationSummaryTitle({
|
|
872
|
+
...wizard,
|
|
873
|
+
eventTitle: summaryEvent?.title
|
|
874
|
+
});
|
|
706
875
|
const summaryCurrency = summaryEvent ? publicEventPricingCurrency(summaryEvent.pricing) : null;
|
|
707
876
|
const teamMemberNames = (summaryEvent?.teamMembers ?? []).map((teamMember) => teamMember.name).filter(Boolean);
|
|
708
877
|
const subtotalCents = wizard.ticketSelectionSubtotalCents;
|
|
709
878
|
if (!summaryTitle || !summaryCurrency || subtotalCents === null) return null;
|
|
710
|
-
const autoAppliedDiscount = wizard
|
|
879
|
+
const autoAppliedDiscount = previewedAutoDiscount(wizard);
|
|
711
880
|
const autoAppliedDiscountCents = Math.max(0, autoAppliedDiscount?.computedAmountCents ?? 0);
|
|
712
881
|
const discountedTotalCents = Math.max(0, subtotalCents - autoAppliedDiscountCents);
|
|
713
882
|
const flexibleBalanceSummary = getFlexibleBalanceSummary(getSelectedDirectPaymentOption(wizard));
|
|
@@ -718,76 +887,64 @@ function EventRegistrationSummaryBar(props) {
|
|
|
718
887
|
});
|
|
719
888
|
const productMethod = isProductMethod(wizard.paymentSelection.method);
|
|
720
889
|
const entitlementCopy = resolveEntitlementSummaryCopy(wizard.paymentSelection.method, getSelectedPassCreditsRemaining(wizard));
|
|
890
|
+
const combination = combinationSummary(wizard, subtotalCents);
|
|
891
|
+
const working = combination?.working ?? null;
|
|
721
892
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PaymentProductRow, {
|
|
722
893
|
wizard,
|
|
723
894
|
copy: entitlementCopy
|
|
724
895
|
}), /* @__PURE__ */ jsxs("div", {
|
|
725
|
-
className:
|
|
896
|
+
className: summaryBarClassName(working),
|
|
726
897
|
"data-step": wizard.step,
|
|
727
|
-
children: [
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
flexibleBalanceSummary.total ? /* @__PURE__ */ jsxs("div", {
|
|
750
|
-
className: "er-summary-bar-product-detail",
|
|
751
|
-
children: ["Total: ", flexibleBalanceSummary.total]
|
|
752
|
-
}) : null,
|
|
753
|
-
/* @__PURE__ */ jsx("div", {
|
|
754
|
-
className: "er-summary-bar-price",
|
|
755
|
-
children: flexibleBalanceSummary.dueToday ?? formatPrice(discountedTotalCents, summaryCurrency)
|
|
756
|
-
}),
|
|
757
|
-
/* @__PURE__ */ jsx("div", {
|
|
758
|
-
className: "er-summary-bar-included",
|
|
759
|
-
children: "Payable now"
|
|
760
|
-
}),
|
|
761
|
-
flexibleBalanceSummary.remainingBalance ? /* @__PURE__ */ jsxs("div", {
|
|
762
|
-
className: "er-summary-bar-product-detail",
|
|
763
|
-
children: [
|
|
764
|
-
"Remaining balance: ",
|
|
765
|
-
flexibleBalanceSummary.remainingBalance,
|
|
766
|
-
flexibleBalanceSummary.balanceDueBy ? ` due by ${flexibleBalanceSummary.balanceDueBy}` : ""
|
|
767
|
-
]
|
|
768
|
-
}) : null,
|
|
769
|
-
flexibleBalanceSummary.depositPolicy ? /* @__PURE__ */ jsxs("div", {
|
|
770
|
-
className: "er-summary-bar-product-detail",
|
|
771
|
-
children: ["Deposit: ", flexibleBalanceSummary.depositPolicy]
|
|
772
|
-
}) : null
|
|
773
|
-
] }) : autoAppliedDiscount && autoAppliedDiscountCents > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
774
|
-
/* @__PURE__ */ jsx("span", {
|
|
898
|
+
children: [
|
|
899
|
+
/* @__PURE__ */ jsxs("div", {
|
|
900
|
+
className: "er-summary-bar-info",
|
|
901
|
+
children: [
|
|
902
|
+
/* @__PURE__ */ jsx("h4", {
|
|
903
|
+
className: "er-summary-bar-event",
|
|
904
|
+
children: summaryTitle
|
|
905
|
+
}),
|
|
906
|
+
/* @__PURE__ */ jsx(SummaryMeta, { facts: meta }),
|
|
907
|
+
teamMemberNames.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
908
|
+
className: "er-summary-bar-meta",
|
|
909
|
+
children: ["Team: ", teamMemberNames.join(", ")]
|
|
910
|
+
})
|
|
911
|
+
]
|
|
912
|
+
}),
|
|
913
|
+
combination && subtotalCents > 0 ? /* @__PURE__ */ jsx(CombinationPricing, {
|
|
914
|
+
listCents: combination.list,
|
|
915
|
+
totalCents: subtotalCents,
|
|
916
|
+
currency: summaryCurrency
|
|
917
|
+
}) : subtotalCents > 0 && /* @__PURE__ */ jsx("div", {
|
|
918
|
+
className: "er-summary-bar-pricing",
|
|
919
|
+
children: productMethod ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
775
920
|
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
776
|
-
children: formatPrice(subtotalCents, summaryCurrency)
|
|
777
|
-
}),
|
|
778
|
-
|
|
921
|
+
children: formatPrice$1(subtotalCents, summaryCurrency)
|
|
922
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
923
|
+
className: "er-summary-bar-included",
|
|
924
|
+
children: entitlementCopy.pricingNote
|
|
925
|
+
})] }) : flexibleBalanceSummary ? /* @__PURE__ */ jsx(FlexibleBalancePricing, {
|
|
926
|
+
summary: flexibleBalanceSummary,
|
|
927
|
+
fallbackDueToday: formatPrice$1(discountedTotalCents, summaryCurrency)
|
|
928
|
+
}) : autoAppliedDiscount && autoAppliedDiscountCents > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
929
|
+
/* @__PURE__ */ jsx("span", {
|
|
930
|
+
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
931
|
+
children: formatPrice$1(subtotalCents, summaryCurrency)
|
|
932
|
+
}),
|
|
933
|
+
/* @__PURE__ */ jsx("span", {
|
|
934
|
+
className: "er-summary-bar-price",
|
|
935
|
+
children: formatPrice$1(discountedTotalCents, summaryCurrency)
|
|
936
|
+
}),
|
|
937
|
+
autoAppliedDiscount.description ? /* @__PURE__ */ jsx("div", {
|
|
938
|
+
className: "er-summary-bar-product-detail er-summary-bar-discount-detail",
|
|
939
|
+
children: autoAppliedDiscount.description
|
|
940
|
+
}) : null
|
|
941
|
+
] }) : /* @__PURE__ */ jsx("span", {
|
|
779
942
|
className: "er-summary-bar-price",
|
|
780
|
-
children: formatPrice(
|
|
781
|
-
})
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
}) : null
|
|
786
|
-
] }) : /* @__PURE__ */ jsx("span", {
|
|
787
|
-
className: "er-summary-bar-price",
|
|
788
|
-
children: formatPrice(subtotalCents, summaryCurrency)
|
|
789
|
-
})
|
|
790
|
-
})]
|
|
943
|
+
children: formatPrice$1(subtotalCents, summaryCurrency)
|
|
944
|
+
})
|
|
945
|
+
}),
|
|
946
|
+
/* @__PURE__ */ jsx(CombinationDetail, { working })
|
|
947
|
+
]
|
|
791
948
|
})] });
|
|
792
949
|
}
|
|
793
950
|
//#endregion
|
|
@@ -820,16 +977,17 @@ function resolveDetailsButtonText(input) {
|
|
|
820
977
|
*/
|
|
821
978
|
function SelectDateActions(props) {
|
|
822
979
|
const { wizard } = props;
|
|
823
|
-
|
|
980
|
+
const several = wizard.selectionMode.kind === "several";
|
|
981
|
+
if (!several && getEventSelectionMode(wizard.scopedEvents) !== "date") return null;
|
|
824
982
|
const chosen = wizard.selectedEvent;
|
|
825
983
|
return /* @__PURE__ */ jsx("div", {
|
|
826
984
|
className: "rb-wizard-actions er-actions",
|
|
827
985
|
children: /* @__PURE__ */ jsx(ThemedButton, {
|
|
828
986
|
type: "button",
|
|
829
|
-
onClick: () => {
|
|
987
|
+
onClick: several ? wizard.handleSelectionContinue : () => {
|
|
830
988
|
if (chosen) wizard.handleEventSelect(chosen);
|
|
831
989
|
},
|
|
832
|
-
disabled: !chosen,
|
|
990
|
+
disabled: several ? wizard.selection.length === 0 : !chosen,
|
|
833
991
|
variant: props.buttonVariant,
|
|
834
992
|
size: "md",
|
|
835
993
|
label: "Continue"
|
|
@@ -1106,7 +1264,7 @@ function PaymentBlockingPanel(props) {
|
|
|
1106
1264
|
if (!props.eligibility) return /* @__PURE__ */ jsx(MissingEligibilityPanel, {});
|
|
1107
1265
|
const availabilityPanel = renderRegistrationAvailabilityBlocker(props.admission);
|
|
1108
1266
|
if (availabilityPanel) return availabilityPanel;
|
|
1109
|
-
if (props.
|
|
1267
|
+
if (props.paysNothing) return /* @__PURE__ */ jsx(FreePaymentSummary, { ticketsCount: props.ticketsCount });
|
|
1110
1268
|
return props.eligibility.paymentOptions.length > 0 ? null : /* @__PURE__ */ jsx(IneligiblePaymentPanel, {
|
|
1111
1269
|
eligibility: props.eligibility,
|
|
1112
1270
|
email: props.email,
|
|
@@ -1188,298 +1346,122 @@ function summariseExistingBookings(registrations) {
|
|
|
1188
1346
|
};
|
|
1189
1347
|
}
|
|
1190
1348
|
//#endregion
|
|
1191
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
return events.reduce((groups, event) => {
|
|
1195
|
-
const key = formatBookingWhen(event, "monthYear");
|
|
1196
|
-
const last = groups[groups.length - 1];
|
|
1197
|
-
return last?.key === key ? [...groups.slice(0, -1), {
|
|
1198
|
-
...last,
|
|
1199
|
-
events: [...last.events, event]
|
|
1200
|
-
}] : [...groups, {
|
|
1201
|
-
key,
|
|
1202
|
-
label: formatBookingWhen(event, "month"),
|
|
1203
|
-
events: [event]
|
|
1204
|
-
}];
|
|
1205
|
-
}, []);
|
|
1349
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.tsx
|
|
1350
|
+
function pluralizeBookingUnit(kind, quantity) {
|
|
1351
|
+
return `${kind}${quantity === 1 ? "" : "s"}`;
|
|
1206
1352
|
}
|
|
1207
|
-
function
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1353
|
+
function getEventAttendanceModeLabel(mode) {
|
|
1354
|
+
switch (mode) {
|
|
1355
|
+
case "in_person": return "In person";
|
|
1356
|
+
case "online": return "Online";
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
function TicketCounter(props) {
|
|
1360
|
+
const { ticketsCount, maxAllowed, label, onTicketsChange } = props;
|
|
1361
|
+
const minAllowed = props.minAllowed ?? 1;
|
|
1362
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1363
|
+
className: "rb-reg-row er-row er-counter",
|
|
1364
|
+
children: [
|
|
1365
|
+
/* @__PURE__ */ jsx("button", {
|
|
1366
|
+
type: "button",
|
|
1367
|
+
"aria-label": `Decrease ${label}`,
|
|
1368
|
+
onClick: () => onTicketsChange(stepNumber(ticketsCount, -1, { min: minAllowed })),
|
|
1369
|
+
disabled: ticketsCount <= minAllowed,
|
|
1370
|
+
className: "er-counter-btn",
|
|
1371
|
+
children: "−"
|
|
1372
|
+
}),
|
|
1373
|
+
/* @__PURE__ */ jsx("span", {
|
|
1374
|
+
className: "er-counter-value",
|
|
1375
|
+
children: ticketsCount
|
|
1376
|
+
}),
|
|
1377
|
+
/* @__PURE__ */ jsx("button", {
|
|
1378
|
+
type: "button",
|
|
1379
|
+
"aria-label": `Increase ${label}`,
|
|
1380
|
+
onClick: () => onTicketsChange(stepNumber(ticketsCount, 1, { max: maxAllowed })),
|
|
1381
|
+
disabled: ticketsCount >= maxAllowed,
|
|
1382
|
+
className: "er-counter-btn",
|
|
1383
|
+
children: "+"
|
|
1384
|
+
})
|
|
1385
|
+
]
|
|
1213
1386
|
});
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1387
|
+
}
|
|
1388
|
+
function TicketCounterLimit(props) {
|
|
1389
|
+
const showBookingLimit = !props.availabilityLabel || props.maxAllowed < (props.availableSpots ?? Infinity);
|
|
1390
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
1391
|
+
className: "er-ticket-counter-limit",
|
|
1392
|
+
children: [props.availabilityLabel ? /* @__PURE__ */ jsx("span", { children: props.availabilityLabel }) : null, showBookingLimit ? /* @__PURE__ */ jsxs(Fragment, { children: [props.availabilityLabel ? /* @__PURE__ */ jsx("br", {}) : null, /* @__PURE__ */ jsxs("span", { children: [
|
|
1393
|
+
"Up to ",
|
|
1394
|
+
props.maxAllowed,
|
|
1395
|
+
" ",
|
|
1396
|
+
props.quantityLabel,
|
|
1397
|
+
" per booking."
|
|
1398
|
+
] })] }) : null]
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
function BookingUnitSessionHint(props) {
|
|
1402
|
+
const count = props.bookingUnit.includedSessionCount;
|
|
1403
|
+
return props.bookingUnit.kind === "place" && count && count > 1 ? /* @__PURE__ */ jsxs("p", {
|
|
1404
|
+
className: "er-text er-text--muted",
|
|
1405
|
+
children: [
|
|
1406
|
+
"Every place includes all ",
|
|
1407
|
+
count,
|
|
1408
|
+
" sessions."
|
|
1409
|
+
]
|
|
1410
|
+
}) : null;
|
|
1411
|
+
}
|
|
1412
|
+
function bookingQuantityLabel(unit, waitlist) {
|
|
1413
|
+
if (!waitlist) return pluralizeBookingUnit(unit, 2);
|
|
1414
|
+
return "waitlist places";
|
|
1415
|
+
}
|
|
1416
|
+
function BookingQuantityPrompt(props) {
|
|
1417
|
+
return /* @__PURE__ */ jsxs("h3", {
|
|
1418
|
+
tabIndex: -1,
|
|
1419
|
+
className: "er-title",
|
|
1420
|
+
children: [
|
|
1421
|
+
"How many ",
|
|
1422
|
+
bookingQuantityLabel(props.unit, props.waitlist),
|
|
1423
|
+
"?"
|
|
1424
|
+
]
|
|
1425
|
+
});
|
|
1426
|
+
}
|
|
1427
|
+
function SlidingScaleAmountField(props) {
|
|
1428
|
+
const id = props.id ?? "er-sliding-amount";
|
|
1429
|
+
const minLabel = formatPrice$1(props.slidingScale.minAmount, props.currency);
|
|
1430
|
+
const maxLabel = formatPrice$1(props.slidingScale.maxAmount, props.currency);
|
|
1431
|
+
const suggestedLabel = props.slidingScale.suggestedAmount !== null ? formatPrice$1(props.slidingScale.suggestedAmount, props.currency) : null;
|
|
1432
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1433
|
+
className: "er-field",
|
|
1221
1434
|
children: [
|
|
1435
|
+
/* @__PURE__ */ jsx("label", {
|
|
1436
|
+
htmlFor: id,
|
|
1437
|
+
className: "form-label",
|
|
1438
|
+
children: "Amount"
|
|
1439
|
+
}),
|
|
1222
1440
|
/* @__PURE__ */ jsx("input", {
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1441
|
+
id,
|
|
1442
|
+
type: "number",
|
|
1443
|
+
min: formatCentsAsCurrencyInput(props.slidingScale.minAmount),
|
|
1444
|
+
max: formatCentsAsCurrencyInput(props.slidingScale.maxAmount),
|
|
1445
|
+
step: "0.01",
|
|
1446
|
+
inputMode: "decimal",
|
|
1447
|
+
className: "form-input",
|
|
1448
|
+
value: props.value,
|
|
1449
|
+
onChange: (event) => props.onChange?.(event.target.value)
|
|
1229
1450
|
}),
|
|
1230
|
-
/* @__PURE__ */ jsxs("
|
|
1231
|
-
className: "er-
|
|
1232
|
-
children: [
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1451
|
+
/* @__PURE__ */ jsxs("p", {
|
|
1452
|
+
className: "er-text er-text--muted",
|
|
1453
|
+
children: [
|
|
1454
|
+
"Choose between ",
|
|
1455
|
+
minLabel,
|
|
1456
|
+
" and ",
|
|
1457
|
+
maxLabel,
|
|
1458
|
+
suggestedLabel ? `; suggested ${suggestedLabel}` : "",
|
|
1459
|
+
"."
|
|
1460
|
+
]
|
|
1239
1461
|
}),
|
|
1240
|
-
|
|
1241
|
-
className: "er-
|
|
1242
|
-
children:
|
|
1243
|
-
}) : null
|
|
1244
|
-
]
|
|
1245
|
-
});
|
|
1246
|
-
}
|
|
1247
|
-
/**
|
|
1248
|
-
* The date step (issue 1581): one radio row per date, grouped under month
|
|
1249
|
-
* labels when the dates span more than one month. Choosing a row selects it;
|
|
1250
|
-
* the footer's Continue moves on.
|
|
1251
|
-
*/
|
|
1252
|
-
function DateSelectionList(props) {
|
|
1253
|
-
const name = useId();
|
|
1254
|
-
const groups = groupByMonth(props.events);
|
|
1255
|
-
const showMonths = groups.length > 1;
|
|
1256
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1257
|
-
className: "er-date-list",
|
|
1258
|
-
role: "radiogroup",
|
|
1259
|
-
"aria-label": "Dates",
|
|
1260
|
-
children: groups.map((group) => /* @__PURE__ */ jsxs(React.Fragment, { children: [showMonths ? /* @__PURE__ */ jsx("p", {
|
|
1261
|
-
className: "er-date-list__month",
|
|
1262
|
-
"aria-hidden": "true",
|
|
1263
|
-
children: group.label
|
|
1264
|
-
}) : null, group.events.map((event) => /* @__PURE__ */ jsx(DateOption, {
|
|
1265
|
-
event,
|
|
1266
|
-
name,
|
|
1267
|
-
selected: props.selectedEvent?.selectionId === event.selectionId,
|
|
1268
|
-
display: props.display,
|
|
1269
|
-
onChoose: props.onChoose
|
|
1270
|
-
}, event.selectionId))] }, group.key))
|
|
1271
|
-
});
|
|
1272
|
-
}
|
|
1273
|
-
/**
|
|
1274
|
-
* Event Selection Step
|
|
1275
|
-
*
|
|
1276
|
-
* Displays a list of available events for the user to select from.
|
|
1277
|
-
* Shows venue and capacity information based on configuration.
|
|
1278
|
-
*/
|
|
1279
|
-
const EventSelectionStep = ({ events, selectedEvent, onSelect, onChoose, display }) => {
|
|
1280
|
-
if (getEventSelectionMode(events) === "date") return /* @__PURE__ */ jsxs("div", {
|
|
1281
|
-
className: "rb-reg-stack er-stack",
|
|
1282
|
-
children: [/* @__PURE__ */ jsx("h3", {
|
|
1283
|
-
tabIndex: -1,
|
|
1284
|
-
className: "er-title",
|
|
1285
|
-
children: "Choose a date"
|
|
1286
|
-
}), /* @__PURE__ */ jsx(DateSelectionList, {
|
|
1287
|
-
events: [...events].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt)),
|
|
1288
|
-
selectedEvent,
|
|
1289
|
-
display,
|
|
1290
|
-
onChoose
|
|
1291
|
-
})]
|
|
1292
|
-
});
|
|
1293
|
-
return /* @__PURE__ */ jsx(EventList, {
|
|
1294
|
-
events,
|
|
1295
|
-
selectedEvent,
|
|
1296
|
-
onSelect,
|
|
1297
|
-
display
|
|
1298
|
-
});
|
|
1299
|
-
};
|
|
1300
|
-
/** Unrelated events: one card each, and picking one moves on. */
|
|
1301
|
-
function EventList({ events, selectedEvent, onSelect, display }) {
|
|
1302
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1303
|
-
className: "rb-reg-stack er-stack",
|
|
1304
|
-
children: [/* @__PURE__ */ jsx("h3", {
|
|
1305
|
-
tabIndex: -1,
|
|
1306
|
-
className: "er-title",
|
|
1307
|
-
children: "Select an event"
|
|
1308
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1309
|
-
className: "er-event-grid",
|
|
1310
|
-
children: events.map((event) => /* @__PURE__ */ jsx(EventListCard, {
|
|
1311
|
-
event,
|
|
1312
|
-
selected: selectedEvent?.selectionId === event.selectionId,
|
|
1313
|
-
onSelect,
|
|
1314
|
-
display
|
|
1315
|
-
}, event.selectionId))
|
|
1316
|
-
})]
|
|
1317
|
-
});
|
|
1318
|
-
}
|
|
1319
|
-
/** Capacity and date/venue facts are decided once before the selection card renders. */
|
|
1320
|
-
function eventListCardPresentation(event, display, selected) {
|
|
1321
|
-
const remaining = getRemainingPlaces(selectMostOpenCapacitySource(event));
|
|
1322
|
-
const isSoldOut = isEventFull(event);
|
|
1323
|
-
const canJoinWaitlist = canJoinEventWaitlistOnAnyMode(event);
|
|
1324
|
-
const isLowCapacity = remaining.kind === "low";
|
|
1325
|
-
const capacityLabel = placesLeftLabel(event, display, { full: "Sold out" });
|
|
1326
|
-
const venue = shownVenue(event, display);
|
|
1327
|
-
return {
|
|
1328
|
-
cardClasses: ["er-event-card", selected && "er-event-card--selected"].filter(Boolean).join(" "),
|
|
1329
|
-
badgeClasses: [
|
|
1330
|
-
"er-capacity-badge",
|
|
1331
|
-
isSoldOut && "er-capacity-badge--soldout",
|
|
1332
|
-
isLowCapacity && "er-capacity-badge--low",
|
|
1333
|
-
(canJoinWaitlist || !isSoldOut && !isLowCapacity) && "er-capacity-badge--available"
|
|
1334
|
-
].filter(Boolean).join(" "),
|
|
1335
|
-
capacityLabel,
|
|
1336
|
-
venue,
|
|
1337
|
-
dateTime: `${formatDate(event.startsAt, event)}, ${formatTime(event.startsAt, event)}`
|
|
1338
|
-
};
|
|
1339
|
-
}
|
|
1340
|
-
function EventListCard({ event, selected, onSelect, display }) {
|
|
1341
|
-
const { cardClasses, badgeClasses, capacityLabel, venue, dateTime } = eventListCardPresentation(event, display, selected);
|
|
1342
|
-
return /* @__PURE__ */ jsx("button", {
|
|
1343
|
-
type: "button",
|
|
1344
|
-
onClick: () => onSelect(event),
|
|
1345
|
-
className: cardClasses,
|
|
1346
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
1347
|
-
className: "er-event-option",
|
|
1348
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1349
|
-
className: "er-event-option-main",
|
|
1350
|
-
children: [/* @__PURE__ */ jsx("h4", {
|
|
1351
|
-
className: "er-event-title",
|
|
1352
|
-
children: event.title
|
|
1353
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
1354
|
-
className: "er-text er-text--muted",
|
|
1355
|
-
children: [dateTime, venue && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1356
|
-
"aria-hidden": "true",
|
|
1357
|
-
children: " · "
|
|
1358
|
-
}), venue] })]
|
|
1359
|
-
})]
|
|
1360
|
-
}), capacityLabel && /* @__PURE__ */ jsx("span", {
|
|
1361
|
-
className: badgeClasses,
|
|
1362
|
-
children: capacityLabel
|
|
1363
|
-
})]
|
|
1364
|
-
})
|
|
1365
|
-
});
|
|
1366
|
-
}
|
|
1367
|
-
//#endregion
|
|
1368
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.tsx
|
|
1369
|
-
function pluralizeBookingUnit(kind, quantity) {
|
|
1370
|
-
return `${kind}${quantity === 1 ? "" : "s"}`;
|
|
1371
|
-
}
|
|
1372
|
-
function getEventAttendanceModeLabel(mode) {
|
|
1373
|
-
switch (mode) {
|
|
1374
|
-
case "in_person": return "In person";
|
|
1375
|
-
case "online": return "Online";
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
function TicketCounter(props) {
|
|
1379
|
-
const { ticketsCount, maxAllowed, label, onTicketsChange } = props;
|
|
1380
|
-
const minAllowed = props.minAllowed ?? 1;
|
|
1381
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1382
|
-
className: "rb-reg-row er-row er-counter",
|
|
1383
|
-
children: [
|
|
1384
|
-
/* @__PURE__ */ jsx("button", {
|
|
1385
|
-
type: "button",
|
|
1386
|
-
"aria-label": `Decrease ${label}`,
|
|
1387
|
-
onClick: () => onTicketsChange(stepNumber(ticketsCount, -1, { min: minAllowed })),
|
|
1388
|
-
disabled: ticketsCount <= minAllowed,
|
|
1389
|
-
className: "er-counter-btn",
|
|
1390
|
-
children: "−"
|
|
1391
|
-
}),
|
|
1392
|
-
/* @__PURE__ */ jsx("span", {
|
|
1393
|
-
className: "er-counter-value",
|
|
1394
|
-
children: ticketsCount
|
|
1395
|
-
}),
|
|
1396
|
-
/* @__PURE__ */ jsx("button", {
|
|
1397
|
-
type: "button",
|
|
1398
|
-
"aria-label": `Increase ${label}`,
|
|
1399
|
-
onClick: () => onTicketsChange(stepNumber(ticketsCount, 1, { max: maxAllowed })),
|
|
1400
|
-
disabled: ticketsCount >= maxAllowed,
|
|
1401
|
-
className: "er-counter-btn",
|
|
1402
|
-
children: "+"
|
|
1403
|
-
})
|
|
1404
|
-
]
|
|
1405
|
-
});
|
|
1406
|
-
}
|
|
1407
|
-
function TicketCounterLimit(props) {
|
|
1408
|
-
const showBookingLimit = !props.availabilityLabel || props.maxAllowed < (props.availableSpots ?? Infinity);
|
|
1409
|
-
return /* @__PURE__ */ jsxs("p", {
|
|
1410
|
-
className: "er-ticket-counter-limit",
|
|
1411
|
-
children: [props.availabilityLabel ? /* @__PURE__ */ jsx("span", { children: props.availabilityLabel }) : null, showBookingLimit ? /* @__PURE__ */ jsxs(Fragment, { children: [props.availabilityLabel ? /* @__PURE__ */ jsx("br", {}) : null, /* @__PURE__ */ jsxs("span", { children: [
|
|
1412
|
-
"Up to ",
|
|
1413
|
-
props.maxAllowed,
|
|
1414
|
-
" ",
|
|
1415
|
-
props.quantityLabel,
|
|
1416
|
-
" per booking."
|
|
1417
|
-
] })] }) : null]
|
|
1418
|
-
});
|
|
1419
|
-
}
|
|
1420
|
-
function BookingUnitSessionHint(props) {
|
|
1421
|
-
const count = props.bookingUnit.includedSessionCount;
|
|
1422
|
-
return props.bookingUnit.kind === "place" && count && count > 1 ? /* @__PURE__ */ jsxs("p", {
|
|
1423
|
-
className: "er-text er-text--muted",
|
|
1424
|
-
children: [
|
|
1425
|
-
"Every place includes all ",
|
|
1426
|
-
count,
|
|
1427
|
-
" sessions."
|
|
1428
|
-
]
|
|
1429
|
-
}) : null;
|
|
1430
|
-
}
|
|
1431
|
-
function bookingQuantityLabel(unit, waitlist) {
|
|
1432
|
-
if (!waitlist) return pluralizeBookingUnit(unit, 2);
|
|
1433
|
-
return "waitlist places";
|
|
1434
|
-
}
|
|
1435
|
-
function BookingQuantityPrompt(props) {
|
|
1436
|
-
return /* @__PURE__ */ jsxs("h3", {
|
|
1437
|
-
tabIndex: -1,
|
|
1438
|
-
className: "er-title",
|
|
1439
|
-
children: [
|
|
1440
|
-
"How many ",
|
|
1441
|
-
bookingQuantityLabel(props.unit, props.waitlist),
|
|
1442
|
-
"?"
|
|
1443
|
-
]
|
|
1444
|
-
});
|
|
1445
|
-
}
|
|
1446
|
-
function SlidingScaleAmountField(props) {
|
|
1447
|
-
const minLabel = formatPrice(props.slidingScale.minAmount, props.currency);
|
|
1448
|
-
const maxLabel = formatPrice(props.slidingScale.maxAmount, props.currency);
|
|
1449
|
-
const suggestedLabel = props.slidingScale.suggestedAmount !== null ? formatPrice(props.slidingScale.suggestedAmount, props.currency) : null;
|
|
1450
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1451
|
-
className: "er-field",
|
|
1452
|
-
children: [
|
|
1453
|
-
/* @__PURE__ */ jsx("label", {
|
|
1454
|
-
htmlFor: "er-sliding-amount",
|
|
1455
|
-
className: "form-label",
|
|
1456
|
-
children: "Amount"
|
|
1457
|
-
}),
|
|
1458
|
-
/* @__PURE__ */ jsx("input", {
|
|
1459
|
-
id: "er-sliding-amount",
|
|
1460
|
-
type: "number",
|
|
1461
|
-
min: formatCentsAsCurrencyInput(props.slidingScale.minAmount),
|
|
1462
|
-
max: formatCentsAsCurrencyInput(props.slidingScale.maxAmount),
|
|
1463
|
-
step: "0.01",
|
|
1464
|
-
inputMode: "decimal",
|
|
1465
|
-
className: "form-input",
|
|
1466
|
-
value: props.value,
|
|
1467
|
-
onChange: (event) => props.onChange?.(event.target.value)
|
|
1468
|
-
}),
|
|
1469
|
-
/* @__PURE__ */ jsxs("p", {
|
|
1470
|
-
className: "er-text er-text--muted",
|
|
1471
|
-
children: [
|
|
1472
|
-
"Choose between ",
|
|
1473
|
-
minLabel,
|
|
1474
|
-
" and ",
|
|
1475
|
-
maxLabel,
|
|
1476
|
-
suggestedLabel ? `; suggested ${suggestedLabel}` : "",
|
|
1477
|
-
"."
|
|
1478
|
-
]
|
|
1479
|
-
}),
|
|
1480
|
-
props.message ? /* @__PURE__ */ jsx("p", {
|
|
1481
|
-
className: "er-text er-text--muted",
|
|
1482
|
-
children: props.message
|
|
1462
|
+
props.message ? /* @__PURE__ */ jsx("p", {
|
|
1463
|
+
className: "er-text er-text--muted",
|
|
1464
|
+
children: props.message
|
|
1483
1465
|
}) : null
|
|
1484
1466
|
]
|
|
1485
1467
|
});
|
|
@@ -1502,7 +1484,7 @@ function TicketTypeQuantityRows(props) {
|
|
|
1502
1484
|
kind: "ticketType",
|
|
1503
1485
|
remaining: ticketType.availability.remainingPlaces
|
|
1504
1486
|
}, props.display);
|
|
1505
|
-
const priceLabel = ticketType.priceAmount > 0 ? formatPrice(ticketType.priceAmount, props.currency) : "Free";
|
|
1487
|
+
const priceLabel = ticketType.priceAmount > 0 ? formatPrice$1(ticketType.priceAmount, props.currency) : "Free";
|
|
1506
1488
|
const maxAllowed = getTicketTypeLineMax({
|
|
1507
1489
|
currentQuantity: quantity,
|
|
1508
1490
|
totalSelectedQuantity,
|
|
@@ -1589,29 +1571,37 @@ function getAttendanceModeDetail(attendanceMode, display) {
|
|
|
1589
1571
|
waitlist: "Currently full, waitlist available"
|
|
1590
1572
|
});
|
|
1591
1573
|
}
|
|
1574
|
+
/** One event's ways of attending, each with its places left. */
|
|
1575
|
+
function eventAttendanceModeTiles(attendanceModes, display) {
|
|
1576
|
+
return attendanceModes.map((attendanceMode) => ({
|
|
1577
|
+
mode: attendanceMode.mode,
|
|
1578
|
+
detail: getAttendanceModeDetail(attendanceMode, display)
|
|
1579
|
+
}));
|
|
1580
|
+
}
|
|
1581
|
+
/** The "How will you attend?" choice; several runs share it, so one choice covers them all. */
|
|
1592
1582
|
function AttendanceModeTiles(props) {
|
|
1593
1583
|
return /* @__PURE__ */ jsx("div", {
|
|
1594
1584
|
className: "er-payment-tiles",
|
|
1595
1585
|
role: "list",
|
|
1596
1586
|
"aria-label": "Attendance mode",
|
|
1597
|
-
children: props.
|
|
1598
|
-
const isSelected = props.selectedAttendanceMode ===
|
|
1587
|
+
children: props.tiles.map((tile) => {
|
|
1588
|
+
const isSelected = props.selectedAttendanceMode === tile.mode;
|
|
1599
1589
|
return /* @__PURE__ */ jsx("div", {
|
|
1600
1590
|
role: "listitem",
|
|
1601
1591
|
children: /* @__PURE__ */ jsxs("button", {
|
|
1602
1592
|
type: "button",
|
|
1603
1593
|
"aria-pressed": isSelected,
|
|
1604
1594
|
className: `er-payment-tile${isSelected ? " er-payment-tile--selected" : ""}`,
|
|
1605
|
-
onClick: () => props.onAttendanceModeChange?.(
|
|
1595
|
+
onClick: () => props.onAttendanceModeChange?.(tile.mode),
|
|
1606
1596
|
children: [/* @__PURE__ */ jsx("div", {
|
|
1607
1597
|
className: "er-payment-tile-label",
|
|
1608
|
-
children: getEventAttendanceModeLabel(
|
|
1598
|
+
children: getEventAttendanceModeLabel(tile.mode)
|
|
1609
1599
|
}), /* @__PURE__ */ jsx("div", {
|
|
1610
1600
|
className: "er-payment-tile-detail",
|
|
1611
|
-
children:
|
|
1601
|
+
children: tile.detail
|
|
1612
1602
|
})]
|
|
1613
1603
|
})
|
|
1614
|
-
},
|
|
1604
|
+
}, tile.mode);
|
|
1615
1605
|
})
|
|
1616
1606
|
});
|
|
1617
1607
|
}
|
|
@@ -1632,150 +1622,768 @@ function getTicketSelectionCapacity(event, attendanceMode, display) {
|
|
|
1632
1622
|
eventAvailabilityLabel: !canJoinWaitlist && source ? placesLeftLabel(source, display) : null
|
|
1633
1623
|
};
|
|
1634
1624
|
}
|
|
1635
|
-
/**
|
|
1636
|
-
* One price: the visitor is choosing places, not ticket types (issue 1581).
|
|
1637
|
-
* The ceiling comes from settled availability (`placeCountCeiling`); the
|
|
1638
|
-
* page's cached count is only shown, never enforced.
|
|
1639
|
-
*/
|
|
1640
|
-
function PlaceCounter(props) {
|
|
1641
|
-
const spots = props.waitlist ? null : props.availableSpots;
|
|
1642
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(BookingQuantityPrompt, {
|
|
1643
|
-
unit: "place",
|
|
1644
|
-
waitlist: props.waitlist
|
|
1645
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1646
|
-
className: "er-ticket-counter-group",
|
|
1647
|
-
children: [/* @__PURE__ */ jsx(TicketCounter, {
|
|
1648
|
-
ticketsCount: props.ticketsCount,
|
|
1649
|
-
maxAllowed: props.ceiling,
|
|
1650
|
-
label: bookingQuantityLabel("place", props.waitlist),
|
|
1651
|
-
onTicketsChange: props.onTicketsChange
|
|
1652
|
-
}), /* @__PURE__ */ jsx(TicketCounterLimit, {
|
|
1653
|
-
maxAllowed: props.ceiling,
|
|
1654
|
-
quantityLabel: props.waitlist ? bookingQuantityLabel("place", true) : pluralizeBookingUnit("place", props.ceiling),
|
|
1655
|
-
availableSpots: spots,
|
|
1656
|
-
availabilityLabel: props.availabilityLabel
|
|
1657
|
-
})]
|
|
1658
|
-
})] });
|
|
1625
|
+
/**
|
|
1626
|
+
* One price: the visitor is choosing places, not ticket types (issue 1581).
|
|
1627
|
+
* The ceiling comes from settled availability (`placeCountCeiling`); the
|
|
1628
|
+
* page's cached count is only shown, never enforced.
|
|
1629
|
+
*/
|
|
1630
|
+
function PlaceCounter(props) {
|
|
1631
|
+
const spots = props.waitlist ? null : props.availableSpots;
|
|
1632
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(BookingQuantityPrompt, {
|
|
1633
|
+
unit: "place",
|
|
1634
|
+
waitlist: props.waitlist
|
|
1635
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1636
|
+
className: "er-ticket-counter-group",
|
|
1637
|
+
children: [/* @__PURE__ */ jsx(TicketCounter, {
|
|
1638
|
+
ticketsCount: props.ticketsCount,
|
|
1639
|
+
maxAllowed: props.ceiling,
|
|
1640
|
+
label: bookingQuantityLabel("place", props.waitlist),
|
|
1641
|
+
onTicketsChange: props.onTicketsChange
|
|
1642
|
+
}), /* @__PURE__ */ jsx(TicketCounterLimit, {
|
|
1643
|
+
maxAllowed: props.ceiling,
|
|
1644
|
+
quantityLabel: props.waitlist ? bookingQuantityLabel("place", true) : pluralizeBookingUnit("place", props.ceiling),
|
|
1645
|
+
availableSpots: spots,
|
|
1646
|
+
availabilityLabel: props.availabilityLabel
|
|
1647
|
+
})]
|
|
1648
|
+
})] });
|
|
1649
|
+
}
|
|
1650
|
+
function SelectionNote({ text }) {
|
|
1651
|
+
return text ? /* @__PURE__ */ jsx("p", {
|
|
1652
|
+
className: "er-text er-text--muted",
|
|
1653
|
+
children: text
|
|
1654
|
+
}) : null;
|
|
1655
|
+
}
|
|
1656
|
+
/**
|
|
1657
|
+
* Ticket Selection Step
|
|
1658
|
+
*
|
|
1659
|
+
* Allows users to select how many tickets they want for the selected event.
|
|
1660
|
+
* Respects both max tickets per registration and available spots.
|
|
1661
|
+
*
|
|
1662
|
+
* Can use either a full PublicEvent or just occurrence context (when on event page).
|
|
1663
|
+
*/
|
|
1664
|
+
const TicketSelectionStep = ({ purpose, event, display, occurrenceContext: _occurrenceContext, selectedAttendanceMode = null, onAttendanceModeChange, ticketsCount, maxTickets, placesCeiling, visibleTicketTypes: visibleTicketTypesOverride, overallRemainingPlaces, heldPlacesBySelection, ticketSelections = [], onTicketSelectionsChange, slidingScale = null, selectedSlidingAmountInput = "", slidingScaleSelectionMessage = null, onSlidingAmountChange, onTicketsChange, bookingUnit = { kind: "ticket" }, selectionNote }) => {
|
|
1665
|
+
const unit = bookingUnit.kind;
|
|
1666
|
+
const deliveryMode = event?.deliveryMode ?? "in_person";
|
|
1667
|
+
const attendanceModes = event?.attendanceModes ?? [];
|
|
1668
|
+
const { availableSpots, isSoldOut, canJoinWaitlist, eventAvailabilityLabel } = getTicketSelectionCapacity(event, selectedAttendanceMode, display);
|
|
1669
|
+
const { mode: eventPricingMode, currency: eventPricingCurrency } = resolveTicketSelectionPricing(event);
|
|
1670
|
+
const usesTicketTypes = eventPricingMode === "tiered";
|
|
1671
|
+
const visibleTicketTypes = usesTicketTypes ? visibleTicketTypesOverride ?? getVisibleTicketTypes({
|
|
1672
|
+
event,
|
|
1673
|
+
eligibility: null,
|
|
1674
|
+
selectedAttendanceMode,
|
|
1675
|
+
ticketSelections
|
|
1676
|
+
}) : [];
|
|
1677
|
+
const noVisibleTicketTypes = usesTicketTypes && visibleTicketTypes.length === 0;
|
|
1678
|
+
const hasAvailableTicketTypes = usesTicketTypes && visibleTicketTypes.some((ticketType) => canRequestTicketOption(ticketType.availability, purpose));
|
|
1679
|
+
const maxAllowed = maxTickets;
|
|
1680
|
+
if (deliveryMode === "hybrid" && !selectedAttendanceMode) return /* @__PURE__ */ jsxs("div", {
|
|
1681
|
+
className: "rb-reg-stack er-stack",
|
|
1682
|
+
children: [
|
|
1683
|
+
/* @__PURE__ */ jsx("h3", {
|
|
1684
|
+
tabIndex: -1,
|
|
1685
|
+
className: "er-title",
|
|
1686
|
+
children: "How will you attend?"
|
|
1687
|
+
}),
|
|
1688
|
+
/* @__PURE__ */ jsx(AttendanceModeTiles, {
|
|
1689
|
+
tiles: eventAttendanceModeTiles(attendanceModes, display),
|
|
1690
|
+
selectedAttendanceMode: null,
|
|
1691
|
+
onAttendanceModeChange
|
|
1692
|
+
}),
|
|
1693
|
+
/* @__PURE__ */ jsx("p", {
|
|
1694
|
+
className: "er-text er-text--muted",
|
|
1695
|
+
children: "Choose whether you want to attend in person or online."
|
|
1696
|
+
})
|
|
1697
|
+
]
|
|
1698
|
+
});
|
|
1699
|
+
if (!eventPricingCurrency) return /* @__PURE__ */ jsx("div", {
|
|
1700
|
+
className: "rb-reg-stack er-stack",
|
|
1701
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1702
|
+
className: "er-text er-text--muted",
|
|
1703
|
+
children: "Pricing is unavailable for this event right now."
|
|
1704
|
+
})
|
|
1705
|
+
});
|
|
1706
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1707
|
+
className: "rb-reg-stack er-stack",
|
|
1708
|
+
children: [
|
|
1709
|
+
deliveryMode === "hybrid" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("h3", {
|
|
1710
|
+
tabIndex: -1,
|
|
1711
|
+
className: "er-title",
|
|
1712
|
+
children: "How will you attend?"
|
|
1713
|
+
}), /* @__PURE__ */ jsx(AttendanceModeTiles, {
|
|
1714
|
+
tiles: eventAttendanceModeTiles(attendanceModes, display),
|
|
1715
|
+
selectedAttendanceMode,
|
|
1716
|
+
onAttendanceModeChange
|
|
1717
|
+
})] }) : null,
|
|
1718
|
+
usesTicketTypes ? /* @__PURE__ */ jsx(Fragment, { children: noVisibleTicketTypes ? /* @__PURE__ */ jsx("p", {
|
|
1719
|
+
className: "er-text er-text--muted",
|
|
1720
|
+
children: "No ticket types are currently available."
|
|
1721
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1722
|
+
/* @__PURE__ */ jsxs("h3", {
|
|
1723
|
+
tabIndex: -1,
|
|
1724
|
+
className: "er-title",
|
|
1725
|
+
children: ["Choose ", unit === "place" ? "your places" : "tickets"]
|
|
1726
|
+
}),
|
|
1727
|
+
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
1728
|
+
/* @__PURE__ */ jsx(TicketTypeQuantityRows, {
|
|
1729
|
+
purpose,
|
|
1730
|
+
display,
|
|
1731
|
+
ticketTypes: visibleTicketTypes,
|
|
1732
|
+
ticketSelections,
|
|
1733
|
+
maxTickets,
|
|
1734
|
+
heldPlacesBySelection,
|
|
1735
|
+
availableSpots: resolveRemainingPlacesOverride(overallRemainingPlaces, availableSpots),
|
|
1736
|
+
availabilityLabel: eventAvailabilityLabel,
|
|
1737
|
+
currency: eventPricingCurrency,
|
|
1738
|
+
hasAvailableTicketTypes,
|
|
1739
|
+
onTicketSelectionsChange,
|
|
1740
|
+
bookingUnit: unit
|
|
1741
|
+
})
|
|
1742
|
+
] }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1743
|
+
slidingScale ? /* @__PURE__ */ jsx(SlidingScaleAmountField, {
|
|
1744
|
+
slidingScale,
|
|
1745
|
+
currency: eventPricingCurrency,
|
|
1746
|
+
value: selectedSlidingAmountInput,
|
|
1747
|
+
message: slidingScaleSelectionMessage,
|
|
1748
|
+
onChange: onSlidingAmountChange
|
|
1749
|
+
}) : null,
|
|
1750
|
+
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
1751
|
+
/* @__PURE__ */ jsx(PlaceCounter, {
|
|
1752
|
+
ticketsCount,
|
|
1753
|
+
ceiling: placesCeiling ?? maxAllowed,
|
|
1754
|
+
availableSpots,
|
|
1755
|
+
availabilityLabel: eventAvailabilityLabel,
|
|
1756
|
+
waitlist: canJoinWaitlist,
|
|
1757
|
+
onTicketsChange
|
|
1758
|
+
})
|
|
1759
|
+
] }),
|
|
1760
|
+
/* @__PURE__ */ jsx(SelectionNote, { text: selectionNote }),
|
|
1761
|
+
isSoldOut && !canJoinWaitlist && /* @__PURE__ */ jsx("p", {
|
|
1762
|
+
className: "er-text er-text--muted",
|
|
1763
|
+
children: "This event is fully booked."
|
|
1764
|
+
}),
|
|
1765
|
+
canJoinWaitlist && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("p", {
|
|
1766
|
+
className: "er-text er-text--muted",
|
|
1767
|
+
children: "This event is currently full. Continue to join the waitlist if a place opens up."
|
|
1768
|
+
}) })
|
|
1769
|
+
]
|
|
1770
|
+
});
|
|
1771
|
+
};
|
|
1772
|
+
function resolveRemainingPlacesOverride(override, cached) {
|
|
1773
|
+
return override === void 0 ? cached : override;
|
|
1774
|
+
}
|
|
1775
|
+
//#endregion
|
|
1776
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/SeveralRunsTicketStep.tsx
|
|
1777
|
+
/**
|
|
1778
|
+
* A run with ticket types: one ticket for every place on that run. A ticket
|
|
1779
|
+
* that can't cover them (sold out, too few left, or not offered for the
|
|
1780
|
+
* chosen way of attending) can't be picked, by the same rules a single
|
|
1781
|
+
* booking's tickets follow.
|
|
1782
|
+
*/
|
|
1783
|
+
function RunTicketTypeChoice({ run, name, choice, facts, onChange }) {
|
|
1784
|
+
if (run.pricing.kind !== "tiered") return null;
|
|
1785
|
+
const currency = run.pricing.currency;
|
|
1786
|
+
const rows = run.pricing.options.filter((option) => option.isActive).map((option) => {
|
|
1787
|
+
const usable = runChoiceUsable(run, {
|
|
1788
|
+
...choice,
|
|
1789
|
+
pricingOptionId: option.id
|
|
1790
|
+
}, facts);
|
|
1791
|
+
return {
|
|
1792
|
+
id: option.id,
|
|
1793
|
+
label: option.name,
|
|
1794
|
+
details: option.description ? [option.description] : [],
|
|
1795
|
+
price: option.priceAmount > 0 ? formatPrice$1(option.priceAmount, currency) : "Free",
|
|
1796
|
+
selected: choice.pricingOptionId === option.id,
|
|
1797
|
+
disabled: !usable,
|
|
1798
|
+
disabledReason: usable ? void 0 : "Not available",
|
|
1799
|
+
onSelect: () => onChange({
|
|
1800
|
+
...choice,
|
|
1801
|
+
pricingOptionId: option.id
|
|
1802
|
+
})
|
|
1803
|
+
};
|
|
1804
|
+
});
|
|
1805
|
+
return /* @__PURE__ */ jsx(PaymentChoiceRows, {
|
|
1806
|
+
label: `Ticket for ${name}`,
|
|
1807
|
+
rows
|
|
1808
|
+
});
|
|
1809
|
+
}
|
|
1810
|
+
/** A run with a sliding scale: the amount paid for each place on that run. */
|
|
1811
|
+
function RunSlidingAmount({ run, choice, onChange }) {
|
|
1812
|
+
if (run.pricing.kind !== "sliding_scale") return null;
|
|
1813
|
+
const inRange = runUnitPriceCents(run, choice) !== null;
|
|
1814
|
+
return /* @__PURE__ */ jsx(SlidingScaleAmountField, {
|
|
1815
|
+
id: `er-sliding-amount-${run.selectionId}`,
|
|
1816
|
+
slidingScale: {
|
|
1817
|
+
minAmount: run.pricing.minimum,
|
|
1818
|
+
maxAmount: run.pricing.maximum,
|
|
1819
|
+
suggestedAmount: run.pricing.suggested
|
|
1820
|
+
},
|
|
1821
|
+
currency: run.pricing.currency,
|
|
1822
|
+
value: choice.slidingAmountInput,
|
|
1823
|
+
message: inRange ? null : "Choose an amount within the sliding scale.",
|
|
1824
|
+
onChange: (slidingAmountInput) => onChange({
|
|
1825
|
+
...choice,
|
|
1826
|
+
slidingAmountInput
|
|
1827
|
+
})
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* One way of attending for every run: offered only where each run offers it,
|
|
1832
|
+
* and not asked when a run only runs one way.
|
|
1833
|
+
*/
|
|
1834
|
+
function SeveralRunsAttendance(props) {
|
|
1835
|
+
const { attendance } = props;
|
|
1836
|
+
if (attendance.kind !== "choose") return null;
|
|
1837
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1838
|
+
/* @__PURE__ */ jsx("h3", {
|
|
1839
|
+
tabIndex: -1,
|
|
1840
|
+
className: "er-title",
|
|
1841
|
+
children: "How will you attend?"
|
|
1842
|
+
}),
|
|
1843
|
+
/* @__PURE__ */ jsx(AttendanceModeTiles, {
|
|
1844
|
+
tiles: attendance.modes.map((mode) => ({
|
|
1845
|
+
mode,
|
|
1846
|
+
detail: null
|
|
1847
|
+
})),
|
|
1848
|
+
selectedAttendanceMode: props.selected,
|
|
1849
|
+
onAttendanceModeChange: props.onChange
|
|
1850
|
+
}),
|
|
1851
|
+
props.selected === null ? /* @__PURE__ */ jsx("p", {
|
|
1852
|
+
className: "er-text er-text--muted",
|
|
1853
|
+
children: "Choose whether you want to attend in person or online."
|
|
1854
|
+
}) : null
|
|
1855
|
+
] });
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* The tickets step when several runs are booked together (issue 1725): one
|
|
1859
|
+
* way of attending and one place count for them all, then a labelled section
|
|
1860
|
+
* for each run whose price needs a choice. A single-price run needs nothing here.
|
|
1861
|
+
*/
|
|
1862
|
+
function SeveralRunsTicketStep(props) {
|
|
1863
|
+
const { wizard } = props;
|
|
1864
|
+
const runs = wizard.selection;
|
|
1865
|
+
const choosing = runs.filter(runNeedsPricingChoice);
|
|
1866
|
+
if (!runs.every((run) => publicEventPricingCurrency(run.pricing) !== null)) return /* @__PURE__ */ jsx("p", {
|
|
1867
|
+
className: "er-text er-text--muted",
|
|
1868
|
+
children: "Pricing is unavailable for this event right now."
|
|
1869
|
+
});
|
|
1870
|
+
if (wizard.attendance.kind === "incompatible") return /* @__PURE__ */ jsx("p", {
|
|
1871
|
+
className: "er-text er-text--muted",
|
|
1872
|
+
children: INCOMPATIBLE_ATTENDANCE_MESSAGE
|
|
1873
|
+
});
|
|
1874
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1875
|
+
className: "rb-reg-stack er-stack",
|
|
1876
|
+
children: [
|
|
1877
|
+
/* @__PURE__ */ jsx(SeveralRunsAttendance, {
|
|
1878
|
+
attendance: wizard.attendance,
|
|
1879
|
+
selected: wizard.selectedAttendanceMode,
|
|
1880
|
+
onChange: wizard.setSelectedAttendanceMode
|
|
1881
|
+
}),
|
|
1882
|
+
/* @__PURE__ */ jsx(PlaceCounter, {
|
|
1883
|
+
ticketsCount: wizard.ticketsCount,
|
|
1884
|
+
ceiling: placeCountCeiling({
|
|
1885
|
+
maxAllowed: wizard.maxTicketsNum,
|
|
1886
|
+
admission: wizard.admission,
|
|
1887
|
+
settledRemaining: settledRemainingPlaces(wizard.eligibility)
|
|
1888
|
+
}),
|
|
1889
|
+
availableSpots: null,
|
|
1890
|
+
availabilityLabel: null,
|
|
1891
|
+
waitlist: false,
|
|
1892
|
+
onTicketsChange: wizard.setTicketsCount
|
|
1893
|
+
}),
|
|
1894
|
+
/* @__PURE__ */ jsx("p", {
|
|
1895
|
+
className: "er-text er-text--muted",
|
|
1896
|
+
children: selectionPlacesNote("runs", runs.length)
|
|
1897
|
+
}),
|
|
1898
|
+
choosing.map((run) => {
|
|
1899
|
+
const choice = runPricingChoice(wizard.runChoices, run);
|
|
1900
|
+
const onChange = (next) => wizard.setRunChoice(run, next);
|
|
1901
|
+
const name = selectionItemName(run, runs);
|
|
1902
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
1903
|
+
className: "er-run-pricing",
|
|
1904
|
+
"aria-label": name,
|
|
1905
|
+
children: [
|
|
1906
|
+
/* @__PURE__ */ jsx("h4", {
|
|
1907
|
+
className: "er-run-pricing__title",
|
|
1908
|
+
children: name
|
|
1909
|
+
}),
|
|
1910
|
+
/* @__PURE__ */ jsx(RunTicketTypeChoice, {
|
|
1911
|
+
run,
|
|
1912
|
+
name,
|
|
1913
|
+
choice,
|
|
1914
|
+
facts: wizard.runChoiceFacts,
|
|
1915
|
+
onChange
|
|
1916
|
+
}),
|
|
1917
|
+
/* @__PURE__ */ jsx(RunSlidingAmount, {
|
|
1918
|
+
run,
|
|
1919
|
+
name,
|
|
1920
|
+
choice,
|
|
1921
|
+
facts: wizard.runChoiceFacts,
|
|
1922
|
+
onChange
|
|
1923
|
+
})
|
|
1924
|
+
]
|
|
1925
|
+
}, run.selectionId);
|
|
1926
|
+
})
|
|
1927
|
+
]
|
|
1928
|
+
});
|
|
1929
|
+
}
|
|
1930
|
+
//#endregion
|
|
1931
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/SelectionPaymentSummary.tsx
|
|
1932
|
+
/** Pence always show here ("£36.00"), so whole and part pounds line up in the list. */
|
|
1933
|
+
function formatPrice(cents, currency) {
|
|
1934
|
+
return formatCurrencyAmount(cents, currency);
|
|
1935
|
+
}
|
|
1936
|
+
function Rows(props) {
|
|
1937
|
+
return props.rows.map((row) => /* @__PURE__ */ jsxs("div", {
|
|
1938
|
+
className: "er-confirmation-summary__row",
|
|
1939
|
+
children: [/* @__PURE__ */ jsx("dt", { children: row.label }), /* @__PURE__ */ jsx("dd", { children: row.value })]
|
|
1940
|
+
}, row.key));
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
* Several items with combination prices (issue 1725): each combination's
|
|
1944
|
+
* items under its name with what each now costs, the rest "At the usual
|
|
1945
|
+
* price", then the places, any code, the total and the saving.
|
|
1946
|
+
*/
|
|
1947
|
+
function CombinedSummary(props) {
|
|
1948
|
+
const { summary, currency } = props;
|
|
1949
|
+
const money = (cents) => formatPrice(cents, currency);
|
|
1950
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1951
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1952
|
+
className: "er-confirmation-summary er-selection-payment",
|
|
1953
|
+
children: [summary.groups.map((group) => /* @__PURE__ */ jsxs(React.Fragment, { children: [group.heading ? /* @__PURE__ */ jsx("p", {
|
|
1954
|
+
className: "er-selection-payment__group",
|
|
1955
|
+
children: group.heading
|
|
1956
|
+
}) : null, /* @__PURE__ */ jsx("dl", {
|
|
1957
|
+
className: "er-selection-payment__lines",
|
|
1958
|
+
children: /* @__PURE__ */ jsx(Rows, { rows: group.lines.map((line) => ({
|
|
1959
|
+
key: line.key,
|
|
1960
|
+
label: line.label,
|
|
1961
|
+
value: money(line.amountCents)
|
|
1962
|
+
})) })
|
|
1963
|
+
})] }, group.key)), /* @__PURE__ */ jsx("dl", {
|
|
1964
|
+
className: "er-selection-payment__lines er-selection-payment__totals",
|
|
1965
|
+
children: /* @__PURE__ */ jsx(Rows, { rows: [
|
|
1966
|
+
{
|
|
1967
|
+
key: "places",
|
|
1968
|
+
label: summary.placesLabel,
|
|
1969
|
+
value: money(summary.subtotalCents)
|
|
1970
|
+
},
|
|
1971
|
+
...summary.reductions.map((row) => ({
|
|
1972
|
+
key: row.key,
|
|
1973
|
+
label: row.label,
|
|
1974
|
+
value: `−${money(row.amountCents)}`
|
|
1975
|
+
})),
|
|
1976
|
+
{
|
|
1977
|
+
key: "total",
|
|
1978
|
+
label: "Total",
|
|
1979
|
+
value: money(summary.totalCents)
|
|
1980
|
+
}
|
|
1981
|
+
] })
|
|
1982
|
+
})]
|
|
1983
|
+
}),
|
|
1984
|
+
summary.note ? /* @__PURE__ */ jsx("p", {
|
|
1985
|
+
className: "er-combination-note",
|
|
1986
|
+
role: "status",
|
|
1987
|
+
children: summary.note
|
|
1988
|
+
}) : null,
|
|
1989
|
+
summary.savingCents !== null ? /* @__PURE__ */ jsxs("p", {
|
|
1990
|
+
className: "er-combination-saving",
|
|
1991
|
+
children: ["You save ", money(summary.savingCents)]
|
|
1992
|
+
}) : null
|
|
1993
|
+
] });
|
|
1994
|
+
}
|
|
1995
|
+
/**
|
|
1996
|
+
* What several items cost, above the payment choice (issue 1725): each item
|
|
1997
|
+
* at its price for one place, the places on each, then the total; grouped by
|
|
1998
|
+
* combination when combination prices apply.
|
|
1999
|
+
*/
|
|
2000
|
+
function SelectionPaymentSummary(props) {
|
|
2001
|
+
const { summary, currency } = props;
|
|
2002
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2003
|
+
className: "rb-reg-stack er-stack er-selection-payment-summary",
|
|
2004
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
2005
|
+
tabIndex: -1,
|
|
2006
|
+
className: "er-title",
|
|
2007
|
+
children: "Your booking"
|
|
2008
|
+
}), summary.kind === "combined" ? /* @__PURE__ */ jsx(CombinedSummary, {
|
|
2009
|
+
summary,
|
|
2010
|
+
currency
|
|
2011
|
+
}) : /* @__PURE__ */ jsx("dl", {
|
|
2012
|
+
className: "er-confirmation-summary er-selection-payment",
|
|
2013
|
+
children: /* @__PURE__ */ jsx(Rows, { rows: [
|
|
2014
|
+
...summary.lines.map((line) => ({
|
|
2015
|
+
key: line.key,
|
|
2016
|
+
label: line.label,
|
|
2017
|
+
value: formatPrice(line.amountCents, currency)
|
|
2018
|
+
})),
|
|
2019
|
+
{
|
|
2020
|
+
key: "places",
|
|
2021
|
+
label: summary.placesLabel,
|
|
2022
|
+
value: formatPrice(summary.subtotalCents, currency)
|
|
2023
|
+
},
|
|
2024
|
+
...summary.reductions.map((row) => ({
|
|
2025
|
+
key: row.key,
|
|
2026
|
+
label: row.label,
|
|
2027
|
+
value: `−${formatPrice(row.amountCents, currency)}`
|
|
2028
|
+
})),
|
|
2029
|
+
{
|
|
2030
|
+
key: "total",
|
|
2031
|
+
label: "Total",
|
|
2032
|
+
value: formatPrice(summary.totalCents, currency)
|
|
2033
|
+
}
|
|
2034
|
+
] })
|
|
2035
|
+
})]
|
|
2036
|
+
});
|
|
2037
|
+
}
|
|
2038
|
+
//#endregion
|
|
2039
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/EventSelectionStep.tsx
|
|
2040
|
+
/** Dates in order, grouped by the month and year they fall in, both in the date's own zone. */
|
|
2041
|
+
function groupByMonth(events) {
|
|
2042
|
+
return events.reduce((groups, event) => {
|
|
2043
|
+
const key = formatBookingWhen(event, "monthYear");
|
|
2044
|
+
const last = groups[groups.length - 1];
|
|
2045
|
+
return last?.key === key ? [...groups.slice(0, -1), {
|
|
2046
|
+
...last,
|
|
2047
|
+
events: [...last.events, event]
|
|
2048
|
+
}] : [...groups, {
|
|
2049
|
+
key,
|
|
2050
|
+
label: formatBookingWhen(event, "month"),
|
|
2051
|
+
events: [event]
|
|
2052
|
+
}];
|
|
2053
|
+
}, []);
|
|
2054
|
+
}
|
|
2055
|
+
function DateOption(props) {
|
|
2056
|
+
const { event } = props;
|
|
2057
|
+
const full = isEventFull(event) && !canJoinEventWaitlistOnAnyMode(event);
|
|
2058
|
+
const places = placesLeftLabel(event, props.display, {
|
|
2059
|
+
compact: true,
|
|
2060
|
+
full: "Full"
|
|
2061
|
+
});
|
|
2062
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
2063
|
+
className: [
|
|
2064
|
+
"er-event-card",
|
|
2065
|
+
"er-date-option",
|
|
2066
|
+
props.selected && "er-event-card--selected",
|
|
2067
|
+
full && "er-date-option--full"
|
|
2068
|
+
].filter(Boolean).join(" "),
|
|
2069
|
+
children: [
|
|
2070
|
+
/* @__PURE__ */ jsx("input", {
|
|
2071
|
+
type: "radio",
|
|
2072
|
+
className: "er-date-option__radio",
|
|
2073
|
+
name: props.name,
|
|
2074
|
+
value: event.selectionId,
|
|
2075
|
+
checked: props.selected,
|
|
2076
|
+
onChange: () => props.onChoose(event)
|
|
2077
|
+
}),
|
|
2078
|
+
/* @__PURE__ */ jsxs("span", {
|
|
2079
|
+
className: "er-date-option__main",
|
|
2080
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2081
|
+
className: "er-date-option__date",
|
|
2082
|
+
children: formatBookingWhen(event, "dayLong")
|
|
2083
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2084
|
+
className: "er-date-option__time",
|
|
2085
|
+
children: formatBookingWhen(event, "timeRange")
|
|
2086
|
+
})]
|
|
2087
|
+
}),
|
|
2088
|
+
places ? /* @__PURE__ */ jsx("span", {
|
|
2089
|
+
className: "er-date-option__places",
|
|
2090
|
+
children: places
|
|
2091
|
+
}) : null
|
|
2092
|
+
]
|
|
2093
|
+
});
|
|
2094
|
+
}
|
|
2095
|
+
/**
|
|
2096
|
+
* The date step (issue 1581): one radio row per date, grouped under month
|
|
2097
|
+
* labels when the dates span more than one month. Choosing a row selects it;
|
|
2098
|
+
* the footer's Continue moves on.
|
|
2099
|
+
*/
|
|
2100
|
+
function DateSelectionList(props) {
|
|
2101
|
+
const name = useId();
|
|
2102
|
+
const groups = groupByMonth(props.events);
|
|
2103
|
+
const showMonths = groups.length > 1;
|
|
2104
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2105
|
+
className: "er-date-list",
|
|
2106
|
+
role: "radiogroup",
|
|
2107
|
+
"aria-label": "Dates",
|
|
2108
|
+
children: groups.map((group) => /* @__PURE__ */ jsxs(React.Fragment, { children: [showMonths ? /* @__PURE__ */ jsx("p", {
|
|
2109
|
+
className: "er-date-list__month",
|
|
2110
|
+
"aria-hidden": "true",
|
|
2111
|
+
children: group.label
|
|
2112
|
+
}) : null, group.events.map((event) => /* @__PURE__ */ jsx(DateOption, {
|
|
2113
|
+
event,
|
|
2114
|
+
name,
|
|
2115
|
+
selected: props.selectedEvent?.selectionId === event.selectionId,
|
|
2116
|
+
display: props.display,
|
|
2117
|
+
onChoose: props.onChoose
|
|
2118
|
+
}, event.selectionId))] }, group.key))
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2121
|
+
/**
|
|
2122
|
+
* Event Selection Step
|
|
2123
|
+
*
|
|
2124
|
+
* Displays a list of available events for the user to select from.
|
|
2125
|
+
* Shows venue and capacity information based on configuration.
|
|
2126
|
+
*/
|
|
2127
|
+
const EventSelectionStep = (props) => {
|
|
2128
|
+
const { events, selectedEvent, onSelect, onChoose, display } = props;
|
|
2129
|
+
if ("selection" in props) return /* @__PURE__ */ jsx(SeveralSelection, {
|
|
2130
|
+
items: props.mode.items,
|
|
2131
|
+
events,
|
|
2132
|
+
selection: props.selection,
|
|
2133
|
+
display,
|
|
2134
|
+
onToggle: props.onToggle,
|
|
2135
|
+
onJoinWaitlist: props.onJoinWaitlist
|
|
2136
|
+
});
|
|
2137
|
+
if (getEventSelectionMode(events) === "date") return /* @__PURE__ */ jsxs("div", {
|
|
2138
|
+
className: "rb-reg-stack er-stack",
|
|
2139
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
2140
|
+
tabIndex: -1,
|
|
2141
|
+
className: "er-title",
|
|
2142
|
+
children: "Choose a date"
|
|
2143
|
+
}), /* @__PURE__ */ jsx(DateSelectionList, {
|
|
2144
|
+
events: [...events].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt)),
|
|
2145
|
+
selectedEvent,
|
|
2146
|
+
display,
|
|
2147
|
+
onChoose
|
|
2148
|
+
})]
|
|
2149
|
+
});
|
|
2150
|
+
return /* @__PURE__ */ jsx(EventList, {
|
|
2151
|
+
events,
|
|
2152
|
+
selectedEvent,
|
|
2153
|
+
onSelect,
|
|
2154
|
+
display
|
|
2155
|
+
});
|
|
2156
|
+
};
|
|
2157
|
+
/** Unrelated events: one card each, and picking one moves on. */
|
|
2158
|
+
function EventList({ events, selectedEvent, onSelect, display }) {
|
|
2159
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2160
|
+
className: "rb-reg-stack er-stack",
|
|
2161
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
2162
|
+
tabIndex: -1,
|
|
2163
|
+
className: "er-title",
|
|
2164
|
+
children: "Select an event"
|
|
2165
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
2166
|
+
className: "er-event-grid",
|
|
2167
|
+
children: events.map((event) => /* @__PURE__ */ jsx(EventListCard, {
|
|
2168
|
+
event,
|
|
2169
|
+
selected: selectedEvent?.selectionId === event.selectionId,
|
|
2170
|
+
onSelect,
|
|
2171
|
+
display
|
|
2172
|
+
}, event.selectionId))
|
|
2173
|
+
})]
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
/** Capacity and date/venue facts are decided once before the selection card renders. */
|
|
2177
|
+
function eventListCardPresentation(event, display, selected) {
|
|
2178
|
+
const remaining = getRemainingPlaces(selectMostOpenCapacitySource(event));
|
|
2179
|
+
const isSoldOut = isEventFull(event);
|
|
2180
|
+
const canJoinWaitlist = canJoinEventWaitlistOnAnyMode(event);
|
|
2181
|
+
const isLowCapacity = remaining.kind === "low";
|
|
2182
|
+
const capacityLabel = placesLeftLabel(event, display, { full: "Sold out" });
|
|
2183
|
+
const venue = shownVenue(event, display);
|
|
2184
|
+
return {
|
|
2185
|
+
cardClasses: ["er-event-card", selected && "er-event-card--selected"].filter(Boolean).join(" "),
|
|
2186
|
+
badgeClasses: [
|
|
2187
|
+
"er-capacity-badge",
|
|
2188
|
+
isSoldOut && "er-capacity-badge--soldout",
|
|
2189
|
+
isLowCapacity && "er-capacity-badge--low",
|
|
2190
|
+
(canJoinWaitlist || !isSoldOut && !isLowCapacity) && "er-capacity-badge--available"
|
|
2191
|
+
].filter(Boolean).join(" "),
|
|
2192
|
+
capacityLabel,
|
|
2193
|
+
venue,
|
|
2194
|
+
dateTime: `${formatDate(event.startsAt, event)}, ${formatTime(event.startsAt, event)}`
|
|
2195
|
+
};
|
|
2196
|
+
}
|
|
2197
|
+
function EventListCard({ event, selected, onSelect, display }) {
|
|
2198
|
+
const { cardClasses, badgeClasses, capacityLabel, venue, dateTime } = eventListCardPresentation(event, display, selected);
|
|
2199
|
+
return /* @__PURE__ */ jsx("button", {
|
|
2200
|
+
type: "button",
|
|
2201
|
+
onClick: () => onSelect(event),
|
|
2202
|
+
className: cardClasses,
|
|
2203
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2204
|
+
className: "er-event-option",
|
|
2205
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
2206
|
+
className: "er-event-option-main",
|
|
2207
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
2208
|
+
className: "er-event-title",
|
|
2209
|
+
children: event.title
|
|
2210
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
2211
|
+
className: "er-text er-text--muted",
|
|
2212
|
+
children: [dateTime, venue && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
2213
|
+
"aria-hidden": "true",
|
|
2214
|
+
children: " · "
|
|
2215
|
+
}), venue] })]
|
|
2216
|
+
})]
|
|
2217
|
+
}), capacityLabel && /* @__PURE__ */ jsx("span", {
|
|
2218
|
+
className: badgeClasses,
|
|
2219
|
+
children: capacityLabel
|
|
2220
|
+
})]
|
|
2221
|
+
})
|
|
2222
|
+
});
|
|
1659
2223
|
}
|
|
2224
|
+
const SEVERAL_HEADINGS = {
|
|
2225
|
+
dates: {
|
|
2226
|
+
title: "Choose dates",
|
|
2227
|
+
lede: "Pick one date, or several.",
|
|
2228
|
+
label: "Dates"
|
|
2229
|
+
},
|
|
2230
|
+
runs: {
|
|
2231
|
+
title: "Choose what to book",
|
|
2232
|
+
lede: "Book one, or book them together.",
|
|
2233
|
+
label: "What to book"
|
|
2234
|
+
}
|
|
2235
|
+
};
|
|
1660
2236
|
/**
|
|
1661
|
-
*
|
|
1662
|
-
*
|
|
1663
|
-
* Allows users to select how many tickets they want for the selected event.
|
|
1664
|
-
* Respects both max tickets per registration and available spots.
|
|
1665
|
-
*
|
|
1666
|
-
* Can use either a full PublicEvent or just occurrence context (when on event page).
|
|
2237
|
+
* Booking several (issue 1725): one checkbox row per date or run. A full row
|
|
2238
|
+
* can't be ticked; when it has a waitlist, its link books that one item.
|
|
1667
2239
|
*/
|
|
1668
|
-
|
|
1669
|
-
const
|
|
1670
|
-
const
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
selectedAttendanceMode,
|
|
1679
|
-
ticketSelections
|
|
1680
|
-
}) : [];
|
|
1681
|
-
const noVisibleTicketTypes = usesTicketTypes && visibleTicketTypes.length === 0;
|
|
1682
|
-
const hasAvailableTicketTypes = usesTicketTypes && visibleTicketTypes.some((ticketType) => canRequestTicketOption(ticketType.availability, purpose));
|
|
1683
|
-
const maxAllowed = maxTickets;
|
|
1684
|
-
if (deliveryMode === "hybrid" && !selectedAttendanceMode) return /* @__PURE__ */ jsxs("div", {
|
|
2240
|
+
function SeveralSelection(props) {
|
|
2241
|
+
const heading = SEVERAL_HEADINGS[props.items];
|
|
2242
|
+
const sorted = [...props.events].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
|
|
2243
|
+
const groups = props.items === "dates" ? groupByMonth(sorted) : [{
|
|
2244
|
+
key: "runs",
|
|
2245
|
+
label: "",
|
|
2246
|
+
events: sorted
|
|
2247
|
+
}];
|
|
2248
|
+
const showMonths = groups.length > 1;
|
|
2249
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1685
2250
|
className: "rb-reg-stack er-stack",
|
|
1686
2251
|
children: [
|
|
1687
2252
|
/* @__PURE__ */ jsx("h3", {
|
|
1688
2253
|
tabIndex: -1,
|
|
1689
2254
|
className: "er-title",
|
|
1690
|
-
children:
|
|
1691
|
-
}),
|
|
1692
|
-
/* @__PURE__ */ jsx(AttendanceModeTiles, {
|
|
1693
|
-
display,
|
|
1694
|
-
attendanceModes,
|
|
1695
|
-
selectedAttendanceMode: null,
|
|
1696
|
-
onAttendanceModeChange
|
|
2255
|
+
children: heading.title
|
|
1697
2256
|
}),
|
|
1698
2257
|
/* @__PURE__ */ jsx("p", {
|
|
2258
|
+
className: "er-text er-text--muted er-selection-lede",
|
|
2259
|
+
children: heading.lede
|
|
2260
|
+
}),
|
|
2261
|
+
/* @__PURE__ */ jsx(CombinationOfferLine, { parts: combinationOfferLine(combinationOffersOf(props.events)) }),
|
|
2262
|
+
/* @__PURE__ */ jsx("div", {
|
|
2263
|
+
className: "er-date-list",
|
|
2264
|
+
role: "group",
|
|
2265
|
+
"aria-label": heading.label,
|
|
2266
|
+
children: groups.map((group) => /* @__PURE__ */ jsxs(React.Fragment, { children: [showMonths ? /* @__PURE__ */ jsx("p", {
|
|
2267
|
+
className: "er-date-list__month",
|
|
2268
|
+
"aria-hidden": "true",
|
|
2269
|
+
children: group.label
|
|
2270
|
+
}) : null, group.events.map((event) => /* @__PURE__ */ jsx(SeveralOption, {
|
|
2271
|
+
items: props.items,
|
|
2272
|
+
event,
|
|
2273
|
+
checked: selectionIncludes(props.selection, event),
|
|
2274
|
+
canToggle: canToggleSelectionItem(props.selection, event),
|
|
2275
|
+
display: props.display,
|
|
2276
|
+
onToggle: props.onToggle,
|
|
2277
|
+
onJoinWaitlist: props.onJoinWaitlist
|
|
2278
|
+
}, event.selectionId))] }, group.key))
|
|
2279
|
+
}),
|
|
2280
|
+
selectionAtLimit(props.selection) ? /* @__PURE__ */ jsx("p", {
|
|
1699
2281
|
className: "er-text er-text--muted",
|
|
1700
|
-
|
|
1701
|
-
|
|
2282
|
+
role: "status",
|
|
2283
|
+
children: SELECTION_LIMIT_NOTE
|
|
2284
|
+
}) : null
|
|
1702
2285
|
]
|
|
1703
2286
|
});
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
2287
|
+
}
|
|
2288
|
+
/** "Book any 4 dates for £40, or any 8 dates for £75." above the list, when the page has combination prices. */
|
|
2289
|
+
function CombinationOfferLine(props) {
|
|
2290
|
+
if (!props.parts) return null;
|
|
2291
|
+
return /* @__PURE__ */ jsx("p", {
|
|
2292
|
+
className: "er-combination-offer",
|
|
2293
|
+
children: /* @__PURE__ */ jsx(CopyParts, { parts: props.parts })
|
|
1710
2294
|
});
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
availabilityLabel: eventAvailabilityLabel,
|
|
1743
|
-
currency: eventPricingCurrency,
|
|
1744
|
-
hasAvailableTicketTypes,
|
|
1745
|
-
onTicketSelectionsChange,
|
|
1746
|
-
bookingUnit: unit
|
|
1747
|
-
})
|
|
1748
|
-
] }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1749
|
-
slidingScale ? /* @__PURE__ */ jsx(SlidingScaleAmountField, {
|
|
1750
|
-
slidingScale,
|
|
1751
|
-
currency: eventPricingCurrency,
|
|
1752
|
-
value: selectedSlidingAmountInput,
|
|
1753
|
-
message: slidingScaleSelectionMessage,
|
|
1754
|
-
onChange: onSlidingAmountChange
|
|
1755
|
-
}) : null,
|
|
1756
|
-
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
1757
|
-
/* @__PURE__ */ jsx(PlaceCounter, {
|
|
1758
|
-
ticketsCount,
|
|
1759
|
-
ceiling: placesCeiling ?? maxAllowed,
|
|
1760
|
-
availableSpots,
|
|
1761
|
-
availabilityLabel: eventAvailabilityLabel,
|
|
1762
|
-
waitlist: canJoinWaitlist,
|
|
1763
|
-
onTicketsChange
|
|
2295
|
+
}
|
|
2296
|
+
function runPriceLabel(event) {
|
|
2297
|
+
return publicEventPricingCurrency(event.pricing) === null ? null : formatEventPriceDisplay(event.pricing).trim() || null;
|
|
2298
|
+
}
|
|
2299
|
+
/** The words on a row: a date and time for dates, a title, schedule and price for runs. */
|
|
2300
|
+
function severalOptionText(items, event, display) {
|
|
2301
|
+
if (items === "dates") return {
|
|
2302
|
+
title: formatBookingWhen(event, "dayLong"),
|
|
2303
|
+
detail: formatBookingWhen(event, "timeRange"),
|
|
2304
|
+
price: null
|
|
2305
|
+
};
|
|
2306
|
+
const detail = [formatRegistrationSchedule(event), shownVenue(event, display)].filter(Boolean).join(" · ");
|
|
2307
|
+
return {
|
|
2308
|
+
title: event.title,
|
|
2309
|
+
detail,
|
|
2310
|
+
price: runPriceLabel(event)
|
|
2311
|
+
};
|
|
2312
|
+
}
|
|
2313
|
+
function SeveralOptionStatus(props) {
|
|
2314
|
+
const { event } = props;
|
|
2315
|
+
switch (selectionRowAvailability(event)) {
|
|
2316
|
+
case "waitlist": return /* @__PURE__ */ jsxs("span", {
|
|
2317
|
+
className: "er-date-option__full-note",
|
|
2318
|
+
children: [
|
|
2319
|
+
"Full ·",
|
|
2320
|
+
" ",
|
|
2321
|
+
/* @__PURE__ */ jsx("button", {
|
|
2322
|
+
type: "button",
|
|
2323
|
+
className: "er-date-option__waitlist",
|
|
2324
|
+
onClick: () => props.onJoinWaitlist(event),
|
|
2325
|
+
children: "Join the waitlist"
|
|
1764
2326
|
})
|
|
1765
|
-
]
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
2327
|
+
]
|
|
2328
|
+
});
|
|
2329
|
+
case "full": return /* @__PURE__ */ jsx("span", {
|
|
2330
|
+
className: "er-date-option__places",
|
|
2331
|
+
children: "Full"
|
|
2332
|
+
});
|
|
2333
|
+
case "open": {
|
|
2334
|
+
const places = placesLeftLabel(event, props.display, { compact: true });
|
|
2335
|
+
return places ? /* @__PURE__ */ jsx("span", {
|
|
2336
|
+
className: "er-date-option__places",
|
|
2337
|
+
children: places
|
|
2338
|
+
}) : null;
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
function SeveralOption(props) {
|
|
2343
|
+
const { event } = props;
|
|
2344
|
+
const availability = selectionRowAvailability(event);
|
|
2345
|
+
const open = availability === "open";
|
|
2346
|
+
const className = [
|
|
2347
|
+
"er-event-card",
|
|
2348
|
+
"er-date-option",
|
|
2349
|
+
props.checked && "er-event-card--selected",
|
|
2350
|
+
!open && "er-date-option--full"
|
|
2351
|
+
].filter(Boolean).join(" ");
|
|
2352
|
+
const { title, detail, price } = severalOptionText(props.items, event, props.display);
|
|
2353
|
+
const Row = availability === "waitlist" ? "div" : "label";
|
|
2354
|
+
return /* @__PURE__ */ jsxs(Row, {
|
|
2355
|
+
className,
|
|
2356
|
+
children: [
|
|
2357
|
+
/* @__PURE__ */ jsx("input", {
|
|
2358
|
+
type: "checkbox",
|
|
2359
|
+
className: "er-date-option__radio",
|
|
2360
|
+
value: event.selectionId,
|
|
2361
|
+
checked: props.checked,
|
|
2362
|
+
disabled: !props.canToggle,
|
|
2363
|
+
"aria-label": Row === "div" ? [title, detail].filter(Boolean).join(", ") : void 0,
|
|
2364
|
+
onChange: () => props.onToggle(event)
|
|
1769
2365
|
}),
|
|
1770
|
-
|
|
1771
|
-
className: "er-
|
|
1772
|
-
children:
|
|
1773
|
-
|
|
2366
|
+
/* @__PURE__ */ jsxs("span", {
|
|
2367
|
+
className: "er-date-option__main",
|
|
2368
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2369
|
+
className: "er-date-option__date",
|
|
2370
|
+
children: title
|
|
2371
|
+
}), detail ? /* @__PURE__ */ jsx("span", {
|
|
2372
|
+
className: "er-date-option__time",
|
|
2373
|
+
children: detail
|
|
2374
|
+
}) : null]
|
|
2375
|
+
}),
|
|
2376
|
+
/* @__PURE__ */ jsx(SeveralOptionStatus, {
|
|
2377
|
+
event,
|
|
2378
|
+
display: props.display,
|
|
2379
|
+
onJoinWaitlist: props.onJoinWaitlist
|
|
2380
|
+
}),
|
|
2381
|
+
price && open ? /* @__PURE__ */ jsx("span", {
|
|
2382
|
+
className: "er-date-option__price",
|
|
2383
|
+
children: price
|
|
2384
|
+
}) : null
|
|
1774
2385
|
]
|
|
1775
2386
|
});
|
|
1776
|
-
};
|
|
1777
|
-
function resolveRemainingPlacesOverride(override, cached) {
|
|
1778
|
-
return override === void 0 ? cached : override;
|
|
1779
2387
|
}
|
|
1780
2388
|
//#endregion
|
|
1781
2389
|
//#region ../blocks/src/system/runtime/nodes/event-registration/GuestDetailsSection.tsx
|
|
@@ -1918,7 +2526,7 @@ const GuestDetailsSection = ({ guests, errors, onChange, shake = false, onShakeE
|
|
|
1918
2526
|
};
|
|
1919
2527
|
//#endregion
|
|
1920
2528
|
//#region ../blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.tsx
|
|
1921
|
-
function EventConsentField({ consent, error,
|
|
2529
|
+
function EventConsentField({ consent, error, checked, idBase, onCheckedChange }) {
|
|
1922
2530
|
const errorId = `${idBase}-consent-error`;
|
|
1923
2531
|
return /* @__PURE__ */ jsxs("div", {
|
|
1924
2532
|
className: "er-field",
|
|
@@ -1932,11 +2540,8 @@ function EventConsentField({ consent, error, formData, idBase, onChange }) {
|
|
|
1932
2540
|
/* @__PURE__ */ jsx(CheckboxChoice, {
|
|
1933
2541
|
"aria-describedby": error ? errorId : void 0,
|
|
1934
2542
|
"aria-invalid": error ? true : void 0,
|
|
1935
|
-
checked
|
|
1936
|
-
onChange: (event) =>
|
|
1937
|
-
...formData,
|
|
1938
|
-
consentAccepted: event.target.checked
|
|
1939
|
-
}),
|
|
2543
|
+
checked,
|
|
2544
|
+
onChange: (event) => onCheckedChange(event.target.checked),
|
|
1940
2545
|
label: consent.checkboxLabel,
|
|
1941
2546
|
presentation: "tile",
|
|
1942
2547
|
className: "er-consent-check"
|
|
@@ -1990,7 +2595,7 @@ function EmailField(props) {
|
|
|
1990
2595
|
}) : /* @__PURE__ */ jsx("p", {
|
|
1991
2596
|
id: hintId,
|
|
1992
2597
|
className: "er-field-hint",
|
|
1993
|
-
children:
|
|
2598
|
+
children: props.hint
|
|
1994
2599
|
}),
|
|
1995
2600
|
props.error && /* @__PURE__ */ jsx(FieldValidationMessage, {
|
|
1996
2601
|
id: errorId,
|
|
@@ -2045,26 +2650,68 @@ function MailingListOptInField({ signup, formData, onChange }) {
|
|
|
2045
2650
|
* The end of the details form: the event's during-booking questions, then
|
|
2046
2651
|
* consent and the site's terms, then the message under the form.
|
|
2047
2652
|
*/
|
|
2653
|
+
function QuestionsSection(props) {
|
|
2654
|
+
const { bookingQuestions } = props;
|
|
2655
|
+
return /* @__PURE__ */ jsx(BookingQuestionSections, {
|
|
2656
|
+
presentation: bookingQuestions.presentation,
|
|
2657
|
+
values: bookingQuestions.values,
|
|
2658
|
+
fieldErrors: bookingQuestions.fieldErrors,
|
|
2659
|
+
onChange: bookingQuestions.answer,
|
|
2660
|
+
answerMode: bookingQuestions.answerMode,
|
|
2661
|
+
onAnswerModeChange: bookingQuestions.chooseAnswerMode,
|
|
2662
|
+
signInEmail: props.signInEmail.trim() || void 0,
|
|
2663
|
+
signInReturnPath: bookingQuestions.signInReturnPath
|
|
2664
|
+
});
|
|
2665
|
+
}
|
|
2666
|
+
/** One run's questions and agreement, headed with the run's name. */
|
|
2667
|
+
function RunRequirementsBlock(props) {
|
|
2668
|
+
const { section } = props;
|
|
2669
|
+
const idBase = `${props.idBase}-run-${section.seriesId}`;
|
|
2670
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
2671
|
+
className: "er-run-pricing er-run-requirements",
|
|
2672
|
+
"aria-labelledby": `${idBase}-title`,
|
|
2673
|
+
children: [
|
|
2674
|
+
/* @__PURE__ */ jsx("h4", {
|
|
2675
|
+
id: `${idBase}-title`,
|
|
2676
|
+
className: "er-run-pricing__title",
|
|
2677
|
+
children: section.title
|
|
2678
|
+
}),
|
|
2679
|
+
section.bookingQuestions ? /* @__PURE__ */ jsx(QuestionsSection, {
|
|
2680
|
+
bookingQuestions: section.bookingQuestions,
|
|
2681
|
+
signInEmail: props.signInEmail
|
|
2682
|
+
}) : null,
|
|
2683
|
+
section.consent ? /* @__PURE__ */ jsx(EventConsentField, {
|
|
2684
|
+
consent: section.consent,
|
|
2685
|
+
error: section.consentError,
|
|
2686
|
+
checked: section.consentAccepted,
|
|
2687
|
+
idBase,
|
|
2688
|
+
onCheckedChange: section.onConsentChange
|
|
2689
|
+
}) : null
|
|
2690
|
+
]
|
|
2691
|
+
});
|
|
2692
|
+
}
|
|
2048
2693
|
function QuestionsAndAgreement(props) {
|
|
2049
|
-
const { bookingQuestions, consent } = props;
|
|
2694
|
+
const { bookingQuestions, consent, formData } = props;
|
|
2050
2695
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2051
|
-
bookingQuestions ? /* @__PURE__ */ jsx(
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
fieldErrors: bookingQuestions.fieldErrors,
|
|
2055
|
-
onChange: bookingQuestions.answer,
|
|
2056
|
-
answerMode: bookingQuestions.answerMode,
|
|
2057
|
-
onAnswerModeChange: bookingQuestions.chooseAnswerMode,
|
|
2058
|
-
signInEmail: props.formData.email.trim() || void 0,
|
|
2059
|
-
signInReturnPath: bookingQuestions.signInReturnPath
|
|
2696
|
+
bookingQuestions ? /* @__PURE__ */ jsx(QuestionsSection, {
|
|
2697
|
+
bookingQuestions,
|
|
2698
|
+
signInEmail: formData.email
|
|
2060
2699
|
}) : null,
|
|
2061
2700
|
consent ? /* @__PURE__ */ jsx(EventConsentField, {
|
|
2062
2701
|
consent,
|
|
2063
2702
|
error: props.consentError,
|
|
2064
|
-
|
|
2703
|
+
checked: formData.consentAccepted === true,
|
|
2065
2704
|
idBase: props.idBase,
|
|
2066
|
-
|
|
2705
|
+
onCheckedChange: (consentAccepted) => props.onChange({
|
|
2706
|
+
...formData,
|
|
2707
|
+
consentAccepted
|
|
2708
|
+
})
|
|
2067
2709
|
}) : null,
|
|
2710
|
+
props.runRequirements?.map((section) => /* @__PURE__ */ jsx(RunRequirementsBlock, {
|
|
2711
|
+
section,
|
|
2712
|
+
idBase: props.idBase,
|
|
2713
|
+
signInEmail: formData.email
|
|
2714
|
+
}, section.seriesId)),
|
|
2068
2715
|
props.siteTerms,
|
|
2069
2716
|
props.questionsMessage ? /* @__PURE__ */ jsx("p", {
|
|
2070
2717
|
role: "alert",
|
|
@@ -2079,7 +2726,7 @@ function QuestionsAndAgreement(props) {
|
|
|
2079
2726
|
* Collects attendee information: name, email, phone, and notes.
|
|
2080
2727
|
* Validates required fields and displays errors.
|
|
2081
2728
|
*/
|
|
2082
|
-
const AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false, onLogout, ticketsCount = 1, requireGuestDetails = false, guests = [], onGuestsChange, guestErrors = {}, guestSectionShake = false, onGuestShakeEnd, consent, mailingListSignup, siteTerms, siteTermsNotice, bookingQuestions, questionsMessage }) => {
|
|
2729
|
+
const AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false, onLogout, ticketsCount = 1, requireGuestDetails = false, guests = [], onGuestsChange, guestErrors = {}, guestSectionShake = false, onGuestShakeEnd, consent, confirmationHint = "We’ll send your confirmation here.", mailingListSignup, siteTerms, siteTermsNotice, bookingQuestions, runRequirements, questionsMessage }) => {
|
|
2083
2730
|
const idBase = useId();
|
|
2084
2731
|
const nameId = `${idBase}-name`;
|
|
2085
2732
|
const emailId = `${idBase}-email`;
|
|
@@ -2134,6 +2781,7 @@ const AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false,
|
|
|
2134
2781
|
formData,
|
|
2135
2782
|
error: errors.email,
|
|
2136
2783
|
locked: emailLocked,
|
|
2784
|
+
hint: confirmationHint,
|
|
2137
2785
|
onChange,
|
|
2138
2786
|
onLogout
|
|
2139
2787
|
}),
|
|
@@ -2174,6 +2822,7 @@ const AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false,
|
|
|
2174
2822
|
consent,
|
|
2175
2823
|
consentError: errors.consentAccepted,
|
|
2176
2824
|
bookingQuestions,
|
|
2825
|
+
runRequirements,
|
|
2177
2826
|
questionsMessage,
|
|
2178
2827
|
siteTerms
|
|
2179
2828
|
})
|
|
@@ -2279,7 +2928,7 @@ function SiteCreditPreviewPanel(props) {
|
|
|
2279
2928
|
children: [
|
|
2280
2929
|
"You have",
|
|
2281
2930
|
" ",
|
|
2282
|
-
formatPrice(preview.availableCreditCents, preview.creditCurrency),
|
|
2931
|
+
formatPrice$1(preview.availableCreditCents, preview.creditCurrency),
|
|
2283
2932
|
" ",
|
|
2284
2933
|
"in site credit, but it can't be used for this",
|
|
2285
2934
|
" ",
|
|
@@ -2298,18 +2947,18 @@ function SiteCreditPreviewPanel(props) {
|
|
|
2298
2947
|
}),
|
|
2299
2948
|
/* @__PURE__ */ jsxs("p", {
|
|
2300
2949
|
className: "er-text",
|
|
2301
|
-
children: ["Available: ", formatPrice(preview.availableCreditCents, props.currency)]
|
|
2950
|
+
children: ["Available: ", formatPrice$1(preview.availableCreditCents, props.currency)]
|
|
2302
2951
|
}),
|
|
2303
2952
|
/* @__PURE__ */ jsx("p", {
|
|
2304
2953
|
className: "er-text",
|
|
2305
|
-
children: preview.outcome === "credit_only" ? `Your credit covers this registration. ${formatPrice(preview.appliedCreditCents, props.currency)} will be used and no card payment is needed.` : preview.cardDueNowCents === 0 ? `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. No card payment is needed today.` : `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. ${formatPrice(preview.cardDueNowCents, props.currency)} is due by card today.`
|
|
2954
|
+
children: preview.outcome === "credit_only" ? `Your credit covers this registration. ${formatPrice$1(preview.appliedCreditCents, props.currency)} will be used and no card payment is needed.` : preview.cardDueNowCents === 0 ? `${formatPrice$1(preview.appliedCreditCents, props.currency)} will be applied automatically. No card payment is needed today.` : `${formatPrice$1(preview.appliedCreditCents, props.currency)} will be applied automatically. ${formatPrice$1(preview.cardDueNowCents, props.currency)} is due by card today.`
|
|
2306
2955
|
}),
|
|
2307
2956
|
preview.laterBalanceCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
2308
2957
|
className: "er-text er-text--muted",
|
|
2309
2958
|
children: [
|
|
2310
2959
|
"Remaining balance after today:",
|
|
2311
2960
|
" ",
|
|
2312
|
-
formatPrice(preview.laterBalanceCents, props.currency)
|
|
2961
|
+
formatPrice$1(preview.laterBalanceCents, props.currency)
|
|
2313
2962
|
]
|
|
2314
2963
|
}),
|
|
2315
2964
|
preview.remainingCreditCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
@@ -2317,7 +2966,7 @@ function SiteCreditPreviewPanel(props) {
|
|
|
2317
2966
|
children: [
|
|
2318
2967
|
"Credit left afterwards:",
|
|
2319
2968
|
" ",
|
|
2320
|
-
formatPrice(preview.remainingCreditCents, props.currency)
|
|
2969
|
+
formatPrice$1(preview.remainingCreditCents, props.currency)
|
|
2321
2970
|
]
|
|
2322
2971
|
}),
|
|
2323
2972
|
preview.manualDiscountPending && /* @__PURE__ */ jsx("p", {
|
|
@@ -2353,8 +3002,9 @@ function directPaymentRows(props) {
|
|
|
2353
3002
|
const PaymentSelectionStep = (props) => {
|
|
2354
3003
|
const view = props.decision;
|
|
2355
3004
|
const eligibility = props.eligibility;
|
|
2356
|
-
if (!eligibility || props.eligibilityLoading || props.eligibilityError ||
|
|
3005
|
+
if (!eligibility || props.eligibilityLoading || props.eligibilityError || view.paysNothing || view.stepState.status !== "ready") return /* @__PURE__ */ jsx(PaymentBlockingPanel, {
|
|
2357
3006
|
...props,
|
|
3007
|
+
paysNothing: view.paysNothing,
|
|
2358
3008
|
isAuthenticated: props.isAuthenticated ?? false,
|
|
2359
3009
|
eligibilityError: props.eligibilityError ?? null
|
|
2360
3010
|
});
|
|
@@ -2374,6 +3024,7 @@ const PaymentSelectionStep = (props) => {
|
|
|
2374
3024
|
preview: view.preview,
|
|
2375
3025
|
onSelectionChange: props.onSelectionChange
|
|
2376
3026
|
}) : [], ...entitlementRows({
|
|
3027
|
+
offered: view.offersEntitlements,
|
|
2377
3028
|
eligibility,
|
|
2378
3029
|
isAuthenticated: props.isAuthenticated ?? false,
|
|
2379
3030
|
ticketsCount: props.ticketsCount,
|
|
@@ -2426,7 +3077,7 @@ function purchasablePassChoices(eligibility) {
|
|
|
2426
3077
|
},
|
|
2427
3078
|
label: pass.name,
|
|
2428
3079
|
details: [`${pass.creditsTotal} credits`, ...pass.description ? [pass.description] : []],
|
|
2429
|
-
price: formatPrice(pass.price, pass.currency)
|
|
3080
|
+
price: formatPrice$1(pass.price, pass.currency)
|
|
2430
3081
|
}));
|
|
2431
3082
|
}
|
|
2432
3083
|
function purchasableMembershipChoices(eligibility) {
|
|
@@ -2442,10 +3093,12 @@ function purchasableMembershipChoices(eligibility) {
|
|
|
2442
3093
|
},
|
|
2443
3094
|
label: membership.name,
|
|
2444
3095
|
details: membership.description ? [membership.description] : [],
|
|
2445
|
-
price: `${formatPrice(membership.price, membership.currency)}/${membership.interval}`
|
|
3096
|
+
price: `${formatPrice$1(membership.price, membership.currency)}/${membership.interval}`
|
|
2446
3097
|
}));
|
|
2447
3098
|
}
|
|
3099
|
+
/** Passes and memberships, when the selection can use them (one item, issue 1725). */
|
|
2448
3100
|
function entitlementRows(props) {
|
|
3101
|
+
if (!props.offered) return [];
|
|
2449
3102
|
const disabled = areEntitlementsDisabledForTicketCount(props.ticketsCount);
|
|
2450
3103
|
return [
|
|
2451
3104
|
...props.isAuthenticated ? [...ownedPassChoices(props.eligibility), ...ownedMembershipChoices(props.eligibility)] : [],
|
|
@@ -2568,10 +3221,10 @@ function ConfirmationSummary({ rows }) {
|
|
|
2568
3221
|
if (!rows || rows.length === 0) return null;
|
|
2569
3222
|
return /* @__PURE__ */ jsx("dl", {
|
|
2570
3223
|
className: "er-confirmation-summary",
|
|
2571
|
-
children: rows.map((entry) => /* @__PURE__ */ jsxs("div", {
|
|
3224
|
+
children: rows.map((entry, index) => /* @__PURE__ */ jsxs("div", {
|
|
2572
3225
|
className: "er-confirmation-summary__row",
|
|
2573
3226
|
children: [/* @__PURE__ */ jsx("dt", { children: entry.label }), /* @__PURE__ */ jsx("dd", { children: entry.value })]
|
|
2574
|
-
}, entry.label))
|
|
3227
|
+
}, `${index}:${entry.label}`))
|
|
2575
3228
|
});
|
|
2576
3229
|
}
|
|
2577
3230
|
function ConfirmationPaymentDetails({ summary, payment }) {
|
|
@@ -2581,12 +3234,23 @@ function ConfirmationPaymentDetails({ summary, payment }) {
|
|
|
2581
3234
|
children: payment.instructions
|
|
2582
3235
|
}) : null] });
|
|
2583
3236
|
}
|
|
3237
|
+
function SeveralBookingsNote({ several }) {
|
|
3238
|
+
return several ? /* @__PURE__ */ jsx("p", {
|
|
3239
|
+
className: "er-text er-text--muted",
|
|
3240
|
+
children: SEVERAL_BOOKINGS_ACCOUNT_NOTE
|
|
3241
|
+
}) : null;
|
|
3242
|
+
}
|
|
3243
|
+
function defaultHeading(variant, several) {
|
|
3244
|
+
if (variant === "info") return "You’re already booked";
|
|
3245
|
+
return several ? "You’re booked" : "You’re booked!";
|
|
3246
|
+
}
|
|
2584
3247
|
/**
|
|
2585
3248
|
* Success Step
|
|
2586
3249
|
*
|
|
2587
3250
|
* Displays registration confirmation with a success icon and message.
|
|
2588
3251
|
*/
|
|
2589
|
-
const SuccessStep = ({ title, copy, variant = "success", mailingListSignupNote, context = "booking", demoEmailSuppressed = false, customerEmail, summary, payment, calendar }) => {
|
|
3252
|
+
const SuccessStep = ({ title, copy, variant = "success", mailingListSignupNote, context = "booking", demoEmailSuppressed = false, customerEmail, summary, payment, calendar, several = null }) => {
|
|
3253
|
+
const heading = title ?? defaultHeading(variant, several);
|
|
2590
3254
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2591
3255
|
/* @__PURE__ */ jsx(TerminalPanel, {
|
|
2592
3256
|
tone: variant === "info" ? "info" : "success",
|
|
@@ -2627,7 +3291,7 @@ const SuccessStep = ({ title, copy, variant = "success", mailingListSignupNote,
|
|
|
2627
3291
|
})
|
|
2628
3292
|
})
|
|
2629
3293
|
}),
|
|
2630
|
-
title:
|
|
3294
|
+
title: heading,
|
|
2631
3295
|
body: /* @__PURE__ */ jsx(BookingConfirmation, {
|
|
2632
3296
|
demoEmailSuppressed,
|
|
2633
3297
|
email: customerEmail,
|
|
@@ -2644,6 +3308,7 @@ const SuccessStep = ({ title, copy, variant = "success", mailingListSignupNote,
|
|
|
2644
3308
|
summary,
|
|
2645
3309
|
payment
|
|
2646
3310
|
}),
|
|
3311
|
+
/* @__PURE__ */ jsx(SeveralBookingsNote, { several }),
|
|
2647
3312
|
/* @__PURE__ */ jsx(CalendarAction, { calendar })
|
|
2648
3313
|
] });
|
|
2649
3314
|
};
|
|
@@ -2799,9 +3464,24 @@ function ExistingRegistrationNotice(props) {
|
|
|
2799
3464
|
})
|
|
2800
3465
|
});
|
|
2801
3466
|
}
|
|
3467
|
+
/** A membership covers one place on one item, so the hero shows only then. */
|
|
3468
|
+
function heroMembership(wizard) {
|
|
3469
|
+
return wizard.portalAuthState === "authenticated" && wizard.ticketsCount === 1 && wizard.severalItems === null ? wizard.eligibility?.eligibleMemberships[0] : void 0;
|
|
3470
|
+
}
|
|
3471
|
+
/** The event's consent, with its checkbox worded for every item being booked. */
|
|
3472
|
+
function selectionConsent(wizard) {
|
|
3473
|
+
const consent = (wizard.selectedEvent ?? wizard.preSelectedEvent)?.consent ?? null;
|
|
3474
|
+
if (!consent) return null;
|
|
3475
|
+
return {
|
|
3476
|
+
...consent,
|
|
3477
|
+
checkboxLabel: selectionConsentLabel(wizard.severalItems, wizard.selection.length, consent.checkboxLabel)
|
|
3478
|
+
};
|
|
3479
|
+
}
|
|
2802
3480
|
function AttendeeDetailsContent(props) {
|
|
2803
3481
|
const { wizard } = props;
|
|
2804
|
-
const membership = wizard
|
|
3482
|
+
const membership = heroMembership(wizard);
|
|
3483
|
+
const perRun = wizard.requirementsLayout.kind === "per_run";
|
|
3484
|
+
const consent = perRun ? null : selectionConsent(wizard);
|
|
2805
3485
|
return /* @__PURE__ */ jsxs(Fragment, { children: [membership && /* @__PURE__ */ jsx(MembershipHero, { membershipName: membership.membershipName }), /* @__PURE__ */ jsx(AttendeeDetailsStep, {
|
|
2806
3486
|
formData: wizard.formData,
|
|
2807
3487
|
onChange: wizard.setFormData,
|
|
@@ -2815,9 +3495,11 @@ function AttendeeDetailsContent(props) {
|
|
|
2815
3495
|
guestErrors: wizard.guestErrors,
|
|
2816
3496
|
guestSectionShake: wizard.guestSectionShake,
|
|
2817
3497
|
onGuestShakeEnd: wizard.handleGuestShakeEnd,
|
|
2818
|
-
consent
|
|
3498
|
+
consent,
|
|
3499
|
+
confirmationHint: selectionConfirmationHint(wizard.severalItems),
|
|
2819
3500
|
mailingListSignup: wizard.mailingListSignup,
|
|
2820
|
-
bookingQuestions: wizard.bookingQuestions,
|
|
3501
|
+
bookingQuestions: perRun ? null : wizard.bookingQuestions,
|
|
3502
|
+
runRequirements: perRun ? wizard.runRequirementSections : null,
|
|
2821
3503
|
questionsMessage: wizard.questionsMessage,
|
|
2822
3504
|
siteTerms: /* @__PURE__ */ jsx(SiteTermsAgreementField, {
|
|
2823
3505
|
agreement: wizard.siteTerms.view,
|
|
@@ -2831,6 +3513,15 @@ function AttendeeDetailsContent(props) {
|
|
|
2831
3513
|
}
|
|
2832
3514
|
function EventDiscountCodeDisclosure(props) {
|
|
2833
3515
|
const { wizard } = props;
|
|
3516
|
+
const preview = wizard.combinationCodeField;
|
|
3517
|
+
if (preview?.failed) return /* @__PURE__ */ jsxs("div", {
|
|
3518
|
+
role: "alert",
|
|
3519
|
+
children: [/* @__PURE__ */ jsx("p", { children: "We couldn’t check your price. Try again." }), /* @__PURE__ */ jsx("button", {
|
|
3520
|
+
type: "button",
|
|
3521
|
+
onClick: () => void preview.apply(),
|
|
3522
|
+
children: "Try again"
|
|
3523
|
+
})]
|
|
3524
|
+
});
|
|
2834
3525
|
if (wizard.discountsAvailableLoading || !wizard.shouldShowDiscountToggle) return null;
|
|
2835
3526
|
return /* @__PURE__ */ jsx(DiscountCodeDisclosure, {
|
|
2836
3527
|
surface: "event-registration",
|
|
@@ -2842,7 +3533,13 @@ function EventDiscountCodeDisclosure(props) {
|
|
|
2842
3533
|
wizard.setDiscountCode("");
|
|
2843
3534
|
wizard.setDiscountUiOpen(false);
|
|
2844
3535
|
},
|
|
2845
|
-
id: "er-discount-code"
|
|
3536
|
+
id: "er-discount-code",
|
|
3537
|
+
...preview ? {
|
|
3538
|
+
onApply: () => void preview.apply(),
|
|
3539
|
+
isApplying: preview.applying,
|
|
3540
|
+
feedback: preview.feedback,
|
|
3541
|
+
hint: preview.hint
|
|
3542
|
+
} : {}
|
|
2846
3543
|
});
|
|
2847
3544
|
}
|
|
2848
3545
|
function bookOnePlace(wizard) {
|
|
@@ -2853,11 +3550,13 @@ function PaymentSelectionContent(props) {
|
|
|
2853
3550
|
const { wizard } = props;
|
|
2854
3551
|
const subtotalCents = wizard.ticketSelectionSubtotalCents;
|
|
2855
3552
|
if (!wizard.api.config.siteId) return null;
|
|
3553
|
+
if (subtotalCents === null && wizard.combinationAwaitingVisitor) return /* @__PURE__ */ jsx(EventDiscountCodeDisclosure, { wizard });
|
|
2856
3554
|
if (subtotalCents === null) return /* @__PURE__ */ jsx(PaymentBlockingPanel, {
|
|
2857
3555
|
eligibility: wizard.eligibility,
|
|
2858
3556
|
admission: wizard.admission,
|
|
2859
3557
|
eligibilityLoading: wizard.eligibilityLoading,
|
|
2860
3558
|
eligibilityError: wizard.eligibilityError,
|
|
3559
|
+
paysNothing: wizard.paymentDecision.paysNothing,
|
|
2861
3560
|
email: wizard.formData.email,
|
|
2862
3561
|
ticketsCount: wizard.ticketsCount,
|
|
2863
3562
|
isAuthenticated: wizard.portalAuthState === "authenticated",
|
|
@@ -2865,6 +3564,7 @@ function PaymentSelectionContent(props) {
|
|
|
2865
3564
|
});
|
|
2866
3565
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2867
3566
|
eventSiteTermsSurface(wizard.paymentSelection.method) === "commerce" ? /* @__PURE__ */ jsx(SiteTermsChangedNotice, { message: wizard.siteTerms.notice }) : null,
|
|
3567
|
+
/* @__PURE__ */ jsx(SeveralItemsPaymentSummary, { wizard }),
|
|
2868
3568
|
/* @__PURE__ */ jsx(PaymentSelectionStep, {
|
|
2869
3569
|
event: wizard.selectedEvent,
|
|
2870
3570
|
ticketsCount: wizard.ticketsCount,
|
|
@@ -2878,15 +3578,30 @@ function PaymentSelectionContent(props) {
|
|
|
2878
3578
|
onRequestLogin: () => wizard.setShowMagicLinkModal(true),
|
|
2879
3579
|
decision: wizard.paymentDecision
|
|
2880
3580
|
}),
|
|
2881
|
-
|
|
2882
|
-
ticketsCount: wizard.ticketsCount,
|
|
2883
|
-
eligibility: wizard.eligibility,
|
|
2884
|
-
onBookOnePlace: () => bookOnePlace(wizard)
|
|
2885
|
-
}) : null,
|
|
3581
|
+
/* @__PURE__ */ jsx(PaymentEntitlementNote, { wizard }),
|
|
2886
3582
|
/* @__PURE__ */ jsx(EventDiscountCodeDisclosure, { wizard }),
|
|
2887
3583
|
/* @__PURE__ */ jsx(BundleSiteTerms, { wizard })
|
|
2888
3584
|
] });
|
|
2889
3585
|
}
|
|
3586
|
+
/** What the places booked entitle the visitor to, under the payment choice. */
|
|
3587
|
+
function PaymentEntitlementNote({ wizard }) {
|
|
3588
|
+
if (wizard.severalItems !== null) return /* @__PURE__ */ jsx("p", {
|
|
3589
|
+
className: "er-entitlement-note",
|
|
3590
|
+
children: selectionEntitlementNote(wizard.severalItems, wizard.paymentDecision.paysInFullBecauseSeveral)
|
|
3591
|
+
});
|
|
3592
|
+
if (wizard.paymentStepState.status !== "ready") return null;
|
|
3593
|
+
return /* @__PURE__ */ jsx(SingleTicketEntitlementNote, {
|
|
3594
|
+
ticketsCount: wizard.ticketsCount,
|
|
3595
|
+
eligibility: wizard.eligibility,
|
|
3596
|
+
onBookOnePlace: () => bookOnePlace(wizard)
|
|
3597
|
+
});
|
|
3598
|
+
}
|
|
3599
|
+
function SeveralItemsPaymentSummary({ wizard }) {
|
|
3600
|
+
return wizard.selectionPaymentSummary && wizard.eligibility ? /* @__PURE__ */ jsx(SelectionPaymentSummary, {
|
|
3601
|
+
summary: wizard.selectionPaymentSummary,
|
|
3602
|
+
currency: wizard.eligibility.currency
|
|
3603
|
+
}) : null;
|
|
3604
|
+
}
|
|
2890
3605
|
function ClosedAdmissionNotice({ wizard }) {
|
|
2891
3606
|
const admission = wizard.admission;
|
|
2892
3607
|
return admission.kind === "closed" && admission.reason !== "alreadyWaitlisted" && !wizard.eligibilityLoading ? /* @__PURE__ */ jsx("p", {
|
|
@@ -2909,7 +3624,10 @@ function TicketSelectionContent({ wizard, display }) {
|
|
|
2909
3624
|
onBookForSomeoneElse: wizard.handleBookForSomeoneElse
|
|
2910
3625
|
}),
|
|
2911
3626
|
/* @__PURE__ */ jsx(ClosedAdmissionNotice, { wizard }),
|
|
2912
|
-
/* @__PURE__ */ jsx(
|
|
3627
|
+
wizard.severalItems === "runs" ? /* @__PURE__ */ jsx(SeveralRunsTicketStep, {
|
|
3628
|
+
wizard,
|
|
3629
|
+
display
|
|
3630
|
+
}) : /* @__PURE__ */ jsx(TicketSelectionStep, {
|
|
2913
3631
|
purpose: wizard.ticketSelectionPurpose,
|
|
2914
3632
|
display,
|
|
2915
3633
|
event: wizard.selectedEvent,
|
|
@@ -2933,7 +3651,8 @@ function TicketSelectionContent({ wizard, display }) {
|
|
|
2933
3651
|
slidingScaleSelectionMessage: wizard.slidingScaleSelectionMessage,
|
|
2934
3652
|
onSlidingAmountChange: wizard.setSelectedSlidingAmountInput,
|
|
2935
3653
|
onTicketsChange: wizard.setTicketsCount,
|
|
2936
|
-
bookingUnit: resolveBookingUnit(wizard.selectedEvent)
|
|
3654
|
+
bookingUnit: resolveBookingUnit(wizard.selectedEvent),
|
|
3655
|
+
selectionNote: wizard.severalItems === "dates" ? selectionPlacesNote("dates", wizard.selection.length) : null
|
|
2937
3656
|
})
|
|
2938
3657
|
] });
|
|
2939
3658
|
}
|
|
@@ -2958,6 +3677,12 @@ function EventRegistrationWizardContent(props) {
|
|
|
2958
3677
|
selectedEvent: wizard.selectedEvent,
|
|
2959
3678
|
onSelect: wizard.handleEventSelect,
|
|
2960
3679
|
onChoose: wizard.handleEventChoose,
|
|
3680
|
+
...wizard.selectionMode.kind === "several" ? {
|
|
3681
|
+
mode: wizard.selectionMode,
|
|
3682
|
+
selection: wizard.selection,
|
|
3683
|
+
onToggle: wizard.handleSelectionToggle,
|
|
3684
|
+
onJoinWaitlist: wizard.handleWaitlistChoose
|
|
3685
|
+
} : { mode: wizard.selectionMode },
|
|
2961
3686
|
display: props.display
|
|
2962
3687
|
});
|
|
2963
3688
|
case "select-tickets": return /* @__PURE__ */ jsx(TicketSelectionContent, {
|
|
@@ -3165,7 +3890,10 @@ function EventRegistrationWholeScreen(props) {
|
|
|
3165
3890
|
function EventRegistrationSuccess(props) {
|
|
3166
3891
|
const { wizard } = props;
|
|
3167
3892
|
const { result, finished } = props.presentation;
|
|
3168
|
-
const copy =
|
|
3893
|
+
const copy = finished.several ? {
|
|
3894
|
+
message: "",
|
|
3895
|
+
defaultEmailSentence: severalConfirmationSentence(finished.several, wizard.formData.email)
|
|
3896
|
+
} : getRegistrationSuccessCopy(result, props.fallbackMessage);
|
|
3169
3897
|
return /* @__PURE__ */ jsx(SuccessStep, {
|
|
3170
3898
|
title: result.title,
|
|
3171
3899
|
variant: result.variant,
|
|
@@ -3176,7 +3904,8 @@ function EventRegistrationSuccess(props) {
|
|
|
3176
3904
|
customerEmail: wizard.formData.email,
|
|
3177
3905
|
summary: finished.summary,
|
|
3178
3906
|
calendar: finished.calendar,
|
|
3179
|
-
payment: finished.payment
|
|
3907
|
+
payment: finished.payment,
|
|
3908
|
+
several: finished.several
|
|
3180
3909
|
});
|
|
3181
3910
|
}
|
|
3182
3911
|
/** The compact progress: in the step column in place, in the panel's pinned header on overlays. */
|
|
@@ -3358,10 +4087,30 @@ function RegistrationError({ wizard }) {
|
|
|
3358
4087
|
});
|
|
3359
4088
|
}
|
|
3360
4089
|
//#endregion
|
|
4090
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/signInBenefits.ts
|
|
4091
|
+
/**
|
|
4092
|
+
* The quote's answer once it has one (it knows, for instance, that a course
|
|
4093
|
+
* takes no passes); before that, the offering's own settings.
|
|
4094
|
+
*/
|
|
4095
|
+
function signInBenefitsFor(eligibility, event, selection) {
|
|
4096
|
+
const policy = eventRegistrationEntitlementPolicy(selection);
|
|
4097
|
+
return {
|
|
4098
|
+
credit: eligibility?.requiresAuthForCredit ?? false,
|
|
4099
|
+
passes: policy.passes && (eligibility?.requiresAuthForPasses ?? event?.acceptsPasses ?? false),
|
|
4100
|
+
memberships: policy.memberships && (eligibility?.requiresAuthForMemberships ?? event?.acceptsMemberships ?? false)
|
|
4101
|
+
};
|
|
4102
|
+
}
|
|
4103
|
+
/** The offer names only confirmed benefits, with credit last. */
|
|
4104
|
+
function signInBenefitsTitle(benefits) {
|
|
4105
|
+
if (benefits.passes && benefits.memberships) return benefits.credit ? "Have a class pass, membership or credit?" : "Have a class pass or membership?";
|
|
4106
|
+
if (benefits.passes) return benefits.credit ? "Have a class pass or credit?" : "Have a class pass?";
|
|
4107
|
+
if (benefits.memberships) return benefits.credit ? "Have a membership or credit?" : "Have a membership?";
|
|
4108
|
+
return benefits.credit ? "Have credit on your account?" : null;
|
|
4109
|
+
}
|
|
4110
|
+
//#endregion
|
|
3361
4111
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.tsx
|
|
3362
4112
|
const EVENT_PORTAL_AUTH_COPY = {
|
|
3363
4113
|
membership: {
|
|
3364
|
-
title: "Have a class pass, membership or credit?",
|
|
3365
4114
|
buttonText: "Sign in",
|
|
3366
4115
|
afterButton: " to use it for this booking. We’ll email you a link, so there’s no password to remember.",
|
|
3367
4116
|
placement: "after"
|
|
@@ -3372,11 +4121,14 @@ const EVENT_PORTAL_AUTH_COPY = {
|
|
|
3372
4121
|
placement: "before"
|
|
3373
4122
|
}
|
|
3374
4123
|
};
|
|
3375
|
-
function getPortalAuthCopy(waitlistClaimRequiresPortalLogin, loginMessage, demoEmailSuppressed) {
|
|
4124
|
+
function getPortalAuthCopy(waitlistClaimRequiresPortalLogin, loginMessage, demoEmailSuppressed, benefits) {
|
|
3376
4125
|
const defaultCopy = waitlistClaimRequiresPortalLogin ? {
|
|
3377
4126
|
...EVENT_PORTAL_AUTH_COPY["waitlist-claim"],
|
|
3378
4127
|
description: loginMessage ?? "Log in to continue with your waitlist claim."
|
|
3379
|
-
} :
|
|
4128
|
+
} : {
|
|
4129
|
+
...EVENT_PORTAL_AUTH_COPY.membership,
|
|
4130
|
+
title: signInBenefitsTitle(benefits) ?? ""
|
|
4131
|
+
};
|
|
3380
4132
|
return demoEmailSuppressed && !waitlistClaimRequiresPortalLogin ? {
|
|
3381
4133
|
...defaultCopy,
|
|
3382
4134
|
afterButton: " to use it for this booking."
|
|
@@ -3444,6 +4196,13 @@ function overlayProgress(presentation, stepLabelContext) {
|
|
|
3444
4196
|
stepLabelContext
|
|
3445
4197
|
});
|
|
3446
4198
|
}
|
|
4199
|
+
/**
|
|
4200
|
+
* The tickets step offers sign-in for a paid booking of one item. Passes and
|
|
4201
|
+
* memberships don't cover several items, so there's nothing to sign in for.
|
|
4202
|
+
*/
|
|
4203
|
+
function ticketStepOffersSignIn(wizard, pricingType) {
|
|
4204
|
+
return wizard.step === "select-tickets" && wizard.severalItems === null && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && pricingType !== "free";
|
|
4205
|
+
}
|
|
3447
4206
|
function EventRegistrationWizardView(viewProps) {
|
|
3448
4207
|
const { wizard, ...props } = viewProps;
|
|
3449
4208
|
const { display, successMessage, buttonText = DEFAULT_BOOKING_BUTTON_TEXT, buttonVariant = "primary", className, supportEmail } = props;
|
|
@@ -3489,8 +4248,11 @@ function EventRegistrationWizardView(viewProps) {
|
|
|
3489
4248
|
const stepLabelContext = registrationStepLabelContext(wizard.scopedEvents, summaryEvent);
|
|
3490
4249
|
const summaryEventPricingType = summaryEvent ? publicEventPricingType(summaryEvent.pricing) : "free";
|
|
3491
4250
|
const waitlistClaimRequiresPortalLogin = wizard.waitlistClaim.kind === "portal-login-required" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking";
|
|
3492
|
-
const portalAuthCopy = getPortalAuthCopy(waitlistClaimRequiresPortalLogin, wizard.waitlistClaim.kind === "portal-login-required" ? wizard.waitlistClaim.message : null, props.demoEmailSuppressed
|
|
3493
|
-
|
|
4251
|
+
const portalAuthCopy = getPortalAuthCopy(waitlistClaimRequiresPortalLogin, wizard.waitlistClaim.kind === "portal-login-required" ? wizard.waitlistClaim.message : null, props.demoEmailSuppressed, signInBenefitsFor(wizard.eligibility, summaryEvent ?? null, {
|
|
4252
|
+
scope: wizard.registrationTarget?.subject.kind === "wholeSeries" ? "wholeSeries" : "occurrence",
|
|
4253
|
+
participantCount: wizard.ticketsCount
|
|
4254
|
+
}));
|
|
4255
|
+
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || ticketStepOffersSignIn(wizard, summaryEventPricingType) && portalAuthCopy.title !== "";
|
|
3494
4256
|
const presentation = resolveFinishedPresentation(wizard.presentation, {
|
|
3495
4257
|
events: wizard.scopedEvents,
|
|
3496
4258
|
completedOutcomes: wizard.flow.completedOutcomes,
|