@riverbankcms/sdk 0.154.0 → 0.155.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{EventEmbeddedCheckoutStep-ba9npQtb.mjs → EventEmbeddedCheckoutStep-DALtAjqG.mjs} +1 -1
- package/dist/{PreviewEditorSidebar-C7FiaxlF.mjs → PreviewEditorSidebar-CbSbqmz3.mjs} +29 -20
- package/dist/{PreviewEditorUI-DFst50q1.mjs → PreviewEditorUI-CKKnAw11.mjs} +9 -17
- package/dist/{SdkPreviewModeRuntime-BUNV_YHZ.mjs → SdkPreviewModeRuntime-wLkXrWy9.mjs} +132 -56
- package/dist/{SiteChromeCustomizeContext-DEj7qppF.mjs → SiteChromeCustomizeContext-BQ8vvKb-.mjs} +6324 -3566
- package/dist/{ThemedButton-C8kzu0hY.mjs → ThemedButton-Bi0rgijy.mjs} +83 -5
- package/dist/_dts/ai/src/contracts/proposals.d.ts +42213 -16421
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +3322 -258
- package/dist/_dts/api/src/bookingConfig.d.ts +4 -12
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +2 -2
- package/dist/_dts/api/src/bookingOperations.d.ts +4 -0
- package/dist/_dts/api/src/bookingPeople.d.ts +1 -1
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -0
- package/dist/_dts/api/src/bookings.d.ts +8 -1
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/common/envelope.d.ts +2 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +4 -3
- package/dist/_dts/api/src/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/eventManagementContracts.d.ts +20 -11
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/index.d.ts +5 -2
- package/dist/_dts/api/src/privacyPolicy.d.ts +20 -2
- package/dist/_dts/api/src/public/types.d.ts +1 -0
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +1 -0
- package/dist/_dts/api/src/publicBookingService.d.ts +1 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/sdk-event-management.d.ts +1 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +22 -7
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +5 -3
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +15 -4
- package/dist/_dts/api/src/sdkThemeWire.d.ts +10 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -2
- package/dist/_dts/api/src/siteTerms.d.ts +100 -0
- package/dist/_dts/api/src/types.d.ts +2 -1
- package/dist/_dts/api/src/webhooks.d.ts +9 -9
- package/dist/_dts/block-form/src/client/index.d.ts +2 -1
- package/dist/_dts/block-form/src/widgets/DateField/DateField.d.ts +3 -1
- package/dist/_dts/block-form/src/widgets/DateField/datePickerPopover.d.ts +3 -1
- package/dist/_dts/block-form/src/widgets/DateTimeField/DateTimeField.d.ts +3 -1
- package/dist/_dts/blocks/src/client/carousel.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +12 -33
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +22 -22
- package/dist/_dts/blocks/src/index.d.ts +2 -2
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +1 -0
- package/dist/_dts/blocks/src/pageRenderPlan.d.ts +8 -1
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +1 -0
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +9 -5
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/catalogue.d.ts +7 -1
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/index.d.ts +14 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/itemData.d.ts +12 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +56 -6
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/photoCount.d.ts +3 -12
- package/dist/_dts/blocks/src/system/blocks/shared/siteTerms.d.ts +17 -0
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +44 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +3 -1
- package/dist/_dts/blocks/src/system/node/fragments/backgroundLayer.d.ts +6 -0
- package/dist/_dts/blocks/src/system/node/fragments/lookSlot.d.ts +22 -3
- package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +33 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFlowController.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingSubmission.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useSiteTermsAgreement.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useSiteTermsAgreement.state.d.ts +42 -0
- package/dist/_dts/blocks/src/system/runtime/lookSurfaces.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +6 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.client.d.ts +5 -30
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.server.d.ts +3 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.shared.d.ts +71 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/lookPresentation.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/CalendarAction.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/bookingCalendar.d.ts +16 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/finishedBooking.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +42 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CardListItem.d.ts +26 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventItem.d.ts +17 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCardListContent.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +20 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/gifting.interactive.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview-catalogue.d.ts +5 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview-content.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/SiteTermsAgreementField.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/shared/siteTermsAgreement.d.ts +81 -0
- package/dist/_dts/blocks/src/system/runtime/shared/siteTermsCheckoutApi.d.ts +14 -0
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +2 -0
- package/dist/_dts/blocks/src/system/types/link.d.ts +2 -0
- package/dist/_dts/calendar/src/icsRenderer.d.ts +23 -0
- package/dist/_dts/calendar/src/index.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/types.d.ts +5 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +3 -1
- package/dist/_dts/content-editor/src/controller/publicationDate.d.ts +5 -0
- package/dist/_dts/content-model/src/content-types/entryValidation.d.ts +6 -5
- package/dist/_dts/content-model/src/content-types/schema.d.ts +4 -0
- package/dist/_dts/content-model/src/contentManifest.d.ts +10 -2
- package/dist/_dts/content-model/src/definitions/shared.d.ts +2 -0
- package/dist/_dts/core/src/booking-date-time.d.ts +5 -0
- package/dist/_dts/core/src/booking-refunds.d.ts +43 -2
- package/dist/_dts/core/src/branded.d.ts +6 -0
- package/dist/_dts/core/src/date-display.d.ts +7 -2
- package/dist/_dts/core/src/index.d.ts +3 -2
- package/dist/_dts/core/src/site-terms.d.ts +94 -0
- package/dist/_dts/core/src/whole-series-run-schedule.d.ts +2 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +306 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +16 -16
- package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +2 -2
- package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +3 -2
- package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/link/LinkContentList.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPicker.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPickerDialog.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/link/draft.d.ts +6 -1
- package/dist/_dts/editor-blocks/src/widgets/link/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/arrangementControlsModel.d.ts +8 -1
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeControlPlan.d.ts +4 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -0
- package/dist/_dts/sdk/src/config/typed-entry-links.test-d.d.ts +1 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -4
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +3 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/quietArrow.d.ts +12 -8
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +12 -8
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/containerSchema.d.ts +1 -0
- package/dist/_dts/theme-core/src/header/generateHeaderCss.d.ts +3 -0
- package/dist/_dts/theme-core/src/inputs/checkable.d.ts +6 -0
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +15 -0
- package/dist/_dts/theme-core/src/schema.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +3 -2
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +56 -1
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -2
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +13 -1
- package/dist/_dts/theme-core/src/site-styles/lookResolution.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/runtimeBackgroundResolution.d.ts +5 -0
- package/dist/_dts/theme-core/src/site-styles/siteStyleTypography.d.ts +46 -0
- package/dist/_dts/theme-core/src/status/generateStatusCss.d.ts +4 -1
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +2 -0
- package/dist/_dts/theme-core/src/typography/schema.d.ts +9 -0
- package/dist/_dts/ui/src/calendar.d.ts +6 -1
- package/dist/_dts/ui/src/index.d.ts +1 -1
- package/dist/client/{BookingMailingListNote-CNoSqFtf.mjs → BookingMailingListNote-CiW1dsz7.mjs} +3 -3
- package/dist/client/{CardListItem-BkTkqBkh.mjs → CardListItem-DVYTlYpS.mjs} +70 -13
- package/dist/client/CheckboxChoice-CUnPrBlC.mjs +44 -0
- package/dist/client/DemoBookingPortalAccess-DEsn5F2C.mjs +770 -0
- package/dist/client/{EventCombined.client-BgeYMjHJ.mjs → EventCombined.client-BdctbwnV.mjs} +5 -5
- package/dist/client/{EventEmbeddedCheckoutStep-BTc_lTkM.mjs → EventEmbeddedCheckoutStep-DAhQs6Jb.mjs} +2 -5
- package/dist/client/{EventListing.client-ChRs9Hl2.mjs → EventListing.client-BviZXfAE.mjs} +2 -2
- package/dist/client/{mailingListSignupCopy-DZSHZrm6.mjs → FieldValidationMessage-AYanWFb-.mjs} +1 -14
- package/dist/client/{LeafletStaticMap-C_dNQgd0.mjs → LeafletStaticMap-BLTECfjU.mjs} +1 -1
- package/dist/client/{RichText-BI9bzbjo.mjs → RichText-D3oE1_pw.mjs} +4 -4
- package/dist/client/ThemedButton-Ckj0Rfr_.mjs +1256 -0
- package/dist/client/{accordion-6Yz8Wd83.mjs → accordion-yBx6d4O2.mjs} +1 -1
- package/dist/client/{bookingForm-i_pKIGiY.mjs → bookingForm-CPDEsQci.mjs} +64 -35
- package/dist/client/bookings.mjs +6572 -3274
- package/dist/client/carousel-DCqjwd2s.mjs +71 -0
- package/dist/client/{carousel.client-BUgjPbb6.mjs → carousel.client-Bx7XMF8-.mjs} +114 -39
- package/dist/client/{cart-D8OBHuF4.mjs → cart-DWJXrQxs.mjs} +3 -3
- package/dist/client/{checkout-F3-9IGLU.mjs → checkout-CH4ypSLS.mjs} +3 -3
- package/dist/client/client.mjs +7379 -2504
- package/dist/client/{context-Dg4ZrxDD.mjs → context-BOs0m_iw.mjs} +16 -12
- package/dist/client/{eventCalendar-BUc7YIBM.mjs → eventCalendar-CRylMllc.mjs} +8 -319
- package/dist/client/{eventCombined-BwfShk2a.mjs → eventCombined-DohTS3kp.mjs} +4 -4
- package/dist/client/{eventDetails-BMOVC3go.mjs → eventDetails-qf-u9zcF.mjs} +108 -36
- package/dist/client/{eventListing-BwE9PM-t.mjs → eventListing-Cg__X2vy.mjs} +4 -4
- package/dist/client/{eventRegistration-CCWPYDc7.mjs → eventRegistration-CybWxswy.mjs} +215 -237
- package/dist/client/{form-CXFr0Gd5.mjs → form-C-SGk6nq.mjs} +4 -4
- package/dist/client/{headerSection-BX8qw8kH.mjs → headerSection-BdzPaHqo.mjs} +3 -3
- package/dist/client/hooks.mjs +1283 -213
- package/dist/client/{locationMap-B3La71m0.mjs → locationMap-CEwIKmMb.mjs} +3 -3
- package/dist/client/mailingListSignupCopy-DS-_ePzG.mjs +14 -0
- package/dist/client/{media-B1Cbv721.mjs → media-V_ShXXru.mjs} +3 -3
- package/dist/client/{mediaContext-CwbbimYB.mjs → mediaContext-D-0tNVxE.mjs} +1 -1
- package/dist/client/{newsletterForm-DnGyR0x7.mjs → newsletterForm-CmwTltoS.mjs} +5 -4
- package/dist/client/{productDetail-BVgTqvkb.mjs → productDetail-DjIzUwg3.mjs} +3 -3
- package/dist/client/{productList-CcO7kUQw.mjs → productList-D6JGFnMF.mjs} +3 -3
- package/dist/client/{propsDecoder-B1OeWavE.mjs → propsDecoder-BRKz13eg.mjs} +5110 -2504
- package/dist/client/{renderableMediaAssetAdmission-CHkXYDC_.mjs → renderableMediaAssetAdmission-Cd3JSw2H.mjs} +3 -1
- package/dist/client/rendering/client.mjs +6176 -2738
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +7656 -2726
- package/dist/client/{routeIslandApiConfig-Dl4vglJm.mjs → routeIslandApiConfig-slAAILQ5.mjs} +1 -1
- package/dist/client/{shop-P72nX5Fs.mjs → shop-C45K96_0.mjs} +178 -157
- package/dist/client/{shop-commerce-Bt7uraDx.mjs → shop-commerce-oGBiKT5d.mjs} +23 -10
- package/dist/client/{shop-commerce-store-C1-mxSye.mjs → shop-commerce-store-H_HFPFZ8.mjs} +1 -1
- package/dist/client/{shopShared-Db-cRGu3.mjs → shopShared-D54T_LAV.mjs} +5 -5
- package/dist/client/{useDiscountCodeUi-jvAiUoUX.mjs → useDiscountCodeUi-Dm2EUa03.mjs} +1 -1
- package/dist/client/{useEventPagination-BdWpCniq.mjs → useEventPagination-0l_A8CxG.mjs} +62 -24
- package/dist/preview-next/before-render.mjs +1 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/keepAlive.mjs +1 -0
- package/dist/preview-next/middleware.mjs +1 -0
- package/dist/{sdk-runtime-DLhjF2Nw.mjs → sdk-runtime-CjTM32Ah.mjs} +1 -1
- package/dist/server/components.mjs +4514 -1408
- package/dist/server/config-validation.mjs +1181 -179
- package/dist/server/config.mjs +1147 -177
- package/dist/server/data.mjs +1204 -180
- package/dist/server/date-time.mjs +18 -7
- package/dist/server/index.mjs +4 -1
- package/dist/server/next.mjs +4533 -1429
- package/dist/server/page-converter.mjs +1054 -173
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3775 -1015
- package/dist/server/rendering.mjs +4540 -1425
- package/dist/server/routing.mjs +1321 -247
- package/dist/server/server.mjs +1296 -215
- package/dist/server/theme-bridge.mjs +1864 -73
- package/dist/server/theme.mjs +74 -3
- package/dist/{spinner-MTooKfck.mjs → spinner-KVVZh8jd.mjs} +1 -1
- package/dist/src-BgmWy3P1.mjs +1667 -0
- package/dist/styles/index.css +942 -1
- package/package.json +1 -1
- package/dist/client/CheckboxChoice-CHJpsty4.mjs +0 -24
- package/dist/client/DemoBookingPortalAccess-C7KQKFNt.mjs +0 -344
- package/dist/client/ThemedButton-wl3Z3wkH.mjs +0 -411
- package/dist/client/carousel-DNqd_PjC.mjs +0 -38
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Mr as blockSiteTermsSchema, ci as confirmationPaymentSchema, hn as calendarWindowPageSchema } from "./propsDecoder-BRKz13eg.mjs";
|
|
3
3
|
import { createContext, useContext, useMemo } from "react";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -682,6 +682,11 @@ const PORTAL = {
|
|
|
682
682
|
skipPreviewStage: true
|
|
683
683
|
}
|
|
684
684
|
};
|
|
685
|
+
/** Existing public site runtime read, used to refresh a stale checkout projection. */
|
|
686
|
+
const SITES = { runtime: {
|
|
687
|
+
path: "/sites",
|
|
688
|
+
method: "GET"
|
|
689
|
+
} };
|
|
685
690
|
//#endregion
|
|
686
691
|
//#region ../blocks/src/system/runtime/api/client.ts
|
|
687
692
|
/**
|
|
@@ -1139,16 +1144,7 @@ function createBlockApi(config) {
|
|
|
1139
1144
|
const path = buildPath(SHOP.checkout.path, { siteId: sid });
|
|
1140
1145
|
return request(SHOP.checkout, {
|
|
1141
1146
|
path,
|
|
1142
|
-
body:
|
|
1143
|
-
productType: data.productType,
|
|
1144
|
-
productId: data.productId,
|
|
1145
|
-
customerEmail: data.customerEmail,
|
|
1146
|
-
customerName: data.customerName,
|
|
1147
|
-
discountCode: data.discountCode,
|
|
1148
|
-
successUrl: data.successUrl,
|
|
1149
|
-
cancelUrl: data.cancelUrl,
|
|
1150
|
-
confirmDuplicate: data.confirmDuplicate
|
|
1151
|
-
}
|
|
1147
|
+
body: data
|
|
1152
1148
|
});
|
|
1153
1149
|
},
|
|
1154
1150
|
async createUnifiedCheckout(data) {
|
|
@@ -1199,8 +1195,16 @@ function createBlockApi(config) {
|
|
|
1199
1195
|
}
|
|
1200
1196
|
});
|
|
1201
1197
|
},
|
|
1198
|
+
async getSiteTerms() {
|
|
1199
|
+
const schema = z.object({ siteTerms: blockSiteTermsSchema.optional() });
|
|
1200
|
+
return (await request(SITES.runtime, {
|
|
1201
|
+
query: { id: requireSiteId() },
|
|
1202
|
+
skipDedup: true,
|
|
1203
|
+
decoder: schema
|
|
1204
|
+
})).siteTerms ?? { kind: "none" };
|
|
1205
|
+
},
|
|
1202
1206
|
async getPortalProfile() {
|
|
1203
|
-
return request(PORTAL.getProfile);
|
|
1207
|
+
return request(PORTAL.getProfile, { skipDedup: true });
|
|
1204
1208
|
},
|
|
1205
1209
|
async getPortalCredit() {
|
|
1206
1210
|
return (await request(PORTAL.getCredit)).credit;
|
|
@@ -1,326 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { i as useEventCollectionFilters, o as EventItem, s as formatEventTeacherLine } from "./useEventPagination-
|
|
5
|
-
import {
|
|
6
|
-
import { a as WeekAgendaView, c as CalendarDayCell, d as EventModalProvider, f as useEventModal, h as resolveMonthSelectedDay, i as useHydrationReady, l as useCalendarEvents, m as buildMonthDay, o as CalendarNavigationChevron, p as useCalendarToday, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useCalendarViewport } from "./EventCombined.client-
|
|
7
|
-
import { t as BlockApiProvider } from "./context-
|
|
2
|
+
import { Br as getDayOfWeek, Fr as buildTimetableModel$1, Ir as MONTH_NAMES, Jn as isEventFull, Kn as getEventAvailabilityStatus, Ln as formatTime, Mn as formatDate, Qn as listItemPresentation, Rn as groupEventsByDate, Tn as buildEventListWeek, Un as formatEventRemainingPlaces, Ur as isToday, Vr as getOrderedDayNames, _n as resolveCalendarReadProfile, bn as buildEventRuntimeFilters, er as listLookSlot, ii as clsx, kn as eventDateLocale, t as defineIslandPropsDecoder, tn as buildEventCalendarListingRender, zn as resolveEventTimeZone, zr as formatDateKey } from "./propsDecoder-BRKz13eg.mjs";
|
|
3
|
+
import { n as ThemedButton, r as ThemedButtonLink } from "./ThemedButton-Ckj0Rfr_.mjs";
|
|
4
|
+
import { i as useEventCollectionFilters, o as EventItem, s as formatEventTeacherLine } from "./useEventPagination-0l_A8CxG.mjs";
|
|
5
|
+
import { o as resolveEventLinkProps } from "./CardListItem-DVYTlYpS.mjs";
|
|
6
|
+
import { a as WeekAgendaView, c as CalendarDayCell, d as EventModalProvider, f as useEventModal, h as resolveMonthSelectedDay, i as useHydrationReady, l as useCalendarEvents, m as buildMonthDay, o as CalendarNavigationChevron, p as useCalendarToday, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useCalendarViewport } from "./EventCombined.client-BdctbwnV.mjs";
|
|
7
|
+
import { t as BlockApiProvider } from "./context-BOs0m_iw.mjs";
|
|
8
8
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
9
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
10
|
-
import { n as EventListingController } from "./EventListing.client-
|
|
9
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-slAAILQ5.mjs";
|
|
10
|
+
import { n as EventListingController } from "./EventListing.client-BviZXfAE.mjs";
|
|
11
11
|
import React, { useEffect, useMemo, useState } from "react";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
//#region ../calendar/src/lane-packing.ts
|
|
14
|
-
/**
|
|
15
|
-
* Assign lanes to a list of intervals.
|
|
16
|
-
*
|
|
17
|
-
* Returns one result per input in the same order as the input. Internally
|
|
18
|
-
* sorts a copy by `(start, end, orderKey)` to ensure determinism, then
|
|
19
|
-
* permutes results back to input order.
|
|
20
|
-
*/
|
|
21
|
-
function assignLanes(intervals) {
|
|
22
|
-
if (intervals.length === 0) return [];
|
|
23
|
-
const indexed = intervals.map((interval, index) => ({
|
|
24
|
-
interval,
|
|
25
|
-
index
|
|
26
|
-
}));
|
|
27
|
-
indexed.sort((left, right) => left.interval.start - right.interval.start || left.interval.end - right.interval.end || left.interval.orderKey.localeCompare(right.interval.orderKey));
|
|
28
|
-
const results = new Array(intervals.length);
|
|
29
|
-
let cluster = [];
|
|
30
|
-
let activeLaneEnds = [];
|
|
31
|
-
let clusterMaxEnd = -Infinity;
|
|
32
|
-
const closeCluster = () => {
|
|
33
|
-
if (cluster.length === 0) return;
|
|
34
|
-
const laneCount = Math.max(1, cluster.reduce((max, entry) => Math.max(max, entry.laneIndex + 1), 0));
|
|
35
|
-
for (const entry of cluster) results[entry.index] = {
|
|
36
|
-
laneIndex: entry.laneIndex,
|
|
37
|
-
laneCount
|
|
38
|
-
};
|
|
39
|
-
cluster = [];
|
|
40
|
-
activeLaneEnds = [];
|
|
41
|
-
clusterMaxEnd = -Infinity;
|
|
42
|
-
};
|
|
43
|
-
for (const { interval, index } of indexed) {
|
|
44
|
-
if (interval.start >= clusterMaxEnd) closeCluster();
|
|
45
|
-
const laneIndex = firstAvailableLane(activeLaneEnds, interval.start);
|
|
46
|
-
activeLaneEnds[laneIndex] = interval.end;
|
|
47
|
-
clusterMaxEnd = Math.max(clusterMaxEnd, interval.end);
|
|
48
|
-
cluster.push({
|
|
49
|
-
index,
|
|
50
|
-
laneIndex
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
closeCluster();
|
|
54
|
-
return results;
|
|
55
|
-
}
|
|
56
|
-
function firstAvailableLane(activeLaneEnds, start) {
|
|
57
|
-
const laneIndex = activeLaneEnds.findIndex((end) => end <= start);
|
|
58
|
-
return laneIndex >= 0 ? laneIndex : activeLaneEnds.length;
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region ../calendar/src/timetable.ts
|
|
62
|
-
/**
|
|
63
|
-
* Timetable model — the package's core surface.
|
|
64
|
-
*
|
|
65
|
-
* Generic over `T`. Takes a list of timed items + a viewport; returns a
|
|
66
|
-
* day-by-day layout with overlap-packed lanes and percent-based positions
|
|
67
|
-
* plus a diagnostics list for items dropped during processing.
|
|
68
|
-
*
|
|
69
|
-
* The function is pure: given identical input (including `now`), it returns
|
|
70
|
-
* the same output. The model has no opinion on what an item is — pass
|
|
71
|
-
* accessors.
|
|
72
|
-
*/
|
|
73
|
-
const DEFAULT_BOUNDS = {
|
|
74
|
-
minStartHour: 5,
|
|
75
|
-
maxEndHour: 23,
|
|
76
|
-
defaultStartHour: 6,
|
|
77
|
-
defaultEndHour: 21,
|
|
78
|
-
minHeightPercent: 2.5
|
|
79
|
-
};
|
|
80
|
-
function buildTimetableModel$1(input) {
|
|
81
|
-
const bounds = resolveBounds(input.bounds);
|
|
82
|
-
const viewportDays = getTimetableDays(input.viewDate, input.view ?? "week", input.startOfWeek);
|
|
83
|
-
const viewportKeys = new Set(viewportDays.map(formatDateKey));
|
|
84
|
-
const parsed = parseAllItems(input.items, input);
|
|
85
|
-
const inViewport = deriveVisibleSegments(parsed.drafts, viewportKeys);
|
|
86
|
-
const hourRange = resolveHourRange(inViewport, bounds);
|
|
87
|
-
const laid = layoutCellsByDate(inViewport, hourRange, bounds);
|
|
88
|
-
return {
|
|
89
|
-
days: assembleDays(viewportDays, laid.cellsByDate, input.today),
|
|
90
|
-
hourTicks: buildHourTicks(hourRange.startHour, hourRange.endHour),
|
|
91
|
-
startHour: hourRange.startHour,
|
|
92
|
-
endHour: hourRange.endHour,
|
|
93
|
-
rangeMinutes: (hourRange.endHour - hourRange.startHour) * 60,
|
|
94
|
-
hasItems: inViewport.length > 0,
|
|
95
|
-
diagnostics: [...parsed.diagnostics, ...laid.diagnostics]
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function parseAllItems(items, accessors) {
|
|
99
|
-
const drafts = [];
|
|
100
|
-
const diagnostics = [];
|
|
101
|
-
for (const item of items) {
|
|
102
|
-
const result = parseDraft(item, accessors);
|
|
103
|
-
if (result.ok) drafts.push(result.draft);
|
|
104
|
-
else diagnostics.push({
|
|
105
|
-
item,
|
|
106
|
-
reason: result.reason
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return {
|
|
110
|
-
drafts,
|
|
111
|
-
diagnostics
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
function layoutCellsByDate(segments, hourRange, bounds) {
|
|
115
|
-
const rangeMinutes = (hourRange.endHour - hourRange.startHour) * 60;
|
|
116
|
-
const rangeStartMinutes = hourRange.startHour * 60;
|
|
117
|
-
const rangeEndMinutes = hourRange.endHour * 60;
|
|
118
|
-
const segmentsByDate = groupSegmentsByDate(segments);
|
|
119
|
-
const cellsByDate = /* @__PURE__ */ new Map();
|
|
120
|
-
const diagnostics = [];
|
|
121
|
-
for (const [dateKey, daySegments] of segmentsByDate) {
|
|
122
|
-
const clipped = [];
|
|
123
|
-
for (const segment of daySegments) {
|
|
124
|
-
const result = clipDraft(segment, rangeStartMinutes, rangeEndMinutes);
|
|
125
|
-
if (result.ok) clipped.push(result.clipped);
|
|
126
|
-
else diagnostics.push({
|
|
127
|
-
item: segment.draft.item,
|
|
128
|
-
reason: result.reason
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
const laneResults = assignLanes(clipped.map((entry) => ({
|
|
132
|
-
start: entry.visibleStart,
|
|
133
|
-
end: entry.visibleEnd,
|
|
134
|
-
orderKey: entry.segment.draft.orderKey
|
|
135
|
-
})));
|
|
136
|
-
cellsByDate.set(dateKey, clipped.map((entry, idx) => buildCell(entry, laneResults[idx] ?? {
|
|
137
|
-
laneIndex: 0,
|
|
138
|
-
laneCount: 1
|
|
139
|
-
}, rangeStartMinutes, rangeMinutes, bounds.minHeightPercent)));
|
|
140
|
-
}
|
|
141
|
-
return {
|
|
142
|
-
cellsByDate,
|
|
143
|
-
diagnostics
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function assembleDays(viewportDays, cellsByDate, today) {
|
|
147
|
-
return viewportDays.map((date) => {
|
|
148
|
-
const dateKey = formatDateKey(date);
|
|
149
|
-
return {
|
|
150
|
-
date,
|
|
151
|
-
dateKey,
|
|
152
|
-
isToday: isSameCalendarDay(date, today),
|
|
153
|
-
cells: cellsByDate.get(dateKey) ?? []
|
|
154
|
-
};
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
function parseDraft(item, accessors) {
|
|
158
|
-
const startsAtIso = accessors.getStartsAt(item);
|
|
159
|
-
const endsAtIso = accessors.getEndsAt(item);
|
|
160
|
-
const timeZone = accessors.getTimeZone(item);
|
|
161
|
-
const startsAtMinutes = getLocalMinuteOfDay(startsAtIso, timeZone);
|
|
162
|
-
if (Number.isNaN(startsAtMinutes)) return {
|
|
163
|
-
ok: false,
|
|
164
|
-
reason: "invalid-start"
|
|
165
|
-
};
|
|
166
|
-
const startDateKey = getLocalDateKey(startsAtIso, timeZone);
|
|
167
|
-
if (startDateKey == null) return {
|
|
168
|
-
ok: false,
|
|
169
|
-
reason: "invalid-timezone"
|
|
170
|
-
};
|
|
171
|
-
const endDateKey = getLocalDateKey(endsAtIso, timeZone);
|
|
172
|
-
if (endDateKey == null) return {
|
|
173
|
-
ok: false,
|
|
174
|
-
reason: "invalid-end"
|
|
175
|
-
};
|
|
176
|
-
const endsAtMinutesRaw = getLocalMinuteOfDay(endsAtIso, timeZone);
|
|
177
|
-
if (Number.isNaN(endsAtMinutesRaw)) return {
|
|
178
|
-
ok: false,
|
|
179
|
-
reason: "invalid-end"
|
|
180
|
-
};
|
|
181
|
-
const spansMultipleDays = startDateKey < endDateKey;
|
|
182
|
-
const endsAtMinutes = spansMultipleDays || endsAtMinutesRaw > startsAtMinutes ? endsAtMinutesRaw : Math.min(1440, startsAtMinutes + 60);
|
|
183
|
-
if (!spansMultipleDays && endsAtMinutes <= startsAtMinutes) return {
|
|
184
|
-
ok: false,
|
|
185
|
-
reason: "non-positive-duration"
|
|
186
|
-
};
|
|
187
|
-
return {
|
|
188
|
-
ok: true,
|
|
189
|
-
draft: {
|
|
190
|
-
item,
|
|
191
|
-
startDateKey,
|
|
192
|
-
endDateKey,
|
|
193
|
-
startsAtMinutes,
|
|
194
|
-
endsAtMinutes,
|
|
195
|
-
color: accessors.getColor?.(item) ?? null,
|
|
196
|
-
orderKey: accessors.getOrderKey?.(item) ?? accessors.getId(item)
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
function deriveVisibleSegments(drafts, viewportKeys) {
|
|
201
|
-
const segments = [];
|
|
202
|
-
for (const draft of drafts) for (const dateKey of enumerateDateKeys(draft.startDateKey, draft.endDateKey)) {
|
|
203
|
-
if (!viewportKeys.has(dateKey)) continue;
|
|
204
|
-
const isStartDay = dateKey === draft.startDateKey;
|
|
205
|
-
const isEndDay = dateKey === draft.endDateKey;
|
|
206
|
-
const startsAtMinutes = isStartDay ? draft.startsAtMinutes : 0;
|
|
207
|
-
const endsAtMinutes = isEndDay ? draft.endsAtMinutes : 1440;
|
|
208
|
-
if (endsAtMinutes <= startsAtMinutes) continue;
|
|
209
|
-
segments.push({
|
|
210
|
-
draft,
|
|
211
|
-
dateKey,
|
|
212
|
-
startsAtMinutes,
|
|
213
|
-
endsAtMinutes,
|
|
214
|
-
continuesBefore: !isStartDay,
|
|
215
|
-
continuesAfter: !isEndDay
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
return segments;
|
|
219
|
-
}
|
|
220
|
-
function clipDraft(segment, rangeStartMinutes, rangeEndMinutes) {
|
|
221
|
-
const visibleStart = Math.max(rangeStartMinutes, segment.startsAtMinutes);
|
|
222
|
-
const visibleEnd = Math.min(rangeEndMinutes, segment.endsAtMinutes);
|
|
223
|
-
if (visibleEnd <= visibleStart) return {
|
|
224
|
-
ok: false,
|
|
225
|
-
reason: "out-of-visible-hours"
|
|
226
|
-
};
|
|
227
|
-
return {
|
|
228
|
-
ok: true,
|
|
229
|
-
clipped: {
|
|
230
|
-
segment,
|
|
231
|
-
visibleStart,
|
|
232
|
-
visibleEnd
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
function buildCell(entry, lane, rangeStartMinutes, rangeMinutes, minHeightPercent) {
|
|
237
|
-
const heightPercent = Math.max(minHeightPercent, toRangePercent(entry.visibleEnd - entry.visibleStart, rangeMinutes));
|
|
238
|
-
const rawTopPercent = toRangePercent(entry.visibleStart - rangeStartMinutes, rangeMinutes);
|
|
239
|
-
const topPercent = Math.min(rawTopPercent, 100 - heightPercent);
|
|
240
|
-
return {
|
|
241
|
-
item: entry.segment.draft.item,
|
|
242
|
-
dateKey: entry.segment.dateKey,
|
|
243
|
-
startsAtMinutes: entry.segment.startsAtMinutes,
|
|
244
|
-
endsAtMinutes: entry.segment.endsAtMinutes,
|
|
245
|
-
visibleStartsAtMinutes: entry.visibleStart,
|
|
246
|
-
visibleEndsAtMinutes: entry.visibleEnd,
|
|
247
|
-
topPercent,
|
|
248
|
-
heightPercent,
|
|
249
|
-
isClippedStart: entry.segment.continuesBefore || entry.segment.startsAtMinutes < entry.visibleStart,
|
|
250
|
-
isClippedEnd: entry.segment.continuesAfter || entry.segment.endsAtMinutes > entry.visibleEnd,
|
|
251
|
-
laneIndex: lane.laneIndex,
|
|
252
|
-
laneCount: lane.laneCount,
|
|
253
|
-
color: entry.segment.draft.color
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
function resolveBounds(bounds) {
|
|
257
|
-
return {
|
|
258
|
-
minStartHour: bounds?.minStartHour ?? DEFAULT_BOUNDS.minStartHour,
|
|
259
|
-
maxEndHour: bounds?.maxEndHour ?? DEFAULT_BOUNDS.maxEndHour,
|
|
260
|
-
defaultStartHour: bounds?.defaultStartHour ?? DEFAULT_BOUNDS.defaultStartHour,
|
|
261
|
-
defaultEndHour: bounds?.defaultEndHour ?? DEFAULT_BOUNDS.defaultEndHour,
|
|
262
|
-
minHeightPercent: bounds?.minHeightPercent ?? DEFAULT_BOUNDS.minHeightPercent
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
function resolveHourRange(segments, bounds) {
|
|
266
|
-
if (segments.length === 0) return {
|
|
267
|
-
startHour: bounds.defaultStartHour,
|
|
268
|
-
endHour: bounds.defaultEndHour
|
|
269
|
-
};
|
|
270
|
-
const earliestStart = Math.min(...segments.map((segment) => segment.startsAtMinutes));
|
|
271
|
-
const latestEnd = Math.max(...segments.map((segment) => segment.endsAtMinutes));
|
|
272
|
-
const startHour = Math.max(bounds.minStartHour, Math.floor(earliestStart / 60));
|
|
273
|
-
const endHour = Math.min(bounds.maxEndHour, Math.ceil(latestEnd / 60));
|
|
274
|
-
return {
|
|
275
|
-
startHour,
|
|
276
|
-
endHour: Math.max(startHour + 1, endHour)
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
function buildHourTicks(startHour, endHour) {
|
|
280
|
-
const ticks = [];
|
|
281
|
-
for (let hour = startHour; hour <= endHour; hour += 1) ticks.push(hour);
|
|
282
|
-
return ticks;
|
|
283
|
-
}
|
|
284
|
-
function groupSegmentsByDate(segments) {
|
|
285
|
-
const grouped = /* @__PURE__ */ new Map();
|
|
286
|
-
for (const segment of segments) {
|
|
287
|
-
const existing = grouped.get(segment.dateKey) ?? [];
|
|
288
|
-
existing.push(segment);
|
|
289
|
-
grouped.set(segment.dateKey, existing);
|
|
290
|
-
}
|
|
291
|
-
return grouped;
|
|
292
|
-
}
|
|
293
|
-
function toRangePercent(minutes, rangeMinutes) {
|
|
294
|
-
if (rangeMinutes <= 0) return 0;
|
|
295
|
-
return minutes / rangeMinutes * 100;
|
|
296
|
-
}
|
|
297
|
-
function getTimetableDays(viewDate, view, startOfWeek) {
|
|
298
|
-
if (view === "day") return [viewDate];
|
|
299
|
-
return getWeekCalendarDays(viewDate, startOfWeek);
|
|
300
|
-
}
|
|
301
|
-
function enumerateDateKeys(startDateKey, endDateKey) {
|
|
302
|
-
if (startDateKey > endDateKey) throw new Error(`Invalid timetable date range: ${startDateKey} is after ${endDateKey}`);
|
|
303
|
-
const start = parseDateKey(startDateKey);
|
|
304
|
-
parseDateKey(endDateKey);
|
|
305
|
-
const keys = [];
|
|
306
|
-
let cursor = start;
|
|
307
|
-
while (formatDateKey(cursor) <= endDateKey) {
|
|
308
|
-
keys.push(formatDateKey(cursor));
|
|
309
|
-
cursor = addDays(cursor, 1);
|
|
310
|
-
}
|
|
311
|
-
return keys;
|
|
312
|
-
}
|
|
313
|
-
function parseDateKey(dateKey) {
|
|
314
|
-
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
|
|
315
|
-
if (match === null) throw new Error(`Invalid timetable date key: ${dateKey}`);
|
|
316
|
-
const [, year, month, day] = match;
|
|
317
|
-
return {
|
|
318
|
-
year: Number(year),
|
|
319
|
-
month: Number(month),
|
|
320
|
-
day: Number(day)
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
//#endregion
|
|
324
13
|
//#region ../blocks/src/system/runtime/nodes/events/shared/MonthLookView.tsx
|
|
325
14
|
function MonthEvent({ event, timeZone, locale }) {
|
|
326
15
|
return /* @__PURE__ */ jsxs("a", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { n as EventCombinedIslandClient } from "./EventCombined.client-
|
|
3
|
-
import { t as BlockApiProvider } from "./context-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-BRKz13eg.mjs";
|
|
2
|
+
import { n as EventCombinedIslandClient } from "./EventCombined.client-BdctbwnV.mjs";
|
|
3
|
+
import { t as BlockApiProvider } from "./context-BOs0m_iw.mjs";
|
|
4
4
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
5
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
5
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-slAAILQ5.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/rendering/islands/enhancers/eventCombined.tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as eventDateOptions, Di as isPublicEventPricingOptionDisplayable, Dn as formatEventPriceAmount, Ei as formatBookingPriceDisplay, En as formatEventPrice, Kn as getEventAvailabilityStatus, Ln as formatTime, Mi as formatCurrencyAmount, Ni as assertNever, Nn as formatEventCompactDateRail, Oi as publicEventPricingCurrency, On as formatEventPriceDisplay, Pn as formatEventDateParts, Ti as toScheduledBookingDateTime, Un as formatEventRemainingPlaces, Wn as formatTotalCapacity, bi as getBookingLocalDateKey, er as listLookSlot, fi as CANCELLED_SESSION_STATUS, ji as publicEventPricingType, ki as publicEventPricingDisplay, mi as resolveWholeSeriesBookingPhase, pi as orderedLiveRunSessions, rn as resolveEventRegistrationScopedEvents, t as defineIslandPropsDecoder, wi as toBookingTimeZone } from "./propsDecoder-BRKz13eg.mjs";
|
|
2
2
|
import { t as formatEventDuration } from "./duration-btE0-px8.mjs";
|
|
3
|
-
import { a as
|
|
3
|
+
import { a as resolveEventCta, o as resolveEventLinkProps, t as CardListContentPart } from "./CardListItem-DVYTlYpS.mjs";
|
|
4
4
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
5
5
|
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-CT8yg_UB.mjs";
|
|
6
|
-
import { t as LeafletStaticMap } from "./LeafletStaticMap-
|
|
6
|
+
import { t as LeafletStaticMap } from "./LeafletStaticMap-BLTECfjU.mjs";
|
|
7
7
|
import "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
|
|
@@ -335,29 +335,52 @@ function localDateParts(isoTimestamp, timeZone) {
|
|
|
335
335
|
//#endregion
|
|
336
336
|
//#region ../blocks/src/system/runtime/nodes/events/shared/eventCardListContent.ts
|
|
337
337
|
/** Live offering data only; editorial cards never acquire booking fields. */
|
|
338
|
-
function eventCardListContent(event, buttonText) {
|
|
339
|
-
const
|
|
338
|
+
function eventCardListContent(event, context, buttonText) {
|
|
339
|
+
const { content, external } = cardProjectionBase(event, buttonText, context.kind === "offering");
|
|
340
|
+
switch (context.kind) {
|
|
341
|
+
case "event-details": return {
|
|
342
|
+
...content,
|
|
343
|
+
chips: offeringTypeChips(event),
|
|
344
|
+
leadDate: null,
|
|
345
|
+
newTabHint: false,
|
|
346
|
+
...offeringSchedule(event)
|
|
347
|
+
};
|
|
348
|
+
case "offering": return {
|
|
349
|
+
...content,
|
|
350
|
+
chips: offeringTypeChips(event, context.typeLabel),
|
|
351
|
+
leadDate: offeringLeadDate(event, context.nextStartMs),
|
|
352
|
+
newTabHint: external,
|
|
353
|
+
...offeringSchedule(event, context.now)
|
|
354
|
+
};
|
|
355
|
+
default: return assertNever(context);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
function cardProjectionBase(event, buttonText, offering) {
|
|
359
|
+
const cta = offeringCardCta(event, buttonText, offering);
|
|
340
360
|
const places = offeringAvailability(event);
|
|
341
361
|
return {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
label: cta.label,
|
|
353
|
-
...cta.hidden ? {} : {
|
|
354
|
-
href: cta.href,
|
|
355
|
-
external: cta.external
|
|
356
|
-
}
|
|
362
|
+
external: cta.external,
|
|
363
|
+
content: {
|
|
364
|
+
id: event.occurrenceId || event.id,
|
|
365
|
+
title: event.title,
|
|
366
|
+
titleLink: resolveEventLinkProps(event),
|
|
367
|
+
text: event.presentation?.summary ?? event.description,
|
|
368
|
+
media: event.presentation?.image,
|
|
369
|
+
facts: offeringFacts(event, places?.label, offering),
|
|
370
|
+
availability: places,
|
|
371
|
+
action: cardAction(cta)
|
|
357
372
|
}
|
|
358
373
|
};
|
|
359
374
|
}
|
|
360
|
-
function
|
|
375
|
+
function offeringLeadDate(event, startMs) {
|
|
376
|
+
if (startMs === null || !Number.isFinite(startMs)) return null;
|
|
377
|
+
const startsAt = new Date(startMs).toISOString();
|
|
378
|
+
return {
|
|
379
|
+
startsAt,
|
|
380
|
+
...formatEventCompactDateRail(startsAt, eventDateOptions(event), "as-written")
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function offeringSchedule(event, now) {
|
|
361
384
|
const run = event.bookingScope === "whole_series" ? derivePreviewRunSchedule(event.run.sessions) : null;
|
|
362
385
|
if (run?.kind === "no-live-sessions") return {
|
|
363
386
|
numeral: null,
|
|
@@ -369,23 +392,54 @@ function offeringSchedule(event) {
|
|
|
369
392
|
value: run.sessionCount,
|
|
370
393
|
label: "sessions"
|
|
371
394
|
} : null,
|
|
372
|
-
schedule: scheduleLine(summary, event)
|
|
395
|
+
schedule: scheduleLine(summary, event, now)
|
|
373
396
|
};
|
|
374
397
|
}
|
|
375
|
-
function scheduleLine(summary, event) {
|
|
398
|
+
function scheduleLine(summary, event, now) {
|
|
376
399
|
const options = eventDateOptions(event);
|
|
377
|
-
const
|
|
378
|
-
|
|
400
|
+
const timeZone = options.timeZone ?? "UTC";
|
|
401
|
+
const year = (value) => new Intl.DateTimeFormat(options.locale, {
|
|
402
|
+
timeZone,
|
|
403
|
+
year: "numeric"
|
|
404
|
+
}).format(value);
|
|
405
|
+
const date = (value, weekday = false) => new Intl.DateTimeFormat(options.locale, {
|
|
406
|
+
timeZone,
|
|
379
407
|
day: "numeric",
|
|
380
|
-
month: "short"
|
|
381
|
-
|
|
408
|
+
month: "short",
|
|
409
|
+
...weekday ? { weekday: "short" } : {},
|
|
410
|
+
...now && year(new Date(value)) !== year(now) ? { year: "numeric" } : {}
|
|
411
|
+
}).format(new Date(value)).replace(",", "");
|
|
382
412
|
switch (summary.kind) {
|
|
383
|
-
case "single-occurrence": return date(summary.occurrence.startsAt);
|
|
384
|
-
case "multi-day-span": return `${date(summary.occurrence.startsAt)} – ${date(summary.occurrence.endsAt)}`;
|
|
413
|
+
case "single-occurrence": return now ? `${date(summary.occurrence.startsAt, true)} · ${compactTimeRange(summary.occurrence.startsAt, summary.occurrence.endsAt, timeZone)}` : date(summary.occurrence.startsAt);
|
|
414
|
+
case "multi-day-span": return now ? compactDateSpan(summary.occurrence.startsAt, summary.occurrence.endsAt, options.locale, timeZone, now) : `${date(summary.occurrence.startsAt)} – ${date(summary.occurrence.endsAt)}`;
|
|
385
415
|
case "fixed-recurring-run": return `${date(summary.first.startsAt)} – ${date(summary.last.startsAt)} · ${summary.recurrenceLabel}`;
|
|
386
416
|
case "irregular-multi-session-run": return `${date(summary.first.startsAt)} – ${date(summary.last.startsAt)} · ${summary.sessionCount} dates`;
|
|
387
417
|
}
|
|
388
418
|
}
|
|
419
|
+
function compactTimeRange(startsAt, endsAt, timeZone) {
|
|
420
|
+
const time = (value) => formatTime(value, {
|
|
421
|
+
timeZone,
|
|
422
|
+
locale: "en-US"
|
|
423
|
+
}).replace(/:00/, "").replace(/\s/g, "").toLowerCase();
|
|
424
|
+
const start = time(startsAt);
|
|
425
|
+
const end = time(endsAt);
|
|
426
|
+
return `${start.endsWith("am") === end.endsWith("am") ? start.replace(/(am|pm)$/, "") : start}–${end}`;
|
|
427
|
+
}
|
|
428
|
+
function compactDateSpan(startsAt, endsAt, locale, timeZone, now) {
|
|
429
|
+
const start = new Date(startsAt);
|
|
430
|
+
const end = new Date(endsAt);
|
|
431
|
+
const parts = (value) => new Intl.DateTimeFormat(locale, {
|
|
432
|
+
timeZone,
|
|
433
|
+
day: "numeric",
|
|
434
|
+
month: "short",
|
|
435
|
+
year: "numeric"
|
|
436
|
+
}).formatToParts(value);
|
|
437
|
+
const part = (value, type) => parts(value).find((entry) => entry.type === type)?.value.replace(/^Sept$/, "Sep") ?? "";
|
|
438
|
+
const sameMonth = part(start, "month") === part(end, "month") && part(start, "year") === part(end, "year");
|
|
439
|
+
const year = (value) => part(value, "year") === part(now, "year") ? "" : ` ${part(value, "year")}`;
|
|
440
|
+
const date = (value) => `${part(value, "day")} ${part(value, "month")}${year(value)}`;
|
|
441
|
+
return sameMonth ? `${part(start, "day")}–${date(end)}` : `${date(start)} – ${date(end)}`;
|
|
442
|
+
}
|
|
389
443
|
function offeringAvailability(event) {
|
|
390
444
|
const label = formatEventRemainingPlaces(event, { full: "Sold out" });
|
|
391
445
|
const availability = getEventAvailabilityStatus(event);
|
|
@@ -394,9 +448,9 @@ function offeringAvailability(event) {
|
|
|
394
448
|
status: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available"
|
|
395
449
|
} : null;
|
|
396
450
|
}
|
|
397
|
-
function offeringFacts(event, places) {
|
|
451
|
+
function offeringFacts(event, places, offering) {
|
|
398
452
|
return [
|
|
399
|
-
...Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4) > 0 ? [{
|
|
453
|
+
...Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4) > 0 && (!offering || event.bookingScope === "whole_series") ? [{
|
|
400
454
|
label: "Length",
|
|
401
455
|
value: formatEventDuration(event, "readable")
|
|
402
456
|
}] : [],
|
|
@@ -405,18 +459,31 @@ function offeringFacts(event, places) {
|
|
|
405
459
|
value: places,
|
|
406
460
|
kind: "availability"
|
|
407
461
|
}] : [],
|
|
408
|
-
{
|
|
462
|
+
...offering && event.pricing.kind === "external" ? [] : [{
|
|
409
463
|
label: "Price",
|
|
410
464
|
value: formatEventPriceDisplay(event.pricing)
|
|
411
|
-
}
|
|
465
|
+
}]
|
|
412
466
|
];
|
|
413
467
|
}
|
|
468
|
+
function offeringCardCta(event, buttonText, offering) {
|
|
469
|
+
return resolveEventCta(event, offering && event.destination.kind === "external" ? void 0 : buttonText);
|
|
470
|
+
}
|
|
471
|
+
function offeringTypeChips(event, typeLabel) {
|
|
472
|
+
return event.eventCategory ? [event.eventCategory.name] : typeLabel ? [typeLabel] : [];
|
|
473
|
+
}
|
|
474
|
+
function cardAction(cta) {
|
|
475
|
+
return cta.hidden ? { label: cta.label } : {
|
|
476
|
+
label: cta.label,
|
|
477
|
+
href: cta.href,
|
|
478
|
+
external: cta.external
|
|
479
|
+
};
|
|
480
|
+
}
|
|
414
481
|
//#endregion
|
|
415
482
|
//#region ../blocks/src/system/runtime/nodes/event-details/headerContent.ts
|
|
416
483
|
/** Project selected live data; booking decisions stay with the existing event owners. */
|
|
417
484
|
function eventHeaderContent(selection, showCost) {
|
|
418
485
|
const event = selection.selected;
|
|
419
|
-
const item = eventCardListContent(event);
|
|
486
|
+
const item = eventCardListContent(event, { kind: "event-details" });
|
|
420
487
|
const groupSize = formatTotalCapacity(event.capacity);
|
|
421
488
|
const { date, timeRange } = formatEventDateParts({
|
|
422
489
|
startsAt: event.startsAt,
|
|
@@ -620,20 +687,22 @@ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItem
|
|
|
620
687
|
})
|
|
621
688
|
}) : null;
|
|
622
689
|
}
|
|
623
|
-
function EventFacts({ selection, selected, locale, venue, teamMembers, pricing, showCapacity }) {
|
|
690
|
+
function EventFacts({ selection, selected, locale, venue, teamMembers, pricing, showCapacity, lookSlots }) {
|
|
624
691
|
const { date, timeRange } = formatEventDateParts({
|
|
625
692
|
startsAt: selected.startsAt,
|
|
626
693
|
endsAt: selected.endsAt,
|
|
627
694
|
timeZone: selection.timeZone,
|
|
628
695
|
locale
|
|
629
696
|
});
|
|
697
|
+
const dateHeading = selection.kind === "wholeSeries" ? runLifecycleLabel(selection.lifecycle) : selection.mode === "next" ? "Next date" : "Date";
|
|
630
698
|
return /* @__PURE__ */ jsxs("div", {
|
|
699
|
+
...listLookSlot({ lookSlots }, "facts"),
|
|
631
700
|
className: "rb-flex rb-flex-col rb-gap-4",
|
|
632
701
|
children: [
|
|
633
702
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
634
703
|
/* @__PURE__ */ jsx("div", {
|
|
635
704
|
className: "rb-label rb-mb-2",
|
|
636
|
-
children:
|
|
705
|
+
children: dateHeading
|
|
637
706
|
}),
|
|
638
707
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }),
|
|
639
708
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -842,8 +911,10 @@ function SelectedEventDetailsView(props) {
|
|
|
842
911
|
showDescription
|
|
843
912
|
}),
|
|
844
913
|
/* @__PURE__ */ jsxs("div", {
|
|
914
|
+
...listLookSlot(props, "frame"),
|
|
845
915
|
className: "rb-grid rb-grid-cols-1 rb-gap-6 rb-items-start rb-sm-grid-cols-2",
|
|
846
916
|
children: [/* @__PURE__ */ jsx(EventFacts, {
|
|
917
|
+
lookSlots: props.lookSlots,
|
|
847
918
|
selection,
|
|
848
919
|
selected,
|
|
849
920
|
locale,
|
|
@@ -876,6 +947,7 @@ function LegacyEventDetailsView(props) {
|
|
|
876
947
|
children: "No upcoming dates scheduled."
|
|
877
948
|
});
|
|
878
949
|
return /* @__PURE__ */ jsx(SelectedEventDetailsView, {
|
|
950
|
+
lookSlots: props.lookSlots,
|
|
879
951
|
locale: props.arrangement ? eventDateOptions(props.selection.selected).locale : void 0,
|
|
880
952
|
selection: props.selection,
|
|
881
953
|
showVenue: props.showVenue,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { t as BlockApiProvider } from "./context-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-BRKz13eg.mjs";
|
|
2
|
+
import { t as BlockApiProvider } from "./context-BOs0m_iw.mjs";
|
|
3
3
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
4
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
5
|
-
import { t as EventListingClient } from "./EventListing.client-
|
|
4
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-slAAILQ5.mjs";
|
|
5
|
+
import { t as EventListingClient } from "./EventListing.client-BviZXfAE.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/rendering/islands/enhancers/eventListing.tsx
|