@riverbankcms/sdk 0.159.0 → 0.161.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/README.md +4 -4
- package/dist/_dts/{BlocksIslandsHydrator-Cj1i1Yhh.d.ts → BlocksIslandsHydrator-Bx4kLiTA.d.ts} +1 -1
- package/dist/_dts/{Page-Cgzbv22M.d.ts → Page-Dm7_P13o.d.ts} +217 -8
- package/dist/_dts/{SdkPreviewMode-BC_FGc6b.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +55 -127
- package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
- package/dist/_dts/{client-BOK-YHVJ.d.ts → client-Ep0jI9eE.d.ts} +1 -1
- package/dist/_dts/{content-types-CsrYWxq_.d.ts → content-types-BgAzCrBc.d.ts} +18 -18
- package/dist/_dts/{contracts-ClgMD-9g.d.ts → contracts-DUiOnj9e.d.ts} +10 -6
- package/dist/_dts/{footerPageOutline-C_IDuELl.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-B7bhYSWx.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
- package/dist/_dts/index-BQDBQvdu.d.ts +13 -0
- package/dist/_dts/index-BVkP8f70.d.ts +66 -0
- package/dist/_dts/{index-Dt3XSGzY.d.ts → index-CF6Cjs7b.d.ts} +2 -2
- package/dist/_dts/{index-Ci1PEk82.d.ts → index-CSsfq6KG.d.ts} +3 -17
- package/dist/_dts/{index-BZ4fb2zz.d.ts → index-D_8uz4OP.d.ts} +3 -3
- package/dist/_dts/{index-CcaG6O13.d.ts → index-DvKQA6AZ.d.ts} +4 -4
- package/dist/_dts/{index-DMOfW1A7.d.ts → index-KPrWM0KF.d.ts} +2 -2
- package/dist/_dts/{index-DzUdUaJ-.d.ts → index-ylivB7Jj.d.ts} +2 -2
- package/dist/_dts/{loadContent-C1JI2pG0.d.ts → loadContent-DTjKOO-T.d.ts} +19 -10
- package/dist/_dts/{resolvePageContent-BtRUtrJa.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
- package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
- package/dist/_dts/{hosted-booking-appearance-ChGCQYdQ.d.ts → schema-BHu0PYWl.d.ts} +25911 -23567
- 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 +13 -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/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
- 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 +10 -28
- 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/preview-next/keep-alive.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- 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/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
- package/dist/_dts/{navigation-BnV_hOZy.d.ts → types-BR1Yboa9.d.ts} +15530 -16017
- package/dist/_dts/{types-CMFIZGUI.d.ts → types-CJXTCF_F.d.ts} +10 -13
- package/dist/_dts/{types-CI9dYWJ8.d.ts → types-D02ngcUH.d.ts} +4 -2
- package/dist/_dts/{types--oWXIfyz.d.ts → types-ZGUiHpDE.d.ts} +7 -7
- package/dist/_dts/{validation-Ct-GL0eA.d.ts → validation-BaV565gb.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DKS8Ba30.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
- package/dist/client/{BookingMailingListNote-Cg9v6d7Y.mjs → BookingMailingListNote-BDpxmn1p.mjs} +2 -2
- package/dist/client/{CalendarNavigationChevron-BoVCTUXy.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
- package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BxRVCJG3.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +6 -6
- package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
- package/dist/client/{EventCalendar.client-BI-kvwXf.mjs → EventCalendar.client-BxQLY5cX.mjs} +10 -9
- package/dist/client/{EventCombined.client-DIvnoN5l.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
- package/dist/client/{EventItem-BRMtEaa6.mjs → EventItem-BEx-qiDE.mjs} +11 -6
- package/dist/client/{EventListWeekNavigation-B8DzAUDa.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
- package/dist/client/{EventListing.client-Bo4qzQi0.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
- package/dist/client/{EventListing.view-D2vemnCx.mjs → EventListing.view-9RFrBejr.mjs} +31 -15
- package/dist/client/{EventRegistrationPayment-e5XWtygG.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +92 -99
- package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
- package/dist/client/{Page-Dqpv9Ggi.mjs → Page-Bf2nPACI.mjs} +2673 -2290
- package/dist/client/{StepIndicator-BrvKa_8H.mjs → StepIndicator-CZweb1vs.mjs} +3 -3
- package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
- package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
- package/dist/client/{accordion-ByLpb4Dz.mjs → accordion-TcimLLRQ.mjs} +1 -1
- package/dist/client/{booking-form.client-BLndwxpx.mjs → booking-form.client-q-RpJ4aF.mjs} +13 -13
- package/dist/client/{bookingForm-CTxTEgHX.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
- package/dist/client/bookings.mjs +6 -6
- package/dist/client/{carousel-C8ef0vnT.mjs → carousel-CGAk6j0m.mjs} +2 -2
- package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
- package/dist/client/{cart-BpH6jkUO.mjs → cart-D_h3rAZ2.mjs} +3 -3
- package/dist/client/{cart.client-DV78Td13.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
- package/dist/client/{checkout-BJVb2RpL.mjs → checkout-tC-3CzuM.mjs} +3 -3
- package/dist/client/{checkout.client-CqGPXPSm.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
- package/dist/client/client.mjs +28 -15
- package/dist/client/{context-BRgBWthI.mjs → context-9ZfMb6GA.mjs} +1 -1
- package/dist/client/{cta-D8ucLsvX.mjs → cta-D-ZqL7-e.mjs} +2 -1
- package/dist/client/{dateFormatting-LeKNQ-iX.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-CjstiFPh.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-BaQJyI9x.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
- package/dist/client/{event-details.client-CYNQYOsP.mjs → event-details.client-C670TgRd.mjs} +2 -17
- package/dist/client/{event-registration.client-DDqSpN36.mjs → event-registration.client-C6GApWTB.mjs} +17 -17
- package/dist/client/{eventCalendar-3vQtuC9X.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
- package/dist/client/{eventCombined-CEJFMjqV.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
- package/dist/client/{eventDetails-nGh47jef.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
- package/dist/client/{eventListing-BL3Ptb83.mjs → eventListing-C_yXmHyz.mjs} +4 -4
- package/dist/client/{eventRegistration-DDSO6KB2.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
- package/dist/client/{form-DjNLfy2Z.mjs → form-QZhtdFHA.mjs} +3 -3
- package/dist/client/{form.client-Cj0By6ot.mjs → form.client-CgvPACwG.mjs} +5 -5
- package/dist/client/{form.parts-DyA9C5Hy.mjs → form.parts-2uI0-5N-.mjs} +3 -3
- package/dist/client/{formatDate-CZo0MPTA.mjs → formatDate-Danr0Nk4.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-JjSq6Mzp.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
- package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
- package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
- package/dist/client/{newsletter-form.client-C2EgEBP1.mjs → newsletter-form.client-Cbepz2KU.mjs} +8 -8
- package/dist/client/{newsletter-form.parts-CaldoFmi.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
- package/dist/client/{newsletterForm-hm7L17LM.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
- package/dist/client/{noop-M8FTSgm2.mjs → noop-B7H6gCbj.mjs} +306 -5
- package/dist/client/portal/client.mjs +4560 -115
- package/dist/client/{product-detail.client-y86uwzEI.mjs → product-detail.client-CYTR165c.mjs} +1 -1
- package/dist/client/{product-list.client-_JBndYZT.mjs → product-list.client-B4vTvag8.mjs} +1 -1
- package/dist/client/{productDetail-D-9fb2cW.mjs → productDetail-k8LEMSWn.mjs} +3 -3
- package/dist/client/{productList-BSRlnwBW.mjs → productList-DEo8Bqoe.mjs} +3 -3
- package/dist/client/{propsDecoder-DhbGL302.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
- package/dist/client/{registry.server-BaX0hxf5.mjs → registry.server-BTmSXE3D.mjs} +1154 -997
- package/dist/client/rendering/client.mjs +28 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +57 -32
- package/dist/client/{richText-coerce-Cny2Ukb6.mjs → richText-coerce-B19taoH6.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-96er7pIx.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
- package/dist/client/{ThemedButton-DVBC_pS9.mjs → schema-C-m8XHuW.mjs} +1123 -2362
- package/dist/client/{shop-CnIJfdZA.mjs → shop-RGWa43H7.mjs} +3 -3
- package/dist/client/{shop-commerce-CsLwzq5O.mjs → shop-commerce-TJYCBO_H.mjs} +12 -12
- package/dist/client/{shop-commerce-store--O8GRBwr.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
- package/dist/client/{shop.client-BcaJ-acA.mjs → shop.client-tsKfZw1W.mjs} +15 -15
- package/dist/client/{shop.interactive-BxL_bshW.mjs → shop.interactive-CVqLAU53.mjs} +370 -189
- package/dist/client/{shopShared-VZjPOfCX.mjs → shopShared-C3lHMz_R.mjs} +2 -2
- package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
- package/dist/client/timetableModel-V2ifvGGy.mjs +1100 -0
- package/dist/client/{useAvailableSlots-pTXuY3jV.mjs → useAvailableSlots-D1X69-pN.mjs} +4 -4
- package/dist/client/{useBookingNowIso-D14J-EhJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
- package/dist/client/{useDiscountApply-o5sIVZ2u.mjs → useDiscountApply-Bwzr1RjV.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-DJhFP_rg.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
- package/dist/client/{useEventPagination-DMmNf2FP.mjs → useEventPagination-CLAS0upd.mjs} +12 -24
- package/dist/client/uuid-BETKW8rS.mjs +12 -0
- package/dist/client/{view-BgPql2yH2.mjs → view-BUh4LnLS.mjs} +4 -4
- package/dist/client/{view-D1R3Lk05.mjs → view-Dj_FZHmg.mjs} +19 -15
- package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
- package/dist/preview-next/before-render.mjs +5 -4
- package/dist/preview-next/chrome.css +2 -0
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-CwerMfzn.mjs} +2 -1
- package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
- package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
- package/dist/preview-next/client/{PreviewEditorSidebar-DADCj_ET.mjs → PreviewEditorSidebar-Dvq-RW9-.mjs} +1328 -171
- package/dist/preview-next/client/{PreviewEditorUI-La40Dmmh.mjs → PreviewEditorUI-BdFjS39R.mjs} +53 -79
- package/dist/preview-next/client/{SdkPreviewModeRuntime-406Hw9zY.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +1249 -2551
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CWN44I_B.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
- package/dist/preview-next/client/{SiteChromeCustomizeContext-BdwEZoo9.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +117481 -162497
- package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-b14Bv03E.mjs} +1253 -403
- package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
- package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
- package/dist/preview-next/client/{previewChromeSurface-BVUKIYG0.mjs → previewChromeSurface-Dd1_mNIg.mjs} +3 -8
- package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
- package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-Cy9AKPy5.mjs → sdk-runtime-B-CXyGVb.mjs} +1 -1
- package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
- package/dist/preview-next/client/{spinner-Bhpzz2vO.mjs → spinner-CGxS8Ns-.mjs} +2 -1
- package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
- package/dist/preview-next/editor-base.css +64 -2
- package/dist/preview-next/editor-chrome.css +85 -0
- package/dist/preview-next/keepAlive.mjs +2 -2
- package/dist/preview-next/middleware.mjs +7 -3
- package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-hLg-yjQN.mjs} +190 -116
- package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
- package/dist/preview-next/session.mjs +1 -1
- package/dist/server/{Block.shared-DB6fb1pR.mjs → Block.shared-CeTd2saO.mjs} +6 -6
- package/dist/server/{bindings-z2daXp-2.mjs → bindings-C5YpKuKt.mjs} +3 -2
- package/dist/server/{client-Cv-osXoU.mjs → client-Cv26lZQ4.mjs} +14 -10
- package/dist/server/config-template-validation.mjs +50 -10
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +572 -1078
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-BNMDYCm8.mjs → loadContent-C8a0b-cC.mjs} +40 -21
- package/dist/server/loadPage--DXBwI8V.mjs +2 -0
- package/dist/server/{loadPage-CjA_F_AF.mjs → loadPage-BW7dklu3.mjs} +9 -5
- package/dist/server/manifest.mjs +1 -1
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-CGodrtqi.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
- package/dist/server/{overrides-DxRC724a.mjs → overrides-D1fiPOKF.mjs} +1158 -754
- package/dist/server/page-converter.mjs +8 -10
- package/dist/server/{prebuild-C6bhjRKT.mjs → prebuild--fO0E2tr.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-DZ5Fq_-r.mjs → prefetchBlockData-CqJnokWJ.mjs} +968 -968
- package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-CvvZ4JIe.mjs} +207 -132
- package/dist/server/{blocks-BaG8Qpaa.mjs → registry-BVfCqaCq.mjs} +2853 -2799
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-CbGDakvp.mjs → resolveBlockData-DPNvhXEz.mjs} +6 -3
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-Bs735S27.mjs → schema-CD4peO7m.mjs} +2441 -1401
- package/dist/server/server.mjs +3 -3
- package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
- package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
- package/dist/server/{src-B935_bzN.mjs → src-ILxc6pid.mjs} +427 -190
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-DK2YBNqy.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
- package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
- package/dist/server/{validation-BtHE2S_D.mjs → validation-B1ieVemg.mjs} +22 -63
- package/dist/server/{version-CNCdL6id.mjs → version-BQK44wFg.mjs} +1 -1
- package/dist/styles/index.css +235 -0
- package/package.json +8 -3
- package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
- package/dist/_dts/index-cnymEAZY.d.ts +0 -1
- package/dist/client/LeafletStaticMap-dlapZ6mi.mjs +0 -135
- package/dist/client/location-map.client-DRN1JePj.mjs +0 -28
- package/dist/client/location-map.view-CuCvQdvp.mjs +0 -282
- package/dist/client/locationMap-B9srHHzZ.mjs +0 -15
- package/dist/client/mediaContext-DThoeEBU.mjs +0 -136
- package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
- package/dist/client/timetableModel-D09jPdue.mjs +0 -480
- package/dist/client/wizardSteps-C0TsNqJc.mjs +0 -17049
- package/dist/preview-next/client/siteStyleAccess-CFMmoMZb.mjs +0 -1326
- package/dist/server/loadPage-jade28Xh.mjs +0 -2
- package/dist/server/media-CcHwZkdJ.mjs +0 -243
|
@@ -1,32 +1,186 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { d as formatDateKey, h as getWeekCalendarDayTuple, m as getOrderedDayNames } from "./src-1PJxc8KO.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { $t as serializeSurfaceTree, An as rgbColorValue, E as ICON_CONFIG, En as backgroundColorStyle, Xn as runtimeMediaSchema, an as resolveThemeColorReferenceValue, br as err, jn as textColorStyle, kn as mergeStyles, pt as cardVariantRoleValues, xr as ok } from "./schema-C-m8XHuW.mjs";
|
|
4
|
+
import { C as clsx, S as PlusIcon, _ as FileArchiveIcon, a as ThemedDownloadLink, b as FileTextIcon, c as ICON_PICKER_PRESETS, d as ArrowDownIcon, f as ChevronDownIcon, i as ThemedButtonLink, l as isSemanticIconId, m as CirclePlusIcon, p as CircleMinusIcon, r as ThemedButton, s as getIconComponent, u as SpinnerNode, v as FileAudioIcon, x as MinusIcon, y as FileSpreadsheetIcon } from "./ThemedButton-CnyL3s1A.mjs";
|
|
5
5
|
import { t as formatEventDuration } from "./duration-Q6_QNgiv.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { c as assertNever$1 } from "./src-VIsPY-kw.mjs";
|
|
7
|
+
import { $r as formatBookingPriceDisplay, An as isEventFull, Cn as canJoinEventWaitlistOnAnyMode, Dn as getEventAvailability, Dr as resolveEventRegistrationScopedEvents, Er as normalizeEventRegistrationPageSurfaceSubject, Fn as buildBookingFormInteractiveIslandProps, Fr as lookListPresentationSchemaShape, Hr as orderedLiveRunSessions, Kt as RichText, Mr as listItemPresentation, Nn as groupPublicEventsByRun, On as getEventAvailabilityStatus, Pr as listLookSlot, Rr as parseAspectRatioValue, Ur as resolveWholeSeriesBookingPhase, Vr as nextLiveRunSessionStartMs, _n as formatEventTimeRange, _r as BLOCK_BUTTON_ROLE_OPTIONS, an as buildCalendarViewport, cn as eventDateOptions, hn as formatEventHourLabel, in as sanitizeHref, oi as resolveExactOrFreePriceDisplay, pn as formatEventCompactDateRail, rn as resolvePublicMediaUrl, si as resolvePricingOptionsPriceDisplay, un as formatCalendarTitle, vn as formatTime, xn as resolveRuntimeEventDestination, yn as groupEventsByDate, yr as isBlockButtonRole } from "./wizardSteps-BkZc-hKH.mjs";
|
|
8
|
+
import { C as eventCalendarVariantMeaning, D as isEventCalendarListLayout, Dt as resolveBookingBusinessTimeZone, E as isEventCalendarDisplayMode, F as normalizeEventStaffMemberId, I as normalizeEventSurfacePresets, M as normalizeEventCategoryIds, O as normalizeEventCalendarDisplayMode$1, P as normalizeEventScheduleScope, R as normalizeEventSurfaceScope, T as isEventCalendarDefaultView, W as publicEventsArraySchema, X as RichTextDocSchema, at as projectPublicLocation, it as parseLocationValue, jt as toUtcIsoDateTimeString, lt as formatDate, ot as publicLocationSchema$1, p as calendarWindowPageSchema, rt as normalizeLocationAddressText, st as toLocationCoordinates, x as eventCalendarListLayoutOptions, z as normalizeEventVenueId } from "./noop-B7H6gCbj.mjs";
|
|
8
9
|
import { n as selectCategoryView } from "./appointment-service-categories-Cl2pqw-z.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { n as
|
|
12
|
-
import {
|
|
13
|
-
import { n as
|
|
14
|
-
import {
|
|
10
|
+
import { a as SvgNode } from "./LocationMapActions-Wsr83Q7q.mjs";
|
|
11
|
+
import { a as MonthLookView, c as ButtonNode, d as TextNode, f as LocationMapView, i as buildWeekBoardViewProps, l as LinkNode, n as WeekBoardView, o as CalendarRecurringWeek, r as buildWeekBoardNavigationState, s as RecurringSchedule, t as buildTimetableModel, u as RichTextNode } from "./timetableModel-V2ifvGGy.mjs";
|
|
12
|
+
import { At as recurringScheduleProjectionSchema, B as giftingBlockRuntime, Bt as listingEventCardProps, Dt as eventCalendarBlockRuntime, F as buildNewsletterFormInteractiveIslandProps, Gt as MediaNodeServer, H as publicGiftingOffersResponseSchema, I as newsletterBlockSubmissionMessage, Jt as Grid, Kt as getCardOrientation, L as newsletterFormBlockRuntime, Mt as eventListingBlockRuntime, N as publicProductsResponseSchema, P as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, Qt as formatEventPriceDisplay, St as eventCombinedBlockRuntime, Tt as buildEventCalendarListingDisplay, U as buildFormInteractiveIslandProps, W as formBlockRuntime, Xt as formatEventPrice, Y as eventRegistrationBlockRuntime, Yt as buildEventListWeek, _ as shopProductPresentation, a as buildShopInteractiveIslandProps, bt as buildEventCombinedInteractiveIslandProps, c as checkoutBlockRuntime, cn as publicPassProductCollectionSchema, ct as resolveOfferingsPreviewGroupCta, d as productDetailBlockRuntime, dn as parseMailingListPlacementTargeting, dt as resolveOfferingsRenderInput, h as shopBlockRuntime, i as buildProductListInteractiveIslandProps, jt as buildEventListingInteractiveIslandProps, lt as resolveOfferingsPreviewGroups, n as buildCheckoutInteractiveIslandProps, nt as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, o as cartBlockRuntime, on as splitSiteChromePlacementClasses, ot as normalizeOfferingsPreviewItemLimit, p as productListBlockRuntime, pn as DEFAULT_MAILING_LIST_TARGETING, q as buildEventRegistrationInteractiveIslandProps, qt as getContainerClass, r as buildProductDetailInteractiveIslandProps, rn as staticHeaderChromeRuntime, rt as buildOfferingsPreviewListing, sn as publicMembershipProductCollectionSchema, st as offeringsListingFor, t as buildCartInteractiveIslandProps, un as assessMailingListTargeting, ut as resolveOfferingsPreviewRunPath, wt as buildEventCalendarInteractiveIslandProps, xt as buildEventCombinedListingDisplay, yt as occurrenceContextSchema, z as buildGiftingInteractiveIslandProps, zt as catalogueEventCardProps } from "./shop.interactive-CVqLAU53.mjs";
|
|
13
|
+
import { T as compiledRuntimeStyleFieldNames, h as arrangementSlotNames } from "./mediaContext-jPeJ2PmJ.mjs";
|
|
14
|
+
import { n as resolveEventLinkProps, t as resolveEventCta } from "./cta-D-ZqL7-e.mjs";
|
|
15
|
+
import { a as buildMonthDay, i as CalendarDayHeaders, n as WeekAgendaView, o as resolveMonthSelectedDay, s as formatEventLocation } from "./CalendarNavigationChevron-PeCiL82X.mjs";
|
|
16
|
+
import { n as CardListItems, r as EventItem } from "./EventItem-BEx-qiDE.mjs";
|
|
17
|
+
import { S as asPartialObject, d as resolveCardRoleForBoxStyles, g as DEFAULT_SECTION_SPACING, i as EventCard, n as EmptyState, r as EventCompactRow, s as boxStyleClassNames, t as EventListingFrameView, u as normalizeBoxStylesBorder } from "./EventListing.view-9RFrBejr.mjs";
|
|
15
18
|
import { t as resolveDedicatedBookingHref } from "./bookingRoute-Bqlyu5Vb.mjs";
|
|
16
|
-
import { a as resolveEventDetailsPresentation, i as derivePreviewRunSchedule, n as eventCardListContent, r as deriveEventScheduleSummary, t as EventDetailsView } from "./view-
|
|
19
|
+
import { a as resolveEventDetailsPresentation, i as derivePreviewRunSchedule, n as eventCardListContent, r as deriveEventScheduleSummary, t as EventDetailsView } from "./view-Dj_FZHmg.mjs";
|
|
17
20
|
import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
|
|
18
21
|
import { a as carouselShape, c as getCarouselSlidesToShowCssVars, i as carouselRegionAttributes, l as normalizeSlidesToShow, n as arrangementCarouselSettings, r as carouselContents, t as CarouselSlideContent, u as resolveSlidesToShowMobile } from "./carousel.shared-DBnWEJzo.mjs";
|
|
19
|
-
import { t as coerceRichTextDoc } from "./richText-coerce-
|
|
22
|
+
import { t as coerceRichTextDoc } from "./richText-coerce-B19taoH6.mjs";
|
|
20
23
|
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-4o4_hl34.mjs";
|
|
21
|
-
import { a as PassPurchaseUnavailable, c as ProductDetailView, d as ShopPurchaseAction, f as VariantSelectView, i as PassCardView, l as ProductGalleryFrameView, n as CheckoutShellView, o as PassesMembershipsSectionView, r as MembershipCardView, s as ProductCardView, t as CartShellView, u as ProductListSectionView } from "./view-
|
|
22
|
-
import { n as EventListWeekNavigation, t as EventListWeekEmptyState } from "./EventListWeekNavigation-
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { n as
|
|
26
|
-
import { a as partitionNewsletterFields, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-CaldoFmi.mjs";
|
|
24
|
+
import { a as PassPurchaseUnavailable, c as ProductDetailView, d as ShopPurchaseAction, f as VariantSelectView, i as PassCardView, l as ProductGalleryFrameView, n as CheckoutShellView, o as PassesMembershipsSectionView, r as MembershipCardView, s as ProductCardView, t as CartShellView, u as ProductListSectionView } from "./view-BUh4LnLS.mjs";
|
|
25
|
+
import { n as EventListWeekNavigation, t as EventListWeekEmptyState } from "./EventListWeekNavigation-CyH5tA6Y.mjs";
|
|
26
|
+
import { i as RegistrationClosedState, r as BookingEntryCard, t as StepIndicator } from "./StepIndicator-CZweb1vs.mjs";
|
|
27
|
+
import { n as FormSubmitAction, t as FormFieldGroups } from "./form.parts-2uI0-5N-.mjs";
|
|
28
|
+
import { a as partitionNewsletterFields, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-DN8oMCQ0.mjs";
|
|
27
29
|
import React, { forwardRef } from "react";
|
|
28
30
|
import { z } from "zod";
|
|
29
31
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
32
|
+
//#region ../core/src/public-profile.ts
|
|
33
|
+
const publicProfileWeekdays = [
|
|
34
|
+
"monday",
|
|
35
|
+
"tuesday",
|
|
36
|
+
"wednesday",
|
|
37
|
+
"thursday",
|
|
38
|
+
"friday",
|
|
39
|
+
"saturday",
|
|
40
|
+
"sunday"
|
|
41
|
+
];
|
|
42
|
+
function isRecord$1(value) {
|
|
43
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44
|
+
}
|
|
45
|
+
function trimmedOptionalString(value) {
|
|
46
|
+
if (value === null || value === void 0) return null;
|
|
47
|
+
if (typeof value !== "string") return void 0;
|
|
48
|
+
const trimmed = value.trim();
|
|
49
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
50
|
+
}
|
|
51
|
+
function parsePublicProfileTimeZone(value) {
|
|
52
|
+
const timeZone = trimmedOptionalString(value);
|
|
53
|
+
if (timeZone === null || timeZone === void 0) return err({
|
|
54
|
+
code: "invalid_timezone",
|
|
55
|
+
path: "openingHours.timeZone",
|
|
56
|
+
message: "Choose a timezone."
|
|
57
|
+
});
|
|
58
|
+
try {
|
|
59
|
+
new Intl.DateTimeFormat("en-GB", { timeZone }).format(/* @__PURE__ */ new Date(0));
|
|
60
|
+
return ok(timeZone);
|
|
61
|
+
} catch {
|
|
62
|
+
return err({
|
|
63
|
+
code: "invalid_timezone",
|
|
64
|
+
path: "openingHours.timeZone",
|
|
65
|
+
message: "Choose a valid IANA timezone."
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function parseOpeningHoursTime(value, path) {
|
|
70
|
+
if (typeof value !== "string" || !/^(?:[01]\d|2[0-3]):[0-5]\d$/u.test(value)) return err({
|
|
71
|
+
code: "invalid_time",
|
|
72
|
+
path,
|
|
73
|
+
message: "Use a 24-hour time such as 09:00."
|
|
74
|
+
});
|
|
75
|
+
return ok(value);
|
|
76
|
+
}
|
|
77
|
+
function minutesSinceMidnight(value) {
|
|
78
|
+
const [hours = "0", minutes = "0"] = value.split(":");
|
|
79
|
+
return Number(hours) * 60 + Number(minutes);
|
|
80
|
+
}
|
|
81
|
+
function parseOpeningHoursDay(value, expectedWeekday, index) {
|
|
82
|
+
const path = `openingHours.days.${index}`;
|
|
83
|
+
if (!isRecord$1(value) || value.weekday !== expectedWeekday) return err({
|
|
84
|
+
code: "invalid_weekdays",
|
|
85
|
+
path,
|
|
86
|
+
message: `Expected ${expectedWeekday} in calendar order.`
|
|
87
|
+
});
|
|
88
|
+
if (value.kind === "closed") return ok({
|
|
89
|
+
kind: "closed",
|
|
90
|
+
weekday: expectedWeekday
|
|
91
|
+
});
|
|
92
|
+
if (value.kind !== "open" || !Array.isArray(value.intervals) || value.intervals.length === 0) return err({
|
|
93
|
+
code: "invalid_interval",
|
|
94
|
+
path: `${path}.intervals`,
|
|
95
|
+
message: "Open days need at least one opening interval."
|
|
96
|
+
});
|
|
97
|
+
const intervals = [];
|
|
98
|
+
for (const [intervalIndex, rawInterval] of value.intervals.entries()) {
|
|
99
|
+
const intervalPath = `${path}.intervals.${intervalIndex}`;
|
|
100
|
+
if (!isRecord$1(rawInterval)) return err({
|
|
101
|
+
code: "invalid_interval",
|
|
102
|
+
path: intervalPath,
|
|
103
|
+
message: "Opening interval is invalid."
|
|
104
|
+
});
|
|
105
|
+
const opensAt = parseOpeningHoursTime(rawInterval.opensAt, `${intervalPath}.opensAt`);
|
|
106
|
+
if (!opensAt.ok) return opensAt;
|
|
107
|
+
const closesAt = parseOpeningHoursTime(rawInterval.closesAt, `${intervalPath}.closesAt`);
|
|
108
|
+
if (!closesAt.ok) return closesAt;
|
|
109
|
+
if (minutesSinceMidnight(opensAt.value) >= minutesSinceMidnight(closesAt.value)) return err({
|
|
110
|
+
code: "invalid_interval",
|
|
111
|
+
path: intervalPath,
|
|
112
|
+
message: "Closing time must be later than opening time on the same day."
|
|
113
|
+
});
|
|
114
|
+
intervals.push({
|
|
115
|
+
opensAt: opensAt.value,
|
|
116
|
+
closesAt: closesAt.value
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
intervals.sort((left, right) => minutesSinceMidnight(left.opensAt) - minutesSinceMidnight(right.opensAt));
|
|
120
|
+
for (let intervalIndex = 1; intervalIndex < intervals.length; intervalIndex += 1) {
|
|
121
|
+
const previous = intervals[intervalIndex - 1];
|
|
122
|
+
const current = intervals[intervalIndex];
|
|
123
|
+
if (previous !== void 0 && current !== void 0 && minutesSinceMidnight(current.opensAt) < minutesSinceMidnight(previous.closesAt)) return err({
|
|
124
|
+
code: "overlapping_intervals",
|
|
125
|
+
path: `${path}.intervals.${intervalIndex}`,
|
|
126
|
+
message: "Opening intervals cannot overlap."
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
const [first, ...rest] = intervals;
|
|
130
|
+
if (first === void 0) return err({
|
|
131
|
+
code: "invalid_interval",
|
|
132
|
+
path,
|
|
133
|
+
message: "Open days need an opening interval."
|
|
134
|
+
});
|
|
135
|
+
return ok({
|
|
136
|
+
kind: "open",
|
|
137
|
+
weekday: expectedWeekday,
|
|
138
|
+
intervals: [first, ...rest]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function parseOpeningHoursWeek(rawDays) {
|
|
142
|
+
const parsedDays = publicProfileWeekdays.map((weekday, index) => parseOpeningHoursDay(rawDays[index], weekday, index));
|
|
143
|
+
const failed = parsedDays.find((day) => !day.ok);
|
|
144
|
+
if (failed !== void 0) return failed;
|
|
145
|
+
const [monday, tuesday, wednesday, thursday, friday, saturday, sunday] = parsedDays.flatMap((day) => day.ok ? [day.value] : []);
|
|
146
|
+
if (monday === void 0 || tuesday === void 0 || wednesday === void 0 || thursday === void 0 || friday === void 0 || saturday === void 0 || sunday === void 0) return err({
|
|
147
|
+
code: "invalid_weekdays",
|
|
148
|
+
path: "openingHours.days",
|
|
149
|
+
message: "Opening hours are incomplete."
|
|
150
|
+
});
|
|
151
|
+
return ok([
|
|
152
|
+
monday,
|
|
153
|
+
tuesday,
|
|
154
|
+
wednesday,
|
|
155
|
+
thursday,
|
|
156
|
+
friday,
|
|
157
|
+
saturday,
|
|
158
|
+
sunday
|
|
159
|
+
]);
|
|
160
|
+
}
|
|
161
|
+
function parseWeeklyOpeningHours(value) {
|
|
162
|
+
if (!isRecord$1(value) || !Array.isArray(value.days) || value.days.length !== publicProfileWeekdays.length) return err({
|
|
163
|
+
code: "invalid_weekdays",
|
|
164
|
+
path: "openingHours.days",
|
|
165
|
+
message: "Opening hours must include all seven weekdays."
|
|
166
|
+
});
|
|
167
|
+
const timeZone = parsePublicProfileTimeZone(value.timeZone);
|
|
168
|
+
if (!timeZone.ok) return timeZone;
|
|
169
|
+
const note = value.note === void 0 || value.note === null ? null : trimmedOptionalString(value.note);
|
|
170
|
+
if (note === void 0) return err({
|
|
171
|
+
code: "invalid_shape",
|
|
172
|
+
path: "openingHours.note",
|
|
173
|
+
message: "The opening hours note must be text."
|
|
174
|
+
});
|
|
175
|
+
const days = parseOpeningHoursWeek(value.days);
|
|
176
|
+
if (!days.ok) return days;
|
|
177
|
+
return ok({
|
|
178
|
+
timeZone: timeZone.value,
|
|
179
|
+
...note !== null ? { note } : {},
|
|
180
|
+
days: days.value
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
30
184
|
//#region ../blocks/src/system/fields/button.ts
|
|
31
185
|
const DEFAULT_THEME_BUTTON_VARIANTS = BLOCK_BUTTON_ROLE_OPTIONS;
|
|
32
186
|
function createButtonVariantField(options = {}) {
|
|
@@ -96,7 +250,7 @@ function createButtonGroup(options = {}) {
|
|
|
96
250
|
},
|
|
97
251
|
{
|
|
98
252
|
value: "xl",
|
|
99
|
-
label: "Extra
|
|
253
|
+
label: "Extra large"
|
|
100
254
|
}
|
|
101
255
|
],
|
|
102
256
|
required: false,
|
|
@@ -158,7 +312,7 @@ function createButtonGroup(options = {}) {
|
|
|
158
312
|
const BACKGROUND_POSITION_PRESETS = [
|
|
159
313
|
{
|
|
160
314
|
value: "center",
|
|
161
|
-
label: "
|
|
315
|
+
label: "Centre"
|
|
162
316
|
},
|
|
163
317
|
{
|
|
164
318
|
value: "top",
|
|
@@ -629,7 +783,7 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
|
|
|
629
783
|
id: "spacing",
|
|
630
784
|
type: "select",
|
|
631
785
|
label: "Inner spacing",
|
|
632
|
-
description: `
|
|
786
|
+
description: `Space inside the ${contextName}, around its content.`,
|
|
633
787
|
required: false,
|
|
634
788
|
multiple: false,
|
|
635
789
|
options: [
|
|
@@ -643,7 +797,7 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
|
|
|
643
797
|
},
|
|
644
798
|
{
|
|
645
799
|
value: "cozy",
|
|
646
|
-
label: "
|
|
800
|
+
label: "Cosy"
|
|
647
801
|
},
|
|
648
802
|
{
|
|
649
803
|
value: "medium",
|
|
@@ -669,7 +823,7 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
|
|
|
669
823
|
id: "enabled",
|
|
670
824
|
type: "boolean",
|
|
671
825
|
label: "Show border",
|
|
672
|
-
description: "
|
|
826
|
+
description: "If you don't set this, the card uses your site style's border.",
|
|
673
827
|
required: false
|
|
674
828
|
},
|
|
675
829
|
{
|
|
@@ -704,8 +858,8 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
|
|
|
704
858
|
{
|
|
705
859
|
id: "colorToken",
|
|
706
860
|
type: "text",
|
|
707
|
-
label: "Border
|
|
708
|
-
description: "
|
|
861
|
+
label: "Border colour",
|
|
862
|
+
description: "A colour name from your site style, such as border or primary.",
|
|
709
863
|
required: false,
|
|
710
864
|
multiline: false,
|
|
711
865
|
defaultValue: "border",
|
|
@@ -720,14 +874,14 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
|
|
|
720
874
|
id: "raised",
|
|
721
875
|
type: "boolean",
|
|
722
876
|
label: "Raised",
|
|
723
|
-
description: `
|
|
877
|
+
description: `Adds a soft shadow so the ${contextName} lifts off the page.`,
|
|
724
878
|
required: false
|
|
725
879
|
});
|
|
726
880
|
fields.push({
|
|
727
881
|
id: "rounded",
|
|
728
882
|
type: "select",
|
|
729
883
|
label: "Rounded corners",
|
|
730
|
-
description: "
|
|
884
|
+
description: "How rounded the corners are.",
|
|
731
885
|
required: false,
|
|
732
886
|
multiple: false,
|
|
733
887
|
options: [
|
|
@@ -749,15 +903,15 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
|
|
|
749
903
|
},
|
|
750
904
|
{
|
|
751
905
|
value: "xl",
|
|
752
|
-
label: "Extra
|
|
906
|
+
label: "Extra large"
|
|
753
907
|
},
|
|
754
908
|
{
|
|
755
909
|
value: "2xl",
|
|
756
|
-
label: "Extra
|
|
910
|
+
label: "Extra extra large"
|
|
757
911
|
},
|
|
758
912
|
{
|
|
759
913
|
value: "full",
|
|
760
|
-
label: "Fully
|
|
914
|
+
label: "Fully rounded"
|
|
761
915
|
}
|
|
762
916
|
]
|
|
763
917
|
});
|
|
@@ -765,7 +919,7 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
|
|
|
765
919
|
id: "fullWidth",
|
|
766
920
|
type: "boolean",
|
|
767
921
|
label: "Full width",
|
|
768
|
-
description: "
|
|
922
|
+
description: "Stretches the content right to the edges of the screen.",
|
|
769
923
|
required: false,
|
|
770
924
|
defaultValue: false
|
|
771
925
|
});
|
|
@@ -802,7 +956,7 @@ function sectionStylesField(options = {}) {
|
|
|
802
956
|
id: "spacing",
|
|
803
957
|
type: "select",
|
|
804
958
|
label: "Inner spacing",
|
|
805
|
-
description: "
|
|
959
|
+
description: "Space above and below the section.",
|
|
806
960
|
required: false,
|
|
807
961
|
multiple: false,
|
|
808
962
|
options: [
|
|
@@ -816,7 +970,7 @@ function sectionStylesField(options = {}) {
|
|
|
816
970
|
},
|
|
817
971
|
{
|
|
818
972
|
value: "cozy",
|
|
819
|
-
label: "
|
|
973
|
+
label: "Cosy"
|
|
820
974
|
},
|
|
821
975
|
{
|
|
822
976
|
value: "medium",
|
|
@@ -907,7 +1061,7 @@ const cardStylingFields = [
|
|
|
907
1061
|
id: "buttonText",
|
|
908
1062
|
type: "text",
|
|
909
1063
|
label: "Button text",
|
|
910
|
-
description: "
|
|
1064
|
+
description: "The text on each event's button.",
|
|
911
1065
|
required: false,
|
|
912
1066
|
multiline: false,
|
|
913
1067
|
defaultValue: "Book",
|
|
@@ -922,7 +1076,7 @@ const eventDisplayFields = [
|
|
|
922
1076
|
id: "showVenue",
|
|
923
1077
|
type: "boolean",
|
|
924
1078
|
label: "Show venue",
|
|
925
|
-
description: "
|
|
1079
|
+
description: "Shows the venue's name and address.",
|
|
926
1080
|
required: false,
|
|
927
1081
|
defaultValue: true,
|
|
928
1082
|
ui: { intent: "display" }
|
|
@@ -931,7 +1085,7 @@ const eventDisplayFields = [
|
|
|
931
1085
|
id: "showMap",
|
|
932
1086
|
type: "boolean",
|
|
933
1087
|
label: "Show venue map",
|
|
934
|
-
description: "
|
|
1088
|
+
description: "Shows a map when the event's venue has a location set.",
|
|
935
1089
|
required: false,
|
|
936
1090
|
defaultValue: true,
|
|
937
1091
|
ui: { intent: "display" }
|
|
@@ -940,7 +1094,7 @@ const eventDisplayFields = [
|
|
|
940
1094
|
id: "showCapacity",
|
|
941
1095
|
type: "boolean",
|
|
942
1096
|
label: "Show available places",
|
|
943
|
-
description: "
|
|
1097
|
+
description: "Shows how many places are left.",
|
|
944
1098
|
required: false,
|
|
945
1099
|
defaultValue: true,
|
|
946
1100
|
ui: { intent: "display" }
|
|
@@ -952,8 +1106,8 @@ const eventDisplayFields = [
|
|
|
952
1106
|
const emptyStateField = {
|
|
953
1107
|
id: "emptyMessage",
|
|
954
1108
|
type: "text",
|
|
955
|
-
label: "
|
|
956
|
-
description: "
|
|
1109
|
+
label: "If there's nothing to show",
|
|
1110
|
+
description: "What visitors see when there are no upcoming events.",
|
|
957
1111
|
required: false,
|
|
958
1112
|
multiline: false,
|
|
959
1113
|
defaultValue: "No upcoming events scheduled.",
|
|
@@ -1284,6 +1438,51 @@ const nodeSchema = z.object({
|
|
|
1284
1438
|
const nodeTreeSchema = nodeSchema.array().or(nodeSchema);
|
|
1285
1439
|
const NodeSchema = nodeSchema;
|
|
1286
1440
|
const NodeTreeSchema = nodeTreeSchema;
|
|
1441
|
+
const SYSTEM_BLOCK_KINDS = [
|
|
1442
|
+
"block.hero",
|
|
1443
|
+
"block.intro",
|
|
1444
|
+
"block.columns",
|
|
1445
|
+
"block.collection",
|
|
1446
|
+
"block.feature-cards",
|
|
1447
|
+
"block.media-text",
|
|
1448
|
+
"block.cta-full",
|
|
1449
|
+
"block.single-button",
|
|
1450
|
+
"block.body-text",
|
|
1451
|
+
"block.location-map",
|
|
1452
|
+
"block.faq",
|
|
1453
|
+
"block.testimonials",
|
|
1454
|
+
"block.team-members",
|
|
1455
|
+
"block.embed",
|
|
1456
|
+
"block.blog-post",
|
|
1457
|
+
"block.blog-listing",
|
|
1458
|
+
"block.site-header",
|
|
1459
|
+
"block.site-footer",
|
|
1460
|
+
"block.form",
|
|
1461
|
+
"block.contact-newsletter",
|
|
1462
|
+
"block.appointment-booking",
|
|
1463
|
+
"block.appointment-services",
|
|
1464
|
+
"block.weekly-slot-availability",
|
|
1465
|
+
"block.event-registration",
|
|
1466
|
+
...[
|
|
1467
|
+
"block.event-details",
|
|
1468
|
+
"block.event-spotlight",
|
|
1469
|
+
"block.event-listing",
|
|
1470
|
+
"block.event-calendar",
|
|
1471
|
+
"block.recurring-schedule",
|
|
1472
|
+
"block.offerings-preview"
|
|
1473
|
+
],
|
|
1474
|
+
"block.shop",
|
|
1475
|
+
"block.product-list",
|
|
1476
|
+
"block.product-detail",
|
|
1477
|
+
"block.cart",
|
|
1478
|
+
"block.checkout",
|
|
1479
|
+
"block.gifting",
|
|
1480
|
+
"block.newsletter-signup",
|
|
1481
|
+
"block.image-gallery",
|
|
1482
|
+
"block.video-grid",
|
|
1483
|
+
"block.audio-player",
|
|
1484
|
+
"block.file-download"
|
|
1485
|
+
];
|
|
1287
1486
|
const MIN_COLUMNS = 1;
|
|
1288
1487
|
const MAX_COLUMNS = 6;
|
|
1289
1488
|
function normalizeInteger(value) {
|
|
@@ -1632,6 +1831,55 @@ function validateLayoutGridConfiguration(data, ctx) {
|
|
|
1632
1831
|
});
|
|
1633
1832
|
}
|
|
1634
1833
|
//#endregion
|
|
1834
|
+
//#region ../blocks/src/system/manifest/sdkBlockPresentationSchema.ts
|
|
1835
|
+
const sdkBlockPresentationShape = {
|
|
1836
|
+
variants: z.record(z.string().min(1), NodeSchema).optional(),
|
|
1837
|
+
defaultVariant: z.string().min(1).optional(),
|
|
1838
|
+
variantOptions: z.record(z.string().min(1), z.object({
|
|
1839
|
+
label: z.string().min(1).optional(),
|
|
1840
|
+
description: z.string().min(1).optional(),
|
|
1841
|
+
icon: z.string().min(1).optional()
|
|
1842
|
+
})).optional()
|
|
1843
|
+
};
|
|
1844
|
+
function validateSdkBlockDeclaration(data, ctx) {
|
|
1845
|
+
validateTitleSource(data, ctx);
|
|
1846
|
+
if (data.layout && data.variants) ctx.addIssue({
|
|
1847
|
+
code: z.ZodIssueCode.custom,
|
|
1848
|
+
message: "Custom block must define either `layout` or `variants`, not both",
|
|
1849
|
+
path: ["variants"]
|
|
1850
|
+
});
|
|
1851
|
+
if (data.variants) validateVariantKeys(data, ctx);
|
|
1852
|
+
}
|
|
1853
|
+
function validateTitleSource(data, ctx) {
|
|
1854
|
+
if (!data.titleSource) return;
|
|
1855
|
+
(Array.isArray(data.titleSource) ? data.titleSource : [data.titleSource]).forEach((source, index) => {
|
|
1856
|
+
if (data.fields.some((field) => field !== null && typeof field === "object" && "id" in field && field.id === source)) return;
|
|
1857
|
+
ctx.addIssue({
|
|
1858
|
+
code: z.ZodIssueCode.custom,
|
|
1859
|
+
message: `titleSource must reference a valid field ID (got "${source}")`,
|
|
1860
|
+
path: Array.isArray(data.titleSource) ? ["titleSource", index] : ["titleSource"]
|
|
1861
|
+
});
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
function validateVariantKeys(data, ctx) {
|
|
1865
|
+
const variants = data.variants ?? {};
|
|
1866
|
+
if (Object.keys(variants).length === 0) ctx.addIssue({
|
|
1867
|
+
code: z.ZodIssueCode.custom,
|
|
1868
|
+
message: "`variants` must contain at least one variant key",
|
|
1869
|
+
path: ["variants"]
|
|
1870
|
+
});
|
|
1871
|
+
if (data.defaultVariant && !Object.prototype.hasOwnProperty.call(variants, data.defaultVariant)) ctx.addIssue({
|
|
1872
|
+
code: z.ZodIssueCode.custom,
|
|
1873
|
+
message: "`defaultVariant` must be a key present in `variants`",
|
|
1874
|
+
path: ["defaultVariant"]
|
|
1875
|
+
});
|
|
1876
|
+
Object.keys(data.variantOptions ?? {}).filter((key) => !Object.prototype.hasOwnProperty.call(variants, key)).forEach((key) => ctx.addIssue({
|
|
1877
|
+
code: z.ZodIssueCode.custom,
|
|
1878
|
+
message: "`variantOptions` key must exist in `variants`",
|
|
1879
|
+
path: ["variantOptions", key]
|
|
1880
|
+
}));
|
|
1881
|
+
}
|
|
1882
|
+
//#endregion
|
|
1635
1883
|
//#region ../blocks/src/system/manifest/schema.ts
|
|
1636
1884
|
const visibilityLevels = [
|
|
1637
1885
|
"admin",
|
|
@@ -1842,7 +2090,7 @@ const uiSchema = z.object({
|
|
|
1842
2090
|
"behavior",
|
|
1843
2091
|
"style"
|
|
1844
2092
|
]).optional(),
|
|
1845
|
-
valueContract: z.enum(["boxBackground"]).optional()
|
|
2093
|
+
valueContract: z.enum(["boxBackground", "location"]).optional()
|
|
1846
2094
|
}).partial().superRefine((ui, ctx) => {
|
|
1847
2095
|
if (ui.layoutGridColumns !== void 0 && ui.layoutGridColumnsFields !== void 0) ctx.addIssue({
|
|
1848
2096
|
code: "custom",
|
|
@@ -2248,19 +2496,21 @@ const behaviourSchema = z.object({
|
|
|
2248
2496
|
paletteHidden: z.boolean().default(false),
|
|
2249
2497
|
managesOwnWrapper: z.boolean().optional()
|
|
2250
2498
|
});
|
|
2251
|
-
const
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
seenFieldIds.add(fieldId);
|
|
2260
|
-
}
|
|
2261
|
-
});
|
|
2262
|
-
const previewCustomizeManifestCurationSchema = z.object({ quickFieldPriority: quickFieldPrioritySchema });
|
|
2499
|
+
const builtInBlockKindsSchema = z.array(z.enum(SYSTEM_BLOCK_KINDS)).readonly();
|
|
2500
|
+
const blockRequiredFeatureSchema = z.enum([
|
|
2501
|
+
"bookings.appointments",
|
|
2502
|
+
"bookings.events",
|
|
2503
|
+
"shop",
|
|
2504
|
+
"newsletter",
|
|
2505
|
+
"analytics"
|
|
2506
|
+
]);
|
|
2263
2507
|
const blockCategoryEnum = z.enum([
|
|
2508
|
+
"text-and-images",
|
|
2509
|
+
"photos",
|
|
2510
|
+
"people",
|
|
2511
|
+
"events-and-bookings",
|
|
2512
|
+
"shop",
|
|
2513
|
+
"forms-and-sign-ups",
|
|
2264
2514
|
"marketing",
|
|
2265
2515
|
"content",
|
|
2266
2516
|
"blog",
|
|
@@ -2293,7 +2543,6 @@ z.object({
|
|
|
2293
2543
|
slots: slotSchema.array().default([]),
|
|
2294
2544
|
styleTokens: styleTokenSchema.optional(),
|
|
2295
2545
|
behaviours: behaviourSchema.optional(),
|
|
2296
|
-
previewCustomize: previewCustomizeManifestCurationSchema.optional(),
|
|
2297
2546
|
layout: NodeTreeSchema.optional(),
|
|
2298
2547
|
/**
|
|
2299
2548
|
* Optional list of nested field paths that should be surfaced in the main form body
|
|
@@ -2302,6 +2551,19 @@ z.object({
|
|
|
2302
2551
|
*
|
|
2303
2552
|
* The original fields remain available in settings for power users.
|
|
2304
2553
|
*/
|
|
2554
|
+
lookField: z.string().min(1).optional(),
|
|
2555
|
+
sourceLine: z.object({
|
|
2556
|
+
text: z.string(),
|
|
2557
|
+
target: z.enum([
|
|
2558
|
+
"testimonials",
|
|
2559
|
+
"team",
|
|
2560
|
+
"mailing-lists"
|
|
2561
|
+
]),
|
|
2562
|
+
when: z.object({
|
|
2563
|
+
field: z.string(),
|
|
2564
|
+
equals: z.string()
|
|
2565
|
+
}).optional()
|
|
2566
|
+
}).optional(),
|
|
2305
2567
|
promotedFields: z.array(z.string().min(1)).optional(),
|
|
2306
2568
|
variantMeaning: z.discriminatedUnion("kind", [z.object({
|
|
2307
2569
|
kind: z.literal("arrangement"),
|
|
@@ -2323,6 +2585,7 @@ z.object({
|
|
|
2323
2585
|
}).optional()).optional(),
|
|
2324
2586
|
category: blockCategoryEnum.optional(),
|
|
2325
2587
|
contentTypes: z.array(z.string()).optional(),
|
|
2588
|
+
requiredFeatures: z.array(blockRequiredFeatureSchema).optional(),
|
|
2326
2589
|
/**
|
|
2327
2590
|
* Explicit content-source classification (inline / entries / mixed). Optional at the
|
|
2328
2591
|
* schema level for backward compatibility with SDK-defined custom blocks, but every
|
|
@@ -2332,141 +2595,139 @@ z.object({
|
|
|
2332
2595
|
tags: z.array(z.string()).optional(),
|
|
2333
2596
|
icon: z.string().optional()
|
|
2334
2597
|
});
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
"contrast"
|
|
2344
|
-
])
|
|
2345
|
-
}),
|
|
2346
|
-
z.object({
|
|
2347
|
-
kind: z.literal("highlight"),
|
|
2348
|
-
tone: z.enum([
|
|
2349
|
-
"soft",
|
|
2350
|
-
"accent",
|
|
2351
|
-
"brand"
|
|
2352
|
-
])
|
|
2353
|
-
})
|
|
2354
|
-
]);
|
|
2355
|
-
const inlineTextRunSchema = z.object({
|
|
2356
|
-
text: z.string(),
|
|
2357
|
-
marks: z.array(inlineTextMarkSchema).optional()
|
|
2358
|
-
});
|
|
2359
|
-
z.array(inlineTextRunSchema);
|
|
2360
|
-
const MARK_ORDER = {
|
|
2361
|
-
strong: 0,
|
|
2362
|
-
emphasis: 1,
|
|
2363
|
-
accent: 2,
|
|
2364
|
-
highlight: 3
|
|
2365
|
-
};
|
|
2366
|
-
function plainTextToInlineText(value) {
|
|
2367
|
-
return normalizeInlineText(value.length > 0 ? [{ text: value }] : []);
|
|
2368
|
-
}
|
|
2369
|
-
function inlineTextToPlainText(value) {
|
|
2370
|
-
return value.map((run) => run.text).join("");
|
|
2598
|
+
/** SDK Looks name a single top-level select owned by this definition. */
|
|
2599
|
+
function validateManifestLookField(data, ctx) {
|
|
2600
|
+
if (!data.lookField) return;
|
|
2601
|
+
if (!data.fields.some((field) => field !== null && typeof field === "object" && "id" in field && field.id === data.lookField && "type" in field && field.type === "select" && (!("multiple" in field) || field.multiple !== true))) ctx.addIssue({
|
|
2602
|
+
code: z.ZodIssueCode.custom,
|
|
2603
|
+
path: ["lookField"],
|
|
2604
|
+
message: "lookField must name an existing single select field"
|
|
2605
|
+
});
|
|
2371
2606
|
}
|
|
2372
|
-
|
|
2373
|
-
|
|
2607
|
+
const blockSectionDeclarationShape = {
|
|
2608
|
+
promotedFields: z.array(z.string().min(1)).optional(),
|
|
2609
|
+
lookField: z.string().min(1).optional()
|
|
2610
|
+
};
|
|
2611
|
+
//#endregion
|
|
2612
|
+
//#region ../blocks/src/system/readiness.ts
|
|
2613
|
+
const ready = { kind: "Ready" };
|
|
2614
|
+
const unknownReadiness = { kind: "Unknown" };
|
|
2615
|
+
const loadedReadinessFact = (value) => ({
|
|
2616
|
+
kind: "Loaded",
|
|
2617
|
+
value
|
|
2618
|
+
});
|
|
2619
|
+
const unavailableReadinessFact = { kind: "Unavailable" };
|
|
2620
|
+
function needsSetup(reason, repair) {
|
|
2621
|
+
return {
|
|
2622
|
+
kind: "NeedsSetup",
|
|
2623
|
+
reason,
|
|
2624
|
+
repair
|
|
2625
|
+
};
|
|
2374
2626
|
}
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
if (fallbackPlainText && fallbackPlainText.length > 0) return plainTextToInlineText(fallbackPlainText);
|
|
2379
|
-
return parsed.ok ? parsed.value : [];
|
|
2627
|
+
/** One boundary owns runtime stage checking and the resulting phantom proof. */
|
|
2628
|
+
function admitReadinessFacts(stage, input) {
|
|
2629
|
+
return input.stage === stage ? input.facts : unavailableReadinessFacts();
|
|
2380
2630
|
}
|
|
2381
|
-
function
|
|
2382
|
-
if (!Array.isArray(value)) return {
|
|
2383
|
-
ok: false,
|
|
2384
|
-
error: { kind: "not-array" }
|
|
2385
|
-
};
|
|
2386
|
-
const runs = [];
|
|
2387
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
2388
|
-
const parsed = inlineTextRunSchema.safeParse(value[index]);
|
|
2389
|
-
if (!parsed.success) return {
|
|
2390
|
-
ok: false,
|
|
2391
|
-
error: {
|
|
2392
|
-
kind: "invalid-run",
|
|
2393
|
-
index
|
|
2394
|
-
}
|
|
2395
|
-
};
|
|
2396
|
-
runs.push(parsed.data);
|
|
2397
|
-
}
|
|
2631
|
+
function unavailableReadinessFacts() {
|
|
2398
2632
|
return {
|
|
2399
|
-
|
|
2400
|
-
|
|
2633
|
+
mailingList: unavailableReadinessFact,
|
|
2634
|
+
testimonials: unavailableReadinessFact,
|
|
2635
|
+
team: unavailableReadinessFact,
|
|
2636
|
+
forms: /* @__PURE__ */ new Map(),
|
|
2637
|
+
products: /* @__PURE__ */ new Map(),
|
|
2638
|
+
template: unavailableReadinessFact
|
|
2401
2639
|
};
|
|
2402
2640
|
}
|
|
2403
|
-
function
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
const
|
|
2413
|
-
if (
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2641
|
+
function pageTemplateFromEntry(entry) {
|
|
2642
|
+
return entry?._contentTypeSlug === "product" ? { kind: "product" } : { kind: "page" };
|
|
2643
|
+
}
|
|
2644
|
+
//#endregion
|
|
2645
|
+
//#region ../blocks/src/system/blocks/readiness.ts
|
|
2646
|
+
const newsletterReadiness = {
|
|
2647
|
+
needs: ["mailingList"],
|
|
2648
|
+
assess: (content, facts) => {
|
|
2649
|
+
if (facts.mailingList.kind === "Unavailable") return unknownReadiness;
|
|
2650
|
+
const targeting = parseMailingListPlacementTargeting(content.targeting ?? { mode: "default" });
|
|
2651
|
+
if (!targeting.ok) return unknownReadiness;
|
|
2652
|
+
const assessment = assessMailingListTargeting(facts.mailingList.value, targeting.value);
|
|
2653
|
+
return assessment.tag === "available" ? ready : assessment.reason === "setup_missing" ? needsSetup("mailing_setup", {
|
|
2654
|
+
kind: "manage",
|
|
2655
|
+
target: "mailingLists"
|
|
2656
|
+
}) : needsSetup("mailing_destination", {
|
|
2657
|
+
kind: "field",
|
|
2658
|
+
path: "targeting"
|
|
2659
|
+
});
|
|
2421
2660
|
}
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
accent = {
|
|
2438
|
-
kind: "accent",
|
|
2439
|
-
tone: mark.tone
|
|
2440
|
-
};
|
|
2441
|
-
break;
|
|
2442
|
-
case "highlight":
|
|
2443
|
-
highlight = {
|
|
2444
|
-
kind: "highlight",
|
|
2445
|
-
tone: mark.tone
|
|
2446
|
-
};
|
|
2447
|
-
break;
|
|
2661
|
+
};
|
|
2662
|
+
const formReadiness = {
|
|
2663
|
+
needs: ["forms"],
|
|
2664
|
+
assess: (content, facts) => {
|
|
2665
|
+
const selection = chosenString(content.formSlug);
|
|
2666
|
+
if (!selection) return needsSetup("form_not_chosen", {
|
|
2667
|
+
kind: "field",
|
|
2668
|
+
path: "formSlug"
|
|
2669
|
+
});
|
|
2670
|
+
const form = facts.forms.get(selection);
|
|
2671
|
+
if (!form || form.kind === "Unavailable") return unknownReadiness;
|
|
2672
|
+
return form.value ? ready : needsSetup("form_deleted", {
|
|
2673
|
+
kind: "field",
|
|
2674
|
+
path: "formSlug"
|
|
2675
|
+
});
|
|
2448
2676
|
}
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2677
|
+
};
|
|
2678
|
+
const testimonialsReadiness = {
|
|
2679
|
+
needs: ["testimonials"],
|
|
2680
|
+
assess: (_content, facts) => {
|
|
2681
|
+
if (facts.testimonials.kind === "Unavailable") return unknownReadiness;
|
|
2682
|
+
const { count, total } = facts.testimonials.value;
|
|
2683
|
+
if (count > 0) return ready;
|
|
2684
|
+
return needsSetup(total === "unknown" ? "testimonials_empty" : total > 0 ? "testimonials_unpublished" : "testimonials_none", {
|
|
2685
|
+
kind: "manage",
|
|
2686
|
+
target: "testimonials"
|
|
2687
|
+
});
|
|
2688
|
+
}
|
|
2689
|
+
};
|
|
2690
|
+
const teamReadiness = {
|
|
2691
|
+
needs: ["team"],
|
|
2692
|
+
assess: (content, facts) => {
|
|
2693
|
+
if (content.source !== "site_staff") return Array.isArray(content.members) && content.members.length > 0 ? ready : needsSetup("members_empty", {
|
|
2694
|
+
kind: "field",
|
|
2695
|
+
path: "members"
|
|
2696
|
+
});
|
|
2697
|
+
if (facts.team.kind === "Unavailable") return unknownReadiness;
|
|
2698
|
+
return facts.team.value > 0 ? ready : needsSetup("team_empty", {
|
|
2699
|
+
kind: "manage",
|
|
2700
|
+
target: "team"
|
|
2701
|
+
});
|
|
2702
|
+
}
|
|
2703
|
+
};
|
|
2704
|
+
const productReadiness = {
|
|
2705
|
+
needs: ["template", "products"],
|
|
2706
|
+
assess: (content, facts) => {
|
|
2707
|
+
if (facts.template.kind === "Unavailable") return unknownReadiness;
|
|
2708
|
+
if (facts.template.value.kind === "product") return ready;
|
|
2709
|
+
const selection = chosenString(content.productSlug);
|
|
2710
|
+
if (!selection) return needsSetup("product_not_chosen", {
|
|
2711
|
+
kind: "field",
|
|
2712
|
+
path: "productSlug"
|
|
2713
|
+
});
|
|
2714
|
+
const product = facts.products.get(selection);
|
|
2715
|
+
if (!product || product.kind === "Unavailable") return unknownReadiness;
|
|
2716
|
+
return product.value ? ready : needsSetup("product_gone", {
|
|
2717
|
+
kind: "field",
|
|
2718
|
+
path: "productSlug"
|
|
2719
|
+
});
|
|
2469
2720
|
}
|
|
2721
|
+
};
|
|
2722
|
+
const galleryReadiness = {
|
|
2723
|
+
needs: [],
|
|
2724
|
+
assess: (content) => Array.isArray(content.images) && content.images.length > 0 ? ready : needsSetup("gallery_empty", {
|
|
2725
|
+
kind: "field",
|
|
2726
|
+
path: "images"
|
|
2727
|
+
})
|
|
2728
|
+
};
|
|
2729
|
+
function chosenString(value) {
|
|
2730
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
2470
2731
|
}
|
|
2471
2732
|
//#endregion
|
|
2472
2733
|
//#region ../blocks/src/system/manifest/augmentManifest.ts
|
|
@@ -2498,11 +2759,12 @@ function createVariantField(manifest) {
|
|
|
2498
2759
|
if (!manifest.variants || Object.keys(manifest.variants).length <= 1) return null;
|
|
2499
2760
|
if (manifest.fields?.some((f) => f.id === "variant")) return null;
|
|
2500
2761
|
const variantKeys = Object.keys(manifest.variants).filter((key) => !manifest.variantMeaning.lookOnlyKeys?.includes(key));
|
|
2762
|
+
if (variantKeys.length === 0) return null;
|
|
2501
2763
|
return {
|
|
2502
2764
|
id: "variant",
|
|
2503
2765
|
type: "select",
|
|
2504
|
-
label: "Variant",
|
|
2505
|
-
description: "Choose
|
|
2766
|
+
label: manifest.variantMeaning.kind === "arrangement" ? "Layout" : "Variant",
|
|
2767
|
+
...manifest.variantMeaning.kind === "arrangement" ? {} : { description: "Choose how this block is laid out." },
|
|
2506
2768
|
ui: { intent: "display" },
|
|
2507
2769
|
required: false,
|
|
2508
2770
|
defaultValue: manifest.defaultVariant ?? variantKeys[0],
|
|
@@ -2574,7 +2836,7 @@ function parseSiteIconStyleGuideVersionId(value) {
|
|
|
2574
2836
|
//#endregion
|
|
2575
2837
|
//#region ../blocks/src/system/icons/value.ts
|
|
2576
2838
|
const NO_BLOCK_ICON_VALUE = { kind: "none" };
|
|
2577
|
-
function isRecord
|
|
2839
|
+
function isRecord(value) {
|
|
2578
2840
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2579
2841
|
}
|
|
2580
2842
|
function parseBlockIconValue(value) {
|
|
@@ -2582,7 +2844,7 @@ function parseBlockIconValue(value) {
|
|
|
2582
2844
|
kind: "semantic",
|
|
2583
2845
|
iconId: value
|
|
2584
2846
|
};
|
|
2585
|
-
if (!isRecord
|
|
2847
|
+
if (!isRecord(value)) return NO_BLOCK_ICON_VALUE;
|
|
2586
2848
|
switch (value.kind) {
|
|
2587
2849
|
case "none": return NO_BLOCK_ICON_VALUE;
|
|
2588
2850
|
case "semantic": return isSemanticIconId(value.iconId) ? {
|
|
@@ -2655,7 +2917,7 @@ function buildGeneratedBlockIconRenderAssetLookupFromUnknown(value) {
|
|
|
2655
2917
|
if (!Array.isArray(value)) return { kind: "invalid_asset_list" };
|
|
2656
2918
|
const inputs = [];
|
|
2657
2919
|
for (const [index, item] of value.entries()) {
|
|
2658
|
-
if (!isRecord
|
|
2920
|
+
if (!isRecord(item)) return {
|
|
2659
2921
|
kind: "invalid_asset_entry",
|
|
2660
2922
|
index,
|
|
2661
2923
|
reason: "not_object"
|
|
@@ -3653,7 +3915,7 @@ const formEmbedFragment = defineFragment({
|
|
|
3653
3915
|
id: "formSlug",
|
|
3654
3916
|
type: "reference",
|
|
3655
3917
|
label: "Form",
|
|
3656
|
-
description: "
|
|
3918
|
+
description: "Choose which of your forms to show.",
|
|
3657
3919
|
required: true,
|
|
3658
3920
|
referenceKind: "form",
|
|
3659
3921
|
allowManualEntry: false,
|
|
@@ -3669,7 +3931,7 @@ const formEmbedFragment = defineFragment({
|
|
|
3669
3931
|
id: "successMessage",
|
|
3670
3932
|
type: "text",
|
|
3671
3933
|
label: "Success message",
|
|
3672
|
-
description: "
|
|
3934
|
+
description: "What visitors see after they've sent the form."
|
|
3673
3935
|
}
|
|
3674
3936
|
],
|
|
3675
3937
|
layout: [form(withApiBindings({
|
|
@@ -3737,7 +3999,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
3737
3999
|
{
|
|
3738
4000
|
id: "targeting",
|
|
3739
4001
|
type: "group",
|
|
3740
|
-
label: "
|
|
4002
|
+
label: "Where sign-ups go",
|
|
3741
4003
|
description: "Choose what kind of emails people signing up here will receive.",
|
|
3742
4004
|
defaultValue: { mode: "default" },
|
|
3743
4005
|
required: true,
|
|
@@ -3853,9 +4115,9 @@ function createBlockManifest(config) {
|
|
|
3853
4115
|
slots: [],
|
|
3854
4116
|
styleTokens: config.styleTokens,
|
|
3855
4117
|
behaviours,
|
|
3856
|
-
previewCustomize: config.previewCustomize,
|
|
3857
4118
|
category: config.category,
|
|
3858
4119
|
contentTypes: config.contentTypes ? [...config.contentTypes] : void 0,
|
|
4120
|
+
requiredFeatures: config.requiredFeatures ? [...config.requiredFeatures] : void 0,
|
|
3859
4121
|
contentSource: config.contentSource,
|
|
3860
4122
|
tags: config.tags ? [...config.tags] : [],
|
|
3861
4123
|
icon: config.icon ?? "Box",
|
|
@@ -3864,6 +4126,8 @@ function createBlockManifest(config) {
|
|
|
3864
4126
|
variantMeaning: config.variantMeaning,
|
|
3865
4127
|
defaultVariant: config.defaultVariant,
|
|
3866
4128
|
variantOptions: config.variantOptions,
|
|
4129
|
+
lookField: config.lookField,
|
|
4130
|
+
sourceLine: config.sourceLine,
|
|
3867
4131
|
promotedFields: config.promotedFields ? [...config.promotedFields] : void 0
|
|
3868
4132
|
});
|
|
3869
4133
|
}
|
|
@@ -3919,7 +4183,14 @@ function blockBehaviours(config) {
|
|
|
3919
4183
|
}
|
|
3920
4184
|
//#endregion
|
|
3921
4185
|
//#region ../blocks/src/system/blocks/form.tsx
|
|
3922
|
-
const
|
|
4186
|
+
const setupFormEmbedFragment = {
|
|
4187
|
+
...formEmbedFragment,
|
|
4188
|
+
fields: formEmbedFragment.fields.map((field) => field.id === "formSlug" ? {
|
|
4189
|
+
...field,
|
|
4190
|
+
required: false
|
|
4191
|
+
} : field)
|
|
4192
|
+
};
|
|
4193
|
+
const formComposition = composeFragments([{ fragment: formCopyFragment }, { fragment: setupFormEmbedFragment }]);
|
|
3923
4194
|
function fragmentLayoutNode(layout) {
|
|
3924
4195
|
return isNodeDefinitionArray(layout) ? el("div", {}, [...layout]) : layout;
|
|
3925
4196
|
}
|
|
@@ -3968,15 +4239,20 @@ const formLayout = styledSection({
|
|
|
3968
4239
|
spacing: "medium",
|
|
3969
4240
|
background: "surface"
|
|
3970
4241
|
});
|
|
3971
|
-
const
|
|
4242
|
+
const fragmentDataLoaders = buildFragmentDataLoaders(formComposition);
|
|
4243
|
+
const dataLoaders = Object.fromEntries(Object.entries(fragmentDataLoaders).map(([key, loader]) => [key, key === "form" ? {
|
|
4244
|
+
...loader,
|
|
4245
|
+
requiredParams: ["formSlug"]
|
|
4246
|
+
} : loader]));
|
|
3972
4247
|
const formManifest = createBlockManifest({
|
|
3973
4248
|
variantMeaning: { kind: "arrangement" },
|
|
3974
4249
|
id: "block.form",
|
|
4250
|
+
promotedFields: ["formSlug"],
|
|
3975
4251
|
title: "Form",
|
|
3976
4252
|
titleSource: "title",
|
|
3977
|
-
description: "
|
|
4253
|
+
description: "Shows one of your forms so visitors can get in touch.",
|
|
3978
4254
|
includeContainerStyles: true,
|
|
3979
|
-
fragments: [{ fragment: formCopyFragment }, { fragment:
|
|
4255
|
+
fragments: [{ fragment: formCopyFragment }, { fragment: setupFormEmbedFragment }],
|
|
3980
4256
|
additionalFields: [{
|
|
3981
4257
|
id: "archFrame",
|
|
3982
4258
|
type: "boolean",
|
|
@@ -4015,7 +4291,7 @@ const formManifest = createBlockManifest({
|
|
|
4015
4291
|
animation: false,
|
|
4016
4292
|
paletteHidden: false
|
|
4017
4293
|
},
|
|
4018
|
-
category: "
|
|
4294
|
+
category: "forms-and-sign-ups",
|
|
4019
4295
|
contentSource: { kind: "inline" },
|
|
4020
4296
|
tags: [
|
|
4021
4297
|
"form",
|
|
@@ -4041,6 +4317,7 @@ const formDataSchema = z.object({
|
|
|
4041
4317
|
});
|
|
4042
4318
|
const formBlockDefinition = {
|
|
4043
4319
|
manifest: formManifest,
|
|
4320
|
+
readiness: formReadiness,
|
|
4044
4321
|
dataSchemas: { form: formDataSchema.optional() },
|
|
4045
4322
|
dataLoaders,
|
|
4046
4323
|
runtime: formBlockRuntime
|
|
@@ -4311,10 +4588,11 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
4311
4588
|
variantMeaning: { kind: "arrangement" },
|
|
4312
4589
|
id: "block.event-registration",
|
|
4313
4590
|
version: "1.0.0",
|
|
4314
|
-
title: "Event
|
|
4591
|
+
title: "Event registration",
|
|
4315
4592
|
titleSource: "heading",
|
|
4316
|
-
description: "
|
|
4317
|
-
category: "
|
|
4593
|
+
description: "The booking form for an event, where people choose their tickets.",
|
|
4594
|
+
category: "events-and-bookings",
|
|
4595
|
+
requiredFeatures: ["bookings.events"],
|
|
4318
4596
|
contentSource: { kind: "inline" },
|
|
4319
4597
|
tags: [
|
|
4320
4598
|
"events",
|
|
@@ -4340,7 +4618,7 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
4340
4618
|
id: "heading",
|
|
4341
4619
|
type: "text",
|
|
4342
4620
|
label: "Heading",
|
|
4343
|
-
description: "
|
|
4621
|
+
description: "The heading above the booking form.",
|
|
4344
4622
|
required: false,
|
|
4345
4623
|
multiline: false,
|
|
4346
4624
|
defaultValue: ""
|
|
@@ -4355,8 +4633,8 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
4355
4633
|
{
|
|
4356
4634
|
id: "maxTickets",
|
|
4357
4635
|
type: "select",
|
|
4358
|
-
label: "
|
|
4359
|
-
description: "
|
|
4636
|
+
label: "Most tickets per booking",
|
|
4637
|
+
description: "The most tickets one person can book at once.",
|
|
4360
4638
|
required: false,
|
|
4361
4639
|
multiple: false,
|
|
4362
4640
|
defaultValue: "5",
|
|
@@ -4388,7 +4666,7 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
4388
4666
|
id: "showVenue",
|
|
4389
4667
|
type: "boolean",
|
|
4390
4668
|
label: "Show venue",
|
|
4391
|
-
description: "
|
|
4669
|
+
description: "Shows where the event is.",
|
|
4392
4670
|
required: false,
|
|
4393
4671
|
defaultValue: true,
|
|
4394
4672
|
ui: { intent: "display" }
|
|
@@ -4397,7 +4675,7 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
4397
4675
|
id: "showCapacity",
|
|
4398
4676
|
type: "boolean",
|
|
4399
4677
|
label: "Show available places",
|
|
4400
|
-
description: "
|
|
4678
|
+
description: "Shows how many places are left.",
|
|
4401
4679
|
required: false,
|
|
4402
4680
|
defaultValue: true,
|
|
4403
4681
|
ui: { intent: "display" }
|
|
@@ -4406,7 +4684,7 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
4406
4684
|
id: "successMessage",
|
|
4407
4685
|
type: "text",
|
|
4408
4686
|
label: "Success message",
|
|
4409
|
-
description: "
|
|
4687
|
+
description: "What people see once they've booked.",
|
|
4410
4688
|
required: false,
|
|
4411
4689
|
multiline: true,
|
|
4412
4690
|
maxLength: 500,
|
|
@@ -4555,14 +4833,24 @@ const eventRegistrationBlockDefinition = {
|
|
|
4555
4833
|
}
|
|
4556
4834
|
}
|
|
4557
4835
|
};
|
|
4836
|
+
//#endregion
|
|
4837
|
+
//#region ../blocks/src/system/node/fragments/mapDrawingStyle.ts
|
|
4838
|
+
/** Shared map token binding for the current section ground and site style. */
|
|
4839
|
+
const mapDrawingStyleBinding = { $bind: {
|
|
4840
|
+
from: "content._sectionStyles.background",
|
|
4841
|
+
transforms: [{
|
|
4842
|
+
id: "mapDrawing.resolveStyle",
|
|
4843
|
+
options: { fallbackToken: "background" }
|
|
4844
|
+
}]
|
|
4845
|
+
} };
|
|
4558
4846
|
const eventListingBlockDefinition = {
|
|
4559
4847
|
manifest: createBlockManifestWithContentShape({
|
|
4560
4848
|
variantMeaning: { kind: "arrangement" },
|
|
4561
4849
|
id: "block.event-listing",
|
|
4562
4850
|
version: "1.1.0",
|
|
4563
|
-
title: "Event
|
|
4851
|
+
title: "Event listing",
|
|
4564
4852
|
titleSource: "heading",
|
|
4565
|
-
description: "
|
|
4853
|
+
description: "All your upcoming events in one list.",
|
|
4566
4854
|
skipSectionStyles: true,
|
|
4567
4855
|
additionalFields: [
|
|
4568
4856
|
...sectionHeaderFields("All Events"),
|
|
@@ -4589,27 +4877,26 @@ const eventListingBlockDefinition = {
|
|
|
4589
4877
|
{
|
|
4590
4878
|
id: "eventsPerPage",
|
|
4591
4879
|
type: "select",
|
|
4592
|
-
label: "
|
|
4593
|
-
description: "Number of events to load at a time",
|
|
4880
|
+
label: "How many",
|
|
4594
4881
|
required: false,
|
|
4595
4882
|
multiple: false,
|
|
4596
4883
|
defaultValue: "12",
|
|
4597
4884
|
options: [
|
|
4598
4885
|
{
|
|
4599
4886
|
value: "3",
|
|
4600
|
-
label: "3
|
|
4887
|
+
label: "Show the first 3"
|
|
4601
4888
|
},
|
|
4602
4889
|
{
|
|
4603
4890
|
value: "6",
|
|
4604
|
-
label: "6
|
|
4891
|
+
label: "Show the first 6"
|
|
4605
4892
|
},
|
|
4606
4893
|
{
|
|
4607
4894
|
value: "12",
|
|
4608
|
-
label: "12
|
|
4895
|
+
label: "Show the first 12"
|
|
4609
4896
|
},
|
|
4610
4897
|
{
|
|
4611
4898
|
value: "24",
|
|
4612
|
-
label: "24
|
|
4899
|
+
label: "Show the first 24"
|
|
4613
4900
|
}
|
|
4614
4901
|
],
|
|
4615
4902
|
ui: { intent: "display" }
|
|
@@ -4618,7 +4905,7 @@ const eventListingBlockDefinition = {
|
|
|
4618
4905
|
id: "paginationMode",
|
|
4619
4906
|
type: "select",
|
|
4620
4907
|
label: "More events",
|
|
4621
|
-
description: "How
|
|
4908
|
+
description: "How visitors can see the rest of your events.",
|
|
4622
4909
|
required: false,
|
|
4623
4910
|
multiple: false,
|
|
4624
4911
|
defaultValue: "loadMore",
|
|
@@ -4634,7 +4921,7 @@ const eventListingBlockDefinition = {
|
|
|
4634
4921
|
{
|
|
4635
4922
|
id: "seeAllUrl",
|
|
4636
4923
|
type: "link",
|
|
4637
|
-
label: "
|
|
4924
|
+
label: "Link to the full list",
|
|
4638
4925
|
required: false,
|
|
4639
4926
|
ui: {
|
|
4640
4927
|
intent: "display",
|
|
@@ -4647,8 +4934,8 @@ const eventListingBlockDefinition = {
|
|
|
4647
4934
|
{
|
|
4648
4935
|
id: "loadMoreText",
|
|
4649
4936
|
type: "text",
|
|
4650
|
-
label: "
|
|
4651
|
-
description: "
|
|
4937
|
+
label: "More events button text",
|
|
4938
|
+
description: "The text on the button or link that shows more events.",
|
|
4652
4939
|
required: false,
|
|
4653
4940
|
multiline: false,
|
|
4654
4941
|
defaultValue: "Load more events",
|
|
@@ -4699,8 +4986,8 @@ const eventListingBlockDefinition = {
|
|
|
4699
4986
|
{
|
|
4700
4987
|
id: "filterEventPresets",
|
|
4701
4988
|
type: "select",
|
|
4702
|
-
label: "
|
|
4703
|
-
description: "
|
|
4989
|
+
label: "Only show these event types",
|
|
4990
|
+
description: "Pick the types of event this block shows.",
|
|
4704
4991
|
required: false,
|
|
4705
4992
|
multiple: true,
|
|
4706
4993
|
defaultValue: [],
|
|
@@ -4737,23 +5024,23 @@ const eventListingBlockDefinition = {
|
|
|
4737
5024
|
{
|
|
4738
5025
|
id: "scheduleScope",
|
|
4739
5026
|
type: "select",
|
|
4740
|
-
label: "
|
|
4741
|
-
description: "
|
|
5027
|
+
label: "Regular or one-off",
|
|
5028
|
+
description: "Show regular events, one-off events or both.",
|
|
4742
5029
|
required: false,
|
|
4743
5030
|
multiple: false,
|
|
4744
5031
|
defaultValue: "any",
|
|
4745
5032
|
options: [
|
|
4746
5033
|
{
|
|
4747
5034
|
value: "any",
|
|
4748
|
-
label: "
|
|
5035
|
+
label: "Both"
|
|
4749
5036
|
},
|
|
4750
5037
|
{
|
|
4751
5038
|
value: "recurring",
|
|
4752
|
-
label: "
|
|
5039
|
+
label: "Regular events only"
|
|
4753
5040
|
},
|
|
4754
5041
|
{
|
|
4755
5042
|
value: "oneOff",
|
|
4756
|
-
label: "One-off only"
|
|
5043
|
+
label: "One-off events only"
|
|
4757
5044
|
}
|
|
4758
5045
|
],
|
|
4759
5046
|
ui: {
|
|
@@ -4804,17 +5091,11 @@ const eventListingBlockDefinition = {
|
|
|
4804
5091
|
"all-events"
|
|
4805
5092
|
],
|
|
4806
5093
|
icon: "List",
|
|
4807
|
-
previewCustomize: { quickFieldPriority: [
|
|
4808
|
-
"layout",
|
|
4809
|
-
"columns",
|
|
4810
|
-
"eventsPerPage",
|
|
4811
|
-
"eventSurface"
|
|
4812
|
-
] },
|
|
4813
5094
|
layout: [styledSection({
|
|
4814
5095
|
children: styledContainer({
|
|
4815
5096
|
rootType: "stack",
|
|
4816
5097
|
rootProps: { gap: "lg" },
|
|
4817
|
-
children: [...sectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
5098
|
+
children: [...sectionHeaderLayoutNodes(), el("div", { style: mapDrawingStyleBinding }, [el("event-listing", withApiBindings({
|
|
4818
5099
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
4819
5100
|
events: { $bind: { from: "data.events" } },
|
|
4820
5101
|
stage: { $bind: {
|
|
@@ -4871,7 +5152,7 @@ const eventListingBlockDefinition = {
|
|
|
4871
5152
|
fallback: "any"
|
|
4872
5153
|
} },
|
|
4873
5154
|
emptyMessage: { $bind: { from: "content.emptyMessage" } }
|
|
4874
|
-
}))]
|
|
5155
|
+
}))])]
|
|
4875
5156
|
}),
|
|
4876
5157
|
baseClass: "",
|
|
4877
5158
|
spacing: "comfortable"
|
|
@@ -4941,7 +5222,7 @@ const eventSelectionFields = [{
|
|
|
4941
5222
|
}, createSiteOptionSelectField({
|
|
4942
5223
|
id: "selectedEventSeriesIds",
|
|
4943
5224
|
label: "Selected events",
|
|
4944
|
-
description: "
|
|
5225
|
+
description: "Shows upcoming dates for just these events. The other filters don't apply.",
|
|
4945
5226
|
required: false,
|
|
4946
5227
|
multiple: true,
|
|
4947
5228
|
defaultValue: [],
|
|
@@ -5040,6 +5321,27 @@ const scopeParams = {
|
|
|
5040
5321
|
};
|
|
5041
5322
|
/** Combined renders two jobs; calendar-only variants never pay for the list seed. */
|
|
5042
5323
|
const eventCalendarDataLoaders = {
|
|
5324
|
+
schedule: {
|
|
5325
|
+
endpoint: "listPublicRecurringSchedule",
|
|
5326
|
+
when: { $bind: {
|
|
5327
|
+
from: "content",
|
|
5328
|
+
transforms: [{
|
|
5329
|
+
id: "events.calendarReadEnabled",
|
|
5330
|
+
options: { job: "schedule" }
|
|
5331
|
+
}]
|
|
5332
|
+
} },
|
|
5333
|
+
params: {
|
|
5334
|
+
siteId: scopeParams.siteId,
|
|
5335
|
+
stage: scopeParams.stage,
|
|
5336
|
+
limit: "100",
|
|
5337
|
+
detailLevel: "listing",
|
|
5338
|
+
readProfile: "compact-list",
|
|
5339
|
+
eventSurface: "custom",
|
|
5340
|
+
eventPresets: "class",
|
|
5341
|
+
scheduleScope: "any"
|
|
5342
|
+
},
|
|
5343
|
+
mode: "server"
|
|
5344
|
+
},
|
|
5043
5345
|
events: {
|
|
5044
5346
|
endpoint: "listPublicEvents",
|
|
5045
5347
|
when: { $bind: {
|
|
@@ -5144,153 +5446,190 @@ const eventCalendarLayout = [styledSection({
|
|
|
5144
5446
|
gap: "lg",
|
|
5145
5447
|
...lookSlot("layout")
|
|
5146
5448
|
},
|
|
5147
|
-
children: [
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
from: "content.
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
from: "content.
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
from: "content.
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
}
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5449
|
+
children: [
|
|
5450
|
+
text({
|
|
5451
|
+
as: "p",
|
|
5452
|
+
...lookSlot("eyebrow")
|
|
5453
|
+
}, bind("content.eyebrow"), when("content.eyebrow")),
|
|
5454
|
+
...sectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }),
|
|
5455
|
+
el("event-calendar", withApiBindings({
|
|
5456
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
5457
|
+
schedule: { $bind: { from: "data.schedule" } },
|
|
5458
|
+
seeAllButtonVariant: { $bind: {
|
|
5459
|
+
from: "content.seeAllButtonVariant",
|
|
5460
|
+
fallback: "secondary"
|
|
5461
|
+
} },
|
|
5462
|
+
events: { $bind: { from: "data.events" } },
|
|
5463
|
+
effectiveListArrangementKey: { $bind: { from: "$root.effectiveListArrangementKey" } },
|
|
5464
|
+
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
5465
|
+
stage: { $bind: {
|
|
5466
|
+
from: "$root.previewStage",
|
|
5467
|
+
fallback: "published"
|
|
5468
|
+
} },
|
|
5469
|
+
variant: { $bind: { from: "content.variant" } },
|
|
5470
|
+
displayMode: { $bind: { from: "content.displayMode" } },
|
|
5471
|
+
listLayout: { $bind: { from: "content.listLayout" } },
|
|
5472
|
+
listBy: { $bind: { from: "content.listBy" } },
|
|
5473
|
+
bookingTimeZone: { $bind: { from: "$root.dateContext.timeZone" } },
|
|
5474
|
+
dateContext: { $bind: { from: "$root.dateContext" } },
|
|
5475
|
+
monthArrangement: { $bind: { from: "content._lookMonthArrangement" } },
|
|
5476
|
+
lookSlots: { $bind: { from: "content._lookSlots" } },
|
|
5477
|
+
itemActionStyle: { $bind: { from: "content._effectiveKnobs.actionStyle.value" } },
|
|
5478
|
+
showPhotos: { $bind: { from: "content.showPhotos" } },
|
|
5479
|
+
panelHeading: { $bind: { from: "content._lookPanelHeading" } },
|
|
5480
|
+
itemRoles: { $bind: { from: "content._effectiveLook.itemRoles" } },
|
|
5481
|
+
roleSurfaces: { $bind: { from: "content._effectiveLook.roleSurfaces" } },
|
|
5482
|
+
itemSurfaces: { $bind: { from: "content._effectiveLook.itemSurfaces" } },
|
|
5483
|
+
listColumns: { $bind: { from: "content.listColumns" } },
|
|
5484
|
+
layout: { $bind: { from: "content.layout" } },
|
|
5485
|
+
columns: { $bind: { from: "content.columns" } },
|
|
5486
|
+
eventsPerPage: { $bind: { from: "content.eventsPerPage" } },
|
|
5487
|
+
paginationMode: { $bind: {
|
|
5488
|
+
from: "content.paginationMode",
|
|
5489
|
+
fallback: "loadMore"
|
|
5490
|
+
} },
|
|
5491
|
+
seeAllUrl: { $bind: {
|
|
5492
|
+
from: "content.seeAllUrl",
|
|
5493
|
+
fallback: "",
|
|
5494
|
+
transforms: [{ id: "links.resolve" }]
|
|
5495
|
+
} },
|
|
5496
|
+
loadMoreText: { $bind: {
|
|
5497
|
+
from: "content.loadMoreText",
|
|
5498
|
+
fallback: "Load more events"
|
|
5499
|
+
} },
|
|
5500
|
+
startOfWeek: { $bind: { from: "content.startOfWeek" } },
|
|
5501
|
+
calendarTabViews: { $bind: {
|
|
5502
|
+
from: "content.calendarTabViews",
|
|
5503
|
+
fallback: "both"
|
|
5504
|
+
} },
|
|
5505
|
+
defaultCalendarView: { $bind: {
|
|
5506
|
+
from: "content.defaultCalendarView",
|
|
5507
|
+
fallback: "month"
|
|
5508
|
+
} },
|
|
5509
|
+
seriesIds: { $bind: {
|
|
5510
|
+
from: "content",
|
|
5511
|
+
transforms: [{
|
|
5512
|
+
id: "events.calendarSelectionParam",
|
|
5513
|
+
options: { key: "seriesIds" }
|
|
5514
|
+
}]
|
|
5515
|
+
} },
|
|
5516
|
+
showFilters: { $bind: {
|
|
5517
|
+
from: "content.showFilters",
|
|
5518
|
+
fallback: true
|
|
5519
|
+
} },
|
|
5520
|
+
showCategoryFilter: { $bind: {
|
|
5521
|
+
from: "content.showCategoryFilter",
|
|
5522
|
+
fallback: "auto"
|
|
5523
|
+
} },
|
|
5524
|
+
showVenueFilter: { $bind: {
|
|
5525
|
+
from: "content.showVenueFilter",
|
|
5526
|
+
fallback: false
|
|
5527
|
+
} },
|
|
5528
|
+
showStaffFilter: { $bind: {
|
|
5529
|
+
from: "content.showStaffFilter",
|
|
5530
|
+
fallback: true
|
|
5531
|
+
} },
|
|
5532
|
+
showVenue: { $bind: {
|
|
5533
|
+
from: "content.showVenue",
|
|
5534
|
+
fallback: true
|
|
5535
|
+
} },
|
|
5536
|
+
showMap: { $bind: {
|
|
5537
|
+
from: "content.showMap",
|
|
5538
|
+
fallback: true
|
|
5539
|
+
} },
|
|
5540
|
+
showCapacity: { $bind: {
|
|
5541
|
+
from: "content.showCapacity",
|
|
5542
|
+
fallback: true
|
|
5543
|
+
} },
|
|
5544
|
+
eventSurface: { $bind: {
|
|
5545
|
+
from: "content",
|
|
5546
|
+
transforms: [{
|
|
5547
|
+
id: "events.calendarSelectionParam",
|
|
5548
|
+
options: { key: "eventSurface" }
|
|
5549
|
+
}]
|
|
5550
|
+
} },
|
|
5551
|
+
filterEventPresets: { $bind: {
|
|
5552
|
+
from: "content",
|
|
5553
|
+
transforms: [{
|
|
5554
|
+
id: "events.calendarSelectionParam",
|
|
5555
|
+
options: { key: "filterEventPresets" }
|
|
5556
|
+
}]
|
|
5557
|
+
} },
|
|
5558
|
+
scheduleScope: { $bind: {
|
|
5559
|
+
from: "content",
|
|
5560
|
+
transforms: [{
|
|
5561
|
+
id: "events.calendarSelectionParam",
|
|
5562
|
+
options: { key: "scheduleScope" }
|
|
5563
|
+
}]
|
|
5564
|
+
} },
|
|
5565
|
+
filterCategoryIds: { $bind: {
|
|
5566
|
+
from: "content",
|
|
5567
|
+
transforms: [{
|
|
5568
|
+
id: "events.calendarSelectionParam",
|
|
5569
|
+
options: { key: "filterCategoryIds" }
|
|
5570
|
+
}]
|
|
5571
|
+
} },
|
|
5572
|
+
filterStaffMemberId: { $bind: {
|
|
5573
|
+
from: "content",
|
|
5574
|
+
transforms: [{
|
|
5575
|
+
id: "events.calendarSelectionParam",
|
|
5576
|
+
options: { key: "filterStaffMemberId" }
|
|
5577
|
+
}]
|
|
5578
|
+
} },
|
|
5579
|
+
filterVenueId: { $bind: {
|
|
5580
|
+
from: "content",
|
|
5581
|
+
transforms: [{
|
|
5582
|
+
id: "events.calendarSelectionParam",
|
|
5583
|
+
options: { key: "filterVenueId" }
|
|
5584
|
+
}]
|
|
5585
|
+
} },
|
|
5586
|
+
cardRole: { $bind: {
|
|
5587
|
+
from: "content._cardStyles.role",
|
|
5588
|
+
fallback: "default"
|
|
5589
|
+
} },
|
|
5590
|
+
buttonVariant: { $bind: {
|
|
5591
|
+
from: "content.buttonVariant",
|
|
5592
|
+
fallback: "primary"
|
|
5593
|
+
} },
|
|
5594
|
+
buttonText: { $bind: {
|
|
5595
|
+
from: "content.buttonText",
|
|
5596
|
+
fallback: "Book"
|
|
5597
|
+
} },
|
|
5598
|
+
emptyMessage: { $bind: { from: "content.emptyMessage" } },
|
|
5599
|
+
boardTitle: { $bind: { from: "content.boardTitle" } },
|
|
5600
|
+
footerNote: { $bind: { from: "content.footerNote" } },
|
|
5601
|
+
elevated: { $bind: {
|
|
5602
|
+
from: "content.elevated",
|
|
5603
|
+
fallback: false
|
|
5604
|
+
} },
|
|
5605
|
+
banded: { $bind: {
|
|
5606
|
+
from: "content",
|
|
5607
|
+
transforms: [{ id: "events.calendarBanded" }],
|
|
5608
|
+
fallback: false
|
|
5609
|
+
} }
|
|
5610
|
+
}))
|
|
5611
|
+
]
|
|
5288
5612
|
}),
|
|
5289
5613
|
baseClass: "",
|
|
5290
5614
|
spacing: "comfortable"
|
|
5291
5615
|
})];
|
|
5292
5616
|
const eventCalendarAdditionalFields = [
|
|
5293
5617
|
...cardListKnobFields,
|
|
5618
|
+
...cardListPhotoNumberFields.filter((field) => field.id === "showPhotos"),
|
|
5619
|
+
...eventDisplayFields.filter((field) => field.id === "showVenue"),
|
|
5620
|
+
{
|
|
5621
|
+
id: "eyebrow",
|
|
5622
|
+
type: "text",
|
|
5623
|
+
label: "Small heading above the title",
|
|
5624
|
+
required: false,
|
|
5625
|
+
multiline: false,
|
|
5626
|
+
maxLength: 80
|
|
5627
|
+
},
|
|
5628
|
+
createButtonVariantField({
|
|
5629
|
+
id: "seeAllButtonVariant",
|
|
5630
|
+
label: "See all button style",
|
|
5631
|
+
defaultValue: "secondary"
|
|
5632
|
+
}),
|
|
5294
5633
|
...sectionHeaderFields("Event Calendar"),
|
|
5295
5634
|
{
|
|
5296
5635
|
id: "displayMode",
|
|
@@ -5303,7 +5642,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5303
5642
|
options: [
|
|
5304
5643
|
{
|
|
5305
5644
|
value: "combined",
|
|
5306
|
-
label: "
|
|
5645
|
+
label: "List and calendar, with tabs"
|
|
5307
5646
|
},
|
|
5308
5647
|
{
|
|
5309
5648
|
value: "calendar",
|
|
@@ -5320,6 +5659,10 @@ const eventCalendarAdditionalFields = [
|
|
|
5320
5659
|
{
|
|
5321
5660
|
value: "list",
|
|
5322
5661
|
label: "List"
|
|
5662
|
+
},
|
|
5663
|
+
{
|
|
5664
|
+
value: "week",
|
|
5665
|
+
label: "Week"
|
|
5323
5666
|
}
|
|
5324
5667
|
],
|
|
5325
5668
|
ui: {
|
|
@@ -5336,7 +5679,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5336
5679
|
defaultValue: "upcoming",
|
|
5337
5680
|
options: [{
|
|
5338
5681
|
value: "upcoming",
|
|
5339
|
-
label: "Upcoming
|
|
5682
|
+
label: "Upcoming events"
|
|
5340
5683
|
}, {
|
|
5341
5684
|
value: "week",
|
|
5342
5685
|
label: "Week"
|
|
@@ -5353,7 +5696,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5353
5696
|
id: "listLayout",
|
|
5354
5697
|
type: "select",
|
|
5355
5698
|
label: "List layout",
|
|
5356
|
-
description: "
|
|
5699
|
+
description: "How the list is laid out.",
|
|
5357
5700
|
required: false,
|
|
5358
5701
|
multiple: false,
|
|
5359
5702
|
defaultValue: "stack",
|
|
@@ -5405,35 +5748,54 @@ const eventCalendarAdditionalFields = [
|
|
|
5405
5748
|
{
|
|
5406
5749
|
id: "eventsPerPage",
|
|
5407
5750
|
type: "select",
|
|
5408
|
-
label: "
|
|
5409
|
-
description: "Number of events to load initially",
|
|
5751
|
+
label: "How many",
|
|
5410
5752
|
required: false,
|
|
5411
5753
|
multiple: false,
|
|
5412
5754
|
defaultValue: "12",
|
|
5413
5755
|
options: [
|
|
5756
|
+
{
|
|
5757
|
+
value: "1",
|
|
5758
|
+
label: "Show just one"
|
|
5759
|
+
},
|
|
5760
|
+
{
|
|
5761
|
+
value: "2",
|
|
5762
|
+
label: "Show the first 2"
|
|
5763
|
+
},
|
|
5764
|
+
{
|
|
5765
|
+
value: "3",
|
|
5766
|
+
label: "Show the first 3"
|
|
5767
|
+
},
|
|
5768
|
+
{
|
|
5769
|
+
value: "4",
|
|
5770
|
+
label: "Show the first 4"
|
|
5771
|
+
},
|
|
5772
|
+
{
|
|
5773
|
+
value: "5",
|
|
5774
|
+
label: "Show the first 5"
|
|
5775
|
+
},
|
|
5414
5776
|
{
|
|
5415
5777
|
value: "6",
|
|
5416
|
-
label: "6"
|
|
5778
|
+
label: "Show the first 6"
|
|
5417
5779
|
},
|
|
5418
5780
|
{
|
|
5419
5781
|
value: "10",
|
|
5420
|
-
label: "10"
|
|
5782
|
+
label: "Show the first 10"
|
|
5421
5783
|
},
|
|
5422
5784
|
{
|
|
5423
5785
|
value: "12",
|
|
5424
|
-
label: "12"
|
|
5786
|
+
label: "Show the first 12"
|
|
5425
5787
|
},
|
|
5426
5788
|
{
|
|
5427
5789
|
value: "20",
|
|
5428
|
-
label: "20"
|
|
5790
|
+
label: "Show the first 20"
|
|
5429
5791
|
},
|
|
5430
5792
|
{
|
|
5431
5793
|
value: "24",
|
|
5432
|
-
label: "24"
|
|
5794
|
+
label: "Show the first 24"
|
|
5433
5795
|
},
|
|
5434
5796
|
{
|
|
5435
5797
|
value: "30",
|
|
5436
|
-
label: "30"
|
|
5798
|
+
label: "Show the first 30"
|
|
5437
5799
|
}
|
|
5438
5800
|
],
|
|
5439
5801
|
ui: {
|
|
@@ -5448,17 +5810,24 @@ const eventCalendarAdditionalFields = [
|
|
|
5448
5810
|
id: "paginationMode",
|
|
5449
5811
|
type: "select",
|
|
5450
5812
|
label: "More events",
|
|
5451
|
-
description: "How
|
|
5813
|
+
description: "How visitors can see the rest of your events.",
|
|
5452
5814
|
required: false,
|
|
5453
5815
|
multiple: false,
|
|
5454
5816
|
defaultValue: "loadMore",
|
|
5455
|
-
options: [
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5817
|
+
options: [
|
|
5818
|
+
{
|
|
5819
|
+
value: "none",
|
|
5820
|
+
label: "No link or button"
|
|
5821
|
+
},
|
|
5822
|
+
{
|
|
5823
|
+
value: "loadMore",
|
|
5824
|
+
label: "Load more button"
|
|
5825
|
+
},
|
|
5826
|
+
{
|
|
5827
|
+
value: "seeAllLink",
|
|
5828
|
+
label: "Link to another page"
|
|
5829
|
+
}
|
|
5830
|
+
],
|
|
5462
5831
|
ui: {
|
|
5463
5832
|
intent: "display",
|
|
5464
5833
|
visibleWhen: {
|
|
@@ -5470,25 +5839,27 @@ const eventCalendarAdditionalFields = [
|
|
|
5470
5839
|
{
|
|
5471
5840
|
id: "seeAllUrl",
|
|
5472
5841
|
type: "link",
|
|
5473
|
-
label: "
|
|
5842
|
+
label: "Link to the full list",
|
|
5474
5843
|
required: false,
|
|
5475
5844
|
ui: {
|
|
5476
5845
|
intent: "display",
|
|
5477
|
-
visibleWhen: {
|
|
5846
|
+
visibleWhen: { anyOf: [{ allOf: [{
|
|
5478
5847
|
field: "variant",
|
|
5479
|
-
oneOf: [
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5848
|
+
oneOf: ["combined", "list"]
|
|
5849
|
+
}, {
|
|
5850
|
+
field: "paginationMode",
|
|
5851
|
+
equals: "seeAllLink"
|
|
5852
|
+
}] }, {
|
|
5853
|
+
field: "variant",
|
|
5854
|
+
oneOf: ["week-board", "week"]
|
|
5855
|
+
}] }
|
|
5485
5856
|
}
|
|
5486
5857
|
},
|
|
5487
5858
|
{
|
|
5488
5859
|
id: "loadMoreText",
|
|
5489
5860
|
type: "text",
|
|
5490
|
-
label: "
|
|
5491
|
-
description: "
|
|
5861
|
+
label: "More events button text",
|
|
5862
|
+
description: "The text on the button or link that shows more events.",
|
|
5492
5863
|
required: false,
|
|
5493
5864
|
multiline: false,
|
|
5494
5865
|
defaultValue: "Load more events",
|
|
@@ -5499,7 +5870,8 @@ const eventCalendarAdditionalFields = [
|
|
|
5499
5870
|
oneOf: [
|
|
5500
5871
|
"combined",
|
|
5501
5872
|
"list",
|
|
5502
|
-
"week-board"
|
|
5873
|
+
"week-board",
|
|
5874
|
+
"week"
|
|
5503
5875
|
]
|
|
5504
5876
|
}
|
|
5505
5877
|
}
|
|
@@ -5535,15 +5907,15 @@ const eventCalendarAdditionalFields = [
|
|
|
5535
5907
|
{
|
|
5536
5908
|
id: "calendarTabViews",
|
|
5537
5909
|
type: "select",
|
|
5538
|
-
label: "Calendar
|
|
5539
|
-
description: "Which
|
|
5910
|
+
label: "Calendar views",
|
|
5911
|
+
description: "Which views visitors can switch between in the calendar.",
|
|
5540
5912
|
required: false,
|
|
5541
5913
|
multiple: false,
|
|
5542
5914
|
defaultValue: "both",
|
|
5543
5915
|
options: [
|
|
5544
5916
|
{
|
|
5545
5917
|
value: "both",
|
|
5546
|
-
label: "Month
|
|
5918
|
+
label: "Month and week"
|
|
5547
5919
|
},
|
|
5548
5920
|
{
|
|
5549
5921
|
value: "month",
|
|
@@ -5566,7 +5938,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5566
5938
|
id: "defaultCalendarView",
|
|
5567
5939
|
type: "select",
|
|
5568
5940
|
label: "Calendar view",
|
|
5569
|
-
description: "
|
|
5941
|
+
description: "Which view visitors see first.",
|
|
5570
5942
|
required: false,
|
|
5571
5943
|
multiple: false,
|
|
5572
5944
|
defaultValue: "month",
|
|
@@ -5595,7 +5967,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5595
5967
|
id: "showFilters",
|
|
5596
5968
|
type: "boolean",
|
|
5597
5969
|
label: "Show filters",
|
|
5598
|
-
description: "
|
|
5970
|
+
description: "Lets visitors filter by category, team member or venue.",
|
|
5599
5971
|
required: false,
|
|
5600
5972
|
defaultValue: true,
|
|
5601
5973
|
ui: {
|
|
@@ -5616,14 +5988,14 @@ const eventCalendarAdditionalFields = [
|
|
|
5616
5988
|
id: "showCategoryFilter",
|
|
5617
5989
|
type: "select",
|
|
5618
5990
|
label: "Show category filter",
|
|
5619
|
-
description: "When to show the category
|
|
5991
|
+
description: "When to show the category menu.",
|
|
5620
5992
|
required: false,
|
|
5621
5993
|
multiple: false,
|
|
5622
5994
|
defaultValue: "auto",
|
|
5623
5995
|
options: [
|
|
5624
5996
|
{
|
|
5625
5997
|
value: "auto",
|
|
5626
|
-
label: "
|
|
5998
|
+
label: "When more than one category has events"
|
|
5627
5999
|
},
|
|
5628
6000
|
{
|
|
5629
6001
|
value: "always",
|
|
@@ -5655,7 +6027,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5655
6027
|
id: "showVenueFilter",
|
|
5656
6028
|
type: "boolean",
|
|
5657
6029
|
label: "Show venue filter",
|
|
5658
|
-
description: "
|
|
6030
|
+
description: "Lets visitors pick a venue.",
|
|
5659
6031
|
required: false,
|
|
5660
6032
|
defaultValue: false,
|
|
5661
6033
|
ui: {
|
|
@@ -5678,8 +6050,8 @@ const eventCalendarAdditionalFields = [
|
|
|
5678
6050
|
{
|
|
5679
6051
|
id: "showStaffFilter",
|
|
5680
6052
|
type: "boolean",
|
|
5681
|
-
label: "Show
|
|
5682
|
-
description: "
|
|
6053
|
+
label: "Show team filter",
|
|
6054
|
+
description: "Lets visitors pick someone from your team.",
|
|
5683
6055
|
required: false,
|
|
5684
6056
|
defaultValue: true,
|
|
5685
6057
|
ui: {
|
|
@@ -5703,7 +6075,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5703
6075
|
id: "showCapacity",
|
|
5704
6076
|
type: "boolean",
|
|
5705
6077
|
label: "Show available places",
|
|
5706
|
-
description: "
|
|
6078
|
+
description: "Shows how many places are left on each event.",
|
|
5707
6079
|
required: false,
|
|
5708
6080
|
defaultValue: true,
|
|
5709
6081
|
ui: {
|
|
@@ -5729,7 +6101,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5729
6101
|
id: "boardTitle",
|
|
5730
6102
|
type: "text",
|
|
5731
6103
|
label: "Board title",
|
|
5732
|
-
description: "
|
|
6104
|
+
description: "An optional label along the top of the board.",
|
|
5733
6105
|
required: false,
|
|
5734
6106
|
multiline: false,
|
|
5735
6107
|
ui: {
|
|
@@ -5744,7 +6116,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5744
6116
|
id: "footerNote",
|
|
5745
6117
|
type: "text",
|
|
5746
6118
|
label: "Footer note",
|
|
5747
|
-
description: "
|
|
6119
|
+
description: "An optional note along the bottom of the board.",
|
|
5748
6120
|
required: false,
|
|
5749
6121
|
multiline: true,
|
|
5750
6122
|
ui: {
|
|
@@ -5774,7 +6146,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5774
6146
|
id: "banded",
|
|
5775
6147
|
type: "boolean",
|
|
5776
6148
|
label: "Section band",
|
|
5777
|
-
description: "
|
|
6149
|
+
description: "Puts the board on its own band of colour.",
|
|
5778
6150
|
required: false,
|
|
5779
6151
|
defaultValue: false,
|
|
5780
6152
|
ui: {
|
|
@@ -5817,8 +6189,8 @@ const eventCalendarAdditionalFields = [
|
|
|
5817
6189
|
{
|
|
5818
6190
|
id: "filterEventPresets",
|
|
5819
6191
|
type: "select",
|
|
5820
|
-
label: "
|
|
5821
|
-
description: "
|
|
6192
|
+
label: "Only show these event types",
|
|
6193
|
+
description: "Pick the types of event this block shows.",
|
|
5822
6194
|
required: false,
|
|
5823
6195
|
multiple: true,
|
|
5824
6196
|
defaultValue: [],
|
|
@@ -5855,23 +6227,23 @@ const eventCalendarAdditionalFields = [
|
|
|
5855
6227
|
{
|
|
5856
6228
|
id: "scheduleScope",
|
|
5857
6229
|
type: "select",
|
|
5858
|
-
label: "
|
|
5859
|
-
description: "
|
|
6230
|
+
label: "Regular or one-off",
|
|
6231
|
+
description: "Show regular events, one-off events or both.",
|
|
5860
6232
|
required: false,
|
|
5861
6233
|
multiple: false,
|
|
5862
6234
|
defaultValue: "any",
|
|
5863
6235
|
options: [
|
|
5864
6236
|
{
|
|
5865
6237
|
value: "any",
|
|
5866
|
-
label: "
|
|
6238
|
+
label: "Both"
|
|
5867
6239
|
},
|
|
5868
6240
|
{
|
|
5869
6241
|
value: "recurring",
|
|
5870
|
-
label: "
|
|
6242
|
+
label: "Regular events only"
|
|
5871
6243
|
},
|
|
5872
6244
|
{
|
|
5873
6245
|
value: "oneOff",
|
|
5874
|
-
label: "One-off only"
|
|
6246
|
+
label: "One-off events only"
|
|
5875
6247
|
}
|
|
5876
6248
|
],
|
|
5877
6249
|
ui: {
|
|
@@ -5884,8 +6256,8 @@ const eventCalendarAdditionalFields = [
|
|
|
5884
6256
|
},
|
|
5885
6257
|
createSiteOptionSelectField({
|
|
5886
6258
|
id: "filterCategoryIds",
|
|
5887
|
-
label: "
|
|
5888
|
-
description: "
|
|
6259
|
+
label: "Only show these categories",
|
|
6260
|
+
description: "Pick the categories this block shows.",
|
|
5889
6261
|
required: false,
|
|
5890
6262
|
multiple: true,
|
|
5891
6263
|
defaultValue: [],
|
|
@@ -5897,8 +6269,8 @@ const eventCalendarAdditionalFields = [
|
|
|
5897
6269
|
}),
|
|
5898
6270
|
createSiteOptionSelectField({
|
|
5899
6271
|
id: "filterStaffMemberId",
|
|
5900
|
-
label: "
|
|
5901
|
-
description: "
|
|
6272
|
+
label: "Only show one team member",
|
|
6273
|
+
description: "Pick someone from your team to show only their events.",
|
|
5902
6274
|
required: false,
|
|
5903
6275
|
multiple: false,
|
|
5904
6276
|
optionSource: "staffMembers",
|
|
@@ -5909,8 +6281,8 @@ const eventCalendarAdditionalFields = [
|
|
|
5909
6281
|
}),
|
|
5910
6282
|
createSiteOptionSelectField({
|
|
5911
6283
|
id: "filterVenueId",
|
|
5912
|
-
label: "
|
|
5913
|
-
description: "
|
|
6284
|
+
label: "Only show one venue",
|
|
6285
|
+
description: "Pick a venue to show only the events held there.",
|
|
5914
6286
|
required: false,
|
|
5915
6287
|
multiple: false,
|
|
5916
6288
|
optionSource: "venues",
|
|
@@ -5948,6 +6320,7 @@ const eventCalendarAdditionalFields = [
|
|
|
5948
6320
|
})
|
|
5949
6321
|
];
|
|
5950
6322
|
const eventCalendarVariants = {
|
|
6323
|
+
week: eventCalendarLayout[0],
|
|
5951
6324
|
combined: eventCalendarLayout[0],
|
|
5952
6325
|
calendar: eventCalendarLayout[0],
|
|
5953
6326
|
timetable: eventCalendarLayout[0],
|
|
@@ -5966,7 +6339,8 @@ const eventCalendarContentShape = {
|
|
|
5966
6339
|
{ value: "calendar" },
|
|
5967
6340
|
{ value: "timetable" },
|
|
5968
6341
|
{ value: "week-board" },
|
|
5969
|
-
{ value: "list" }
|
|
6342
|
+
{ value: "list" },
|
|
6343
|
+
{ value: "week" }
|
|
5970
6344
|
]
|
|
5971
6345
|
},
|
|
5972
6346
|
{
|
|
@@ -5987,57 +6361,121 @@ const eventCalendarContentShape = {
|
|
|
5987
6361
|
variants: eventCalendarVariants,
|
|
5988
6362
|
skipSectionStyles: true
|
|
5989
6363
|
};
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
calendar: { label: "Calendar" },
|
|
6036
|
-
timetable: { label: "Timetable" },
|
|
6037
|
-
"week-board": { label: "Week board" },
|
|
6038
|
-
list: { label: "List" }
|
|
6364
|
+
/** Week rows use their fixed recurring-series read, without occurrence filters. */
|
|
6365
|
+
function withCalendarModeVisibility(field) {
|
|
6366
|
+
const selected = withEventSelectionVisibility(field);
|
|
6367
|
+
if (field.id === "showVenue") return {
|
|
6368
|
+
...selected,
|
|
6369
|
+
ui: {
|
|
6370
|
+
...selected.ui,
|
|
6371
|
+
visibleWhen: {
|
|
6372
|
+
field: "variant",
|
|
6373
|
+
oneOf: [
|
|
6374
|
+
"week",
|
|
6375
|
+
"list",
|
|
6376
|
+
"combined"
|
|
6377
|
+
]
|
|
6378
|
+
}
|
|
6379
|
+
}
|
|
6380
|
+
};
|
|
6381
|
+
if (field.id === "seeAllButtonVariant") return {
|
|
6382
|
+
...selected,
|
|
6383
|
+
ui: {
|
|
6384
|
+
...selected.ui,
|
|
6385
|
+
visibleWhen: {
|
|
6386
|
+
field: "variant",
|
|
6387
|
+
equals: "week"
|
|
6388
|
+
}
|
|
6389
|
+
}
|
|
6390
|
+
};
|
|
6391
|
+
if (![
|
|
6392
|
+
"eventSelection",
|
|
6393
|
+
"selectedEventSeriesIds",
|
|
6394
|
+
"eventSurface",
|
|
6395
|
+
"filterEventPresets",
|
|
6396
|
+
"scheduleScope",
|
|
6397
|
+
"filterCategoryIds",
|
|
6398
|
+
"filterStaffMemberId",
|
|
6399
|
+
"filterVenueId"
|
|
6400
|
+
].includes(field.id)) return selected;
|
|
6401
|
+
return {
|
|
6402
|
+
...selected,
|
|
6403
|
+
ui: {
|
|
6404
|
+
...selected.ui,
|
|
6405
|
+
visibleWhen: { allOf: [{
|
|
6406
|
+
field: "variant",
|
|
6407
|
+
notEquals: "week"
|
|
6408
|
+
}, ...selected.ui?.visibleWhen ? [selected.ui.visibleWhen] : []] }
|
|
6039
6409
|
}
|
|
6040
|
-
}
|
|
6410
|
+
};
|
|
6411
|
+
}
|
|
6412
|
+
const generatedEventCalendarManifest = createBlockManifestWithContentShape({
|
|
6413
|
+
id: "block.event-calendar",
|
|
6414
|
+
promotedFields: [
|
|
6415
|
+
"variant",
|
|
6416
|
+
"listBy",
|
|
6417
|
+
"calendarTabViews",
|
|
6418
|
+
"defaultCalendarView",
|
|
6419
|
+
"eventSurface",
|
|
6420
|
+
"filterEventPresets",
|
|
6421
|
+
"scheduleScope",
|
|
6422
|
+
"eventsPerPage",
|
|
6423
|
+
"paginationMode",
|
|
6424
|
+
"seeAllUrl"
|
|
6425
|
+
],
|
|
6426
|
+
version: "3.6.0",
|
|
6427
|
+
title: "Event calendar",
|
|
6428
|
+
titleSource: "heading",
|
|
6429
|
+
description: "Your classes and events, as a list, a calendar or a weekly timetable.",
|
|
6430
|
+
skipSectionStyles: true,
|
|
6431
|
+
additionalFields: eventCalendarAdditionalFields.map(withCalendarModeVisibility),
|
|
6432
|
+
styleTokens: {
|
|
6433
|
+
background: "surface",
|
|
6434
|
+
typography: "body",
|
|
6435
|
+
spacing: "md"
|
|
6436
|
+
},
|
|
6437
|
+
behaviours: {
|
|
6438
|
+
supportsThemeSwitching: true,
|
|
6439
|
+
inlineEditing: false,
|
|
6440
|
+
animation: false,
|
|
6441
|
+
paletteHidden: false
|
|
6442
|
+
},
|
|
6443
|
+
category: "events-and-bookings",
|
|
6444
|
+
requiredFeatures: ["bookings.events"],
|
|
6445
|
+
contentSource: { kind: "entries" },
|
|
6446
|
+
tags: [
|
|
6447
|
+
"events",
|
|
6448
|
+
"calendar",
|
|
6449
|
+
"month",
|
|
6450
|
+
"week",
|
|
6451
|
+
"schedule",
|
|
6452
|
+
"interactive",
|
|
6453
|
+
"list",
|
|
6454
|
+
"filter"
|
|
6455
|
+
],
|
|
6456
|
+
icon: "CalendarDays",
|
|
6457
|
+
layout: eventCalendarLayout,
|
|
6458
|
+
variants: eventCalendarVariants,
|
|
6459
|
+
variantMeaning: eventCalendarVariantMeaning,
|
|
6460
|
+
defaultVariant: "combined",
|
|
6461
|
+
variantOptions: {
|
|
6462
|
+
week: { label: "Week" },
|
|
6463
|
+
combined: { label: "Combined" },
|
|
6464
|
+
calendar: { label: "Calendar" },
|
|
6465
|
+
timetable: { label: "Timetable" },
|
|
6466
|
+
"week-board": { label: "Week board" },
|
|
6467
|
+
list: { label: "List" }
|
|
6468
|
+
}
|
|
6469
|
+
}, eventCalendarContentShape);
|
|
6470
|
+
const eventCalendarBlockDefinition = {
|
|
6471
|
+
manifest: {
|
|
6472
|
+
...generatedEventCalendarManifest,
|
|
6473
|
+
fields: generatedEventCalendarManifest.fields?.map((field) => field.id === "variant" ? {
|
|
6474
|
+
...field,
|
|
6475
|
+
label: "Show events as",
|
|
6476
|
+
description: void 0
|
|
6477
|
+
} : field)
|
|
6478
|
+
},
|
|
6041
6479
|
contentNormalizer: {
|
|
6042
6480
|
fieldIds: [
|
|
6043
6481
|
"variant",
|
|
@@ -6054,6 +6492,7 @@ const eventCalendarBlockDefinition = {
|
|
|
6054
6492
|
normalize: normalizeEventCalendarContent
|
|
6055
6493
|
},
|
|
6056
6494
|
dataSchemas: {
|
|
6495
|
+
schedule: recurringScheduleProjectionSchema.optional(),
|
|
6057
6496
|
events: publicEventsArraySchema.optional(),
|
|
6058
6497
|
calendarWindow: calendarWindowPageSchema.optional()
|
|
6059
6498
|
},
|
|
@@ -6112,10 +6551,11 @@ const shopBlockDefinition = {
|
|
|
6112
6551
|
]
|
|
6113
6552
|
},
|
|
6114
6553
|
id: "block.shop",
|
|
6554
|
+
promotedFields: ["showPasses", "showMemberships"],
|
|
6115
6555
|
version: "1.0.0",
|
|
6116
|
-
title: "Passes &
|
|
6556
|
+
title: "Passes & memberships",
|
|
6117
6557
|
titleSource: "passesHeading",
|
|
6118
|
-
description: "
|
|
6558
|
+
description: "Your class passes and memberships, ready for people to buy.",
|
|
6119
6559
|
skipSectionStyles: true,
|
|
6120
6560
|
additionalFields: [
|
|
6121
6561
|
...cardListKnobFields,
|
|
@@ -6136,7 +6576,7 @@ const shopBlockDefinition = {
|
|
|
6136
6576
|
id: "showPasses",
|
|
6137
6577
|
type: "boolean",
|
|
6138
6578
|
label: "Show passes",
|
|
6139
|
-
description: "
|
|
6579
|
+
description: "Lets visitors buy your class passes.",
|
|
6140
6580
|
required: false,
|
|
6141
6581
|
defaultValue: true,
|
|
6142
6582
|
ui: { intent: "display" }
|
|
@@ -6145,7 +6585,7 @@ const shopBlockDefinition = {
|
|
|
6145
6585
|
id: "showMemberships",
|
|
6146
6586
|
type: "boolean",
|
|
6147
6587
|
label: "Show memberships",
|
|
6148
|
-
description: "
|
|
6588
|
+
description: "Lets visitors buy your memberships.",
|
|
6149
6589
|
required: false,
|
|
6150
6590
|
defaultValue: true,
|
|
6151
6591
|
ui: { intent: "display" }
|
|
@@ -6154,7 +6594,7 @@ const shopBlockDefinition = {
|
|
|
6154
6594
|
id: "layout",
|
|
6155
6595
|
type: "select",
|
|
6156
6596
|
label: "Layout",
|
|
6157
|
-
description: "How
|
|
6597
|
+
description: "How the passes and memberships are laid out.",
|
|
6158
6598
|
required: false,
|
|
6159
6599
|
multiple: false,
|
|
6160
6600
|
defaultValue: "grid",
|
|
@@ -6206,7 +6646,7 @@ const shopBlockDefinition = {
|
|
|
6206
6646
|
id: "showDescriptions",
|
|
6207
6647
|
type: "boolean",
|
|
6208
6648
|
label: "Show descriptions",
|
|
6209
|
-
description: "
|
|
6649
|
+
description: "Shows the description under each one.",
|
|
6210
6650
|
required: false,
|
|
6211
6651
|
defaultValue: true,
|
|
6212
6652
|
ui: { intent: "display" }
|
|
@@ -6215,7 +6655,7 @@ const shopBlockDefinition = {
|
|
|
6215
6655
|
id: "showValidityPeriod",
|
|
6216
6656
|
type: "boolean",
|
|
6217
6657
|
label: "Show validity period",
|
|
6218
|
-
description: "
|
|
6658
|
+
description: "Shows how long each pass lasts, like 'Valid for 30 days'.",
|
|
6219
6659
|
required: false,
|
|
6220
6660
|
defaultValue: true,
|
|
6221
6661
|
ui: { intent: "display" }
|
|
@@ -6224,21 +6664,21 @@ const shopBlockDefinition = {
|
|
|
6224
6664
|
id: "showPricePerCredit",
|
|
6225
6665
|
type: "boolean",
|
|
6226
6666
|
label: "Show price per credit",
|
|
6227
|
-
description: "
|
|
6667
|
+
description: "Shows what each credit works out at, for passes and packs.",
|
|
6228
6668
|
required: false,
|
|
6229
6669
|
defaultValue: true,
|
|
6230
6670
|
ui: { intent: "display" }
|
|
6231
6671
|
},
|
|
6232
6672
|
createButtonVariantField({
|
|
6233
|
-
label: "
|
|
6234
|
-
description: "
|
|
6673
|
+
label: "Button style",
|
|
6674
|
+
description: "The style of the buy buttons.",
|
|
6235
6675
|
defaultValue: "primary"
|
|
6236
6676
|
}),
|
|
6237
6677
|
{
|
|
6238
6678
|
id: "passesHeading",
|
|
6239
6679
|
type: "text",
|
|
6240
|
-
label: "
|
|
6241
|
-
description: "
|
|
6680
|
+
label: "Passes heading",
|
|
6681
|
+
description: "An optional heading above your passes.",
|
|
6242
6682
|
required: false,
|
|
6243
6683
|
multiline: false,
|
|
6244
6684
|
defaultValue: "",
|
|
@@ -6258,7 +6698,7 @@ const shopBlockDefinition = {
|
|
|
6258
6698
|
id: "buyButtonText",
|
|
6259
6699
|
type: "text",
|
|
6260
6700
|
label: "Pass button text",
|
|
6261
|
-
description: "
|
|
6701
|
+
description: "The text on the button to buy a pass.",
|
|
6262
6702
|
required: false,
|
|
6263
6703
|
multiline: false,
|
|
6264
6704
|
defaultValue: "Add to cart",
|
|
@@ -6267,8 +6707,8 @@ const shopBlockDefinition = {
|
|
|
6267
6707
|
{
|
|
6268
6708
|
id: "passPurchaseMode",
|
|
6269
6709
|
type: "select",
|
|
6270
|
-
label: "
|
|
6271
|
-
description: "
|
|
6710
|
+
label: "When someone buys a pass",
|
|
6711
|
+
description: "Add the pass to their cart, or take them straight to checkout.",
|
|
6272
6712
|
required: false,
|
|
6273
6713
|
multiple: false,
|
|
6274
6714
|
defaultValue: "add_to_cart",
|
|
@@ -6294,8 +6734,8 @@ const shopBlockDefinition = {
|
|
|
6294
6734
|
{
|
|
6295
6735
|
id: "emptyStateText",
|
|
6296
6736
|
type: "text",
|
|
6297
|
-
label: "
|
|
6298
|
-
description: "
|
|
6737
|
+
label: "If there's nothing to show",
|
|
6738
|
+
description: "What visitors see when there's nothing for sale.",
|
|
6299
6739
|
required: false,
|
|
6300
6740
|
multiline: false,
|
|
6301
6741
|
defaultValue: "No products available at this time.",
|
|
@@ -6317,7 +6757,7 @@ const shopBlockDefinition = {
|
|
|
6317
6757
|
animation: false,
|
|
6318
6758
|
paletteHidden: false
|
|
6319
6759
|
},
|
|
6320
|
-
category: "
|
|
6760
|
+
category: "shop",
|
|
6321
6761
|
contentSource: { kind: "entries" },
|
|
6322
6762
|
tags: [
|
|
6323
6763
|
"shop",
|
|
@@ -6430,9 +6870,9 @@ const productListBlockDefinition = {
|
|
|
6430
6870
|
variantMeaning: { kind: "arrangement" },
|
|
6431
6871
|
id: "block.product-list",
|
|
6432
6872
|
version: "1.0.0",
|
|
6433
|
-
title: "Product
|
|
6873
|
+
title: "Product list",
|
|
6434
6874
|
titleSource: "heading",
|
|
6435
|
-
description: "
|
|
6875
|
+
description: "Your products, each with a button to add it to the cart.",
|
|
6436
6876
|
skipSectionStyles: true,
|
|
6437
6877
|
additionalFields: [
|
|
6438
6878
|
{
|
|
@@ -6513,7 +6953,7 @@ const productListBlockDefinition = {
|
|
|
6513
6953
|
{
|
|
6514
6954
|
id: "emptyStateText",
|
|
6515
6955
|
type: "text",
|
|
6516
|
-
label: "
|
|
6956
|
+
label: "If there's nothing to show",
|
|
6517
6957
|
multiline: false,
|
|
6518
6958
|
required: false,
|
|
6519
6959
|
defaultValue: "No products available right now."
|
|
@@ -6534,7 +6974,8 @@ const productListBlockDefinition = {
|
|
|
6534
6974
|
animation: false,
|
|
6535
6975
|
paletteHidden: false
|
|
6536
6976
|
},
|
|
6537
|
-
category: "
|
|
6977
|
+
category: "shop",
|
|
6978
|
+
requiredFeatures: ["shop"],
|
|
6538
6979
|
contentSource: { kind: "entries" },
|
|
6539
6980
|
tags: [
|
|
6540
6981
|
"shop",
|
|
@@ -6607,10 +7048,11 @@ const productDetailBlockDefinition = {
|
|
|
6607
7048
|
manifest: createBlockManifest({
|
|
6608
7049
|
variantMeaning: { kind: "arrangement" },
|
|
6609
7050
|
id: "block.product-detail",
|
|
7051
|
+
promotedFields: ["productSlug"],
|
|
6610
7052
|
version: "1.0.0",
|
|
6611
|
-
title: "Product
|
|
7053
|
+
title: "Product detail",
|
|
6612
7054
|
titleSource: "heading",
|
|
6613
|
-
description: "
|
|
7055
|
+
description: "One product with its photos and an add-to-cart button.",
|
|
6614
7056
|
skipSectionStyles: true,
|
|
6615
7057
|
additionalFields: [
|
|
6616
7058
|
{
|
|
@@ -6626,7 +7068,7 @@ const productDetailBlockDefinition = {
|
|
|
6626
7068
|
type: "text",
|
|
6627
7069
|
label: "Product slug",
|
|
6628
7070
|
multiline: false,
|
|
6629
|
-
description: "
|
|
7071
|
+
description: "Only needed if this block isn't on a product page. Use the last part of the product's web address.",
|
|
6630
7072
|
required: false,
|
|
6631
7073
|
ui: { intent: "behavior" }
|
|
6632
7074
|
},
|
|
@@ -6641,7 +7083,7 @@ const productDetailBlockDefinition = {
|
|
|
6641
7083
|
{
|
|
6642
7084
|
id: "showBody",
|
|
6643
7085
|
type: "boolean",
|
|
6644
|
-
label: "Show
|
|
7086
|
+
label: "Show full description",
|
|
6645
7087
|
required: false,
|
|
6646
7088
|
defaultValue: true,
|
|
6647
7089
|
ui: { intent: "display" }
|
|
@@ -6657,7 +7099,7 @@ const productDetailBlockDefinition = {
|
|
|
6657
7099
|
{
|
|
6658
7100
|
id: "emptyStateText",
|
|
6659
7101
|
type: "text",
|
|
6660
|
-
label: "
|
|
7102
|
+
label: "If there's nothing to show",
|
|
6661
7103
|
multiline: false,
|
|
6662
7104
|
required: false,
|
|
6663
7105
|
defaultValue: "Product unavailable."
|
|
@@ -6678,7 +7120,8 @@ const productDetailBlockDefinition = {
|
|
|
6678
7120
|
animation: false,
|
|
6679
7121
|
paletteHidden: false
|
|
6680
7122
|
},
|
|
6681
|
-
category: "
|
|
7123
|
+
category: "shop",
|
|
7124
|
+
requiredFeatures: ["shop"],
|
|
6682
7125
|
contentSource: { kind: "entries" },
|
|
6683
7126
|
tags: [
|
|
6684
7127
|
"shop",
|
|
@@ -6717,6 +7160,10 @@ const productDetailBlockDefinition = {
|
|
|
6717
7160
|
from: "content.emptyStateText",
|
|
6718
7161
|
fallback: "Product unavailable."
|
|
6719
7162
|
} },
|
|
7163
|
+
template: { $bind: {
|
|
7164
|
+
from: "$root.template",
|
|
7165
|
+
fallback: { kind: "page" }
|
|
7166
|
+
} },
|
|
6720
7167
|
contentEntry: { $bind: {
|
|
6721
7168
|
from: "$root.contentEntry",
|
|
6722
7169
|
fallback: null
|
|
@@ -6725,6 +7172,7 @@ const productDetailBlockDefinition = {
|
|
|
6725
7172
|
}))], { gap: "lg" })
|
|
6726
7173
|
})]
|
|
6727
7174
|
}),
|
|
7175
|
+
readiness: productReadiness,
|
|
6728
7176
|
runtime: productDetailBlockRuntime,
|
|
6729
7177
|
dataSchemas: { products: publicProductsResponseSchema.optional() },
|
|
6730
7178
|
dataLoaders: { products: {
|
|
@@ -6746,7 +7194,7 @@ const cartBlockDefinition = {
|
|
|
6746
7194
|
version: "1.0.0",
|
|
6747
7195
|
title: "Cart",
|
|
6748
7196
|
titleSource: "heading",
|
|
6749
|
-
description: "
|
|
7197
|
+
description: "Shows what a visitor has in their cart.",
|
|
6750
7198
|
skipSectionStyles: true,
|
|
6751
7199
|
additionalFields: [
|
|
6752
7200
|
{
|
|
@@ -6760,7 +7208,7 @@ const cartBlockDefinition = {
|
|
|
6760
7208
|
{
|
|
6761
7209
|
id: "emptyStateText",
|
|
6762
7210
|
type: "text",
|
|
6763
|
-
label: "
|
|
7211
|
+
label: "If there's nothing to show",
|
|
6764
7212
|
multiline: false,
|
|
6765
7213
|
required: false,
|
|
6766
7214
|
defaultValue: "Your cart is empty."
|
|
@@ -6797,7 +7245,8 @@ const cartBlockDefinition = {
|
|
|
6797
7245
|
animation: false,
|
|
6798
7246
|
paletteHidden: false
|
|
6799
7247
|
},
|
|
6800
|
-
category: "
|
|
7248
|
+
category: "shop",
|
|
7249
|
+
requiredFeatures: ["shop"],
|
|
6801
7250
|
contentSource: { kind: "inline" },
|
|
6802
7251
|
tags: [
|
|
6803
7252
|
"shop",
|
|
@@ -6839,7 +7288,7 @@ const checkoutBlockDefinition = {
|
|
|
6839
7288
|
version: "1.0.0",
|
|
6840
7289
|
title: "Checkout",
|
|
6841
7290
|
titleSource: "heading",
|
|
6842
|
-
description: "
|
|
7291
|
+
description: "Where visitors enter their details and pay for what's in their cart.",
|
|
6843
7292
|
skipSectionStyles: true,
|
|
6844
7293
|
additionalFields: [
|
|
6845
7294
|
{
|
|
@@ -6861,7 +7310,7 @@ const checkoutBlockDefinition = {
|
|
|
6861
7310
|
{
|
|
6862
7311
|
id: "emptyStateText",
|
|
6863
7312
|
type: "text",
|
|
6864
|
-
label: "
|
|
7313
|
+
label: "If there's nothing to show",
|
|
6865
7314
|
multiline: false,
|
|
6866
7315
|
required: false,
|
|
6867
7316
|
defaultValue: "Add something to your cart to continue."
|
|
@@ -6882,7 +7331,8 @@ const checkoutBlockDefinition = {
|
|
|
6882
7331
|
animation: false,
|
|
6883
7332
|
paletteHidden: false
|
|
6884
7333
|
},
|
|
6885
|
-
category: "
|
|
7334
|
+
category: "shop",
|
|
7335
|
+
requiredFeatures: ["shop"],
|
|
6886
7336
|
contentSource: { kind: "inline" },
|
|
6887
7337
|
tags: [
|
|
6888
7338
|
"shop",
|
|
@@ -6924,7 +7374,7 @@ const giftingBlockDefinition = {
|
|
|
6924
7374
|
version: "1.0.0",
|
|
6925
7375
|
title: "Gift cards & vouchers",
|
|
6926
7376
|
titleSource: "heading",
|
|
6927
|
-
description: "
|
|
7377
|
+
description: "Lets people buy gift cards and vouchers for someone else.",
|
|
6928
7378
|
skipSectionStyles: true,
|
|
6929
7379
|
additionalFields: [
|
|
6930
7380
|
{
|
|
@@ -6962,7 +7412,7 @@ const giftingBlockDefinition = {
|
|
|
6962
7412
|
{
|
|
6963
7413
|
id: "emptyStateText",
|
|
6964
7414
|
type: "text",
|
|
6965
|
-
label: "
|
|
7415
|
+
label: "If there's nothing to show",
|
|
6966
7416
|
required: false,
|
|
6967
7417
|
multiline: false,
|
|
6968
7418
|
defaultValue: "Nothing is available right now."
|
|
@@ -6999,7 +7449,7 @@ const giftingBlockDefinition = {
|
|
|
6999
7449
|
animation: false,
|
|
7000
7450
|
paletteHidden: false
|
|
7001
7451
|
},
|
|
7002
|
-
category: "
|
|
7452
|
+
category: "shop",
|
|
7003
7453
|
contentSource: { kind: "entries" },
|
|
7004
7454
|
tags: [
|
|
7005
7455
|
"gifting",
|
|
@@ -7105,10 +7555,16 @@ const archLayout = styledSection({
|
|
|
7105
7555
|
});
|
|
7106
7556
|
const newsletterSignupManifest = createBlockManifest({
|
|
7107
7557
|
id: "block.newsletter-signup",
|
|
7108
|
-
|
|
7558
|
+
sourceLine: {
|
|
7559
|
+
text: "",
|
|
7560
|
+
target: "mailing-lists"
|
|
7561
|
+
},
|
|
7562
|
+
promotedFields: ["targeting"],
|
|
7563
|
+
title: "Newsletter signup",
|
|
7109
7564
|
titleSource: "title",
|
|
7110
|
-
description: "
|
|
7111
|
-
category: "
|
|
7565
|
+
description: "Lets people join one of your mailing lists.",
|
|
7566
|
+
category: "forms-and-sign-ups",
|
|
7567
|
+
requiredFeatures: ["newsletter"],
|
|
7112
7568
|
contentSource: { kind: "inline" },
|
|
7113
7569
|
fragments: [{
|
|
7114
7570
|
fragment: newsletterCopyFragment,
|
|
@@ -7183,6 +7639,7 @@ function sanitizeNewsletterSignupPublicContent(content) {
|
|
|
7183
7639
|
}
|
|
7184
7640
|
const newsletterSignupBlockDefinition = {
|
|
7185
7641
|
manifest: newsletterSignupManifest,
|
|
7642
|
+
readiness: newsletterReadiness,
|
|
7186
7643
|
contentNormalizer: {
|
|
7187
7644
|
fieldIds: ["targeting"],
|
|
7188
7645
|
normalize: normalizeMailingListBlockContent
|
|
@@ -7190,6 +7647,147 @@ const newsletterSignupBlockDefinition = {
|
|
|
7190
7647
|
runtime: newsletterFormBlockRuntime
|
|
7191
7648
|
};
|
|
7192
7649
|
//#endregion
|
|
7650
|
+
//#region ../blocks/src/system/runtime/nodes/location-map.shared.ts
|
|
7651
|
+
const LOCATION_MAP_DEFAULTS = {
|
|
7652
|
+
zoom: 15,
|
|
7653
|
+
heightPx: 320,
|
|
7654
|
+
showAddressText: true,
|
|
7655
|
+
showDirections: true,
|
|
7656
|
+
directionsLabel: "Get directions"
|
|
7657
|
+
};
|
|
7658
|
+
const LOCATION_MAP_LIMITS = {
|
|
7659
|
+
zoom: {
|
|
7660
|
+
min: 3,
|
|
7661
|
+
max: 18
|
|
7662
|
+
},
|
|
7663
|
+
heightPx: {
|
|
7664
|
+
min: 200,
|
|
7665
|
+
max: 600
|
|
7666
|
+
}
|
|
7667
|
+
};
|
|
7668
|
+
function normalizeNumber(value, fallback) {
|
|
7669
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
7670
|
+
if (typeof value === "string") {
|
|
7671
|
+
const parsed = Number.parseFloat(value);
|
|
7672
|
+
if (Number.isFinite(parsed)) return parsed;
|
|
7673
|
+
}
|
|
7674
|
+
return fallback;
|
|
7675
|
+
}
|
|
7676
|
+
function normalizeBoolean$1(value, fallback) {
|
|
7677
|
+
if (typeof value === "boolean") return value;
|
|
7678
|
+
if (typeof value === "string") {
|
|
7679
|
+
if (value === "true") return true;
|
|
7680
|
+
if (value === "false") return false;
|
|
7681
|
+
}
|
|
7682
|
+
return fallback;
|
|
7683
|
+
}
|
|
7684
|
+
function normalizeLocationMapValue(value, siteCountry) {
|
|
7685
|
+
if (typeof value !== "object" || value === null) return null;
|
|
7686
|
+
const projected = readLocationMapProjection(value, siteCountry);
|
|
7687
|
+
return projected === null ? null : {
|
|
7688
|
+
addressText: projected.displayAddress,
|
|
7689
|
+
...projected.pin ?? {
|
|
7690
|
+
lat: null,
|
|
7691
|
+
lng: null
|
|
7692
|
+
},
|
|
7693
|
+
drawing: projected.drawing,
|
|
7694
|
+
doorNote: projected.doorNote
|
|
7695
|
+
};
|
|
7696
|
+
}
|
|
7697
|
+
function normalizeLocationMapSource(value) {
|
|
7698
|
+
return value === "business_address" || value === "venue" ? value : "custom";
|
|
7699
|
+
}
|
|
7700
|
+
function resolveLocationMapLocation(input) {
|
|
7701
|
+
const source = normalizeLocationMapSource(input.locationSource);
|
|
7702
|
+
if (source === "business_address") {
|
|
7703
|
+
const locationValue = normalizeLocationMapValue(input.businessAddress, input.siteCountry);
|
|
7704
|
+
return locationValue ? {
|
|
7705
|
+
kind: "business_address",
|
|
7706
|
+
locationValue
|
|
7707
|
+
} : {
|
|
7708
|
+
kind: "unresolved",
|
|
7709
|
+
source,
|
|
7710
|
+
reason: "missing_business_address"
|
|
7711
|
+
};
|
|
7712
|
+
}
|
|
7713
|
+
if (source === "venue") {
|
|
7714
|
+
const venueId = typeof input.venueId === "string" && input.venueId.trim() ? input.venueId.trim() : null;
|
|
7715
|
+
if (!venueId) return {
|
|
7716
|
+
kind: "unresolved",
|
|
7717
|
+
source,
|
|
7718
|
+
reason: "missing_venue_id"
|
|
7719
|
+
};
|
|
7720
|
+
const locationValue = input.venuesById ? normalizeLocationMapValue(input.venuesById[venueId] ?? null, input.siteCountry) : null;
|
|
7721
|
+
return locationValue ? {
|
|
7722
|
+
kind: "venue",
|
|
7723
|
+
venueId,
|
|
7724
|
+
locationValue
|
|
7725
|
+
} : {
|
|
7726
|
+
kind: "unresolved",
|
|
7727
|
+
source,
|
|
7728
|
+
reason: "missing_venue_location"
|
|
7729
|
+
};
|
|
7730
|
+
}
|
|
7731
|
+
const locationValue = normalizeLocationMapValue(input.location, input.siteCountry);
|
|
7732
|
+
return locationValue ? {
|
|
7733
|
+
kind: "custom",
|
|
7734
|
+
locationValue
|
|
7735
|
+
} : {
|
|
7736
|
+
kind: "unresolved",
|
|
7737
|
+
source,
|
|
7738
|
+
reason: "missing_custom_location"
|
|
7739
|
+
};
|
|
7740
|
+
}
|
|
7741
|
+
function describeUnresolvedLocationMapLocation(resolvedLocation) {
|
|
7742
|
+
if (resolvedLocation.kind !== "unresolved") return null;
|
|
7743
|
+
switch (resolvedLocation.reason) {
|
|
7744
|
+
case "missing_business_address": return "Business address details are not configured yet.";
|
|
7745
|
+
case "missing_venue_id": return "Choose a venue to show this map.";
|
|
7746
|
+
case "missing_venue_location": return "The selected venue does not have location details yet.";
|
|
7747
|
+
case "missing_custom_location": return "Location details coming soon.";
|
|
7748
|
+
}
|
|
7749
|
+
}
|
|
7750
|
+
function normalizeLocationMapProps(input) {
|
|
7751
|
+
const parsedHours = parseWeeklyOpeningHours(input.openingHours);
|
|
7752
|
+
const resolvedLocation = resolveLocationMapLocation(input);
|
|
7753
|
+
const locationValue = resolvedLocation.kind === "unresolved" ? null : resolvedLocation.locationValue;
|
|
7754
|
+
const directionsLabel = normalizeLocationAddressText(input.directionsLabel) ?? LOCATION_MAP_DEFAULTS.directionsLabel;
|
|
7755
|
+
return {
|
|
7756
|
+
...locationMapDetails(locationValue),
|
|
7757
|
+
wider: input.wider === true,
|
|
7758
|
+
googleMapsLabel: normalizedGoogleMapsLabel(input.googleMapsLabel),
|
|
7759
|
+
resolvedLocation,
|
|
7760
|
+
locationValue,
|
|
7761
|
+
unresolvedMessage: describeUnresolvedLocationMapLocation(resolvedLocation),
|
|
7762
|
+
zoom: Math.min(LOCATION_MAP_LIMITS.zoom.max, Math.max(LOCATION_MAP_LIMITS.zoom.min, Math.round(normalizeNumber(input.zoom, LOCATION_MAP_DEFAULTS.zoom)))),
|
|
7763
|
+
heightPx: Math.min(LOCATION_MAP_LIMITS.heightPx.max, Math.max(LOCATION_MAP_LIMITS.heightPx.min, Math.round(normalizeNumber(input.heightPx, LOCATION_MAP_DEFAULTS.heightPx)))),
|
|
7764
|
+
openingHours: parsedHours.ok ? parsedHours.value : null,
|
|
7765
|
+
showOpeningHours: normalizeBoolean$1(input.showOpeningHours, true),
|
|
7766
|
+
showAddressText: normalizeBoolean$1(input.showAddressText, LOCATION_MAP_DEFAULTS.showAddressText),
|
|
7767
|
+
showDirections: normalizeBoolean$1(input.showDirections, LOCATION_MAP_DEFAULTS.showDirections),
|
|
7768
|
+
directionsLabel,
|
|
7769
|
+
className: typeof input.className === "string" ? input.className : null
|
|
7770
|
+
};
|
|
7771
|
+
}
|
|
7772
|
+
/** All render-ready permitted details come from the same resolved source value. */
|
|
7773
|
+
function locationMapDetails(value) {
|
|
7774
|
+
return {
|
|
7775
|
+
drawing: value?.drawing ?? null,
|
|
7776
|
+
doorNote: value?.doorNote ?? null,
|
|
7777
|
+
addressText: value?.addressText ?? null,
|
|
7778
|
+
location: toLocationCoordinates(value)
|
|
7779
|
+
};
|
|
7780
|
+
}
|
|
7781
|
+
function normalizedGoogleMapsLabel(value) {
|
|
7782
|
+
return normalizeLocationAddressText(value) ?? "Open in Google Maps";
|
|
7783
|
+
}
|
|
7784
|
+
function readLocationMapProjection(value, siteCountry) {
|
|
7785
|
+
const canonical = parseLocationValue(value);
|
|
7786
|
+
if (canonical.ok && canonical.value !== null) return projectPublicLocation(canonical.value, siteCountry);
|
|
7787
|
+
const projected = publicLocationSchema$1.safeParse(value);
|
|
7788
|
+
return projected.success ? projected.data : null;
|
|
7789
|
+
}
|
|
7790
|
+
//#endregion
|
|
7193
7791
|
//#region ../blocks/src/primitives/layout/Section.tsx
|
|
7194
7792
|
const Section = forwardRef(function Section({ as: Comp = "section", children, background, className = "", style, "data-slot": dataSlot, "data-arrangement": dataArrangement, "data-surface": dataSurface }, ref) {
|
|
7195
7793
|
return /* @__PURE__ */ jsx(Comp, {
|
|
@@ -7263,222 +7861,6 @@ const OrderedListNode = (props) => /* @__PURE__ */ jsx("ol", { ...props });
|
|
|
7263
7861
|
const ListItemNode = (props) => /* @__PURE__ */ jsx("li", { ...props });
|
|
7264
7862
|
const FigcaptionNode = (props) => /* @__PURE__ */ jsx("figcaption", { ...props });
|
|
7265
7863
|
//#endregion
|
|
7266
|
-
//#region ../path-utils/src/index.ts
|
|
7267
|
-
const PATH_SEPARATOR_REGEX = /\./g;
|
|
7268
|
-
const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
|
|
7269
|
-
/**
|
|
7270
|
-
* Segments that would traverse or mutate the prototype chain.
|
|
7271
|
-
*
|
|
7272
|
-
* `setAtPath` creates nested objects along the path, so allowing these
|
|
7273
|
-
* segments is a prototype-pollution vector. They are rejected everywhere a
|
|
7274
|
-
* path is parsed (string or pre-parsed array form) — fail closed.
|
|
7275
|
-
*/
|
|
7276
|
-
const UNSAFE_PATH_SEGMENTS = /* @__PURE__ */ new Set([
|
|
7277
|
-
"__proto__",
|
|
7278
|
-
"constructor",
|
|
7279
|
-
"prototype"
|
|
7280
|
-
]);
|
|
7281
|
-
var UnsafePathSegmentError = class extends Error {
|
|
7282
|
-
constructor(segment) {
|
|
7283
|
-
super(`Unsafe path segment: "${segment}"`);
|
|
7284
|
-
this.name = "UnsafePathSegmentError";
|
|
7285
|
-
this.segment = segment;
|
|
7286
|
-
}
|
|
7287
|
-
};
|
|
7288
|
-
function assertSafePathSegments(segments) {
|
|
7289
|
-
for (const segment of segments) if (typeof segment === "string" && UNSAFE_PATH_SEGMENTS.has(segment)) throw new UnsafePathSegmentError(segment);
|
|
7290
|
-
}
|
|
7291
|
-
function isRecord(value) {
|
|
7292
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7293
|
-
}
|
|
7294
|
-
function isPathContainer(value) {
|
|
7295
|
-
return Array.isArray(value) || isRecord(value);
|
|
7296
|
-
}
|
|
7297
|
-
function getContainerValue(container, segment) {
|
|
7298
|
-
if (typeof segment === "number") return Array.isArray(container) ? container[segment] : void 0;
|
|
7299
|
-
if (segment in container) return Reflect.get(container, segment);
|
|
7300
|
-
}
|
|
7301
|
-
function parsePath(path) {
|
|
7302
|
-
if (Array.isArray(path)) {
|
|
7303
|
-
assertSafePathSegments(path);
|
|
7304
|
-
return path;
|
|
7305
|
-
}
|
|
7306
|
-
const segments = [];
|
|
7307
|
-
const parts = path.split(PATH_SEPARATOR_REGEX);
|
|
7308
|
-
for (const raw of parts) {
|
|
7309
|
-
if (!raw) continue;
|
|
7310
|
-
const baseMatch = raw.match(/^[^\[]+/);
|
|
7311
|
-
if (baseMatch !== null) {
|
|
7312
|
-
const base = baseMatch[1] ?? baseMatch[0];
|
|
7313
|
-
if (/^\d+$/.test(base)) segments.push(Number(base));
|
|
7314
|
-
else segments.push(base);
|
|
7315
|
-
}
|
|
7316
|
-
const bracketMatches = raw.matchAll(BRACKET_ACCESS_REGEX);
|
|
7317
|
-
for (const match of bracketMatches) {
|
|
7318
|
-
const token = match[1] ?? "";
|
|
7319
|
-
if (token.startsWith("\"") || token.startsWith("'")) segments.push(token.slice(1, -1));
|
|
7320
|
-
else if (/^\d+$/.test(token)) segments.push(Number(token));
|
|
7321
|
-
else segments.push(token);
|
|
7322
|
-
}
|
|
7323
|
-
if (baseMatch === null && !raw.includes("[")) segments.push(raw);
|
|
7324
|
-
}
|
|
7325
|
-
assertSafePathSegments(segments);
|
|
7326
|
-
return segments;
|
|
7327
|
-
}
|
|
7328
|
-
function getAtPath(source, path) {
|
|
7329
|
-
return parsePath(path).reduce((current, segment) => {
|
|
7330
|
-
if (current === void 0 || current === null) return void 0;
|
|
7331
|
-
if (!isPathContainer(current)) return void 0;
|
|
7332
|
-
return getContainerValue(current, segment);
|
|
7333
|
-
}, source);
|
|
7334
|
-
}
|
|
7335
|
-
//#endregion
|
|
7336
|
-
//#region ../blocks/src/primitives/content/components/Text.tsx
|
|
7337
|
-
function Text({ as: Comp = "span", children, className = "", path, style, "data-slot": dataSlot, "data-surface": dataSurface, maxLength: _maxLength }) {
|
|
7338
|
-
return /* @__PURE__ */ jsx(Comp, {
|
|
7339
|
-
"data-slot": dataSlot,
|
|
7340
|
-
"data-surface": dataSurface,
|
|
7341
|
-
style: dataSlot === void 0 ? void 0 : style,
|
|
7342
|
-
className,
|
|
7343
|
-
...path ? { "data-builder-text": path } : void 0,
|
|
7344
|
-
children
|
|
7345
|
-
});
|
|
7346
|
-
}
|
|
7347
|
-
//#endregion
|
|
7348
|
-
//#region ../blocks/src/system/runtime/nodes/renderInlineText.tsx
|
|
7349
|
-
function renderInlineText(value) {
|
|
7350
|
-
return value.map((run, index) => renderRun(run, index));
|
|
7351
|
-
}
|
|
7352
|
-
function renderRun(run, key) {
|
|
7353
|
-
return (run.marks ?? []).reduceRight((child, mark, index) => renderMark(mark, `${String(key)}-${index}`, child), run.text);
|
|
7354
|
-
}
|
|
7355
|
-
function renderMark(mark, key, child) {
|
|
7356
|
-
switch (mark.kind) {
|
|
7357
|
-
case "strong": return /* @__PURE__ */ jsx("strong", { children: child }, key);
|
|
7358
|
-
case "emphasis": return /* @__PURE__ */ jsx("em", { children: child }, key);
|
|
7359
|
-
case "accent": return /* @__PURE__ */ jsx("span", {
|
|
7360
|
-
className: `rb-inline-text-accent rb-inline-text-accent-${mark.tone}`,
|
|
7361
|
-
children: child
|
|
7362
|
-
}, key);
|
|
7363
|
-
case "highlight": return /* @__PURE__ */ jsx("span", {
|
|
7364
|
-
className: `rb-inline-text-highlight rb-inline-text-highlight-${mark.tone}`,
|
|
7365
|
-
children: child
|
|
7366
|
-
}, key);
|
|
7367
|
-
}
|
|
7368
|
-
}
|
|
7369
|
-
//#endregion
|
|
7370
|
-
//#region ../blocks/src/system/runtime/nodes/basic.tsx
|
|
7371
|
-
const TextNode = ({ value, children, blockContent, inlineTextFallbackPath, ...rest }) => {
|
|
7372
|
-
const inlineText = parseInlineTextFromUnknown(value);
|
|
7373
|
-
if (inlineText.ok && !isInlineTextEmpty(inlineText.value)) return /* @__PURE__ */ jsx(Text, {
|
|
7374
|
-
...rest,
|
|
7375
|
-
children: renderInlineText(inlineText.value)
|
|
7376
|
-
});
|
|
7377
|
-
const fallbackValue = inlineTextFallbackPath ? readStringPath(blockContent, inlineTextFallbackPath) : null;
|
|
7378
|
-
return /* @__PURE__ */ jsx(Text, {
|
|
7379
|
-
...rest,
|
|
7380
|
-
children: fallbackValue ?? textNodeContent(value) ?? children
|
|
7381
|
-
});
|
|
7382
|
-
};
|
|
7383
|
-
function textNodeContent(value) {
|
|
7384
|
-
if (value === null || value === void 0) return null;
|
|
7385
|
-
if (typeof value === "string" || typeof value === "number") return value;
|
|
7386
|
-
return null;
|
|
7387
|
-
}
|
|
7388
|
-
function readStringPath(source, path) {
|
|
7389
|
-
const value = getAtPath(source, path);
|
|
7390
|
-
return typeof value === "string" ? value : null;
|
|
7391
|
-
}
|
|
7392
|
-
const RichTextNode = ({ value, blockKind, ...rest }) => {
|
|
7393
|
-
return /* @__PURE__ */ jsx(RichText, {
|
|
7394
|
-
doc: coerceRichTextDoc(value, `block-runtime:${blockKind ?? "unknown"}:${rest.path ?? "richText"}`) ?? void 0,
|
|
7395
|
-
...rest
|
|
7396
|
-
});
|
|
7397
|
-
};
|
|
7398
|
-
function isMissingRequiredLink(linkRequired, resolvedHref) {
|
|
7399
|
-
return linkRequired && resolvedHref.length === 0;
|
|
7400
|
-
}
|
|
7401
|
-
function authoredButtonDecision(props) {
|
|
7402
|
-
const content = props.value ?? props.children;
|
|
7403
|
-
if (!content) return { kind: "empty" };
|
|
7404
|
-
const href = typeof props.href === "string" ? props.href.trim() : "";
|
|
7405
|
-
if (isMissingRequiredLink(props.linkRequired ?? false, href)) return { kind: "missing-link" };
|
|
7406
|
-
const variant = parseThemeButtonVariantId(props.variantId ?? "primary");
|
|
7407
|
-
if (props.variantId && !variant) return { kind: "invalid-variant" };
|
|
7408
|
-
return {
|
|
7409
|
-
kind: "ready",
|
|
7410
|
-
content,
|
|
7411
|
-
href,
|
|
7412
|
-
variant
|
|
7413
|
-
};
|
|
7414
|
-
}
|
|
7415
|
-
const ButtonNode = (props) => {
|
|
7416
|
-
const decision = authoredButtonDecision(props);
|
|
7417
|
-
switch (decision.kind) {
|
|
7418
|
-
case "empty":
|
|
7419
|
-
console.warn("[ButtonNode] No content to render - value and children are both empty");
|
|
7420
|
-
return null;
|
|
7421
|
-
case "missing-link":
|
|
7422
|
-
console.warn("[ButtonNode] Missing href for link-required button");
|
|
7423
|
-
return null;
|
|
7424
|
-
case "invalid-variant":
|
|
7425
|
-
console.error("[ButtonNode] Invalid button variant", { variantId: props.variantId });
|
|
7426
|
-
return null;
|
|
7427
|
-
case "ready": return /* @__PURE__ */ jsx(AuthoredButtonContent, {
|
|
7428
|
-
props,
|
|
7429
|
-
decision
|
|
7430
|
-
});
|
|
7431
|
-
}
|
|
7432
|
-
};
|
|
7433
|
-
function AuthoredButtonContent({ props, decision }) {
|
|
7434
|
-
if (props.actionStyle === "link" && decision.href && !props.disabled) return /* @__PURE__ */ jsx("a", {
|
|
7435
|
-
href: decision.href,
|
|
7436
|
-
target: props.target,
|
|
7437
|
-
rel: props.rel,
|
|
7438
|
-
onClick: props.onClick,
|
|
7439
|
-
className: `rb-item-text-link btn-${props.size ?? "md"}`,
|
|
7440
|
-
"aria-label": props["aria-label"],
|
|
7441
|
-
"data-testid": props["data-testid"],
|
|
7442
|
-
children: decision.content
|
|
7443
|
-
});
|
|
7444
|
-
return /* @__PURE__ */ jsx(ThemedAuthoredButton, {
|
|
7445
|
-
label: decision.content,
|
|
7446
|
-
href: decision.href || void 0,
|
|
7447
|
-
target: props.target,
|
|
7448
|
-
rel: props.rel,
|
|
7449
|
-
variant: decision.variant,
|
|
7450
|
-
size: props.size ?? "md",
|
|
7451
|
-
disabled: props.disabled,
|
|
7452
|
-
type: props.type ?? "button",
|
|
7453
|
-
trailingIcon: props.trailingIcon,
|
|
7454
|
-
onClick: props.onClick,
|
|
7455
|
-
extraClassName: props.className,
|
|
7456
|
-
ariaLabel: props["aria-label"],
|
|
7457
|
-
dataTestId: props["data-testid"]
|
|
7458
|
-
});
|
|
7459
|
-
}
|
|
7460
|
-
const LinkNode = ({ href, children, className, target, rel, linkRequired = false, ...rest }) => {
|
|
7461
|
-
if (!children) return null;
|
|
7462
|
-
const resolvedHref = typeof href === "string" ? href.trim() : "";
|
|
7463
|
-
if (resolvedHref.length === 0) {
|
|
7464
|
-
if (linkRequired && true) console.warn("[LinkNode] Missing href for link-required link");
|
|
7465
|
-
if (linkRequired) return null;
|
|
7466
|
-
return /* @__PURE__ */ jsx("span", {
|
|
7467
|
-
className,
|
|
7468
|
-
...rest,
|
|
7469
|
-
children
|
|
7470
|
-
});
|
|
7471
|
-
}
|
|
7472
|
-
return /* @__PURE__ */ jsx("a", {
|
|
7473
|
-
href: resolvedHref,
|
|
7474
|
-
className,
|
|
7475
|
-
target,
|
|
7476
|
-
rel,
|
|
7477
|
-
...rest,
|
|
7478
|
-
children
|
|
7479
|
-
});
|
|
7480
|
-
};
|
|
7481
|
-
//#endregion
|
|
7482
7864
|
//#region ../blocks/src/system/runtime/nodes/icon.tsx
|
|
7483
7865
|
const IconNode = ({ value, title, className, blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...rest }) => {
|
|
7484
7866
|
const parsedValue = parseBlockIconValue(value);
|
|
@@ -7877,7 +8259,7 @@ function getIslandRootProps(kind, id) {
|
|
|
7877
8259
|
return resolved;
|
|
7878
8260
|
}
|
|
7879
8261
|
function serializeIslandProps(value) {
|
|
7880
|
-
return JSON.stringify(value).replace(/</g, "\\u003c");
|
|
8262
|
+
return JSON.stringify(serializeSurfaceTree(value)).replace(/</g, "\\u003c");
|
|
7881
8263
|
}
|
|
7882
8264
|
function IslandPropsScript({ value }) {
|
|
7883
8265
|
return /* @__PURE__ */ jsx("script", {
|
|
@@ -8214,103 +8596,6 @@ function HeaderControlNode({ className, children, "aria-label": label, "aria-exp
|
|
|
8214
8596
|
});
|
|
8215
8597
|
}
|
|
8216
8598
|
//#endregion
|
|
8217
|
-
//#region ../blocks/src/system/runtime/nodes/svg.tsx
|
|
8218
|
-
/**
|
|
8219
|
-
* Strict SVG-`transform` validator.
|
|
8220
|
-
*
|
|
8221
|
-
* Accepts only a whitespace/comma-separated list of the geometric transform
|
|
8222
|
-
* functions (`translate`/`rotate`/`scale`/`skewX`/`skewY`/`matrix`) whose
|
|
8223
|
-
* arguments are plain numbers. This deliberately rejects anything else —
|
|
8224
|
-
* `url(...)`, CSS functions, `javascript:`, angle/length units, stray letters —
|
|
8225
|
-
* so a persisted custom-block tree can't smuggle an executable or exfiltrating
|
|
8226
|
-
* value into the attribute.
|
|
8227
|
-
*/
|
|
8228
|
-
const TRANSFORM_NUMBER = String.raw`-?(?:\d+\.?\d*|\.\d+)(?:e-?\d+)?`;
|
|
8229
|
-
const TRANSFORM_ARGS = String.raw`${TRANSFORM_NUMBER}(?:[\s,]+${TRANSFORM_NUMBER})*`;
|
|
8230
|
-
const TRANSFORM_FN = String.raw`(?:translate|rotate|scale|skewX|skewY|matrix)\(\s*${TRANSFORM_ARGS}\s*\)`;
|
|
8231
|
-
const SAFE_TRANSFORM_RE = new RegExp(String.raw`^\s*${TRANSFORM_FN}(?:[\s,]*${TRANSFORM_FN})*\s*$`);
|
|
8232
|
-
function safeTransform(value) {
|
|
8233
|
-
if (typeof value !== "string") return void 0;
|
|
8234
|
-
const trimmed = value.trim();
|
|
8235
|
-
if (trimmed.length === 0) return void 0;
|
|
8236
|
-
return SAFE_TRANSFORM_RE.test(trimmed) ? trimmed : void 0;
|
|
8237
|
-
}
|
|
8238
|
-
/**
|
|
8239
|
-
* Turn paint props into a CSS style object. Colour values pass through as-is so
|
|
8240
|
-
* they may reference theme tokens via `var()`, which only resolves in a CSS
|
|
8241
|
-
* property context (not in a bare presentation attribute).
|
|
8242
|
-
*/
|
|
8243
|
-
function paintStyle(shape) {
|
|
8244
|
-
const style = {};
|
|
8245
|
-
if (shape.fill !== void 0) style.fill = shape.fill;
|
|
8246
|
-
if (shape.stroke !== void 0) style.stroke = shape.stroke;
|
|
8247
|
-
if (shape.strokeWidth !== void 0) style.strokeWidth = shape.strokeWidth;
|
|
8248
|
-
if (shape.fillOpacity !== void 0) style.fillOpacity = shape.fillOpacity;
|
|
8249
|
-
if (shape.strokeOpacity !== void 0) style.strokeOpacity = shape.strokeOpacity;
|
|
8250
|
-
if (shape.strokeLinecap !== void 0) style.strokeLinecap = shape.strokeLinecap;
|
|
8251
|
-
if (shape.strokeLinejoin !== void 0) style.strokeLinejoin = shape.strokeLinejoin;
|
|
8252
|
-
if (shape.strokeDasharray !== void 0) style.strokeDasharray = shape.strokeDasharray;
|
|
8253
|
-
return style;
|
|
8254
|
-
}
|
|
8255
|
-
function renderShape(shape, key) {
|
|
8256
|
-
const style = paintStyle(shape);
|
|
8257
|
-
const transform = safeTransform(shape.transform);
|
|
8258
|
-
switch (shape.kind) {
|
|
8259
|
-
case "path": return /* @__PURE__ */ jsx("path", {
|
|
8260
|
-
d: shape.d,
|
|
8261
|
-
style,
|
|
8262
|
-
transform
|
|
8263
|
-
}, key);
|
|
8264
|
-
case "ellipse": return /* @__PURE__ */ jsx("ellipse", {
|
|
8265
|
-
cx: shape.cx,
|
|
8266
|
-
cy: shape.cy,
|
|
8267
|
-
rx: shape.rx,
|
|
8268
|
-
ry: shape.ry,
|
|
8269
|
-
style,
|
|
8270
|
-
transform
|
|
8271
|
-
}, key);
|
|
8272
|
-
case "circle": return /* @__PURE__ */ jsx("circle", {
|
|
8273
|
-
cx: shape.cx,
|
|
8274
|
-
cy: shape.cy,
|
|
8275
|
-
r: shape.r,
|
|
8276
|
-
style,
|
|
8277
|
-
transform
|
|
8278
|
-
}, key);
|
|
8279
|
-
case "rect": return /* @__PURE__ */ jsx("rect", {
|
|
8280
|
-
x: shape.x,
|
|
8281
|
-
y: shape.y,
|
|
8282
|
-
width: shape.width,
|
|
8283
|
-
height: shape.height,
|
|
8284
|
-
rx: shape.rx,
|
|
8285
|
-
ry: shape.ry,
|
|
8286
|
-
style,
|
|
8287
|
-
transform
|
|
8288
|
-
}, key);
|
|
8289
|
-
case "line": return /* @__PURE__ */ jsx("line", {
|
|
8290
|
-
x1: shape.x1,
|
|
8291
|
-
y1: shape.y1,
|
|
8292
|
-
x2: shape.x2,
|
|
8293
|
-
y2: shape.y2,
|
|
8294
|
-
style,
|
|
8295
|
-
transform
|
|
8296
|
-
}, key);
|
|
8297
|
-
default: return null;
|
|
8298
|
-
}
|
|
8299
|
-
}
|
|
8300
|
-
const SvgNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, viewBox, width, height, className, style, ariaHidden = true, shapes }) => {
|
|
8301
|
-
return /* @__PURE__ */ jsx("svg", {
|
|
8302
|
-
viewBox,
|
|
8303
|
-
width,
|
|
8304
|
-
height,
|
|
8305
|
-
className,
|
|
8306
|
-
style,
|
|
8307
|
-
"aria-hidden": ariaHidden,
|
|
8308
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
8309
|
-
fill: "none",
|
|
8310
|
-
children: (Array.isArray(shapes) ? shapes : []).map((shape, index) => renderShape(shape, index))
|
|
8311
|
-
});
|
|
8312
|
-
};
|
|
8313
|
-
//#endregion
|
|
8314
8599
|
//#region ../blocks/src/system/runtime/nodes/appointment-services.tsx
|
|
8315
8600
|
const publicVenueSchema = z.object({
|
|
8316
8601
|
name: z.string(),
|
|
@@ -8760,7 +9045,7 @@ function teamMemberCardContent(member, index, biographySource) {
|
|
|
8760
9045
|
}
|
|
8761
9046
|
function TeamMembersNode(props) {
|
|
8762
9047
|
const parsed = z.array(teamMemberCardSchema).safeParse(props.source === "site_staff" ? props.siteMembers : props.members);
|
|
8763
|
-
if (!parsed.success
|
|
9048
|
+
if (!parsed.success) return null;
|
|
8764
9049
|
return /* @__PURE__ */ jsx(CardListItems, {
|
|
8765
9050
|
Carousel: props.Carousel,
|
|
8766
9051
|
items: parsed.data.map((member, index) => teamMemberCardContent(member, index, props.biographySource)),
|
|
@@ -8859,22 +9144,6 @@ function BookingFormSSR({ blockId, children, ...sourceProps }) {
|
|
|
8859
9144
|
}
|
|
8860
9145
|
//#endregion
|
|
8861
9146
|
//#region ../blocks/src/system/runtime/nodes/event-details.server.tsx
|
|
8862
|
-
function ServerVenueMap({ venueName, className, height }) {
|
|
8863
|
-
return /* @__PURE__ */ jsx("div", {
|
|
8864
|
-
className: "event-details-map-wrap rb-w-full rb-ml-auto",
|
|
8865
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
8866
|
-
className,
|
|
8867
|
-
style: {
|
|
8868
|
-
height: height ?? 200,
|
|
8869
|
-
width: "100%",
|
|
8870
|
-
borderRadius: "0.5rem",
|
|
8871
|
-
overflow: "hidden",
|
|
8872
|
-
backgroundColor: "rgb(var(--tb-surface))"
|
|
8873
|
-
},
|
|
8874
|
-
"aria-label": `Map showing ${venueName}`
|
|
8875
|
-
})
|
|
8876
|
-
});
|
|
8877
|
-
}
|
|
8878
9147
|
function EventDetailsHydration({ props, presentation, scopedEvents, subject, nowIso }) {
|
|
8879
9148
|
return /* @__PURE__ */ jsx(IslandPropsScript, { value: {
|
|
8880
9149
|
...props.arrangement ? {
|
|
@@ -8934,8 +9203,7 @@ function EventDetailsSSR(props) {
|
|
|
8934
9203
|
}),
|
|
8935
9204
|
/* @__PURE__ */ jsx(EventDetailsView, {
|
|
8936
9205
|
...presentation,
|
|
8937
|
-
mapClassName: "venue-map event-details-map"
|
|
8938
|
-
renderVenueMap: ServerVenueMap
|
|
9206
|
+
mapClassName: "venue-map event-details-map"
|
|
8939
9207
|
}),
|
|
8940
9208
|
children
|
|
8941
9209
|
]
|
|
@@ -8943,32 +9211,32 @@ function EventDetailsSSR(props) {
|
|
|
8943
9211
|
}
|
|
8944
9212
|
//#endregion
|
|
8945
9213
|
//#region ../blocks/src/system/runtime/nodes/location-map.server.tsx
|
|
9214
|
+
const lookPresentationSchema = z.object({
|
|
9215
|
+
lookSlots: lookListPresentationSchemaShape.lookSlots,
|
|
9216
|
+
itemSurfaces: lookListPresentationSchemaShape.itemSurfaces
|
|
9217
|
+
});
|
|
8946
9218
|
function LocationMapSSR(props) {
|
|
8947
9219
|
const normalized = normalizeLocationMapProps(props);
|
|
8948
|
-
|
|
9220
|
+
if (normalized.resolvedLocation.kind === "unresolved") return null;
|
|
8949
9221
|
return /* @__PURE__ */ jsxs("div", {
|
|
8950
9222
|
className: `location-map ${normalized.className ?? ""}`.trim(),
|
|
8951
9223
|
"data-block": "location-map",
|
|
8952
|
-
|
|
8953
|
-
children: [
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
"aria-label": addressText ? `Map showing ${addressText}` : "Map showing business location"
|
|
8967
|
-
})
|
|
8968
|
-
}),
|
|
8969
|
-
props.children
|
|
8970
|
-
]
|
|
9224
|
+
style: props.mapStyle ?? void 0,
|
|
9225
|
+
children: [/* @__PURE__ */ jsx(LocationMapView, {
|
|
9226
|
+
...normalized,
|
|
9227
|
+
showMap: props.showMap !== false,
|
|
9228
|
+
lookLayout: props.lookSlots != null,
|
|
9229
|
+
detailsSlot: lookDetailsSlot(props)
|
|
9230
|
+
}), props.children]
|
|
9231
|
+
});
|
|
9232
|
+
}
|
|
9233
|
+
/** Legacy and automatic-Look markup carries no slot; Look-only layouts mark the details as the panel. */
|
|
9234
|
+
function lookDetailsSlot(props) {
|
|
9235
|
+
const presentation = lookPresentationSchema.safeParse({
|
|
9236
|
+
lookSlots: props.lookSlots ?? void 0,
|
|
9237
|
+
itemSurfaces: props.itemSurfaces ?? void 0
|
|
8971
9238
|
});
|
|
9239
|
+
return presentation.success ? listLookSlot(presentation.data, "panel") : {};
|
|
8972
9240
|
}
|
|
8973
9241
|
//#endregion
|
|
8974
9242
|
//#region ../blocks/src/system/runtime/nodes/events/EventSpotlight.tsx
|
|
@@ -9035,6 +9303,7 @@ function renderEventListItem(event, source) {
|
|
|
9035
9303
|
lookSlots: display.lookSlots,
|
|
9036
9304
|
itemSurfaces: display.itemSurfaces,
|
|
9037
9305
|
showCapacity: display.showCapacity,
|
|
9306
|
+
showVenue: display.showVenue,
|
|
9038
9307
|
buttonVariant: display.buttonVariant,
|
|
9039
9308
|
buttonText: display.buttonText
|
|
9040
9309
|
}, event.occurrenceId || event.id);
|
|
@@ -10028,108 +10297,6 @@ function WeeklySlotAvailabilitySSR(props) {
|
|
|
10028
10297
|
return /* @__PURE__ */ jsx(WeeklySlotAvailabilityView, { ...props });
|
|
10029
10298
|
}
|
|
10030
10299
|
//#endregion
|
|
10031
|
-
//#region ../blocks/src/system/runtime/nodes/events/RecurringSchedule.tsx
|
|
10032
|
-
function destinationHref(destination) {
|
|
10033
|
-
return destination.kind === "external" ? destination.url : destination.path;
|
|
10034
|
-
}
|
|
10035
|
-
function bookingLinkProps(booking) {
|
|
10036
|
-
return booking.destination.kind === "external" ? {
|
|
10037
|
-
href: destinationHref(booking.destination),
|
|
10038
|
-
target: "_blank",
|
|
10039
|
-
rel: "noopener noreferrer"
|
|
10040
|
-
} : { href: destinationHref(booking.destination) };
|
|
10041
|
-
}
|
|
10042
|
-
function bookingActionContent(input) {
|
|
10043
|
-
switch (input.booking.kind) {
|
|
10044
|
-
case "available": return /* @__PURE__ */ jsx(ButtonNode, {
|
|
10045
|
-
...bookingLinkProps(input.booking),
|
|
10046
|
-
"aria-label": input.accessibleName,
|
|
10047
|
-
className: "recurring-schedule-book",
|
|
10048
|
-
linkRequired: true,
|
|
10049
|
-
variantId: input.buttonVariant,
|
|
10050
|
-
size: "sm",
|
|
10051
|
-
children: input.buttonText
|
|
10052
|
-
});
|
|
10053
|
-
case "unavailable": return null;
|
|
10054
|
-
default: return assertNever$1(input.booking);
|
|
10055
|
-
}
|
|
10056
|
-
}
|
|
10057
|
-
function RecurringSchedule({ dateContext = resolveDateRuntimeContext(void 0), schedule, buttonText = "Book", buttonVariant = "primary", showVenue = true, emptyMessage = "Regular schedule details will be added shortly." }) {
|
|
10058
|
-
const projection = schedule ?? {
|
|
10059
|
-
items: [],
|
|
10060
|
-
diagnostics: []
|
|
10061
|
-
};
|
|
10062
|
-
if (projection.items.length === 0) return /* @__PURE__ */ jsx("p", {
|
|
10063
|
-
className: "recurring-schedule-empty",
|
|
10064
|
-
"data-diagnostic-count": projection.diagnostics.length,
|
|
10065
|
-
children: emptyMessage
|
|
10066
|
-
});
|
|
10067
|
-
return /* @__PURE__ */ jsx("div", {
|
|
10068
|
-
className: "recurring-schedule",
|
|
10069
|
-
"data-diagnostic-count": projection.diagnostics.length,
|
|
10070
|
-
role: "list",
|
|
10071
|
-
children: projection.items.map((item) => /* @__PURE__ */ jsx(RecurringScheduleRow, {
|
|
10072
|
-
item,
|
|
10073
|
-
locale: dateContext.locale,
|
|
10074
|
-
buttonText: buttonText ?? "Book",
|
|
10075
|
-
buttonVariant: buttonVariant ?? "primary",
|
|
10076
|
-
showVenue: showVenue ?? true
|
|
10077
|
-
}, item.seriesId))
|
|
10078
|
-
});
|
|
10079
|
-
}
|
|
10080
|
-
function RecurringScheduleRow({ item, locale, buttonText, buttonVariant, showVenue }) {
|
|
10081
|
-
const startLabel = formatEventClockLabel(item.cadence.startTime, locale);
|
|
10082
|
-
const endLabel = formatEventClockLabel(item.cadence.endTime, locale);
|
|
10083
|
-
const description = `${item.title}, ${item.cadence.weekday} at ${startLabel}`;
|
|
10084
|
-
return /* @__PURE__ */ jsxs("article", {
|
|
10085
|
-
className: "recurring-schedule-row",
|
|
10086
|
-
role: "listitem",
|
|
10087
|
-
"aria-label": description,
|
|
10088
|
-
children: [
|
|
10089
|
-
/* @__PURE__ */ jsx("p", {
|
|
10090
|
-
className: "recurring-schedule-day",
|
|
10091
|
-
children: item.cadence.weekday
|
|
10092
|
-
}),
|
|
10093
|
-
/* @__PURE__ */ jsxs("p", {
|
|
10094
|
-
className: "recurring-schedule-time",
|
|
10095
|
-
children: [
|
|
10096
|
-
/* @__PURE__ */ jsx("time", {
|
|
10097
|
-
dateTime: item.cadence.startTime,
|
|
10098
|
-
children: startLabel
|
|
10099
|
-
}),
|
|
10100
|
-
/* @__PURE__ */ jsx("span", {
|
|
10101
|
-
"aria-hidden": "true",
|
|
10102
|
-
children: "–"
|
|
10103
|
-
}),
|
|
10104
|
-
/* @__PURE__ */ jsx("time", {
|
|
10105
|
-
dateTime: item.cadence.endTime,
|
|
10106
|
-
children: endLabel
|
|
10107
|
-
})
|
|
10108
|
-
]
|
|
10109
|
-
}),
|
|
10110
|
-
/* @__PURE__ */ jsxs("div", {
|
|
10111
|
-
className: "recurring-schedule-details",
|
|
10112
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
10113
|
-
className: "recurring-schedule-title",
|
|
10114
|
-
children: item.title
|
|
10115
|
-
}), showVenue && item.venueName ? /* @__PURE__ */ jsx("p", {
|
|
10116
|
-
className: "recurring-schedule-venue",
|
|
10117
|
-
children: item.venueName
|
|
10118
|
-
}) : null]
|
|
10119
|
-
}),
|
|
10120
|
-
/* @__PURE__ */ jsx("div", {
|
|
10121
|
-
className: "recurring-schedule-action",
|
|
10122
|
-
children: bookingActionContent({
|
|
10123
|
-
booking: item.booking,
|
|
10124
|
-
buttonVariant,
|
|
10125
|
-
buttonText,
|
|
10126
|
-
accessibleName: `${buttonText} ${description}`
|
|
10127
|
-
})
|
|
10128
|
-
})
|
|
10129
|
-
]
|
|
10130
|
-
});
|
|
10131
|
-
}
|
|
10132
|
-
//#endregion
|
|
10133
10300
|
//#region ../blocks/src/system/runtime/nodes/shop-commerce.server.tsx
|
|
10134
10301
|
function renderServerPendingAction(label, soldOut) {
|
|
10135
10302
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ThemedButton, {
|
|
@@ -10692,32 +10859,22 @@ function hourToTickPercent(hour, hours) {
|
|
|
10692
10859
|
const range = Math.max(1, endHour - startHour);
|
|
10693
10860
|
return (hour - startHour) / range * 100;
|
|
10694
10861
|
}
|
|
10695
|
-
|
|
10696
|
-
const islandProps = buildEventCalendarInteractiveIslandProps(props);
|
|
10697
|
-
const display = islandProps.render.display;
|
|
10698
|
-
const hydration = islandProps.render.hydration;
|
|
10699
|
-
let content;
|
|
10862
|
+
function renderEventCalendarMode(display, hydration) {
|
|
10700
10863
|
switch (display.displayMode) {
|
|
10701
|
-
case "
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
case "
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
content = renderTimetableSsr(display, hydration);
|
|
10709
|
-
break;
|
|
10710
|
-
case "week-board":
|
|
10711
|
-
content = renderWeekBoardSsr(display, hydration);
|
|
10712
|
-
break;
|
|
10713
|
-
case "calendar":
|
|
10714
|
-
content = renderCalendarSsr(display, hydration);
|
|
10715
|
-
break;
|
|
10716
|
-
default: content = assertNeverDisplayMode(display.displayMode);
|
|
10864
|
+
case "week": return /* @__PURE__ */ jsx(CalendarRecurringWeek, { display });
|
|
10865
|
+
case "combined": return renderCombinedSsr(display, hydration.prefetchedEvents);
|
|
10866
|
+
case "list": return renderListSsr(display, hydration);
|
|
10867
|
+
case "timetable": return renderTimetableSsr(display, hydration);
|
|
10868
|
+
case "week-board": return renderWeekBoardSsr(display, hydration);
|
|
10869
|
+
case "calendar": return renderCalendarSsr(display, hydration);
|
|
10870
|
+
default: return assertNeverDisplayMode(display.displayMode);
|
|
10717
10871
|
}
|
|
10872
|
+
}
|
|
10873
|
+
const EventCalendarSSR = (props) => {
|
|
10874
|
+
const islandProps = buildEventCalendarInteractiveIslandProps(props);
|
|
10718
10875
|
return /* @__PURE__ */ jsxs("div", {
|
|
10719
10876
|
...getIslandRootProps("event-calendar", props.blockId),
|
|
10720
|
-
children: [/* @__PURE__ */ jsx(IslandPropsScript, { value: islandProps }),
|
|
10877
|
+
children: [/* @__PURE__ */ jsx(IslandPropsScript, { value: islandProps }), renderEventCalendarMode(islandProps.render.display, islandProps.render.hydration)]
|
|
10721
10878
|
});
|
|
10722
10879
|
};
|
|
10723
10880
|
//#endregion
|
|
@@ -11173,4 +11330,4 @@ const serverComponentRegistry = {
|
|
|
11173
11330
|
...buildServerRegistryFromEntries(runtimeBackedBlockServerEntries)
|
|
11174
11331
|
};
|
|
11175
11332
|
//#endregion
|
|
11176
|
-
export {
|
|
11333
|
+
export { defineFragment as $, parseFieldDefinition as $t, eventRegistrationBlockDefinition as A, lookQuoteLimitTransform as At, markEditableSurfaceForwarding as B, admitReadinessFacts as Bt, cartBlockDefinition as C, sectionStylesField as Cn, section as Ct, eventCalendarBlockDefinition as D, createButtonVariantField as Dn, when as Dt, shopBlockDefinition as E, createButtonGroup as En, videoEmbed as Et, cardListPhotoNumberFields as F, augmentManifest as Ft, formBlockDefinition as G, PUBLIC_FILE_FIELD_KINDS as Gt, desktopOnlyDisplay as H, pageTemplateFromEntry as Ht, cardListPresentationBindings as I, chosenString as It, formEmbedFragment as J, builtInBlockKindsSchema as Jt, formDataSchema as K, blockCategoryEnum as Kt, cardListSectionActionFields as L, galleryReadiness as Lt, FEATURE_CARD_ICON_TREATMENTS as M, lookSlot as Mt, cardListSectionAction as N, parseBlockIconValue as Nt, eventListingBlockDefinition as O, lookCarouselRegionTransform as Ot, cardListKnobFields as P, PUBLIC_DOWNLOAD_MEDIA_TYPES as Pt, composeFragments as Q, normalizeSelectSource as Qt, normalizeCardListContent as R, teamReadiness as Rt, checkoutBlockDefinition as S, containerStylesField as Sn, richText as St, productListBlockDefinition as T, getAnchorClasses as Tn, text as Tt, mobileOnlyDisplay as U, unavailableReadinessFact as Ut, splitPositioningClasses as V, loadedReadinessFact as Vt, normalizeMailingListBlockContent as W, DEFAULT_MEDIA_FIELD_KINDS as Wt, formCopyFragment as X, createSiteOptionSelectField as Xt, withApiBindings as Y, createSdkSelectField as Yt, buildFragmentDataLoaders as Z, fieldSchema as Zt, normalizeLocationMapSource as _, columnsField as _n, inline as _t, buildLoadedOfferingsPreviewListing as a, projectRepeaterGridLayoutForRendering as an, sectionContainer as at, sanitizeNewsletterSignupPublicContent as b, layoutField as bn, props as bt, HeaderSectionFrame as c, resolveRepeaterGridColumnFieldId as cn, bind as ct, accordionIconColorStyle as d, resolveRepeaterGridSpanFieldId as dn, carousel as dt, parseFieldDefinitions as en, sectionHeaderFields as et, resolveAccordionIconStyle as f, NodeSchema as fn, el as ft, normalizeLocationMapProps as g, cardStylingFields as gn, icon as gt, LOCATION_MAP_LIMITS as h, linkSchema as hn, headerSection as ht, WeeklySlotAvailabilityView as i, projectRepeaterGridLayout as in, styledContainer as it, FEATURE_CARD_GENERATED_ICON_SIZE_PX as j, lookSkinSlotTransform as jt, mapDrawingStyleBinding as k, lookLeadSlotTransform as kt, accordionItemPartSlots as l, resolveRepeaterGridColumnsForBreakpoint as ln, bookingForm as lt, LOCATION_MAP_DEFAULTS as m, RESOLVED_INTERNAL_LINK_ENTITY_TYPES as mn, form as mt, runtimeBackedBlockModes as n, sdkBlockPresentationShape as nn, resolveBackgroundColorValue as nt, LocationMapSSR as o, buildRepeaterGridLayout as on, backgroundFrame as ot, SectionNode as p, bindingSchema as pn, fileDownload as pt, createBlockManifest as q, blockSectionDeclarationShape as qt, runtimeBackedBlockServerEntries as r, validateSdkBlockDeclaration as rn, styledSection as rt, buildAppointmentServicesView as s, parseRepeaterGridInteger as sn, accordionList as st, serverComponentRegistry as t, validateManifestLookField as tn, sectionHeaderLayoutNodes as tt, accordionLookAttributes as u, resolveRepeaterGridRowFieldId as un, button as ut, resolveLocationMapLocation as v, emptyStateField as vn, link as vt, productDetailBlockDefinition as w, BACKGROUND_POSITION_PRESET_VALUES as wn, stack as wt, giftingBlockDefinition as x, cardStylesField as xn, repeat as xt, newsletterSignupBlockDefinition as y, eventDisplayFields as yn, media as yt, composeHeaderSectionWrapperClassName as z, testimonialsReadiness as zt };
|