@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.
Files changed (112) hide show
  1. package/dist/{PreviewEditorSidebar-CUyTzd5z.mjs → PreviewEditorSidebar-Q-fy9GYw.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-Agkw4v5i.mjs → PreviewEditorUI-LYGzgk85.mjs} +2 -2
  3. package/dist/{SdkPreviewModeRuntime-DdbeAdS8.mjs → SdkPreviewModeRuntime-CoPYI5Jq.mjs} +72 -46
  4. package/dist/{SiteChromeCustomizeContext-CqGOz-Kv.mjs → SiteChromeCustomizeContext-D8LePX8x.mjs} +681 -196
  5. package/dist/_dts/api/src/contentRuntime.d.ts +12 -31
  6. package/dist/_dts/api/src/domainConnection.d.ts +4 -0
  7. package/dist/_dts/api/src/footerCompositionContracts.d.ts +25 -0
  8. package/dist/_dts/api/src/index.d.ts +1 -1
  9. package/dist/_dts/api/src/launchReadiness.d.ts +1 -0
  10. package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +2 -1
  11. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -26
  12. package/dist/_dts/api/src/siteOnboarding.d.ts +7 -0
  13. package/dist/_dts/billing/src/site-arrangements.d.ts +12 -3
  14. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
  15. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
  16. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -0
  17. package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +122 -0
  18. package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +2 -1
  19. package/dist/_dts/blocks/src/system/blocks/events/shared/eventSelection.d.ts +11 -0
  20. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
  21. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
  22. package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +5 -0
  23. package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
  24. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +27 -1
  25. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -180
  26. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -90
  27. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -1
  28. package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +5 -1
  29. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +4 -0
  30. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.state.d.ts +5 -0
  31. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +3 -0
  32. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +10 -3
  33. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +9 -0
  34. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -5
  35. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.d.ts +37 -0
  36. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +4 -3
  37. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
  38. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +11 -101
  39. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +7 -2
  40. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +2 -0
  41. package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +12 -0
  42. package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +4 -0
  43. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3 -0
  44. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +27 -1
  45. package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -1
  46. package/dist/_dts/sdk/src/version.d.ts +1 -1
  47. package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +17 -1
  48. package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +17 -0
  49. package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +1 -1
  50. package/dist/_dts/theme-core/src/buttons/classNames.d.ts +16 -0
  51. package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +0 -6
  52. package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +4 -4
  53. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  54. package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +54 -12
  55. package/dist/_dts/theme-core/src/index.d.ts +1 -1
  56. package/dist/client/{BookingConsentAgreement-CuKa82V4.mjs → BookingConsentAgreement-xJeYNdnb.mjs} +2 -2
  57. package/dist/client/{DiscountCodeDisclosure-BbYieKWB.mjs → DiscountCodeDisclosure-DdT6uzl9.mjs} +1 -1
  58. package/dist/client/{EventCombined.client-LTfR1Aby.mjs → EventCombined.client-Cp28uYuM.mjs} +11 -15
  59. package/dist/client/{EventListing.client-DUHpYSuo.mjs → EventListing.client-CD6AJsMr.mjs} +4 -17
  60. package/dist/client/{LeafletStaticMap-CHRupL6m.mjs → LeafletStaticMap-DBsAi9-e.mjs} +1 -1
  61. package/dist/client/{accordion-6HiIFxNL.mjs → accordion-6dwbOKYR.mjs} +1 -1
  62. package/dist/client/{bookingForm-Dlmid43H.mjs → bookingForm-CZE9_qPQ.mjs} +5 -5
  63. package/dist/client/bookings.mjs +175 -93
  64. package/dist/client/{carousel-DmkZRRq_.mjs → carousel-7VHGQARz.mjs} +1 -1
  65. package/dist/client/{cart-CIC24330.mjs → cart-Qg_mvQhh.mjs} +3 -3
  66. package/dist/client/{checkout-D1Zw9imo.mjs → checkout-D84rpgdr.mjs} +3 -3
  67. package/dist/client/client.mjs +602 -139
  68. package/dist/client/{context-Cy1OayHx.mjs → context-Ctp3T0Wr.mjs} +1 -1
  69. package/dist/client/{dates-aDcfoLHr.mjs → dates-DJKFcI_N.mjs} +2 -2
  70. package/dist/client/{eventCalendar-FQxMPAjf.mjs → eventCalendar-CK31z3vs.mjs} +11 -7
  71. package/dist/client/{eventCombined-Dr3ac6Hb.mjs → eventCombined-DiXd-ewn.mjs} +3 -3
  72. package/dist/client/{eventDetails-D-AzUHFQ.mjs → eventDetails-CTRgt2DK.mjs} +4 -4
  73. package/dist/client/{eventListing-B3XxBf3i.mjs → eventListing-Dy9vi_j_.mjs} +3 -3
  74. package/dist/client/{eventRegistration-I6EaokFD.mjs → eventRegistration-CnalYMr2.mjs} +124 -31
  75. package/dist/client/{form-BbWckVWY.mjs → form-eUiMveTT.mjs} +2 -2
  76. package/dist/client/{headerSection-C9qU4Y7x.mjs → headerSection-Dy9kQpB1.mjs} +2 -2
  77. package/dist/client/hooks.mjs +247 -32
  78. package/dist/client/{locationMap-CLCShvlG.mjs → locationMap-DalCmWU0.mjs} +2 -2
  79. package/dist/client/{newsletterForm-Briukxzi.mjs → newsletterForm-SDDPvhS0.mjs} +23 -10
  80. package/dist/client/{pricing-Copadu-2.mjs → pricing-OcMz4SnX.mjs} +1 -1
  81. package/dist/client/{productDetail-oujlRd-r.mjs → productDetail-BQrgHElM.mjs} +3 -3
  82. package/dist/client/{productList-BRiIRUcd.mjs → productList-OnPn_UJj.mjs} +3 -3
  83. package/dist/client/{propsDecoder-CB2KS_ko.mjs → propsDecoder-zBdsnS-N.mjs} +38 -8
  84. package/dist/client/rendering/client.mjs +446 -121
  85. package/dist/client/rendering/islands.mjs +17 -17
  86. package/dist/client/rendering.mjs +601 -138
  87. package/dist/client/{scrollToBlock-B1IS1_ua.mjs → scrollToBlock-BNM4Ob2Y.mjs} +28 -11
  88. package/dist/client/{shop-Vn6yNFED.mjs → shop-Bv1fPTwQ.mjs} +6 -6
  89. package/dist/client/{shop-commerce-BVTqipYp.mjs → shop-commerce-D4KNGaW8.mjs} +5 -5
  90. package/dist/client/{shop-commerce-store-BVnJVy7v.mjs → shop-commerce-store-2N5EV0Rc.mjs} +1 -1
  91. package/dist/client/{shopShared-COIeK77T.mjs → shopShared-DvJGdHTV.mjs} +3 -3
  92. package/dist/client/{useEventFilters-DzIUcS9n.mjs → useEventFilters-BBBvGDHQ.mjs} +17 -11
  93. package/dist/preview-next/client/runtime.mjs +3 -3
  94. package/dist/preview-next/editor-chrome.css +4 -8
  95. package/dist/{sdk-runtime-CnCLvZRv.mjs → sdk-runtime-Defnbfzw.mjs} +1 -1
  96. package/dist/{separator-DKDRJ1oH.mjs → separator-CZXO3Sb0.mjs} +1 -1
  97. package/dist/server/components.mjs +384 -62
  98. package/dist/server/config-validation.mjs +232 -26
  99. package/dist/server/config.mjs +232 -26
  100. package/dist/server/data.mjs +247 -32
  101. package/dist/server/index.mjs +1 -1
  102. package/dist/server/next.mjs +400 -69
  103. package/dist/server/page-converter.mjs +189 -25
  104. package/dist/server/prebuild.mjs +1 -1
  105. package/dist/server/rendering/server.mjs +399 -68
  106. package/dist/server/rendering.mjs +399 -68
  107. package/dist/server/routing.mjs +261 -33
  108. package/dist/server/server.mjs +248 -33
  109. package/dist/server/theme-bridge.mjs +47 -15
  110. package/dist/server/theme.mjs +1 -1
  111. package/dist/styles/index.css +28 -2
  112. package/package.json +1 -1
