@riverbankcms/sdk 0.171.1 → 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-D-6cWDDC.d.ts → BlocksIslandsHydrator-O50mTMCY.d.ts} +1 -1
- package/dist/_dts/{Page-4jkUDm4D.d.ts → Page-Bk99sJwV.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-DEvzvovi.d.ts → SdkPreviewMode-DzAue6Kj.d.ts} +2 -2
- package/dist/_dts/{client-CXPH5esD.d.ts → client-ZlNEIvlU.d.ts} +1002 -140
- package/dist/_dts/{content-types-DsCr4-ny.d.ts → content-types-DBXPNc0h.d.ts} +3 -3
- package/dist/_dts/{contracts-BlmXM7xP.d.ts → contracts-D9bhu0bb.d.ts} +4 -3
- package/dist/_dts/{footerPageOutline-BA0DnxWU.d.ts → footerPageOutline-Bfap3soN.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-B7IRJCFG.d.ts → generatePageMetadata-DwCdg31h.d.ts} +2 -2
- package/dist/_dts/{index-BZ8-c4iQ.d.ts → index-BnatulTs.d.ts} +3 -3
- package/dist/_dts/{index-Sua-7CF1.d.ts → index-C611wjIL.d.ts} +1 -1
- package/dist/_dts/{index-C9_OTCFQ.d.ts → index-CJzs-yIJ.d.ts} +2 -2
- package/dist/_dts/{index-B3gfKNI-.d.ts → index-DW3eeNph.d.ts} +4 -4
- package/dist/_dts/{index-DlABXDte.d.ts → index-Dq_AboWN.d.ts} +1 -1
- package/dist/_dts/{index-DScYSl03.d.ts → index-DutLU2d2.d.ts} +49 -38
- package/dist/_dts/{index-BQPJbOkU.d.ts → index-KXh8FQ2s.d.ts} +2 -2
- package/dist/_dts/{loadContent-Dx4fW3Pa.d.ts → loadContent-Bde2y870.d.ts} +7 -7
- package/dist/_dts/{request-DUTkELQn.d.ts → request-Bysk4QPI.d.ts} +2862 -508
- package/dist/_dts/{resolveBlockData-Cze35i_N.d.ts → resolveBlockData-ChbNvpSF.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-zf6-E-C3.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 +18 -1
- package/dist/_dts/{types-JD-36x3P.d.ts → types-BoEk9ZON.d.ts} +3 -3
- package/dist/_dts/{types-BCzfYDW2.d.ts → types-BwitGNTl.d.ts} +7 -7
- package/dist/_dts/{types-CPHk5Voq.d.ts → types-kpp8XyXv.d.ts} +2 -2
- package/dist/_dts/{validation-0MyQlzWJ.d.ts → validation-ChftKX-o.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-vTHQyBQF.mjs → BlocksIslandsHydrator-BnUeSE3d.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-Blge9FJo.mjs → BookingMailingListNote-LHQMODqB.mjs} +14 -8
- package/dist/client/{BookingPanelArrangement-wm6eeuin.mjs → BookingPanelArrangement-Be704P85.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-BlaCItmH.mjs → BookingQuestionFields-BewbU_cV.mjs} +4 -4
- package/dist/client/{CalendarNavigationChevron-DRH9qFny.mjs → CalendarNavigationChevron-BMZp3RS3.mjs} +42 -35
- package/dist/client/{CheckboxChoice-B65wFjqx.mjs → CheckboxChoice-b-PJLEXe.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-DPGZArG9.mjs → DemoBookingPortalAccess-CARUWQ_E.mjs} +23 -23
- package/dist/client/{EventCalendar.client-FGg6yCLH.mjs → EventCalendar.client-CaI6upCX.mjs} +12 -11
- package/dist/client/{EventCombined.client-218_Gqgp.mjs → EventCombined.client-CoRUaYHY.mjs} +12 -11
- package/dist/client/{EventEmbeddedCheckoutStep-DKKRCuta.mjs → EventEmbeddedCheckoutStep-B18VbNS_.mjs} +1 -1
- package/dist/client/{EventItem-DKdZSW_R.mjs → EventItem-Doe4KodB.mjs} +60 -25
- package/dist/client/{EventListWeekNavigation-DZJ5qBhg.mjs → EventListWeekNavigation-CXWLKDfa.mjs} +1 -1
- package/dist/client/{EventListing.client-CCdsrqHc.mjs → EventListing.client-DvJ5tGTx.mjs} +3 -3
- package/dist/client/{EventListing.view-BVoHnVZA.mjs → EventListing.view-BmfyK7S5.mjs} +220 -81
- package/dist/client/{EventRegistrationPayment-BVxHCnxs.mjs → EventRegistrationPayment-DwMlJB2V.mjs} +847 -146
- package/dist/client/{LocationMapActions-QahdLtdE.mjs → LocationMapActions-CdRPU6gp.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-Dy6UMuIw.mjs → MapDrawingSvg-DCLtxOnt.mjs} +1 -1
- package/dist/client/{Page-CT4HaEMr.mjs → Page-D46Dmr7b.mjs} +1976 -532
- package/dist/client/{ProtectedSubmitButton-AOUzjDK9.mjs → ProtectedSubmitButton-C-ql101B.mjs} +1 -1
- package/dist/client/{StepIndicator-DRJy4eU3.mjs → StepIndicator-CrSZCZn1.mjs} +83 -12
- package/dist/client/{TabBarFragment-CsAufYwT.mjs → TabBarFragment-BqfRLojo.mjs} +1 -1
- package/dist/client/{ThemedButton-BMDHwnM6.mjs → ThemedButton-DuaYtnvG.mjs} +1 -1
- package/dist/client/{accessibleSurfaces-BnyVRqdU.mjs → accessibleSurfaces-D4DhWo9j.mjs} +37 -38
- package/dist/client/{accordion-BOApxi9U.mjs → accordion-P8xcfKxq.mjs} +1 -1
- package/dist/client/bookability-SargNwlO.mjs +17 -0
- package/dist/client/{booking-form.client-DDf8Lmo5.mjs → booking-form.client-BM2s-NqR.mjs} +33 -29
- package/dist/client/{bookingForm-DWrgG-Xx.mjs → bookingForm-JnaZPZge.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-7MVCNWgc.mjs → boxStyleClassNames-Cahps5kR.mjs} +1 -1
- package/dist/client/{carousel-DeI76SEP.mjs → carousel-CQQ_m0KA.mjs} +2 -2
- package/dist/client/{carousel.client-YF4mUK5t.mjs → carousel.client-h65clfUO.mjs} +1 -1
- package/dist/client/{cart-D_uxULCO.mjs → cart-0Q4fjw_K.mjs} +3 -3
- package/dist/client/{cart.client-BxSMse88.mjs → cart.client-BI0IaHX3.mjs} +1 -1
- package/dist/client/{checkout-DIbh4g5e.mjs → checkout-1J-3ftxF.mjs} +3 -3
- package/dist/client/{checkout.client-x4Lkw8-E.mjs → checkout.client-DOGYDlDk.mjs} +1 -1
- package/dist/client/{checkoutUrls-DqN3L-kl.mjs → checkoutUrls-CwHqcqzP.mjs} +1 -1
- package/dist/client/client.mjs +183 -4
- package/dist/client/{context-Dzjv2CpA.mjs → context-D0KCgbOq.mjs} +94 -14
- package/dist/client/course-CmOuoZHN.mjs +237 -0
- package/dist/client/{dateFormatting-BfurxGwg.mjs → dateFormatting-Dmfaczzq.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-D0dcPsRE.mjs → demoPortalMagicLink-CL7KGRta.mjs} +1 -1
- package/dist/client/{display-ChgDe9Da.mjs → display-lL-YRApN.mjs} +4460 -888
- package/dist/client/{enhanceHeaderSection-BEjg_h_6.mjs → enhanceHeaderSection-B-eLGs2C.mjs} +139 -16
- package/dist/client/{event-details.client-COmbQ3mc.mjs → event-details.client-DH1-Jxsh.mjs} +1 -1
- package/dist/client/{event-registration.client-BvQG3qEY.mjs → event-registration.client-GuuElczW.mjs} +1316 -554
- package/dist/client/{eventCalendar-DiitbUpV.mjs → eventCalendar-BiCINPkV.mjs} +4 -4
- package/dist/client/{eventCombined-Da9Z8KDq.mjs → eventCombined-BtzmH6FW.mjs} +4 -4
- package/dist/client/{eventDetails-Cf-kg7d6.mjs → eventDetails-BJpAD10-.mjs} +2 -2
- package/dist/client/{eventListing-xwXgVp7a.mjs → eventListing-jLB8iRqp.mjs} +4 -4
- package/dist/client/{eventRegistration-hlFYlgTA.mjs → eventRegistration-WhtpDEbq.mjs} +4 -4
- package/dist/client/{form-ERv_X_oZ.mjs → form-DO6qKH3M.mjs} +3 -3
- package/dist/client/{form.client-Cz24FYNj.mjs → form.client-D12ljYiX.mjs} +4 -4
- package/dist/client/{form.parts-DeaH4kIe.mjs → form.parts-C8QHaQOI.mjs} +3 -3
- package/dist/client/{formatDate-Cjouxh4Y.mjs → formatDate-BnhfIpCa.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-CJvt0ZP4.mjs → headerSection-BtFWtoUm.mjs} +2 -2
- package/dist/client/{newsletter-form.client-WuGDEzdD.mjs → newsletter-form.client-oHrqM_Ao.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DhnW6tdB.mjs → newsletter-form.parts-D5U-FuVy.mjs} +2 -2
- package/dist/client/{newsletterForm-DxG7NV8U.mjs → newsletterForm-CBYbFxSx.mjs} +3 -3
- package/dist/client/{noop-poI1m2yW.mjs → noop-CN0o0yjH.mjs} +131 -12
- package/dist/client/portal/client.mjs +231 -117
- package/dist/client/{product-detail.client-DsSfbmdV.mjs → product-detail.client-d_sNCapC.mjs} +1 -1
- package/dist/client/{product-list.client-Byzow88i.mjs → product-list.client-DkSpw6WQ.mjs} +1 -1
- package/dist/client/{productDetail-iXkmQpxG.mjs → productDetail-DaqM-LgL.mjs} +3 -3
- package/dist/client/{productList-HoFGQXFl.mjs → productList-CMx4-XlG.mjs} +3 -3
- package/dist/client/{propsDecoder-CH2-LJME.mjs → propsDecoder-BZbUKstC.mjs} +3 -3
- package/dist/client/{registry.server-ed20Q7bV.mjs → registry.server-Cdot3dMk.mjs} +2705 -2397
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +38 -63
- package/dist/client/{richText-coerce-CtoGLZ_e.mjs → richText-coerce-ByApwB4q.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-CBUO-xuz.mjs → routeIslandApiConfig-DTET8f__.mjs} +1 -1
- package/dist/client/{runtimeResponse-3brbt2Jq.mjs → runtimeResponse-IkOwKZD0.mjs} +1 -1
- package/dist/client/runtimeResponse-Wd6kwhE_.mjs +3 -0
- package/dist/client/{shop-DXyeSNgi.mjs → shop-Cy6xXDM7.mjs} +3 -3
- package/dist/client/{shop-commerce--klkHNzu.mjs → shop-commerce-oDR76k1q.mjs} +13 -12
- package/dist/client/{shop-commerce-store-BdpIWdc4.mjs → shop-commerce-store-DjoUpL3a.mjs} +1 -1
- package/dist/client/shop-discount-apply.state-WsGb9DD8.mjs +166 -0
- package/dist/client/{shop.client-Sv7QVDmj.mjs → shop.client-Brha4BSM.mjs} +13 -12
- package/dist/client/{shop.interactive-C0IjiWOs.mjs → shop.interactive-CXhYl0DW.mjs} +218 -89
- package/dist/client/{shopShared-Jt4TzcAG.mjs → shopShared-JCa_SRhP.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/stable-json-D0XAEIXc.mjs +22 -0
- package/dist/client/{timetableModel-BxbnEJCi.mjs → timetableModel-CZeJwMxP.mjs} +11 -11
- package/dist/client/{types-B0hJldSt.mjs → types-DjWUR_O6.mjs} +8 -2
- package/dist/client/{useAvailableSlots-ByHedoBi.mjs → useAvailableSlots-DfbSkWop.mjs} +17 -6
- package/dist/client/{useDiscountApply-dToQs9oY.mjs → useDiscountApply-Dq-wjb1d.mjs} +4 -167
- package/dist/client/{useDiscountCodeUi-C_aa_H69.mjs → useDiscountCodeUi-Cyy0meCH.mjs} +1 -1
- package/dist/client/{useEventPagination--MFZBoJt.mjs → useEventPagination-CCAGQHsD.mjs} +6 -6
- package/dist/client/{view-DhEwiTJG.mjs → view-D6yebI4r.mjs} +223 -65
- package/dist/client/{view-C_brMDU2.mjs → view-Sw075FOY.mjs} +3 -3
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CKe4cjZ4.mjs → EventEmbeddedCheckoutStep-aRJjq4x8.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-OwAxA2C0.mjs → LocationPickerEnvironment-D4F_5rnr.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-CaUOTCSh.mjs → MapLibreEditMap-BKMNxSEJ.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-Dfi8Y3AI.mjs → PageSectionToolbar-DG2rXUmo.mjs} +48 -36
- package/dist/preview-next/client/{PreviewEditorSidebar-DJlX4sXP.mjs → PreviewEditorSidebar-BDY5vdHU.mjs} +113 -416
- package/dist/preview-next/client/{PreviewEditorUI-FVAibBlC.mjs → PreviewEditorUI-CqZCfOaz.mjs} +5 -5
- package/dist/preview-next/client/PreviewLayoutContext-Dy0LwcHc.mjs +26 -0
- package/dist/preview-next/client/PreviewQueryProvider-BgIucg_5.mjs +21 -0
- package/dist/preview-next/client/{PreviewShell-9eAon7Z8.mjs → PreviewShell-Bv2HZ7JY.mjs} +313 -64
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Byf-KW1x.mjs → SdkPreviewModeRuntime-BMTcR-MW.mjs} +300 -174
- package/dist/preview-next/client/{SiteChromeCustomizeButton-eU-zMftO.mjs → SiteChromeCustomizeButton-D1MGyN_Z.mjs} +3246 -1079
- package/dist/preview-next/client/{ThemedButton-CKYjeU_M.mjs → ThemedButton-CVYz7h68.mjs} +8 -2
- package/dist/preview-next/client/{lucide-react-X0DjcFij.mjs → lucide-react-BCNn8dEQ.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-3FZrzbK8.mjs → previewAssistantSlot-La6MerV_.mjs} +11994 -6013
- package/dist/preview-next/client/{previewChromeRoot-C4gyNQXE.mjs → previewChromeRoot-BcOQqJIP.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +5 -4
- package/dist/preview-next/client/sdk-runtime-BkckHox4.mjs +6 -0
- package/dist/preview-next/client/{useAutosaveStatus-OIMkhbkP.mjs → useAutosaveStatus-CPAHgGqI.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BNG9P9sM.mjs → useOpenBlockForSetup-BDkuSZxQ.mjs} +20 -8
- package/dist/preview-next/container-responsive.css +215 -4
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BLY4ycq6.mjs → route-contract-CPV30ABr.mjs} +179 -0
- package/dist/server/{Block.shared-BC3jPIP4.mjs → Block.shared-BaMMstO1.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-B7Ey6AWT.mjs → ThemeScopeCore-D1NTXZdX.mjs} +14 -9
- package/dist/server/{accessibleSurfaces-BxsHs-jf.mjs → accessibleSurfaces-Dbd2__Le.mjs} +12 -11
- package/dist/server/{bindings-xQ9v3zrn.mjs → bindings-Dge4sqel.mjs} +109 -20
- package/dist/server/{block-kinds-DkzOr19P.mjs → block-kinds-BCY9z3oB.mjs} +1 -0
- package/dist/server/{client-DCwLR0kQ.mjs → client-VVIQjC4r.mjs} +183 -4
- package/dist/server/config-template-validation.mjs +3 -0
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +3 -3
- 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 +4 -4
- package/dist/server/{loadContent-C4I3ltU_.mjs → loadContent-BIJb3WAK.mjs} +19 -15
- package/dist/server/{loadPage-COvxWN0r.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/{opaqueSurface-QiUjZmEV.mjs → opaqueSurface-COEKXVwk.mjs} +2 -2
- package/dist/server/{overrideResolution-BqQg6Iws.mjs → overrideResolution-1Ru3NMQj.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-CVCGTj5S.mjs → pageRenderPlan-CytPhrI9.mjs} +1084 -351
- package/dist/server/{pageRuntimeSupport-C7Be9suN.mjs → pageRuntimeSupport-DWspU5EZ.mjs} +4 -3
- package/dist/server/{pageShared-H_bSBPLd.mjs → pageShared-Bhx8bVe1.mjs} +1187 -902
- package/dist/server/{parseThemeForPersistence-Bk0o95m6.mjs → parseThemeForPersistence-CtgRtvo3.mjs} +2 -2
- package/dist/server/{prebuild-HQNOeCs9.mjs → prebuild-BjvFb0CA.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-CbRsnhta.mjs → prefetchBlockData-Db3stNpp.mjs} +3 -3
- package/dist/server/{registry-CaeRTf4E.mjs → registry-BMCfcev6.mjs} +10282 -7366
- 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-CUMjWbXQ.mjs → resolveBlockData--yUbI-Ll.mjs} +2 -2
- package/dist/server/{resolveButtonColourStates-euZnRMIu.mjs → resolveButtonColourStates-CCPUY9Xh.mjs} +32 -9
- package/dist/server/{responseMedia-t6gs0cB7.mjs → responseMedia-DpBC1hTM.mjs} +1 -1
- package/dist/server/{schema-CxBsE9Dv.mjs → schema-D5Vfmqzw.mjs} +396 -2
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +2 -2
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{validation-CvmhnkDr.mjs → validation-EgTtnTcY.mjs} +5 -5
- package/dist/server/{version-Clp2evCf.mjs → version-LjgU0Cq1.mjs} +1 -1
- package/dist/styles/index.css +1434 -15
- package/package.json +1 -1
- package/dist/client/cta-CP9l112u.mjs +0 -121
- package/dist/client/runtimeResponse-CTarP5K6.mjs +0 -3
- package/dist/preview-next/client/PreviewQueryProvider-BC0V7iAR.mjs +0 -43
- package/dist/preview-next/client/sdk-runtime-DtyRbz4E.mjs +0 -5
- package/dist/server/rich-text-CRcONdyM.mjs +0 -33
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
3
|
-
import { A as resolveOnColorForThemeToken, M as resolveTokenOrCssColorValue, W as resolveConcreteColorHex, k as isCssColorLiteral, n as parseSurfaceTree } from "./accessibleSurfaces-
|
|
4
|
-
import { I as asSiteStyleId, L as makeBoundaryId, P as asLayoutVariantKey, j as asDesignBlockId } from "./schema-
|
|
5
|
-
import { o as runtimeMediaSchema } from "./media-
|
|
1
|
+
import { Dt as parseThemeColorToken, G as hexToRgb, J as oklchToHexGamut, K as oklabToOklch, P as getTextColorForBackground, R as contrastRatio, X as rgbToHex, Z as srgbToOklab, q as oklabToSrgb } from "./resolveButtonColourStates-CCPUY9Xh.mjs";
|
|
2
|
+
import { $i as isToday, $r as lookCarouselRegionTransform, Ai as augmentManifest, Ao as resolveEffectiveKnobs, As as formatDateRange, Bi as resolveCalendarReadProfile, Bn as resolveHeroTitleLength, Bs as resolveBookingBusinessTimeZone, Ca as arrangementAppearancePresets, Co as deriveSectionGround, Do as stripStaleTransitionStyleGroup, Eo as sectionSurfaceBase, Fa as resolveModeArrangement, Fi as eventDiscoveryFilterKeys, Fn as mediaTransforms, Fs as compareLocalScheduleDates, Gr as parseRuntimeBackgroundContent, Gt as eventDateOptions, Hi as eventCalendarListLayoutOptions, Hn as formattingTransforms, Ho as cardListFamilyBlocks, Hs as toUtcIsoDateTimeString, Ht as weekColumnDays, I as combinedLookSchema, Ia as resolvePublishedLook, Ii as eventScopeLoaderParam, In as headerRuntimeTransforms, J as CardListLeadDate, Ja as gradientToCss, Jr as resolveBackgroundColorValue, Kr as resolveSectionSurfaceForeground, Kt as eventLocalDateKey, Li as eventScopeQuery, Ln as chromeLogoTransforms, Ls as getLocalScheduleDate, Ma as arrangementManifestFromVariants, Mi as eventReadinessQuery, Mo as assertNever, Na as readStoredMode, Ni as eventReadinessQueryKeys, Nn as readRuntimeNow, Oo as themeV2CompilerOwnedFieldNames, Pa as resolveEffectiveArrangement, Pt as ThemedButtonLink, Q as MediaNodeServer, Qn as listItemPresentation, Ra as deriveSiteStyleBlockPolicy, Ri as eventScopeQueryKeys, Rn as layoutTransforms, Rs as parseBookingLocalDate, Rt as buildEventListWeek, Sa as heroPhotoPaintsGround, So as applyLookPhotoTreatment, Sr as heroTitleSizeOptions, To as resolveSectionBackground, Tt as groupOfferingRunsByCourse, Ui as resolveEventCalendarReadPlan, Uo as cardListKnobBlocks, Ur as parseBackgroundContent, Vi as eventCalendarListGroupingDecision, Vn as uiTransforms, Vt as groupEventsByWeek, Wr as parseBackgroundOverlay, Ws as formatBookingPriceDisplay, Wt as eventCalendarWeekStart, X as resolveCardListSchedule, Xr as isSemanticSpacing, Xs as resolvePricingOptionsPriceDisplay, Xt as formatEventCompactDateRail, Ya as getGradientPreset, Ys as resolveExactOrFreePriceDisplay, Z as selectCardListPresentation, Zt as formatEventDateParts, _a as resolveLookSurfacePresentation, _n as getEventAvailability, an as resolveEventTimeZone, br as BACKGROUND_POSITION_PRESET_VALUES, co as sectionShapeForGround, da as isObjectRecord, ei as lookLeadSlotTransform, en as formatEventRunDates, er as listLookSlot, et as ImagePresets, fn as closedRunCopy, fr as classPricesCopySchema, ga as lookPresentationOnPalette, gn as formatTotalCapacity, gr as formatEventPrice, hi as ClockIcon, hn as formatEventRemainingPlaces, hr as formatCoursePrice, hs as resolveWholeSeriesBookingPhase, ii as createTransformRegistry, in as groupEventsByDate, ir as standardAspectRatioOptions, ja as styleSectionBackgroundForColour, ji as eventReadinessLoaderKey, js as formatDateTimeRange, kn as contentTransforms, ks as formatDate, la as eventCalendarListLayoutCompatibleDisplayModeValues, lo as sectionShapeFromContent, lr as standardImageShapeOptions, mn as canJoinEventWaitlistOnAnyMode, mr as resolveClassPriceItems, ms as orderedLiveRunSessions, nc as arrangementSlotNames, ni as lookSkinSlotTransform, nn as formatEventWeekdayTime, nt as computeMediaTransformStyle, on as resolveRuntimeEventDestination, po as boundaryRuntimeMetricsForDecorativeTransition, pr as classPricesDataSchema, ps as nextLiveRunSessionStartMs, q as CardListContentPart, qi as formatDateKey, qr as resolveSurfaceForegroundStyles, ri as asPartialObject, rn as formatTime, sn as formatBookingSchedulePresentation, sr as heroMorePhotoCount, t as getBlockDefinition, tc as parseGradientPresetId, ti as lookQuoteLimitTransform, tn as formatEventTimeRange, uo as sectionShapeHook, ut as EventQuickFacts, vn as getEventAvailabilityStatus, vr as formatEventPriceDisplay, wo as parseCanonicalRuntimeBackground, xr as getAnchorClasses, yn as isEventFull, yr as formatEventStartingPrice, zi as resolveEventScope, zr as boxStylesTransforms } from "./registry-BMCfcev6.mjs";
|
|
3
|
+
import { A as resolveOnColorForThemeToken, M as resolveTokenOrCssColorValue, W as resolveConcreteColorHex, k as isCssColorLiteral, n as parseSurfaceTree } from "./accessibleSurfaces-Dbd2__Le.mjs";
|
|
4
|
+
import { I as asSiteStyleId, L as makeBoundaryId, P as asLayoutVariantKey, j as asDesignBlockId } from "./schema-D5Vfmqzw.mjs";
|
|
5
|
+
import { o as runtimeMediaSchema } from "./media-luf7RF22.mjs";
|
|
6
6
|
import { t as assertNever$1 } from "./assert-never-ku-PUn9U.mjs";
|
|
7
|
-
import { o as isRecord$
|
|
7
|
+
import { o as isRecord$2 } from "./richTextSchema-QLaQrbII.mjs";
|
|
8
8
|
import { i as outlineRegions, n as mapOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
|
|
9
9
|
import { i as resolveRouteTargetForStage$1 } from "./dist-Xevqwf1U.mjs";
|
|
10
10
|
import React from "react";
|
|
@@ -542,13 +542,26 @@ function boundaryEndpointForSectionContent(content) {
|
|
|
542
542
|
* draws a plain frame.
|
|
543
543
|
*/
|
|
544
544
|
function sectionFactsForContent(content) {
|
|
545
|
+
const photoGround = isLookPhotoGround(content);
|
|
545
546
|
return {
|
|
546
|
-
endpoint:
|
|
547
|
-
|
|
547
|
+
endpoint: photoGround ? {
|
|
548
|
+
kind: "unpainted",
|
|
549
|
+
reason: "media"
|
|
550
|
+
} : boundaryEndpointForSectionContent(content),
|
|
551
|
+
...photoGround || isPhotoBackground(content) ? { photo: true } : {},
|
|
548
552
|
frame: frameKindForContent(content),
|
|
549
553
|
shape: sectionShapeFromContent(content)
|
|
550
554
|
};
|
|
551
555
|
}
|
|
556
|
+
/** A Look whose photo covers the section (`photoGround`) meets its joins as a photo does, once it has a photo to show. */
|
|
557
|
+
function isLookPhotoGround(content) {
|
|
558
|
+
const look = content._effectiveLook;
|
|
559
|
+
const hooks = content._lookHooks;
|
|
560
|
+
return isRecord$1(look) && look.photoGround === true && isRecord$1(hooks) && hooks["data-has-photo"] === "true";
|
|
561
|
+
}
|
|
562
|
+
function isRecord$1(value) {
|
|
563
|
+
return typeof value === "object" && value !== null;
|
|
564
|
+
}
|
|
552
565
|
function isPhotoBackground(content) {
|
|
553
566
|
const source = parseCanonicalRuntimeBackground(content);
|
|
554
567
|
return source.kind !== "none" && source.background.type === "image" && source.background.image != null;
|
|
@@ -692,18 +705,25 @@ function arrangementContentFacts(content) {
|
|
|
692
705
|
featured,
|
|
693
706
|
outcome: typeof content.outcome === "string" && content.outcome.length > 0,
|
|
694
707
|
figure: typeof content.figure === "string" && content.figure.trim().length > 0,
|
|
695
|
-
entrance: isRecord$
|
|
708
|
+
entrance: isRecord$2(content.entrancePhoto)
|
|
696
709
|
},
|
|
697
710
|
settings: { "listed-by-week": content.listBy === "week" }
|
|
698
711
|
}
|
|
699
712
|
};
|
|
700
713
|
}
|
|
714
|
+
/** What an automatic Look choice weighs, read by the same owner as the `whenMissing` facts. */
|
|
715
|
+
function lookFillPartsFromContent(content) {
|
|
716
|
+
return {
|
|
717
|
+
photo: arrangementPhotoCount(content) > 0,
|
|
718
|
+
statement: typeof content.title === "string" && content.title.trim().length > 0
|
|
719
|
+
};
|
|
720
|
+
}
|
|
701
721
|
/** The content stage owns media presence for every arrangement consumer. */
|
|
702
722
|
function arrangementPhotoCount(content) {
|
|
703
|
-
if (Array.isArray(content.cards)) return content.cards.filter((card) => isRecord$
|
|
704
|
-
if (Array.isArray(content.members)) return content.members.filter((member) => isRecord$
|
|
705
|
-
if (Array.isArray(content.images)) return content.images.filter((item) => isRecord$
|
|
706
|
-
if (isRecord$
|
|
723
|
+
if (Array.isArray(content.cards)) return content.cards.filter((card) => isRecord$2(card) && isRecord$2(card.media)).length;
|
|
724
|
+
if (Array.isArray(content.members)) return content.members.filter((member) => isRecord$2(member) && isRecord$2(member.photo)).length;
|
|
725
|
+
if (Array.isArray(content.images)) return content.images.filter((item) => isRecord$2(item) && isRecord$2(item.image)).length;
|
|
726
|
+
if (isRecord$2(content.media) || isRecord$2(content.entrancePhoto)) return 1;
|
|
707
727
|
return storedSectionPhoto(content) === null ? 0 : 1;
|
|
708
728
|
}
|
|
709
729
|
/** Both rendering and join matching ask the publication-fallback owner. */
|
|
@@ -720,9 +740,9 @@ function resolveArrangementContentLook(runtime, mode, content, audience) {
|
|
|
720
740
|
}
|
|
721
741
|
/** Section paint is decided here, after the effective Look, at its admitted render position. */
|
|
722
742
|
function resolveRuntimeSection(input) {
|
|
723
|
-
const rhythm = input.runtime && input.look ? input.placement === "column" ? null : input.runtime.rhythm[input.position % input.runtime.rhythm.length] ?? null : void 0;
|
|
743
|
+
const rhythm = input.runtime && input.look ? input.placement === "column" ? null : input.look.sectionGround ?? input.runtime.rhythm[input.position % input.runtime.rhythm.length] ?? null : void 0;
|
|
724
744
|
const photo = input.runtime && input.look && input.blockKind === "block.hero" ? { paintsGround: heroPhotoPaintsGround(input.arrangementKey) } : void 0;
|
|
725
|
-
const background = input.placement === "column" ? resolveSectionBackground({ kind: "none" }, null, null) : resolveSectionBackground(parseCanonicalRuntimeBackground(input.content), null, rhythm, photo);
|
|
745
|
+
const background = input.placement === "column" ? resolveSectionBackground({ kind: "none" }, null, null) : resolveSectionBackground(withStyleGroundInks(parseCanonicalRuntimeBackground(input.content), input.runtime), null, rhythm, photo);
|
|
726
746
|
return {
|
|
727
747
|
background,
|
|
728
748
|
ground: deriveSectionGround(background, input.palette),
|
|
@@ -730,6 +750,29 @@ function resolveRuntimeSection(input) {
|
|
|
730
750
|
styleBackground: sectionGroundToken(resolveSectionBackground({ kind: "none" }, null, rhythm))
|
|
731
751
|
};
|
|
732
752
|
}
|
|
753
|
+
/**
|
|
754
|
+
* An owner's plain colour that is one of the style's section grounds takes that ground's inks
|
|
755
|
+
* (headings, links, supporting text), so a section painted by hand reads like one the style painted.
|
|
756
|
+
* An owner who set any ink keeps all their own; any other colour keeps the generic contrast resolution.
|
|
757
|
+
*/
|
|
758
|
+
function withStyleGroundInks(source, runtime) {
|
|
759
|
+
if (source.kind === "none" || !runtime || source.background.type !== "color" || !source.background.color) return source;
|
|
760
|
+
const { textColor, headingColor, linkColor, supportingColor } = source.background;
|
|
761
|
+
if ([
|
|
762
|
+
textColor,
|
|
763
|
+
headingColor,
|
|
764
|
+
linkColor,
|
|
765
|
+
supportingColor
|
|
766
|
+
].some((ink) => ink !== void 0)) return source;
|
|
767
|
+
const style = styleSectionBackgroundForColour(runtime, source.background.color);
|
|
768
|
+
return style ? {
|
|
769
|
+
...source,
|
|
770
|
+
background: {
|
|
771
|
+
...style,
|
|
772
|
+
...source.background
|
|
773
|
+
}
|
|
774
|
+
} : source;
|
|
775
|
+
}
|
|
733
776
|
function sectionPaint(resolved) {
|
|
734
777
|
if (resolved.kind === "base" || resolved.kind === "content-media") return "paint";
|
|
735
778
|
const background = resolved.background;
|
|
@@ -764,6 +807,20 @@ function parseStoredVariant(manifest, content) {
|
|
|
764
807
|
} : { kind: "absent" };
|
|
765
808
|
}
|
|
766
809
|
//#endregion
|
|
810
|
+
//#region ../blocks/src/system/runtime/nodes/events/domain/bookability.ts
|
|
811
|
+
/**
|
|
812
|
+
* Whether a public event has a registration path a visitor can take.
|
|
813
|
+
*
|
|
814
|
+
* Lifecycle admission comes from the public booking-availability contract;
|
|
815
|
+
* capacity comes from the shared event-domain helpers so uncapped, fallback,
|
|
816
|
+
* and hybrid attendance-mode cases agree with the registration runtime.
|
|
817
|
+
*/
|
|
818
|
+
function isBookableEvent(event) {
|
|
819
|
+
if (!event.requiresRegistration) return false;
|
|
820
|
+
if (event.bookingAvailability.kind !== "open") return false;
|
|
821
|
+
return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
|
|
822
|
+
}
|
|
823
|
+
//#endregion
|
|
767
824
|
//#region ../blocks/src/system/runtime/nodes/events/domain/cta.ts
|
|
768
825
|
/**
|
|
769
826
|
* Booking call-to-action resolution for events: where an event links to and
|
|
@@ -845,16 +902,34 @@ function destinationCta(event, buttonText) {
|
|
|
845
902
|
* so the card offers that destination and leaves capacity with the individual date rows.
|
|
846
903
|
* Whole-series bookings still have one shared capacity, as do ordinary occurrence cards.
|
|
847
904
|
*/
|
|
848
|
-
function resolveEventCardBooking(event, scope, buttonText) {
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
905
|
+
function resolveEventCardBooking(event, scope, buttonText, options) {
|
|
906
|
+
const closedCta = event.bookingAvailability.kind === "closed" ? resolveEventCta(event, buttonText) : renderClockClosedCta(event, options.now);
|
|
907
|
+
if (scope === "series" && event.bookingScope === "single_occurrence") {
|
|
908
|
+
const closed = seriesBookingClosed(event);
|
|
909
|
+
return {
|
|
910
|
+
cta: closed ? resolveEventCta(event, buttonText) : withoutPage(destinationCta(event, buttonText)),
|
|
911
|
+
availability: null,
|
|
912
|
+
closed
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
return closedCta ? {
|
|
916
|
+
cta: closedCta,
|
|
917
|
+
availability: null,
|
|
918
|
+
closed: true
|
|
919
|
+
} : {
|
|
920
|
+
cta: withoutPage(resolveEventCta(event, buttonText)),
|
|
921
|
+
availability: occurrenceCardAvailability(event, options.count),
|
|
922
|
+
closed: false
|
|
856
923
|
};
|
|
857
924
|
}
|
|
925
|
+
/** A native card with no page yet can't invite booking: there is nowhere to send the visitor. */
|
|
926
|
+
function withoutPage(cta) {
|
|
927
|
+
return !cta.external && !cta.hidden && cta.href === "" ? {
|
|
928
|
+
...cta,
|
|
929
|
+
label: "Details coming soon",
|
|
930
|
+
hidden: true
|
|
931
|
+
} : cta;
|
|
932
|
+
}
|
|
858
933
|
/** Only a series-wide closure closes its card; a cancelled or started date says nothing about later dates. */
|
|
859
934
|
function seriesBookingClosed(event) {
|
|
860
935
|
if (event.bookingAvailability.kind !== "closed") return false;
|
|
@@ -872,14 +947,38 @@ function seriesBookingClosed(event) {
|
|
|
872
947
|
default: return assertNever$1(event.bookingAvailability.reason);
|
|
873
948
|
}
|
|
874
949
|
}
|
|
875
|
-
function occurrenceCardAvailability(event) {
|
|
876
|
-
const label = formatEventRemainingPlaces(event, {
|
|
950
|
+
function occurrenceCardAvailability(event, count) {
|
|
951
|
+
const label = formatEventRemainingPlaces(event, {
|
|
952
|
+
full: "Sold out",
|
|
953
|
+
count
|
|
954
|
+
});
|
|
877
955
|
const availability = getEventAvailabilityStatus(event);
|
|
878
956
|
return label ? {
|
|
879
957
|
label,
|
|
880
958
|
status: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available"
|
|
881
959
|
} : null;
|
|
882
960
|
}
|
|
961
|
+
/** Preserve projected closure reasons; only an open native run needs its clock rechecked. */
|
|
962
|
+
function renderClockClosedCta(event, now) {
|
|
963
|
+
if (!now || event.bookingScope !== "whole_series" || event.destination.kind !== "native") return null;
|
|
964
|
+
const phase = resolveWholeSeriesBookingPhase(event.run, now);
|
|
965
|
+
if (phase.kind === "open") return null;
|
|
966
|
+
return {
|
|
967
|
+
label: (() => {
|
|
968
|
+
switch (phase.reason) {
|
|
969
|
+
case "cancelled": return "Cancelled";
|
|
970
|
+
case "completed": return "Completed";
|
|
971
|
+
case "in-progress":
|
|
972
|
+
case "enrolment-closed":
|
|
973
|
+
case "no-sessions": return "Registration closed";
|
|
974
|
+
default: return assertNever$1(phase.reason);
|
|
975
|
+
}
|
|
976
|
+
})(),
|
|
977
|
+
href: resolveEventHref(event),
|
|
978
|
+
external: false,
|
|
979
|
+
hidden: phase.reason !== "enrolment-closed"
|
|
980
|
+
};
|
|
981
|
+
}
|
|
883
982
|
//#endregion
|
|
884
983
|
//#region ../blocks/src/system/runtime/nodes/events/domain/duration.ts
|
|
885
984
|
function formatEventDuration(event, style = "legacy") {
|
|
@@ -914,6 +1013,39 @@ function formatEventTeacherLine(event) {
|
|
|
914
1013
|
const names = formatTeamMemberNames((event.teamMembers ?? []).map((teamMember) => teamMember.name));
|
|
915
1014
|
return names ? `with ${names}` : null;
|
|
916
1015
|
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Select the next occurrence-targeted events for a quick-book rail.
|
|
1018
|
+
*
|
|
1019
|
+
* The API normally returns valid timestamps, but malformed values sort after
|
|
1020
|
+
* valid events so one bad record cannot displace an otherwise useful rail.
|
|
1021
|
+
* Sorting before deduplication means a duplicate occurrence keeps its earliest
|
|
1022
|
+
* deterministic representation.
|
|
1023
|
+
*/
|
|
1024
|
+
function selectQuickDateEvents(events) {
|
|
1025
|
+
return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event))).slice(0, 4);
|
|
1026
|
+
}
|
|
1027
|
+
/** Shared ordering and identity selection, independent of booking capacity. */
|
|
1028
|
+
function orderedUniqueEventOccurrences(events) {
|
|
1029
|
+
const sorted = [...events].sort(compareQuickDateEvents);
|
|
1030
|
+
return sorted.filter((event, index) => sorted.findIndex((candidate) => candidate.occurrenceId === event.occurrenceId) === index);
|
|
1031
|
+
}
|
|
1032
|
+
function formatEventQuickDate(event, style = "legacy") {
|
|
1033
|
+
const options = eventDateOptions(event);
|
|
1034
|
+
const dateRail = formatEventCompactDateRail(event.startsAt, options, style === "site" ? "as-written" : "capitals");
|
|
1035
|
+
return {
|
|
1036
|
+
dateTime: event.startsAt,
|
|
1037
|
+
label: `${dateRail.weekday} ${dateRail.day} ${dateRail.month}, ${formatTime(event.startsAt, options)}`
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
function compareQuickDateEvents(left, right) {
|
|
1041
|
+
const startsAtOrder = compareTimestamp(left.startsAt, right.startsAt);
|
|
1042
|
+
return startsAtOrder === 0 ? left.occurrenceId.localeCompare(right.occurrenceId) : startsAtOrder;
|
|
1043
|
+
}
|
|
1044
|
+
function compareTimestamp(left, right) {
|
|
1045
|
+
const leftTime = Date.parse(left);
|
|
1046
|
+
const rightTime = Date.parse(right);
|
|
1047
|
+
return (Number.isNaN(leftTime) ? Number.POSITIVE_INFINITY : leftTime) - (Number.isNaN(rightTime) ? Number.POSITIVE_INFINITY : rightTime);
|
|
1048
|
+
}
|
|
917
1049
|
//#endregion
|
|
918
1050
|
//#region ../blocks/src/system/runtime/nodes/events/domain/monthDay.ts
|
|
919
1051
|
/** Day facts are shared by the legacy grid and arrangement month Looks. */
|
|
@@ -939,6 +1071,80 @@ function resolveMonthSelectedDay(input) {
|
|
|
939
1071
|
return occupied.find((key) => key >= todayKey) ?? occupied[0] ?? formatDateKey(input.viewDate);
|
|
940
1072
|
}
|
|
941
1073
|
//#endregion
|
|
1074
|
+
//#region ../blocks/src/system/runtime/nodes/events/domain/course.ts
|
|
1075
|
+
function eventDisplayTitle(event) {
|
|
1076
|
+
const run = event.bookingScope === "whole_series" ? event.run : void 0;
|
|
1077
|
+
const courseTitle = run?.courseTitle?.trim();
|
|
1078
|
+
if (!courseTitle) return {
|
|
1079
|
+
title: event.title,
|
|
1080
|
+
runName: null
|
|
1081
|
+
};
|
|
1082
|
+
const runName = run?.runName?.trim();
|
|
1083
|
+
return {
|
|
1084
|
+
title: courseTitle,
|
|
1085
|
+
runName: runName && runName !== courseTitle ? runName : null
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Complete name for one dated occurrence: calendar cells, tooltips, modal
|
|
1090
|
+
* headings and accessible labels. A title authored on the occurrence itself
|
|
1091
|
+
* wins over the course and run name, which only describe the run as a whole.
|
|
1092
|
+
*/
|
|
1093
|
+
function eventDisplayTitleText(event) {
|
|
1094
|
+
const occurrenceTitle = event.occurrenceTitle?.trim();
|
|
1095
|
+
if (occurrenceTitle) return occurrenceTitle;
|
|
1096
|
+
const { title, runName } = eventDisplayTitle(event);
|
|
1097
|
+
return runName ? `${title}: ${runName}` : title;
|
|
1098
|
+
}
|
|
1099
|
+
const WEEK_MS = 10080 * 60 * 1e3;
|
|
1100
|
+
/** A clock change moves a weekly session by an hour against UTC. */
|
|
1101
|
+
const CLOCK_CHANGE_MS = 3600 * 1e3;
|
|
1102
|
+
function sessionMinutes(session) {
|
|
1103
|
+
return Math.round((Date.parse(session.endsAt) - Date.parse(session.startsAt)) / 6e4);
|
|
1104
|
+
}
|
|
1105
|
+
function isWeekly(sessions) {
|
|
1106
|
+
return sessions.slice(1).every((session, index) => {
|
|
1107
|
+
const previous = sessions[index];
|
|
1108
|
+
return previous !== void 0 && Math.abs(Date.parse(session.startsAt) - Date.parse(previous.startsAt) - WEEK_MS) <= CLOCK_CHANGE_MS;
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
/** "1 hour", "3 hours", "45 minutes", "1 hour 30 minutes". */
|
|
1112
|
+
function formatSessionLength(minutes) {
|
|
1113
|
+
if (!Number.isFinite(minutes) || minutes <= 0) return null;
|
|
1114
|
+
const hours = Math.floor(minutes / 60);
|
|
1115
|
+
const rest = minutes % 60;
|
|
1116
|
+
return [hours ? `${hours} hour${hours === 1 ? "" : "s"}` : null, rest ? `${rest} minute${rest === 1 ? "" : "s"}` : null].filter(Boolean).join(" ");
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* A course's sessions in one line, from the run's complete schedule rather
|
|
1120
|
+
* than whichever occurrence rows were loaded: "6 weekly sessions, 1 hour
|
|
1121
|
+
* each". The cadence and length are only stated when every session shares
|
|
1122
|
+
* them. A one-session course has nothing to add to its date and time.
|
|
1123
|
+
*/
|
|
1124
|
+
function formatCourseSessions(event) {
|
|
1125
|
+
if (event.bookingScope !== "whole_series" || !event.run) return null;
|
|
1126
|
+
const sessions = orderedLiveRunSessions(event.run.sessions);
|
|
1127
|
+
if (sessions.length < 2) return null;
|
|
1128
|
+
const lengths = new Set(sessions.map(sessionMinutes));
|
|
1129
|
+
const [onlyLength] = lengths;
|
|
1130
|
+
const length = lengths.size === 1 && onlyLength !== void 0 ? formatSessionLength(onlyLength) : null;
|
|
1131
|
+
const count = `${sessions.length} ${isWeekly(sessions) ? "weekly " : ""}sessions`;
|
|
1132
|
+
return length ? `${count}, ${length} each` : count;
|
|
1133
|
+
}
|
|
1134
|
+
/** The dates a card doesn't list: "and 5 more". */
|
|
1135
|
+
function formatMoreDates(remaining) {
|
|
1136
|
+
return remaining > 0 ? `and ${remaining} more` : null;
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* For a card that shows one course session's date: how many of the course's
|
|
1140
|
+
* sessions come after it ("and 5 more"), or null for anything else.
|
|
1141
|
+
*/
|
|
1142
|
+
function formatCourseDatesAfter(event) {
|
|
1143
|
+
if (event.bookingScope !== "whole_series" || !event.run) return null;
|
|
1144
|
+
const shownMs = Date.parse(event.startsAt);
|
|
1145
|
+
return formatMoreDates(orderedLiveRunSessions(event.run.sessions).filter((session) => Date.parse(session.startsAt) > shownMs).length);
|
|
1146
|
+
}
|
|
1147
|
+
//#endregion
|
|
942
1148
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCardIcons.tsx
|
|
943
1149
|
function MapPinIcon({ className, size = 16, strokeWidth = 2 }) {
|
|
944
1150
|
return /* @__PURE__ */ jsxs("svg", {
|
|
@@ -1031,6 +1237,14 @@ const eventItemParts = {
|
|
|
1031
1237
|
"description",
|
|
1032
1238
|
"action"
|
|
1033
1239
|
],
|
|
1240
|
+
"week-groups": [
|
|
1241
|
+
"date",
|
|
1242
|
+
"title",
|
|
1243
|
+
"meta",
|
|
1244
|
+
"time",
|
|
1245
|
+
"price",
|
|
1246
|
+
"action"
|
|
1247
|
+
],
|
|
1034
1248
|
"day-groups": [
|
|
1035
1249
|
"title",
|
|
1036
1250
|
"meta",
|
|
@@ -1097,9 +1311,13 @@ function eventItemFacts(props) {
|
|
|
1097
1311
|
price
|
|
1098
1312
|
}),
|
|
1099
1313
|
venueIcon: hasActionRail(props.arrangement) && props.showVenue !== false && Boolean(props.event.venue),
|
|
1100
|
-
places: props.showCapacity ? formatEventRemainingPlaces(props.event, {
|
|
1314
|
+
places: props.showCapacity ? formatEventRemainingPlaces(props.event, {
|
|
1315
|
+
full: "Sold out",
|
|
1316
|
+
...props.eventRows === "day-schedule" ? { count: "always" } : {}
|
|
1317
|
+
}) : null,
|
|
1101
1318
|
availability: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available",
|
|
1102
|
-
description: props.event.presentation?.summary ?? props.event.description
|
|
1319
|
+
description: props.event.presentation?.summary ?? props.event.description,
|
|
1320
|
+
title: eventDisplayTitle(props.event)
|
|
1103
1321
|
};
|
|
1104
1322
|
}
|
|
1105
1323
|
/** Rows with a rail keep pricing in the details and time in the action rail. */
|
|
@@ -1149,17 +1367,25 @@ function renderCalendarItem(props) {
|
|
|
1149
1367
|
...listLookSlot(props, root),
|
|
1150
1368
|
"data-availability": facts.availability,
|
|
1151
1369
|
children: [
|
|
1370
|
+
props.eventRows === "day-schedule" ? renderPart("time") : null,
|
|
1152
1371
|
parts.filter((part) => part === "image" || part === "chips" && chipsOnPhoto || part === "date").map(renderPart),
|
|
1153
|
-
/* @__PURE__ */
|
|
1372
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1154
1373
|
...listLookSlot(props, props.arrangement === "grid" ? "item-body" : "what"),
|
|
1155
|
-
children:
|
|
1374
|
+
children: [props.eventRows === "day-schedule" ? /* @__PURE__ */ jsx(EventQuickFacts, {
|
|
1375
|
+
facts: props.event.facts,
|
|
1376
|
+
context: "card",
|
|
1377
|
+
chips: {
|
|
1378
|
+
list: listLookSlot(props, "chips"),
|
|
1379
|
+
item: listLookSlot(props, "chip")
|
|
1380
|
+
}
|
|
1381
|
+
}) : null, parts.filter(body).map(renderPart)]
|
|
1156
1382
|
}),
|
|
1157
1383
|
renderCalendarTrailingParts(props, parts.filter((part) => [
|
|
1158
1384
|
"time",
|
|
1159
1385
|
"places",
|
|
1160
1386
|
"price",
|
|
1161
1387
|
"action"
|
|
1162
|
-
].includes(part) && !body(part)), renderPart)
|
|
1388
|
+
].includes(part) && !body(part) && !(part === "time" && props.eventRows === "day-schedule")), renderPart)
|
|
1163
1389
|
]
|
|
1164
1390
|
});
|
|
1165
1391
|
}
|
|
@@ -1171,7 +1397,7 @@ function renderCalendarTrailingParts(props, parts, renderPart) {
|
|
|
1171
1397
|
}) : content;
|
|
1172
1398
|
}
|
|
1173
1399
|
function eventItemTag(arrangement) {
|
|
1174
|
-
return arrangement === "ledger" || arrangement === "timetable-rows" || arrangement === "day-groups" || arrangement === "week-columns" ? "li" : "article";
|
|
1400
|
+
return arrangement === "week-groups" || arrangement === "ledger" || arrangement === "timetable-rows" || arrangement === "day-groups" || arrangement === "week-columns" ? "li" : "article";
|
|
1175
1401
|
}
|
|
1176
1402
|
function renderEventItemContentPart({ part, props, facts }) {
|
|
1177
1403
|
switch (part) {
|
|
@@ -1196,19 +1422,27 @@ function renderEventItemContentPart({ part, props, facts }) {
|
|
|
1196
1422
|
})
|
|
1197
1423
|
]
|
|
1198
1424
|
});
|
|
1199
|
-
case "title": return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1425
|
+
case "title": return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1426
|
+
/* @__PURE__ */ jsx("h3", {
|
|
1427
|
+
...listLookSlot(props, "item-title"),
|
|
1428
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
1429
|
+
...facts.link,
|
|
1430
|
+
children: facts.title.title
|
|
1431
|
+
})
|
|
1432
|
+
}),
|
|
1433
|
+
facts.title.runName ? /* @__PURE__ */ jsx("p", {
|
|
1434
|
+
className: "rb-card-list-subtitle rb-caption",
|
|
1435
|
+
"data-card-subtitle": true,
|
|
1436
|
+
children: facts.title.runName
|
|
1437
|
+
}) : null,
|
|
1438
|
+
props.eventRows === "day-schedule" ? null : /* @__PURE__ */ jsx(EventQuickFacts, {
|
|
1439
|
+
facts: props.event.facts,
|
|
1440
|
+
context: "card"
|
|
1204
1441
|
})
|
|
1205
|
-
})
|
|
1206
|
-
facts: props.event.facts,
|
|
1207
|
-
context: "card"
|
|
1208
|
-
})] });
|
|
1442
|
+
] });
|
|
1209
1443
|
case "time": return /* @__PURE__ */ jsxs("p", {
|
|
1210
1444
|
...listLookSlot(props, "time"),
|
|
1211
|
-
children: [hasActionRail(props.arrangement) ? /* @__PURE__ */ jsx(ClockIcon, { "aria-hidden": "true" }) : null, facts.time]
|
|
1445
|
+
children: [hasActionRail(props.arrangement) ? /* @__PURE__ */ jsx(ClockIcon, { "aria-hidden": "true" }) : null, props.arrangement === "week-groups" ? formatEventWeekdayTime(props.event) : facts.time]
|
|
1212
1446
|
});
|
|
1213
1447
|
case "places": return facts.places ? /* @__PURE__ */ jsx("p", {
|
|
1214
1448
|
...listLookSlot(props, "places"),
|
|
@@ -1229,7 +1463,7 @@ function renderEventItemContentPart({ part, props, facts }) {
|
|
|
1229
1463
|
part: "text",
|
|
1230
1464
|
item: {
|
|
1231
1465
|
id: props.event.id,
|
|
1232
|
-
title:
|
|
1466
|
+
title: facts.title.title,
|
|
1233
1467
|
text: facts.description
|
|
1234
1468
|
},
|
|
1235
1469
|
presentation: props
|
|
@@ -1257,7 +1491,7 @@ function renderEventItemImage(props, link) {
|
|
|
1257
1491
|
part: "media",
|
|
1258
1492
|
item: {
|
|
1259
1493
|
id: props.event.id,
|
|
1260
|
-
title: props.event.title,
|
|
1494
|
+
title: eventDisplayTitle(props.event).title,
|
|
1261
1495
|
media: props.event.presentation?.image,
|
|
1262
1496
|
titleLink: link,
|
|
1263
1497
|
newTabHint: link.target === "_blank"
|
|
@@ -1283,8 +1517,7 @@ function renderEventItemAction(props, facts) {
|
|
|
1283
1517
|
const slot = props.arrangement === "grid" ? "item-actions" : "action";
|
|
1284
1518
|
const link = {
|
|
1285
1519
|
href: cta.href,
|
|
1286
|
-
|
|
1287
|
-
rel: cta.external ? "noopener noreferrer" : void 0
|
|
1520
|
+
...eventActionLinkTarget(cta.external)
|
|
1288
1521
|
};
|
|
1289
1522
|
return /* @__PURE__ */ jsx("div", {
|
|
1290
1523
|
...listLookSlot(props, slot),
|
|
@@ -1296,10 +1529,18 @@ function renderEventItemAction(props, facts) {
|
|
|
1296
1529
|
...link,
|
|
1297
1530
|
variant: props.buttonVariant ?? "primary",
|
|
1298
1531
|
size: props.actionSize ?? "sm",
|
|
1532
|
+
extraClassName: props.eventRows === "day-schedule" ? "rb-session-booking" : void 0,
|
|
1299
1533
|
label: cta.label
|
|
1300
1534
|
})
|
|
1301
1535
|
});
|
|
1302
1536
|
}
|
|
1537
|
+
/** External booking actions share the browser target and opener protection. */
|
|
1538
|
+
function eventActionLinkTarget(external) {
|
|
1539
|
+
return external ? {
|
|
1540
|
+
target: "_blank",
|
|
1541
|
+
rel: "noopener noreferrer"
|
|
1542
|
+
} : {};
|
|
1543
|
+
}
|
|
1303
1544
|
const carouselBodyParts = [
|
|
1304
1545
|
"chips",
|
|
1305
1546
|
"numeral",
|
|
@@ -1552,6 +1793,439 @@ function memoizePresentationBlock(present) {
|
|
|
1552
1793
|
};
|
|
1553
1794
|
}
|
|
1554
1795
|
//#endregion
|
|
1796
|
+
//#region ../blocks/src/system/blocks/offerings-preview/scheduleSummary.ts
|
|
1797
|
+
function deriveEventScheduleSummary(event) {
|
|
1798
|
+
const occurrence = occurrenceFromEvent(event);
|
|
1799
|
+
return compareLocalScheduleDates(getLocalScheduleDate(new Date(occurrence.endsAt), resolveBookingBusinessTimeZone(occurrence.timeZone)), getLocalScheduleDate(new Date(occurrence.startsAt), resolveBookingBusinessTimeZone(occurrence.timeZone))) > 0 ? {
|
|
1800
|
+
kind: "multi-day-span",
|
|
1801
|
+
occurrence
|
|
1802
|
+
} : {
|
|
1803
|
+
kind: "single-occurrence",
|
|
1804
|
+
occurrence
|
|
1805
|
+
};
|
|
1806
|
+
}
|
|
1807
|
+
function derivePreviewRunSchedule(event) {
|
|
1808
|
+
const sessions = orderedLiveRunSessions(event.run.sessions).filter(isValidOccurrence);
|
|
1809
|
+
const first = sessions[0];
|
|
1810
|
+
const last = sessions[sessions.length - 1];
|
|
1811
|
+
if (!first || !last) return { kind: "no-live-sessions" };
|
|
1812
|
+
const authoredSummary = formatBookingSchedulePresentation("representative" in event ? event.representative : event);
|
|
1813
|
+
const summary = !authoredSummary && sessions.length === 1 ? deriveEventScheduleSummary(first) : {
|
|
1814
|
+
kind: "scheduled-run",
|
|
1815
|
+
first,
|
|
1816
|
+
last,
|
|
1817
|
+
sessionCount: sessions.length,
|
|
1818
|
+
sessions,
|
|
1819
|
+
authoredSummary
|
|
1820
|
+
};
|
|
1821
|
+
return {
|
|
1822
|
+
kind: "scheduled",
|
|
1823
|
+
firstSession: first,
|
|
1824
|
+
sessionCount: sessions.length,
|
|
1825
|
+
summary
|
|
1826
|
+
};
|
|
1827
|
+
}
|
|
1828
|
+
function occurrenceFromEvent(event) {
|
|
1829
|
+
return {
|
|
1830
|
+
startsAt: event.startsAt,
|
|
1831
|
+
endsAt: event.endsAt,
|
|
1832
|
+
timeZone: event.timeZone
|
|
1833
|
+
};
|
|
1834
|
+
}
|
|
1835
|
+
function isValidOccurrence(value) {
|
|
1836
|
+
return Number.isFinite(Date.parse(value.startsAt)) && Number.isFinite(Date.parse(value.endsAt));
|
|
1837
|
+
}
|
|
1838
|
+
//#endregion
|
|
1839
|
+
//#region ../blocks/src/system/runtime/nodes/events/shared/offeringNextDates.ts
|
|
1840
|
+
/** A bounded display sample only: capacity and booking admission belong to the booking destination. */
|
|
1841
|
+
function offeringDatesBySeries(events, now, booking) {
|
|
1842
|
+
const groups = events.reduce((result, event) => new Map([...result, [event.seriesId, [...result.get(event.seriesId) ?? [], event]]]), /* @__PURE__ */ new Map());
|
|
1843
|
+
return new Map([...groups].map(([seriesId, occurrences]) => [seriesId, orderedUniqueEventOccurrences(occurrences.filter((event) => event.bookingScope !== "whole_series" && Date.parse(event.startsAt) >= now.getTime())).slice(0, 3).map((event) => offeringDateRow(event, event, occurrencePlaces(event), booking))]));
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* A course's dates on a card: its first upcoming session, then how many more
|
|
1847
|
+
* follow ("and 5 more"). One booking covers every session, so the places left
|
|
1848
|
+
* belong to the course: the card says them once, from its own booking decision,
|
|
1849
|
+
* never per date.
|
|
1850
|
+
*/
|
|
1851
|
+
function offeringRunDates(event, now) {
|
|
1852
|
+
if (event.bookingScope !== "whole_series") return {
|
|
1853
|
+
dates: [],
|
|
1854
|
+
datesMore: null
|
|
1855
|
+
};
|
|
1856
|
+
const nextStart = nextLiveRunSessionStartMs(event.run.sessions, now);
|
|
1857
|
+
const upcoming = nextStart === null ? [] : orderedLiveRunSessions(event.run.sessions).filter((session) => Date.parse(session.startsAt) >= nextStart);
|
|
1858
|
+
const [first] = upcoming;
|
|
1859
|
+
if (!first) return {
|
|
1860
|
+
dates: [],
|
|
1861
|
+
datesMore: null
|
|
1862
|
+
};
|
|
1863
|
+
return {
|
|
1864
|
+
dates: [offeringDateRow(first, event, null)],
|
|
1865
|
+
datesMore: formatMoreDates(upcoming.length - 1)
|
|
1866
|
+
};
|
|
1867
|
+
}
|
|
1868
|
+
function offeringDateRow(session, event, places, booking) {
|
|
1869
|
+
const options = eventDateOptions({
|
|
1870
|
+
...event,
|
|
1871
|
+
timeZone: session.timeZone
|
|
1872
|
+
});
|
|
1873
|
+
const date = formatEventCompactDateRail(session.startsAt, options, "as-written");
|
|
1874
|
+
const label = `${date.weekday} ${date.day} ${date.month}, ${formatTime(session.startsAt, options)}`;
|
|
1875
|
+
const bookingLink = booking?.(event, label) ?? null;
|
|
1876
|
+
return {
|
|
1877
|
+
startsAt: session.startsAt,
|
|
1878
|
+
label,
|
|
1879
|
+
...bookingLink ? { booking: bookingLink } : {},
|
|
1880
|
+
places
|
|
1881
|
+
};
|
|
1882
|
+
}
|
|
1883
|
+
/** A single occurrence's row is its own booking, so it reports that occurrence's capacity. */
|
|
1884
|
+
function occurrencePlaces(event) {
|
|
1885
|
+
const capacity = getEventAvailability(event);
|
|
1886
|
+
const status = getEventAvailabilityStatus(event);
|
|
1887
|
+
return capacity.available === null ? null : {
|
|
1888
|
+
label: capacity.isFull ? "Sold out" : `${capacity.available} place${capacity.available === 1 ? "" : "s"} left`,
|
|
1889
|
+
status: capacity.isFull ? "full" : status.status === "filling" ? "low" : "available"
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
//#endregion
|
|
1893
|
+
//#region ../blocks/src/system/runtime/nodes/events/shared/eventCardListContent.ts
|
|
1894
|
+
/** Live offering data only; editorial cards never acquire booking fields. */
|
|
1895
|
+
function eventCardListContent(event, context, buttonText) {
|
|
1896
|
+
const { content, external } = cardProjectionBase(event, buttonText, context);
|
|
1897
|
+
switch (context.kind) {
|
|
1898
|
+
case "event-details": return {
|
|
1899
|
+
...content,
|
|
1900
|
+
chips: offeringTypeChips(event),
|
|
1901
|
+
leadDate: null,
|
|
1902
|
+
newTabHint: false,
|
|
1903
|
+
...offeringSchedule(event)
|
|
1904
|
+
};
|
|
1905
|
+
case "catalogue":
|
|
1906
|
+
case "offering": return {
|
|
1907
|
+
...content,
|
|
1908
|
+
chips: offeringTypeChips(event, context.typeLabel),
|
|
1909
|
+
leadDate: offeringLeadDate(event, context.nextStartMs),
|
|
1910
|
+
newTabHint: external,
|
|
1911
|
+
...offeringSchedule(event, context.now),
|
|
1912
|
+
...event.bookingScope === "whole_series" ? offeringRunDates(event, context.now) : {}
|
|
1913
|
+
};
|
|
1914
|
+
default: return assertNever$1(context);
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
function cardProjectionBase(event, buttonText, context) {
|
|
1918
|
+
const offering = context.kind !== "event-details";
|
|
1919
|
+
const { cta, availability: places, closed } = cardBooking(event, buttonText, context);
|
|
1920
|
+
const titleLink = resolveEventLinkProps(event);
|
|
1921
|
+
const { title, runName } = eventDisplayTitle(event);
|
|
1922
|
+
return {
|
|
1923
|
+
external: cta.external,
|
|
1924
|
+
content: {
|
|
1925
|
+
id: event.occurrenceId || event.id,
|
|
1926
|
+
title,
|
|
1927
|
+
subtitle: runName,
|
|
1928
|
+
...titleLink.href ? { titleLink } : {},
|
|
1929
|
+
quickFacts: event.facts,
|
|
1930
|
+
text: event.presentation?.summary ?? event.description,
|
|
1931
|
+
media: event.presentation?.image,
|
|
1932
|
+
facts: offeringFacts(event, places?.label, offering),
|
|
1933
|
+
availability: places,
|
|
1934
|
+
action: cardAction(cta),
|
|
1935
|
+
bookingClosed: closed ? cta.label : null
|
|
1936
|
+
}
|
|
1937
|
+
};
|
|
1938
|
+
}
|
|
1939
|
+
/** Offering cards carry the render clock; an event's own details show its projected booking state. */
|
|
1940
|
+
function cardBooking(event, buttonText, context) {
|
|
1941
|
+
switch (context.kind) {
|
|
1942
|
+
case "event-details": return resolveEventCardBooking(event, "occurrence", buttonText, { now: null });
|
|
1943
|
+
case "catalogue":
|
|
1944
|
+
case "offering": return resolveEventCardBooking(event, context.kind === "catalogue" ? "series" : "occurrence", event.destination.kind === "external" ? void 0 : buttonText, {
|
|
1945
|
+
now: context.now,
|
|
1946
|
+
count: context.count
|
|
1947
|
+
});
|
|
1948
|
+
default: return assertNever$1(context);
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
function offeringLeadDate(event, startMs) {
|
|
1952
|
+
if (startMs === null || !Number.isFinite(startMs)) return null;
|
|
1953
|
+
const startsAt = new Date(startMs).toISOString();
|
|
1954
|
+
const timeZone = resolveBookingBusinessTimeZone(event.bookingScope === "whole_series" ? orderedLiveRunSessions(event.run.sessions).find((session) => Date.parse(session.startsAt) === startMs)?.timeZone ?? event.timeZone : event.timeZone);
|
|
1955
|
+
return {
|
|
1956
|
+
startsAt,
|
|
1957
|
+
...formatEventCompactDateRail(startsAt, {
|
|
1958
|
+
...eventDateOptions(event),
|
|
1959
|
+
timeZone
|
|
1960
|
+
}, "as-written")
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1963
|
+
function offeringSchedule(event, now) {
|
|
1964
|
+
const run = event.bookingScope === "whole_series" ? derivePreviewRunSchedule(event) : null;
|
|
1965
|
+
if (run?.kind === "no-live-sessions") return {
|
|
1966
|
+
numeral: null,
|
|
1967
|
+
schedule: null
|
|
1968
|
+
};
|
|
1969
|
+
const summary = run?.kind === "scheduled" ? run.summary : deriveEventScheduleSummary(event);
|
|
1970
|
+
return {
|
|
1971
|
+
numeral: run?.kind === "scheduled" ? {
|
|
1972
|
+
value: run.sessionCount,
|
|
1973
|
+
label: run.sessionCount === 1 ? "session" : "sessions"
|
|
1974
|
+
} : null,
|
|
1975
|
+
schedule: scheduleLine(summary, event, now)
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
function scheduleLine(summary, event, now) {
|
|
1979
|
+
const first = "occurrence" in summary ? summary.occurrence : summary.first;
|
|
1980
|
+
const last = "occurrence" in summary ? summary.occurrence : summary.last;
|
|
1981
|
+
const context = eventDateOptions({
|
|
1982
|
+
...event,
|
|
1983
|
+
timeZone: first.timeZone
|
|
1984
|
+
});
|
|
1985
|
+
const zone = context.zone;
|
|
1986
|
+
const endpoint = (value) => ({
|
|
1987
|
+
kind: "instant",
|
|
1988
|
+
value: toUtcIsoDateTimeString(value)
|
|
1989
|
+
});
|
|
1990
|
+
const year = (value, timeZone = context.timeZone) => now && getLocalScheduleDate(new Date(value), timeZone).year === getLocalScheduleDate(now, timeZone).year ? "omit" : "numeric";
|
|
1991
|
+
const date = (value) => formatDate(endpoint(value), context, {
|
|
1992
|
+
date: "short",
|
|
1993
|
+
year: now ? year(value) : "omit"
|
|
1994
|
+
});
|
|
1995
|
+
const dates = (startsAt, endsAt, order = "chronological") => formatDateRange({
|
|
1996
|
+
kind: "civil",
|
|
1997
|
+
value: getLocalScheduleDate(new Date(startsAt), context.timeZone)
|
|
1998
|
+
}, {
|
|
1999
|
+
kind: "civil",
|
|
2000
|
+
value: getLocalScheduleDate(new Date(endsAt), resolveBookingBusinessTimeZone(last.timeZone))
|
|
2001
|
+
}, context, {
|
|
2002
|
+
date: "short",
|
|
2003
|
+
order,
|
|
2004
|
+
year: now && year(startsAt) === "omit" && year(endsAt, resolveBookingBusinessTimeZone(last.timeZone)) === "omit" ? "omit" : now ? "numeric" : "omit"
|
|
2005
|
+
});
|
|
2006
|
+
switch (summary.kind) {
|
|
2007
|
+
case "single-occurrence": return now ? formatDateTimeRange({
|
|
2008
|
+
start: endpoint(summary.occurrence.startsAt).value,
|
|
2009
|
+
end: endpoint(summary.occurrence.endsAt).value
|
|
2010
|
+
}, context, {
|
|
2011
|
+
date: "short",
|
|
2012
|
+
weekday: "short",
|
|
2013
|
+
year: year(summary.occurrence.startsAt),
|
|
2014
|
+
zone
|
|
2015
|
+
}) : date(summary.occurrence.startsAt);
|
|
2016
|
+
case "multi-day-span": return dates(summary.occurrence.startsAt, summary.occurrence.endsAt);
|
|
2017
|
+
case "scheduled-run": {
|
|
2018
|
+
const range = dates(summary.first.startsAt, summary.last.startsAt, "session");
|
|
2019
|
+
if (summary.authoredSummary) return `${range} · ${summary.authoredSummary.text}`;
|
|
2020
|
+
const clock = regularSessionClock(summary.sessions, event);
|
|
2021
|
+
return clock ? `${summary.sessionCount} ${clock.weekday}s, ${range}, ${clock.time}` : `${range} · ${summary.sessionCount} dates · Times vary`;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
/**
|
|
2026
|
+
* A course's facts are said for the whole course ("6 weekly sessions, 1 hour
|
|
2027
|
+
* each", "£72 for the course"), so one session's length never sits beside
|
|
2028
|
+
* the price of all of them.
|
|
2029
|
+
*/
|
|
2030
|
+
function offeringFacts(event, places, offering) {
|
|
2031
|
+
const course = event.bookingScope === "whole_series";
|
|
2032
|
+
const sessions = formatCourseSessions(event);
|
|
2033
|
+
return [
|
|
2034
|
+
...sessions ? [{
|
|
2035
|
+
label: "Length",
|
|
2036
|
+
value: sessions
|
|
2037
|
+
}] : lengthFact(event, !offering || course),
|
|
2038
|
+
...offering && event.venue ? [{
|
|
2039
|
+
label: "Venue",
|
|
2040
|
+
value: event.venue.name
|
|
2041
|
+
}] : [],
|
|
2042
|
+
...places ? [{
|
|
2043
|
+
label: "Places",
|
|
2044
|
+
value: places,
|
|
2045
|
+
kind: "availability"
|
|
2046
|
+
}] : [],
|
|
2047
|
+
...offering && event.pricing.kind === "external" ? [] : [{
|
|
2048
|
+
label: "Price",
|
|
2049
|
+
value: course ? formatCoursePrice(event.pricing) : formatEventPriceDisplay(event.pricing)
|
|
2050
|
+
}]
|
|
2051
|
+
];
|
|
2052
|
+
}
|
|
2053
|
+
function lengthFact(event, shown) {
|
|
2054
|
+
const minutes = Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4);
|
|
2055
|
+
return shown && minutes > 0 ? [{
|
|
2056
|
+
label: "Length",
|
|
2057
|
+
value: formatEventDuration(event, "readable")
|
|
2058
|
+
}] : [];
|
|
2059
|
+
}
|
|
2060
|
+
function offeringTypeChips(event, typeLabel) {
|
|
2061
|
+
return event.eventCategory ? [event.eventCategory.name] : typeLabel ? [typeLabel] : [];
|
|
2062
|
+
}
|
|
2063
|
+
function cardAction(cta) {
|
|
2064
|
+
return cta.hidden ? { label: cta.label } : {
|
|
2065
|
+
label: cta.label,
|
|
2066
|
+
href: cta.href,
|
|
2067
|
+
external: cta.external
|
|
2068
|
+
};
|
|
2069
|
+
}
|
|
2070
|
+
/** Compare each session in its own local zone, so regular clocks survive DST changes. Null when sessions differ. */
|
|
2071
|
+
function regularSessionClock(sessions, event) {
|
|
2072
|
+
const clocks = sessions.map((session) => {
|
|
2073
|
+
const context = {
|
|
2074
|
+
...eventDateOptions({
|
|
2075
|
+
...event,
|
|
2076
|
+
timeZone: session.timeZone
|
|
2077
|
+
}),
|
|
2078
|
+
zone: "omit"
|
|
2079
|
+
};
|
|
2080
|
+
return {
|
|
2081
|
+
weekday: formatDate({
|
|
2082
|
+
kind: "instant",
|
|
2083
|
+
value: toUtcIsoDateTimeString(session.startsAt)
|
|
2084
|
+
}, context, {
|
|
2085
|
+
date: "omit",
|
|
2086
|
+
weekday: "long",
|
|
2087
|
+
year: "omit"
|
|
2088
|
+
}),
|
|
2089
|
+
time: formatEventTimeRange(session, context)
|
|
2090
|
+
};
|
|
2091
|
+
});
|
|
2092
|
+
const first = clocks[0];
|
|
2093
|
+
return first && clocks.every((clock) => clock.weekday === first.weekday && clock.time === first.time) ? first : null;
|
|
2094
|
+
}
|
|
2095
|
+
//#endregion
|
|
2096
|
+
//#region ../blocks/src/system/runtime/nodes/offerings-preview-courses.tsx
|
|
2097
|
+
/** Course cards own parent copy once, while rows reuse the normal booking projection. */
|
|
2098
|
+
function OfferingCourseCards({ items, presentation, now, Carousel, buttonText }) {
|
|
2099
|
+
const courses = groupOfferingRunsByCourse(items);
|
|
2100
|
+
const ungrouped = items.filter((item) => item.kind !== "run" || !item.run.run.listing);
|
|
2101
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2102
|
+
...listLookSlot(presentation, "items"),
|
|
2103
|
+
children: [courses.map(({ id, course, parts }) => /* @__PURE__ */ jsxs("article", {
|
|
2104
|
+
...listLookSlot(presentation, "item"),
|
|
2105
|
+
children: [
|
|
2106
|
+
presentation.showPhotos !== false ? /* @__PURE__ */ jsx(CardListContentPart, {
|
|
2107
|
+
part: "media",
|
|
2108
|
+
item: {
|
|
2109
|
+
id,
|
|
2110
|
+
title: course.title,
|
|
2111
|
+
media: course.presentation?.image
|
|
2112
|
+
},
|
|
2113
|
+
presentation
|
|
2114
|
+
}) : null,
|
|
2115
|
+
/* @__PURE__ */ jsxs("header", {
|
|
2116
|
+
...listLookSlot(presentation, "item-body"),
|
|
2117
|
+
children: [
|
|
2118
|
+
/* @__PURE__ */ jsx(EventQuickFacts, {
|
|
2119
|
+
facts: course.facts,
|
|
2120
|
+
context: "card",
|
|
2121
|
+
eyebrow: true
|
|
2122
|
+
}),
|
|
2123
|
+
/* @__PURE__ */ jsx("h3", {
|
|
2124
|
+
...listLookSlot(presentation, "item-title"),
|
|
2125
|
+
children: course.title
|
|
2126
|
+
}),
|
|
2127
|
+
course.presentation?.summary ? /* @__PURE__ */ jsx("p", {
|
|
2128
|
+
...listLookSlot(presentation, "item-text"),
|
|
2129
|
+
children: course.presentation.summary
|
|
2130
|
+
}) : null
|
|
2131
|
+
]
|
|
2132
|
+
}),
|
|
2133
|
+
/* @__PURE__ */ jsx("ol", {
|
|
2134
|
+
...listLookSlot(presentation, "list"),
|
|
2135
|
+
children: parts.map((part) => /* @__PURE__ */ jsx(CoursePart, {
|
|
2136
|
+
part,
|
|
2137
|
+
presentation,
|
|
2138
|
+
now
|
|
2139
|
+
}, part.kind === "run" ? part.run.eventSeriesId : part.event.id))
|
|
2140
|
+
}),
|
|
2141
|
+
course.path ? /* @__PURE__ */ jsx("a", {
|
|
2142
|
+
...listLookSlot(presentation, "more"),
|
|
2143
|
+
className: "rb-item-text-link",
|
|
2144
|
+
href: course.path,
|
|
2145
|
+
children: buttonText
|
|
2146
|
+
}) : null
|
|
2147
|
+
]
|
|
2148
|
+
}, id)), ungrouped.length ? /* @__PURE__ */ jsx(CardListItems, {
|
|
2149
|
+
Carousel,
|
|
2150
|
+
presentation: {
|
|
2151
|
+
...presentation,
|
|
2152
|
+
cardArrangement: "cards"
|
|
2153
|
+
},
|
|
2154
|
+
items: ungrouped.map((item) => coursePartContent(item, now))
|
|
2155
|
+
}) : null]
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
function coursePartContent(part, now) {
|
|
2159
|
+
const content = eventCardListContent(part.kind === "run" ? part.run.representative : part.event, {
|
|
2160
|
+
kind: "offering",
|
|
2161
|
+
now,
|
|
2162
|
+
nextStartMs: part.nextStartMs,
|
|
2163
|
+
count: "always"
|
|
2164
|
+
});
|
|
2165
|
+
return part.kind === "run" && part.run.run.listing ? {
|
|
2166
|
+
...content,
|
|
2167
|
+
title: part.run.run.listing.title ?? part.run.run.listing.course.title
|
|
2168
|
+
} : content;
|
|
2169
|
+
}
|
|
2170
|
+
function CoursePart({ part, presentation, now }) {
|
|
2171
|
+
const content = coursePartContent(part, now);
|
|
2172
|
+
const event = part.kind === "run" ? part.run.representative : part.event;
|
|
2173
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
2174
|
+
...listLookSlot(presentation, "row"),
|
|
2175
|
+
children: [
|
|
2176
|
+
/* @__PURE__ */ jsx(CardListContentPart, {
|
|
2177
|
+
part: "date-stamp",
|
|
2178
|
+
item: content,
|
|
2179
|
+
presentation
|
|
2180
|
+
}),
|
|
2181
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2182
|
+
...listLookSlot(presentation, "what"),
|
|
2183
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
2184
|
+
...listLookSlot(presentation, "group-label"),
|
|
2185
|
+
children: content.titleLink ? /* @__PURE__ */ jsx("a", {
|
|
2186
|
+
...content.titleLink,
|
|
2187
|
+
children: content.title
|
|
2188
|
+
}) : content.title
|
|
2189
|
+
}), /* @__PURE__ */ jsx(CardListContentPart, {
|
|
2190
|
+
part: "schedule",
|
|
2191
|
+
item: content,
|
|
2192
|
+
presentation
|
|
2193
|
+
})]
|
|
2194
|
+
}),
|
|
2195
|
+
/* @__PURE__ */ jsx("p", {
|
|
2196
|
+
...listLookSlot(presentation, "price"),
|
|
2197
|
+
children: formatEventStartingPrice(event.pricing) ?? formatEventPriceDisplay(event.pricing)
|
|
2198
|
+
}),
|
|
2199
|
+
content.bookingClosed ? /* @__PURE__ */ jsx("p", {
|
|
2200
|
+
...listLookSlot(presentation, "availability"),
|
|
2201
|
+
"data-availability": "closed",
|
|
2202
|
+
children: /* @__PURE__ */ jsx("span", { children: content.bookingClosed })
|
|
2203
|
+
}) : /* @__PURE__ */ jsx(CardListContentPart, {
|
|
2204
|
+
part: "availability",
|
|
2205
|
+
item: content,
|
|
2206
|
+
presentation
|
|
2207
|
+
})
|
|
2208
|
+
]
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
/** Slot parents follow course-card markup, including the nested part rows. */
|
|
2212
|
+
const offeringCourseSlotParents = {
|
|
2213
|
+
items: "layout",
|
|
2214
|
+
item: "items",
|
|
2215
|
+
"item-media": "item",
|
|
2216
|
+
"item-body": "item",
|
|
2217
|
+
list: "item",
|
|
2218
|
+
row: "list",
|
|
2219
|
+
what: "row",
|
|
2220
|
+
eyebrow: "item-body",
|
|
2221
|
+
"group-label": "what",
|
|
2222
|
+
schedule: "what",
|
|
2223
|
+
date: "row",
|
|
2224
|
+
availability: "row",
|
|
2225
|
+
price: "row",
|
|
2226
|
+
more: "item"
|
|
2227
|
+
};
|
|
2228
|
+
//#endregion
|
|
1555
2229
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.view.tsx
|
|
1556
2230
|
function EventListingFrameView(props) {
|
|
1557
2231
|
const { display, filters, emptyState, renderEventCard } = props;
|
|
@@ -1566,6 +2240,7 @@ function EventListingFrameView(props) {
|
|
|
1566
2240
|
return /* @__PURE__ */ jsxs("div", {
|
|
1567
2241
|
className: `event-listing ${display.className ?? ""}`,
|
|
1568
2242
|
"data-block": "event-listing",
|
|
2243
|
+
"data-event-rows": display.eventRows,
|
|
1569
2244
|
children: [
|
|
1570
2245
|
filters,
|
|
1571
2246
|
display.state === "loading" ? /* @__PURE__ */ jsx(EmptyState, { message: display.loadingMessage }) : display.state === "empty" ? emptyState ?? /* @__PURE__ */ jsx(EmptyState, { message: display.emptyMessage }) : /* @__PURE__ */ jsx(EventListBody, {
|
|
@@ -1582,69 +2257,27 @@ function EventListBody({ display, renderEventCard, footer }) {
|
|
|
1582
2257
|
className: display.containerClass,
|
|
1583
2258
|
children: display.events.map(renderEventCard)
|
|
1584
2259
|
});
|
|
1585
|
-
|
|
1586
|
-
display
|
|
1587
|
-
week: display
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
...listLookSlot(display, "group-date"),
|
|
1602
|
-
children: [
|
|
1603
|
-
date.day,
|
|
1604
|
-
" ",
|
|
1605
|
-
date.month
|
|
1606
|
-
]
|
|
1607
|
-
})]
|
|
1608
|
-
}), /* @__PURE__ */ jsx("ol", { children: display.events.filter((event) => eventLocalDateKey(event) === eventLocalDateKey(first)).map((event) => /* @__PURE__ */ jsx(EventItem, {
|
|
1609
|
-
...listItemPresentation(display, display.events.indexOf(event), display.events.length),
|
|
1610
|
-
event,
|
|
1611
|
-
arrangement: "day-groups"
|
|
1612
|
-
}, event.occurrenceId || event.id)) })]
|
|
1613
|
-
}, eventLocalDateKey(first));
|
|
1614
|
-
})
|
|
1615
|
-
});
|
|
1616
|
-
if (display.listLayout === "ledger" || display.listLayout === "timetable-rows") {
|
|
1617
|
-
const arrangement = display.listLayout;
|
|
1618
|
-
return /* @__PURE__ */ jsx("ol", {
|
|
2260
|
+
switch (display.listLayout) {
|
|
2261
|
+
case "week-groups": return /* @__PURE__ */ jsx(WeekGroups, { display });
|
|
2262
|
+
case "week-columns": return /* @__PURE__ */ jsx(WeekColumnList, { display });
|
|
2263
|
+
case "day-groups": return /* @__PURE__ */ jsx(DayGroups, { display });
|
|
2264
|
+
case "ledger":
|
|
2265
|
+
case "timetable-rows": return /* @__PURE__ */ jsx(EventRows, {
|
|
2266
|
+
display,
|
|
2267
|
+
arrangement: display.listLayout
|
|
2268
|
+
});
|
|
2269
|
+
case "compact": return /* @__PURE__ */ jsx(CompactPanel, {
|
|
2270
|
+
display,
|
|
2271
|
+
renderEventCard,
|
|
2272
|
+
footer
|
|
2273
|
+
});
|
|
2274
|
+
case "grid":
|
|
2275
|
+
case "stack": return /* @__PURE__ */ jsx("div", {
|
|
1619
2276
|
...listLookSlot(display, "list"),
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
event,
|
|
1623
|
-
arrangement,
|
|
1624
|
-
continued: index > 0 && eventLocalDateKey(event) === eventLocalDateKey(events[index - 1] ?? event)
|
|
1625
|
-
}, event.occurrenceId || event.id))
|
|
2277
|
+
className: display.containerClass,
|
|
2278
|
+
children: display.events.map(renderEventCard)
|
|
1626
2279
|
});
|
|
1627
2280
|
}
|
|
1628
|
-
if (display.listLayout === "compact") return /* @__PURE__ */ jsxs("aside", {
|
|
1629
|
-
...listLookSlot(display, "panel"),
|
|
1630
|
-
className: display.containerClass,
|
|
1631
|
-
children: [
|
|
1632
|
-
display.panelHeading !== void 0 ? /* @__PURE__ */ jsx("h3", {
|
|
1633
|
-
...listLookSlot(display, "panel-heading"),
|
|
1634
|
-
children: display.panelHeading
|
|
1635
|
-
}) : null,
|
|
1636
|
-
/* @__PURE__ */ jsx("div", {
|
|
1637
|
-
...listLookSlot(display, "list"),
|
|
1638
|
-
children: display.events.map(renderEventCard)
|
|
1639
|
-
}),
|
|
1640
|
-
footer
|
|
1641
|
-
]
|
|
1642
|
-
});
|
|
1643
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1644
|
-
...listLookSlot(display, "list"),
|
|
1645
|
-
className: display.containerClass,
|
|
1646
|
-
children: display.events.map(renderEventCard)
|
|
1647
|
-
});
|
|
1648
2281
|
}
|
|
1649
2282
|
/** All seven days of the shown week; a day known to be empty says so, and a wholly empty week never reaches here. */
|
|
1650
2283
|
function WeekColumns({ display, week }) {
|
|
@@ -1686,19 +2319,172 @@ function WeekColumns({ display, week }) {
|
|
|
1686
2319
|
function hasArrangementPanel(display) {
|
|
1687
2320
|
return display.state === "ready" && display.lookSlots !== void 0 && display.listLayout === "compact";
|
|
1688
2321
|
}
|
|
1689
|
-
/** Nearest slot parents in EventListBody and WeekColumns. */
|
|
1690
|
-
/** `root` is the declared slot the listing renders inside (a Look may paint the block's layout), or null. */
|
|
1691
|
-
function eventListSlotParents(arrangement, root = null) {
|
|
1692
|
-
return {
|
|
1693
|
-
list:
|
|
1694
|
-
|
|
1695
|
-
group: "
|
|
1696
|
-
"group-
|
|
1697
|
-
"group-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
2322
|
+
/** Nearest slot parents in EventListBody and WeekColumns. */
|
|
2323
|
+
/** `root` is the declared slot the listing renders inside (a Look may paint the block's layout), or null. */
|
|
2324
|
+
function eventListSlotParents(arrangement, root = null, eventRows) {
|
|
2325
|
+
if (eventRows === "day-schedule") return {
|
|
2326
|
+
list: root,
|
|
2327
|
+
group: "list",
|
|
2328
|
+
"group-label": "group",
|
|
2329
|
+
"group-date": "group-label",
|
|
2330
|
+
"group-day": "group-label",
|
|
2331
|
+
day: "group-date",
|
|
2332
|
+
month: "group-date",
|
|
2333
|
+
items: "group",
|
|
2334
|
+
row: "items",
|
|
2335
|
+
"row-continued": "items"
|
|
2336
|
+
};
|
|
2337
|
+
return {
|
|
2338
|
+
list: arrangement === "compact" ? "panel" : root,
|
|
2339
|
+
panel: root,
|
|
2340
|
+
group: "list",
|
|
2341
|
+
"group-label": "group",
|
|
2342
|
+
"group-date": "group-label",
|
|
2343
|
+
item: "list",
|
|
2344
|
+
...arrangement === "week-groups" ? {
|
|
2345
|
+
items: "group",
|
|
2346
|
+
row: "items"
|
|
2347
|
+
} : { row: arrangement === "week-columns" || arrangement === "day-groups" ? "group" : "list" },
|
|
2348
|
+
"row-continued": "list"
|
|
2349
|
+
};
|
|
2350
|
+
}
|
|
2351
|
+
function WeekGroups({ display }) {
|
|
2352
|
+
const context = display.weekGrouping;
|
|
2353
|
+
if (!context) return /* @__PURE__ */ jsx(DayGroups, { display });
|
|
2354
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
2355
|
+
...listLookSlot(display, "list"),
|
|
2356
|
+
children: groupEventsByWeek(display.events, context).map((week) => /* @__PURE__ */ jsxs("li", {
|
|
2357
|
+
...listLookSlot(display, "group"),
|
|
2358
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
2359
|
+
...listLookSlot(display, "group-label"),
|
|
2360
|
+
children: week.label
|
|
2361
|
+
}), /* @__PURE__ */ jsx("ol", {
|
|
2362
|
+
...listLookSlot(display, "items"),
|
|
2363
|
+
children: week.events.map((event) => /* @__PURE__ */ jsx(EventItem, {
|
|
2364
|
+
...listItemPresentation(display, display.events.indexOf(event), display.events.length),
|
|
2365
|
+
event,
|
|
2366
|
+
arrangement: "week-groups"
|
|
2367
|
+
}, event.occurrenceId || event.id))
|
|
2368
|
+
})]
|
|
2369
|
+
}, week.key))
|
|
2370
|
+
});
|
|
2371
|
+
}
|
|
2372
|
+
function DayGroups({ display }) {
|
|
2373
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
2374
|
+
...listLookSlot(display, "list"),
|
|
2375
|
+
children: display.events.filter((event, index, events) => events.findIndex((candidate) => eventLocalDateKey(candidate) === eventLocalDateKey(event)) === index).map((first) => {
|
|
2376
|
+
const date = formatEventCompactDateRail(first.startsAt, eventDateOptions(first), "as-written");
|
|
2377
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
2378
|
+
...listLookSlot(display, "group"),
|
|
2379
|
+
children: [/* @__PURE__ */ jsxs("h3", {
|
|
2380
|
+
...listLookSlot(display, "group-label"),
|
|
2381
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2382
|
+
...listLookSlot(display, "group-day"),
|
|
2383
|
+
children: date.weekday
|
|
2384
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
2385
|
+
...listLookSlot(display, "group-date"),
|
|
2386
|
+
children: [
|
|
2387
|
+
date.day,
|
|
2388
|
+
" ",
|
|
2389
|
+
date.month
|
|
2390
|
+
]
|
|
2391
|
+
})]
|
|
2392
|
+
}), /* @__PURE__ */ jsx("ol", { children: display.events.filter((event) => eventLocalDateKey(event) === eventLocalDateKey(first)).map((event) => /* @__PURE__ */ jsx(EventItem, {
|
|
2393
|
+
...listItemPresentation(display, display.events.indexOf(event), display.events.length),
|
|
2394
|
+
event,
|
|
2395
|
+
arrangement: "day-groups"
|
|
2396
|
+
}, event.occurrenceId || event.id)) })]
|
|
2397
|
+
}, eventLocalDateKey(first));
|
|
2398
|
+
})
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2401
|
+
function EventRows({ display, arrangement }) {
|
|
2402
|
+
if (display.eventRows === "day-schedule") return /* @__PURE__ */ jsx(DaySchedule, { display });
|
|
2403
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
2404
|
+
...listLookSlot(display, "list"),
|
|
2405
|
+
children: display.events.map((event, index, events) => /* @__PURE__ */ jsx(EventItem, {
|
|
2406
|
+
...listItemPresentation(display, index, events.length),
|
|
2407
|
+
event,
|
|
2408
|
+
arrangement,
|
|
2409
|
+
continued: index > 0 && eventLocalDateKey(event) === eventLocalDateKey(events[index - 1] ?? event)
|
|
2410
|
+
}, event.occurrenceId || event.id))
|
|
2411
|
+
});
|
|
2412
|
+
}
|
|
2413
|
+
function CompactPanel({ display, renderEventCard, footer }) {
|
|
2414
|
+
return /* @__PURE__ */ jsxs("aside", {
|
|
2415
|
+
...listLookSlot(display, "panel"),
|
|
2416
|
+
className: display.containerClass,
|
|
2417
|
+
children: [
|
|
2418
|
+
display.panelHeading !== void 0 ? /* @__PURE__ */ jsx("h3", {
|
|
2419
|
+
...listLookSlot(display, "panel-heading"),
|
|
2420
|
+
children: display.panelHeading
|
|
2421
|
+
}) : null,
|
|
2422
|
+
/* @__PURE__ */ jsx("div", {
|
|
2423
|
+
...listLookSlot(display, "list"),
|
|
2424
|
+
children: display.events.map(renderEventCard)
|
|
2425
|
+
}),
|
|
2426
|
+
footer
|
|
2427
|
+
]
|
|
2428
|
+
});
|
|
2429
|
+
}
|
|
2430
|
+
function WeekColumnList({ display }) {
|
|
2431
|
+
return display.week ? /* @__PURE__ */ jsx(WeekColumns, {
|
|
2432
|
+
display,
|
|
2433
|
+
week: display.week
|
|
2434
|
+
}) : /* @__PURE__ */ jsx(DayGroups, { display });
|
|
2435
|
+
}
|
|
2436
|
+
/** Opt-in structure on the ledger: each session shows its quick facts as tags above its title. */
|
|
2437
|
+
function DaySchedule({ display }) {
|
|
2438
|
+
const options = eventDateOptions({ siteTimeZone: display.weekGrouping?.timeZone ?? display.events[0]?.siteTimeZone });
|
|
2439
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
2440
|
+
...listLookSlot(display, "list"),
|
|
2441
|
+
children: [...groupEventsByDate([...display.events], options.timeZone)].map(([key, events]) => {
|
|
2442
|
+
const first = events[0];
|
|
2443
|
+
if (!first) return null;
|
|
2444
|
+
const date = formatEventCompactDateRail(first.startsAt, options, "as-written");
|
|
2445
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
2446
|
+
...listLookSlot(display, "group"),
|
|
2447
|
+
children: [/* @__PURE__ */ jsxs("h3", {
|
|
2448
|
+
...listLookSlot(display, "group-label"),
|
|
2449
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
2450
|
+
...listLookSlot(display, "group-date"),
|
|
2451
|
+
"aria-hidden": "true",
|
|
2452
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2453
|
+
...listLookSlot(display, "day"),
|
|
2454
|
+
children: date.day
|
|
2455
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2456
|
+
...listLookSlot(display, "month"),
|
|
2457
|
+
children: date.month
|
|
2458
|
+
})]
|
|
2459
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
2460
|
+
...listLookSlot(display, "group-day"),
|
|
2461
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2462
|
+
"aria-hidden": "true",
|
|
2463
|
+
children: date.fullWeekday
|
|
2464
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2465
|
+
className: "rb-sr-only",
|
|
2466
|
+
children: date.label
|
|
2467
|
+
})]
|
|
2468
|
+
})]
|
|
2469
|
+
}), /* @__PURE__ */ jsx("ol", {
|
|
2470
|
+
...listLookSlot(display, "items"),
|
|
2471
|
+
children: events.map((event) => /* @__PURE__ */ jsx(EventItem, {
|
|
2472
|
+
...listItemPresentation(display, display.events.indexOf(event), display.events.length),
|
|
2473
|
+
event,
|
|
2474
|
+
arrangement: "ledger",
|
|
2475
|
+
showCapacity: display.showCapacity,
|
|
2476
|
+
parts: [
|
|
2477
|
+
"title",
|
|
2478
|
+
"time",
|
|
2479
|
+
"places",
|
|
2480
|
+
"action"
|
|
2481
|
+
],
|
|
2482
|
+
itemActionStyle: "button"
|
|
2483
|
+
}, event.occurrenceId || event.id))
|
|
2484
|
+
})]
|
|
2485
|
+
}, key);
|
|
2486
|
+
})
|
|
2487
|
+
});
|
|
1702
2488
|
}
|
|
1703
2489
|
//#endregion
|
|
1704
2490
|
//#region ../blocks/src/system/runtime/nodes/events/shared/MonthLookView.tsx
|
|
@@ -1720,7 +2506,7 @@ function MonthEvent({ event, timeZone, locale, presentation }) {
|
|
|
1720
2506
|
" ",
|
|
1721
2507
|
/* @__PURE__ */ jsx("span", {
|
|
1722
2508
|
...listLookSlot(presentation, "what"),
|
|
1723
|
-
children: event
|
|
2509
|
+
children: eventDisplayTitleText(event)
|
|
1724
2510
|
})
|
|
1725
2511
|
]
|
|
1726
2512
|
});
|
|
@@ -1846,190 +2632,6 @@ function monthSlotParents(arrangement) {
|
|
|
1846
2632
|
};
|
|
1847
2633
|
}
|
|
1848
2634
|
//#endregion
|
|
1849
|
-
//#region ../blocks/src/system/blocks/offerings-preview/scheduleSummary.ts
|
|
1850
|
-
function deriveEventScheduleSummary(event) {
|
|
1851
|
-
const occurrence = occurrenceFromEvent(event);
|
|
1852
|
-
return compareLocalScheduleDates(getLocalScheduleDate(new Date(occurrence.endsAt), resolveBookingBusinessTimeZone(occurrence.timeZone)), getLocalScheduleDate(new Date(occurrence.startsAt), resolveBookingBusinessTimeZone(occurrence.timeZone))) > 0 ? {
|
|
1853
|
-
kind: "multi-day-span",
|
|
1854
|
-
occurrence
|
|
1855
|
-
} : {
|
|
1856
|
-
kind: "single-occurrence",
|
|
1857
|
-
occurrence
|
|
1858
|
-
};
|
|
1859
|
-
}
|
|
1860
|
-
function derivePreviewRunSchedule(event) {
|
|
1861
|
-
const sessions = orderedLiveRunSessions(event.run.sessions).filter(isValidOccurrence);
|
|
1862
|
-
const first = sessions[0];
|
|
1863
|
-
const last = sessions[sessions.length - 1];
|
|
1864
|
-
if (!first || !last) return { kind: "no-live-sessions" };
|
|
1865
|
-
const authoredSummary = formatBookingSchedulePresentation("representative" in event ? event.representative : event);
|
|
1866
|
-
const summary = !authoredSummary && sessions.length === 1 ? deriveEventScheduleSummary(first) : {
|
|
1867
|
-
kind: "scheduled-run",
|
|
1868
|
-
first,
|
|
1869
|
-
last,
|
|
1870
|
-
sessionCount: sessions.length,
|
|
1871
|
-
authoredSummary
|
|
1872
|
-
};
|
|
1873
|
-
return {
|
|
1874
|
-
kind: "scheduled",
|
|
1875
|
-
firstSession: first,
|
|
1876
|
-
sessionCount: sessions.length,
|
|
1877
|
-
summary
|
|
1878
|
-
};
|
|
1879
|
-
}
|
|
1880
|
-
function occurrenceFromEvent(event) {
|
|
1881
|
-
return {
|
|
1882
|
-
startsAt: event.startsAt,
|
|
1883
|
-
endsAt: event.endsAt,
|
|
1884
|
-
timeZone: event.timeZone
|
|
1885
|
-
};
|
|
1886
|
-
}
|
|
1887
|
-
function isValidOccurrence(value) {
|
|
1888
|
-
return Number.isFinite(Date.parse(value.startsAt)) && Number.isFinite(Date.parse(value.endsAt));
|
|
1889
|
-
}
|
|
1890
|
-
//#endregion
|
|
1891
|
-
//#region ../blocks/src/system/runtime/nodes/events/shared/eventCardListContent.ts
|
|
1892
|
-
/** Live offering data only; editorial cards never acquire booking fields. */
|
|
1893
|
-
function eventCardListContent(event, context, buttonText) {
|
|
1894
|
-
const { content, external } = cardProjectionBase(event, buttonText, context.kind);
|
|
1895
|
-
switch (context.kind) {
|
|
1896
|
-
case "event-details": return {
|
|
1897
|
-
...content,
|
|
1898
|
-
chips: offeringTypeChips(event),
|
|
1899
|
-
leadDate: null,
|
|
1900
|
-
newTabHint: false,
|
|
1901
|
-
...offeringSchedule(event)
|
|
1902
|
-
};
|
|
1903
|
-
case "catalogue":
|
|
1904
|
-
case "offering": return {
|
|
1905
|
-
...content,
|
|
1906
|
-
chips: offeringTypeChips(event, context.typeLabel),
|
|
1907
|
-
leadDate: offeringLeadDate(event, context.nextStartMs),
|
|
1908
|
-
newTabHint: external,
|
|
1909
|
-
...offeringSchedule(event, context.now)
|
|
1910
|
-
};
|
|
1911
|
-
default: return assertNever$1(context);
|
|
1912
|
-
}
|
|
1913
|
-
}
|
|
1914
|
-
function cardProjectionBase(event, buttonText, context) {
|
|
1915
|
-
const offering = context !== "event-details";
|
|
1916
|
-
const { cta, availability: places } = resolveEventCardBooking(event, context === "catalogue" ? "series" : "occurrence", offering && event.destination.kind === "external" ? void 0 : buttonText);
|
|
1917
|
-
return {
|
|
1918
|
-
external: cta.external,
|
|
1919
|
-
content: {
|
|
1920
|
-
id: event.occurrenceId || event.id,
|
|
1921
|
-
title: event.title,
|
|
1922
|
-
titleLink: resolveEventLinkProps(event),
|
|
1923
|
-
quickFacts: event.facts,
|
|
1924
|
-
text: event.presentation?.summary ?? event.description,
|
|
1925
|
-
media: event.presentation?.image,
|
|
1926
|
-
facts: offeringFacts(event, places?.label, offering),
|
|
1927
|
-
availability: places,
|
|
1928
|
-
action: cardAction(cta)
|
|
1929
|
-
}
|
|
1930
|
-
};
|
|
1931
|
-
}
|
|
1932
|
-
function offeringLeadDate(event, startMs) {
|
|
1933
|
-
if (startMs === null || !Number.isFinite(startMs)) return null;
|
|
1934
|
-
const startsAt = new Date(startMs).toISOString();
|
|
1935
|
-
const timeZone = resolveBookingBusinessTimeZone(event.bookingScope === "whole_series" ? orderedLiveRunSessions(event.run.sessions).find((session) => Date.parse(session.startsAt) === startMs)?.timeZone ?? event.timeZone : event.timeZone);
|
|
1936
|
-
return {
|
|
1937
|
-
startsAt,
|
|
1938
|
-
...formatEventCompactDateRail(startsAt, {
|
|
1939
|
-
...eventDateOptions(event),
|
|
1940
|
-
timeZone
|
|
1941
|
-
}, "as-written")
|
|
1942
|
-
};
|
|
1943
|
-
}
|
|
1944
|
-
function offeringSchedule(event, now) {
|
|
1945
|
-
const run = event.bookingScope === "whole_series" ? derivePreviewRunSchedule(event) : null;
|
|
1946
|
-
if (run?.kind === "no-live-sessions") return {
|
|
1947
|
-
numeral: null,
|
|
1948
|
-
schedule: null
|
|
1949
|
-
};
|
|
1950
|
-
const summary = run?.kind === "scheduled" ? run.summary : deriveEventScheduleSummary(event);
|
|
1951
|
-
return {
|
|
1952
|
-
numeral: run?.kind === "scheduled" ? {
|
|
1953
|
-
value: run.sessionCount,
|
|
1954
|
-
label: run.sessionCount === 1 ? "session" : "sessions"
|
|
1955
|
-
} : null,
|
|
1956
|
-
schedule: scheduleLine(summary, event, now)
|
|
1957
|
-
};
|
|
1958
|
-
}
|
|
1959
|
-
function scheduleLine(summary, event, now) {
|
|
1960
|
-
const first = "occurrence" in summary ? summary.occurrence : summary.first;
|
|
1961
|
-
const last = "occurrence" in summary ? summary.occurrence : summary.last;
|
|
1962
|
-
const context = eventDateOptions({
|
|
1963
|
-
...event,
|
|
1964
|
-
timeZone: first.timeZone
|
|
1965
|
-
});
|
|
1966
|
-
const zone = context.zone;
|
|
1967
|
-
const endpoint = (value) => ({
|
|
1968
|
-
kind: "instant",
|
|
1969
|
-
value: toUtcIsoDateTimeString(value)
|
|
1970
|
-
});
|
|
1971
|
-
const year = (value, timeZone = context.timeZone) => now && getLocalScheduleDate(new Date(value), timeZone).year === getLocalScheduleDate(now, timeZone).year ? "omit" : "numeric";
|
|
1972
|
-
const date = (value) => formatDate(endpoint(value), context, {
|
|
1973
|
-
date: "short",
|
|
1974
|
-
year: now ? year(value) : "omit"
|
|
1975
|
-
});
|
|
1976
|
-
const dates = (startsAt, endsAt, order = "chronological") => formatDateRange({
|
|
1977
|
-
kind: "civil",
|
|
1978
|
-
value: getLocalScheduleDate(new Date(startsAt), context.timeZone)
|
|
1979
|
-
}, {
|
|
1980
|
-
kind: "civil",
|
|
1981
|
-
value: getLocalScheduleDate(new Date(endsAt), resolveBookingBusinessTimeZone(last.timeZone))
|
|
1982
|
-
}, context, {
|
|
1983
|
-
date: "short",
|
|
1984
|
-
order,
|
|
1985
|
-
year: now && year(startsAt) === "omit" && year(endsAt, resolveBookingBusinessTimeZone(last.timeZone)) === "omit" ? "omit" : now ? "numeric" : "omit"
|
|
1986
|
-
});
|
|
1987
|
-
switch (summary.kind) {
|
|
1988
|
-
case "single-occurrence": return now ? formatDateTimeRange({
|
|
1989
|
-
start: endpoint(summary.occurrence.startsAt).value,
|
|
1990
|
-
end: endpoint(summary.occurrence.endsAt).value
|
|
1991
|
-
}, context, {
|
|
1992
|
-
date: "short",
|
|
1993
|
-
weekday: "short",
|
|
1994
|
-
year: year(summary.occurrence.startsAt),
|
|
1995
|
-
zone
|
|
1996
|
-
}) : date(summary.occurrence.startsAt);
|
|
1997
|
-
case "multi-day-span": return dates(summary.occurrence.startsAt, summary.occurrence.endsAt);
|
|
1998
|
-
case "scheduled-run": return `${dates(summary.first.startsAt, summary.last.startsAt, "session")} · ${summary.authoredSummary?.text ?? `${summary.sessionCount} dates`}`;
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
function offeringFacts(event, places, offering) {
|
|
2002
|
-
return [
|
|
2003
|
-
...Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4) > 0 && (!offering || event.bookingScope === "whole_series") ? [{
|
|
2004
|
-
label: "Length",
|
|
2005
|
-
value: formatEventDuration(event, "readable")
|
|
2006
|
-
}] : [],
|
|
2007
|
-
...offering && event.venue ? [{
|
|
2008
|
-
label: "Venue",
|
|
2009
|
-
value: event.venue.name
|
|
2010
|
-
}] : [],
|
|
2011
|
-
...places ? [{
|
|
2012
|
-
label: "Places",
|
|
2013
|
-
value: places,
|
|
2014
|
-
kind: "availability"
|
|
2015
|
-
}] : [],
|
|
2016
|
-
...offering && event.pricing.kind === "external" ? [] : [{
|
|
2017
|
-
label: "Price",
|
|
2018
|
-
value: formatEventPriceDisplay(event.pricing)
|
|
2019
|
-
}]
|
|
2020
|
-
];
|
|
2021
|
-
}
|
|
2022
|
-
function offeringTypeChips(event, typeLabel) {
|
|
2023
|
-
return event.eventCategory ? [event.eventCategory.name] : typeLabel ? [typeLabel] : [];
|
|
2024
|
-
}
|
|
2025
|
-
function cardAction(cta) {
|
|
2026
|
-
return cta.hidden ? { label: cta.label } : {
|
|
2027
|
-
label: cta.label,
|
|
2028
|
-
href: cta.href,
|
|
2029
|
-
external: cta.external
|
|
2030
|
-
};
|
|
2031
|
-
}
|
|
2032
|
-
//#endregion
|
|
2033
2635
|
//#region ../blocks/src/system/runtime/nodes/event-registration/constants.ts
|
|
2034
2636
|
const EVENT_REGISTRATION_ANCHOR_ID = "event-registration";
|
|
2035
2637
|
//#endregion
|
|
@@ -2187,7 +2789,7 @@ function arrangementSlotParents(input) {
|
|
|
2187
2789
|
const { target, arrangement } = input;
|
|
2188
2790
|
if (target === "events") return {
|
|
2189
2791
|
...derived,
|
|
2190
|
-
...eventListSlotParents(arrangement, "layout" in derived ? "layout" : null),
|
|
2792
|
+
...eventListSlotParents(arrangement, "layout" in derived ? "layout" : null, input.eventRows),
|
|
2191
2793
|
...eventItemSlotParents(arrangement),
|
|
2192
2794
|
...arrangement === "month-grid" || arrangement === "month-day" ? monthSlotParents(arrangement) : {}
|
|
2193
2795
|
};
|
|
@@ -2195,6 +2797,10 @@ function arrangementSlotParents(input) {
|
|
|
2195
2797
|
...derived,
|
|
2196
2798
|
...eventHeaderSlotParents
|
|
2197
2799
|
};
|
|
2800
|
+
if (arrangement === "course-groups") return {
|
|
2801
|
+
...derived,
|
|
2802
|
+
...offeringCourseSlotParents
|
|
2803
|
+
};
|
|
2198
2804
|
if (target === "feature-cards") return {
|
|
2199
2805
|
...derived,
|
|
2200
2806
|
...cardItemSlotParents(arrangement)
|
|
@@ -2202,11 +2808,12 @@ function arrangementSlotParents(input) {
|
|
|
2202
2808
|
return derived;
|
|
2203
2809
|
}
|
|
2204
2810
|
/** The selected layout is shared by the planner and its diagnostic consumers. */
|
|
2205
|
-
function arrangementSlotParentsForManifest(manifest, target, arrangement) {
|
|
2811
|
+
function arrangementSlotParentsForManifest(manifest, target, arrangement, eventRows) {
|
|
2206
2812
|
return arrangementSlotParents({
|
|
2207
2813
|
tree: manifest?.variants?.[arrangement] ?? manifest?.layout,
|
|
2208
2814
|
target,
|
|
2209
|
-
arrangement
|
|
2815
|
+
arrangement,
|
|
2816
|
+
eventRows
|
|
2210
2817
|
});
|
|
2211
2818
|
}
|
|
2212
2819
|
//#endregion
|
|
@@ -2618,6 +3225,65 @@ function childFields(field) {
|
|
|
2618
3225
|
return [];
|
|
2619
3226
|
}
|
|
2620
3227
|
//#endregion
|
|
3228
|
+
//#region ../blocks/src/system/customize/lookParts.ts
|
|
3229
|
+
const lookParts = {
|
|
3230
|
+
"block.hero": [{
|
|
3231
|
+
part: "more photos",
|
|
3232
|
+
fields: ["morePhotos"],
|
|
3233
|
+
shownIn: ["photo-trio"]
|
|
3234
|
+
}],
|
|
3235
|
+
"block.cta-full": [{
|
|
3236
|
+
part: "figure",
|
|
3237
|
+
fields: ["figure", "figureNote"],
|
|
3238
|
+
shownIn: ["figure"]
|
|
3239
|
+
}],
|
|
3240
|
+
"block.location-map": [{
|
|
3241
|
+
part: "entrance photo",
|
|
3242
|
+
fields: ["entrancePhoto"],
|
|
3243
|
+
shownIn: ["photo-and-details"]
|
|
3244
|
+
}],
|
|
3245
|
+
"block.feature-cards": [{
|
|
3246
|
+
part: "eyebrow",
|
|
3247
|
+
fields: ["eyebrow"],
|
|
3248
|
+
shownIn: [
|
|
3249
|
+
"lead-support",
|
|
3250
|
+
"index",
|
|
3251
|
+
"sequence",
|
|
3252
|
+
"slides",
|
|
3253
|
+
"track"
|
|
3254
|
+
]
|
|
3255
|
+
}],
|
|
3256
|
+
"block.event-details": [{
|
|
3257
|
+
part: "title",
|
|
3258
|
+
fields: ["showTitle"],
|
|
3259
|
+
shownIn: ["details-panel"]
|
|
3260
|
+
}, {
|
|
3261
|
+
part: "description",
|
|
3262
|
+
fields: ["showDescription"],
|
|
3263
|
+
shownIn: ["details-panel"]
|
|
3264
|
+
}]
|
|
3265
|
+
};
|
|
3266
|
+
/** Fields the arrangement leaves out. Nothing on an older style, where no arrangement Look shows the block. */
|
|
3267
|
+
function fieldsNotShownIn(blockKind, arrangement) {
|
|
3268
|
+
if (arrangement === null) return [];
|
|
3269
|
+
return (lookParts[blockKind] ?? []).flatMap((part) => part.shownIn.includes(arrangement) ? [] : part.fields);
|
|
3270
|
+
}
|
|
3271
|
+
function lookPartShown(blockKind, field, arrangement) {
|
|
3272
|
+
return !fieldsNotShownIn(blockKind, arrangement).includes(field);
|
|
3273
|
+
}
|
|
3274
|
+
//#endregion
|
|
3275
|
+
//#region ../blocks/src/system/transforms/registry/classPrices.ts
|
|
3276
|
+
const classPriceItemsTransform = {
|
|
3277
|
+
id: "events.classPriceItems",
|
|
3278
|
+
kind: "collection",
|
|
3279
|
+
summary: "Live class price items with editable copy",
|
|
3280
|
+
run(value, _options, context) {
|
|
3281
|
+
const data = classPricesDataSchema.safeParse(value);
|
|
3282
|
+
const copy = classPricesCopySchema.safeParse(context.viewModel?.content);
|
|
3283
|
+
return data.success ? resolveClassPriceItems(data.data, copy.success ? copy.data : {}) : [];
|
|
3284
|
+
}
|
|
3285
|
+
};
|
|
3286
|
+
//#endregion
|
|
2621
3287
|
//#region ../blocks/src/system/transforms/registry/eventRegistrationPageKind.ts
|
|
2622
3288
|
const eventRegistrationPageReadAdmission = {
|
|
2623
3289
|
id: "events.registrationPageReadAdmission",
|
|
@@ -3084,6 +3750,7 @@ const serviceDetailsSourceSchema = z.object({
|
|
|
3084
3750
|
pricing: publicAppointmentPricingSchema.optional(),
|
|
3085
3751
|
priceAmount: z.number().nullable(),
|
|
3086
3752
|
priceCurrency: z.string().nullable(),
|
|
3753
|
+
requiresApproval: z.boolean().optional(),
|
|
3087
3754
|
onlinePaymentMode: z.enum(["session_or_package", "package_only"]).optional(),
|
|
3088
3755
|
location: publicAppointmentLocationSchema,
|
|
3089
3756
|
cancellationPolicy: z.object({ refunds: z.object({
|
|
@@ -3111,6 +3778,10 @@ function serviceDetailsFacts(service) {
|
|
|
3111
3778
|
const location = formatAppointmentLocation(service.location);
|
|
3112
3779
|
const practitioners = service.practitioners ?? [];
|
|
3113
3780
|
return [
|
|
3781
|
+
...service.requiresApproval ? [{
|
|
3782
|
+
label: "Booking",
|
|
3783
|
+
value: "You ask for a time, and it’s booked once it’s accepted."
|
|
3784
|
+
}] : [],
|
|
3114
3785
|
{
|
|
3115
3786
|
label: "How long",
|
|
3116
3787
|
value: formatAppointmentDuration(service.durationMinutes)
|
|
@@ -3149,24 +3820,26 @@ const serviceDetailsFactsTransform = {
|
|
|
3149
3820
|
summary: "Read the facts shown for one appointment service",
|
|
3150
3821
|
run: (value) => readServiceDetailsFacts(value)
|
|
3151
3822
|
};
|
|
3823
|
+
/** Display props for the client: the section's scope in content-field shape. */
|
|
3152
3824
|
const eventCalendarSelectionParam = {
|
|
3153
3825
|
id: "events.calendarSelectionParam",
|
|
3154
3826
|
kind: "formatter",
|
|
3155
3827
|
summary: "Resolve selected events instead of discovery filters",
|
|
3156
|
-
schema: z.object({ key: z.enum([
|
|
3157
|
-
"seriesIds",
|
|
3158
|
-
"eventSurface",
|
|
3159
|
-
"filterEventPresets",
|
|
3160
|
-
"scheduleScope",
|
|
3161
|
-
"filterCategoryIds",
|
|
3162
|
-
"filterStaffMemberId",
|
|
3163
|
-
"filterVenueId"
|
|
3164
|
-
]) }),
|
|
3828
|
+
schema: z.object({ key: z.enum(["seriesIds", ...eventDiscoveryFilterKeys]) }),
|
|
3165
3829
|
run(value, { key }) {
|
|
3166
|
-
const
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3830
|
+
const scope = resolveEventScope(asPartialObject(value) ?? {});
|
|
3831
|
+
if (scope.kind === "selected") return key === "seriesIds" ? scope.seriesIds : void 0;
|
|
3832
|
+
return key === "seriesIds" ? void 0 : scope.filters[key];
|
|
3833
|
+
}
|
|
3834
|
+
};
|
|
3835
|
+
/** Public event query params for the section's scope, shared by render loaders and readiness. */
|
|
3836
|
+
const eventScopeParam = {
|
|
3837
|
+
id: "events.scopeParam",
|
|
3838
|
+
kind: "formatter",
|
|
3839
|
+
summary: "Public event query params for the section scope",
|
|
3840
|
+
schema: z.object({ key: z.enum(eventScopeQueryKeys) }),
|
|
3841
|
+
run(value, { key }) {
|
|
3842
|
+
return eventScopeLoaderParam(eventScopeQuery(resolveEventScope(asPartialObject(value) ?? {})), key);
|
|
3170
3843
|
}
|
|
3171
3844
|
};
|
|
3172
3845
|
const readJobSchema = z.object({ job: z.enum([
|
|
@@ -3192,9 +3865,43 @@ const eventCalendarReadEnabled = {
|
|
|
3192
3865
|
return plan.jobs === options.job || plan.jobs === "both" && options.job !== "schedule";
|
|
3193
3866
|
}
|
|
3194
3867
|
};
|
|
3868
|
+
/**
|
|
3869
|
+
* The week board's authored band paints `surfaceAlt` across the whole
|
|
3870
|
+
* section, under whatever foreground the section resolved. That foreground is
|
|
3871
|
+
* the page's only when the section paints nothing itself, so the band is
|
|
3872
|
+
* honoured on a plain section and dropped when a Look or override already
|
|
3873
|
+
* paints one (light band text on a pale board band otherwise).
|
|
3874
|
+
*/
|
|
3875
|
+
const eventCalendarBanded = {
|
|
3876
|
+
id: "events.calendarBanded",
|
|
3877
|
+
kind: "formatter",
|
|
3878
|
+
summary: "Paint the week-board band only on a section with no background of its own",
|
|
3879
|
+
run(value) {
|
|
3880
|
+
const content = asPartialObject(value) ?? {};
|
|
3881
|
+
const sectionStyles = asPartialObject(content._sectionStyles);
|
|
3882
|
+
return content.banded === true && parseBackgroundContent(sectionStyles?.background) === null;
|
|
3883
|
+
}
|
|
3884
|
+
};
|
|
3885
|
+
/** The list loader keeps its one request and adds bounds only for weekly lists. */
|
|
3886
|
+
const eventCalendarListWindow = {
|
|
3887
|
+
id: "events.calendarListWindow",
|
|
3888
|
+
kind: "formatter",
|
|
3889
|
+
schema: z.object({ key: z.enum(["from", "to"]) }),
|
|
3890
|
+
run(_value, { key }, context) {
|
|
3891
|
+
const content = context.data ?? {};
|
|
3892
|
+
if (eventCalendarListGroupingDecision({
|
|
3893
|
+
...content,
|
|
3894
|
+
arrangementLooks: content._lookSlots !== void 0
|
|
3895
|
+
}).grouping !== "week") return void 0;
|
|
3896
|
+
const timeZone = context.dateContext.timeZone;
|
|
3897
|
+
const startOfWeek = eventCalendarWeekStart(timeZone, content.startOfWeek === "sunday" || content.startOfWeek === "monday" ? content.startOfWeek : void 0);
|
|
3898
|
+
return buildEventListWeek(getLocalScheduleDate(new Date(readRuntimeNow(context.now)), timeZone), startOfWeek, timeZone)[key];
|
|
3899
|
+
}
|
|
3900
|
+
};
|
|
3195
3901
|
//#endregion
|
|
3196
3902
|
//#region ../blocks/src/system/transforms/registry/index.ts
|
|
3197
3903
|
const builtinTransformDefinitions = [
|
|
3904
|
+
classPriceItemsTransform,
|
|
3198
3905
|
eventRegistrationPageReadAdmission,
|
|
3199
3906
|
offeringsPreviewDatesReadEnabled,
|
|
3200
3907
|
lookLeadSlotTransform,
|
|
@@ -3202,33 +3909,27 @@ const builtinTransformDefinitions = [
|
|
|
3202
3909
|
lookCarouselRegionTransform,
|
|
3203
3910
|
lookSkinSlotTransform,
|
|
3204
3911
|
{
|
|
3205
|
-
id: "events.
|
|
3912
|
+
id: "events.readinessEnabled",
|
|
3206
3913
|
kind: "formatter",
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
if (eventCalendarListGroupingDecision({
|
|
3211
|
-
...content,
|
|
3212
|
-
arrangementLooks: content._lookSlots !== void 0
|
|
3213
|
-
}).grouping !== "week") return void 0;
|
|
3214
|
-
const timeZone = context.dateContext.timeZone;
|
|
3215
|
-
const startOfWeek = eventCalendarWeekStart(timeZone, content.startOfWeek === "sunday" || content.startOfWeek === "monday" ? content.startOfWeek : void 0);
|
|
3216
|
-
return buildEventListWeek(getLocalScheduleDate(new Date(readRuntimeNow(context.now)), timeZone), startOfWeek, timeZone)[key];
|
|
3914
|
+
run(value) {
|
|
3915
|
+
const content = asPartialObject(value) ?? {};
|
|
3916
|
+
return content.emptyBehavior === "hide" && eventReadinessLoaderKey(content) !== "schedule";
|
|
3217
3917
|
}
|
|
3218
3918
|
},
|
|
3219
|
-
eventCalendarSelectionParam,
|
|
3220
|
-
eventCalendarReadEnabled,
|
|
3221
|
-
eventCalendarReadProfile,
|
|
3222
3919
|
{
|
|
3223
|
-
id: "events.
|
|
3920
|
+
id: "events.readinessParam",
|
|
3224
3921
|
kind: "formatter",
|
|
3225
|
-
|
|
3226
|
-
run(value) {
|
|
3227
|
-
|
|
3228
|
-
const sectionStyles = asPartialObject(content._sectionStyles);
|
|
3229
|
-
return content.banded === true && parseBackgroundContent(sectionStyles?.background) === null;
|
|
3922
|
+
schema: z.object({ key: z.enum(eventReadinessQueryKeys) }),
|
|
3923
|
+
run(value, { key }) {
|
|
3924
|
+
return eventScopeLoaderParam(eventReadinessQuery(asPartialObject(value) ?? {}), key);
|
|
3230
3925
|
}
|
|
3231
3926
|
},
|
|
3927
|
+
eventCalendarListWindow,
|
|
3928
|
+
eventCalendarSelectionParam,
|
|
3929
|
+
eventScopeParam,
|
|
3930
|
+
eventCalendarReadEnabled,
|
|
3931
|
+
eventCalendarReadProfile,
|
|
3932
|
+
eventCalendarBanded,
|
|
3232
3933
|
...formattingTransforms,
|
|
3233
3934
|
...layoutTransforms,
|
|
3234
3935
|
...chromeLogoTransforms,
|
|
@@ -3989,9 +4690,11 @@ function effectiveLookFromContent(content) {
|
|
|
3989
4690
|
const value = content._effectiveLook;
|
|
3990
4691
|
return isObjectRecord(value) && isObjectRecord(value.look) ? restoreCompiledLook(value) : null;
|
|
3991
4692
|
}
|
|
3992
|
-
function planArrangementContent(blockKind, manifest,
|
|
3993
|
-
const runtime = arrangementRuntime(
|
|
3994
|
-
if (!runtime) return
|
|
4693
|
+
function planArrangementContent(blockKind, manifest, authored, audience) {
|
|
4694
|
+
const runtime = arrangementRuntime(authored);
|
|
4695
|
+
if (!runtime) return authored;
|
|
4696
|
+
const spacingHook = authoredSectionSpacingHook(authored);
|
|
4697
|
+
const content = withoutSectionSpacing(authored);
|
|
3995
4698
|
const mode = readStoredMode({
|
|
3996
4699
|
...arrangementManifestFromVariants(manifest),
|
|
3997
4700
|
variantMeaning: manifest.variantMeaning
|
|
@@ -4013,11 +4716,11 @@ function planArrangementContent(blockKind, manifest, content, audience) {
|
|
|
4013
4716
|
}), ["look"]);
|
|
4014
4717
|
const activeContent = withoutLookOwnedContent(Object.fromEntries(Object.entries(content).filter(([key]) => knobs[key]?.kind !== "kept")), lookOwnedPaths);
|
|
4015
4718
|
const photoContent = arrangementPhotoContent(activeContent, effectiveContent);
|
|
4016
|
-
const
|
|
4719
|
+
const photoCount = arrangementContentFacts({
|
|
4017
4720
|
...activeContent,
|
|
4018
4721
|
...effectiveContent,
|
|
4019
4722
|
...photoContent
|
|
4020
|
-
});
|
|
4723
|
+
}).photoCount + lookPartPhotoCount(blockKind, activeContent, effective.look.structure.byMode[mode ?? "default"] ?? null);
|
|
4021
4724
|
return {
|
|
4022
4725
|
...activeContent,
|
|
4023
4726
|
...arrangementPhotoTreatmentContent(activeContent, effective, runtime.surfaceContext.palette, values.photoTint === "brand" ? "brand" : "dark"),
|
|
@@ -4029,10 +4732,13 @@ function planArrangementContent(blockKind, manifest, content, audience) {
|
|
|
4029
4732
|
...arrangementQuoteContent(blockKind, effective, values),
|
|
4030
4733
|
_arrangementLooks: runtime,
|
|
4031
4734
|
_effectiveLook: effective,
|
|
4032
|
-
_lookHooks:
|
|
4033
|
-
...
|
|
4034
|
-
|
|
4035
|
-
|
|
4735
|
+
_lookHooks: {
|
|
4736
|
+
...arrangementContentHooks(effective, mode, length, {
|
|
4737
|
+
...facts.content,
|
|
4738
|
+
photo: photoCount > 0
|
|
4739
|
+
}, values, photoCount),
|
|
4740
|
+
...spacingHook
|
|
4741
|
+
},
|
|
4036
4742
|
_effectiveKnobs: knobs,
|
|
4037
4743
|
_lookOwnedPaths: lookOwnedPaths,
|
|
4038
4744
|
_lookAudience: audience,
|
|
@@ -4040,6 +4746,25 @@ function planArrangementContent(blockKind, manifest, content, audience) {
|
|
|
4040
4746
|
blockLook: effective.look.id
|
|
4041
4747
|
};
|
|
4042
4748
|
}
|
|
4749
|
+
/**
|
|
4750
|
+
* The section spacing an owner chose, as a hook, so a skin that sets its own
|
|
4751
|
+
* section padding can still honour it. Absent when the spacing was not chosen.
|
|
4752
|
+
* The compiler carries it through for Look blocks only for this hook (see
|
|
4753
|
+
* applyCompiledRuntimeFieldsToContent); the Look keeps its own padding, so the
|
|
4754
|
+
* value is taken out of the content before the section class reads it.
|
|
4755
|
+
*/
|
|
4756
|
+
function authoredSectionSpacingHook(content) {
|
|
4757
|
+
const spacing = isObjectRecord(content._sectionStyles) ? content._sectionStyles.spacing : void 0;
|
|
4758
|
+
return isSemanticSpacing(spacing) ? { "data-section-spacing": spacing } : {};
|
|
4759
|
+
}
|
|
4760
|
+
function withoutSectionSpacing(content) {
|
|
4761
|
+
if (!isObjectRecord(content._sectionStyles) || !("spacing" in content._sectionStyles)) return content;
|
|
4762
|
+
const { spacing: _spacing, ...sectionStyles } = content._sectionStyles;
|
|
4763
|
+
return {
|
|
4764
|
+
...content,
|
|
4765
|
+
_sectionStyles: sectionStyles
|
|
4766
|
+
};
|
|
4767
|
+
}
|
|
4043
4768
|
/** Typed Look composition owns contrast treatment; parsing preserves authored paint. */
|
|
4044
4769
|
function arrangementPhotoTreatmentContent(content, look, palette, tint) {
|
|
4045
4770
|
if (!look.look.structure.photoTreatment) return {};
|
|
@@ -4081,6 +4806,14 @@ function arrangementPanelContent(content, effective, mode) {
|
|
|
4081
4806
|
_lookPanelHeading: content.heading
|
|
4082
4807
|
};
|
|
4083
4808
|
}
|
|
4809
|
+
/**
|
|
4810
|
+
* Photos a Look shows beside the block's own: the hero's more photos, where its
|
|
4811
|
+
* arrangement shows them. They count towards the photo hooks only; the photo fact
|
|
4812
|
+
* that published fallbacks read stays the block's own photo.
|
|
4813
|
+
*/
|
|
4814
|
+
function lookPartPhotoCount(blockKind, content, arrangement) {
|
|
4815
|
+
return blockKind === "block.hero" && lookPartShown(blockKind, "morePhotos", arrangement) ? heroMorePhotoCount(content) : 0;
|
|
4816
|
+
}
|
|
4084
4817
|
function arrangementPhotoContent(content, knobs) {
|
|
4085
4818
|
if (knobs.showPhotos !== false || !Array.isArray(content.cards)) return {};
|
|
4086
4819
|
return { cards: content.cards.map((card) => {
|
|
@@ -4271,10 +5004,10 @@ function resolveCombinedLook(entry, list, runtime, section, content) {
|
|
|
4271
5004
|
}
|
|
4272
5005
|
function plannedSlotParents(entry, look) {
|
|
4273
5006
|
const fallback = Object.values(look.look.structure.byMode)[0] ?? "";
|
|
4274
|
-
if (entry.kind !== "renderable") return arrangementSlotParentsForManifest(void 0, look.look.target, fallback);
|
|
5007
|
+
if (entry.kind !== "renderable") return arrangementSlotParentsForManifest(void 0, look.look.target, fallback, look.look.structure.eventRows);
|
|
4275
5008
|
const month = entry.renderableContent._lookMonthArrangement;
|
|
4276
5009
|
const arrangement = entry.effectiveListArrangementKey ?? (typeof month === "string" ? month : entry.effectiveArrangementKey) ?? fallback;
|
|
4277
|
-
return arrangementSlotParentsForManifest(entry.definition.manifest, look.look.target, arrangement);
|
|
5010
|
+
return arrangementSlotParentsForManifest(entry.definition.manifest, look.look.target, arrangement, look.look.structure.eventRows);
|
|
4278
5011
|
}
|
|
4279
5012
|
//#endregion
|
|
4280
|
-
export {
|
|
5013
|
+
export { resolveEventCta as $, offeringDatesBySeries as A, CalendarIcon as B, systemCustomizeFacetDefinitionsForBlock as C, EventListingFrameView as D, MonthLookView as E, EmptyState as F, formatCourseSessions as G, eventDisplayTitle as H, CardListCollection as I, formatEventQuickDate as J, buildMonthDay as K, CardListItems as L, derivePreviewRunSchedule as M, createEditorPresentationPageReader as N, OfferingCourseCards as O, createPresentationPageReader as P, resolveEventCardBooking as Q, EventItem as R, lookPartShown as S, EVENT_REGISTRATION_ANCHOR_ID as T, eventDisplayTitleText as U, MapPinIcon as V, formatCourseDatesAfter as W, formatEventTeacherLine as X, selectQuickDateEvents as Y, formatEventDuration as Z, publicAppointmentPricingSchema as _, joinSlotKey as a, resolveRuntimeSection as at, resolvePageRouteTarget as b, buildLinkedContentEditTarget as c, builtinTransformDefinitions as d, resolveEventLinkProps as et, defaultTransforms as f, publicAppointmentLocationSchema as g, formatAppointmentPrice as h, composePageJoins as i, lookFillPartsFromContent as it, deriveEventScheduleSummary as j, eventCardListContent as k, coerceLinkedContentEntriesPayload as l, formatAppointmentLocation as m, createPageRenderPlanReader as n, parseStoredVariant as nt, renderedJoinLayout as o, buildThemeTokens as ot, formatAppointmentDuration as p, resolveMonthSelectedDay as q, planArrangementContent as r, selectBlockContent as rt, retargetJoinsAcrossOmissions as s, defaultThemeTokens as st, buildPageRenderPlan as t, isBookableEvent as tt, resolveLinkedEntryInlineFieldEligibility as u, resolveAuthoredLinkHref as v, EventHeader as w, resolveRouteTarget as x, resolveEntryRouteTarget as y, eventCategoryBadge as z };
|