@riverbankcms/sdk 0.174.0 → 0.175.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-GqVX3I8E.d.ts → BlocksIslandsHydrator-hb2IWD8K.d.ts} +1 -1
- package/dist/_dts/{Page-BhUH31M-.d.ts → Page-BlY68ZF-.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-DBn2x0UL.d.ts → SdkPreviewMode-CA8hU7hW.d.ts} +2 -2
- package/dist/_dts/{client-Cr-sOeSl.d.ts → client-B6tCvmG4.d.ts} +487 -11
- package/dist/_dts/{content-types-DKw1yJdN.d.ts → content-types-B9qryk4R.d.ts} +2 -2
- package/dist/_dts/{contracts-CJ2O03nB.d.ts → contracts-DWoaRxj1.d.ts} +3 -3
- package/dist/_dts/{footerPageOutline-DoGHHKr_.d.ts → footerPageOutline-Djdrhp5s.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-CJGu4hoa.d.ts → generatePageMetadata-CFi0vxov.d.ts} +2 -2
- package/dist/_dts/{index--39uLjrr.d.ts → index-Bl5_pjmq.d.ts} +1 -1
- package/dist/_dts/{index-DQZ5L0Gb.d.ts → index-Btp5nIoz.d.ts} +2 -2
- package/dist/_dts/{index-Bq-488M7.d.ts → index-CQUzwOxO.d.ts} +1 -1
- package/dist/_dts/{index-DYlfdT1O.d.ts → index-DmhFb6R1.d.ts} +1 -1
- package/dist/_dts/{index-3GzargmS.d.ts → index-OtazQE3U.d.ts} +2 -2
- package/dist/_dts/{index-DYsP4k6S.d.ts → index-YRQulWB4.d.ts} +3 -3
- package/dist/_dts/{index-DdEi2iXd.d.ts → index-_pXaCO12.d.ts} +4 -4
- package/dist/_dts/{loadContent-BVPagYmy.d.ts → loadContent-Hcuvs4pz.d.ts} +7 -7
- package/dist/_dts/{request-Be1E-H-V.d.ts → request-BT8i_vH-.d.ts} +2070 -503
- package/dist/_dts/{resolveBlockData-D1pL25bD.d.ts → resolveBlockData-B-dJrunl.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-B4sbTf96.d.ts → resolvePageContent-CVLYWcoI.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 +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +2 -1
- package/dist/_dts/{types-Bm5_3VEd.d.ts → types-C0XZnjXz.d.ts} +3 -3
- package/dist/_dts/{types-5MeDI1w8.d.ts → types-CXL1QJSY.d.ts} +7 -7
- package/dist/_dts/{types-CVoCc_Ia.d.ts → types-OKzbqRBx.d.ts} +2 -2
- package/dist/_dts/{validation-lEtYD-Rh.d.ts → validation-Bxi66FtQ.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DkflFLGQ.mjs → BlocksIslandsHydrator-2xzlERTG.mjs} +17 -16
- package/dist/client/{BookingMailingListNote-CAyoiAGD.mjs → BookingMailingListNote-qsohSEdQ.mjs} +6 -6
- package/dist/client/{BookingPanelArrangement-C7yiJrxm.mjs → BookingPanelArrangement-DrdtON0q.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-DZMrGvBh.mjs → BookingQuestionFields-CUFxBaTM.mjs} +3 -3
- package/dist/client/{CalendarNavigationChevron-BPQU5Snc.mjs → CalendarNavigationChevron-Ch0w0Utn.mjs} +34 -9
- package/dist/client/DemoBookingPortalAccess-DGgsjqXK.mjs +545 -0
- package/dist/client/{EventCalendar.client-BiWQc28-.mjs → EventCalendar.client-Dg4PHFJJ.mjs} +15 -25
- package/dist/client/{EventCombined.client-B_ytWQtn.mjs → EventCombined.client-tky8JcnQ.mjs} +25 -17
- package/dist/client/{EventItem-C-mxXpX_.mjs → EventItem-BybMSKNL.mjs} +4 -3
- package/dist/client/{EventListWeekNavigation-Bm3Ap1Rd.mjs → EventListWeekNavigation-uvWRE5wi.mjs} +1 -1
- package/dist/client/{EventListing.client-Bs_8im5_.mjs → EventListing.client-DQx9dohz.mjs} +3 -3
- package/dist/client/{EventListing.view-CN7BjGgC.mjs → EventListing.view-r31k8Icz.mjs} +8 -7
- package/dist/client/{EventRegistrationPayment-DPkRcSdw.mjs → EventRegistrationPayment-BMmPDmSf.mjs} +664 -362
- package/dist/client/{LocationMapActions-BJT7MqP2.mjs → LocationMapActions-BecH-qhI.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-DCIwlON6.mjs → MapDrawingSvg-BJzmFdcn.mjs} +18 -3
- package/dist/client/{Page--xJ23nA5.mjs → Page-CWN_8cLZ.mjs} +736 -1667
- package/dist/client/{DemoBookingPortalAccess-BnEgvJas.mjs → SiteTermsAgreementField-Dr5lj4oY.mjs} +4 -301
- package/dist/client/{StepIndicator-D391QRNc.mjs → StepIndicator-C7RJBOW3.mjs} +37 -249
- package/dist/client/{accordion-BQtTkDN8.mjs → accordion-uUi_N6mZ.mjs} +1 -1
- package/dist/client/{booking-form.client-D9M7TKGV.mjs → booking-form.client-CKHgxvsh.mjs} +229 -42
- package/dist/client/{bookingForm-BsOS0sl9.mjs → bookingForm-Bi74dmiS.mjs} +4 -4
- package/dist/client/bookings.mjs +22 -15
- package/dist/client/{boxStyleClassNames-CNDLpT06.mjs → boxStyleClassNames-C-gFwhnO.mjs} +3 -29
- package/dist/client/{carousel-CPsW-FPh.mjs → carousel-C0_BqMA0.mjs} +1 -1
- package/dist/client/{cart-CwElmocm.mjs → cart-BOHuppVu.mjs} +3 -3
- package/dist/client/{cart.client-RpqI56w8.mjs → cart.client-IfJE1zAp.mjs} +1 -1
- package/dist/client/{checkout-CfMgqY8H.mjs → checkout-C3Aj-aNa.mjs} +3 -3
- package/dist/client/{checkout.client-BpuPyOuJ.mjs → checkout.client-Tg9lfeYf.mjs} +1 -1
- package/dist/client/{checkoutUrls-VeHY6WYj.mjs → checkoutUrls-OLqQdAXD.mjs} +1 -1
- package/dist/client/client.mjs +113 -21
- package/dist/client/{context-CNlesLfF.mjs → context-D8TpQXjX.mjs} +76 -58
- package/dist/client/{course-q1sA4Cj-.mjs → course-DHmeQAvq.mjs} +2 -2
- package/dist/client/{creditProducts-KYMVIH3J.mjs → creditProducts-BQ1t1erI.mjs} +14 -61
- package/dist/client/{dateFormatting-B73Ll0s4.mjs → dateFormatting-ABCZWkpT.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BVbLD4pi.mjs → demoPortalMagicLink-BdcuW_pa.mjs} +1 -1
- package/dist/client/display-DMqotaGU.mjs +11797 -0
- package/dist/client/{enhanceHeaderSection-BzjY6AiY.mjs → enhanceHeaderSection-Ciuhsk0E.mjs} +3 -3
- package/dist/client/{event-details.client-CseTWUFC.mjs → event-details.client-CJapNbTv.mjs} +1 -1
- package/dist/client/{event-registration.client-b5TLxntR.mjs → event-registration.client-CAdcpnLc.mjs} +295 -188
- package/dist/client/{eventCalendar-C-kJNIc9.mjs → eventCalendar-BlsD5R8M.mjs} +4 -4
- package/dist/client/{eventCombined-BgHJGhwE.mjs → eventCombined-B9Ly3024.mjs} +4 -4
- package/dist/client/{eventDetails-CAwbreD0.mjs → eventDetails-CbEGI4jO.mjs} +2 -2
- package/dist/client/{eventListing-_14atrj8.mjs → eventListing-ZSmvhWII.mjs} +4 -4
- package/dist/client/{eventRegistration-BOqSdstJ.mjs → eventRegistration-D-yUcIyO.mjs} +4 -4
- package/dist/client/{form-DfAB-llc.mjs → form-DG_YZSNn.mjs} +3 -3
- package/dist/client/{form.client-DN-I9_qC.mjs → form.client-BU6dM0-C.mjs} +4 -4
- package/dist/client/{form.parts-t2Q1neM6.mjs → form.parts-Db0Iq7nx.mjs} +1 -1
- package/dist/client/{formatDate-Dp7POa9Y.mjs → formatDate-DFfWHpQB.mjs} +1 -1
- package/dist/client/gifting/client.mjs +5 -3
- package/dist/client/gifting-DMrsN4B4.mjs +28 -0
- package/dist/client/gifting.client-BVa2XYJB.mjs +404 -0
- package/dist/client/gifting.parts-C2u4Y-pf.mjs +86 -0
- package/dist/client/{headerSection-Dces54pb.mjs → headerSection-D91EzlOR.mjs} +2 -2
- package/dist/client/{display-D8MW2b0e.mjs → lookSurfaces-BDZLALxj.mjs} +3084 -12938
- package/dist/client/{newsletter-form.client-D_YFUlR2.mjs → newsletter-form.client-BMGRiRpo.mjs} +7 -5
- package/dist/client/{newsletter-form.parts-URO5Mn_I.mjs → newsletter-form.parts-D5UfUaD3.mjs} +3 -3
- package/dist/client/{newsletterForm-_c9fKIzS.mjs → newsletterForm-B_67sNwa.mjs} +3 -3
- package/dist/client/{noop-D5mFWXtN.mjs → noop-DF8_EiFt.mjs} +93 -28
- package/dist/client/portal/client.mjs +313 -148
- package/dist/client/{product-detail.client-CVW1UIxJ.mjs → product-detail.client-D-XNir0m.mjs} +1 -1
- package/dist/client/{product-list.client-CF9hO23G.mjs → product-list.client-BLfYQ-qi.mjs} +1 -1
- package/dist/client/{productDetail-C_qbmUuP.mjs → productDetail-W0_0lDGe.mjs} +3 -3
- package/dist/client/{productList-Df5qDD0z.mjs → productList-ayAtPJdb.mjs} +3 -3
- package/dist/client/{propsDecoder-BiEyK2ii.mjs → propsDecoder-ChYKWjLA.mjs} +4 -3
- package/dist/client/{registry.server-ClcfWpvM.mjs → registry.server-B1EEZkcr.mjs} +311 -262
- package/dist/client/rendering/client.mjs +25 -491
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +7 -7
- package/dist/client/{richText-coerce-C32cRQ03.mjs → richText-coerce-CDAfpMQU.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DAypPzSo.mjs → routeIslandApiConfig-CcGWvyht.mjs} +1 -1
- package/dist/client/{shop-gteEpeO5.mjs → shop-DbUUoHFJ.mjs} +3 -3
- package/dist/client/{shop-discount-apply.state-DidgH7ow.mjs → shop-add-feedback-DvC2kP1K.mjs} +1 -78
- package/dist/client/{shop-commerce-Bw4_BXQg.mjs → shop-commerce-aQqcDmyZ.mjs} +64 -32
- package/dist/client/{shop-commerce-store-Da6Ah-_4.mjs → shop-commerce-store-Cd7USpuY.mjs} +1 -1
- package/dist/client/shop-discount-apply.state-DGvPBmVP.mjs +83 -0
- package/dist/client/{shop.client-CbbdjWWd.mjs → shop.client-BNZ9M8cG.mjs} +56 -19
- package/dist/client/{shop.interactive-CKFORzux.mjs → shop.interactive-CJAINJr3.mjs} +118 -39
- package/dist/client/{shopShared-C7QjoywZ.mjs → shopShared-DwVAuGsx.mjs} +2 -2
- package/dist/client/{timetableModel-CtZiIj9q.mjs → timetableModel-DBTIFWTb.mjs} +11 -148
- package/dist/client/{useAvailableSlots-CUVRD1nx.mjs → useAvailableSlots-BomyyKeo.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-BuLgof7O.mjs → useDiscountCodeUi-CCxHMWlU.mjs} +32 -17
- package/dist/client/{useEventPagination-B4VPtSEF.mjs → useEventPagination-Bjin_qaN.mjs} +7 -6
- package/dist/client/{view-CvlTplao.mjs → view-BTk470k0.mjs} +3 -2
- package/dist/client/{view-CxUpgcM6.mjs → view-Cw4EmEPv.mjs} +100 -32
- package/dist/preview-next/client/{PageSectionToolbar-BFbSrDbi.mjs → PageSectionToolbar-bq7gbKvn.mjs} +4 -4
- package/dist/preview-next/client/{PreviewEditorSidebar-BtpzqQ-i.mjs → PreviewEditorSidebar-DVsPNcos.mjs} +32 -29
- package/dist/preview-next/client/{PreviewEditorUI-z22h-CCY.mjs → PreviewEditorUI-B-pq3aZc.mjs} +4 -4
- package/dist/preview-next/client/{PreviewShell-BW3Qpoa_.mjs → PreviewShell-ChyjB96e.mjs} +5 -5
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BvVeK1hR.mjs → SdkPreviewModeRuntime-D_czeC0l.mjs} +84 -101
- package/dist/preview-next/client/{previewAssistantSlot-BUqAh1FL.mjs → previewAssistantSlot-B61mZd81.mjs} +4981 -3275
- package/dist/preview-next/client/{previewChromeRoot-NCy5zHO8.mjs → previewChromeRoot-dwOn9XtM.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-CxmKDVGZ.mjs → sdk-runtime-DZDfOxoW.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-B_UaDyJO.mjs → siteStyleAccess-BZDIC-fA.mjs} +529 -238
- package/dist/preview-next/client/{useAutosaveStatus-BqmWvPLY.mjs → useAutosaveStatus-BbzLMf-l.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-LAllV0rU.mjs → useOpenBlockForSetup-BEXcWQeI.mjs} +25 -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-DV6SeCNv.mjs → route-contract-0gSlK9S0.mjs} +87 -12
- package/dist/server/{Block.shared-Ch2FKAvU.mjs → Block.shared-DeXXycg8.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-DFvjDVzi.mjs → ThemeScopeCore-DFEM1a85.mjs} +16 -2
- package/dist/server/{bindings-CQg2lzZn.mjs → bindings-7L3pC5Os.mjs} +13 -34
- package/dist/server/{client-aYRTVneD.mjs → client-CgghATBm.mjs} +112 -20
- 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-Cgpfr44e.mjs → loadContent-D7M5Vcug.mjs} +5 -5
- package/dist/server/{loadPage-RDk10NMP.mjs → loadPage-CiTId05y.mjs} +2 -2
- package/dist/server/{lookMediaFrame-CQtkvlDn.mjs → lookMediaFrame-CaH018pK.mjs} +129 -12
- package/dist/server/next.mjs +35 -9
- package/dist/server/{overrideResolution-VhhN94d8.mjs → overrideResolution-CJ3MRI5Q.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-CkFTsxkd.mjs → pageRenderPlan-Cuos4Xcd.mjs} +105 -357
- package/dist/server/{pageRuntimeSupport-CpAtzNxD.mjs → pageRuntimeSupport-CuVj3bkd.mjs} +4 -3
- package/dist/server/{pageShared-B8yLPjs0.mjs → pageShared-JxlV8_Bo.mjs} +1707 -1811
- package/dist/server/{parseThemeForPersistence-Cwqb5pZx.mjs → parseThemeForPersistence-DOsfofCy.mjs} +1 -1
- package/dist/server/{prebuild-DOu6QceG.mjs → prebuild-BDhlJbAx.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-CfOXFKYG.mjs → prefetchBlockData-kERh_c0v.mjs} +2 -2
- package/dist/server/{registry-34rkAfaU.mjs → registry-cQ9N5W-n.mjs} +21091 -20209
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-D7VeoWgr.mjs → resolveBlockData-CN4UmmTK.mjs} +1 -1
- 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-CLVKoJrX.mjs → validation-3puM5SM8.mjs} +3 -3
- package/dist/server/{version-HVfdvBJ0.mjs → version-B8g-Wx57.mjs} +1 -1
- package/dist/styles/index.css +361 -57
- package/package.json +1 -1
- package/dist/client/bookability-CE637yDE.mjs +0 -17
- package/dist/client/useDiscountApply-BZU5DWZQ.mjs +0 -199
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { g as getAutoAppliedDiscountPreview, h as discountAvailabilityHasDiscounts, m as discountAvailabilityAllowsManualEntry } from "./DemoBookingPortalAccess-DGgsjqXK.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-CJAINJr3.mjs";
|
|
3
|
+
import { Fa as getBlockApiReadStage } from "./display-DMqotaGU.mjs";
|
|
4
|
+
import { n as assertNever } from "./noop-DF8_EiFt.mjs";
|
|
5
|
+
import { n as useBlockApi } from "./context-D8TpQXjX.mjs";
|
|
6
|
+
import { r as listLookSlot, t as listItemPresentation } from "./lookSurfaces-BDZLALxj.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-BybMSKNL.mjs";
|
|
9
|
+
import { a as EventCard, i as EventCompactRow, r as EmptyState, t as EventListingFrameView } from "./EventListing.view-r31k8Icz.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 {
|
|
2
|
+
import { d as membershipCardListContent, f as membershipClassesLabel, p as passCardListContent } from "./display-DMqotaGU.mjs";
|
|
3
|
+
import { r as listLookSlot } from "./lookSurfaces-BDZLALxj.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-BybMSKNL.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,13 +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-CJAINJr3.mjs";
|
|
3
|
+
import { $o as publicEventPricingCurrency, Fo as CANCELLED_SESSION_STATUS, Io as nextLiveRunSessionStartMs, Ja as resolveEventRegistrationScopedEvents, Lo as orderedLiveRunSessions, Qo as isPublicEventPricingOptionDisplayable, Ro as resolveWholeSeriesBookingPhase, Tr as ImagePresets, Xo as formatBookingPriceDisplay, ai as formatEventCompactDateRail, ao as isBookableEvent, co as formatEventRemainingPlaces, do as getEventAvailability, ei as eventDateOptions, es as publicEventPricingDisplay, fi as formatTime, fo as getEventAvailabilityStatus, li as formatEventRunDates, mo as isEventFull, ns as publicEventPricingType, oi as formatEventDateParts, rs as resolveExactOrFreePriceDisplay, ui as formatEventTimeRange, uo as formatTotalCapacity } from "./display-DMqotaGU.mjs";
|
|
4
|
+
import { Jt as formatDateRange, Xt as formatDateTimeRange, cn as getBookingLocalDateKey, fn as resolveBookingBusinessTimeZone, gn as toUtcIsoDateTimeString, ln as getLocalScheduleDate, mn as toBookingTimeZone, on as compareLocalScheduleDates, qt as formatDate, rn as toScheduledBookingDateTime } from "./noop-DF8_EiFt.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 formatMoreDates, c as resolveEventLinkProps, i as formatCourseSessions, o as resolveEventCardBooking, t as eventDisplayTitle } from "./course-
|
|
10
|
-
import { a as
|
|
7
|
+
import { t as LocationMapActions } from "./LocationMapActions-BecH-qhI.mjs";
|
|
8
|
+
import { r as listLookSlot } from "./lookSurfaces-BDZLALxj.mjs";
|
|
9
|
+
import { a as formatMoreDates, c as resolveEventLinkProps, i as formatCourseSessions, o as resolveEventCardBooking, t as eventDisplayTitle } from "./course-DHmeQAvq.mjs";
|
|
10
|
+
import { a as eventOnlinePlace, n as MapDrawingSvg, o as eventVenuePlace, s as formatEventLocation } from "./MapDrawingSvg-BJzmFdcn.mjs";
|
|
11
11
|
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-4o4_hl34.mjs";
|
|
12
12
|
import "react";
|
|
13
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -349,9 +349,9 @@ function offeringFacts(event, places, offering) {
|
|
|
349
349
|
label: "Length",
|
|
350
350
|
value: sessions
|
|
351
351
|
}] : lengthFact(event, !offering || course),
|
|
352
|
-
...offering && event.venue ? [{
|
|
352
|
+
...offering && (event.venue || event.deliveryMode !== "in_person") ? [{
|
|
353
353
|
label: "Venue",
|
|
354
|
-
value: event
|
|
354
|
+
value: formatEventLocation(event)
|
|
355
355
|
}] : [],
|
|
356
356
|
...places ? [{
|
|
357
357
|
label: "Places",
|
|
@@ -427,7 +427,7 @@ function eventHeaderContent(selection, show) {
|
|
|
427
427
|
label: "Time",
|
|
428
428
|
value: timeRange
|
|
429
429
|
},
|
|
430
|
-
...show.cost ? (item.facts ?? []).filter(({ label }) => label === "Price") : [],
|
|
430
|
+
...show.cost ? (item.facts ?? []).filter(({ label }) => label === "Price").map((fact) => withDepositNote(fact, event)) : [],
|
|
431
431
|
...groupSize === null ? [] : [{
|
|
432
432
|
label: "Group size",
|
|
433
433
|
value: groupSize
|
|
@@ -436,6 +436,14 @@ function eventHeaderContent(selection, show) {
|
|
|
436
436
|
action: headerAction(selection, item.action)
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
+
/** The page states a deposit option beside the price, so it isn't first seen at checkout. */
|
|
440
|
+
function withDepositNote(fact, event) {
|
|
441
|
+
const note = formatEventDepositNote(event.pricing, event.paymentTerms, event);
|
|
442
|
+
return note ? {
|
|
443
|
+
...fact,
|
|
444
|
+
value: `${fact.value}, ${note}`
|
|
445
|
+
} : fact;
|
|
446
|
+
}
|
|
439
447
|
/** A course run is described by its whole span, not by whichever session was selected. */
|
|
440
448
|
function headerDateFact(selection) {
|
|
441
449
|
const event = selection.selected;
|
|
@@ -592,14 +600,22 @@ function membershipCoversEvent(args, event) {
|
|
|
592
600
|
return isCategoryEligible(args.eligibleCategoryIds, event.eventCategoryId);
|
|
593
601
|
}
|
|
594
602
|
/**
|
|
603
|
+
* Whether a pass or membership could get someone into this event at all. Nobody
|
|
604
|
+
* books an event that takes no bookings, and a free one has nothing to pay. A
|
|
605
|
+
* tiered event whose tickets are all free isn't `free`: the dashboard treats it
|
|
606
|
+
* as priced, and the server refuses to spend anything on a free ticket.
|
|
607
|
+
*/
|
|
608
|
+
function eventCanUseProducts(event) {
|
|
609
|
+
return event.requiresRegistration !== false && event.pricing.kind !== "free";
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
595
612
|
* Filter site passes to only those that cover the selected event.
|
|
596
613
|
*
|
|
597
614
|
* Public purchasable products are a pre-auth proxy for whether the pass path is
|
|
598
615
|
* worth advertising; owned pass eligibility is checked later after portal auth.
|
|
599
616
|
*/
|
|
600
617
|
function filterPassesForEvent(sitePasses, event) {
|
|
601
|
-
if (!sitePasses || !event) return [];
|
|
602
|
-
if (event.requiresRegistration === false) return [];
|
|
618
|
+
if (!sitePasses || !event || !eventCanUseProducts(event)) return [];
|
|
603
619
|
const eventCategoryId = event.eventCategory?.id ?? null;
|
|
604
620
|
return sitePasses.filter((pass) => pass.productUseCase === "event_pass" && passCoversEvent({ eligibleCategoryIds: pass.eligibleCategoryIds }, {
|
|
605
621
|
acceptsPasses: event.acceptsPasses,
|
|
@@ -614,8 +630,7 @@ function filterPassesForEvent(sitePasses, event) {
|
|
|
614
630
|
* after portal auth.
|
|
615
631
|
*/
|
|
616
632
|
function filterMembershipsForEvent(siteMemberships, event) {
|
|
617
|
-
if (!siteMemberships || !event) return [];
|
|
618
|
-
if (event.requiresRegistration === false) return [];
|
|
633
|
+
if (!siteMemberships || !event || !eventCanUseProducts(event)) return [];
|
|
619
634
|
const eventCategoryId = event.eventCategory?.id ?? null;
|
|
620
635
|
return siteMemberships.filter((membership) => membershipCoversEvent({ eligibleCategoryIds: membership.eligibleCategoryIds }, {
|
|
621
636
|
acceptsMemberships: event.acceptsMemberships,
|
|
@@ -774,7 +789,11 @@ function resolveEventDetailsPresentation(input) {
|
|
|
774
789
|
function wholeSeriesPriceOptions(pricing) {
|
|
775
790
|
return pricing.kind === "tiered" ? pricing.options.filter((option) => option.isActive) : [];
|
|
776
791
|
}
|
|
777
|
-
|
|
792
|
+
/** The price, with any deposit option said beside it. */
|
|
793
|
+
function PriceLine({ price, depositNote }) {
|
|
794
|
+
return /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("strong", { children: price }), depositNote ? `, ${depositNote}` : null] });
|
|
795
|
+
}
|
|
796
|
+
function WholeSeriesPricingDisplay({ pricing, depositNote, acceptedItems }) {
|
|
778
797
|
const options = wholeSeriesPriceOptions(pricing);
|
|
779
798
|
return /* @__PURE__ */ jsxs("div", {
|
|
780
799
|
className: "rb-mt-6",
|
|
@@ -794,7 +813,14 @@ function WholeSeriesPricingDisplay({ pricing, acceptedItems }) {
|
|
|
794
813
|
className: "rb-caption status-muted",
|
|
795
814
|
children: option.description
|
|
796
815
|
}) : null] }, option.id))
|
|
797
|
-
}) : /* @__PURE__ */ jsx(
|
|
816
|
+
}) : /* @__PURE__ */ jsx(PriceLine, {
|
|
817
|
+
price: formatBookingPriceDisplay(publicEventPricingDisplay(pricing), { decimals: "auto" }),
|
|
818
|
+
depositNote
|
|
819
|
+
}),
|
|
820
|
+
depositNote && options.length > 1 ? /* @__PURE__ */ jsxs("p", {
|
|
821
|
+
className: "rb-caption rb-mt-1",
|
|
822
|
+
children: [depositNote.charAt(0).toUpperCase(), depositNote.slice(1)]
|
|
823
|
+
}) : null,
|
|
798
824
|
acceptedItems.length > 0 ? /* @__PURE__ */ jsxs("p", {
|
|
799
825
|
className: "rb-caption rb-mt-1",
|
|
800
826
|
children: ["You can also attend with: ", acceptedItems.join(", ")]
|
|
@@ -817,7 +843,7 @@ function TeamMemberName({ name, profilePath }) {
|
|
|
817
843
|
}) : /* @__PURE__ */ jsx("strong", { children: name });
|
|
818
844
|
}
|
|
819
845
|
function formatTicketTypePrice(ticketType, currency) {
|
|
820
|
-
return
|
|
846
|
+
return formatBookingPriceDisplay(resolveExactOrFreePriceDisplay(ticketType.priceAmount, currency), { decimals: "auto" });
|
|
821
847
|
}
|
|
822
848
|
function getDisplayablePricingOptions(event) {
|
|
823
849
|
return event.pricing.kind === "tiered" ? event.pricing.options.filter(isPublicEventPricingOptionDisplayable).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
@@ -835,7 +861,7 @@ function TicketTypePriceList({ ticketTypes, currency }) {
|
|
|
835
861
|
}, ticketType.id))
|
|
836
862
|
});
|
|
837
863
|
}
|
|
838
|
-
function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItems, eventCostLabel, eventPricingCurrency, ticketTypes, autoApplyDiscount }) {
|
|
864
|
+
function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItems, eventCostLabel, depositNote, eventPricingCurrency, ticketTypes, autoApplyDiscount }) {
|
|
839
865
|
if (isDropIn) return /* @__PURE__ */ jsxs("div", {
|
|
840
866
|
className: "rb-mt-6",
|
|
841
867
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -848,6 +874,7 @@ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItem
|
|
|
848
874
|
});
|
|
849
875
|
if (wholeSeriesPricingDisplay) return /* @__PURE__ */ jsx(WholeSeriesPricingDisplay, {
|
|
850
876
|
pricing: wholeSeriesPricingDisplay,
|
|
877
|
+
depositNote,
|
|
851
878
|
acceptedItems: [...acceptedItems]
|
|
852
879
|
});
|
|
853
880
|
if (eventCostLabel) return /* @__PURE__ */ jsxs("div", {
|
|
@@ -857,7 +884,10 @@ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItem
|
|
|
857
884
|
className: "rb-label rb-mb-2",
|
|
858
885
|
children: "Cost"
|
|
859
886
|
}),
|
|
860
|
-
/* @__PURE__ */ jsx(
|
|
887
|
+
/* @__PURE__ */ jsx(PriceLine, {
|
|
888
|
+
price: eventCostLabel,
|
|
889
|
+
depositNote
|
|
890
|
+
}),
|
|
861
891
|
autoApplyDiscount && eventPricingCurrency ? /* @__PURE__ */ jsx("p", {
|
|
862
892
|
className: "rb-caption rb-mt-1",
|
|
863
893
|
children: formatAutoApplyDiscountLine(autoApplyDiscount, eventPricingCurrency)
|
|
@@ -880,7 +910,7 @@ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItem
|
|
|
880
910
|
})
|
|
881
911
|
}) : null;
|
|
882
912
|
}
|
|
883
|
-
function EventFacts({ selection, selected, venue, teamMembers, pricing, showCapacity, lookSlots }) {
|
|
913
|
+
function EventFacts({ selection, selected, venue, online, teamMembers, pricing, showCapacity, lookSlots }) {
|
|
884
914
|
const { date, timeRange } = formatEventDateParts({
|
|
885
915
|
startsAt: selected.startsAt,
|
|
886
916
|
endsAt: selected.endsAt,
|
|
@@ -902,7 +932,10 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing, showCapa
|
|
|
902
932
|
children: timeRange
|
|
903
933
|
})
|
|
904
934
|
] }),
|
|
905
|
-
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
935
|
+
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
936
|
+
venue,
|
|
937
|
+
online
|
|
938
|
+
}),
|
|
906
939
|
/* @__PURE__ */ jsx(EventTeacherFacts, { teamMembers }),
|
|
907
940
|
showCapacity && selected.capacity != null ? /* @__PURE__ */ jsxs("div", {
|
|
908
941
|
className: "rb-mt-6",
|
|
@@ -919,8 +952,26 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing, showCapa
|
|
|
919
952
|
]
|
|
920
953
|
});
|
|
921
954
|
}
|
|
922
|
-
|
|
923
|
-
|
|
955
|
+
const eventOnlinePlaceShown = (event, showVenue) => showVenue ? eventOnlinePlace(event) : null;
|
|
956
|
+
/** An online event says so where a venue would go; a hybrid one adds it under the venue. */
|
|
957
|
+
function EventVenueFact({ venue, online }) {
|
|
958
|
+
if (!venue) {
|
|
959
|
+
if (!online) return null;
|
|
960
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
961
|
+
className: "rb-mt-6",
|
|
962
|
+
children: [
|
|
963
|
+
/* @__PURE__ */ jsx("div", {
|
|
964
|
+
className: "rb-label rb-mb-2",
|
|
965
|
+
children: "Venue"
|
|
966
|
+
}),
|
|
967
|
+
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: online.mode === "online" ? "Online" : "In person or online" }) }),
|
|
968
|
+
online.note ? /* @__PURE__ */ jsx("p", {
|
|
969
|
+
className: "rb-caption",
|
|
970
|
+
children: online.note
|
|
971
|
+
}) : null
|
|
972
|
+
]
|
|
973
|
+
});
|
|
974
|
+
}
|
|
924
975
|
const { place, addressWithBooking } = eventVenuePlace(venue);
|
|
925
976
|
return /* @__PURE__ */ jsxs("div", {
|
|
926
977
|
className: "rb-mt-6",
|
|
@@ -940,7 +991,11 @@ function EventVenueFact({ venue }) {
|
|
|
940
991
|
}) : /* @__PURE__ */ jsx(LocationMapActions, {
|
|
941
992
|
location: venue.location,
|
|
942
993
|
addressText: venue.address
|
|
943
|
-
})
|
|
994
|
+
}),
|
|
995
|
+
online ? /* @__PURE__ */ jsxs("p", {
|
|
996
|
+
className: "rb-caption rb-mt-1",
|
|
997
|
+
children: ["You can also join online.", online.note ? ` ${online.note}` : ""]
|
|
998
|
+
}) : null
|
|
944
999
|
]
|
|
945
1000
|
});
|
|
946
1001
|
}
|
|
@@ -1092,21 +1147,27 @@ function EventVenueMap({ venue, drawing, showMap, mapHeight, mapClassName }) {
|
|
|
1092
1147
|
}
|
|
1093
1148
|
/** One pricing projection governs the selected panel, including drop-in and whole-series behavior. */
|
|
1094
1149
|
function selectedEventPricing(event, showCost) {
|
|
1095
|
-
const isDropIn = event
|
|
1096
|
-
const wholeSeriesPricing = event
|
|
1097
|
-
const showEventCost = showCost &&
|
|
1150
|
+
const isDropIn = isDropInEvent(event);
|
|
1151
|
+
const wholeSeriesPricing = wholeSeriesPricingOf(event);
|
|
1152
|
+
const showEventCost = showCost && !isDropIn && wholeSeriesPricing === null;
|
|
1098
1153
|
return {
|
|
1099
1154
|
isDropIn,
|
|
1100
1155
|
wholeSeriesPricingDisplay: showCost ? wholeSeriesPricing : null,
|
|
1101
1156
|
eventCostLabel: showEventCost ? formatEventPrice(event) : null,
|
|
1157
|
+
depositNote: showCost && !isDropIn ? paidDepositNote(event) : null,
|
|
1102
1158
|
eventPricingCurrency: publicEventPricingCurrency(event.pricing),
|
|
1103
|
-
ticketTypes: showEventCost ? getDisplayablePricingOptions(event) : []
|
|
1159
|
+
ticketTypes: showEventCost && isPaid(event) ? getDisplayablePricingOptions(event) : []
|
|
1104
1160
|
};
|
|
1105
1161
|
}
|
|
1162
|
+
const isDropInEvent = (event) => event.bookingScope === "single_occurrence" && event.requiresRegistration === false;
|
|
1163
|
+
const wholeSeriesPricingOf = (event) => event.bookingScope === "whole_series" && event.pricing.kind !== "external" ? event.pricing : null;
|
|
1164
|
+
const isPaid = (event) => publicEventPricingType(event.pricing) !== "free";
|
|
1165
|
+
const paidDepositNote = (event) => isPaid(event) ? formatEventDepositNote(event.pricing, event.paymentTerms, event) : null;
|
|
1106
1166
|
function SelectedEventDetailsView(props) {
|
|
1107
1167
|
const { selection, showVenue, showMap, showOtherDates, showTitle, showDescription, showCapacity, mapHeight, mapClassName, acceptedItems } = props;
|
|
1108
1168
|
const selected = selection.selected;
|
|
1109
1169
|
const venue = showVenue ? selected.venue : void 0;
|
|
1170
|
+
const online = eventOnlinePlaceShown(selected, showVenue);
|
|
1110
1171
|
const pricing = selectedEventPricing(selected, props.showCost);
|
|
1111
1172
|
return /* @__PURE__ */ jsxs("div", {
|
|
1112
1173
|
className: "rb-flex rb-flex-col rb-gap-6 rb-text-left",
|
|
@@ -1124,6 +1185,7 @@ function SelectedEventDetailsView(props) {
|
|
|
1124
1185
|
selection,
|
|
1125
1186
|
selected,
|
|
1126
1187
|
venue,
|
|
1188
|
+
online,
|
|
1127
1189
|
showCapacity,
|
|
1128
1190
|
teamMembers: selected.teamMembers ?? [],
|
|
1129
1191
|
pricing: /* @__PURE__ */ jsx(EventPricingDetails, {
|
|
@@ -1216,11 +1278,14 @@ function EventHeaderPanel(props) {
|
|
|
1216
1278
|
})
|
|
1217
1279
|
});
|
|
1218
1280
|
}
|
|
1219
|
-
function HeaderPanelFacts({ venue, teamMembers, pricing }) {
|
|
1281
|
+
function HeaderPanelFacts({ venue, online, teamMembers, pricing }) {
|
|
1220
1282
|
return /* @__PURE__ */ jsxs("div", {
|
|
1221
1283
|
className: "rb-flex rb-flex-col rb-gap-4",
|
|
1222
1284
|
children: [
|
|
1223
|
-
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
1285
|
+
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
1286
|
+
venue,
|
|
1287
|
+
online
|
|
1288
|
+
}),
|
|
1224
1289
|
/* @__PURE__ */ jsx(EventTeacherFacts, { teamMembers }),
|
|
1225
1290
|
pricing ? /* @__PURE__ */ jsx(EventPricingDetails, { ...pricing }) : null
|
|
1226
1291
|
]
|
|
@@ -1230,15 +1295,17 @@ function HeaderPanelFacts({ venue, teamMembers, pricing }) {
|
|
|
1230
1295
|
function headerPanelContent(props) {
|
|
1231
1296
|
const { selection } = props;
|
|
1232
1297
|
const venue = props.showVenue ? selection.selected.venue : void 0;
|
|
1298
|
+
const online = eventOnlinePlaceShown(selection.selected, props.showVenue);
|
|
1233
1299
|
const teamMembers = selection.selected.teamMembers ?? [];
|
|
1234
1300
|
const pricing = headerPanelPricing(props, selection.selected);
|
|
1235
1301
|
const scheduled = selection.kind === "wholeSeries" ? selection.sessions.length : selection.otherDates.length;
|
|
1236
1302
|
return {
|
|
1237
1303
|
venue,
|
|
1304
|
+
online,
|
|
1238
1305
|
teamMembers,
|
|
1239
1306
|
pricing,
|
|
1240
1307
|
hasMap: Boolean(props.showMap && venue && props.selectedVenueDrawing),
|
|
1241
|
-
hasFacts: Boolean(venue) || teamMembers.length > 0 || pricing !== null,
|
|
1308
|
+
hasFacts: Boolean(venue) || online !== null || teamMembers.length > 0 || pricing !== null,
|
|
1242
1309
|
hasDates: props.showOtherDates && scheduled > 0
|
|
1243
1310
|
};
|
|
1244
1311
|
}
|
|
@@ -1252,6 +1319,7 @@ function headerPanelPricing(props, event) {
|
|
|
1252
1319
|
if (pricing.isDropIn) return null;
|
|
1253
1320
|
const detail = {
|
|
1254
1321
|
...pricing,
|
|
1322
|
+
depositNote: null,
|
|
1255
1323
|
acceptedItems: acceptedProductNames(props),
|
|
1256
1324
|
autoApplyDiscount: props.autoApplyDiscount ?? null
|
|
1257
1325
|
};
|
package/dist/preview-next/client/{PageSectionToolbar-BFbSrDbi.mjs → PageSectionToolbar-bq7gbKvn.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 { $s as DialogHeader, Bl as formatAspectRatioToken, Bs as unwrapResponse, Cc as __read, Ci as resolveImageUrlWithContext, E as selectedImageFromRenderableAsset, Ec as __spreadArrays, F as lookTilePosition, Gs as Callout, Hl as resolveMediaTransformForAspect, Ja as RichTextDocSchema, Jc as createContextScope, Js as Dialog, Kc as useControllableState, L as nextLookTilePin, P as lookPositionLabel, Qc as Button, Ql as mediaIdentifierSchema, Qo as getGradientPreset, Rc as useSize, Rl as isRotationDimensionSwap, S as pageDesignLookPosition, Sc as __generator, T as selectedImageFromMediaValue, Tc as __spreadArray, Ti as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Ul as getDirectImageUrlForMediaAsset, Vl as parseAspectRatioValue, Vs as selectedCanvasBlockId, Wl as getImageUrl, Wo as getCuratedSiteStyle, Xa as richTextVariantCapabilities, Xc as Primitive, Xl as resolveManagedMediaReference, Xo as gradientToCss, Xs as DialogContent$1, Yc as composeEventHandlers, Yi as readThemeScopeContext, Yu as unsafeAsEditorBlockId, Zs as DialogDescription$1, _c as usePortalContainer, _o as replaceInlineTextRange, ac as DialogContent, al as useComposedRefs, an as getDashboardBaseUrl, bc as __awaiter, bi as getRichTextImageSize, bn as useEditorUiStoreInstance, cc as DialogPortal, co as inlineTextEqual, ec as DialogTitle$1, el as useControlReadiness, er as backgroundColorTokens, fo as normalizeInlineText, go as removeInlineTextMarkFromRange, ho as plainTextToInlineText, i as usePreviewSidebarNavigation, ic as DialogClose, id as assertNever, io as applyInlineTextMarkToRange, iu as asLayoutVariantKey, j as usePreviewRenderBackgrounds, kl as surfaceForegroundValue, lc as DialogTitle, lo as inlineTextHighlightTones, lr as rankBackgroundImagePoolItems, nc as overlayScrimClass, ni as getBlockDefinition, nr as defaultBackgroundOverrideForMode, o as usePreviewPageDesignEditorState, oc as DialogDescription, od as unsafeAsMediaAssetId, ol as cn$2, ou as authoredValuesEqual, po as normalizeInlineTextMarks, ps as assertNever$1, sc as DialogOverlay, sd as unsafeAsPositiveByteCount, so as inlineTextAccentTones, su as generateUuidV4, tl as cva, uo as inlineTextToPlainText, vo as truncateInlineText, wc as __rest, wi as resolveMediaStorageUrl, x as cyclePageDesignBlockLook, xc as __extends, xi as computeMediaTransformStyle, yc as __assign, yn as useEditorUiStore, zl as normalizeRightAngle } from "./previewAssistantSlot-B61mZd81.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-BZDIC-fA.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-BEXcWQeI.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),
|