@@ -3646,7 +3646,7 @@ var init_buttonColourContract = __esmMin((() => {
3646
3646
  nonTextMinimumRatio: 3,
3647
3647
  gradientSamplesPerSegment: 20,
3648
3648
  alphaBackgrounds: "reject-without-known-surface",
3649
- disabled: "retain-full-colour-contract"
3649
+ disabled: "validated-colour-pair-with-muted-control-opacity"
3650
3650
  };
3651
3651
  }));
3652
3652
  //#endregion
@@ -9511,6 +9511,7 @@ var init_calendarWindow = __esmMin((() => {
9511
9511
  eventSurface: z.enum(eventSurfaceScopeValues).optional(),
9512
9512
  eventPresets: z.string().optional(),
9513
9513
  scheduleScope: z.enum(eventScheduleScopeValues).optional(),
9514
+ seriesIds: z.string().optional(),
9514
9515
  categoryIds: z.string().optional(),
9515
9516
  venueId: z.string().transform(normalizeCalendarFilterId).optional(),
9516
9517
  staffMemberId: z.string().transform(normalizeCalendarFilterId).optional()
@@ -21021,6 +21022,7 @@ var init_schema = __esmMin((() => {
21021
21022
  ];
21022
21023
  siteOptionSources = [
21023
21024
  "eventCategories",
21025
+ "eventSeries",
21024
21026
  "venues",
21025
21027
  "staffMembers"
21026
21028
  ];
@@ -34505,7 +34507,8 @@ var init_appointment_services = __esmMin((() => {
34505
34507
  el$1("appointment-services", {
34506
34508
  sectionHeading: { $bind: { from: "content.heading" } },
34507
34509
  services: { $bind: { from: "data.services" } },
34508
- pathname: { $bind: { from: "$root.pathname" } }
34510
+ pathname: { $bind: { from: "$root.pathname" } },
34511
+ servicePathPrefix: { $bind: { from: "$root.appointmentServicePathPrefix" } }
34509
34512
  })
34510
34513
  ], { gap: "lg" })
34511
34514
  })]
@@ -36171,6 +36174,38 @@ var init_event_spotlight = __esmMin((() => {
36171
36174
  };
36172
36175
  }));
36173
36176
  //#endregion
36177
+ //#region ../blocks/src/system/blocks/events/shared/eventSelection.ts
36178
+ /** Invalid saved selections fail closed rather than widening discovery. */
36179
+ function resolveEventSelection(mode, value) {
36180
+ if (mode !== "selected") return { kind: "matching" };
36181
+ const candidates = Array.isArray(value) ? value : typeof value === "string" ? value.split(",").filter(Boolean) : [];
36182
+ const ids = [];
36183
+ for (const candidate of candidates) {
36184
+ if (typeof candidate !== "string") return {
36185
+ kind: "selected",
36186
+ seriesIds: []
36187
+ };
36188
+ const parsed = parseEventSeriesId(candidate.trim());
36189
+ if (!parsed.ok) return {
36190
+ kind: "selected",
36191
+ seriesIds: []
36192
+ };
36193
+ ids.push(parsed.value);
36194
+ }
36195
+ return {
36196
+ kind: "selected",
36197
+ seriesIds: [...new Set(ids)].sort()
36198
+ };
36199
+ }
36200
+ /** Undefined means discovery; an empty string is an explicitly empty selection. */
36201
+ function eventSeriesScopeCsv(value) {
36202
+ if (value == null) return void 0;
36203
+ return typeof value === "string" ? value : value.join(",");
36204
+ }
36205
+ var init_eventSelection = __esmMin((() => {
36206
+ init_src$4();
36207
+ }));
36208
+ //#endregion
36174
36209
  //#region ../blocks/src/system/runtime/nodes/events/shared/listingLayout.ts
36175
36210
  /**
36176
36211
  * Build container class based on layout mode
@@ -36284,11 +36319,15 @@ function buildEventCollectionDisplay(source) {
36284
36319
  };
36285
36320
  }
36286
36321
  function buildEventCollectionFilterDisplay(source) {
36287
- return {
36288
- showFilters: source.showFilters ?? true,
36289
- showCategoryFilter: source.showCategoryFilter ?? "auto",
36290
- showVenueFilter: source.showVenueFilter ?? false,
36291
- showStaffFilter: source.showStaffFilter ?? true,
36322
+ const selected = source.seriesIds != null;
36323
+ const matchingFilters = selected ? {
36324
+ eventSurface: "all",
36325
+ filterEventPresets: null,
36326
+ scheduleScope: "any",
36327
+ filterCategoryIds: null,
36328
+ filterStaffMemberId: null,
36329
+ filterVenueId: null
36330
+ } : {
36292
36331
  eventSurface: normalizeEventSurfaceScope(source.eventSurface),
36293
36332
  filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
36294
36333
  scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
@@ -36296,6 +36335,14 @@ function buildEventCollectionFilterDisplay(source) {
36296
36335
  filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
36297
36336
  filterVenueId: normalizeEventVenueId(source.filterVenueId)
36298
36337
  };
36338
+ return {
36339
+ seriesIds: eventSeriesScopeCsv(source.seriesIds),
36340
+ showFilters: selected ? false : source.showFilters ?? true,
36341
+ showCategoryFilter: source.showCategoryFilter ?? "auto",
36342
+ showVenueFilter: source.showVenueFilter ?? false,
36343
+ showStaffFilter: source.showStaffFilter ?? true,
36344
+ ...matchingFilters
36345
+ };
36299
36346
  }
36300
36347
  function buildEventCollectionPresentationDisplay(source) {
36301
36348
  return {
@@ -36310,14 +36357,15 @@ function buildEventCollectionPresentationDisplay(source) {
36310
36357
  }
36311
36358
  function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date()) {
36312
36359
  const timeZone = source.calendarWindow?.scope.timeZone ?? toBookingTimeZone(source.bookingTimeZone);
36360
+ const selected = source.seriesIds != null;
36313
36361
  return {
36314
36362
  calendarWindow: source.calendarWindow ?? void 0,
36315
36363
  siteId: source.siteId,
36316
36364
  stage: source.stage,
36317
36365
  prefetchedEvents: source.events != null,
36318
- eventSurface: normalizeEventSurfaceScope(source.eventSurface),
36319
- filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
36320
- scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
36366
+ eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
36367
+ filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
36368
+ scheduleScope: selected ? "any" : normalizeEventScheduleScope(source.scheduleScope),
36321
36369
  calendarContext: {
36322
36370
  timeZone,
36323
36371
  initialToday: source.calendarWindow?.initialToday ?? getLocalScheduleDate(now, timeZone)
@@ -36325,6 +36373,7 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
36325
36373
  };
36326
36374
  }
36327
36375
  var eventSurfaceScopeSchema$1, eventScheduleScopeSchema$1, eventCollectionFilterSourceSchemaShape, eventCollectionSourceSchemaShape, eventCollectionDisplaySchemaShape, eventCollectionHydrationSchema, init_eventCollectionContract = __esmMin((() => {
36376
+ init_eventSelection();
36328
36377
  init_calendarWindow();
36329
36378
  init_cards();
36330
36379
  init_src$4();
@@ -36342,6 +36391,7 @@ var eventSurfaceScopeSchema$1, eventScheduleScopeSchema$1, eventCollectionFilter
36342
36391
  eventSurface: eventSurfaceScopeSchema$1.nullable().optional(),
36343
36392
  filterEventPresets: z.union([z.string(), z.array(z.string())]).nullable().optional(),
36344
36393
  scheduleScope: eventScheduleScopeSchema$1.nullable().optional(),
36394
+ seriesIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
36345
36395
  filterCategoryIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
36346
36396
  filterStaffMemberId: z.string().nullable().optional(),
36347
36397
  filterVenueId: z.string().nullable().optional()
@@ -36388,6 +36438,7 @@ var eventSurfaceScopeSchema$1, eventScheduleScopeSchema$1, eventCollectionFilter
36388
36438
  eventSurface: eventSurfaceScopeSchema$1,
36389
36439
  filterEventPresets: z.string().nullable(),
36390
36440
  scheduleScope: eventScheduleScopeSchema$1,
36441
+ seriesIds: z.string().nullable().optional(),
36391
36442
  filterCategoryIds: z.string().nullable(),
36392
36443
  filterStaffMemberId: z.string().nullable(),
36393
36444
  filterVenueId: z.string().nullable(),
@@ -36418,6 +36469,7 @@ var eventSurfaceScopeSchema$1, eventScheduleScopeSchema$1, eventCollectionFilter
36418
36469
  });
36419
36470
  })), cardOrientationSchema, eventSurfaceScopeSchema, eventScheduleScopeSchema, eventListingSourceSchema, eventListingDisplaySchema, eventListingHydrationSchema, eventListingRenderSchema, eventListingBlockRuntime;
36420
36471
  var init_EventListing_interactive = __esmMin((() => {
36472
+ init_eventSelection();
36421
36473
  init_cards();
36422
36474
  init_schemas();
36423
36475
  init_shared$2();
@@ -36484,6 +36536,7 @@ var init_EventListing_interactive = __esmMin((() => {
36484
36536
  eventSurface: eventSurfaceScopeSchema,
36485
36537
  filterEventPresets: z.string().nullable(),
36486
36538
  scheduleScope: eventScheduleScopeSchema,
36539
+ seriesIds: z.string().nullable().optional(),
36487
36540
  filterCategoryIds: z.string().nullable().optional(),
36488
36541
  filterStaffMemberId: z.string().nullable().optional(),
36489
36542
  filterVenueId: z.string().nullable().optional(),
@@ -36544,6 +36597,7 @@ var init_EventListing_interactive = __esmMin((() => {
36544
36597
  eventSurface: normalizeEventSurfaceScope(source.eventSurface),
36545
36598
  filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
36546
36599
  scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
36600
+ seriesIds: eventSeriesScopeCsv(source.seriesIds),
36547
36601
  filterCategoryIds: normalizeEventCategoryIdsCsv(source.filterCategoryIds),
36548
36602
  filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
36549
36603
  filterVenueId: normalizeEventVenueId(source.filterVenueId),
@@ -36936,6 +36990,69 @@ var init_event_listing = __esmMin((() => {
36936
36990
  };
36937
36991
  }));
36938
36992
  //#endregion
36993
+ //#region ../blocks/src/system/blocks/events/eventSelectionFields.ts
36994
+ function withEventSelectionVisibility(field) {
36995
+ if (![
36996
+ "eventSurface",
36997
+ "filterEventPresets",
36998
+ "scheduleScope",
36999
+ "filterCategoryIds",
37000
+ "filterStaffMemberId",
37001
+ "filterVenueId",
37002
+ "showFilters",
37003
+ "showCategoryFilter",
37004
+ "showVenueFilter",
37005
+ "showStaffFilter"
37006
+ ].includes(field.id)) return field;
37007
+ const visibleWhen = field.ui?.visibleWhen;
37008
+ return {
37009
+ ...field,
37010
+ ui: {
37011
+ ...field.ui,
37012
+ visibleWhen: { allOf: [{
37013
+ field: "eventSelection",
37014
+ notEquals: "selected"
37015
+ }, ...visibleWhen ? [visibleWhen] : []] }
37016
+ }
37017
+ };
37018
+ }
37019
+ var eventSelectionFields;
37020
+ var init_eventSelectionFields = __esmMin((() => {
37021
+ init_schema();
37022
+ eventSelectionFields = [{
37023
+ id: "eventSelection",
37024
+ type: "select",
37025
+ label: "Events to show",
37026
+ required: false,
37027
+ multiple: false,
37028
+ defaultValue: "matching",
37029
+ options: [{
37030
+ value: "matching",
37031
+ label: "All matching events"
37032
+ }, {
37033
+ value: "selected",
37034
+ label: "Selected events"
37035
+ }],
37036
+ ui: { intent: "behavior" }
37037
+ }, createSiteOptionSelectField({
37038
+ id: "selectedEventSeriesIds",
37039
+ label: "Selected events",
37040
+ description: "Show upcoming dates for these events. Other event filters do not apply.",
37041
+ required: false,
37042
+ multiple: true,
37043
+ defaultValue: [],
37044
+ optionSource: "eventSeries",
37045
+ ui: {
37046
+ intent: "behavior",
37047
+ searchThreshold: 1,
37048
+ visibleWhen: {
37049
+ field: "eventSelection",
37050
+ equals: "selected"
37051
+ }
37052
+ }
37053
+ })];
37054
+ }));
37055
+ //#endregion
36939
37056
  //#region ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
36940
37057
  /**
36941
37058
  * Collapse an optional/blank string to `undefined` so downstream week-board
@@ -37029,19 +37146,59 @@ var init_eventCalendarDataLoaders = __esmMin((() => {
37029
37146
  init_calendarWindow();
37030
37147
  scopeParams = {
37031
37148
  siteId: { $bind: { from: "$root.siteId" } },
37149
+ seriesIds: { $bind: {
37150
+ from: "content",
37151
+ transforms: [{
37152
+ id: "events.calendarSelectionParam",
37153
+ options: { key: "seriesIds" }
37154
+ }]
37155
+ } },
37032
37156
  stage: { $bind: {
37033
37157
  from: "$root.previewStage",
37034
37158
  fallback: "published"
37035
37159
  } },
37036
- eventSurface: { $bind: { from: "content.eventSurface" } },
37160
+ eventSurface: { $bind: {
37161
+ from: "content",
37162
+ transforms: [{
37163
+ id: "events.calendarSelectionParam",
37164
+ options: { key: "eventSurface" }
37165
+ }, { id: "value.csv" }]
37166
+ } },
37037
37167
  eventPresets: { $bind: {
37038
- from: "content.filterEventPresets",
37039
- transforms: [{ id: "value.csv" }]
37168
+ from: "content",
37169
+ transforms: [{
37170
+ id: "events.calendarSelectionParam",
37171
+ options: { key: "filterEventPresets" }
37172
+ }, { id: "value.csv" }]
37173
+ } },
37174
+ scheduleScope: { $bind: {
37175
+ from: "content",
37176
+ transforms: [{
37177
+ id: "events.calendarSelectionParam",
37178
+ options: { key: "scheduleScope" }
37179
+ }, { id: "value.csv" }]
37180
+ } },
37181
+ categoryIds: { $bind: {
37182
+ from: "content",
37183
+ transforms: [{
37184
+ id: "events.calendarSelectionParam",
37185
+ options: { key: "filterCategoryIds" }
37186
+ }, { id: "value.csv" }]
37040
37187
  } },
37041
- scheduleScope: { $bind: { from: "content.scheduleScope" } },
37042
- categoryIds: { $bind: { from: "content.filterCategoryIds" } },
37043
- staffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
37044
- venueId: { $bind: { from: "content.filterVenueId" } }
37188
+ staffMemberId: { $bind: {
37189
+ from: "content",
37190
+ transforms: [{
37191
+ id: "events.calendarSelectionParam",
37192
+ options: { key: "filterStaffMemberId" }
37193
+ }, { id: "value.csv" }]
37194
+ } },
37195
+ venueId: { $bind: {
37196
+ from: "content",
37197
+ transforms: [{
37198
+ id: "events.calendarSelectionParam",
37199
+ options: { key: "filterVenueId" }
37200
+ }, { id: "value.csv" }]
37201
+ } }
37045
37202
  };
37046
37203
  eventCalendarDataLoaders = {
37047
37204
  events: {
@@ -37112,6 +37269,7 @@ function normalizeEventCalendarDefaultView(value) {
37112
37269
  }
37113
37270
  var eventCalendarLayout, eventCalendarAdditionalFields, eventCalendarVariants, eventCalendarContentShape, eventCalendarConfig, eventCalendarManifest, eventCalendarBlockDefinition;
37114
37271
  var init_event_calendar = __esmMin((() => {
37272
+ init_eventSelectionFields();
37115
37273
  init_schema();
37116
37274
  init_builder$1();
37117
37275
  init_styledSection();
@@ -37167,6 +37325,13 @@ var init_event_calendar = __esmMin((() => {
37167
37325
  from: "content.defaultCalendarView",
37168
37326
  fallback: "month"
37169
37327
  } },
37328
+ seriesIds: { $bind: {
37329
+ from: "content",
37330
+ transforms: [{
37331
+ id: "events.calendarSelectionParam",
37332
+ options: { key: "seriesIds" }
37333
+ }]
37334
+ } },
37170
37335
  showFilters: { $bind: {
37171
37336
  from: "content.showFilters",
37172
37337
  fallback: true
@@ -37188,17 +37353,47 @@ var init_event_calendar = __esmMin((() => {
37188
37353
  fallback: true
37189
37354
  } },
37190
37355
  eventSurface: { $bind: {
37191
- from: "content.eventSurface",
37192
- fallback: "all"
37356
+ from: "content",
37357
+ transforms: [{
37358
+ id: "events.calendarSelectionParam",
37359
+ options: { key: "eventSurface" }
37360
+ }]
37361
+ } },
37362
+ filterEventPresets: { $bind: {
37363
+ from: "content",
37364
+ transforms: [{
37365
+ id: "events.calendarSelectionParam",
37366
+ options: { key: "filterEventPresets" }
37367
+ }]
37193
37368
  } },
37194
- filterEventPresets: { $bind: { from: "content.filterEventPresets" } },
37195
37369
  scheduleScope: { $bind: {
37196
- from: "content.scheduleScope",
37197
- fallback: "any"
37370
+ from: "content",
37371
+ transforms: [{
37372
+ id: "events.calendarSelectionParam",
37373
+ options: { key: "scheduleScope" }
37374
+ }]
37375
+ } },
37376
+ filterCategoryIds: { $bind: {
37377
+ from: "content",
37378
+ transforms: [{
37379
+ id: "events.calendarSelectionParam",
37380
+ options: { key: "filterCategoryIds" }
37381
+ }]
37382
+ } },
37383
+ filterStaffMemberId: { $bind: {
37384
+ from: "content",
37385
+ transforms: [{
37386
+ id: "events.calendarSelectionParam",
37387
+ options: { key: "filterStaffMemberId" }
37388
+ }]
37389
+ } },
37390
+ filterVenueId: { $bind: {
37391
+ from: "content",
37392
+ transforms: [{
37393
+ id: "events.calendarSelectionParam",
37394
+ options: { key: "filterVenueId" }
37395
+ }]
37198
37396
  } },
37199
- filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
37200
- filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
37201
- filterVenueId: { $bind: { from: "content.filterVenueId" } },
37202
37397
  cardRole: { $bind: {
37203
37398
  from: "content._cardStyles.role",
37204
37399
  fallback: "default"
@@ -37702,6 +37897,7 @@ var init_event_calendar = __esmMin((() => {
37702
37897
  }
37703
37898
  }
37704
37899
  },
37900
+ ...eventSelectionFields,
37705
37901
  {
37706
37902
  id: "eventSurface",
37707
37903
  type: "select",
@@ -37910,7 +38106,7 @@ var init_event_calendar = __esmMin((() => {
37910
38106
  titleSource: "heading",
37911
38107
  description: "Display events with calendar, list, or combined views with filtering",
37912
38108
  skipSectionStyles: true,
37913
- additionalFields: eventCalendarAdditionalFields,
38109
+ additionalFields: eventCalendarAdditionalFields.map(withEventSelectionVisibility),
37914
38110
  styleTokens: {
37915
38111
  background: "surface",
37916
38112
  typography: "body",
@@ -44948,11 +45144,33 @@ var init_links = __esmMin((() => {
44948
45144
  }));
44949
45145
  //#endregion
44950
45146
  //#region ../blocks/src/system/transforms/registry/eventCalendar.ts
44951
- var readJobSchema, eventCalendarReadProfile, eventCalendarReadEnabled;
45147
+ var selectionParamSchema, eventCalendarSelectionParam, readJobSchema, eventCalendarReadProfile, eventCalendarReadEnabled;
44952
45148
  var init_eventCalendar = __esmMin((() => {
44953
45149
  init_events$1();
44954
45150
  init_core();
44955
45151
  init_calendarWindow();
45152
+ init_eventSelection();
45153
+ selectionParamSchema = z.object({ key: z.enum([
45154
+ "seriesIds",
45155
+ "eventSurface",
45156
+ "filterEventPresets",
45157
+ "scheduleScope",
45158
+ "filterCategoryIds",
45159
+ "filterStaffMemberId",
45160
+ "filterVenueId"
45161
+ ]) });
45162
+ eventCalendarSelectionParam = {
45163
+ id: "events.calendarSelectionParam",
45164
+ kind: "formatter",
45165
+ summary: "Resolve selected events instead of discovery filters",
45166
+ schema: selectionParamSchema,
45167
+ run(value, { key }) {
45168
+ const content = asPartialObject(value) ?? {};
45169
+ const selection = resolveEventSelection(content.eventSelection, content.selectedEventSeriesIds);
45170
+ if (selection.kind === "selected") return key === "seriesIds" ? selection.seriesIds : void 0;
45171
+ return key === "seriesIds" ? void 0 : content[key];
45172
+ }
45173
+ };
44956
45174
  readJobSchema = z.object({ job: z.enum(["list", "calendar"]) });
44957
45175
  eventCalendarReadProfile = {
44958
45176
  id: "events.calendarReadProfile",
@@ -44990,6 +45208,7 @@ var init_registry$2 = __esmMin((() => {
44990
45208
  init_eventCalendar();
44991
45209
  init_boxStyleClassNames();
44992
45210
  builtinTransformDefinitions = [
45211
+ eventCalendarSelectionParam,
44993
45212
  eventCalendarReadEnabled,
44994
45213
  eventCalendarReadProfile,
44995
45214
  ...formattingTransforms,
@@ -45448,12 +45667,12 @@ function normalizeContent(block) {
45448
45667
  }
45449
45668
  /**
45450
45669
  * Normalize params for API calls.
45451
- * Converts all values to strings.
45670
+ * Converts supplied values to strings, preserving absent versus explicitly empty params.
45452
45671
  */
45453
45672
  function normalizeParams(input) {
45454
45673
  if (!input || typeof input !== "object") return {};
45455
45674
  const output = {};
45456
- for (const [key, value] of Object.entries(input)) output[key] = coerceToString(value);
45675
+ for (const [key, value] of Object.entries(input)) if (value !== void 0 && value !== null) output[key] = coerceToString(value);
45457
45676
  return output;
45458
45677
  }
45459
45678
  function isNonArrayObject(value) {
@@ -45511,6 +45730,14 @@ var init_utils = __esmMin((() => {
45511
45730
  }));
45512
45731
  //#endregion
45513
45732
  //#region ../blocks/src/system/data/prefetchBlockData.ts
45733
+ function projectDataLoaders(loaders, shouldLoad, blockId, blockKind) {
45734
+ if (!shouldLoad) return [...loaders];
45735
+ return loaders.filter(({ key }) => shouldLoad({
45736
+ blockId,
45737
+ blockKind,
45738
+ loaderKey: key
45739
+ }));
45740
+ }
45514
45741
  function shouldSkipResolvedLoader(input) {
45515
45742
  if (input.loader.requiredParams?.some((param) => !input.params[param]?.trim())) return true;
45516
45743
  return Boolean(input.isValidEndpoint && !input.isValidEndpoint(input.endpoint));
@@ -45539,7 +45766,7 @@ async function prefetchBlockData$1(page, context, options) {
45539
45766
  return (await prefetchBlockDataWithFailures(page, context, options)).resolvedData;
45540
45767
  }
45541
45768
  async function prefetchBlockDataWithFailures(page, context, options) {
45542
- const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings } = options;
45769
+ const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings, shouldLoad } = options;
45543
45770
  const results = {};
45544
45771
  const loaderFailures = {};
45545
45772
  const tasks = [];
@@ -45556,6 +45783,7 @@ async function prefetchBlockDataWithFailures(page, context, options) {
45556
45783
  loader
45557
45784
  })) : [];
45558
45785
  } else loaders = [];
