@riverbankcms/sdk 0.171.0 → 0.172.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-xuFmD41p.d.ts → BlocksIslandsHydrator-DtrzTJ77.d.ts} +1 -1
- package/dist/_dts/{Page-4fzXy8H9.d.ts → Page-DViYbakk.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-BlHgMsc8.d.ts → SdkPreviewMode-D-5OeDbT.d.ts} +2 -2
- package/dist/_dts/{client-BPoU758C.d.ts → client-DZBOzd3U.d.ts} +1 -2
- package/dist/_dts/{content-types-TnkhoSls.d.ts → content-types-DS3DrYn_.d.ts} +3 -3
- package/dist/_dts/{contracts-7wrMA79U.d.ts → contracts-C3QGPCUf.d.ts} +3 -3
- package/dist/_dts/{footerPageOutline-DaOsPQ_Q.d.ts → footerPageOutline-D9Q7VIul.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-D9aDEzKK.d.ts → generatePageMetadata-R7NeFT1u.d.ts} +2 -2
- package/dist/_dts/{index-DDKJfaLY.d.ts → index-BnMavhoh.d.ts} +2 -2
- package/dist/_dts/{index-585vn6qb.d.ts → index-C0zjLMAW.d.ts} +49 -38
- package/dist/_dts/{index-W9R3Bnf2.d.ts → index-CpOkfBt1.d.ts} +3 -3
- package/dist/_dts/{index-Cbw0IiY7.d.ts → index-Da4UMgbs.d.ts} +2 -2
- package/dist/_dts/{index-DNCDENic.d.ts → index-DkFV_1Bc.d.ts} +1 -1
- package/dist/_dts/{index-ChNbrcgD.d.ts → index-Dns7OHyl.d.ts} +1 -1
- package/dist/_dts/{index-CZKSUcDs.d.ts → index-MuMYjetm.d.ts} +4 -4
- package/dist/_dts/{loadContent-DPyNAJym.d.ts → loadContent-DJmXHzfi.d.ts} +7 -7
- package/dist/_dts/{request-jXTRN1Y4.d.ts → request-wQ28JWbr.d.ts} +66983 -65876
- package/dist/_dts/{resolveBlockData-BbvE-gsZ.d.ts → resolveBlockData-C-IP53u9.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-BBgih00D.d.ts → resolvePageContent-Cc4zqaEC.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +18 -1
- package/dist/_dts/{types-kWvBwYK6.d.ts → types-CpjyP5I4.d.ts} +7 -7
- package/dist/_dts/{types-DEAKoDNi.d.ts → types-DrinAfeW.d.ts} +3 -3
- package/dist/_dts/{types-BXuVxDYo.d.ts → types-ZuZoGsZV.d.ts} +2 -2
- package/dist/_dts/{validation-BAO0_ntM.d.ts → validation-CIZ_fP5l.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DfMsMIej.mjs → BlocksIslandsHydrator-UFmQB1BE.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-aaSicywS.mjs → BookingMailingListNote-VjRYhx1c.mjs} +6 -6
- package/dist/client/{BookingPanelArrangement-OgftZ9QC.mjs → BookingPanelArrangement-DpqnRo-t.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-BlaCItmH.mjs → BookingQuestionFields-CzOT8ZWo.mjs} +4 -4
- package/dist/client/{CalendarNavigationChevron-iMWrY6Hz.mjs → CalendarNavigationChevron-CNckKZct.mjs} +7 -7
- package/dist/client/{CheckboxChoice-B65wFjqx.mjs → CheckboxChoice-b-PJLEXe.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BCumOTLY.mjs → DemoBookingPortalAccess-CmZLVXOy.mjs} +6 -6
- package/dist/client/{EventCalendar.client-kh7mkYnW.mjs → EventCalendar.client-BU-SxLCn.mjs} +9 -9
- package/dist/client/{EventCombined.client-DXD5i0Ar.mjs → EventCombined.client-f28VltfY.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-DKKRCuta.mjs → EventEmbeddedCheckoutStep-B18VbNS_.mjs} +1 -1
- package/dist/client/{EventItem-BnwcoFQN.mjs → EventItem-sKBofjiW.mjs} +40 -14
- package/dist/client/{EventListWeekNavigation-DuG6z02f.mjs → EventListWeekNavigation-IAcax47T.mjs} +1 -1
- package/dist/client/{EventListing.client-18yfHrcr.mjs → EventListing.client-BEtnRvZr.mjs} +3 -3
- package/dist/client/{EventListing.view-BM7rTVSL.mjs → EventListing.view-BZ4l_rmT.mjs} +189 -73
- package/dist/client/{EventRegistrationPayment-D5J3DR0x.mjs → EventRegistrationPayment-BWb295cD.mjs} +9 -9
- package/dist/client/{LocationMapActions-QahdLtdE.mjs → LocationMapActions-Hsj2HC_1.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-Dy6UMuIw.mjs → MapDrawingSvg-C7E7Lyfa.mjs} +1 -1
- package/dist/client/{Page-DH2sm4Cf.mjs → Page-Ds1s3DuC.mjs} +1425 -490
- package/dist/client/{ProtectedSubmitButton-AOUzjDK9.mjs → ProtectedSubmitButton-C-ql101B.mjs} +1 -1
- package/dist/client/{StepIndicator-CsRlU46Y.mjs → StepIndicator-CSCyAaKY.mjs} +6 -6
- 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-Bbn1-jJ8.mjs → accessibleSurfaces-OsAseM7H.mjs} +57 -42
- package/dist/client/{accordion-DT4MD3Np.mjs → accordion-DgwFZJSx.mjs} +1 -1
- package/dist/client/{booking-form.client-DdqNQNCa.mjs → booking-form.client-CKY9oksp.mjs} +33 -29
- package/dist/client/{bookingForm-CLN396HU.mjs → bookingForm-CsHhcdSF.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-iLF_3KX9.mjs → boxStyleClassNames-B1Z_TGAe.mjs} +1 -1
- package/dist/client/{carousel-DFLomCGm.mjs → carousel-0sw2Kc3a.mjs} +2 -2
- package/dist/client/{carousel.client-YF4mUK5t.mjs → carousel.client-h65clfUO.mjs} +1 -1
- package/dist/client/{cart-BozMM5NK.mjs → cart-CPfvMDGJ.mjs} +3 -3
- package/dist/client/{cart.client-CqOOxPbW.mjs → cart.client-BJBPUTmg.mjs} +1 -1
- package/dist/client/{checkout-CTWF5nbB.mjs → checkout-DU4JFjGT.mjs} +3 -3
- package/dist/client/{checkout.client-CpqxN8e0.mjs → checkout.client-BbNCO4xa.mjs} +1 -1
- package/dist/client/{checkoutUrls-Ccg6yfjq.mjs → checkoutUrls-BQ3OlWlM.mjs} +1 -1
- package/dist/client/client.mjs +151 -6
- package/dist/client/{context-Dzjv2CpA.mjs → context-xNC1Cyjw.mjs} +14 -1
- package/dist/client/{cta-pzQkBLgS.mjs → cta-CNVQHLKs.mjs} +53 -11
- package/dist/client/{dateFormatting-BfurxGwg.mjs → dateFormatting-B6ea-egy.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-D0dcPsRE.mjs → demoPortalMagicLink-BhjGxhX3.mjs} +1 -1
- package/dist/client/{display-Cl6mgSJa.mjs → display-B5DfNb6A.mjs} +1869 -333
- package/dist/client/{enhanceHeaderSection-CJCl0HJC.mjs → enhanceHeaderSection-BFcHLuqk.mjs} +139 -16
- package/dist/client/{event-details.client-Pn9Kxh3I.mjs → event-details.client-WHT5GLn2.mjs} +1 -1
- package/dist/client/{event-registration.client-BAmBdWXE.mjs → event-registration.client-CmnRKELC.mjs} +11 -11
- package/dist/client/{eventCalendar-C5Bh2L8L.mjs → eventCalendar-2NbdCyov.mjs} +4 -4
- package/dist/client/{eventCombined-dELKxxIe.mjs → eventCombined-D1lH1n2T.mjs} +4 -4
- package/dist/client/{eventDetails-Do9D_fJ_.mjs → eventDetails-BHvnF2Tw.mjs} +2 -2
- package/dist/client/{eventListing-B2HTUWLq.mjs → eventListing-EhSDk4UL.mjs} +4 -4
- package/dist/client/{eventRegistration-ByOJnqGc.mjs → eventRegistration-z_0jN_KS.mjs} +4 -4
- package/dist/client/{form-DX70QG-J.mjs → form-BfChzSkS.mjs} +3 -3
- package/dist/client/{form.client-CJoqBrS6.mjs → form.client-D1zehtPk.mjs} +4 -4
- package/dist/client/{form.parts-DTof9pL3.mjs → form.parts-rMDlUQIv.mjs} +3 -3
- package/dist/client/{formatDate-Cjouxh4Y.mjs → formatDate-ymSVT9Y5.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-CJuPX_1K.mjs → headerSection-BX9bQ84k.mjs} +2 -2
- package/dist/client/{newsletter-form.client-CqzNjOft.mjs → newsletter-form.client-DMbuJCtJ.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DjJsFms2.mjs → newsletter-form.parts-BxrVsoI0.mjs} +2 -2
- package/dist/client/{newsletterForm-D1MHoPbh.mjs → newsletterForm-B_I3FJFS.mjs} +3 -3
- package/dist/client/{noop-poI1m2yW.mjs → noop-CamIX2yK.mjs} +17 -1
- package/dist/client/portal/client.mjs +231 -117
- package/dist/client/{product-detail.client-DOQ7El1d.mjs → product-detail.client-qxuiYCof.mjs} +1 -1
- package/dist/client/{product-list.client-CmxOZbzL.mjs → product-list.client-CDL-jihv.mjs} +1 -1
- package/dist/client/{productDetail-BN3zv5sa.mjs → productDetail-B97m0uZy.mjs} +3 -3
- package/dist/client/{productList-GN_Id4bF.mjs → productList-DE4vSSG_.mjs} +3 -3
- package/dist/client/{propsDecoder-BdmzM3D5.mjs → propsDecoder-BTde6Syh.mjs} +3 -3
- package/dist/client/{registry.server-BOyra8CA.mjs → registry.server-Cn8XjRte.mjs} +1464 -1183
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +22 -16
- package/dist/client/{richText-coerce-CtoGLZ_e.mjs → richText-coerce-Bcl3vTb4.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DnaJ8PQc.mjs → routeIslandApiConfig-BjRoLoMD.mjs} +1 -1
- package/dist/client/{runtimeResponse-BN8PoIVp.mjs → runtimeResponse-B-lrAGhX.mjs} +1 -1
- package/dist/client/{runtimeResponse-B1-cyLXt.mjs → runtimeResponse-CPcA8xSm.mjs} +1 -1
- package/dist/client/{shop-LjBLDBqF.mjs → shop-BC4H0oYT.mjs} +3 -3
- package/dist/client/{shop-commerce-B8aZTdRJ.mjs → shop-commerce-BsY7a71m.mjs} +12 -12
- package/dist/client/{shop-commerce-store-C1FtHYl7.mjs → shop-commerce-store-BZ5j90HD.mjs} +1 -1
- package/dist/client/{shop.client-D0qZ3KZp.mjs → shop.client-WgGVGelc.mjs} +12 -12
- package/dist/client/{shop.interactive-DAKyWK1B.mjs → shop.interactive-Bb67gPLL.mjs} +187 -81
- package/dist/client/{shopShared-CztcSe9i.mjs → shopShared-BE6TEk2A.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{timetableModel-D1jDTbms.mjs → timetableModel-Bbz_ECL5.mjs} +10 -10
- package/dist/client/{types-B0hJldSt.mjs → types-DjWUR_O6.mjs} +8 -2
- package/dist/client/{useAvailableSlots-ByHedoBi.mjs → useAvailableSlots-CdP14E_b.mjs} +2 -2
- package/dist/client/{useDiscountApply-CHGYDxdM.mjs → useDiscountApply-DvOSso2l.mjs} +1 -1
- package/dist/client/{useDiscountCodeUi-Dew9UAEy.mjs → useDiscountCodeUi-B4fRd2jy.mjs} +1 -1
- package/dist/client/{useEventPagination-BpC7-ksE.mjs → useEventPagination-M3jC8lgP.mjs} +6 -6
- package/dist/client/{view-BxeiAL3c.mjs → view-B0TFnP4y.mjs} +198 -60
- package/dist/client/{view-ShYH3WXh.mjs → view-DNNNbnNj.mjs} +3 -3
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CKe4cjZ4.mjs → EventEmbeddedCheckoutStep-aRJjq4x8.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-lW2aLGWd.mjs → LocationPickerEnvironment-D4F_5rnr.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-C9InQJpd.mjs → MapLibreEditMap-BKMNxSEJ.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-DsSqwrMS.mjs → PageSectionToolbar-D59tHj_L.mjs} +320 -395
- package/dist/preview-next/client/{PreviewEditorSidebar-BEEWzXnU.mjs → PreviewEditorSidebar-CjOIZlUk.mjs} +761 -416
- package/dist/preview-next/client/{PreviewEditorUI-C86Out4V.mjs → PreviewEditorUI--kS9Cwsc.mjs} +126 -137
- 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-CBWYjBvQ.mjs → PreviewShell-Bi8-rclb.mjs} +312 -63
- package/dist/preview-next/client/{SdkPreviewModeRuntime-o-mVqWLx.mjs → SdkPreviewModeRuntime-CWTUw-3L.mjs} +308 -135
- package/dist/preview-next/client/{SiteChromeCustomizeButton-H_ciMNHA.mjs → SiteChromeCustomizeButton-CrgS3I8d.mjs} +1936 -320
- package/dist/preview-next/client/{ThemedButton-CKYjeU_M.mjs → ThemedButton-CVYz7h68.mjs} +8 -2
- package/dist/preview-next/client/{lucide-react-DygTyy7K.mjs → lucide-react-BCNn8dEQ.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-CuOcsG_N.mjs → previewAssistantSlot-Caofnr1Z.mjs} +23441 -21340
- package/dist/preview-next/client/{previewChromeRoot-DPeV7KaP.mjs → previewChromeRoot-CbAI_jSH.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +5 -4
- package/dist/preview-next/client/sdk-runtime-DY65_hLk.mjs +6 -0
- package/dist/preview-next/client/{useAutosaveStatus-DNA1Q4L1.mjs → useAutosaveStatus-CakNU3lp.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BdnMlHC6.mjs → useOpenBlockForSetup-CCEMkosU.mjs} +126 -11
- package/dist/preview-next/container-responsive.css +215 -4
- package/dist/preview-next/editor-base.css +14 -4
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CtSgU8UZ.mjs → route-contract-DsKDQoVW.mjs} +147 -2
- package/dist/server/{Block.shared-ifgaBglp.mjs → Block.shared-D7Qy9F4a.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-DGDOH6OU.mjs → ThemeScopeCore-D1NTXZdX.mjs} +15 -10
- package/dist/server/{accessibleSurfaces-BuPNCWAK.mjs → accessibleSurfaces-Dbd2__Le.mjs} +12 -11
- package/dist/server/{bindings-CiYpie1M.mjs → bindings-Bp6OnR3n.mjs} +109 -20
- package/dist/server/{block-kinds-DkzOr19P.mjs → block-kinds-BCY9z3oB.mjs} +1 -0
- package/dist/server/{client-ngWuFsmN.mjs → client-dROAfMRa.mjs} +149 -4
- package/dist/server/config-template-validation.mjs +3 -0
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-DeLQeJAZ.mjs → loadContent-zOIrtqz-.mjs} +19 -14
- package/dist/server/{loadPage-D4J747FQ.mjs → loadPage-vwFiq1Rk.mjs} +2 -2
- package/dist/server/next.mjs +6 -6
- package/dist/server/{opaqueSurface-ukEz1BaM.mjs → opaqueSurface-COEKXVwk.mjs} +2 -2
- package/dist/server/{overrideResolution-DSuVkpqm.mjs → overrideResolution-DjboggbB.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-DFv3h4Ib.mjs → pageRenderPlan-BR4t1rOw.mjs} +954 -337
- package/dist/server/{pageRuntimeSupport-yHaRNWMj.mjs → pageRuntimeSupport-BKo6XVK-.mjs} +3 -2
- package/dist/server/{pageShared-CAZD0LcY.mjs → pageShared-BJjptSGp.mjs} +1039 -853
- package/dist/server/{parseThemeForPersistence-Dl7LIBJq.mjs → parseThemeForPersistence-B18KDEue.mjs} +2 -2
- package/dist/server/{prebuild-BKOCND3b.mjs → prebuild-CntSkZQI.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-GIoExi8A.mjs → prefetchBlockData-BM9Ds0OQ.mjs} +2 -2
- package/dist/server/{registry-BogXzcOD.mjs → registry-wYH0LH5f.mjs} +7269 -4975
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-CT4YSBve.mjs → resolveBlockData-Bu_p4HxZ.mjs} +2 -2
- package/dist/server/{resolveButtonColourStates-DVISOQD9.mjs → resolveButtonColourStates-CCPUY9Xh.mjs} +53 -33
- package/dist/server/{schema-C92Q8y0-.mjs → schema-BFOqYIMQ.mjs} +2 -1
- 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-vSBCWU3w.mjs → validation-DAQdPDku.mjs} +4 -4
- package/dist/server/{version-Cw5vFmUY.mjs → version-DAB0O3yx.mjs} +1 -1
- package/dist/styles/index.css +1260 -15
- package/package.json +1 -1
- package/dist/preview-next/client/PreviewQueryProvider-BC0V7iAR.mjs +0 -43
- package/dist/preview-next/client/sdk-runtime-zTTFZ4MM.mjs +0 -5
|
@@ -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-
|
|
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 { $r as lookLeadSlotTransform, $s as parseGradientPresetId, Aa as styleSectionBackgroundForColour, Ai as eventReadinessLoaderKey, Bi as eventCalendarListGroupingDecision, Bn as resolveHeroTitleLength, Bs as toUtcIsoDateTimeString, Co as parseCanonicalRuntimeBackground, Do as themeV2CompilerOwnedFieldNames, Ds as formatDate, Eo as stripStaleTransitionStyleGroup, Fa as resolvePublishedLook, Fi as eventScopeLoaderParam, Fn as mediaTransforms, Fs as getLocalScheduleDate, Gr as resolveSectionSurfaceForeground, Gt as eventDateOptions, Hi as resolveEventCalendarReadPlan, Hn as formattingTransforms, Ho as cardListKnobBlocks, Hr as parseBackgroundContent, Hs as formatBookingPriceDisplay, Ht as weekColumnDays, I as combinedLookSchema, Ii as eventScopeQuery, In as headerRuntimeTransforms, Is as parseBookingLocalDate, J as CardListLeadDate, Ja as getGradientPreset, Js as resolvePricingOptionsPriceDisplay, Ki as formatDateKey, Kr as resolveSurfaceForegroundStyles, Kt as eventLocalDateKey, La as deriveSiteStyleBlockPolicy, Li as eventScopeQueryKeys, Ln as chromeLogoTransforms, Ma as readStoredMode, Mi as eventReadinessQueryKeys, Na as resolveEffectiveArrangement, Nn as readRuntimeNow, Ns as compareLocalScheduleDates, Os as formatDateRange, Pa as resolveModeArrangement, Pi as eventDiscoveryFilterKeys, Pt as ThemedButtonLink, Q as MediaNodeServer, Qi as isToday, Qn as listItemPresentation, Qr as lookCarouselRegionTransform, Ri as resolveEventScope, Rn as layoutTransforms, Rr as boxStylesTransforms, Rs as resolveBookingBusinessTimeZone, Rt as buildEventListWeek, Sa as arrangementAppearancePresets, So as deriveSectionGround, To as sectionSurfaceBase, Tt as groupOfferingRunsByCourse, Ur as parseBackgroundOverlay, Vi as eventCalendarListLayoutOptions, Vn as uiTransforms, Vo as cardListFamilyBlocks, Vt as groupEventsByWeek, Wr as parseRuntimeBackgroundContent, Wt as eventCalendarWeekStart, X as resolveCardListSchedule, Xt as formatEventCompactDateRail, Yr as isSemanticSpacing, Z as selectCardListPresentation, Zt as formatEventDateParts, _r as formatEventPriceDisplay, an as resolveEventTimeZone, br as getAnchorClasses, ca as eventCalendarListLayoutCompatibleDisplayModeValues, co as sectionShapeFromContent, dn as formatEventRemainingPlaces, ec as arrangementSlotNames, ei as lookQuoteLimitTransform, en as formatEventRunDates, er as listLookSlot, et as ImagePresets, fn as formatTotalCapacity, fo as boundaryRuntimeMetricsForDecorativeTransition, fr as classPricesCopySchema, fs as nextLiveRunSessionStartMs, ga as resolveLookSurfacePresentation, ha as lookPresentationOnPalette, hn as isEventFull, hr as formatEventPrice, in as groupEventsByDate, ir as standardAspectRatioOptions, ja as arrangementManifestFromVariants, ji as eventReadinessQuery, jo as assertNever, ki as augmentManifest, kn as contentTransforms, ko as resolveEffectiveKnobs, ks as formatDateTimeRange, lo as sectionShapeHook, lr as standardImageShapeOptions, mi as ClockIcon, mn as getEventAvailabilityStatus, mr as resolveClassPriceItems, ms as resolveWholeSeriesBookingPhase, ni as asPartialObject, nn as formatEventWeekdayTime, nt as computeMediaTransformStyle, on as resolveRuntimeEventDestination, pn as getEventAvailability, pr as classPricesDataSchema, ps as orderedLiveRunSessions, q as CardListContentPart, qa as gradientToCss, qr as resolveBackgroundColorValue, qs as resolveExactOrFreePriceDisplay, ri as createTransformRegistry, rn as formatTime, sn as formatBookingSchedulePresentation, so as sectionShapeForGround, sr as heroMorePhotoCount, t as getBlockDefinition, ti as lookSkinSlotTransform, tn as formatEventTimeRange, ua as isObjectRecord, un as canJoinEventWaitlistOnAnyMode, ut as EventQuickFacts, vn as closedRunCopy, vr as formatEventStartingPrice, wo as resolveSectionBackground, xa as heroPhotoPaintsGround, xo as applyLookPhotoTreatment, xr as heroTitleSizeOptions, yr as BACKGROUND_POSITION_PRESET_VALUES, zi as resolveCalendarReadProfile } from "./registry-wYH0LH5f.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-BFOqYIMQ.mjs";
|
|
5
5
|
import { o as runtimeMediaSchema } from "./media-Brn9FW5s.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. */
|
|
@@ -1031,6 +1163,14 @@ const eventItemParts = {
|
|
|
1031
1163
|
"description",
|
|
1032
1164
|
"action"
|
|
1033
1165
|
],
|
|
1166
|
+
"week-groups": [
|
|
1167
|
+
"date",
|
|
1168
|
+
"title",
|
|
1169
|
+
"meta",
|
|
1170
|
+
"time",
|
|
1171
|
+
"price",
|
|
1172
|
+
"action"
|
|
1173
|
+
],
|
|
1034
1174
|
"day-groups": [
|
|
1035
1175
|
"title",
|
|
1036
1176
|
"meta",
|
|
@@ -1097,7 +1237,10 @@ function eventItemFacts(props) {
|
|
|
1097
1237
|
price
|
|
1098
1238
|
}),
|
|
1099
1239
|
venueIcon: hasActionRail(props.arrangement) && props.showVenue !== false && Boolean(props.event.venue),
|
|
1100
|
-
places: props.showCapacity ? formatEventRemainingPlaces(props.event, {
|
|
1240
|
+
places: props.showCapacity ? formatEventRemainingPlaces(props.event, {
|
|
1241
|
+
full: "Sold out",
|
|
1242
|
+
...props.eventRows === "day-schedule" ? { count: "always" } : {}
|
|
1243
|
+
}) : null,
|
|
1101
1244
|
availability: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available",
|
|
1102
1245
|
description: props.event.presentation?.summary ?? props.event.description
|
|
1103
1246
|
};
|
|
@@ -1149,17 +1292,25 @@ function renderCalendarItem(props) {
|
|
|
1149
1292
|
...listLookSlot(props, root),
|
|
1150
1293
|
"data-availability": facts.availability,
|
|
1151
1294
|
children: [
|
|
1295
|
+
props.eventRows === "day-schedule" ? renderPart("time") : null,
|
|
1152
1296
|
parts.filter((part) => part === "image" || part === "chips" && chipsOnPhoto || part === "date").map(renderPart),
|
|
1153
|
-
/* @__PURE__ */
|
|
1297
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1154
1298
|
...listLookSlot(props, props.arrangement === "grid" ? "item-body" : "what"),
|
|
1155
|
-
children:
|
|
1299
|
+
children: [props.eventRows === "day-schedule" ? /* @__PURE__ */ jsx(EventQuickFacts, {
|
|
1300
|
+
facts: props.event.facts,
|
|
1301
|
+
context: "card",
|
|
1302
|
+
chips: {
|
|
1303
|
+
list: listLookSlot(props, "chips"),
|
|
1304
|
+
item: listLookSlot(props, "chip")
|
|
1305
|
+
}
|
|
1306
|
+
}) : null, parts.filter(body).map(renderPart)]
|
|
1156
1307
|
}),
|
|
1157
1308
|
renderCalendarTrailingParts(props, parts.filter((part) => [
|
|
1158
1309
|
"time",
|
|
1159
1310
|
"places",
|
|
1160
1311
|
"price",
|
|
1161
1312
|
"action"
|
|
1162
|
-
].includes(part) && !body(part)), renderPart)
|
|
1313
|
+
].includes(part) && !body(part) && !(part === "time" && props.eventRows === "day-schedule")), renderPart)
|
|
1163
1314
|
]
|
|
1164
1315
|
});
|
|
1165
1316
|
}
|
|
@@ -1171,7 +1322,7 @@ function renderCalendarTrailingParts(props, parts, renderPart) {
|
|
|
1171
1322
|
}) : content;
|
|
1172
1323
|
}
|
|
1173
1324
|
function eventItemTag(arrangement) {
|
|
1174
|
-
return arrangement === "ledger" || arrangement === "timetable-rows" || arrangement === "day-groups" || arrangement === "week-columns" ? "li" : "article";
|
|
1325
|
+
return arrangement === "week-groups" || arrangement === "ledger" || arrangement === "timetable-rows" || arrangement === "day-groups" || arrangement === "week-columns" ? "li" : "article";
|
|
1175
1326
|
}
|
|
1176
1327
|
function renderEventItemContentPart({ part, props, facts }) {
|
|
1177
1328
|
switch (part) {
|
|
@@ -1202,13 +1353,13 @@ function renderEventItemContentPart({ part, props, facts }) {
|
|
|
1202
1353
|
...facts.link,
|
|
1203
1354
|
children: props.event.title
|
|
1204
1355
|
})
|
|
1205
|
-
}), /* @__PURE__ */ jsx(EventQuickFacts, {
|
|
1356
|
+
}), props.eventRows === "day-schedule" ? null : /* @__PURE__ */ jsx(EventQuickFacts, {
|
|
1206
1357
|
facts: props.event.facts,
|
|
1207
1358
|
context: "card"
|
|
1208
1359
|
})] });
|
|
1209
1360
|
case "time": return /* @__PURE__ */ jsxs("p", {
|
|
1210
1361
|
...listLookSlot(props, "time"),
|
|
1211
|
-
children: [hasActionRail(props.arrangement) ? /* @__PURE__ */ jsx(ClockIcon, { "aria-hidden": "true" }) : null, facts.time]
|
|
1362
|
+
children: [hasActionRail(props.arrangement) ? /* @__PURE__ */ jsx(ClockIcon, { "aria-hidden": "true" }) : null, props.arrangement === "week-groups" ? formatEventWeekdayTime(props.event) : facts.time]
|
|
1212
1363
|
});
|
|
1213
1364
|
case "places": return facts.places ? /* @__PURE__ */ jsx("p", {
|
|
1214
1365
|
...listLookSlot(props, "places"),
|
|
@@ -1283,8 +1434,7 @@ function renderEventItemAction(props, facts) {
|
|
|
1283
1434
|
const slot = props.arrangement === "grid" ? "item-actions" : "action";
|
|
1284
1435
|
const link = {
|
|
1285
1436
|
href: cta.href,
|
|
1286
|
-
|
|
1287
|
-
rel: cta.external ? "noopener noreferrer" : void 0
|
|
1437
|
+
...eventActionLinkTarget(cta.external)
|
|
1288
1438
|
};
|
|
1289
1439
|
return /* @__PURE__ */ jsx("div", {
|
|
1290
1440
|
...listLookSlot(props, slot),
|
|
@@ -1296,10 +1446,18 @@ function renderEventItemAction(props, facts) {
|
|
|
1296
1446
|
...link,
|
|
1297
1447
|
variant: props.buttonVariant ?? "primary",
|
|
1298
1448
|
size: props.actionSize ?? "sm",
|
|
1449
|
+
extraClassName: props.eventRows === "day-schedule" ? "rb-session-booking" : void 0,
|
|
1299
1450
|
label: cta.label
|
|
1300
1451
|
})
|
|
1301
1452
|
});
|
|
1302
1453
|
}
|
|
1454
|
+
/** External booking actions share the browser target and opener protection. */
|
|
1455
|
+
function eventActionLinkTarget(external) {
|
|
1456
|
+
return external ? {
|
|
1457
|
+
target: "_blank",
|
|
1458
|
+
rel: "noopener noreferrer"
|
|
1459
|
+
} : {};
|
|
1460
|
+
}
|
|
1303
1461
|
const carouselBodyParts = [
|
|
1304
1462
|
"chips",
|
|
1305
1463
|
"numeral",
|
|
@@ -1552,6 +1710,406 @@ function memoizePresentationBlock(present) {
|
|
|
1552
1710
|
};
|
|
1553
1711
|
}
|
|
1554
1712
|
//#endregion
|
|
1713
|
+
//#region ../blocks/src/system/blocks/offerings-preview/scheduleSummary.ts
|
|
1714
|
+
function deriveEventScheduleSummary(event) {
|
|
1715
|
+
const occurrence = occurrenceFromEvent(event);
|
|
1716
|
+
return compareLocalScheduleDates(getLocalScheduleDate(new Date(occurrence.endsAt), resolveBookingBusinessTimeZone(occurrence.timeZone)), getLocalScheduleDate(new Date(occurrence.startsAt), resolveBookingBusinessTimeZone(occurrence.timeZone))) > 0 ? {
|
|
1717
|
+
kind: "multi-day-span",
|
|
1718
|
+
occurrence
|
|
1719
|
+
} : {
|
|
1720
|
+
kind: "single-occurrence",
|
|
1721
|
+
occurrence
|
|
1722
|
+
};
|
|
1723
|
+
}
|
|
1724
|
+
function derivePreviewRunSchedule(event) {
|
|
1725
|
+
const sessions = orderedLiveRunSessions(event.run.sessions).filter(isValidOccurrence);
|
|
1726
|
+
const first = sessions[0];
|
|
1727
|
+
const last = sessions[sessions.length - 1];
|
|
1728
|
+
if (!first || !last) return { kind: "no-live-sessions" };
|
|
1729
|
+
const authoredSummary = formatBookingSchedulePresentation("representative" in event ? event.representative : event);
|
|
1730
|
+
const summary = !authoredSummary && sessions.length === 1 ? deriveEventScheduleSummary(first) : {
|
|
1731
|
+
kind: "scheduled-run",
|
|
1732
|
+
first,
|
|
1733
|
+
last,
|
|
1734
|
+
sessionCount: sessions.length,
|
|
1735
|
+
sessions,
|
|
1736
|
+
authoredSummary
|
|
1737
|
+
};
|
|
1738
|
+
return {
|
|
1739
|
+
kind: "scheduled",
|
|
1740
|
+
firstSession: first,
|
|
1741
|
+
sessionCount: sessions.length,
|
|
1742
|
+
summary
|
|
1743
|
+
};
|
|
1744
|
+
}
|
|
1745
|
+
function occurrenceFromEvent(event) {
|
|
1746
|
+
return {
|
|
1747
|
+
startsAt: event.startsAt,
|
|
1748
|
+
endsAt: event.endsAt,
|
|
1749
|
+
timeZone: event.timeZone
|
|
1750
|
+
};
|
|
1751
|
+
}
|
|
1752
|
+
function isValidOccurrence(value) {
|
|
1753
|
+
return Number.isFinite(Date.parse(value.startsAt)) && Number.isFinite(Date.parse(value.endsAt));
|
|
1754
|
+
}
|
|
1755
|
+
//#endregion
|
|
1756
|
+
//#region ../blocks/src/system/runtime/nodes/events/shared/offeringNextDates.ts
|
|
1757
|
+
/** A bounded display sample only: capacity and booking admission belong to the booking destination. */
|
|
1758
|
+
function offeringDatesBySeries(events, now, booking) {
|
|
1759
|
+
const groups = events.reduce((result, event) => new Map([...result, [event.seriesId, [...result.get(event.seriesId) ?? [], event]]]), /* @__PURE__ */ new Map());
|
|
1760
|
+
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))]));
|
|
1761
|
+
}
|
|
1762
|
+
/** Whole-series sessions share the run's capacity, so every row shows the run's decided availability. */
|
|
1763
|
+
function offeringRunDates(event, now, places) {
|
|
1764
|
+
if (event.bookingScope !== "whole_series") return [];
|
|
1765
|
+
const nextStart = nextLiveRunSessionStartMs(event.run.sessions, now);
|
|
1766
|
+
return nextStart === null ? [] : orderedLiveRunSessions(event.run.sessions).filter((session) => Date.parse(session.startsAt) >= nextStart).slice(0, 3).map((session) => offeringDateRow(session, event, places));
|
|
1767
|
+
}
|
|
1768
|
+
function offeringDateRow(session, event, places, booking) {
|
|
1769
|
+
const options = eventDateOptions({
|
|
1770
|
+
...event,
|
|
1771
|
+
timeZone: session.timeZone
|
|
1772
|
+
});
|
|
1773
|
+
const date = formatEventCompactDateRail(session.startsAt, options, "as-written");
|
|
1774
|
+
const label = `${date.weekday} ${date.day} ${date.month}, ${formatTime(session.startsAt, options)}`;
|
|
1775
|
+
const bookingLink = booking?.(event, label) ?? null;
|
|
1776
|
+
return {
|
|
1777
|
+
startsAt: session.startsAt,
|
|
1778
|
+
label,
|
|
1779
|
+
...bookingLink ? { booking: bookingLink } : {},
|
|
1780
|
+
places
|
|
1781
|
+
};
|
|
1782
|
+
}
|
|
1783
|
+
/** A single occurrence's row is its own booking, so it reports that occurrence's capacity. */
|
|
1784
|
+
function occurrencePlaces(event) {
|
|
1785
|
+
const capacity = getEventAvailability(event);
|
|
1786
|
+
const status = getEventAvailabilityStatus(event);
|
|
1787
|
+
return capacity.available === null ? null : {
|
|
1788
|
+
label: capacity.isFull ? "Sold out" : `${capacity.available} place${capacity.available === 1 ? "" : "s"} left`,
|
|
1789
|
+
status: capacity.isFull ? "full" : status.status === "filling" ? "low" : "available"
|
|
1790
|
+
};
|
|
1791
|
+
}
|
|
1792
|
+
//#endregion
|
|
1793
|
+
//#region ../blocks/src/system/runtime/nodes/events/shared/eventCardListContent.ts
|
|
1794
|
+
/** Live offering data only; editorial cards never acquire booking fields. */
|
|
1795
|
+
function eventCardListContent(event, context, buttonText) {
|
|
1796
|
+
const { content, external } = cardProjectionBase(event, buttonText, context);
|
|
1797
|
+
switch (context.kind) {
|
|
1798
|
+
case "event-details": return {
|
|
1799
|
+
...content,
|
|
1800
|
+
chips: offeringTypeChips(event),
|
|
1801
|
+
leadDate: null,
|
|
1802
|
+
newTabHint: false,
|
|
1803
|
+
...offeringSchedule(event)
|
|
1804
|
+
};
|
|
1805
|
+
case "catalogue":
|
|
1806
|
+
case "offering": return {
|
|
1807
|
+
...content,
|
|
1808
|
+
chips: offeringTypeChips(event, context.typeLabel),
|
|
1809
|
+
leadDate: offeringLeadDate(event, context.nextStartMs),
|
|
1810
|
+
newTabHint: external,
|
|
1811
|
+
...offeringSchedule(event, context.now),
|
|
1812
|
+
...event.bookingScope === "whole_series" ? { dates: offeringRunDates(event, context.now, content.availability) } : {}
|
|
1813
|
+
};
|
|
1814
|
+
default: return assertNever$1(context);
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
function cardProjectionBase(event, buttonText, context) {
|
|
1818
|
+
const offering = context.kind !== "event-details";
|
|
1819
|
+
const { cta, availability: places, closed } = cardBooking(event, buttonText, context);
|
|
1820
|
+
const titleLink = resolveEventLinkProps(event);
|
|
1821
|
+
return {
|
|
1822
|
+
external: cta.external,
|
|
1823
|
+
content: {
|
|
1824
|
+
id: event.occurrenceId || event.id,
|
|
1825
|
+
title: event.title,
|
|
1826
|
+
...titleLink.href ? { titleLink } : {},
|
|
1827
|
+
quickFacts: event.facts,
|
|
1828
|
+
text: event.presentation?.summary ?? event.description,
|
|
1829
|
+
media: event.presentation?.image,
|
|
1830
|
+
facts: offeringFacts(event, places?.label, offering),
|
|
1831
|
+
availability: places,
|
|
1832
|
+
action: cardAction(cta),
|
|
1833
|
+
bookingClosed: closed ? cta.label : null
|
|
1834
|
+
}
|
|
1835
|
+
};
|
|
1836
|
+
}
|
|
1837
|
+
/** Offering cards carry the render clock; an event's own details show its projected booking state. */
|
|
1838
|
+
function cardBooking(event, buttonText, context) {
|
|
1839
|
+
switch (context.kind) {
|
|
1840
|
+
case "event-details": return resolveEventCardBooking(event, "occurrence", buttonText, { now: null });
|
|
1841
|
+
case "catalogue":
|
|
1842
|
+
case "offering": return resolveEventCardBooking(event, context.kind === "catalogue" ? "series" : "occurrence", event.destination.kind === "external" ? void 0 : buttonText, {
|
|
1843
|
+
now: context.now,
|
|
1844
|
+
count: context.count
|
|
1845
|
+
});
|
|
1846
|
+
default: return assertNever$1(context);
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
function offeringLeadDate(event, startMs) {
|
|
1850
|
+
if (startMs === null || !Number.isFinite(startMs)) return null;
|
|
1851
|
+
const startsAt = new Date(startMs).toISOString();
|
|
1852
|
+
const timeZone = resolveBookingBusinessTimeZone(event.bookingScope === "whole_series" ? orderedLiveRunSessions(event.run.sessions).find((session) => Date.parse(session.startsAt) === startMs)?.timeZone ?? event.timeZone : event.timeZone);
|
|
1853
|
+
return {
|
|
1854
|
+
startsAt,
|
|
1855
|
+
...formatEventCompactDateRail(startsAt, {
|
|
1856
|
+
...eventDateOptions(event),
|
|
1857
|
+
timeZone
|
|
1858
|
+
}, "as-written")
|
|
1859
|
+
};
|
|
1860
|
+
}
|
|
1861
|
+
function offeringSchedule(event, now) {
|
|
1862
|
+
const run = event.bookingScope === "whole_series" ? derivePreviewRunSchedule(event) : null;
|
|
1863
|
+
if (run?.kind === "no-live-sessions") return {
|
|
1864
|
+
numeral: null,
|
|
1865
|
+
schedule: null
|
|
1866
|
+
};
|
|
1867
|
+
const summary = run?.kind === "scheduled" ? run.summary : deriveEventScheduleSummary(event);
|
|
1868
|
+
return {
|
|
1869
|
+
numeral: run?.kind === "scheduled" ? {
|
|
1870
|
+
value: run.sessionCount,
|
|
1871
|
+
label: run.sessionCount === 1 ? "session" : "sessions"
|
|
1872
|
+
} : null,
|
|
1873
|
+
schedule: scheduleLine(summary, event, now)
|
|
1874
|
+
};
|
|
1875
|
+
}
|
|
1876
|
+
function scheduleLine(summary, event, now) {
|
|
1877
|
+
const first = "occurrence" in summary ? summary.occurrence : summary.first;
|
|
1878
|
+
const last = "occurrence" in summary ? summary.occurrence : summary.last;
|
|
1879
|
+
const context = eventDateOptions({
|
|
1880
|
+
...event,
|
|
1881
|
+
timeZone: first.timeZone
|
|
1882
|
+
});
|
|
1883
|
+
const zone = context.zone;
|
|
1884
|
+
const endpoint = (value) => ({
|
|
1885
|
+
kind: "instant",
|
|
1886
|
+
value: toUtcIsoDateTimeString(value)
|
|
1887
|
+
});
|
|
1888
|
+
const year = (value, timeZone = context.timeZone) => now && getLocalScheduleDate(new Date(value), timeZone).year === getLocalScheduleDate(now, timeZone).year ? "omit" : "numeric";
|
|
1889
|
+
const date = (value) => formatDate(endpoint(value), context, {
|
|
1890
|
+
date: "short",
|
|
1891
|
+
year: now ? year(value) : "omit"
|
|
1892
|
+
});
|
|
1893
|
+
const dates = (startsAt, endsAt, order = "chronological") => formatDateRange({
|
|
1894
|
+
kind: "civil",
|
|
1895
|
+
value: getLocalScheduleDate(new Date(startsAt), context.timeZone)
|
|
1896
|
+
}, {
|
|
1897
|
+
kind: "civil",
|
|
1898
|
+
value: getLocalScheduleDate(new Date(endsAt), resolveBookingBusinessTimeZone(last.timeZone))
|
|
1899
|
+
}, context, {
|
|
1900
|
+
date: "short",
|
|
1901
|
+
order,
|
|
1902
|
+
year: now && year(startsAt) === "omit" && year(endsAt, resolveBookingBusinessTimeZone(last.timeZone)) === "omit" ? "omit" : now ? "numeric" : "omit"
|
|
1903
|
+
});
|
|
1904
|
+
switch (summary.kind) {
|
|
1905
|
+
case "single-occurrence": return now ? formatDateTimeRange({
|
|
1906
|
+
start: endpoint(summary.occurrence.startsAt).value,
|
|
1907
|
+
end: endpoint(summary.occurrence.endsAt).value
|
|
1908
|
+
}, context, {
|
|
1909
|
+
date: "short",
|
|
1910
|
+
weekday: "short",
|
|
1911
|
+
year: year(summary.occurrence.startsAt),
|
|
1912
|
+
zone
|
|
1913
|
+
}) : date(summary.occurrence.startsAt);
|
|
1914
|
+
case "multi-day-span": return dates(summary.occurrence.startsAt, summary.occurrence.endsAt);
|
|
1915
|
+
case "scheduled-run": {
|
|
1916
|
+
const range = dates(summary.first.startsAt, summary.last.startsAt, "session");
|
|
1917
|
+
if (summary.authoredSummary) return `${range} · ${summary.authoredSummary.text}`;
|
|
1918
|
+
const clock = regularSessionClock(summary.sessions, event);
|
|
1919
|
+
return clock ? `${summary.sessionCount} ${clock.weekday}s, ${range}, ${clock.time}` : `${range} · ${summary.sessionCount} dates · Times vary`;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
function offeringFacts(event, places, offering) {
|
|
1924
|
+
return [
|
|
1925
|
+
...Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4) > 0 && (!offering || event.bookingScope === "whole_series") ? [{
|
|
1926
|
+
label: "Length",
|
|
1927
|
+
value: formatEventDuration(event, "readable")
|
|
1928
|
+
}] : [],
|
|
1929
|
+
...offering && event.venue ? [{
|
|
1930
|
+
label: "Venue",
|
|
1931
|
+
value: event.venue.name
|
|
1932
|
+
}] : [],
|
|
1933
|
+
...places ? [{
|
|
1934
|
+
label: "Places",
|
|
1935
|
+
value: places,
|
|
1936
|
+
kind: "availability"
|
|
1937
|
+
}] : [],
|
|
1938
|
+
...offering && event.pricing.kind === "external" ? [] : [{
|
|
1939
|
+
label: "Price",
|
|
1940
|
+
value: formatEventPriceDisplay(event.pricing)
|
|
1941
|
+
}]
|
|
1942
|
+
];
|
|
1943
|
+
}
|
|
1944
|
+
function offeringTypeChips(event, typeLabel) {
|
|
1945
|
+
return event.eventCategory ? [event.eventCategory.name] : typeLabel ? [typeLabel] : [];
|
|
1946
|
+
}
|
|
1947
|
+
function cardAction(cta) {
|
|
1948
|
+
return cta.hidden ? { label: cta.label } : {
|
|
1949
|
+
label: cta.label,
|
|
1950
|
+
href: cta.href,
|
|
1951
|
+
external: cta.external
|
|
1952
|
+
};
|
|
1953
|
+
}
|
|
1954
|
+
/** Compare each session in its own local zone, so regular clocks survive DST changes. Null when sessions differ. */
|
|
1955
|
+
function regularSessionClock(sessions, event) {
|
|
1956
|
+
const clocks = sessions.map((session) => {
|
|
1957
|
+
const context = {
|
|
1958
|
+
...eventDateOptions({
|
|
1959
|
+
...event,
|
|
1960
|
+
timeZone: session.timeZone
|
|
1961
|
+
}),
|
|
1962
|
+
zone: "omit"
|
|
1963
|
+
};
|
|
1964
|
+
return {
|
|
1965
|
+
weekday: formatDate({
|
|
1966
|
+
kind: "instant",
|
|
1967
|
+
value: toUtcIsoDateTimeString(session.startsAt)
|
|
1968
|
+
}, context, {
|
|
1969
|
+
date: "omit",
|
|
1970
|
+
weekday: "long",
|
|
1971
|
+
year: "omit"
|
|
1972
|
+
}),
|
|
1973
|
+
time: formatEventTimeRange(session, context)
|
|
1974
|
+
};
|
|
1975
|
+
});
|
|
1976
|
+
const first = clocks[0];
|
|
1977
|
+
return first && clocks.every((clock) => clock.weekday === first.weekday && clock.time === first.time) ? first : null;
|
|
1978
|
+
}
|
|
1979
|
+
//#endregion
|
|
1980
|
+
//#region ../blocks/src/system/runtime/nodes/offerings-preview-courses.tsx
|
|
1981
|
+
/** Course cards own parent copy once, while rows reuse the normal booking projection. */
|
|
1982
|
+
function OfferingCourseCards({ items, presentation, now, Carousel, buttonText }) {
|
|
1983
|
+
const courses = groupOfferingRunsByCourse(items);
|
|
1984
|
+
const ungrouped = items.filter((item) => item.kind !== "run" || !item.run.run.listing);
|
|
1985
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1986
|
+
...listLookSlot(presentation, "items"),
|
|
1987
|
+
children: [courses.map(({ id, course, parts }) => /* @__PURE__ */ jsxs("article", {
|
|
1988
|
+
...listLookSlot(presentation, "item"),
|
|
1989
|
+
children: [
|
|
1990
|
+
presentation.showPhotos !== false ? /* @__PURE__ */ jsx(CardListContentPart, {
|
|
1991
|
+
part: "media",
|
|
1992
|
+
item: {
|
|
1993
|
+
id,
|
|
1994
|
+
title: course.title,
|
|
1995
|
+
media: course.presentation?.image
|
|
1996
|
+
},
|
|
1997
|
+
presentation
|
|
1998
|
+
}) : null,
|
|
1999
|
+
/* @__PURE__ */ jsxs("header", {
|
|
2000
|
+
...listLookSlot(presentation, "item-body"),
|
|
2001
|
+
children: [
|
|
2002
|
+
/* @__PURE__ */ jsx(EventQuickFacts, {
|
|
2003
|
+
facts: course.facts,
|
|
2004
|
+
context: "card",
|
|
2005
|
+
eyebrow: true
|
|
2006
|
+
}),
|
|
2007
|
+
/* @__PURE__ */ jsx("h3", {
|
|
2008
|
+
...listLookSlot(presentation, "item-title"),
|
|
2009
|
+
children: course.title
|
|
2010
|
+
}),
|
|
2011
|
+
course.presentation?.summary ? /* @__PURE__ */ jsx("p", {
|
|
2012
|
+
...listLookSlot(presentation, "item-text"),
|
|
2013
|
+
children: course.presentation.summary
|
|
2014
|
+
}) : null
|
|
2015
|
+
]
|
|
2016
|
+
}),
|
|
2017
|
+
/* @__PURE__ */ jsx("ol", {
|
|
2018
|
+
...listLookSlot(presentation, "list"),
|
|
2019
|
+
children: parts.map((part) => /* @__PURE__ */ jsx(CoursePart, {
|
|
2020
|
+
part,
|
|
2021
|
+
presentation,
|
|
2022
|
+
now
|
|
2023
|
+
}, part.kind === "run" ? part.run.eventSeriesId : part.event.id))
|
|
2024
|
+
}),
|
|
2025
|
+
course.path ? /* @__PURE__ */ jsx("a", {
|
|
2026
|
+
...listLookSlot(presentation, "more"),
|
|
2027
|
+
className: "rb-item-text-link",
|
|
2028
|
+
href: course.path,
|
|
2029
|
+
children: buttonText
|
|
2030
|
+
}) : null
|
|
2031
|
+
]
|
|
2032
|
+
}, id)), ungrouped.length ? /* @__PURE__ */ jsx(CardListItems, {
|
|
2033
|
+
Carousel,
|
|
2034
|
+
presentation: {
|
|
2035
|
+
...presentation,
|
|
2036
|
+
cardArrangement: "cards"
|
|
2037
|
+
},
|
|
2038
|
+
items: ungrouped.map((item) => coursePartContent(item, now))
|
|
2039
|
+
}) : null]
|
|
2040
|
+
});
|
|
2041
|
+
}
|
|
2042
|
+
function coursePartContent(part, now) {
|
|
2043
|
+
const content = eventCardListContent(part.kind === "run" ? part.run.representative : part.event, {
|
|
2044
|
+
kind: "offering",
|
|
2045
|
+
now,
|
|
2046
|
+
nextStartMs: part.nextStartMs,
|
|
2047
|
+
count: "always"
|
|
2048
|
+
});
|
|
2049
|
+
return part.kind === "run" && part.run.run.listing ? {
|
|
2050
|
+
...content,
|
|
2051
|
+
title: part.run.run.listing.title ?? part.run.run.listing.course.title
|
|
2052
|
+
} : content;
|
|
2053
|
+
}
|
|
2054
|
+
function CoursePart({ part, presentation, now }) {
|
|
2055
|
+
const content = coursePartContent(part, now);
|
|
2056
|
+
const event = part.kind === "run" ? part.run.representative : part.event;
|
|
2057
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
2058
|
+
...listLookSlot(presentation, "row"),
|
|
2059
|
+
children: [
|
|
2060
|
+
/* @__PURE__ */ jsx(CardListContentPart, {
|
|
2061
|
+
part: "date-stamp",
|
|
2062
|
+
item: content,
|
|
2063
|
+
presentation
|
|
2064
|
+
}),
|
|
2065
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2066
|
+
...listLookSlot(presentation, "what"),
|
|
2067
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
2068
|
+
...listLookSlot(presentation, "group-label"),
|
|
2069
|
+
children: content.titleLink ? /* @__PURE__ */ jsx("a", {
|
|
2070
|
+
...content.titleLink,
|
|
2071
|
+
children: content.title
|
|
2072
|
+
}) : content.title
|
|
2073
|
+
}), /* @__PURE__ */ jsx(CardListContentPart, {
|
|
2074
|
+
part: "schedule",
|
|
2075
|
+
item: content,
|
|
2076
|
+
presentation
|
|
2077
|
+
})]
|
|
2078
|
+
}),
|
|
2079
|
+
/* @__PURE__ */ jsx("p", {
|
|
2080
|
+
...listLookSlot(presentation, "price"),
|
|
2081
|
+
children: formatEventStartingPrice(event.pricing) ?? formatEventPriceDisplay(event.pricing)
|
|
2082
|
+
}),
|
|
2083
|
+
content.bookingClosed ? /* @__PURE__ */ jsx("p", {
|
|
2084
|
+
...listLookSlot(presentation, "availability"),
|
|
2085
|
+
"data-availability": "closed",
|
|
2086
|
+
children: /* @__PURE__ */ jsx("span", { children: content.bookingClosed })
|
|
2087
|
+
}) : /* @__PURE__ */ jsx(CardListContentPart, {
|
|
2088
|
+
part: "availability",
|
|
2089
|
+
item: content,
|
|
2090
|
+
presentation
|
|
2091
|
+
})
|
|
2092
|
+
]
|
|
2093
|
+
});
|
|
2094
|
+
}
|
|
2095
|
+
/** Slot parents follow course-card markup, including the nested part rows. */
|
|
2096
|
+
const offeringCourseSlotParents = {
|
|
2097
|
+
items: "layout",
|
|
2098
|
+
item: "items",
|
|
2099
|
+
"item-media": "item",
|
|
2100
|
+
"item-body": "item",
|
|
2101
|
+
list: "item",
|
|
2102
|
+
row: "list",
|
|
2103
|
+
what: "row",
|
|
2104
|
+
eyebrow: "item-body",
|
|
2105
|
+
"group-label": "what",
|
|
2106
|
+
schedule: "what",
|
|
2107
|
+
date: "row",
|
|
2108
|
+
availability: "row",
|
|
2109
|
+
price: "row",
|
|
2110
|
+
more: "item"
|
|
2111
|
+
};
|
|
2112
|
+
//#endregion
|
|
1555
2113
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.view.tsx
|
|
1556
2114
|
function EventListingFrameView(props) {
|
|
1557
2115
|
const { display, filters, emptyState, renderEventCard } = props;
|
|
@@ -1566,6 +2124,7 @@ function EventListingFrameView(props) {
|
|
|
1566
2124
|
return /* @__PURE__ */ jsxs("div", {
|
|
1567
2125
|
className: `event-listing ${display.className ?? ""}`,
|
|
1568
2126
|
"data-block": "event-listing",
|
|
2127
|
+
"data-event-rows": display.eventRows,
|
|
1569
2128
|
children: [
|
|
1570
2129
|
filters,
|
|
1571
2130
|
display.state === "loading" ? /* @__PURE__ */ jsx(EmptyState, { message: display.loadingMessage }) : display.state === "empty" ? emptyState ?? /* @__PURE__ */ jsx(EmptyState, { message: display.emptyMessage }) : /* @__PURE__ */ jsx(EventListBody, {
|
|
@@ -1582,11 +2141,120 @@ function EventListBody({ display, renderEventCard, footer }) {
|
|
|
1582
2141
|
className: display.containerClass,
|
|
1583
2142
|
children: display.events.map(renderEventCard)
|
|
1584
2143
|
});
|
|
1585
|
-
|
|
1586
|
-
display
|
|
1587
|
-
week: display
|
|
2144
|
+
switch (display.listLayout) {
|
|
2145
|
+
case "week-groups": return /* @__PURE__ */ jsx(WeekGroups, { display });
|
|
2146
|
+
case "week-columns": return /* @__PURE__ */ jsx(WeekColumnList, { display });
|
|
2147
|
+
case "day-groups": return /* @__PURE__ */ jsx(DayGroups, { display });
|
|
2148
|
+
case "ledger":
|
|
2149
|
+
case "timetable-rows": return /* @__PURE__ */ jsx(EventRows, {
|
|
2150
|
+
display,
|
|
2151
|
+
arrangement: display.listLayout
|
|
2152
|
+
});
|
|
2153
|
+
case "compact": return /* @__PURE__ */ jsx(CompactPanel, {
|
|
2154
|
+
display,
|
|
2155
|
+
renderEventCard,
|
|
2156
|
+
footer
|
|
2157
|
+
});
|
|
2158
|
+
case "grid":
|
|
2159
|
+
case "stack": return /* @__PURE__ */ jsx("div", {
|
|
2160
|
+
...listLookSlot(display, "list"),
|
|
2161
|
+
className: display.containerClass,
|
|
2162
|
+
children: display.events.map(renderEventCard)
|
|
2163
|
+
});
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
/** All seven days of the shown week; a day known to be empty says so, and a wholly empty week never reaches here. */
|
|
2167
|
+
function WeekColumns({ display, week }) {
|
|
2168
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
2169
|
+
...listLookSlot(display, "list"),
|
|
2170
|
+
children: weekColumnDays(week, display.events, display.allLoaded === true).map((day) => /* @__PURE__ */ jsxs("li", {
|
|
2171
|
+
...listLookSlot(display, "group"),
|
|
2172
|
+
...day.isToday ? { "data-today": "true" } : {},
|
|
2173
|
+
children: [/* @__PURE__ */ jsxs("h3", {
|
|
2174
|
+
...listLookSlot(display, "group-label"),
|
|
2175
|
+
children: [
|
|
2176
|
+
/* @__PURE__ */ jsxs("span", {
|
|
2177
|
+
...listLookSlot(display, "group-day"),
|
|
2178
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2179
|
+
"aria-hidden": "true",
|
|
2180
|
+
children: day.label.weekday
|
|
2181
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2182
|
+
className: "rb-sr-only",
|
|
2183
|
+
children: day.label.fullWeekday
|
|
2184
|
+
})]
|
|
2185
|
+
}),
|
|
2186
|
+
" ",
|
|
2187
|
+
/* @__PURE__ */ jsx("span", {
|
|
2188
|
+
...listLookSlot(display, "group-date", day.isToday ? "today" : void 0),
|
|
2189
|
+
children: day.label.day
|
|
2190
|
+
})
|
|
2191
|
+
]
|
|
2192
|
+
}), day.sessions.kind === "some" ? /* @__PURE__ */ jsx("ol", { children: day.sessions.events.map((event) => /* @__PURE__ */ jsx(EventItem, {
|
|
2193
|
+
...listItemPresentation(display, display.events.indexOf(event), display.events.length),
|
|
2194
|
+
event,
|
|
2195
|
+
arrangement: "week-columns"
|
|
2196
|
+
}, event.occurrenceId || event.id)) }) : day.sessions.kind === "none" ? /* @__PURE__ */ jsx("p", {
|
|
2197
|
+
...listLookSlot(display, "group-empty"),
|
|
2198
|
+
children: "Nothing on"
|
|
2199
|
+
}) : null]
|
|
2200
|
+
}, day.dateKey))
|
|
1588
2201
|
});
|
|
1589
|
-
|
|
2202
|
+
}
|
|
2203
|
+
function hasArrangementPanel(display) {
|
|
2204
|
+
return display.state === "ready" && display.lookSlots !== void 0 && display.listLayout === "compact";
|
|
2205
|
+
}
|
|
2206
|
+
/** Nearest slot parents in EventListBody and WeekColumns. */
|
|
2207
|
+
/** `root` is the declared slot the listing renders inside (a Look may paint the block's layout), or null. */
|
|
2208
|
+
function eventListSlotParents(arrangement, root = null, eventRows) {
|
|
2209
|
+
if (eventRows === "day-schedule") return {
|
|
2210
|
+
list: root,
|
|
2211
|
+
group: "list",
|
|
2212
|
+
"group-label": "group",
|
|
2213
|
+
"group-date": "group-label",
|
|
2214
|
+
"group-day": "group-label",
|
|
2215
|
+
day: "group-date",
|
|
2216
|
+
month: "group-date",
|
|
2217
|
+
items: "group",
|
|
2218
|
+
row: "items",
|
|
2219
|
+
"row-continued": "items"
|
|
2220
|
+
};
|
|
2221
|
+
return {
|
|
2222
|
+
list: arrangement === "compact" ? "panel" : root,
|
|
2223
|
+
panel: root,
|
|
2224
|
+
group: "list",
|
|
2225
|
+
"group-label": "group",
|
|
2226
|
+
"group-date": "group-label",
|
|
2227
|
+
item: "list",
|
|
2228
|
+
...arrangement === "week-groups" ? {
|
|
2229
|
+
items: "group",
|
|
2230
|
+
row: "items"
|
|
2231
|
+
} : { row: arrangement === "week-columns" || arrangement === "day-groups" ? "group" : "list" },
|
|
2232
|
+
"row-continued": "list"
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
function WeekGroups({ display }) {
|
|
2236
|
+
const context = display.weekGrouping;
|
|
2237
|
+
if (!context) return /* @__PURE__ */ jsx(DayGroups, { display });
|
|
2238
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
2239
|
+
...listLookSlot(display, "list"),
|
|
2240
|
+
children: groupEventsByWeek(display.events, context).map((week) => /* @__PURE__ */ jsxs("li", {
|
|
2241
|
+
...listLookSlot(display, "group"),
|
|
2242
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
2243
|
+
...listLookSlot(display, "group-label"),
|
|
2244
|
+
children: week.label
|
|
2245
|
+
}), /* @__PURE__ */ jsx("ol", {
|
|
2246
|
+
...listLookSlot(display, "items"),
|
|
2247
|
+
children: week.events.map((event) => /* @__PURE__ */ jsx(EventItem, {
|
|
2248
|
+
...listItemPresentation(display, display.events.indexOf(event), display.events.length),
|
|
2249
|
+
event,
|
|
2250
|
+
arrangement: "week-groups"
|
|
2251
|
+
}, event.occurrenceId || event.id))
|
|
2252
|
+
})]
|
|
2253
|
+
}, week.key))
|
|
2254
|
+
});
|
|
2255
|
+
}
|
|
2256
|
+
function DayGroups({ display }) {
|
|
2257
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
1590
2258
|
...listLookSlot(display, "list"),
|
|
1591
2259
|
children: display.events.filter((event, index, events) => events.findIndex((candidate) => eventLocalDateKey(candidate) === eventLocalDateKey(event)) === index).map((first) => {
|
|
1592
2260
|
const date = formatEventCompactDateRail(first.startsAt, eventDateOptions(first), "as-written");
|
|
@@ -1613,19 +2281,21 @@ function EventListBody({ display, renderEventCard, footer }) {
|
|
|
1613
2281
|
}, eventLocalDateKey(first));
|
|
1614
2282
|
})
|
|
1615
2283
|
});
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
})
|
|
1627
|
-
}
|
|
1628
|
-
|
|
2284
|
+
}
|
|
2285
|
+
function EventRows({ display, arrangement }) {
|
|
2286
|
+
if (display.eventRows === "day-schedule") return /* @__PURE__ */ jsx(DaySchedule, { display });
|
|
2287
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
2288
|
+
...listLookSlot(display, "list"),
|
|
2289
|
+
children: display.events.map((event, index, events) => /* @__PURE__ */ jsx(EventItem, {
|
|
2290
|
+
...listItemPresentation(display, index, events.length),
|
|
2291
|
+
event,
|
|
2292
|
+
arrangement,
|
|
2293
|
+
continued: index > 0 && eventLocalDateKey(event) === eventLocalDateKey(events[index - 1] ?? event)
|
|
2294
|
+
}, event.occurrenceId || event.id))
|
|
2295
|
+
});
|
|
2296
|
+
}
|
|
2297
|
+
function CompactPanel({ display, renderEventCard, footer }) {
|
|
2298
|
+
return /* @__PURE__ */ jsxs("aside", {
|
|
1629
2299
|
...listLookSlot(display, "panel"),
|
|
1630
2300
|
className: display.containerClass,
|
|
1631
2301
|
children: [
|
|
@@ -1640,66 +2310,66 @@ function EventListBody({ display, renderEventCard, footer }) {
|
|
|
1640
2310
|
footer
|
|
1641
2311
|
]
|
|
1642
2312
|
});
|
|
1643
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1644
|
-
...listLookSlot(display, "list"),
|
|
1645
|
-
className: display.containerClass,
|
|
1646
|
-
children: display.events.map(renderEventCard)
|
|
1647
|
-
});
|
|
1648
2313
|
}
|
|
1649
|
-
|
|
1650
|
-
|
|
2314
|
+
function WeekColumnList({ display }) {
|
|
2315
|
+
return display.week ? /* @__PURE__ */ jsx(WeekColumns, {
|
|
2316
|
+
display,
|
|
2317
|
+
week: display.week
|
|
2318
|
+
}) : /* @__PURE__ */ jsx(DayGroups, { display });
|
|
2319
|
+
}
|
|
2320
|
+
/** Opt-in structure on the ledger: each session shows its quick facts as tags above its title. */
|
|
2321
|
+
function DaySchedule({ display }) {
|
|
2322
|
+
const options = eventDateOptions({ siteTimeZone: display.weekGrouping?.timeZone ?? display.events[0]?.siteTimeZone });
|
|
1651
2323
|
return /* @__PURE__ */ jsx("ol", {
|
|
1652
2324
|
...listLookSlot(display, "list"),
|
|
1653
|
-
children:
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
children: day
|
|
1667
|
-
})
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
2325
|
+
children: [...groupEventsByDate([...display.events], options.timeZone)].map(([key, events]) => {
|
|
2326
|
+
const first = events[0];
|
|
2327
|
+
if (!first) return null;
|
|
2328
|
+
const date = formatEventCompactDateRail(first.startsAt, options, "as-written");
|
|
2329
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
2330
|
+
...listLookSlot(display, "group"),
|
|
2331
|
+
children: [/* @__PURE__ */ jsxs("h3", {
|
|
2332
|
+
...listLookSlot(display, "group-label"),
|
|
2333
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
2334
|
+
...listLookSlot(display, "group-date"),
|
|
2335
|
+
"aria-hidden": "true",
|
|
2336
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2337
|
+
...listLookSlot(display, "day"),
|
|
2338
|
+
children: date.day
|
|
2339
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2340
|
+
...listLookSlot(display, "month"),
|
|
2341
|
+
children: date.month
|
|
2342
|
+
})]
|
|
2343
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
2344
|
+
...listLookSlot(display, "group-day"),
|
|
2345
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2346
|
+
"aria-hidden": "true",
|
|
2347
|
+
children: date.fullWeekday
|
|
2348
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2349
|
+
className: "rb-sr-only",
|
|
2350
|
+
children: date.label
|
|
2351
|
+
})]
|
|
2352
|
+
})]
|
|
2353
|
+
}), /* @__PURE__ */ jsx("ol", {
|
|
2354
|
+
...listLookSlot(display, "items"),
|
|
2355
|
+
children: events.map((event) => /* @__PURE__ */ jsx(EventItem, {
|
|
2356
|
+
...listItemPresentation(display, display.events.indexOf(event), display.events.length),
|
|
2357
|
+
event,
|
|
2358
|
+
arrangement: "ledger",
|
|
2359
|
+
showCapacity: display.showCapacity,
|
|
2360
|
+
parts: [
|
|
2361
|
+
"title",
|
|
2362
|
+
"time",
|
|
2363
|
+
"places",
|
|
2364
|
+
"action"
|
|
2365
|
+
],
|
|
2366
|
+
itemActionStyle: "button"
|
|
2367
|
+
}, event.occurrenceId || event.id))
|
|
2368
|
+
})]
|
|
2369
|
+
}, key);
|
|
2370
|
+
})
|
|
1684
2371
|
});
|
|
1685
2372
|
}
|
|
1686
|
-
function hasArrangementPanel(display) {
|
|
1687
|
-
return display.state === "ready" && display.lookSlots !== void 0 && display.listLayout === "compact";
|
|
1688
|
-
}
|
|
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: arrangement === "compact" ? "panel" : root,
|
|
1694
|
-
panel: root,
|
|
1695
|
-
group: "list",
|
|
1696
|
-
"group-label": "group",
|
|
1697
|
-
"group-date": "group-label",
|
|
1698
|
-
item: "list",
|
|
1699
|
-
row: arrangement === "week-columns" || arrangement === "day-groups" ? "group" : "list",
|
|
1700
|
-
"row-continued": "list"
|
|
1701
|
-
};
|
|
1702
|
-
}
|
|
1703
2373
|
//#endregion
|
|
1704
2374
|
//#region ../blocks/src/system/runtime/nodes/events/shared/MonthLookView.tsx
|
|
1705
2375
|
function MonthEvent({ event, timeZone, locale, presentation }) {
|
|
@@ -1846,190 +2516,6 @@ function monthSlotParents(arrangement) {
|
|
|
1846
2516
|
};
|
|
1847
2517
|
}
|
|
1848
2518
|
//#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
2519
|
//#region ../blocks/src/system/runtime/nodes/event-registration/constants.ts
|
|
2034
2520
|
const EVENT_REGISTRATION_ANCHOR_ID = "event-registration";
|
|
2035
2521
|
//#endregion
|
|
@@ -2187,7 +2673,7 @@ function arrangementSlotParents(input) {
|
|
|
2187
2673
|
const { target, arrangement } = input;
|
|
2188
2674
|
if (target === "events") return {
|
|
2189
2675
|
...derived,
|
|
2190
|
-
...eventListSlotParents(arrangement, "layout" in derived ? "layout" : null),
|
|
2676
|
+
...eventListSlotParents(arrangement, "layout" in derived ? "layout" : null, input.eventRows),
|
|
2191
2677
|
...eventItemSlotParents(arrangement),
|
|
2192
2678
|
...arrangement === "month-grid" || arrangement === "month-day" ? monthSlotParents(arrangement) : {}
|
|
2193
2679
|
};
|
|
@@ -2195,6 +2681,10 @@ function arrangementSlotParents(input) {
|
|
|
2195
2681
|
...derived,
|
|
2196
2682
|
...eventHeaderSlotParents
|
|
2197
2683
|
};
|
|
2684
|
+
if (arrangement === "course-groups") return {
|
|
2685
|
+
...derived,
|
|
2686
|
+
...offeringCourseSlotParents
|
|
2687
|
+
};
|
|
2198
2688
|
if (target === "feature-cards") return {
|
|
2199
2689
|
...derived,
|
|
2200
2690
|
...cardItemSlotParents(arrangement)
|
|
@@ -2202,11 +2692,12 @@ function arrangementSlotParents(input) {
|
|
|
2202
2692
|
return derived;
|
|
2203
2693
|
}
|
|
2204
2694
|
/** The selected layout is shared by the planner and its diagnostic consumers. */
|
|
2205
|
-
function arrangementSlotParentsForManifest(manifest, target, arrangement) {
|
|
2695
|
+
function arrangementSlotParentsForManifest(manifest, target, arrangement, eventRows) {
|
|
2206
2696
|
return arrangementSlotParents({
|
|
2207
2697
|
tree: manifest?.variants?.[arrangement] ?? manifest?.layout,
|
|
2208
2698
|
target,
|
|
2209
|
-
arrangement
|
|
2699
|
+
arrangement,
|
|
2700
|
+
eventRows
|
|
2210
2701
|
});
|
|
2211
2702
|
}
|
|
2212
2703
|
//#endregion
|
|
@@ -2618,6 +3109,65 @@ function childFields(field) {
|
|
|
2618
3109
|
return [];
|
|
2619
3110
|
}
|
|
2620
3111
|
//#endregion
|
|
3112
|
+
//#region ../blocks/src/system/customize/lookParts.ts
|
|
3113
|
+
const lookParts = {
|
|
3114
|
+
"block.hero": [{
|
|
3115
|
+
part: "more photos",
|
|
3116
|
+
fields: ["morePhotos"],
|
|
3117
|
+
shownIn: ["photo-trio"]
|
|
3118
|
+
}],
|
|
3119
|
+
"block.cta-full": [{
|
|
3120
|
+
part: "figure",
|
|
3121
|
+
fields: ["figure", "figureNote"],
|
|
3122
|
+
shownIn: ["figure"]
|
|
3123
|
+
}],
|
|
3124
|
+
"block.location-map": [{
|
|
3125
|
+
part: "entrance photo",
|
|
3126
|
+
fields: ["entrancePhoto"],
|
|
3127
|
+
shownIn: ["photo-and-details"]
|
|
3128
|
+
}],
|
|
3129
|
+
"block.feature-cards": [{
|
|
3130
|
+
part: "eyebrow",
|
|
3131
|
+
fields: ["eyebrow"],
|
|
3132
|
+
shownIn: [
|
|
3133
|
+
"lead-support",
|
|
3134
|
+
"index",
|
|
3135
|
+
"sequence",
|
|
3136
|
+
"slides",
|
|
3137
|
+
"track"
|
|
3138
|
+
]
|
|
3139
|
+
}],
|
|
3140
|
+
"block.event-details": [{
|
|
3141
|
+
part: "title",
|
|
3142
|
+
fields: ["showTitle"],
|
|
3143
|
+
shownIn: ["details-panel"]
|
|
3144
|
+
}, {
|
|
3145
|
+
part: "description",
|
|
3146
|
+
fields: ["showDescription"],
|
|
3147
|
+
shownIn: ["details-panel"]
|
|
3148
|
+
}]
|
|
3149
|
+
};
|
|
3150
|
+
/** Fields the arrangement leaves out. Nothing on an older style, where no arrangement Look shows the block. */
|
|
3151
|
+
function fieldsNotShownIn(blockKind, arrangement) {
|
|
3152
|
+
if (arrangement === null) return [];
|
|
3153
|
+
return (lookParts[blockKind] ?? []).flatMap((part) => part.shownIn.includes(arrangement) ? [] : part.fields);
|
|
3154
|
+
}
|
|
3155
|
+
function lookPartShown(blockKind, field, arrangement) {
|
|
3156
|
+
return !fieldsNotShownIn(blockKind, arrangement).includes(field);
|
|
3157
|
+
}
|
|
3158
|
+
//#endregion
|
|
3159
|
+
//#region ../blocks/src/system/transforms/registry/classPrices.ts
|
|
3160
|
+
const classPriceItemsTransform = {
|
|
3161
|
+
id: "events.classPriceItems",
|
|
3162
|
+
kind: "collection",
|
|
3163
|
+
summary: "Live class price items with editable copy",
|
|
3164
|
+
run(value, _options, context) {
|
|
3165
|
+
const data = classPricesDataSchema.safeParse(value);
|
|
3166
|
+
const copy = classPricesCopySchema.safeParse(context.viewModel?.content);
|
|
3167
|
+
return data.success ? resolveClassPriceItems(data.data, copy.success ? copy.data : {}) : [];
|
|
3168
|
+
}
|
|
3169
|
+
};
|
|
3170
|
+
//#endregion
|
|
2621
3171
|
//#region ../blocks/src/system/transforms/registry/eventRegistrationPageKind.ts
|
|
2622
3172
|
const eventRegistrationPageReadAdmission = {
|
|
2623
3173
|
id: "events.registrationPageReadAdmission",
|
|
@@ -3084,6 +3634,7 @@ const serviceDetailsSourceSchema = z.object({
|
|
|
3084
3634
|
pricing: publicAppointmentPricingSchema.optional(),
|
|
3085
3635
|
priceAmount: z.number().nullable(),
|
|
3086
3636
|
priceCurrency: z.string().nullable(),
|
|
3637
|
+
requiresApproval: z.boolean().optional(),
|
|
3087
3638
|
onlinePaymentMode: z.enum(["session_or_package", "package_only"]).optional(),
|
|
3088
3639
|
location: publicAppointmentLocationSchema,
|
|
3089
3640
|
cancellationPolicy: z.object({ refunds: z.object({
|
|
@@ -3111,6 +3662,10 @@ function serviceDetailsFacts(service) {
|
|
|
3111
3662
|
const location = formatAppointmentLocation(service.location);
|
|
3112
3663
|
const practitioners = service.practitioners ?? [];
|
|
3113
3664
|
return [
|
|
3665
|
+
...service.requiresApproval ? [{
|
|
3666
|
+
label: "Booking",
|
|
3667
|
+
value: "You ask for a time, and it’s booked once it’s accepted."
|
|
3668
|
+
}] : [],
|
|
3114
3669
|
{
|
|
3115
3670
|
label: "How long",
|
|
3116
3671
|
value: formatAppointmentDuration(service.durationMinutes)
|
|
@@ -3149,24 +3704,26 @@ const serviceDetailsFactsTransform = {
|
|
|
3149
3704
|
summary: "Read the facts shown for one appointment service",
|
|
3150
3705
|
run: (value) => readServiceDetailsFacts(value)
|
|
3151
3706
|
};
|
|
3707
|
+
/** Display props for the client: the section's scope in content-field shape. */
|
|
3152
3708
|
const eventCalendarSelectionParam = {
|
|
3153
3709
|
id: "events.calendarSelectionParam",
|
|
3154
3710
|
kind: "formatter",
|
|
3155
3711
|
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
|
-
]) }),
|
|
3712
|
+
schema: z.object({ key: z.enum(["seriesIds", ...eventDiscoveryFilterKeys]) }),
|
|
3165
3713
|
run(value, { key }) {
|
|
3166
|
-
const
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3714
|
+
const scope = resolveEventScope(asPartialObject(value) ?? {});
|
|
3715
|
+
if (scope.kind === "selected") return key === "seriesIds" ? scope.seriesIds : void 0;
|
|
3716
|
+
return key === "seriesIds" ? void 0 : scope.filters[key];
|
|
3717
|
+
}
|
|
3718
|
+
};
|
|
3719
|
+
/** Public event query params for the section's scope, shared by render loaders and readiness. */
|
|
3720
|
+
const eventScopeParam = {
|
|
3721
|
+
id: "events.scopeParam",
|
|
3722
|
+
kind: "formatter",
|
|
3723
|
+
summary: "Public event query params for the section scope",
|
|
3724
|
+
schema: z.object({ key: z.enum(eventScopeQueryKeys) }),
|
|
3725
|
+
run(value, { key }) {
|
|
3726
|
+
return eventScopeLoaderParam(eventScopeQuery(resolveEventScope(asPartialObject(value) ?? {})), key);
|
|
3170
3727
|
}
|
|
3171
3728
|
};
|
|
3172
3729
|
const readJobSchema = z.object({ job: z.enum([
|
|
@@ -3192,9 +3749,43 @@ const eventCalendarReadEnabled = {
|
|
|
3192
3749
|
return plan.jobs === options.job || plan.jobs === "both" && options.job !== "schedule";
|
|
3193
3750
|
}
|
|
3194
3751
|
};
|
|
3752
|
+
/**
|
|
3753
|
+
* The week board's authored band paints `surfaceAlt` across the whole
|
|
3754
|
+
* section, under whatever foreground the section resolved. That foreground is
|
|
3755
|
+
* the page's only when the section paints nothing itself, so the band is
|
|
3756
|
+
* honoured on a plain section and dropped when a Look or override already
|
|
3757
|
+
* paints one (light band text on a pale board band otherwise).
|
|
3758
|
+
*/
|
|
3759
|
+
const eventCalendarBanded = {
|
|
3760
|
+
id: "events.calendarBanded",
|
|
3761
|
+
kind: "formatter",
|
|
3762
|
+
summary: "Paint the week-board band only on a section with no background of its own",
|
|
3763
|
+
run(value) {
|
|
3764
|
+
const content = asPartialObject(value) ?? {};
|
|
3765
|
+
const sectionStyles = asPartialObject(content._sectionStyles);
|
|
3766
|
+
return content.banded === true && parseBackgroundContent(sectionStyles?.background) === null;
|
|
3767
|
+
}
|
|
3768
|
+
};
|
|
3769
|
+
/** The list loader keeps its one request and adds bounds only for weekly lists. */
|
|
3770
|
+
const eventCalendarListWindow = {
|
|
3771
|
+
id: "events.calendarListWindow",
|
|
3772
|
+
kind: "formatter",
|
|
3773
|
+
schema: z.object({ key: z.enum(["from", "to"]) }),
|
|
3774
|
+
run(_value, { key }, context) {
|
|
3775
|
+
const content = context.data ?? {};
|
|
3776
|
+
if (eventCalendarListGroupingDecision({
|
|
3777
|
+
...content,
|
|
3778
|
+
arrangementLooks: content._lookSlots !== void 0
|
|
3779
|
+
}).grouping !== "week") return void 0;
|
|
3780
|
+
const timeZone = context.dateContext.timeZone;
|
|
3781
|
+
const startOfWeek = eventCalendarWeekStart(timeZone, content.startOfWeek === "sunday" || content.startOfWeek === "monday" ? content.startOfWeek : void 0);
|
|
3782
|
+
return buildEventListWeek(getLocalScheduleDate(new Date(readRuntimeNow(context.now)), timeZone), startOfWeek, timeZone)[key];
|
|
3783
|
+
}
|
|
3784
|
+
};
|
|
3195
3785
|
//#endregion
|
|
3196
3786
|
//#region ../blocks/src/system/transforms/registry/index.ts
|
|
3197
3787
|
const builtinTransformDefinitions = [
|
|
3788
|
+
classPriceItemsTransform,
|
|
3198
3789
|
eventRegistrationPageReadAdmission,
|
|
3199
3790
|
offeringsPreviewDatesReadEnabled,
|
|
3200
3791
|
lookLeadSlotTransform,
|
|
@@ -3202,33 +3793,27 @@ const builtinTransformDefinitions = [
|
|
|
3202
3793
|
lookCarouselRegionTransform,
|
|
3203
3794
|
lookSkinSlotTransform,
|
|
3204
3795
|
{
|
|
3205
|
-
id: "events.
|
|
3796
|
+
id: "events.readinessEnabled",
|
|
3206
3797
|
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];
|
|
3798
|
+
run(value) {
|
|
3799
|
+
const content = asPartialObject(value) ?? {};
|
|
3800
|
+
return content.emptyBehavior === "hide" && eventReadinessLoaderKey(content) !== "schedule";
|
|
3217
3801
|
}
|
|
3218
3802
|
},
|
|
3219
|
-
eventCalendarSelectionParam,
|
|
3220
|
-
eventCalendarReadEnabled,
|
|
3221
|
-
eventCalendarReadProfile,
|
|
3222
3803
|
{
|
|
3223
|
-
id: "events.
|
|
3804
|
+
id: "events.readinessParam",
|
|
3224
3805
|
kind: "formatter",
|
|
3225
|
-
|
|
3226
|
-
run(value) {
|
|
3227
|
-
|
|
3228
|
-
const sectionStyles = asPartialObject(content._sectionStyles);
|
|
3229
|
-
return content.banded === true && parseBackgroundContent(sectionStyles?.background) === null;
|
|
3806
|
+
schema: z.object({ key: z.enum(eventReadinessQueryKeys) }),
|
|
3807
|
+
run(value, { key }) {
|
|
3808
|
+
return eventScopeLoaderParam(eventReadinessQuery(asPartialObject(value) ?? {}), key);
|
|
3230
3809
|
}
|
|
3231
3810
|
},
|
|
3811
|
+
eventCalendarListWindow,
|
|
3812
|
+
eventCalendarSelectionParam,
|
|
3813
|
+
eventScopeParam,
|
|
3814
|
+
eventCalendarReadEnabled,
|
|
3815
|
+
eventCalendarReadProfile,
|
|
3816
|
+
eventCalendarBanded,
|
|
3232
3817
|
...formattingTransforms,
|
|
3233
3818
|
...layoutTransforms,
|
|
3234
3819
|
...chromeLogoTransforms,
|
|
@@ -3989,9 +4574,11 @@ function effectiveLookFromContent(content) {
|
|
|
3989
4574
|
const value = content._effectiveLook;
|
|
3990
4575
|
return isObjectRecord(value) && isObjectRecord(value.look) ? restoreCompiledLook(value) : null;
|
|
3991
4576
|
}
|
|
3992
|
-
function planArrangementContent(blockKind, manifest,
|
|
3993
|
-
const runtime = arrangementRuntime(
|
|
3994
|
-
if (!runtime) return
|
|
4577
|
+
function planArrangementContent(blockKind, manifest, authored, audience) {
|
|
4578
|
+
const runtime = arrangementRuntime(authored);
|
|
4579
|
+
if (!runtime) return authored;
|
|
4580
|
+
const spacingHook = authoredSectionSpacingHook(authored);
|
|
4581
|
+
const content = withoutSectionSpacing(authored);
|
|
3995
4582
|
const mode = readStoredMode({
|
|
3996
4583
|
...arrangementManifestFromVariants(manifest),
|
|
3997
4584
|
variantMeaning: manifest.variantMeaning
|
|
@@ -4013,11 +4600,11 @@ function planArrangementContent(blockKind, manifest, content, audience) {
|
|
|
4013
4600
|
}), ["look"]);
|
|
4014
4601
|
const activeContent = withoutLookOwnedContent(Object.fromEntries(Object.entries(content).filter(([key]) => knobs[key]?.kind !== "kept")), lookOwnedPaths);
|
|
4015
4602
|
const photoContent = arrangementPhotoContent(activeContent, effectiveContent);
|
|
4016
|
-
const
|
|
4603
|
+
const photoCount = arrangementContentFacts({
|
|
4017
4604
|
...activeContent,
|
|
4018
4605
|
...effectiveContent,
|
|
4019
4606
|
...photoContent
|
|
4020
|
-
});
|
|
4607
|
+
}).photoCount + lookPartPhotoCount(blockKind, activeContent, effective.look.structure.byMode[mode ?? "default"] ?? null);
|
|
4021
4608
|
return {
|
|
4022
4609
|
...activeContent,
|
|
4023
4610
|
...arrangementPhotoTreatmentContent(activeContent, effective, runtime.surfaceContext.palette, values.photoTint === "brand" ? "brand" : "dark"),
|
|
@@ -4029,10 +4616,13 @@ function planArrangementContent(blockKind, manifest, content, audience) {
|
|
|
4029
4616
|
...arrangementQuoteContent(blockKind, effective, values),
|
|
4030
4617
|
_arrangementLooks: runtime,
|
|
4031
4618
|
_effectiveLook: effective,
|
|
4032
|
-
_lookHooks:
|
|
4033
|
-
...
|
|
4034
|
-
|
|
4035
|
-
|
|
4619
|
+
_lookHooks: {
|
|
4620
|
+
...arrangementContentHooks(effective, mode, length, {
|
|
4621
|
+
...facts.content,
|
|
4622
|
+
photo: photoCount > 0
|
|
4623
|
+
}, values, photoCount),
|
|
4624
|
+
...spacingHook
|
|
4625
|
+
},
|
|
4036
4626
|
_effectiveKnobs: knobs,
|
|
4037
4627
|
_lookOwnedPaths: lookOwnedPaths,
|
|
4038
4628
|
_lookAudience: audience,
|
|
@@ -4040,6 +4630,25 @@ function planArrangementContent(blockKind, manifest, content, audience) {
|
|
|
4040
4630
|
blockLook: effective.look.id
|
|
4041
4631
|
};
|
|
4042
4632
|
}
|
|
4633
|
+
/**
|
|
4634
|
+
* The section spacing an owner chose, as a hook, so a skin that sets its own
|
|
4635
|
+
* section padding can still honour it. Absent when the spacing was not chosen.
|
|
4636
|
+
* The compiler carries it through for Look blocks only for this hook (see
|
|
4637
|
+
* applyCompiledRuntimeFieldsToContent); the Look keeps its own padding, so the
|
|
4638
|
+
* value is taken out of the content before the section class reads it.
|
|
4639
|
+
*/
|
|
4640
|
+
function authoredSectionSpacingHook(content) {
|
|
4641
|
+
const spacing = isObjectRecord(content._sectionStyles) ? content._sectionStyles.spacing : void 0;
|
|
4642
|
+
return isSemanticSpacing(spacing) ? { "data-section-spacing": spacing } : {};
|
|
4643
|
+
}
|
|
4644
|
+
function withoutSectionSpacing(content) {
|
|
4645
|
+
if (!isObjectRecord(content._sectionStyles) || !("spacing" in content._sectionStyles)) return content;
|
|
4646
|
+
const { spacing: _spacing, ...sectionStyles } = content._sectionStyles;
|
|
4647
|
+
return {
|
|
4648
|
+
...content,
|
|
4649
|
+
_sectionStyles: sectionStyles
|
|
4650
|
+
};
|
|
4651
|
+
}
|
|
4043
4652
|
/** Typed Look composition owns contrast treatment; parsing preserves authored paint. */
|
|
4044
4653
|
function arrangementPhotoTreatmentContent(content, look, palette, tint) {
|
|
4045
4654
|
if (!look.look.structure.photoTreatment) return {};
|
|
@@ -4081,6 +4690,14 @@ function arrangementPanelContent(content, effective, mode) {
|
|
|
4081
4690
|
_lookPanelHeading: content.heading
|
|
4082
4691
|
};
|
|
4083
4692
|
}
|
|
4693
|
+
/**
|
|
4694
|
+
* Photos a Look shows beside the block's own: the hero's more photos, where its
|
|
4695
|
+
* arrangement shows them. They count towards the photo hooks only; the photo fact
|
|
4696
|
+
* that published fallbacks read stays the block's own photo.
|
|
4697
|
+
*/
|
|
4698
|
+
function lookPartPhotoCount(blockKind, content, arrangement) {
|
|
4699
|
+
return blockKind === "block.hero" && lookPartShown(blockKind, "morePhotos", arrangement) ? heroMorePhotoCount(content) : 0;
|
|
4700
|
+
}
|
|
4084
4701
|
function arrangementPhotoContent(content, knobs) {
|
|
4085
4702
|
if (knobs.showPhotos !== false || !Array.isArray(content.cards)) return {};
|
|
4086
4703
|
return { cards: content.cards.map((card) => {
|
|
@@ -4271,10 +4888,10 @@ function resolveCombinedLook(entry, list, runtime, section, content) {
|
|
|
4271
4888
|
}
|
|
4272
4889
|
function plannedSlotParents(entry, look) {
|
|
4273
4890
|
const fallback = Object.values(look.look.structure.byMode)[0] ?? "";
|
|
4274
|
-
if (entry.kind !== "renderable") return arrangementSlotParentsForManifest(void 0, look.look.target, fallback);
|
|
4891
|
+
if (entry.kind !== "renderable") return arrangementSlotParentsForManifest(void 0, look.look.target, fallback, look.look.structure.eventRows);
|
|
4275
4892
|
const month = entry.renderableContent._lookMonthArrangement;
|
|
4276
4893
|
const arrangement = entry.effectiveListArrangementKey ?? (typeof month === "string" ? month : entry.effectiveArrangementKey) ?? fallback;
|
|
4277
|
-
return arrangementSlotParentsForManifest(entry.definition.manifest, look.look.target, arrangement);
|
|
4894
|
+
return arrangementSlotParentsForManifest(entry.definition.manifest, look.look.target, arrangement, look.look.structure.eventRows);
|
|
4278
4895
|
}
|
|
4279
4896
|
//#endregion
|
|
4280
|
-
export {
|
|
4897
|
+
export { selectBlockContent as $, offeringDatesBySeries as A, CalendarIcon as B, systemCustomizeFacetDefinitionsForBlock as C, EventListingFrameView as D, MonthLookView as E, EmptyState as F, selectQuickDateEvents as G, buildMonthDay as H, CardListCollection as I, resolveEventCardBooking as J, formatEventTeacherLine as K, CardListItems as L, derivePreviewRunSchedule as M, createEditorPresentationPageReader as N, OfferingCourseCards as O, createPresentationPageReader as P, parseStoredVariant as Q, EventItem as R, lookPartShown as S, EVENT_REGISTRATION_ANCHOR_ID as T, resolveMonthSelectedDay as U, MapPinIcon as V, formatEventQuickDate as W, resolveEventLinkProps as X, resolveEventCta as Y, isBookableEvent as Z, publicAppointmentPricingSchema as _, joinSlotKey as a, resolvePageRouteTarget as b, buildLinkedContentEditTarget as c, builtinTransformDefinitions as d, lookFillPartsFromContent as et, defaultTransforms as f, publicAppointmentLocationSchema as g, formatAppointmentPrice as h, composePageJoins as i, deriveEventScheduleSummary as j, eventCardListContent as k, coerceLinkedContentEntriesPayload as l, formatAppointmentLocation as m, createPageRenderPlanReader as n, buildThemeTokens as nt, renderedJoinLayout as o, formatAppointmentDuration as p, formatEventDuration as q, planArrangementContent as r, defaultThemeTokens as rt, retargetJoinsAcrossOmissions as s, buildPageRenderPlan as t, resolveRuntimeSection as tt, resolveLinkedEntryInlineFieldEligibility as u, resolveAuthoredLinkHref as v, EventHeader as w, resolveRouteTarget as x, resolveEntryRouteTarget as y, eventCategoryBadge as z };
|