@riverbankcms/sdk 0.143.0 → 0.144.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/{PreviewEditorSidebar-DROGfMKi.mjs → PreviewEditorSidebar-CQZNnFiM.mjs} +19 -25
- package/dist/{PreviewEditorUI-BaRjhFu-.mjs → PreviewEditorUI-DCNxnmI0.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-OIABYLES.mjs → SdkPreviewModeRuntime-BJolUbr1.mjs} +15 -6
- package/dist/{SiteChromeCustomizeContext-ohjTvZbc.mjs → SiteChromeCustomizeContext-CKgEpoxi.mjs} +1915 -1463
- package/dist/_dts/api/src/billing.d.ts +1 -1
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +8 -2
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -1
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +4 -4
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +8 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -8
- package/dist/_dts/api/src/siteSettings.d.ts +17 -7
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/block-form/src/backend/types.d.ts +14 -0
- package/dist/_dts/block-form/src/client/index.d.ts +1 -0
- package/dist/_dts/block-form/src/context/RepeaterHostActionsContext.d.ts +30 -0
- package/dist/_dts/block-form/src/context/index.d.ts +1 -0
- package/dist/_dts/block-form/src/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +4 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +5 -2
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +11 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useEmptyStateFocusAfterRemoval.d.ts +8 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +15 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +5 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +34 -10
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -0
- package/dist/_dts/blocks/src/system/constants/events.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/api/context.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/api/readAuthority.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +7 -13
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +9 -4
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +1 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +7 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/cart.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +2 -1
- 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/event-registration.headless.override.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +7 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +5 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/header-control.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/layout.d.ts +6 -21
- package/dist/_dts/blocks/src/system/runtime/nodes/product-detail.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/product-list.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/ThemedButton.d.ts +58 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/chromeLogo.d.ts +23 -0
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +3 -1
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +4 -1
- package/dist/_dts/core/src/event-catalogue.d.ts +27 -0
- package/dist/_dts/core/src/event-preset-vocabulary.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +13 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +286 -2
- package/dist/_dts/editor-blocks/src/block-editor/{BlockCardHeader.d.ts → BlockCardFrame.d.ts} +11 -3
- package/dist/_dts/logger/src/console.d.ts +3 -0
- package/dist/_dts/sdk/src/client/publicEventReadOperations.d.ts +1 -0
- package/dist/_dts/sdk/src/client/types.d.ts +3 -0
- package/dist/_dts/sdk/src/navigation/index.d.ts +27 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +15 -7
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/client.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/routeIslandApiConfig.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/islands/enhancers/shopShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +3 -13
- package/dist/_dts/theme-core/src/customCss/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/customCss/patch.d.ts +0 -5
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/logoVariant.d.ts +26 -0
- package/dist/_dts/theme-core/src/utils/colorStyles.d.ts +10 -0
- package/dist/_dts/ui/src/editor-item-card.d.ts +116 -0
- package/dist/_dts/ui/src/index.d.ts +1 -0
- package/dist/client/{BookingConsentAgreement-BoCtvzzu.mjs → BookingConsentAgreement-DoAILrkN.mjs} +4 -55
- package/dist/client/{DiscountCodeDisclosure-B5S30nZk.mjs → DiscountCodeDisclosure-X528hUTf.mjs} +27 -17
- package/dist/client/{EventCombined.client-CeZ2-zSt.mjs → EventCombined.client-DSBVwq5m.mjs} +54 -46
- package/dist/client/{EventListing.client-DJN3j8B3.mjs → EventListing.client-DmFAX7Vb.mjs} +3 -4
- package/dist/client/{LeafletStaticMap-RjtGzDQT.mjs → LeafletStaticMap-BAqXdfhq.mjs} +1 -1
- package/dist/client/ThemedButton-BwNFVwi4.mjs +412 -0
- package/dist/client/{accordion-DOmnDoyg.mjs → accordion-DRhMdkbd.mjs} +1 -1
- package/dist/client/{bookingForm-C0vk7pgS.mjs → bookingForm-iJ_nCsNF.mjs} +26 -32
- package/dist/client/bookings.mjs +201 -118
- package/dist/client/{carousel-BZJ7pno3.mjs → carousel-D8zuffZr.mjs} +2 -2
- package/dist/client/{carousel.client-DQTjCVQT.mjs → carousel.client-jahpU9Vz.mjs} +1 -1
- package/dist/client/{cart-CaeVAHJl.mjs → cart-DeMGJViN.mjs} +3 -3
- package/dist/client/{checkout-7wmoNDtG.mjs → checkout-DXc06Km2.mjs} +3 -3
- package/dist/client/{checkoutUrls-FL6lRkrt.mjs → checkoutUrls-CW3-78uu.mjs} +1 -1
- package/dist/client/client.mjs +2271 -1983
- package/dist/client/{colorStyles-3013aRAY.mjs → colorStyles-CuJBiS-1.mjs} +16 -4
- package/dist/client/{context-BOimxE3U.mjs → context-CDLCfDep.mjs} +24 -8
- package/dist/client/{dates-BnzVksi4.mjs → dates-ClFx7Epy.mjs} +2 -2
- package/dist/client/{eventCalendar-l-fpaslC.mjs → eventCalendar-BaGpnOGN.mjs} +39 -50
- package/dist/client/{eventCombined-DGGvssK6.mjs → eventCombined-ywONOx2m.mjs} +5 -4
- package/dist/client/{eventDetails-DRiCm_hL.mjs → eventDetails-B2LlOTYY.mjs} +4 -4
- package/dist/client/{eventListing-dph8loYX.mjs → eventListing-CMgxWpqP.mjs} +5 -4
- package/dist/client/{eventRegistration-ClBohmbY.mjs → eventRegistration-BarLDNHR.mjs} +83 -68
- package/dist/client/{form-BLVVAnd3.mjs → form-BjqKaBJ7.mjs} +9 -10
- package/dist/client/{headerSection-DHy4C8Ix.mjs → headerSection-CP4XDwz1.mjs} +23 -30
- package/dist/client/hooks.mjs +257 -63
- package/dist/client/{locationMap-6HuS28ck.mjs → locationMap-C5gW-d-w.mjs} +9 -10
- package/dist/client/{media-DHpfFwd3.mjs → media-BtJ37tzS.mjs} +1 -1
- package/dist/client/{newsletterForm-xOdcOhZP.mjs → newsletterForm-afXlVSA0.mjs} +8 -9
- package/dist/client/{pricing-ChinRYFt.mjs → pricing-Bl1CAl28.mjs} +1 -1
- package/dist/client/{productDetail-0chA5gbK.mjs → productDetail-CvQ3jWQe.mjs} +3 -3
- package/dist/client/{productList-OoINA0h1.mjs → productList-U874PGO7.mjs} +3 -3
- package/dist/client/{propsDecoder-CIZ-hbIG.mjs → propsDecoder-DPXtCZWP.mjs} +87 -29
- package/dist/client/rendering/client.mjs +1891 -1740
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2225 -1913
- package/dist/client/{routeIslandApiConfig-UNsfPcYq.mjs → routeIslandApiConfig-NGYiUWXu.mjs} +8 -1
- package/dist/client/{scrollToBlock-BPZl0gPZ.mjs → scrollToBlock-0-C3DVhK.mjs} +1 -1
- package/dist/client/{shop-CLJFqNIq.mjs → shop-BXjXhM9P.mjs} +45 -58
- package/dist/client/{shop-commerce-PpANg5wB.mjs → shop-commerce-BZ6UlWJ7.mjs} +42 -55
- package/dist/client/{shop-commerce-store-TA_Kz2ku.mjs → shop-commerce-store-DlSBXb3D.mjs} +1 -1
- package/dist/client/{shopShared-DzcFcA5g.mjs → shopShared-kkEOiLPA.mjs} +6 -5
- package/dist/client/{useEventFilters-CFU21QZo.mjs → useEventFilters-zvnnE1ro.mjs} +66 -355
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/editor-chrome.css +8 -0
- package/dist/{sdk-runtime-CDKl0Fr7.mjs → sdk-runtime-DFJlQt3q.mjs} +1 -1
- package/dist/{separator-BTp96X32.mjs → separator-o8GHb1xh.mjs} +1 -1
- package/dist/server/components.mjs +828 -623
- package/dist/server/config-validation.mjs +257 -63
- package/dist/server/config.mjs +257 -63
- package/dist/server/data.mjs +257 -63
- package/dist/server/index.mjs +9 -5
- package/dist/server/navigation.mjs +28 -1
- package/dist/server/next.mjs +14129 -13947
- package/dist/server/page-converter.mjs +110 -59
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +832 -624
- package/dist/server/rendering.mjs +830 -624
- package/dist/server/routing.mjs +294 -69
- package/dist/server/server.mjs +266 -68
- package/dist/server/theme-bridge.mjs +40 -1
- package/dist/styles/index.css +6 -0
- package/package.json +1 -1
|
@@ -498,16 +498,28 @@ function backgroundColorStyle(token) {
|
|
|
498
498
|
return { backgroundColor: rgbColorValue(token) };
|
|
499
499
|
}
|
|
500
500
|
/**
|
|
501
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
502
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
503
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
504
|
+
* background changes; any other token is a fixed theme color.
|
|
505
|
+
*
|
|
506
|
+
* @param token - Theme color token
|
|
507
|
+
* @returns CSS color value
|
|
508
|
+
*/
|
|
509
|
+
function textColorValue(token) {
|
|
510
|
+
const parsed = parseToken(token);
|
|
511
|
+
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
512
|
+
if (!surfaceRole) return rgbColorValue(token);
|
|
513
|
+
return parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
501
516
|
* Creates a text color style object from a theme token.
|
|
502
517
|
*
|
|
503
518
|
* @param token - Theme color token
|
|
504
519
|
* @returns CSSProperties with color
|
|
505
520
|
*/
|
|
506
521
|
function textColorStyle(token) {
|
|
507
|
-
|
|
508
|
-
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
509
|
-
if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
|
|
510
|
-
return { color: rgbColorValue(token) };
|
|
522
|
+
return { color: textColorValue(token) };
|
|
511
523
|
}
|
|
512
524
|
/**
|
|
513
525
|
* Merges multiple CSSProperties objects into a single object.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { B as calendarWindowPageSchema } from "./propsDecoder-DPXtCZWP.mjs";
|
|
3
3
|
import { createContext, useContext, useMemo } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/api/deduplication.ts
|
|
@@ -160,15 +160,18 @@ const BOOKINGS = {
|
|
|
160
160
|
const EVENTS = {
|
|
161
161
|
calendarWindow: {
|
|
162
162
|
path: "/public/sites/{siteId}/events/calendar-window",
|
|
163
|
-
method: "GET"
|
|
163
|
+
method: "GET",
|
|
164
|
+
previewRead: true
|
|
164
165
|
},
|
|
165
166
|
list: {
|
|
166
167
|
path: "/public/sites/{siteId}/events",
|
|
167
|
-
method: "GET"
|
|
168
|
+
method: "GET",
|
|
169
|
+
previewRead: true
|
|
168
170
|
},
|
|
169
171
|
filters: {
|
|
170
172
|
path: "/public/sites/{siteId}/events/filters",
|
|
171
|
-
method: "GET"
|
|
173
|
+
method: "GET",
|
|
174
|
+
previewRead: true
|
|
172
175
|
},
|
|
173
176
|
register: {
|
|
174
177
|
path: "/public/sites/{siteId}/events/register",
|
|
@@ -206,7 +209,8 @@ const WHOLE_SERIES = { waitlistClaimResolve: {
|
|
|
206
209
|
const SHOP = {
|
|
207
210
|
listProducts: {
|
|
208
211
|
path: "/public/sites/{siteId}/products",
|
|
209
|
-
method: "GET"
|
|
212
|
+
method: "GET",
|
|
213
|
+
previewRead: true
|
|
210
214
|
},
|
|
211
215
|
checkout: {
|
|
212
216
|
path: "/public/sites/{siteId}/bookings/checkout",
|
|
@@ -600,7 +604,11 @@ function publicEventsQuery(params) {
|
|
|
600
604
|
return { ...params ?? {} };
|
|
601
605
|
}
|
|
602
606
|
function createBlockApi(config) {
|
|
603
|
-
const { baseUrl,
|
|
607
|
+
const { baseUrl, authOverrides, siteId, isPreview, readAuthority } = config;
|
|
608
|
+
const auth = readAuthority ? readAuthority.kind === "preview" ? {
|
|
609
|
+
type: "bearer",
|
|
610
|
+
token: readAuthority.token
|
|
611
|
+
} : { type: "none" } : config.auth;
|
|
604
612
|
const dedup = createDeduplicationCache({ ttl: 100 });
|
|
605
613
|
const shouldUsePreviewStageForNonPortalRequests = isPreview && auth.type !== "none";
|
|
606
614
|
function isPortalEndpoint(endpoint) {
|
|
@@ -608,17 +616,25 @@ function createBlockApi(config) {
|
|
|
608
616
|
}
|
|
609
617
|
function selectAuth(endpoint) {
|
|
610
618
|
if (endpoint.authScope === "portal" && authOverrides?.portal) return authOverrides.portal;
|
|
619
|
+
if (readAuthority && !endpoint.previewRead) return { type: "none" };
|
|
611
620
|
return auth;
|
|
612
621
|
}
|
|
613
622
|
/**
|
|
614
623
|
* Make an API request
|
|
615
624
|
*/
|
|
625
|
+
function bindReadQuery(endpoint, query) {
|
|
626
|
+
const queryParams = { ...query };
|
|
627
|
+
if (readAuthority) {
|
|
628
|
+
if (!endpoint.previewRead) delete queryParams.stage;
|
|
629
|
+
else if (readAuthority.kind === "preview" || queryParams.stage != null) queryParams.stage = readAuthority.kind;
|
|
630
|
+
} else if (shouldUsePreviewStageForNonPortalRequests && !isPortalEndpoint(endpoint) && queryParams.stage == null) queryParams.stage = "preview";
|
|
631
|
+
return queryParams;
|
|
632
|
+
}
|
|
616
633
|
async function request(endpoint, options) {
|
|
617
634
|
const { path, body, query, skipDedup = false } = options ?? {};
|
|
618
635
|
let url = `${baseUrl}${path ?? endpoint.path}`;
|
|
619
636
|
const selectedAuth = selectAuth(endpoint);
|
|
620
|
-
const queryParams =
|
|
621
|
-
if (shouldUsePreviewStageForNonPortalRequests && !isPortalEndpoint(endpoint) && (queryParams.stage === void 0 || queryParams.stage === null)) queryParams.stage = "preview";
|
|
637
|
+
const queryParams = bindReadQuery(endpoint, query);
|
|
622
638
|
if (Object.keys(queryParams).length > 0) url = appendQuery(url, queryParams);
|
|
623
639
|
const headers = {
|
|
624
640
|
Accept: "application/json",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-
|
|
1
|
+
import { Xt as formatBookingDate, Zt as formatBookingDateParts, cn as toScheduledBookingDateTime, en as formatBookingTime, lt as resolveRuntimeEventDestination, on as toBookingTimeZone, sn as toScheduledBookingDateRange, yn as assertNever } from "./propsDecoder-DPXtCZWP.mjs";
|
|
2
|
+
import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-Bl1CAl28.mjs";
|
|
3
3
|
//#region ../blocks/src/system/runtime/nodes/events/domain/cta.ts
|
|
4
4
|
/**
|
|
5
5
|
* Booking call-to-action resolution for events: where an event links to and
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { O as clsx } from "./colorStyles-
|
|
3
|
-
import { $ as
|
|
4
|
-
import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-
|
|
5
|
-
import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-
|
|
6
|
-
import { a as formatTime, c as getLocalDateKey, d as resolveEventLinkProps, l as getLocalMinuteOfDay, o as groupEventsByDate, s as resolveEventTimeZone } from "./dates-
|
|
7
|
-
import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-
|
|
8
|
-
import { t as BlockApiProvider } from "./context-
|
|
2
|
+
import { O as clsx } from "./colorStyles-CuJBiS-1.mjs";
|
|
3
|
+
import { $ as addDays, G as buildEventRuntimeFilters, H as resolveCalendarReadProfile, O as buildEventCalendarListingRender, Q as MONTH_NAMES, at as getWeekCalendarDays, it as getOrderedDayNames, nt as formatDateKey, ot as isSameCalendarDay, rt as getDayOfWeek, st as isToday, t as defineIslandPropsDecoder } from "./propsDecoder-DPXtCZWP.mjs";
|
|
4
|
+
import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-zvnnE1ro.mjs";
|
|
5
|
+
import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-Bl1CAl28.mjs";
|
|
6
|
+
import { a as formatTime, c as getLocalDateKey, d as resolveEventLinkProps, l as getLocalMinuteOfDay, o as groupEventsByDate, s as resolveEventTimeZone } from "./dates-ClFx7Epy.mjs";
|
|
7
|
+
import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-DSBVwq5m.mjs";
|
|
8
|
+
import { t as BlockApiProvider } from "./context-CDLCfDep.mjs";
|
|
9
|
+
import { n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-BwNFVwi4.mjs";
|
|
9
10
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
10
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
11
|
-
import { n as EventListingController } from "./EventListing.client-
|
|
11
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-NGYiUWXu.mjs";
|
|
12
|
+
import { n as EventListingController } from "./EventListing.client-DmFAX7Vb.mjs";
|
|
12
13
|
import { useEffect, useId, useMemo, useState } from "react";
|
|
13
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
15
|
//#region ../calendar/src/lane-packing.ts
|
|
@@ -408,7 +409,7 @@ const WeekBoardCard = ({ event, showCapacity, calendarTimeZone }) => {
|
|
|
408
409
|
]
|
|
409
410
|
});
|
|
410
411
|
};
|
|
411
|
-
const WeekBoardNavigationControls = ({ navigation,
|
|
412
|
+
const WeekBoardNavigationControls = ({ navigation, buttonVariant }) => {
|
|
412
413
|
const handlers = navigation.kind === "interactive" ? navigation : {
|
|
413
414
|
onPrevious: void 0,
|
|
414
415
|
onNext: void 0,
|
|
@@ -441,12 +442,13 @@ const WeekBoardNavigationControls = ({ navigation, todayClassName }) => {
|
|
|
441
442
|
onClick: handlers.onNext,
|
|
442
443
|
children: /* @__PURE__ */ jsx(CalendarNavigationChevron, { direction: "next" })
|
|
443
444
|
}),
|
|
444
|
-
/* @__PURE__ */ jsx(
|
|
445
|
+
/* @__PURE__ */ jsx(ThemedButton, {
|
|
445
446
|
type: "button",
|
|
446
|
-
|
|
447
|
+
variant: buttonVariant,
|
|
448
|
+
size: "sm",
|
|
449
|
+
label: "Today",
|
|
447
450
|
disabled: navigation.isCurrentWeek,
|
|
448
|
-
onClick: handlers.onToday
|
|
449
|
-
children: "Today"
|
|
451
|
+
onClick: handlers.onToday
|
|
450
452
|
})
|
|
451
453
|
]
|
|
452
454
|
});
|
|
@@ -462,16 +464,17 @@ const WeekBoardLegend = () => /* @__PURE__ */ jsx("div", {
|
|
|
462
464
|
}), item.label]
|
|
463
465
|
}, item.status))
|
|
464
466
|
});
|
|
465
|
-
const WeekBoardLoadError = ({ navigation,
|
|
467
|
+
const WeekBoardLoadError = ({ navigation, buttonVariant }) => {
|
|
466
468
|
if (navigation.kind !== "interactive" || navigation.loadState.kind !== "error") return null;
|
|
467
469
|
return /* @__PURE__ */ jsxs("div", {
|
|
468
470
|
className: "event-week-board-error",
|
|
469
471
|
role: "status",
|
|
470
|
-
children: [/* @__PURE__ */ jsx("p", { children: "Failed to load events" }), /* @__PURE__ */ jsx(
|
|
472
|
+
children: [/* @__PURE__ */ jsx("p", { children: "Failed to load events" }), /* @__PURE__ */ jsx(ThemedButton, {
|
|
471
473
|
type: "button",
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
474
|
+
variant: buttonVariant,
|
|
475
|
+
size: "sm",
|
|
476
|
+
label: "Try again",
|
|
477
|
+
onClick: navigation.loadState.onRetry
|
|
475
478
|
})]
|
|
476
479
|
});
|
|
477
480
|
};
|
|
@@ -503,17 +506,18 @@ const WeekBoardGrid = ({ days, eventsByDate, showCapacity, calendarTimeZone, tod
|
|
|
503
506
|
}, dateKey);
|
|
504
507
|
})
|
|
505
508
|
});
|
|
506
|
-
const WeekBoardFooter = ({ note, ctaHref, ctaLabel,
|
|
509
|
+
const WeekBoardFooter = ({ note, ctaHref, ctaLabel, buttonVariant }) => {
|
|
507
510
|
if (note === null && ctaHref === null) return null;
|
|
508
511
|
return /* @__PURE__ */ jsxs("div", {
|
|
509
512
|
className: "event-week-board-foot",
|
|
510
513
|
children: [note === null ? null : /* @__PURE__ */ jsx("p", {
|
|
511
514
|
className: "event-week-board-foot-note",
|
|
512
515
|
children: note
|
|
513
|
-
}), ctaHref === null ? null : /* @__PURE__ */ jsx(
|
|
514
|
-
|
|
516
|
+
}), ctaHref === null ? null : /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
517
|
+
variant: buttonVariant,
|
|
518
|
+
size: "sm",
|
|
515
519
|
href: ctaHref,
|
|
516
|
-
|
|
520
|
+
label: ctaLabel
|
|
517
521
|
})]
|
|
518
522
|
});
|
|
519
523
|
};
|
|
@@ -528,14 +532,6 @@ const WeekBoardFooter = ({ note, ctaHref, ctaLabel, ctaClassName }) => {
|
|
|
528
532
|
const WeekBoardView = ({ days, events, navigation, showCapacity, emptyMessage = "No classes scheduled this week", title, footerNote, ctaLabel = "Reserve a place", ctaHref = null, buttonVariant = "outline", elevated = false, banded = false, calendarTimeZone, today }) => {
|
|
529
533
|
const eventsByDate = groupEventsByDate(events, calendarTimeZone);
|
|
530
534
|
const hasAnyEvents = days.some((date) => (eventsByDate.get(formatDateKey(date)) ?? []).length > 0);
|
|
531
|
-
const ctaClassName = themeButtonClassName({
|
|
532
|
-
variant: buttonVariant,
|
|
533
|
-
size: "sm"
|
|
534
|
-
});
|
|
535
|
-
const todayClassName = themeButtonClassName({
|
|
536
|
-
variant: buttonVariant,
|
|
537
|
-
size: "sm"
|
|
538
|
-
});
|
|
539
535
|
const hasTitle = typeof title === "string" && title.length > 0;
|
|
540
536
|
const hasFooterNote = typeof footerNote === "string" && footerNote.length > 0;
|
|
541
537
|
const footerNoteText = hasAnyEvents ? hasFooterNote ? footerNote : null : emptyMessage;
|
|
@@ -558,14 +554,14 @@ const WeekBoardView = ({ days, events, navigation, showCapacity, emptyMessage =
|
|
|
558
554
|
}) : null,
|
|
559
555
|
/* @__PURE__ */ jsx(WeekBoardNavigationControls, {
|
|
560
556
|
navigation,
|
|
561
|
-
|
|
557
|
+
buttonVariant
|
|
562
558
|
}),
|
|
563
559
|
/* @__PURE__ */ jsx(WeekBoardLegend, {})
|
|
564
560
|
]
|
|
565
561
|
}),
|
|
566
562
|
/* @__PURE__ */ jsx(WeekBoardLoadError, {
|
|
567
563
|
navigation,
|
|
568
|
-
|
|
564
|
+
buttonVariant
|
|
569
565
|
}),
|
|
570
566
|
/* @__PURE__ */ jsx(WeekBoardGrid, {
|
|
571
567
|
days,
|
|
@@ -578,7 +574,7 @@ const WeekBoardView = ({ days, events, navigation, showCapacity, emptyMessage =
|
|
|
578
574
|
note: footerNoteText,
|
|
579
575
|
ctaHref: resolvedCtaHref,
|
|
580
576
|
ctaLabel,
|
|
581
|
-
|
|
577
|
+
buttonVariant
|
|
582
578
|
})
|
|
583
579
|
]
|
|
584
580
|
})
|
|
@@ -817,7 +813,6 @@ const EventCalendarClient = ({ render }) => {
|
|
|
817
813
|
if (display.displayMode === "combined") return /* @__PURE__ */ jsx(EventCombinedClient, {
|
|
818
814
|
events: hydration.prefetchedEvents ? [...display.events] : void 0,
|
|
819
815
|
siteId: hydration.siteId,
|
|
820
|
-
stage: hydration.stage,
|
|
821
816
|
listLayout: display.listLayout,
|
|
822
817
|
listColumns: display.listColumns,
|
|
823
818
|
eventsPerPage: display.eventsPerPage,
|
|
@@ -870,7 +865,6 @@ const EventCalendarWeekBoardClient = ({ render }) => {
|
|
|
870
865
|
startOfWeek: display.startOfWeek,
|
|
871
866
|
preloadMonths: 1,
|
|
872
867
|
filters,
|
|
873
|
-
stage: hydration.stage,
|
|
874
868
|
calendarContext: hydration.calendarContext,
|
|
875
869
|
calendarWindow: hydration.calendarWindow
|
|
876
870
|
});
|
|
@@ -902,7 +896,6 @@ const EventCalendarTimetableClient = ({ render }) => {
|
|
|
902
896
|
startOfWeek: display.startOfWeek,
|
|
903
897
|
preloadMonths: 1,
|
|
904
898
|
filters: listFilters,
|
|
905
|
-
stage: hydration.stage,
|
|
906
899
|
calendarContext: hydration.calendarContext,
|
|
907
900
|
calendarWindow: hydration.calendarWindow
|
|
908
901
|
});
|
|
@@ -946,7 +939,6 @@ const EventCalendarGridClient = ({ render }) => {
|
|
|
946
939
|
startOfWeek: display.startOfWeek,
|
|
947
940
|
preloadMonths: 1,
|
|
948
941
|
filters: listFilters,
|
|
949
|
-
stage: hydration.stage,
|
|
950
942
|
calendarContext: hydration.calendarContext,
|
|
951
943
|
calendarWindow: hydration.calendarWindow
|
|
952
944
|
});
|
|
@@ -1094,14 +1086,12 @@ const EventCalendarChrome = ({ children, display, calendarView, className, loadS
|
|
|
1094
1086
|
children: /* @__PURE__ */ jsx(CalendarNavigationChevron, { direction: "next" })
|
|
1095
1087
|
})
|
|
1096
1088
|
]
|
|
1097
|
-
}), /* @__PURE__ */ jsx(
|
|
1089
|
+
}), /* @__PURE__ */ jsx(ThemedButton, {
|
|
1098
1090
|
type: "button",
|
|
1099
1091
|
onClick: onToday,
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
}),
|
|
1104
|
-
children: "Today"
|
|
1092
|
+
variant: display.buttonVariant,
|
|
1093
|
+
size: "sm",
|
|
1094
|
+
label: "Today"
|
|
1105
1095
|
})]
|
|
1106
1096
|
}),
|
|
1107
1097
|
children,
|
|
@@ -1110,14 +1100,12 @@ const EventCalendarChrome = ({ children, display, calendarView, className, loadS
|
|
|
1110
1100
|
children: [/* @__PURE__ */ jsx("p", {
|
|
1111
1101
|
className: "status-error rb-caption rb-mb-2",
|
|
1112
1102
|
children: "Failed to load events"
|
|
1113
|
-
}), /* @__PURE__ */ jsx(
|
|
1103
|
+
}), /* @__PURE__ */ jsx(ThemedButton, {
|
|
1114
1104
|
type: "button",
|
|
1115
1105
|
onClick: onRetry,
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
}),
|
|
1120
|
-
children: "Try again"
|
|
1106
|
+
variant: display.buttonVariant,
|
|
1107
|
+
size: "sm",
|
|
1108
|
+
label: "Try again"
|
|
1121
1109
|
})]
|
|
1122
1110
|
}) : null
|
|
1123
1111
|
]
|
|
@@ -1130,6 +1118,7 @@ const enhance = (root, props) => {
|
|
|
1130
1118
|
if (!siteId) throw new Error("[sdk:islands] event-calendar requires siteId");
|
|
1131
1119
|
if (!apiBaseUrl) throw new Error("[sdk:islands] event-calendar requires apiBaseUrl");
|
|
1132
1120
|
const apiConfig = buildRouteIslandApiConfig({
|
|
1121
|
+
readAuthority: props.readAuthority,
|
|
1133
1122
|
apiBaseUrl,
|
|
1134
1123
|
siteId,
|
|
1135
1124
|
stage
|
|
@@ -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-DPXtCZWP.mjs";
|
|
2
|
+
import { n as EventCombinedIslandClient } from "./EventCombined.client-DSBVwq5m.mjs";
|
|
3
|
+
import { t as BlockApiProvider } from "./context-CDLCfDep.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-NGYiUWXu.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/rendering/islands/enhancers/eventCombined.tsx
|
|
@@ -11,6 +11,7 @@ const enhance = (root, props) => {
|
|
|
11
11
|
const { siteId, apiBaseUrl, stage } = props;
|
|
12
12
|
if (!apiBaseUrl) throw new Error("[sdk:islands] event-combined requires apiBaseUrl");
|
|
13
13
|
const apiConfig = buildRouteIslandApiConfig({
|
|
14
|
+
readAuthority: props.readAuthority,
|
|
14
15
|
apiBaseUrl,
|
|
15
16
|
siteId,
|
|
16
17
|
stage
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as resolveEventRegistrationScopedEvents,
|
|
2
|
-
import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-
|
|
3
|
-
import { d as resolveEventLinkProps, r as formatEventDateParts } from "./dates-
|
|
1
|
+
import { A as resolveEventRegistrationScopedEvents, Kt as CANCELLED_SESSION_STATUS, _n as formatCurrencyAmount, cn as toScheduledBookingDateTime, dn as isPublicEventPricingOptionDisplayable, fn as publicEventPricingCurrency, gn as publicEventPricingType, ln as formatBookingPriceDisplay, nn as getBookingLocalDateKey, on as toBookingTimeZone, pn as publicEventPricingDisplay, qt as resolveWholeSeriesBookingPhase, t as defineIslandPropsDecoder } from "./propsDecoder-DPXtCZWP.mjs";
|
|
2
|
+
import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-Bl1CAl28.mjs";
|
|
3
|
+
import { d as resolveEventLinkProps, r as formatEventDateParts } from "./dates-ClFx7Epy.mjs";
|
|
4
4
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
5
|
-
import { t as LeafletStaticMap } from "./LeafletStaticMap-
|
|
5
|
+
import { t as LeafletStaticMap } from "./LeafletStaticMap-BAqXdfhq.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
|
|
@@ -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-DPXtCZWP.mjs";
|
|
2
|
+
import { t as BlockApiProvider } from "./context-CDLCfDep.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-NGYiUWXu.mjs";
|
|
5
|
+
import { t as EventListingClient } from "./EventListing.client-DmFAX7Vb.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/rendering/islands/enhancers/eventListing.tsx
|
|
@@ -12,6 +12,7 @@ const enhance = (root, props) => {
|
|
|
12
12
|
if (!siteId) throw new Error("[sdk:islands] event-listing requires siteId");
|
|
13
13
|
if (!apiBaseUrl) throw new Error("[sdk:islands] event-listing requires apiBaseUrl");
|
|
14
14
|
const apiConfig = buildRouteIslandApiConfig({
|
|
15
|
+
readAuthority: props.readAuthority,
|
|
15
16
|
apiBaseUrl,
|
|
16
17
|
siteId,
|
|
17
18
|
stage
|