45786
+ loaders = projectDataLoaders(loaders, shouldLoad, blockId, block.kind);
45559
45787
  if (loaders.length === 0) continue;
45560
45788
  const root = {
45561
45789
  ...context.root ?? {},
@@ -45642,8 +45870,8 @@ function toStringParams(value) {
45642
45870
  for (const [k, v] of Object.entries(value)) if (typeof v === "string") out[k] = v;
45643
45871
  return out;
45644
45872
  }
45645
- function stripEmptyStringValues(params) {
45646
- for (const [key, value] of Object.entries(params)) if (value === "") delete params[key];
45873
+ function stripEmptyStringValues(params, endpoint) {
45874
+ for (const [key, value] of Object.entries(params)) if (value === "" && !(key === "seriesIds" && (endpoint === "listPublicEvents" || endpoint === "listPublicEventCalendarWindow"))) delete params[key];
45647
45875
  }
45648
45876
  function ensureSiteId(params, context) {
45649
45877
  if (!params.siteId && typeof context.siteId === "string" && context.siteId) params.siteId = context.siteId;
@@ -45656,7 +45884,7 @@ function ensureSiteId(params, context) {
45656
45884
  */
45657
45885
  function normalizeLoaderParams(endpoint, params, context) {
45658
45886
  const out = toStringParams(params);
45659
- stripEmptyStringValues(out);
45887
+ stripEmptyStringValues(out, endpoint);
45660
45888
  if (endpoint === "getPublicFormById") {
45661
45889
  ensureSiteId(out, context);
45662
45890
  if (!out.formId && out.formSlug) {