@riverbankcms/sdk 0.140.0 → 0.141.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-CUyTzd5z.mjs → PreviewEditorSidebar-Q-fy9GYw.mjs} +3 -3
- package/dist/{PreviewEditorUI-Agkw4v5i.mjs → PreviewEditorUI-LYGzgk85.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-DdbeAdS8.mjs → SdkPreviewModeRuntime-CoPYI5Jq.mjs} +72 -46
- package/dist/{SiteChromeCustomizeContext-CqGOz-Kv.mjs → SiteChromeCustomizeContext-D8LePX8x.mjs} +681 -196
- package/dist/_dts/api/src/contentRuntime.d.ts +12 -31
- package/dist/_dts/api/src/domainConnection.d.ts +4 -0
- package/dist/_dts/api/src/footerCompositionContracts.d.ts +25 -0
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +1 -0
- package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +2 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -26
- package/dist/_dts/api/src/siteOnboarding.d.ts +7 -0
- package/dist/_dts/billing/src/site-arrangements.d.ts +12 -3
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +122 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/eventSelection.d.ts +11 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +5 -0
- package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +27 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -180
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -90
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.state.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +10 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.d.ts +37 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +11 -101
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +4 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +27 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +17 -1
- package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +17 -0
- package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +0 -6
- package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +4 -4
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +54 -12
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/client/{BookingConsentAgreement-CuKa82V4.mjs → BookingConsentAgreement-xJeYNdnb.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-BbYieKWB.mjs → DiscountCodeDisclosure-DdT6uzl9.mjs} +1 -1
- package/dist/client/{EventCombined.client-LTfR1Aby.mjs → EventCombined.client-Cp28uYuM.mjs} +11 -15
- package/dist/client/{EventListing.client-DUHpYSuo.mjs → EventListing.client-CD6AJsMr.mjs} +4 -17
- package/dist/client/{LeafletStaticMap-CHRupL6m.mjs → LeafletStaticMap-DBsAi9-e.mjs} +1 -1
- package/dist/client/{accordion-6HiIFxNL.mjs → accordion-6dwbOKYR.mjs} +1 -1
- package/dist/client/{bookingForm-Dlmid43H.mjs → bookingForm-CZE9_qPQ.mjs} +5 -5
- package/dist/client/bookings.mjs +175 -93
- package/dist/client/{carousel-DmkZRRq_.mjs → carousel-7VHGQARz.mjs} +1 -1
- package/dist/client/{cart-CIC24330.mjs → cart-Qg_mvQhh.mjs} +3 -3
- package/dist/client/{checkout-D1Zw9imo.mjs → checkout-D84rpgdr.mjs} +3 -3
- package/dist/client/client.mjs +602 -139
- package/dist/client/{context-Cy1OayHx.mjs → context-Ctp3T0Wr.mjs} +1 -1
- package/dist/client/{dates-aDcfoLHr.mjs → dates-DJKFcI_N.mjs} +2 -2
- package/dist/client/{eventCalendar-FQxMPAjf.mjs → eventCalendar-CK31z3vs.mjs} +11 -7
- package/dist/client/{eventCombined-Dr3ac6Hb.mjs → eventCombined-DiXd-ewn.mjs} +3 -3
- package/dist/client/{eventDetails-D-AzUHFQ.mjs → eventDetails-CTRgt2DK.mjs} +4 -4
- package/dist/client/{eventListing-B3XxBf3i.mjs → eventListing-Dy9vi_j_.mjs} +3 -3
- package/dist/client/{eventRegistration-I6EaokFD.mjs → eventRegistration-CnalYMr2.mjs} +124 -31
- package/dist/client/{form-BbWckVWY.mjs → form-eUiMveTT.mjs} +2 -2
- package/dist/client/{headerSection-C9qU4Y7x.mjs → headerSection-Dy9kQpB1.mjs} +2 -2
- package/dist/client/hooks.mjs +247 -32
- package/dist/client/{locationMap-CLCShvlG.mjs → locationMap-DalCmWU0.mjs} +2 -2
- package/dist/client/{newsletterForm-Briukxzi.mjs → newsletterForm-SDDPvhS0.mjs} +23 -10
- package/dist/client/{pricing-Copadu-2.mjs → pricing-OcMz4SnX.mjs} +1 -1
- package/dist/client/{productDetail-oujlRd-r.mjs → productDetail-BQrgHElM.mjs} +3 -3
- package/dist/client/{productList-BRiIRUcd.mjs → productList-OnPn_UJj.mjs} +3 -3
- package/dist/client/{propsDecoder-CB2KS_ko.mjs → propsDecoder-zBdsnS-N.mjs} +38 -8
- package/dist/client/rendering/client.mjs +446 -121
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +601 -138
- package/dist/client/{scrollToBlock-B1IS1_ua.mjs → scrollToBlock-BNM4Ob2Y.mjs} +28 -11
- package/dist/client/{shop-Vn6yNFED.mjs → shop-Bv1fPTwQ.mjs} +6 -6
- package/dist/client/{shop-commerce-BVTqipYp.mjs → shop-commerce-D4KNGaW8.mjs} +5 -5
- package/dist/client/{shop-commerce-store-BVnJVy7v.mjs → shop-commerce-store-2N5EV0Rc.mjs} +1 -1
- package/dist/client/{shopShared-COIeK77T.mjs → shopShared-DvJGdHTV.mjs} +3 -3
- package/dist/client/{useEventFilters-DzIUcS9n.mjs → useEventFilters-BBBvGDHQ.mjs} +17 -11
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/editor-chrome.css +4 -8
- package/dist/{sdk-runtime-CnCLvZRv.mjs → sdk-runtime-Defnbfzw.mjs} +1 -1
- package/dist/{separator-DKDRJ1oH.mjs → separator-CZXO3Sb0.mjs} +1 -1
- package/dist/server/components.mjs +384 -62
- package/dist/server/config-validation.mjs +232 -26
- package/dist/server/config.mjs +232 -26
- package/dist/server/data.mjs +247 -32
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +400 -69
- package/dist/server/page-converter.mjs +189 -25
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +399 -68
- package/dist/server/rendering.mjs +399 -68
- package/dist/server/routing.mjs +261 -33
- package/dist/server/server.mjs +248 -33
- package/dist/server/theme-bridge.mjs +47 -15
- package/dist/server/theme.mjs +1 -1
- package/dist/styles/index.css +28 -2
- package/package.json +1 -1
package/dist/server/data.mjs
CHANGED
|
@@ -2487,7 +2487,7 @@ const BUTTON_CONTRAST_POLICY = {
|
|
|
2487
2487
|
nonTextMinimumRatio: 3,
|
|
2488
2488
|
gradientSamplesPerSegment: 20,
|
|
2489
2489
|
alphaBackgrounds: "reject-without-known-surface",
|
|
2490
|
-
disabled: "
|
|
2490
|
+
disabled: "validated-colour-pair-with-muted-control-opacity"
|
|
2491
2491
|
};
|
|
2492
2492
|
function validateButtonSurfaceContrast(input) {
|
|
2493
2493
|
const ratio = contrastRatio(input.buttonPaint, input.surfaceHex);
|
|
@@ -8303,6 +8303,7 @@ const calendarWindowQuerySchema = z.object({
|
|
|
8303
8303
|
eventSurface: z.enum(eventSurfaceScopeValues).optional(),
|
|
8304
8304
|
eventPresets: z.string().optional(),
|
|
8305
8305
|
scheduleScope: z.enum(eventScheduleScopeValues).optional(),
|
|
8306
|
+
seriesIds: z.string().optional(),
|
|
8306
8307
|
categoryIds: z.string().optional(),
|
|
8307
8308
|
venueId: z.string().transform(normalizeCalendarFilterId).optional(),
|
|
8308
8309
|
staffMemberId: z.string().transform(normalizeCalendarFilterId).optional()
|
|
@@ -16980,6 +16981,7 @@ function isDisplayMediaKind(kind) {
|
|
|
16980
16981
|
}
|
|
16981
16982
|
const siteOptionSources = [
|
|
16982
16983
|
"eventCategories",
|
|
16984
|
+
"eventSeries",
|
|
16983
16985
|
"venues",
|
|
16984
16986
|
"staffMembers"
|
|
16985
16987
|
];
|
|
@@ -27851,7 +27853,8 @@ const appointmentServicesBlockDefinition = {
|
|
|
27851
27853
|
el("appointment-services", {
|
|
27852
27854
|
sectionHeading: { $bind: { from: "content.heading" } },
|
|
27853
27855
|
services: { $bind: { from: "data.services" } },
|
|
27854
|
-
pathname: { $bind: { from: "$root.pathname" } }
|
|
27856
|
+
pathname: { $bind: { from: "$root.pathname" } },
|
|
27857
|
+
servicePathPrefix: { $bind: { from: "$root.appointmentServicePathPrefix" } }
|
|
27855
27858
|
})
|
|
27856
27859
|
], { gap: "lg" })
|
|
27857
27860
|
})]
|
|
@@ -29392,6 +29395,35 @@ const eventSpotlightBlockDefinition = {
|
|
|
29392
29395
|
} }
|
|
29393
29396
|
};
|
|
29394
29397
|
//#endregion
|
|
29398
|
+
//#region ../blocks/src/system/blocks/events/shared/eventSelection.ts
|
|
29399
|
+
/** Invalid saved selections fail closed rather than widening discovery. */
|
|
29400
|
+
function resolveEventSelection(mode, value) {
|
|
29401
|
+
if (mode !== "selected") return { kind: "matching" };
|
|
29402
|
+
const candidates = Array.isArray(value) ? value : typeof value === "string" ? value.split(",").filter(Boolean) : [];
|
|
29403
|
+
const ids = [];
|
|
29404
|
+
for (const candidate of candidates) {
|
|
29405
|
+
if (typeof candidate !== "string") return {
|
|
29406
|
+
kind: "selected",
|
|
29407
|
+
seriesIds: []
|
|
29408
|
+
};
|
|
29409
|
+
const parsed = parseEventSeriesId(candidate.trim());
|
|
29410
|
+
if (!parsed.ok) return {
|
|
29411
|
+
kind: "selected",
|
|
29412
|
+
seriesIds: []
|
|
29413
|
+
};
|
|
29414
|
+
ids.push(parsed.value);
|
|
29415
|
+
}
|
|
29416
|
+
return {
|
|
29417
|
+
kind: "selected",
|
|
29418
|
+
seriesIds: [...new Set(ids)].sort()
|
|
29419
|
+
};
|
|
29420
|
+
}
|
|
29421
|
+
/** Undefined means discovery; an empty string is an explicitly empty selection. */
|
|
29422
|
+
function eventSeriesScopeCsv(value) {
|
|
29423
|
+
if (value == null) return void 0;
|
|
29424
|
+
return typeof value === "string" ? value : value.join(",");
|
|
29425
|
+
}
|
|
29426
|
+
//#endregion
|
|
29395
29427
|
//#region ../blocks/src/system/runtime/nodes/events/shared/listingLayout.ts
|
|
29396
29428
|
/**
|
|
29397
29429
|
* Layout classes for event listing containers and cards. Presentation
|
|
@@ -29491,6 +29523,7 @@ const eventCollectionFilterSourceSchemaShape = {
|
|
|
29491
29523
|
eventSurface: eventSurfaceScopeSchema$1.nullable().optional(),
|
|
29492
29524
|
filterEventPresets: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
29493
29525
|
scheduleScope: eventScheduleScopeSchema$1.nullable().optional(),
|
|
29526
|
+
seriesIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
29494
29527
|
filterCategoryIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
29495
29528
|
filterStaffMemberId: z.string().nullable().optional(),
|
|
29496
29529
|
filterVenueId: z.string().nullable().optional()
|
|
@@ -29537,6 +29570,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
29537
29570
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
29538
29571
|
filterEventPresets: z.string().nullable(),
|
|
29539
29572
|
scheduleScope: eventScheduleScopeSchema$1,
|
|
29573
|
+
seriesIds: z.string().nullable().optional(),
|
|
29540
29574
|
filterCategoryIds: z.string().nullable(),
|
|
29541
29575
|
filterStaffMemberId: z.string().nullable(),
|
|
29542
29576
|
filterVenueId: z.string().nullable(),
|
|
@@ -29584,11 +29618,15 @@ function buildEventCollectionDisplay(source) {
|
|
|
29584
29618
|
};
|
|
29585
29619
|
}
|
|
29586
29620
|
function buildEventCollectionFilterDisplay(source) {
|
|
29587
|
-
|
|
29588
|
-
|
|
29589
|
-
|
|
29590
|
-
|
|
29591
|
-
|
|
29621
|
+
const selected = source.seriesIds != null;
|
|
29622
|
+
const matchingFilters = selected ? {
|
|
29623
|
+
eventSurface: "all",
|
|
29624
|
+
filterEventPresets: null,
|
|
29625
|
+
scheduleScope: "any",
|
|
29626
|
+
filterCategoryIds: null,
|
|
29627
|
+
filterStaffMemberId: null,
|
|
29628
|
+
filterVenueId: null
|
|
29629
|
+
} : {
|
|
29592
29630
|
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
29593
29631
|
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
29594
29632
|
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
@@ -29596,6 +29634,14 @@ function buildEventCollectionFilterDisplay(source) {
|
|
|
29596
29634
|
filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
|
|
29597
29635
|
filterVenueId: normalizeEventVenueId(source.filterVenueId)
|
|
29598
29636
|
};
|
|
29637
|
+
return {
|
|
29638
|
+
seriesIds: eventSeriesScopeCsv(source.seriesIds),
|
|
29639
|
+
showFilters: selected ? false : source.showFilters ?? true,
|
|
29640
|
+
showCategoryFilter: source.showCategoryFilter ?? "auto",
|
|
29641
|
+
showVenueFilter: source.showVenueFilter ?? false,
|
|
29642
|
+
showStaffFilter: source.showStaffFilter ?? true,
|
|
29643
|
+
...matchingFilters
|
|
29644
|
+
};
|
|
29599
29645
|
}
|
|
29600
29646
|
function buildEventCollectionPresentationDisplay(source) {
|
|
29601
29647
|
return {
|
|
@@ -29610,14 +29656,15 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
29610
29656
|
}
|
|
29611
29657
|
function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date()) {
|
|
29612
29658
|
const timeZone = source.calendarWindow?.scope.timeZone ?? toBookingTimeZone(source.bookingTimeZone);
|
|
29659
|
+
const selected = source.seriesIds != null;
|
|
29613
29660
|
return {
|
|
29614
29661
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
29615
29662
|
siteId: source.siteId,
|
|
29616
29663
|
stage: source.stage,
|
|
29617
29664
|
prefetchedEvents: source.events != null,
|
|
29618
|
-
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
29619
|
-
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
29620
|
-
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
29665
|
+
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
29666
|
+
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
29667
|
+
scheduleScope: selected ? "any" : normalizeEventScheduleScope(source.scheduleScope),
|
|
29621
29668
|
calendarContext: {
|
|
29622
29669
|
timeZone,
|
|
29623
29670
|
initialToday: source.calendarWindow?.initialToday ?? getLocalScheduleDate(now, timeZone)
|
|
@@ -29683,6 +29730,7 @@ const eventListingHydrationSchema = z.object({
|
|
|
29683
29730
|
eventSurface: eventSurfaceScopeSchema,
|
|
29684
29731
|
filterEventPresets: z.string().nullable(),
|
|
29685
29732
|
scheduleScope: eventScheduleScopeSchema,
|
|
29733
|
+
seriesIds: z.string().nullable().optional(),
|
|
29686
29734
|
filterCategoryIds: z.string().nullable().optional(),
|
|
29687
29735
|
filterStaffMemberId: z.string().nullable().optional(),
|
|
29688
29736
|
filterVenueId: z.string().nullable().optional(),
|
|
@@ -29743,6 +29791,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
29743
29791
|
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
29744
29792
|
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
29745
29793
|
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
29794
|
+
seriesIds: eventSeriesScopeCsv(source.seriesIds),
|
|
29746
29795
|
filterCategoryIds: normalizeEventCategoryIdsCsv(source.filterCategoryIds),
|
|
29747
29796
|
filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
|
|
29748
29797
|
filterVenueId: normalizeEventVenueId(source.filterVenueId),
|
|
@@ -30116,6 +30165,65 @@ const eventListingBlockDefinition = {
|
|
|
30116
30165
|
} }
|
|
30117
30166
|
};
|
|
30118
30167
|
//#endregion
|
|
30168
|
+
//#region ../blocks/src/system/blocks/events/eventSelectionFields.ts
|
|
30169
|
+
const eventSelectionFields = [{
|
|
30170
|
+
id: "eventSelection",
|
|
30171
|
+
type: "select",
|
|
30172
|
+
label: "Events to show",
|
|
30173
|
+
required: false,
|
|
30174
|
+
multiple: false,
|
|
30175
|
+
defaultValue: "matching",
|
|
30176
|
+
options: [{
|
|
30177
|
+
value: "matching",
|
|
30178
|
+
label: "All matching events"
|
|
30179
|
+
}, {
|
|
30180
|
+
value: "selected",
|
|
30181
|
+
label: "Selected events"
|
|
30182
|
+
}],
|
|
30183
|
+
ui: { intent: "behavior" }
|
|
30184
|
+
}, createSiteOptionSelectField({
|
|
30185
|
+
id: "selectedEventSeriesIds",
|
|
30186
|
+
label: "Selected events",
|
|
30187
|
+
description: "Show upcoming dates for these events. Other event filters do not apply.",
|
|
30188
|
+
required: false,
|
|
30189
|
+
multiple: true,
|
|
30190
|
+
defaultValue: [],
|
|
30191
|
+
optionSource: "eventSeries",
|
|
30192
|
+
ui: {
|
|
30193
|
+
intent: "behavior",
|
|
30194
|
+
searchThreshold: 1,
|
|
30195
|
+
visibleWhen: {
|
|
30196
|
+
field: "eventSelection",
|
|
30197
|
+
equals: "selected"
|
|
30198
|
+
}
|
|
30199
|
+
}
|
|
30200
|
+
})];
|
|
30201
|
+
function withEventSelectionVisibility(field) {
|
|
30202
|
+
if (![
|
|
30203
|
+
"eventSurface",
|
|
30204
|
+
"filterEventPresets",
|
|
30205
|
+
"scheduleScope",
|
|
30206
|
+
"filterCategoryIds",
|
|
30207
|
+
"filterStaffMemberId",
|
|
30208
|
+
"filterVenueId",
|
|
30209
|
+
"showFilters",
|
|
30210
|
+
"showCategoryFilter",
|
|
30211
|
+
"showVenueFilter",
|
|
30212
|
+
"showStaffFilter"
|
|
30213
|
+
].includes(field.id)) return field;
|
|
30214
|
+
const visibleWhen = field.ui?.visibleWhen;
|
|
30215
|
+
return {
|
|
30216
|
+
...field,
|
|
30217
|
+
ui: {
|
|
30218
|
+
...field.ui,
|
|
30219
|
+
visibleWhen: { allOf: [{
|
|
30220
|
+
field: "eventSelection",
|
|
30221
|
+
notEquals: "selected"
|
|
30222
|
+
}, ...visibleWhen ? [visibleWhen] : []] }
|
|
30223
|
+
}
|
|
30224
|
+
};
|
|
30225
|
+
}
|
|
30226
|
+
//#endregion
|
|
30119
30227
|
//#region ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
30120
30228
|
const eventCalendarSourceSchema = z.object({
|
|
30121
30229
|
...eventCollectionSourceSchemaShape,
|
|
@@ -30198,19 +30306,59 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
30198
30306
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
30199
30307
|
const scopeParams = {
|
|
30200
30308
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
30309
|
+
seriesIds: { $bind: {
|
|
30310
|
+
from: "content",
|
|
30311
|
+
transforms: [{
|
|
30312
|
+
id: "events.calendarSelectionParam",
|
|
30313
|
+
options: { key: "seriesIds" }
|
|
30314
|
+
}]
|
|
30315
|
+
} },
|
|
30201
30316
|
stage: { $bind: {
|
|
30202
30317
|
from: "$root.previewStage",
|
|
30203
30318
|
fallback: "published"
|
|
30204
30319
|
} },
|
|
30205
|
-
eventSurface: { $bind: {
|
|
30320
|
+
eventSurface: { $bind: {
|
|
30321
|
+
from: "content",
|
|
30322
|
+
transforms: [{
|
|
30323
|
+
id: "events.calendarSelectionParam",
|
|
30324
|
+
options: { key: "eventSurface" }
|
|
30325
|
+
}, { id: "value.csv" }]
|
|
30326
|
+
} },
|
|
30206
30327
|
eventPresets: { $bind: {
|
|
30207
|
-
from: "content
|
|
30208
|
-
transforms: [{
|
|
30328
|
+
from: "content",
|
|
30329
|
+
transforms: [{
|
|
30330
|
+
id: "events.calendarSelectionParam",
|
|
30331
|
+
options: { key: "filterEventPresets" }
|
|
30332
|
+
}, { id: "value.csv" }]
|
|
30333
|
+
} },
|
|
30334
|
+
scheduleScope: { $bind: {
|
|
30335
|
+
from: "content",
|
|
30336
|
+
transforms: [{
|
|
30337
|
+
id: "events.calendarSelectionParam",
|
|
30338
|
+
options: { key: "scheduleScope" }
|
|
30339
|
+
}, { id: "value.csv" }]
|
|
30340
|
+
} },
|
|
30341
|
+
categoryIds: { $bind: {
|
|
30342
|
+
from: "content",
|
|
30343
|
+
transforms: [{
|
|
30344
|
+
id: "events.calendarSelectionParam",
|
|
30345
|
+
options: { key: "filterCategoryIds" }
|
|
30346
|
+
}, { id: "value.csv" }]
|
|
30209
30347
|
} },
|
|
30210
|
-
|
|
30211
|
-
|
|
30212
|
-
|
|
30213
|
-
|
|
30348
|
+
staffMemberId: { $bind: {
|
|
30349
|
+
from: "content",
|
|
30350
|
+
transforms: [{
|
|
30351
|
+
id: "events.calendarSelectionParam",
|
|
30352
|
+
options: { key: "filterStaffMemberId" }
|
|
30353
|
+
}, { id: "value.csv" }]
|
|
30354
|
+
} },
|
|
30355
|
+
venueId: { $bind: {
|
|
30356
|
+
from: "content",
|
|
30357
|
+
transforms: [{
|
|
30358
|
+
id: "events.calendarSelectionParam",
|
|
30359
|
+
options: { key: "filterVenueId" }
|
|
30360
|
+
}, { id: "value.csv" }]
|
|
30361
|
+
} }
|
|
30214
30362
|
};
|
|
30215
30363
|
/** Combined renders two jobs; calendar-only variants never pay for the list seed. */
|
|
30216
30364
|
const eventCalendarDataLoaders = {
|
|
@@ -30340,6 +30488,13 @@ const eventCalendarLayout = [styledSection({
|
|
|
30340
30488
|
from: "content.defaultCalendarView",
|
|
30341
30489
|
fallback: "month"
|
|
30342
30490
|
} },
|
|
30491
|
+
seriesIds: { $bind: {
|
|
30492
|
+
from: "content",
|
|
30493
|
+
transforms: [{
|
|
30494
|
+
id: "events.calendarSelectionParam",
|
|
30495
|
+
options: { key: "seriesIds" }
|
|
30496
|
+
}]
|
|
30497
|
+
} },
|
|
30343
30498
|
showFilters: { $bind: {
|
|
30344
30499
|
from: "content.showFilters",
|
|
30345
30500
|
fallback: true
|
|
@@ -30361,17 +30516,47 @@ const eventCalendarLayout = [styledSection({
|
|
|
30361
30516
|
fallback: true
|
|
30362
30517
|
} },
|
|
30363
30518
|
eventSurface: { $bind: {
|
|
30364
|
-
from: "content
|
|
30365
|
-
|
|
30519
|
+
from: "content",
|
|
30520
|
+
transforms: [{
|
|
30521
|
+
id: "events.calendarSelectionParam",
|
|
30522
|
+
options: { key: "eventSurface" }
|
|
30523
|
+
}]
|
|
30524
|
+
} },
|
|
30525
|
+
filterEventPresets: { $bind: {
|
|
30526
|
+
from: "content",
|
|
30527
|
+
transforms: [{
|
|
30528
|
+
id: "events.calendarSelectionParam",
|
|
30529
|
+
options: { key: "filterEventPresets" }
|
|
30530
|
+
}]
|
|
30366
30531
|
} },
|
|
30367
|
-
filterEventPresets: { $bind: { from: "content.filterEventPresets" } },
|
|
30368
30532
|
scheduleScope: { $bind: {
|
|
30369
|
-
from: "content
|
|
30370
|
-
|
|
30533
|
+
from: "content",
|
|
30534
|
+
transforms: [{
|
|
30535
|
+
id: "events.calendarSelectionParam",
|
|
30536
|
+
options: { key: "scheduleScope" }
|
|
30537
|
+
}]
|
|
30538
|
+
} },
|
|
30539
|
+
filterCategoryIds: { $bind: {
|
|
30540
|
+
from: "content",
|
|
30541
|
+
transforms: [{
|
|
30542
|
+
id: "events.calendarSelectionParam",
|
|
30543
|
+
options: { key: "filterCategoryIds" }
|
|
30544
|
+
}]
|
|
30545
|
+
} },
|
|
30546
|
+
filterStaffMemberId: { $bind: {
|
|
30547
|
+
from: "content",
|
|
30548
|
+
transforms: [{
|
|
30549
|
+
id: "events.calendarSelectionParam",
|
|
30550
|
+
options: { key: "filterStaffMemberId" }
|
|
30551
|
+
}]
|
|
30552
|
+
} },
|
|
30553
|
+
filterVenueId: { $bind: {
|
|
30554
|
+
from: "content",
|
|
30555
|
+
transforms: [{
|
|
30556
|
+
id: "events.calendarSelectionParam",
|
|
30557
|
+
options: { key: "filterVenueId" }
|
|
30558
|
+
}]
|
|
30371
30559
|
} },
|
|
30372
|
-
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
30373
|
-
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
30374
|
-
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
30375
30560
|
cardRole: { $bind: {
|
|
30376
30561
|
from: "content._cardStyles.role",
|
|
30377
30562
|
fallback: "default"
|
|
@@ -30875,6 +31060,7 @@ const eventCalendarAdditionalFields = [
|
|
|
30875
31060
|
}
|
|
30876
31061
|
}
|
|
30877
31062
|
},
|
|
31063
|
+
...eventSelectionFields,
|
|
30878
31064
|
{
|
|
30879
31065
|
id: "eventSurface",
|
|
30880
31066
|
type: "select",
|
|
@@ -31084,7 +31270,7 @@ const eventCalendarBlockDefinition = {
|
|
|
31084
31270
|
titleSource: "heading",
|
|
31085
31271
|
description: "Display events with calendar, list, or combined views with filtering",
|
|
31086
31272
|
skipSectionStyles: true,
|
|
31087
|
-
additionalFields: eventCalendarAdditionalFields,
|
|
31273
|
+
additionalFields: eventCalendarAdditionalFields.map(withEventSelectionVisibility),
|
|
31088
31274
|
styleTokens: {
|
|
31089
31275
|
background: "surface",
|
|
31090
31276
|
typography: "body",
|
|
@@ -37729,6 +37915,26 @@ const linksTransforms = [{
|
|
|
37729
37915
|
}
|
|
37730
37916
|
}];
|
|
37731
37917
|
const defaultTransforms = createTransformRegistry([
|
|
37918
|
+
{
|
|
37919
|
+
id: "events.calendarSelectionParam",
|
|
37920
|
+
kind: "formatter",
|
|
37921
|
+
summary: "Resolve selected events instead of discovery filters",
|
|
37922
|
+
schema: z.object({ key: z.enum([
|
|
37923
|
+
"seriesIds",
|
|
37924
|
+
"eventSurface",
|
|
37925
|
+
"filterEventPresets",
|
|
37926
|
+
"scheduleScope",
|
|
37927
|
+
"filterCategoryIds",
|
|
37928
|
+
"filterStaffMemberId",
|
|
37929
|
+
"filterVenueId"
|
|
37930
|
+
]) }),
|
|
37931
|
+
run(value, { key }) {
|
|
37932
|
+
const content = asPartialObject(value) ?? {};
|
|
37933
|
+
const selection = resolveEventSelection(content.eventSelection, content.selectedEventSeriesIds);
|
|
37934
|
+
if (selection.kind === "selected") return key === "seriesIds" ? selection.seriesIds : void 0;
|
|
37935
|
+
return key === "seriesIds" ? void 0 : content[key];
|
|
37936
|
+
}
|
|
37937
|
+
},
|
|
37732
37938
|
{
|
|
37733
37939
|
id: "events.calendarReadEnabled",
|
|
37734
37940
|
kind: "formatter",
|
|
@@ -38043,12 +38249,12 @@ function normalizeContent(block) {
|
|
|
38043
38249
|
}
|
|
38044
38250
|
/**
|
|
38045
38251
|
* Normalize params for API calls.
|
|
38046
|
-
* Converts
|
|
38252
|
+
* Converts supplied values to strings, preserving absent versus explicitly empty params.
|
|
38047
38253
|
*/
|
|
38048
38254
|
function normalizeParams(input) {
|
|
38049
38255
|
if (!input || typeof input !== "object") return {};
|
|
38050
38256
|
const output = {};
|
|
38051
|
-
for (const [key, value] of Object.entries(input)) output[key] = coerceToString(value);
|
|
38257
|
+
for (const [key, value] of Object.entries(input)) if (value !== void 0 && value !== null) output[key] = coerceToString(value);
|
|
38052
38258
|
return output;
|
|
38053
38259
|
}
|
|
38054
38260
|
function isNonArrayObject(value) {
|
|
@@ -38112,6 +38318,14 @@ function coercePayload(payload) {
|
|
|
38112
38318
|
* - Frontend: provide internal API client
|
|
38113
38319
|
* - SDK: provide SDK client with endpoint mapping
|
|
38114
38320
|
*/
|
|
38321
|
+
function projectDataLoaders(loaders, shouldLoad, blockId, blockKind) {
|
|
38322
|
+
if (!shouldLoad) return [...loaders];
|
|
38323
|
+
return loaders.filter(({ key }) => shouldLoad({
|
|
38324
|
+
blockId,
|
|
38325
|
+
blockKind,
|
|
38326
|
+
loaderKey: key
|
|
38327
|
+
}));
|
|
38328
|
+
}
|
|
38115
38329
|
function shouldSkipResolvedLoader(input) {
|
|
38116
38330
|
if (input.loader.requiredParams?.some((param) => !input.params[param]?.trim())) return true;
|
|
38117
38331
|
return Boolean(input.isValidEndpoint && !input.isValidEndpoint(input.endpoint));
|
|
@@ -38140,7 +38354,7 @@ async function prefetchBlockData$1(page, context, options) {
|
|
|
38140
38354
|
return (await prefetchBlockDataWithFailures(page, context, options)).resolvedData;
|
|
38141
38355
|
}
|
|
38142
38356
|
async function prefetchBlockDataWithFailures(page, context, options) {
|
|
38143
|
-
const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings } = options;
|
|
38357
|
+
const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings, shouldLoad } = options;
|
|
38144
38358
|
const results = {};
|
|
38145
38359
|
const loaderFailures = {};
|
|
38146
38360
|
const tasks = [];
|
|
@@ -38157,6 +38371,7 @@ async function prefetchBlockDataWithFailures(page, context, options) {
|
|
|
38157
38371
|
loader
|
|
38158
38372
|
})) : [];
|
|
38159
38373
|
} else loaders = [];
|
|
38374
|
+
loaders = projectDataLoaders(loaders, shouldLoad, blockId, block.kind);
|
|
38160
38375
|
if (loaders.length === 0) continue;
|
|
38161
38376
|
const root = {
|
|
38162
38377
|
...context.root ?? {},
|
|
@@ -38235,8 +38450,8 @@ function toStringParams(value) {
|
|
|
38235
38450
|
for (const [k, v] of Object.entries(value)) if (typeof v === "string") out[k] = v;
|
|
38236
38451
|
return out;
|
|
38237
38452
|
}
|
|
38238
|
-
function stripEmptyStringValues(params) {
|
|
38239
|
-
for (const [key, value] of Object.entries(params)) if (value === "") delete params[key];
|
|
38453
|
+
function stripEmptyStringValues(params, endpoint) {
|
|
38454
|
+
for (const [key, value] of Object.entries(params)) if (value === "" && !(key === "seriesIds" && (endpoint === "listPublicEvents" || endpoint === "listPublicEventCalendarWindow"))) delete params[key];
|
|
38240
38455
|
}
|
|
38241
38456
|
function ensureSiteId(params, context) {
|
|
38242
38457
|
if (!params.siteId && typeof context.siteId === "string" && context.siteId) params.siteId = context.siteId;
|
|
@@ -38249,7 +38464,7 @@ function ensureSiteId(params, context) {
|
|
|
38249
38464
|
*/
|
|
38250
38465
|
function normalizeLoaderParams(endpoint, params, context) {
|
|
38251
38466
|
const out = toStringParams(params);
|
|
38252
|
-
stripEmptyStringValues(out);
|
|
38467
|
+
stripEmptyStringValues(out, endpoint);
|
|
38253
38468
|
if (endpoint === "getPublicFormById") {
|
|
38254
38469
|
ensureSiteId(out, context);
|
|
38255
38470
|
if (!out.formId && out.formSlug) {
|
package/dist/server/index.mjs
CHANGED
|
@@ -8280,7 +8280,7 @@ var SimpleCache = class {
|
|
|
8280
8280
|
* 1. This constant
|
|
8281
8281
|
* 2. The "version" field in package.json
|
|
8282
8282
|
*/
|
|
8283
|
-
const SDK_VERSION = "0.
|
|
8283
|
+
const SDK_VERSION = "0.141.0";
|
|
8284
8284
|
//#endregion
|
|
8285
8285
|
//#region src/client/error.ts
|
|
8286
8286
|
let _Symbol$for;
|