@riverbankcms/sdk 0.174.1 → 0.176.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/{BlocksIslandsHydrator-YRmc-Yxz.d.ts → BlocksIslandsHydrator-DvoTk7Py.d.ts} +1 -1
- package/dist/_dts/{Page-Du0zX1B-.d.ts → Page-D-l374tU.d.ts} +8 -16
- package/dist/_dts/{SdkPreviewMode-4L8v3FkY.d.ts → SdkPreviewMode-22DdQAj5.d.ts} +2 -2
- package/dist/_dts/{client-B1J6Akyf.d.ts → client-D4p0J1lK.d.ts} +487 -11
- package/dist/_dts/{content-types-CGGYI0u_.d.ts → content-types-0WWR6dC4.d.ts} +2 -2
- package/dist/_dts/{contracts-CHMlw9hT.d.ts → contracts-f_ZG_SwY.d.ts} +8 -8
- package/dist/_dts/{footerPageOutline-DIHSU1Vr.d.ts → footerPageOutline-DSeZvOaj.d.ts} +85 -8
- package/dist/_dts/{generatePageMetadata-JITXD6BU.d.ts → generatePageMetadata-BlitPA2D.d.ts} +2 -2
- package/dist/_dts/{index-BLEKFHt1.d.ts → index-CKkkCgb6.d.ts} +1 -1
- package/dist/_dts/{index-yWDbUojb.d.ts → index-CoLcwjqJ.d.ts} +1 -1
- package/dist/_dts/{index-DpJm0NpL.d.ts → index-D-ai8IQd.d.ts} +4 -4
- package/dist/_dts/{index-CXZSy_9M.d.ts → index-DDsfmM4d.d.ts} +2 -2
- package/dist/_dts/{index-CF62FntA.d.ts → index-EJMo-KSo.d.ts} +2 -2
- package/dist/_dts/{index-D9ZYmGAJ.d.ts → index-ZKEDvLuN.d.ts} +1 -1
- package/dist/_dts/{index-BgOr1Xyz.d.ts → index-tcPtGdag.d.ts} +3 -3
- package/dist/_dts/{loadContent-M-s0p0rq.d.ts → loadContent-Ci932ORy.d.ts} +7 -7
- package/dist/_dts/{request-BK-pHf0P.d.ts → request-B8jVdvgI.d.ts} +1993 -407
- package/dist/_dts/{resolveBlockData-DZAlnhwt.d.ts → resolveBlockData-DrSMuD76.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-DXUCWJ3y.d.ts → resolvePageContent-Be4iL6-F.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +13 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +3 -2
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +5 -177
- package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +2 -1
- package/dist/_dts/{types-CwmB2NHU.d.ts → types-BXMX4z2j.d.ts} +7 -7
- package/dist/_dts/{types-DjVNADXR.d.ts → types-DXY64Xh4.d.ts} +4 -4
- package/dist/_dts/{types-Dmow_FI6.d.ts → types-lwSgCWZ4.d.ts} +11 -2
- package/dist/_dts/{validation-h8t1HLlL.d.ts → validation-C5xp--Fu.d.ts} +7 -4
- package/dist/client/{BlocksIslandsHydrator-DRVx_XLi.mjs → BlocksIslandsHydrator-CeYQQQs7.mjs} +17 -16
- package/dist/client/{BookingMailingListNote-CwrMzj-k.mjs → BookingMailingListNote-CDDWrY_W.mjs} +6 -6
- package/dist/client/{BookingPanelArrangement-C2_hFT6K.mjs → BookingPanelArrangement-BShQSial.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-DZMrGvBh.mjs → BookingQuestionFields-MbvIo2jS.mjs} +3 -3
- package/dist/client/{CalendarNavigationChevron-Az1-TIEI.mjs → CalendarNavigationChevron-C6CSVfEB.mjs} +36 -11
- package/dist/client/DemoBookingPortalAccess-C9Ggcfx3.mjs +545 -0
- package/dist/client/{EventCalendar.client-CDkkP-Lv.mjs → EventCalendar.client-BSMuSqg0.mjs} +15 -25
- package/dist/client/{EventCombined.client-DK3aaz62.mjs → EventCombined.client-BTrmSyUB.mjs} +25 -17
- package/dist/client/{EventItem-WeUipfIP.mjs → EventItem-B0WjGXsH.mjs} +4 -3
- package/dist/client/{EventListWeekNavigation-D3sbAeDo.mjs → EventListWeekNavigation-8Ij7vuxY.mjs} +1 -1
- package/dist/client/{EventListing.client-DL3gGGmF.mjs → EventListing.client-CWk2NEwd.mjs} +3 -3
- package/dist/client/{EventListing.view-DKFImKOx.mjs → EventListing.view-BEH4UbSL.mjs} +18 -8
- package/dist/client/{EventRegistrationPayment-Dn9TpWyL.mjs → EventRegistrationPayment-B2EikR3f.mjs} +635 -359
- package/dist/client/{LocationMapActions-BJT7MqP2.mjs → LocationMapActions-myIQIvQL.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-DCIwlON6.mjs → MapDrawingSvg-BfsVyPvB.mjs} +2 -22
- package/dist/client/{Page-BpeP9xdt.mjs → Page-F3lhDvw1.mjs} +1036 -953
- package/dist/client/{DemoBookingPortalAccess-1p-pJ1lg.mjs → SiteTermsAgreementField-BYACYP0T.mjs} +4 -301
- package/dist/client/{StepIndicator-CP6zrwkl.mjs → StepIndicator-Bb7rPtSq.mjs} +37 -12
- package/dist/client/{accordion-nR7D4m1a.mjs → accordion-BfsOiweL.mjs} +1 -1
- package/dist/client/{booking-form.client-Ce-mQZ7W.mjs → booking-form.client-B8ohIj13.mjs} +229 -42
- package/dist/client/{bookingForm-B-qT_AQB.mjs → bookingForm-CXsck2oH.mjs} +4 -4
- package/dist/client/bookings.mjs +22 -15
- package/dist/client/{boxStyleClassNames-CrE3TDpW.mjs → boxStyleClassNames-B_hcuT06.mjs} +2 -1
- package/dist/client/{carousel-CVUOatsY.mjs → carousel-Cz5Ddbsx.mjs} +1 -1
- package/dist/client/{cart-DE0K6E0R.mjs → cart-CTC2oS3p.mjs} +3 -3
- package/dist/client/{cart.client-C23E6WQ5.mjs → cart.client-c1YkTC-Q.mjs} +1 -1
- package/dist/client/{checkout-76cdHyPL.mjs → checkout-BeW1ufaH.mjs} +3 -3
- package/dist/client/{checkout.client-DJOzqb26.mjs → checkout.client-BeU32khQ.mjs} +1 -1
- package/dist/client/{checkoutUrls-CvIP5DCO.mjs → checkoutUrls-DVfSUSKp.mjs} +1 -1
- package/dist/client/client.mjs +145 -21
- package/dist/client/{context-CNlesLfF.mjs → context-R9p5c8IH.mjs} +76 -58
- package/dist/client/{course-DHIrXqNT.mjs → course-CUFVJEAc.mjs} +2 -2
- package/dist/client/{creditProducts-KYMVIH3J.mjs → creditProducts-BQ1t1erI.mjs} +14 -61
- package/dist/client/{dateFormatting-B73Ll0s4.mjs → dateFormatting-CF6FWCoo.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BVbLD4pi.mjs → demoPortalMagicLink-tZxIm3RL.mjs} +1 -1
- package/dist/client/display-4HYOb-AK.mjs +11844 -0
- package/dist/client/{enhanceHeaderSection-5GD5o4Mt.mjs → enhanceHeaderSection-DEYDI54E.mjs} +3 -3
- package/dist/client/{event-details.client-D7Oz1q2L.mjs → event-details.client-BwjBJP-f.mjs} +1 -1
- package/dist/client/{event-registration.client-zbuX36aA.mjs → event-registration.client-DWvSODTI.mjs} +176 -75
- package/dist/client/{eventCalendar-uZrksODt.mjs → eventCalendar-C9Pn9eeZ.mjs} +4 -4
- package/dist/client/{eventCombined-DxhvNAx8.mjs → eventCombined-Bdhk0fp0.mjs} +4 -4
- package/dist/client/{eventDetails-DCIH4BYG.mjs → eventDetails-C2LfNW_o.mjs} +2 -2
- package/dist/client/{eventListing-B9KrnPvc.mjs → eventListing-B-bJOQUk.mjs} +4 -4
- package/dist/client/{eventRegistration-TjnURMKl.mjs → eventRegistration-CbdmUiDT.mjs} +4 -4
- package/dist/client/{form-CfqIAhfN.mjs → form-BbUUt784.mjs} +3 -3
- package/dist/client/{form.client-CL6fF0cW.mjs → form.client-BVlz-9_t.mjs} +4 -4
- package/dist/client/{form.parts-Bf-L66Gg.mjs → form.parts-TB4UIrML.mjs} +1 -1
- package/dist/client/{formatDate-Dp7POa9Y.mjs → formatDate-TDHhFjFN.mjs} +1 -1
- package/dist/client/gifting/client.mjs +5 -3
- package/dist/client/gifting-CbNSrp7C.mjs +28 -0
- package/dist/client/gifting.client-B__bGhFc.mjs +404 -0
- package/dist/client/gifting.parts-CTA1sDW6.mjs +86 -0
- package/dist/client/{headerSection-WVXtOcuW.mjs → headerSection-5Wn9nUW_.mjs} +2 -2
- package/dist/client/{display-Cf_j5stk.mjs → lookSurfaces-BwiNdgMU.mjs} +2951 -14395
- package/dist/client/{newsletter-form.client-Bb7GAZpO.mjs → newsletter-form.client-B17WYHxZ.mjs} +7 -5
- package/dist/client/{newsletter-form.parts-BqOVRdIc.mjs → newsletter-form.parts-DN9wD1ZG.mjs} +3 -3
- package/dist/client/{newsletterForm-DOVe-qY3.mjs → newsletterForm-DLMlxInp.mjs} +3 -3
- package/dist/client/{noop-D5mFWXtN.mjs → noop-CaQxI-Js.mjs} +94 -36
- package/dist/client/portal/client.mjs +313 -148
- package/dist/client/{product-detail.client-CNzeFnFf.mjs → product-detail.client-Di_anRGR.mjs} +1 -1
- package/dist/client/{product-list.client-LKpzC7pj.mjs → product-list.client-Duhl6rtL.mjs} +1 -1
- package/dist/client/{productDetail-D2JNeEgx.mjs → productDetail-BgKmCwA8.mjs} +3 -3
- package/dist/client/{productList-DTgZXOEq.mjs → productList-C_wMKsYS.mjs} +3 -3
- package/dist/client/{propsDecoder-mpBQt2AT.mjs → propsDecoder-y3LvxaiG.mjs} +4 -3
- package/dist/client/{registry.server-DdTJyar2.mjs → registry.server-CIWYKz1V.mjs} +369 -246
- package/dist/client/rendering/client.mjs +25 -491
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +87 -21
- package/dist/client/{richText-coerce-C32cRQ03.mjs → richText-coerce-DkPBFb_a.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-8cfSgT0E.mjs → routeIslandApiConfig-BgO0rZce.mjs} +1 -1
- package/dist/client/{shop-5LBhftWx.mjs → shop-CFbWlv_W.mjs} +3 -3
- package/dist/client/{shop-discount-apply.state-D0ifS6KX.mjs → shop-add-feedback-DvC2kP1K.mjs} +1 -78
- package/dist/client/{shop-commerce-DkValjZj.mjs → shop-commerce-C-I29eaA.mjs} +64 -32
- package/dist/client/{shop-commerce-store-BOmXFmk_.mjs → shop-commerce-store-DGcc7twO.mjs} +1 -1
- package/dist/client/shop-discount-apply.state-DOm7vx0X.mjs +83 -0
- package/dist/client/{shop.client-BTtZqNmv.mjs → shop.client-GHTWUKD6.mjs} +56 -19
- package/dist/client/{shop.interactive-DNRqG4aX.mjs → shop.interactive-CxDJ8P2r.mjs} +113 -35
- package/dist/client/{shopShared-Nky6kPYr.mjs → shopShared-Be9QJJpT.mjs} +2 -2
- package/dist/client/{timetableModel-DZArznD_.mjs → timetableModel--R0zVzZO.mjs} +10 -10
- package/dist/client/{useAvailableSlots-CUVRD1nx.mjs → useAvailableSlots-BGu_2F50.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-d7viY_mu.mjs → useDiscountCodeUi-I_mXI9Yd.mjs} +32 -17
- package/dist/client/{useEventPagination-Da2JqxGC.mjs → useEventPagination-DxIJ--JZ.mjs} +7 -6
- package/dist/client/{view-BvuYmQJ5.mjs → view-3foOzGWR.mjs} +3 -2
- package/dist/client/{view-D9ObkFtz.mjs → view-BbzH5MQb.mjs} +128 -32
- package/dist/preview-next/client/{PageSectionToolbar-DwxHT-2k.mjs → PageSectionToolbar-0xyUPWUB.mjs} +4 -4
- package/dist/preview-next/client/{PreviewEditorSidebar-D4SBxGU6.mjs → PreviewEditorSidebar-D8vUzXtI.mjs} +61 -55
- package/dist/preview-next/client/{PreviewEditorUI-D8mUct32.mjs → PreviewEditorUI-CRjS4gAu.mjs} +4 -4
- package/dist/preview-next/client/{PreviewShell-L2AEdNUQ.mjs → PreviewShell-BvdBdeH_.mjs} +5 -5
- package/dist/preview-next/client/{SdkPreviewModeRuntime-bhVAU2D2.mjs → SdkPreviewModeRuntime-DWTyKbFj.mjs} +156 -143
- package/dist/preview-next/client/{previewAssistantSlot-Jpj_HDra.mjs → previewAssistantSlot-BqY2TTcZ.mjs} +4535 -2913
- package/dist/preview-next/client/{previewChromeRoot-CYTDvx4u.mjs → previewChromeRoot-BuRYe2iL.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-CZHX6J_4.mjs → sdk-runtime-BnK5kH9f.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-DmGIG9Hk.mjs → siteStyleAccess-DbKozRSn.mjs} +527 -236
- package/dist/preview-next/client/{useAutosaveStatus-DQCyswQ-.mjs → useAutosaveStatus-D9s6dyMW.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-LwE5yXvL.mjs → useOpenBlockForSetup-Ce4WCxpT.mjs} +28 -5
- package/dist/preview-next/container-responsive.css +51 -3
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BOuNcOcN.mjs → route-contract-BYezcMx5.mjs} +94 -12
- package/dist/server/{Block.shared-wfJfhs08.mjs → Block.shared-Cn7gg13_.mjs} +84 -16
- package/dist/server/{ThemeScopeCore-BtrJNHTB.mjs → ThemeScopeCore-DFEM1a85.mjs} +16 -2
- package/dist/server/{bindings-P1CF2Gm6.mjs → bindings-VGgS6UvF.mjs} +13 -34
- package/dist/server/{client-CGtU5fHI.mjs → client-Bvag5OtW.mjs} +145 -22
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{customCss-BGB8gMVb.mjs → customCss-BZ8YSrQg.mjs} +1 -0
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-ChnkJSay.mjs → loadContent-CxASA3PE.mjs} +6 -9
- package/dist/server/{loadPage-DesHhgxj.mjs → loadPage-CQgde5DN.mjs} +2 -2
- package/dist/server/{lookMediaFrame-BBr0mkze.mjs → lookMediaFrame-CaH018pK.mjs} +24 -5
- package/dist/server/mapLocation-BM5WX7FY.mjs +315 -0
- package/dist/server/next.mjs +35 -9
- package/dist/server/{overrideResolution-DHEkHcZs.mjs → overrideResolution-BqVLO4gX.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-0jvm0RBk.mjs → pageRenderPlan-CfSnAkCO.mjs} +67 -40
- package/dist/server/{pageRuntimeSupport-8-f1Zr9e.mjs → pageRuntimeSupport-uz4gzBOo.mjs} +7 -15
- package/dist/server/{pageShared-CuVFoV4z.mjs → pageShared-D23o5QgC.mjs} +1068 -891
- package/dist/server/{parseThemeForPersistence-Cwqb5pZx.mjs → parseThemeForPersistence-DOsfofCy.mjs} +1 -1
- package/dist/server/{prebuild-Bms_Y7wQ.mjs → prebuild-BuoXWT9y.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-5oC5kyHe.mjs → prefetchBlockData-CCiYV8_s.mjs} +21 -6
- package/dist/server/{registry-DmqxC8th.mjs → registry-CXRXsFSx.mjs} +19721 -19621
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-EYogtwQc.mjs → resolveBlockData-yfe8WLEA.mjs} +1 -1
- package/dist/server/{responseMedia-DpBC1hTM.mjs → responseMedia-F-ElH2Rd.mjs} +1 -0
- package/dist/server/{schema-CUDHMirj.mjs → schema-BpsqaSSU.mjs} +2 -2
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{validation-Bt_8IL1g.mjs → validation-CozQ7wE0.mjs} +4 -4
- package/dist/server/{version-DT_efohp.mjs → version-CgCWRFEY.mjs} +1 -1
- package/dist/styles/index.css +295 -37
- package/package.json +1 -1
- package/dist/client/useDiscountApply-BBnStWXU.mjs +0 -199
- package/dist/server/identity-DQD_8lNO.mjs +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { g as getAutoAppliedDiscountPreview, h as discountAvailabilityHasDiscounts, m as discountAvailabilityAllowsManualEntry } from "./DemoBookingPortalAccess-C9Ggcfx3.mjs";
|
|
3
3
|
import { useEffect, useReducer, useRef } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/shared/components/StateIcon.tsx
|
|
@@ -64,6 +64,7 @@ function TerminalPanel({ tone, title, titleAs: Title = "h3", body, secondaryBody
|
|
|
64
64
|
const initialDiscountCodeUiState = {
|
|
65
65
|
discountUiOpen: false,
|
|
66
66
|
discountCode: "",
|
|
67
|
+
discountCodeRestored: false,
|
|
67
68
|
availability: { tag: "disabled" }
|
|
68
69
|
};
|
|
69
70
|
function getDiscountContextKey(context) {
|
|
@@ -113,9 +114,21 @@ function discountAvailabilityStateFromResponse(requestKey, response) {
|
|
|
113
114
|
autoAppliedDiscount: getAutoAppliedDiscountPreview(response)
|
|
114
115
|
};
|
|
115
116
|
}
|
|
117
|
+
/** When codes can't be entered a typed code goes, but a restored one stays until the server has refused it. */
|
|
118
|
+
function withoutManualEntry(state, availability) {
|
|
119
|
+
return state.discountCodeRestored ? {
|
|
120
|
+
...state,
|
|
121
|
+
availability
|
|
122
|
+
} : {
|
|
123
|
+
...state,
|
|
124
|
+
discountUiOpen: false,
|
|
125
|
+
discountCode: "",
|
|
126
|
+
availability
|
|
127
|
+
};
|
|
128
|
+
}
|
|
116
129
|
function discountCodeUiReducer(state, event) {
|
|
117
130
|
switch (event.type) {
|
|
118
|
-
case "availability-disabled": return
|
|
131
|
+
case "availability-disabled": return withoutManualEntry(state, { tag: "disabled" });
|
|
119
132
|
case "availability-loading": return {
|
|
120
133
|
...state,
|
|
121
134
|
availability: {
|
|
@@ -125,29 +138,26 @@ function discountCodeUiReducer(state, event) {
|
|
|
125
138
|
};
|
|
126
139
|
case "availability-loaded": {
|
|
127
140
|
const availability = discountAvailabilityStateFromResponse(event.requestKey, event.response);
|
|
128
|
-
if (availability.tag !== "available" || !availability.manualCodeEntryAllowed) return
|
|
129
|
-
...state,
|
|
130
|
-
discountUiOpen: false,
|
|
131
|
-
discountCode: "",
|
|
132
|
-
availability
|
|
133
|
-
};
|
|
141
|
+
if (availability.tag !== "available" || !availability.manualCodeEntryAllowed) return withoutManualEntry(state, availability);
|
|
134
142
|
return {
|
|
135
143
|
...state,
|
|
136
144
|
availability
|
|
137
145
|
};
|
|
138
146
|
}
|
|
139
|
-
case "availability-failed": return {
|
|
147
|
+
case "availability-failed": return withoutManualEntry(state, {
|
|
148
|
+
tag: "error",
|
|
149
|
+
requestKey: event.requestKey
|
|
150
|
+
});
|
|
151
|
+
case "discount-code-changed": return {
|
|
140
152
|
...state,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
availability: {
|
|
144
|
-
tag: "error",
|
|
145
|
-
requestKey: event.requestKey
|
|
146
|
-
}
|
|
153
|
+
discountCode: event.code,
|
|
154
|
+
discountCodeRestored: event.code.trim() === "" ? false : state.discountCodeRestored
|
|
147
155
|
};
|
|
148
|
-
case "discount-code-
|
|
156
|
+
case "discount-code-restored": return {
|
|
149
157
|
...state,
|
|
150
|
-
|
|
158
|
+
discountUiOpen: true,
|
|
159
|
+
discountCode: event.code,
|
|
160
|
+
discountCodeRestored: true
|
|
151
161
|
};
|
|
152
162
|
case "discount-ui-open-changed": return {
|
|
153
163
|
...state,
|
|
@@ -210,6 +220,11 @@ function useDiscountCodeUi(options) {
|
|
|
210
220
|
type: "discount-code-changed",
|
|
211
221
|
code
|
|
212
222
|
}),
|
|
223
|
+
restoreDiscountCode: (code) => dispatch({
|
|
224
|
+
type: "discount-code-restored",
|
|
225
|
+
code
|
|
226
|
+
}),
|
|
227
|
+
discountCodeRestored: state.discountCodeRestored,
|
|
213
228
|
discountsAvailable: isAvailable,
|
|
214
229
|
manualCodeEntryAllowed,
|
|
215
230
|
autoAppliedDiscount: isAvailable ? settledAvailability.autoAppliedDiscount : null,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { At as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as useBlockApi } from "./context-
|
|
2
|
+
import { At as eventPaginationLoadReducer, Bt as normalizeOptionalId, Ft as toError, Lt as getEventRuntimeFiltersKey, Mt as getEventPaginationView, Nt as planEventPageOperation, Ot as createInitialEventPaginationLoadState, Pt as toEventPaginationLoadError, Rt as normalizeCsvIds, jt as getEventIdentity, kt as eventPageOperationQuery, zt as normalizeCsvString } from "./shop.interactive-CxDJ8P2r.mjs";
|
|
3
|
+
import { za as getBlockApiReadStage } from "./display-4HYOb-AK.mjs";
|
|
4
|
+
import { n as assertNever } from "./noop-CaQxI-Js.mjs";
|
|
5
|
+
import { n as useBlockApi } from "./context-R9p5c8IH.mjs";
|
|
6
|
+
import { r as listLookSlot, t as listItemPresentation } from "./lookSurfaces-BwiNdgMU.mjs";
|
|
6
7
|
import { i as ThemedButtonLink, r as ThemedButton } from "./ThemedButton-DuaYtnvG.mjs";
|
|
7
|
-
import { r as EventItem } from "./EventItem-
|
|
8
|
-
import { a as EventCard, i as EventCompactRow, r as EmptyState, t as EventListingFrameView } from "./EventListing.view-
|
|
8
|
+
import { r as EventItem } from "./EventItem-B0WjGXsH.mjs";
|
|
9
|
+
import { a as EventCard, i as EventCompactRow, r as EmptyState, t as EventListingFrameView } from "./EventListing.view-BEH4UbSL.mjs";
|
|
9
10
|
import { useCallback, useEffect, useId, useMemo, useReducer, useRef, useState } from "react";
|
|
10
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
12
|
//#region ../blocks/src/system/runtime/hooks/useEventFilters.state.ts
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { d as
|
|
2
|
+
import { d as membershipCardListContent, f as membershipClassesLabel, p as passCardListContent } from "./display-4HYOb-AK.mjs";
|
|
3
|
+
import { r as listLookSlot } from "./lookSurfaces-BwiNdgMU.mjs";
|
|
3
4
|
import { r as ThemedButton } from "./ThemedButton-DuaYtnvG.mjs";
|
|
4
|
-
import { r as EventItem, t as CardListCollection } from "./EventItem-
|
|
5
|
+
import { r as EventItem, t as CardListCollection } from "./EventItem-B0WjGXsH.mjs";
|
|
5
6
|
import React from "react";
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
//#region ../blocks/src/system/runtime/nodes/commerce/shared/view.tsx
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { $
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { Jt as MediaNodeServer, Ut as CardListContentPart, Yt as EventQuickFacts, an as formatCoursePrice, cn as formatEventPriceAmount, ct as formatBookingSchedulePresentation, ln as formatEventPriceDisplay, on as formatEventDepositNote, sn as formatEventPrice, ut as closedRunCopy } from "./shop.interactive-CxDJ8P2r.mjs";
|
|
3
|
+
import { $r as eventVenuePlace, Bo as nextLiveRunSessionStartMs, Ho as resolveWholeSeriesBookingPhase, Qa as resolveEventRegistrationScopedEvents, Qo as EVENT_ADDRESS_AFTER_BOOKING_LABEL, Tr as ImagePresets, Vo as orderedLiveRunSessions, Zr as eventOnlinePlace, as as publicEventPricingDisplay, cs as resolveExactOrFreePriceDisplay, ei as formatEventLocation, fo as formatEventRemainingPlaces, gi as formatTime, go as getEventAvailabilityStatus, ho as getEventAvailability, ii as eventDateOptions, is as publicEventPricingCurrency, li as formatEventCompactDateRail, lo as isBookableEvent, mi as formatEventTimeRange, mo as formatTotalCapacity, pi as formatEventRunDates, rs as isPublicEventPricingOptionDisplayable, ss as publicEventPricingType, ts as formatBookingPriceDisplay, ui as formatEventDateParts, vo as isEventFull, zo as CANCELLED_SESSION_STATUS } from "./display-4HYOb-AK.mjs";
|
|
4
|
+
import { Kt as formatDate, Yt as formatDateTimeRange, an as compareLocalScheduleDates, cn as getLocalScheduleDate, dn as resolveBookingBusinessTimeZone, hn as toUtcIsoDateTimeString, nn as toScheduledBookingDateTime, pn as toBookingTimeZone, qt as formatDateRange, sn as getBookingLocalDateKey } from "./noop-CaQxI-Js.mjs";
|
|
5
|
+
import { T as assertNever } from "./creditProducts-BQ1t1erI.mjs";
|
|
6
6
|
import { t as formatEventDuration } from "./duration-Q6_QNgiv.mjs";
|
|
7
|
-
import { t as LocationMapActions } from "./LocationMapActions-
|
|
8
|
-
import {
|
|
9
|
-
import { a as
|
|
7
|
+
import { t as LocationMapActions } from "./LocationMapActions-myIQIvQL.mjs";
|
|
8
|
+
import { r as listLookSlot } from "./lookSurfaces-BwiNdgMU.mjs";
|
|
9
|
+
import { a as formatMoreDates, c as resolveEventLinkProps, i as formatCourseSessions, o as resolveEventCardBooking, t as eventDisplayTitle } from "./course-CUFVJEAc.mjs";
|
|
10
|
+
import { n as MapDrawingSvg } from "./MapDrawingSvg-BfsVyPvB.mjs";
|
|
10
11
|
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-4o4_hl34.mjs";
|
|
11
12
|
import "react";
|
|
12
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -348,10 +349,7 @@ function offeringFacts(event, places, offering) {
|
|
|
348
349
|
label: "Length",
|
|
349
350
|
value: sessions
|
|
350
351
|
}] : lengthFact(event, !offering || course),
|
|
351
|
-
...offering
|
|
352
|
-
label: "Venue",
|
|
353
|
-
value: event.venue.name
|
|
354
|
-
}] : [],
|
|
352
|
+
...offering ? placeFact(event) : [],
|
|
355
353
|
...places ? [{
|
|
356
354
|
label: "Places",
|
|
357
355
|
value: places,
|
|
@@ -363,6 +361,13 @@ function offeringFacts(event, places, offering) {
|
|
|
363
361
|
}]
|
|
364
362
|
];
|
|
365
363
|
}
|
|
364
|
+
/** An online event, or one whose address follows the booking, says so where a venue would go. */
|
|
365
|
+
function placeFact(event) {
|
|
366
|
+
return event.venue || event.addressAfterBooking || event.deliveryMode !== "in_person" ? [{
|
|
367
|
+
label: "Venue",
|
|
368
|
+
value: formatEventLocation(event)
|
|
369
|
+
}] : [];
|
|
370
|
+
}
|
|
366
371
|
function lengthFact(event, shown) {
|
|
367
372
|
const minutes = Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4);
|
|
368
373
|
return shown && minutes > 0 ? [{
|
|
@@ -426,7 +431,7 @@ function eventHeaderContent(selection, show) {
|
|
|
426
431
|
label: "Time",
|
|
427
432
|
value: timeRange
|
|
428
433
|
},
|
|
429
|
-
...show.cost ? (item.facts ?? []).filter(({ label }) => label === "Price") : [],
|
|
434
|
+
...show.cost ? (item.facts ?? []).filter(({ label }) => label === "Price").map((fact) => withDepositNote(fact, event)) : [],
|
|
430
435
|
...groupSize === null ? [] : [{
|
|
431
436
|
label: "Group size",
|
|
432
437
|
value: groupSize
|
|
@@ -435,6 +440,14 @@ function eventHeaderContent(selection, show) {
|
|
|
435
440
|
action: headerAction(selection, item.action)
|
|
436
441
|
};
|
|
437
442
|
}
|
|
443
|
+
/** The page states a deposit option beside the price, so it isn't first seen at checkout. */
|
|
444
|
+
function withDepositNote(fact, event) {
|
|
445
|
+
const note = formatEventDepositNote(event.pricing, event.paymentTerms, event);
|
|
446
|
+
return note ? {
|
|
447
|
+
...fact,
|
|
448
|
+
value: `${fact.value}, ${note}`
|
|
449
|
+
} : fact;
|
|
450
|
+
}
|
|
438
451
|
/** A course run is described by its whole span, not by whichever session was selected. */
|
|
439
452
|
function headerDateFact(selection) {
|
|
440
453
|
const event = selection.selected;
|
|
@@ -591,14 +604,22 @@ function membershipCoversEvent(args, event) {
|
|
|
591
604
|
return isCategoryEligible(args.eligibleCategoryIds, event.eventCategoryId);
|
|
592
605
|
}
|
|
593
606
|
/**
|
|
607
|
+
* Whether a pass or membership could get someone into this event at all. Nobody
|
|
608
|
+
* books an event that takes no bookings, and a free one has nothing to pay. A
|
|
609
|
+
* tiered event whose tickets are all free isn't `free`: the dashboard treats it
|
|
610
|
+
* as priced, and the server refuses to spend anything on a free ticket.
|
|
611
|
+
*/
|
|
612
|
+
function eventCanUseProducts(event) {
|
|
613
|
+
return event.requiresRegistration !== false && event.pricing.kind !== "free";
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
594
616
|
* Filter site passes to only those that cover the selected event.
|
|
595
617
|
*
|
|
596
618
|
* Public purchasable products are a pre-auth proxy for whether the pass path is
|
|
597
619
|
* worth advertising; owned pass eligibility is checked later after portal auth.
|
|
598
620
|
*/
|
|
599
621
|
function filterPassesForEvent(sitePasses, event) {
|
|
600
|
-
if (!sitePasses || !event) return [];
|
|
601
|
-
if (event.requiresRegistration === false) return [];
|
|
622
|
+
if (!sitePasses || !event || !eventCanUseProducts(event)) return [];
|
|
602
623
|
const eventCategoryId = event.eventCategory?.id ?? null;
|
|
603
624
|
return sitePasses.filter((pass) => pass.productUseCase === "event_pass" && passCoversEvent({ eligibleCategoryIds: pass.eligibleCategoryIds }, {
|
|
604
625
|
acceptsPasses: event.acceptsPasses,
|
|
@@ -613,8 +634,7 @@ function filterPassesForEvent(sitePasses, event) {
|
|
|
613
634
|
* after portal auth.
|
|
614
635
|
*/
|
|
615
636
|
function filterMembershipsForEvent(siteMemberships, event) {
|
|
616
|
-
if (!siteMemberships || !event) return [];
|
|
617
|
-
if (event.requiresRegistration === false) return [];
|
|
637
|
+
if (!siteMemberships || !event || !eventCanUseProducts(event)) return [];
|
|
618
638
|
const eventCategoryId = event.eventCategory?.id ?? null;
|
|
619
639
|
return siteMemberships.filter((membership) => membershipCoversEvent({ eligibleCategoryIds: membership.eligibleCategoryIds }, {
|
|
620
640
|
acceptsMemberships: event.acceptsMemberships,
|
|
@@ -773,7 +793,11 @@ function resolveEventDetailsPresentation(input) {
|
|
|
773
793
|
function wholeSeriesPriceOptions(pricing) {
|
|
774
794
|
return pricing.kind === "tiered" ? pricing.options.filter((option) => option.isActive) : [];
|
|
775
795
|
}
|
|
776
|
-
|
|
796
|
+
/** The price, with any deposit option said beside it. */
|
|
797
|
+
function PriceLine({ price, depositNote }) {
|
|
798
|
+
return /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("strong", { children: price }), depositNote ? `, ${depositNote}` : null] });
|
|
799
|
+
}
|
|
800
|
+
function WholeSeriesPricingDisplay({ pricing, depositNote, acceptedItems }) {
|
|
777
801
|
const options = wholeSeriesPriceOptions(pricing);
|
|
778
802
|
return /* @__PURE__ */ jsxs("div", {
|
|
779
803
|
className: "rb-mt-6",
|
|
@@ -793,7 +817,14 @@ function WholeSeriesPricingDisplay({ pricing, acceptedItems }) {
|
|
|
793
817
|
className: "rb-caption status-muted",
|
|
794
818
|
children: option.description
|
|
795
819
|
}) : null] }, option.id))
|
|
796
|
-
}) : /* @__PURE__ */ jsx(
|
|
820
|
+
}) : /* @__PURE__ */ jsx(PriceLine, {
|
|
821
|
+
price: formatBookingPriceDisplay(publicEventPricingDisplay(pricing), { decimals: "auto" }),
|
|
822
|
+
depositNote
|
|
823
|
+
}),
|
|
824
|
+
depositNote && options.length > 1 ? /* @__PURE__ */ jsxs("p", {
|
|
825
|
+
className: "rb-caption rb-mt-1",
|
|
826
|
+
children: [depositNote.charAt(0).toUpperCase(), depositNote.slice(1)]
|
|
827
|
+
}) : null,
|
|
797
828
|
acceptedItems.length > 0 ? /* @__PURE__ */ jsxs("p", {
|
|
798
829
|
className: "rb-caption rb-mt-1",
|
|
799
830
|
children: ["You can also attend with: ", acceptedItems.join(", ")]
|
|
@@ -834,7 +865,7 @@ function TicketTypePriceList({ ticketTypes, currency }) {
|
|
|
834
865
|
}, ticketType.id))
|
|
835
866
|
});
|
|
836
867
|
}
|
|
837
|
-
function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItems, eventCostLabel, eventPricingCurrency, ticketTypes, autoApplyDiscount }) {
|
|
868
|
+
function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItems, eventCostLabel, depositNote, eventPricingCurrency, ticketTypes, autoApplyDiscount }) {
|
|
838
869
|
if (isDropIn) return /* @__PURE__ */ jsxs("div", {
|
|
839
870
|
className: "rb-mt-6",
|
|
840
871
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -847,6 +878,7 @@ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItem
|
|
|
847
878
|
});
|
|
848
879
|
if (wholeSeriesPricingDisplay) return /* @__PURE__ */ jsx(WholeSeriesPricingDisplay, {
|
|
849
880
|
pricing: wholeSeriesPricingDisplay,
|
|
881
|
+
depositNote,
|
|
850
882
|
acceptedItems: [...acceptedItems]
|
|
851
883
|
});
|
|
852
884
|
if (eventCostLabel) return /* @__PURE__ */ jsxs("div", {
|
|
@@ -856,7 +888,10 @@ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItem
|
|
|
856
888
|
className: "rb-label rb-mb-2",
|
|
857
889
|
children: "Cost"
|
|
858
890
|
}),
|
|
859
|
-
/* @__PURE__ */ jsx(
|
|
891
|
+
/* @__PURE__ */ jsx(PriceLine, {
|
|
892
|
+
price: eventCostLabel,
|
|
893
|
+
depositNote
|
|
894
|
+
}),
|
|
860
895
|
autoApplyDiscount && eventPricingCurrency ? /* @__PURE__ */ jsx("p", {
|
|
861
896
|
className: "rb-caption rb-mt-1",
|
|
862
897
|
children: formatAutoApplyDiscountLine(autoApplyDiscount, eventPricingCurrency)
|
|
@@ -879,7 +914,7 @@ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItem
|
|
|
879
914
|
})
|
|
880
915
|
}) : null;
|
|
881
916
|
}
|
|
882
|
-
function EventFacts({ selection, selected, venue, teamMembers, pricing, showCapacity, lookSlots }) {
|
|
917
|
+
function EventFacts({ selection, selected, venue, online, addressAfterBooking, teamMembers, pricing, showCapacity, lookSlots }) {
|
|
883
918
|
const { date, timeRange } = formatEventDateParts({
|
|
884
919
|
startsAt: selected.startsAt,
|
|
885
920
|
endsAt: selected.endsAt,
|
|
@@ -901,7 +936,11 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing, showCapa
|
|
|
901
936
|
children: timeRange
|
|
902
937
|
})
|
|
903
938
|
] }),
|
|
904
|
-
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
939
|
+
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
940
|
+
venue,
|
|
941
|
+
online,
|
|
942
|
+
addressAfterBooking
|
|
943
|
+
}),
|
|
905
944
|
/* @__PURE__ */ jsx(EventTeacherFacts, { teamMembers }),
|
|
906
945
|
showCapacity && selected.capacity != null ? /* @__PURE__ */ jsxs("div", {
|
|
907
946
|
className: "rb-mt-6",
|
|
@@ -918,8 +957,44 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing, showCapa
|
|
|
918
957
|
]
|
|
919
958
|
});
|
|
920
959
|
}
|
|
921
|
-
|
|
922
|
-
|
|
960
|
+
const eventOnlinePlaceShown = (event, showVenue) => showVenue ? eventOnlinePlace(event) : null;
|
|
961
|
+
const hasEventPlaceFact = (event, showVenue) => showVenue && (Boolean(event.venue) || eventOnlinePlace(event) !== null || event.addressAfterBooking === true);
|
|
962
|
+
const addressAfterBookingShown = (event, showVenue) => showVenue && event.addressAfterBooking === true;
|
|
963
|
+
/** Where a venue would go: online, the owner's word that the address follows the booking, or nothing at all. */
|
|
964
|
+
function EventPlaceWithoutVenue({ online, addressAfterBooking }) {
|
|
965
|
+
if (!online && !addressAfterBooking) return null;
|
|
966
|
+
if (!online) return /* @__PURE__ */ jsxs("div", {
|
|
967
|
+
className: "rb-mt-6",
|
|
968
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
969
|
+
className: "rb-label rb-mb-2",
|
|
970
|
+
children: "Venue"
|
|
971
|
+
}), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: EVENT_ADDRESS_AFTER_BOOKING_LABEL }) })]
|
|
972
|
+
});
|
|
973
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
974
|
+
className: "rb-mt-6",
|
|
975
|
+
children: [
|
|
976
|
+
/* @__PURE__ */ jsx("div", {
|
|
977
|
+
className: "rb-label rb-mb-2",
|
|
978
|
+
children: "Venue"
|
|
979
|
+
}),
|
|
980
|
+
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: online.mode === "online" ? "Online" : "In person or online" }) }),
|
|
981
|
+
addressAfterBooking ? /* @__PURE__ */ jsxs("p", {
|
|
982
|
+
className: "rb-caption",
|
|
983
|
+
children: [EVENT_ADDRESS_AFTER_BOOKING_LABEL, "."]
|
|
984
|
+
}) : null,
|
|
985
|
+
online.note ? /* @__PURE__ */ jsx("p", {
|
|
986
|
+
className: "rb-caption",
|
|
987
|
+
children: online.note
|
|
988
|
+
}) : null
|
|
989
|
+
]
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
/** An online event says so where a venue would go; a hybrid one adds it under the venue. */
|
|
993
|
+
function EventVenueFact({ venue, online, addressAfterBooking }) {
|
|
994
|
+
if (!venue) return /* @__PURE__ */ jsx(EventPlaceWithoutVenue, {
|
|
995
|
+
online,
|
|
996
|
+
addressAfterBooking
|
|
997
|
+
});
|
|
923
998
|
const { place, addressWithBooking } = eventVenuePlace(venue);
|
|
924
999
|
return /* @__PURE__ */ jsxs("div", {
|
|
925
1000
|
className: "rb-mt-6",
|
|
@@ -939,7 +1014,11 @@ function EventVenueFact({ venue }) {
|
|
|
939
1014
|
}) : /* @__PURE__ */ jsx(LocationMapActions, {
|
|
940
1015
|
location: venue.location,
|
|
941
1016
|
addressText: venue.address
|
|
942
|
-
})
|
|
1017
|
+
}),
|
|
1018
|
+
online ? /* @__PURE__ */ jsxs("p", {
|
|
1019
|
+
className: "rb-caption rb-mt-1",
|
|
1020
|
+
children: ["You can also join online.", online.note ? ` ${online.note}` : ""]
|
|
1021
|
+
}) : null
|
|
943
1022
|
]
|
|
944
1023
|
});
|
|
945
1024
|
}
|
|
@@ -1091,21 +1170,28 @@ function EventVenueMap({ venue, drawing, showMap, mapHeight, mapClassName }) {
|
|
|
1091
1170
|
}
|
|
1092
1171
|
/** One pricing projection governs the selected panel, including drop-in and whole-series behavior. */
|
|
1093
1172
|
function selectedEventPricing(event, showCost) {
|
|
1094
|
-
const isDropIn = event
|
|
1095
|
-
const wholeSeriesPricing = event
|
|
1096
|
-
const showEventCost = showCost &&
|
|
1173
|
+
const isDropIn = isDropInEvent(event);
|
|
1174
|
+
const wholeSeriesPricing = wholeSeriesPricingOf(event);
|
|
1175
|
+
const showEventCost = showCost && !isDropIn && wholeSeriesPricing === null;
|
|
1097
1176
|
return {
|
|
1098
1177
|
isDropIn,
|
|
1099
1178
|
wholeSeriesPricingDisplay: showCost ? wholeSeriesPricing : null,
|
|
1100
1179
|
eventCostLabel: showEventCost ? formatEventPrice(event) : null,
|
|
1180
|
+
depositNote: showCost && !isDropIn ? paidDepositNote(event) : null,
|
|
1101
1181
|
eventPricingCurrency: publicEventPricingCurrency(event.pricing),
|
|
1102
|
-
ticketTypes: showEventCost ? getDisplayablePricingOptions(event) : []
|
|
1182
|
+
ticketTypes: showEventCost && isPaid(event) ? getDisplayablePricingOptions(event) : []
|
|
1103
1183
|
};
|
|
1104
1184
|
}
|
|
1185
|
+
const isDropInEvent = (event) => event.bookingScope === "single_occurrence" && event.requiresRegistration === false;
|
|
1186
|
+
const wholeSeriesPricingOf = (event) => event.bookingScope === "whole_series" && event.pricing.kind !== "external" ? event.pricing : null;
|
|
1187
|
+
const isPaid = (event) => publicEventPricingType(event.pricing) !== "free";
|
|
1188
|
+
const paidDepositNote = (event) => isPaid(event) ? formatEventDepositNote(event.pricing, event.paymentTerms, event) : null;
|
|
1105
1189
|
function SelectedEventDetailsView(props) {
|
|
1106
1190
|
const { selection, showVenue, showMap, showOtherDates, showTitle, showDescription, showCapacity, mapHeight, mapClassName, acceptedItems } = props;
|
|
1107
1191
|
const selected = selection.selected;
|
|
1108
1192
|
const venue = showVenue ? selected.venue : void 0;
|
|
1193
|
+
const online = eventOnlinePlaceShown(selected, showVenue);
|
|
1194
|
+
const addressAfterBooking = addressAfterBookingShown(selected, showVenue);
|
|
1109
1195
|
const pricing = selectedEventPricing(selected, props.showCost);
|
|
1110
1196
|
return /* @__PURE__ */ jsxs("div", {
|
|
1111
1197
|
className: "rb-flex rb-flex-col rb-gap-6 rb-text-left",
|
|
@@ -1123,6 +1209,8 @@ function SelectedEventDetailsView(props) {
|
|
|
1123
1209
|
selection,
|
|
1124
1210
|
selected,
|
|
1125
1211
|
venue,
|
|
1212
|
+
online,
|
|
1213
|
+
addressAfterBooking,
|
|
1126
1214
|
showCapacity,
|
|
1127
1215
|
teamMembers: selected.teamMembers ?? [],
|
|
1128
1216
|
pricing: /* @__PURE__ */ jsx(EventPricingDetails, {
|
|
@@ -1215,11 +1303,15 @@ function EventHeaderPanel(props) {
|
|
|
1215
1303
|
})
|
|
1216
1304
|
});
|
|
1217
1305
|
}
|
|
1218
|
-
function HeaderPanelFacts({ venue, teamMembers, pricing }) {
|
|
1306
|
+
function HeaderPanelFacts({ venue, online, addressAfterBooking, teamMembers, pricing }) {
|
|
1219
1307
|
return /* @__PURE__ */ jsxs("div", {
|
|
1220
1308
|
className: "rb-flex rb-flex-col rb-gap-4",
|
|
1221
1309
|
children: [
|
|
1222
|
-
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
1310
|
+
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
1311
|
+
venue,
|
|
1312
|
+
online,
|
|
1313
|
+
addressAfterBooking
|
|
1314
|
+
}),
|
|
1223
1315
|
/* @__PURE__ */ jsx(EventTeacherFacts, { teamMembers }),
|
|
1224
1316
|
pricing ? /* @__PURE__ */ jsx(EventPricingDetails, { ...pricing }) : null
|
|
1225
1317
|
]
|
|
@@ -1229,15 +1321,18 @@ function HeaderPanelFacts({ venue, teamMembers, pricing }) {
|
|
|
1229
1321
|
function headerPanelContent(props) {
|
|
1230
1322
|
const { selection } = props;
|
|
1231
1323
|
const venue = props.showVenue ? selection.selected.venue : void 0;
|
|
1324
|
+
const online = eventOnlinePlaceShown(selection.selected, props.showVenue);
|
|
1232
1325
|
const teamMembers = selection.selected.teamMembers ?? [];
|
|
1233
1326
|
const pricing = headerPanelPricing(props, selection.selected);
|
|
1234
1327
|
const scheduled = selection.kind === "wholeSeries" ? selection.sessions.length : selection.otherDates.length;
|
|
1235
1328
|
return {
|
|
1236
1329
|
venue,
|
|
1330
|
+
online,
|
|
1331
|
+
addressAfterBooking: addressAfterBookingShown(selection.selected, props.showVenue),
|
|
1237
1332
|
teamMembers,
|
|
1238
1333
|
pricing,
|
|
1239
1334
|
hasMap: Boolean(props.showMap && venue && props.selectedVenueDrawing),
|
|
1240
|
-
hasFacts:
|
|
1335
|
+
hasFacts: hasEventPlaceFact(selection.selected, props.showVenue) || teamMembers.length > 0 || pricing !== null,
|
|
1241
1336
|
hasDates: props.showOtherDates && scheduled > 0
|
|
1242
1337
|
};
|
|
1243
1338
|
}
|
|
@@ -1251,6 +1346,7 @@ function headerPanelPricing(props, event) {
|
|
|
1251
1346
|
if (pricing.isDropIn) return null;
|
|
1252
1347
|
const detail = {
|
|
1253
1348
|
...pricing,
|
|
1349
|
+
depositNote: null,
|
|
1254
1350
|
acceptedItems: acceptedProductNames(props),
|
|
1255
1351
|
autoApplyDiscount: props.autoApplyDiscount ?? null
|
|
1256
1352
|
};
|
package/dist/preview-next/client/{PageSectionToolbar-DwxHT-2k.mjs → PageSectionToolbar-0xyUPWUB.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CE6sIgz8.mjs";
|
|
3
|
-
import { $
|
|
3
|
+
import { $a as richTextVariantCapabilities, $c as composeEventHandlers, $o as gradientToCss, $u as unsafeAsEditorBlockId, Ac as __spreadArrays, Cc as __assign, Ci as getRichTextImageSize, Dc as __read, Di as resolveMediaStorageUrl, E as selectedImageFromRenderableAsset, Ec as __generator, Ei as resolveImageUrlWithContext, F as lookTilePosition, Gl as parseAspectRatioValue, Gs as selectedCanvasBlockId, Hc as useSize, Hl as isRotationDimensionSwap, Jl as getImageUrl, Kl as resolveMediaTransformForAspect, L as nextLookTilePin, Nl as surfaceForegroundValue, Oc as __rest, Oi as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, P as lookPositionLabel, Qc as createContextScope, Qi as readThemeScopeContext, Qs as Dialog, S as pageDesignLookPosition, T as selectedImageFromMediaValue, Tc as __extends, Ul as normalizeRightAngle, Wl as formatAspectRatioToken, Ws as unwrapResponse, Xc as useControllableState, Ys as Callout, Za as RichTextDocSchema, al as cva, an as getDashboardBaseUrl, bn as useEditorUiStoreInstance, bo as replaceInlineTextRange, cc as DialogClose, cd as assertNever, cu as asLayoutVariantKey, dc as DialogOverlay, dd as unsafeAsPositiveByteCount, do as inlineTextEqual, du as generateUuidV4, ec as DialogContent$1, el as Primitive, er as backgroundColorTokens, eu as resolveManagedMediaReference, fc as DialogPortal, fo as inlineTextHighlightTones, go as normalizeInlineTextMarks, gs as assertNever$1, ho as normalizeInlineText, i as usePreviewSidebarNavigation, ic as DialogTitle$1, il as useControlReadiness, j as usePreviewRenderBackgrounds, kc as __spreadArray, lc as DialogContent, ll as useComposedRefs, lr as rankBackgroundImagePoolItems, ni as getBlockDefinition, nl as Button, nr as defaultBackgroundOverrideForMode, nu as mediaIdentifierSchema, o as usePreviewPageDesignEditorState, oc as overlayScrimClass, pc as DialogTitle, po as inlineTextToPlainText, ql as getDirectImageUrlForMediaAsset, qo as getCuratedSiteStyle, rc as DialogHeader, so as applyInlineTextMarkToRange, tc as DialogDescription$1, ts as getGradientPreset, uc as DialogDescription, ud as unsafeAsMediaAssetId, ul as cn$2, uo as inlineTextAccentTones, uu as authoredValuesEqual, vo as plainTextToInlineText, wc as __awaiter, wi as computeMediaTransformStyle, x as cyclePageDesignBlockLook, xc as usePortalContainer, xo as truncateInlineText, yn as useEditorUiStore, yo as removeInlineTextMarkFromRange } from "./previewAssistantSlot-BqY2TTcZ.mjs";
|
|
4
4
|
import { A as LoaderCircle, F as Italic$1, G as FileText, H as Highlighter, I as Info, J as FileHeadphone, K as FileSpreadsheet, Kt as err, L as Image, M as ListOrdered, N as Link$1, R as ImageUp, S as Palette, St as Archive, W as File, Y as FileArchive, Z as EyeOff, a as Upload, c as Trash2, j as List, mt as Check, n as X, q as FilePlay, qt as ok, s as TriangleAlert, tt as Crop, vt as Bold$1, y as Pencil } from "./lucide-react-Dfgl3Vtq.mjs";
|
|
5
|
-
import { At as useFieldDescribedBy, Dt as Input, E as usePreviewCompiledThemeOptional, G as TransferError, H as useMediaEditor, L as siteColourCss, S as planBlockToolbarPlacement, St as usePrevious, U as useMediaEditorOptional, W as useApiMediaUploader, _ as PreviewChromeFloatingControl, _t as Select, b as measureSiteTopChromeClearance, bt as SelectTrigger, ct as EditorCanvasChoiceChip, dt as EditorInsertionMarker, ft as EditorSelectionFrame, h as CustomizeBackgroundColorPicker, lt as EditorCanvasCycleChip, pt as CHOSEN_OPTION_CLASS, st as EditorCanvasChipRow, ut as EditorCanvasNameChip, vt as SelectContent, xt as SelectValue, y as readThemeCustomProperties, yt as SelectItem, zt as classifyKnownMimeType } from "./siteStyleAccess-
|
|
6
|
-
import { A as Tooltip, F as DropdownMenu, H as DropdownMenuTrigger, I as DropdownMenuContent, L as DropdownMenuItem, M as TooltipProvider, N as TooltipTrigger, P as Badge, a as blockNoticeAction, d as arrangementBackgroundControlFor, f as arrangementBlockControlsFor, j as TooltipContent, o as blockNoticeLabel, r as useBlockCustomizeControls, s as blockNoticeMessage, t as useOpenBlockForSetup, u as useBlockNotice } from "./useOpenBlockForSetup-
|
|
5
|
+
import { At as useFieldDescribedBy, Dt as Input, E as usePreviewCompiledThemeOptional, G as TransferError, H as useMediaEditor, L as siteColourCss, S as planBlockToolbarPlacement, St as usePrevious, U as useMediaEditorOptional, W as useApiMediaUploader, _ as PreviewChromeFloatingControl, _t as Select, b as measureSiteTopChromeClearance, bt as SelectTrigger, ct as EditorCanvasChoiceChip, dt as EditorInsertionMarker, ft as EditorSelectionFrame, h as CustomizeBackgroundColorPicker, lt as EditorCanvasCycleChip, pt as CHOSEN_OPTION_CLASS, st as EditorCanvasChipRow, ut as EditorCanvasNameChip, vt as SelectContent, xt as SelectValue, y as readThemeCustomProperties, yt as SelectItem, zt as classifyKnownMimeType } from "./siteStyleAccess-DbKozRSn.mjs";
|
|
6
|
+
import { A as Tooltip, F as DropdownMenu, H as DropdownMenuTrigger, I as DropdownMenuContent, L as DropdownMenuItem, M as TooltipProvider, N as TooltipTrigger, P as Badge, a as blockNoticeAction, d as arrangementBackgroundControlFor, f as arrangementBlockControlsFor, j as TooltipContent, o as blockNoticeLabel, r as useBlockCustomizeControls, s as blockNoticeMessage, t as useOpenBlockForSetup, u as useBlockNotice } from "./useOpenBlockForSetup-Ce4WCxpT.mjs";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import React, { Component, createContext, createRef, forwardRef, useCallback, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -21689,7 +21689,7 @@ function InternalTabPanel(props) {
|
|
|
21689
21689
|
})]
|
|
21690
21690
|
}), /* @__PURE__ */ jsx(Button, {
|
|
21691
21691
|
type: "button",
|
|
21692
|
-
variant: "
|
|
21692
|
+
variant: "link",
|
|
21693
21693
|
size: "sm",
|
|
21694
21694
|
className: "h-7 shrink-0 px-2 text-xs",
|
|
21695
21695
|
onClick: () => onSelectRouteId(null),
|