@riverbankcms/sdk 0.142.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-Dk6Dt11f.mjs → PreviewEditorSidebar-CQZNnFiM.mjs} +20 -26
- package/dist/{PreviewEditorUI-D6EQTsCA.mjs → PreviewEditorUI-DCNxnmI0.mjs} +3 -3
- package/dist/{PreviewQueryProvider-CC-EPkyQ.mjs → PreviewQueryProvider-BCYICImX.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DH1n4ytY.mjs → SdkPreviewModeRuntime-BJolUbr1.mjs} +17 -8
- package/dist/{SiteChromeCustomizeContext-DunIzY0K.mjs → SiteChromeCustomizeContext-CKgEpoxi.mjs} +2406 -1988
- 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/endpoints.d.ts +7 -0
- 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/publicEventEndpointDefinitions.d.ts +7 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +49 -41
- 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 +7 -1
- package/dist/_dts/blocks/src/system/runtime/api/context.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +18 -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/api/types/events.d.ts +95 -35
- 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/PaymentStatusStep.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +0 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +14 -1
- 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/event-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +1 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +9 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +56 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +12 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +1 -1
- 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/commerce/src/purchase/event-registration-errors.d.ts +4 -4
- package/dist/_dts/commerce/src/purchase/eventCheckoutRecoveryWindow.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +2 -1
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +1 -13
- 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 +3126 -3077
- 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-CnJeq3_r.mjs → BookingConsentAgreement-DoAILrkN.mjs} +4 -55
- package/dist/client/{DiscountCodeDisclosure-BINEO6J9.mjs → DiscountCodeDisclosure-X528hUTf.mjs} +27 -17
- package/dist/client/{EventCombined.client-srxNQ6sZ.mjs → EventCombined.client-DSBVwq5m.mjs} +54 -46
- package/dist/client/{EventListing.client-DbyVyGkX.mjs → EventListing.client-DmFAX7Vb.mjs} +3 -4
- package/dist/client/{LeafletStaticMap-B-wpijzL.mjs → LeafletStaticMap-BAqXdfhq.mjs} +1 -1
- package/dist/client/ThemedButton-BwNFVwi4.mjs +412 -0
- package/dist/client/{accordion-B-iUXU7n.mjs → accordion-DRhMdkbd.mjs} +1 -1
- package/dist/client/{bookingForm-BXYPke5q.mjs → bookingForm-iJ_nCsNF.mjs} +26 -32
- package/dist/client/bookings.mjs +657 -650
- package/dist/client/{carousel-Cr4aj63H.mjs → carousel-D8zuffZr.mjs} +2 -2
- package/dist/client/{carousel.client-DQTjCVQT.mjs → carousel.client-jahpU9Vz.mjs} +1 -1
- package/dist/client/{cart-DibP9WWa.mjs → cart-DeMGJViN.mjs} +3 -3
- package/dist/client/{checkout-CrSBVnL8.mjs → checkout-DXc06Km2.mjs} +3 -3
- package/dist/client/{checkoutUrls-FL6lRkrt.mjs → checkoutUrls-CW3-78uu.mjs} +1 -1
- package/dist/client/client.mjs +2714 -2448
- package/dist/client/{colorStyles-3013aRAY.mjs → colorStyles-CuJBiS-1.mjs} +16 -4
- package/dist/client/{context-Ces-AgdR.mjs → context-CDLCfDep.mjs} +35 -8
- package/dist/client/{dates-BXyNeNhB.mjs → dates-ClFx7Epy.mjs} +2 -2
- package/dist/client/{eventCalendar-HwpPeqrH.mjs → eventCalendar-BaGpnOGN.mjs} +39 -50
- package/dist/client/{eventCombined-BpFUkuEI.mjs → eventCombined-ywONOx2m.mjs} +5 -4
- package/dist/client/{eventDetails-DK_agiWy.mjs → eventDetails-B2LlOTYY.mjs} +4 -4
- package/dist/client/{eventListing-DhzHqP1c.mjs → eventListing-CMgxWpqP.mjs} +5 -4
- package/dist/client/{eventRegistration-BdQ_Dn2d.mjs → eventRegistration-BarLDNHR.mjs} +549 -592
- package/dist/client/{form-B1frcuzy.mjs → form-BjqKaBJ7.mjs} +9 -10
- package/dist/client/{headerSection-CT5z460s.mjs → headerSection-CP4XDwz1.mjs} +23 -30
- package/dist/client/hooks.mjs +269 -63
- package/dist/client/{locationMap-CIQXB9i2.mjs → locationMap-C5gW-d-w.mjs} +9 -10
- package/dist/client/{media-DHpfFwd3.mjs → media-BtJ37tzS.mjs} +1 -1
- package/dist/client/{newsletterForm-BYNYZSes.mjs → newsletterForm-afXlVSA0.mjs} +8 -9
- package/dist/client/{pricing-CbTlAsmt.mjs → pricing-Bl1CAl28.mjs} +1 -1
- package/dist/client/{productDetail-CR7Z3yjS.mjs → productDetail-CvQ3jWQe.mjs} +3 -3
- package/dist/client/{productList-DXj00vzR.mjs → productList-U874PGO7.mjs} +3 -3
- package/dist/client/{propsDecoder-DiLiBdek.mjs → propsDecoder-DPXtCZWP.mjs} +100 -29
- package/dist/client/rendering/client.mjs +2397 -2279
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2742 -2452
- package/dist/client/{routeIslandApiConfig-UNsfPcYq.mjs → routeIslandApiConfig-NGYiUWXu.mjs} +8 -1
- package/dist/client/{scrollToBlock-CrcbBf0h.mjs → scrollToBlock-0-C3DVhK.mjs} +1 -1
- package/dist/client/{shop-DgqiB_1b.mjs → shop-BXjXhM9P.mjs} +45 -58
- package/dist/client/{shop-commerce-D_J781in.mjs → shop-commerce-BZ6UlWJ7.mjs} +42 -55
- package/dist/client/{shop-commerce-store-PGUbDwqe.mjs → shop-commerce-store-DlSBXb3D.mjs} +1 -1
- package/dist/client/{shopShared-C_Bb2zwG.mjs → shopShared-kkEOiLPA.mjs} +6 -5
- package/dist/client/{useEventFilters-CM17Xpr1.mjs → useEventFilters-zvnnE1ro.mjs} +66 -355
- package/dist/preview-next/before-render.mjs +11 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-chrome.css +8 -0
- package/dist/preview-next/keepAlive.mjs +11 -0
- package/dist/preview-next/middleware.mjs +11 -0
- package/dist/{previewAuthStore-oVttoRDO.mjs → previewAuthStore-JA6-I_sL.mjs} +11 -0
- package/dist/{sdk-runtime-DhmuRhIX.mjs → sdk-runtime-DFJlQt3q.mjs} +2 -2
- package/dist/{separator-C3hlg9LH.mjs → separator-o8GHb1xh.mjs} +1 -1
- package/dist/server/components.mjs +840 -625
- package/dist/server/config-validation.mjs +269 -63
- package/dist/server/config.mjs +269 -63
- package/dist/server/data.mjs +269 -63
- package/dist/server/index.mjs +20 -5
- package/dist/server/navigation.mjs +28 -1
- package/dist/server/next.mjs +14129 -13937
- package/dist/server/page-converter.mjs +111 -59
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +844 -624
- package/dist/server/rendering.mjs +842 -626
- package/dist/server/routing.mjs +306 -69
- package/dist/server/server.mjs +278 -68
- package/dist/server/theme-bridge.mjs +40 -1
- package/dist/styles/index.css +6 -0
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +0 -8
|
@@ -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",
|
|
@@ -185,6 +188,10 @@ const EVENTS = {
|
|
|
185
188
|
method: "POST",
|
|
186
189
|
authScope: "portal"
|
|
187
190
|
},
|
|
191
|
+
registrationNextStep: {
|
|
192
|
+
path: "/public/sites/{siteId}/events/registration-next-step",
|
|
193
|
+
method: "POST"
|
|
194
|
+
},
|
|
188
195
|
registrationStatus: {
|
|
189
196
|
path: "/public/sites/{siteId}/events/registration-status",
|
|
190
197
|
method: "GET"
|
|
@@ -202,7 +209,8 @@ const WHOLE_SERIES = { waitlistClaimResolve: {
|
|
|
202
209
|
const SHOP = {
|
|
203
210
|
listProducts: {
|
|
204
211
|
path: "/public/sites/{siteId}/products",
|
|
205
|
-
method: "GET"
|
|
212
|
+
method: "GET",
|
|
213
|
+
previewRead: true
|
|
206
214
|
},
|
|
207
215
|
checkout: {
|
|
208
216
|
path: "/public/sites/{siteId}/bookings/checkout",
|
|
@@ -596,7 +604,11 @@ function publicEventsQuery(params) {
|
|
|
596
604
|
return { ...params ?? {} };
|
|
597
605
|
}
|
|
598
606
|
function createBlockApi(config) {
|
|
599
|
-
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;
|
|
600
612
|
const dedup = createDeduplicationCache({ ttl: 100 });
|
|
601
613
|
const shouldUsePreviewStageForNonPortalRequests = isPreview && auth.type !== "none";
|
|
602
614
|
function isPortalEndpoint(endpoint) {
|
|
@@ -604,17 +616,25 @@ function createBlockApi(config) {
|
|
|
604
616
|
}
|
|
605
617
|
function selectAuth(endpoint) {
|
|
606
618
|
if (endpoint.authScope === "portal" && authOverrides?.portal) return authOverrides.portal;
|
|
619
|
+
if (readAuthority && !endpoint.previewRead) return { type: "none" };
|
|
607
620
|
return auth;
|
|
608
621
|
}
|
|
609
622
|
/**
|
|
610
623
|
* Make an API request
|
|
611
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
|
+
}
|
|
612
633
|
async function request(endpoint, options) {
|
|
613
634
|
const { path, body, query, skipDedup = false } = options ?? {};
|
|
614
635
|
let url = `${baseUrl}${path ?? endpoint.path}`;
|
|
615
636
|
const selectedAuth = selectAuth(endpoint);
|
|
616
|
-
const queryParams =
|
|
617
|
-
if (shouldUsePreviewStageForNonPortalRequests && !isPortalEndpoint(endpoint) && (queryParams.stage === void 0 || queryParams.stage === null)) queryParams.stage = "preview";
|
|
637
|
+
const queryParams = bindReadQuery(endpoint, query);
|
|
618
638
|
if (Object.keys(queryParams).length > 0) url = appendQuery(url, queryParams);
|
|
619
639
|
const headers = {
|
|
620
640
|
Accept: "application/json",
|
|
@@ -789,6 +809,13 @@ function createBlockApi(config) {
|
|
|
789
809
|
body: data
|
|
790
810
|
});
|
|
791
811
|
},
|
|
812
|
+
async checkRegistrationNextStep(data) {
|
|
813
|
+
const path = buildPath(EVENTS.registrationNextStep.path, { siteId: requireSiteId() });
|
|
814
|
+
return request(EVENTS.registrationNextStep, {
|
|
815
|
+
path,
|
|
816
|
+
body: data
|
|
817
|
+
});
|
|
818
|
+
},
|
|
792
819
|
async getEventRegistrationStatus(params) {
|
|
793
820
|
const sid = requireSiteId();
|
|
794
821
|
const path = buildPath(EVENTS.registrationStatus.path, { siteId: sid });
|
|
@@ -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 {
|
|
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
|