@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
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { O as clsx } from "./colorStyles-
|
|
3
|
-
import {
|
|
4
|
-
import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-
|
|
2
|
+
import { O as clsx } from "./colorStyles-CuJBiS-1.mjs";
|
|
3
|
+
import { Jt as parseMailingListVisitorSelection, t as defineIslandPropsDecoder, yn as assertNever$1, zt as assertNever } from "./propsDecoder-DPXtCZWP.mjs";
|
|
4
|
+
import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-CDLCfDep.mjs";
|
|
5
5
|
import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
|
|
6
|
+
import { t as ThemedButton } from "./ThemedButton-BwNFVwi4.mjs";
|
|
6
7
|
import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
|
|
7
8
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
|
|
8
9
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
@@ -254,14 +255,12 @@ function NewsletterFormClient({ render }) {
|
|
|
254
255
|
}),
|
|
255
256
|
/* @__PURE__ */ jsx("div", {
|
|
256
257
|
className: "newsletter-submit",
|
|
257
|
-
children: /* @__PURE__ */ jsx(
|
|
258
|
+
children: /* @__PURE__ */ jsx(ThemedButton, {
|
|
258
259
|
type: "submit",
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
size: "md"
|
|
262
|
-
}),
|
|
260
|
+
variant: render.display.buttonVariant,
|
|
261
|
+
size: "md",
|
|
263
262
|
disabled: submitting,
|
|
264
|
-
|
|
263
|
+
label: submitting ? "Subscribing..." : render.display.buttonLabel
|
|
265
264
|
})
|
|
266
265
|
})
|
|
267
266
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ln as formatBookingPriceDisplay, pn as publicEventPricingDisplay, un as formatEventPricing } from "./propsDecoder-DPXtCZWP.mjs";
|
|
2
2
|
//#region ../blocks/src/system/runtime/nodes/events/domain/capacity.ts
|
|
3
3
|
/**
|
|
4
4
|
* Compute remaining spots for an event from `availableSpots` with a fallback
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { r as ProductDetailController } from "./shop-commerce-
|
|
3
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DPXtCZWP.mjs";
|
|
2
|
+
import { r as ProductDetailController } from "./shop-commerce-BZ6UlWJ7.mjs";
|
|
3
|
+
import { t as mountShopBlockIsland } from "./shopShared-kkEOiLPA.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region ../blocks/src/system/runtime/nodes/product-detail.client.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { i as ProductListController } from "./shop-commerce-
|
|
3
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DPXtCZWP.mjs";
|
|
2
|
+
import { i as ProductListController } from "./shop-commerce-BZ6UlWJ7.mjs";
|
|
3
|
+
import { t as mountShopBlockIsland } from "./shopShared-kkEOiLPA.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region ../blocks/src/system/runtime/nodes/product-list.client.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as ok$1, E as err$1, _ as parseEventSeriesId, a as paletteColorEntries, c as themeColorTokenSchema, g as parseEventOfferingId, h as parseContentVersionId, l as parseColorTokenParts, o as paletteColorsFromEntries, p as parseAspectRatioValue, r as rgbColorValue, s as parseThemeColorToken } from "./colorStyles-
|
|
1
|
+
import { D as ok$1, E as err$1, _ as parseEventSeriesId, a as paletteColorEntries, c as themeColorTokenSchema, g as parseEventOfferingId, h as parseContentVersionId, l as parseColorTokenParts, o as paletteColorsFromEntries, p as parseAspectRatioValue, r as rgbColorValue, s as parseThemeColorToken } from "./colorStyles-CuJBiS-1.mjs";
|
|
2
2
|
import "react";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import "react/jsx-runtime";
|
|
@@ -3067,13 +3067,6 @@ function themeButtonVariantClassNames(variant) {
|
|
|
3067
3067
|
function themeButtonSizeClassName(size) {
|
|
3068
3068
|
return `btn-${size}`;
|
|
3069
3069
|
}
|
|
3070
|
-
function themeButtonClassName(spec) {
|
|
3071
|
-
return [
|
|
3072
|
-
...themeButtonVariantClassNames(spec.variant),
|
|
3073
|
-
themeButtonSizeClassName(spec.size),
|
|
3074
|
-
spec.extraClassName
|
|
3075
|
-
].filter(Boolean).join(" ");
|
|
3076
|
-
}
|
|
3077
3070
|
shadeBackgroundEffect({
|
|
3078
3071
|
id: "darken-background",
|
|
3079
3072
|
name: "Darken on Hover",
|
|
@@ -7305,6 +7298,33 @@ function normalizeEventCalendarDisplayMode(input) {
|
|
|
7305
7298
|
if (isEventCalendarDisplayMode(input.variant)) return input.variant;
|
|
7306
7299
|
return isEventCalendarDisplayMode(input.displayMode) ? input.displayMode : void 0;
|
|
7307
7300
|
}
|
|
7301
|
+
/** One closed authority for the projections required by each rendered mode. */
|
|
7302
|
+
function resolveEventCalendarReadPlan(input) {
|
|
7303
|
+
const mode = normalizeEventCalendarDisplayMode(input) ?? "combined";
|
|
7304
|
+
switch (mode) {
|
|
7305
|
+
case "combined": return {
|
|
7306
|
+
mode,
|
|
7307
|
+
jobs: "both",
|
|
7308
|
+
readProfile: "listing-card"
|
|
7309
|
+
};
|
|
7310
|
+
case "list": return {
|
|
7311
|
+
mode,
|
|
7312
|
+
jobs: "list",
|
|
7313
|
+
readProfile: "listing-card"
|
|
7314
|
+
};
|
|
7315
|
+
case "calendar": return {
|
|
7316
|
+
mode,
|
|
7317
|
+
jobs: "calendar",
|
|
7318
|
+
readProfile: "listing-card"
|
|
7319
|
+
};
|
|
7320
|
+
case "timetable":
|
|
7321
|
+
case "week-board": return {
|
|
7322
|
+
mode,
|
|
7323
|
+
jobs: "calendar",
|
|
7324
|
+
readProfile: "timetable"
|
|
7325
|
+
};
|
|
7326
|
+
}
|
|
7327
|
+
}
|
|
7308
7328
|
//#endregion
|
|
7309
7329
|
//#region ../blocks/src/system/constants/buttonRoles.ts
|
|
7310
7330
|
/**
|
|
@@ -7444,10 +7464,36 @@ function getEventRuntimeFiltersKey(filters) {
|
|
|
7444
7464
|
});
|
|
7445
7465
|
}
|
|
7446
7466
|
//#endregion
|
|
7467
|
+
//#region ../blocks/src/system/runtime/api/readAuthority.ts
|
|
7468
|
+
const browserReadAuthoritySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
7469
|
+
kind: z.literal("preview"),
|
|
7470
|
+
token: z.string().min(1)
|
|
7471
|
+
}).strict()]);
|
|
7472
|
+
/** Generic SDK/editor configuration is projected here; hosted callers supply the closed union. */
|
|
7473
|
+
function getBlockApiReadStage(config) {
|
|
7474
|
+
return config.readAuthority?.kind ?? (config.isPreview && config.auth.type !== "none" ? "preview" : "published");
|
|
7475
|
+
}
|
|
7476
|
+
function createHostedBlockApiConfig(input) {
|
|
7477
|
+
const { baseUrl, siteId, readAuthority, portalToken } = input;
|
|
7478
|
+
return {
|
|
7479
|
+
baseUrl,
|
|
7480
|
+
siteId,
|
|
7481
|
+
readAuthority,
|
|
7482
|
+
auth: readAuthority.kind === "preview" ? {
|
|
7483
|
+
type: "bearer",
|
|
7484
|
+
token: readAuthority.token
|
|
7485
|
+
} : { type: "none" },
|
|
7486
|
+
isPreview: readAuthority.kind === "preview",
|
|
7487
|
+
authOverrides: { portal: portalToken ? {
|
|
7488
|
+
type: "bearer",
|
|
7489
|
+
token: portalToken
|
|
7490
|
+
} : { type: "none" } }
|
|
7491
|
+
};
|
|
7492
|
+
}
|
|
7493
|
+
//#endregion
|
|
7447
7494
|
//#region ../blocks/src/system/blocks/events/shared/calendarWindow.ts
|
|
7448
7495
|
function resolveCalendarReadProfile(content) {
|
|
7449
|
-
|
|
7450
|
-
return mode === "timetable" || mode === "week-board" ? "timetable" : "listing-card";
|
|
7496
|
+
return resolveEventCalendarReadPlan(content).readProfile;
|
|
7451
7497
|
}
|
|
7452
7498
|
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
7453
7499
|
function normalizeCalendarFilterId(value) {
|
|
@@ -7619,6 +7665,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
7619
7665
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
7620
7666
|
siteId: z.string(),
|
|
7621
7667
|
apiBaseUrl: z.string().optional(),
|
|
7668
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
7622
7669
|
stage: previewStageSchema.optional(),
|
|
7623
7670
|
listLayout: eventLayoutSchema.optional(),
|
|
7624
7671
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -7671,7 +7718,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
7671
7718
|
const eventCollectionHydrationSchema = z.object({
|
|
7672
7719
|
siteId: z.string(),
|
|
7673
7720
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
7674
|
-
stage: previewStageSchema.optional(),
|
|
7675
7721
|
prefetchedEvents: z.boolean(),
|
|
7676
7722
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
7677
7723
|
filterEventPresets: z.string().nullable(),
|
|
@@ -7746,7 +7792,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
7746
7792
|
return {
|
|
7747
7793
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
7748
7794
|
siteId: source.siteId,
|
|
7749
|
-
stage: source.stage,
|
|
7750
7795
|
prefetchedEvents: source.events != null,
|
|
7751
7796
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
7752
7797
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -7786,6 +7831,7 @@ const eventListingSourceSchema = z.object({
|
|
|
7786
7831
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
7787
7832
|
siteId: z.string(),
|
|
7788
7833
|
apiBaseUrl: z.string().optional(),
|
|
7834
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
7789
7835
|
stage: previewStageSchema.optional(),
|
|
7790
7836
|
layout: eventLayoutSchema.optional(),
|
|
7791
7837
|
columns: columnOptionSchema.optional(),
|
|
@@ -7826,7 +7872,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
7826
7872
|
});
|
|
7827
7873
|
const eventListingHydrationSchema = z.object({
|
|
7828
7874
|
siteId: z.string(),
|
|
7829
|
-
stage: previewStageSchema.optional(),
|
|
7830
7875
|
eventsPerPage: eventPageSizeSchema,
|
|
7831
7876
|
paginationAction: eventListPaginationActionSchema,
|
|
7832
7877
|
showFilters: z.boolean(),
|
|
@@ -7849,6 +7894,7 @@ const eventListingRenderSchema = z.object({
|
|
|
7849
7894
|
const eventListingIslandMetaCodec = createZodCodec(z.object({
|
|
7850
7895
|
siteId: z.string(),
|
|
7851
7896
|
apiBaseUrl: z.string().optional(),
|
|
7897
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
7852
7898
|
stage: previewStageSchema.optional()
|
|
7853
7899
|
}));
|
|
7854
7900
|
const eventListingInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -7884,7 +7930,6 @@ const eventListingInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
7884
7930
|
},
|
|
7885
7931
|
hydration: {
|
|
7886
7932
|
siteId: source.siteId,
|
|
7887
|
-
stage: source.stage,
|
|
7888
7933
|
eventsPerPage: pageSize,
|
|
7889
7934
|
paginationAction: resolveEventListPaginationAction({
|
|
7890
7935
|
paginationMode: source.paginationMode,
|
|
@@ -7909,10 +7954,11 @@ const eventListingInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
7909
7954
|
}),
|
|
7910
7955
|
mode: "event-listing",
|
|
7911
7956
|
meta: eventListingIslandMetaCodec,
|
|
7912
|
-
metaKeys: defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage"),
|
|
7957
|
+
metaKeys: defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "readAuthority", "stage"),
|
|
7913
7958
|
selectMeta: (value) => ({
|
|
7914
7959
|
siteId: value.siteId,
|
|
7915
7960
|
apiBaseUrl: value.apiBaseUrl,
|
|
7961
|
+
readAuthority: value.readAuthority,
|
|
7916
7962
|
stage: value.stage
|
|
7917
7963
|
})
|
|
7918
7964
|
});
|
|
@@ -10640,9 +10686,10 @@ const eventCalendarRenderSchema = z.object({
|
|
|
10640
10686
|
const eventCalendarIslandMetaCodec = createZodCodec(z.object({
|
|
10641
10687
|
siteId: z.string(),
|
|
10642
10688
|
apiBaseUrl: z.string().optional(),
|
|
10689
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
10643
10690
|
stage: previewStageSchema.optional()
|
|
10644
10691
|
}));
|
|
10645
|
-
const eventCalendarIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
|
|
10692
|
+
const eventCalendarIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "readAuthority", "stage");
|
|
10646
10693
|
/**
|
|
10647
10694
|
* Collapse an optional/blank string to `undefined` so downstream week-board
|
|
10648
10695
|
* copy (title, footer note) and the CTA href stay hidden unless a site opts in
|
|
@@ -10662,7 +10709,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
10662
10709
|
listColumns: source.listColumns ?? source.columns
|
|
10663
10710
|
}),
|
|
10664
10711
|
kind: "event-calendar",
|
|
10665
|
-
displayMode:
|
|
10712
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
10666
10713
|
className: source.className ?? null,
|
|
10667
10714
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
10668
10715
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -10683,7 +10730,6 @@ function buildEventCalendarListingRender(render, className = render.display.clas
|
|
|
10683
10730
|
display: buildEventCalendarListingDisplay(display, hydration.prefetchedEvents, className),
|
|
10684
10731
|
hydration: {
|
|
10685
10732
|
siteId: hydration.siteId,
|
|
10686
|
-
stage: hydration.stage,
|
|
10687
10733
|
eventsPerPage: display.eventsPerPage,
|
|
10688
10734
|
paginationAction: display.paginationAction,
|
|
10689
10735
|
showFilters: display.showFilters,
|
|
@@ -10708,13 +10754,16 @@ const eventCalendarInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
10708
10754
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
10709
10755
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
10710
10756
|
},
|
|
10711
|
-
buildRender: (source) =>
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10757
|
+
buildRender: (source) => {
|
|
10758
|
+
const plan = resolveEventCalendarReadPlan(source);
|
|
10759
|
+
return {
|
|
10760
|
+
display: buildEventCalendarDisplay(source.calendarWindow && plan.jobs === "calendar" ? {
|
|
10761
|
+
...source,
|
|
10762
|
+
events: source.calendarWindow.events
|
|
10763
|
+
} : source),
|
|
10764
|
+
hydration: buildEventCollectionHydration(source)
|
|
10765
|
+
};
|
|
10766
|
+
}
|
|
10718
10767
|
}),
|
|
10719
10768
|
mode: "event-calendar",
|
|
10720
10769
|
meta: eventCalendarIslandMetaCodec,
|
|
@@ -10722,6 +10771,7 @@ const eventCalendarInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
10722
10771
|
selectMeta: (value) => ({
|
|
10723
10772
|
siteId: value.siteId,
|
|
10724
10773
|
apiBaseUrl: value.apiBaseUrl,
|
|
10774
|
+
readAuthority: value.readAuthority,
|
|
10725
10775
|
stage: value.stage
|
|
10726
10776
|
})
|
|
10727
10777
|
});
|
|
@@ -10741,9 +10791,10 @@ const eventCombinedRenderSchema = z.object({
|
|
|
10741
10791
|
const eventCombinedIslandMetaCodec = createZodCodec(z.object({
|
|
10742
10792
|
siteId: z.string(),
|
|
10743
10793
|
apiBaseUrl: z.string().optional(),
|
|
10794
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
10744
10795
|
stage: previewStageSchema.optional()
|
|
10745
10796
|
}));
|
|
10746
|
-
const eventCombinedIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
|
|
10797
|
+
const eventCombinedIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "readAuthority", "stage");
|
|
10747
10798
|
function buildEventCombinedDisplay(source) {
|
|
10748
10799
|
return {
|
|
10749
10800
|
...buildEventCollectionDisplay(source),
|
|
@@ -10769,6 +10820,7 @@ const eventCombinedInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
10769
10820
|
selectMeta: (value) => ({
|
|
10770
10821
|
siteId: value.siteId,
|
|
10771
10822
|
apiBaseUrl: value.apiBaseUrl,
|
|
10823
|
+
readAuthority: value.readAuthority,
|
|
10772
10824
|
stage: value.stage
|
|
10773
10825
|
})
|
|
10774
10826
|
});
|
|
@@ -11003,6 +11055,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
11003
11055
|
apiBaseUrl: z.string().optional(),
|
|
11004
11056
|
portalToken: z.string().nullable().optional(),
|
|
11005
11057
|
previewToken: z.string().nullable().optional(),
|
|
11058
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
11006
11059
|
...eventRegistrationHydrationSchemaShape,
|
|
11007
11060
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
11008
11061
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -11040,9 +11093,10 @@ const eventRegistrationIslandMetaCodec = createZodCodec(z.object({
|
|
|
11040
11093
|
apiBaseUrl: z.string().optional(),
|
|
11041
11094
|
portalToken: z.string().nullable().optional(),
|
|
11042
11095
|
previewToken: z.string().nullable().optional(),
|
|
11096
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
11043
11097
|
stage: previewStageSchema.optional()
|
|
11044
11098
|
}));
|
|
11045
|
-
const eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "portalToken", "previewToken", "stage");
|
|
11099
|
+
const eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "portalToken", "previewToken", "readAuthority", "stage");
|
|
11046
11100
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
11047
11101
|
const selectedRun = resolveSelectedWholeSeriesRun(scopedSourceEvents);
|
|
11048
11102
|
if (selectedRun && (!selectedRun.run.enrollmentOpen || toWholeSeriesRegistrationEvent(selectedRun) === null)) return {
|
|
@@ -11185,6 +11239,7 @@ const eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCode
|
|
|
11185
11239
|
apiBaseUrl: value.apiBaseUrl,
|
|
11186
11240
|
portalToken: value.portalToken,
|
|
11187
11241
|
previewToken: value.previewToken,
|
|
11242
|
+
readAuthority: value.readAuthority,
|
|
11188
11243
|
stage: value.stage
|
|
11189
11244
|
})
|
|
11190
11245
|
});
|
|
@@ -12279,6 +12334,7 @@ const shopSourceSchema = z.object({
|
|
|
12279
12334
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
12280
12335
|
siteId: z.string().optional(),
|
|
12281
12336
|
apiBaseUrl: z.string().optional(),
|
|
12337
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
12282
12338
|
stage: previewStageSchema.optional()
|
|
12283
12339
|
});
|
|
12284
12340
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -12446,13 +12502,15 @@ function resolveShowPricePerCredit(source) {
|
|
|
12446
12502
|
const shopIslandMetaCodec = createZodCodec(z.object({
|
|
12447
12503
|
siteId: z.string().optional(),
|
|
12448
12504
|
apiBaseUrl: z.string().optional(),
|
|
12505
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
12449
12506
|
stage: previewStageSchema.optional()
|
|
12450
12507
|
}));
|
|
12451
|
-
const shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
|
|
12508
|
+
const shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "readAuthority", "stage");
|
|
12452
12509
|
function selectShopIslandMeta(value) {
|
|
12453
12510
|
return {
|
|
12454
12511
|
siteId: value.siteId,
|
|
12455
12512
|
apiBaseUrl: value.apiBaseUrl,
|
|
12513
|
+
readAuthority: value.readAuthority,
|
|
12456
12514
|
stage: value.stage
|
|
12457
12515
|
};
|
|
12458
12516
|
}
|
|
@@ -12675,4 +12733,4 @@ function defineIslandPropsDecoder(kind) {
|
|
|
12675
12733
|
};
|
|
12676
12734
|
}
|
|
12677
12735
|
//#endregion
|
|
12678
|
-
export {
|
|
12736
|
+
export { addDays as $, formatBookingInstant as $t, resolveEventRegistrationScopedEvents as A, resolveBookingSiteId as At, calendarWindowPageSchema as B, clearWorkflowFeedback as Bt, resolveRegistrationTarget as C, getBookingServiceSlidingScale as Ct, getWizardStepsForContext as D, prepareBookingSubmission as Dt, getStepNumber as E, parseBookingCurrencyInputToCents as Et, calendarMonthKey as F, BOOKING_FORM_DATA_RESERVED_KEYS as Ft, buildEventRuntimeFilters as G, reportWorkflowSuccess as Gt, resolveCalendarReadProfile as H, ok as Ht, calendarPageResponseError as I, isBookingRequirementConsentFieldId as It, normalizeCsvString as J, parseMailingListVisitorSelection as Jt, getEventRuntimeFiltersKey as K, CANCELLED_SESSION_STATUS as Kt, calendarQueryKey as L, RichTextDocSchema as Lt, isSemanticSpacing as M, toSelectedCollectionOptionKind as Mt, resolveSpacing as N, projectSelectedAppointmentConsentIntoForm as Nt, buildEventCalendarListingRender as O, resolveAppointmentCheckoutVerificationState as Ot, calendarMonthDate as P, resolveSelectedAppointmentConsent as Pt, MONTH_NAMES as Q, formatBookingDateTime as Qt, calendarWindowBounds as R, isRecord$4 as Rt, resolveEventRequiresPayment as S, getBookingRedirectStateFromLocation as St, WIZARD_STEPS as T, isBookingServiceSlidingAmountInRange as Tt, createHostedBlockApiConfig as U, okWith as Ut, planCalendarMonthRanges as V, err as Vt, getBlockApiReadStage as W, reportWorkflowError as Wt, getCardOrientation as X, formatBookingDate as Xt, normalizeOptionalId as Y, addLocalScheduleDays as Yt, getContainerClass as Z, formatBookingDateParts as Zt, toRegistrationEvents as _, formatCurrencyAmount as _n, normalizeCardRole as _t, buildProductDetailDisplay as a, resolveBookingTimeZoneId as an, getWeekCalendarDays as at, findPreSelectedEvent as b, formatBookingCentsAsCurrencyInput as bt, EMPTY_COMMERCE_CART_STATE as c, toScheduledBookingDateTime as cn, shiftCalendarAnchorDate as ct, deriveCommerceCheckoutState as d, isPublicEventPricingOptionDisplayable as dn, boxBackgroundSchema as dt, formatBookingTime as en, addMonths as et, parseStoredCommerceCartState as f, publicEventPricingCurrency as fn, isCssColorLiteral as ft, getRegistrationStartAt as g, publicEventPricingType as gn, themeButtonVariantClassNames as gt, buildEventRegistrationDisplayFromScopedEvents as h, publicEventPricingStrategy as hn, themeButtonSizeClassName as ht, buildProductCardDisplay as i, parseBookingLocalDate as in, getOrderedDayNames as it, SEMANTIC_SPACING_VALUES as j, resolveDefaultBookingServiceId as jt, staticHeaderChromeRuntime as k, resolveBookingPaymentStep as kt, buildPassCartItem as l, formatBookingPriceDisplay as ln, resolveRuntimeEventDestination as lt, reduceCommerceCart as m, publicEventPricingOptions as mn, resolveTokenOrCssColorValue as mt, getShopDisplayForItems as n, getBookingLocalDateKey as nn, formatDateKey as nt, formatCommercePrice as o, toBookingTimeZone as on, isSameCalendarDay as ot, productItemKey as p, publicEventPricingDisplay as pn, resolveOnColorForThemeToken as pt, normalizeCsvIds as q, resolveWholeSeriesBookingPhase as qt, buildCartDisplay as r, getLocalScheduleDate as rn, getDayOfWeek as rt, formatInterval as s, toScheduledBookingDateRange as sn, isToday as st, defineIslandPropsDecoder as t, formatLocalScheduleDate as tn, buildCalendarViewport as tt, buildProductCartItem as u, formatEventPricing as un, groupPublicEventsByRun as ut, toWholeSeriesRegistrationEvents as v, parseCurrencyCode as vn, logger as vt, toRegistrationRequestSubject as w, getBookingSuccessMessage as wt, resolveDiscountContext as x, formatBookingSubmissionPreparationError as xt, findEventByOccurrenceId as y, assertNever$2 as yn, deriveBookingFormViewState as yt, calendarWindowMonths as z, assertNever$1 as zt };
|