@riverbankcms/sdk 0.132.0 → 0.134.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/CHANGELOG.md +10 -0
- package/dist/{PreviewEditorSidebar-DKQ5eFK9.mjs → PreviewEditorSidebar-DfRhJPFQ.mjs} +3 -3
- package/dist/{PreviewEditorUI-CNTcOjCC.mjs → PreviewEditorUI-Dppxcr_g.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-DJu3qu33.mjs → SdkPreviewModeRuntime-8CyGCXir.mjs} +46 -15
- package/dist/{SiteChromeCustomizeContext-2TzT3vbj.mjs → SiteChromeCustomizeContext-DVMTMvqA.mjs} +497 -169
- package/dist/_dts/ai/src/contracts/proposals.d.ts +384 -384
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +219 -219
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -14
- package/dist/_dts/api/src/bookings.d.ts +2 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +1 -1
- package/dist/_dts/api/src/courseEndpointDefinitions.d.ts +2 -2
- package/dist/_dts/api/src/endpoints.d.ts +3 -3
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/navigation/contracts.d.ts +9 -6
- package/dist/_dts/api/src/navigation/linkResolver.d.ts +6 -2
- package/dist/_dts/api/src/navigation/types.d.ts +23 -6
- package/dist/_dts/api/src/navigation.d.ts +1 -1
- package/dist/_dts/api/src/publicBookingService.d.ts +15 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +2 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
- package/dist/_dts/api/src/sdkThemeWire.d.ts +50 -50
- package/dist/_dts/api/src/siteBanner.d.ts +4 -2
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/api/src/webhooks.d.ts +12 -12
- package/dist/_dts/blocks/src/client.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +28 -72
- package/dist/_dts/blocks/src/index.d.ts +3 -2
- package/dist/_dts/blocks/src/primitives/content/components/RichText.d.ts +2 -2
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +36 -14
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +148 -148
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/shared/bookingConsent.d.ts +36 -0
- package/dist/_dts/blocks/src/system/manifest/hydrateLinks.d.ts +9 -2
- package/dist/_dts/blocks/src/system/manifest/resolveBlockData.d.ts +8 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +79 -79
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -11
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/DynamicFormFields.d.ts +3 -19
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useSelectedAppointmentConsentForm.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.consent.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.field-values.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.fields.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +38 -144
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -19
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +18 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/validation.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/whole-series-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +34 -12
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingConsentAgreement.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
- package/dist/_dts/content-model/src/content-types/schema.d.ts +4 -4
- package/dist/_dts/core/src/booking-consent.d.ts +8 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +9 -3
- package/dist/_dts/db/src/schemas/forms.d.ts +21 -21
- package/dist/_dts/db/src/types/jsonb.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/linkPopoverUtils.d.ts +3 -2
- package/dist/_dts/editor/src/primitives/rich-text/useRichTextEditor.d.ts +3 -4
- package/dist/_dts/media-core/src/usageScanner.d.ts +1 -1
- package/dist/_dts/sdk/src/bookings/types.d.ts +7 -89
- package/dist/_dts/sdk/src/config/validation.d.ts +30 -30
- package/dist/_dts/sdk/src/contracts/content.d.ts +10 -36
- package/dist/_dts/sdk/src/contracts/rendering.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +9 -9
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -19
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +12 -12
- package/dist/_dts/theme-core/src/cards/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +72 -72
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +82 -82
- package/dist/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/client/{StepIndicator-CGixP_LW.mjs → BookingConsentAgreement-BxgpGEFD.mjs} +26 -4
- package/dist/client/{DiscountCodeDisclosure-DO7llLxm.mjs → DiscountCodeDisclosure-CfuPOHD0.mjs} +1 -1
- package/dist/client/{EventCombined.client-xID7zN__.mjs → EventCombined.client-DB8Qfzi-.mjs} +3 -3
- package/dist/client/{EventListing.client-CriBslp0.mjs → EventListing.client-DD4X8hp4.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DYmHnM8g.mjs → LeafletStaticMap-QhgIBQbv.mjs} +1 -1
- package/dist/client/{WholeSeriesRegistrationWizard-BEjzSiOA.mjs → WholeSeriesRegistrationWizard-DwtC7bCs.mjs} +72 -22
- package/dist/client/{accordion-CgFbnnnQ.mjs → accordion-DFXpLvwg.mjs} +1 -1
- package/dist/client/{bookingForm-dUyGpbxc.mjs → bookingForm-sI05d3lk.mjs} +73 -47
- package/dist/client/bookings.mjs +989 -140
- package/dist/client/{carousel-BvBwkUzx.mjs → carousel-wjyWTZCh.mjs} +1 -1
- package/dist/client/{cart-DiZENT2E.mjs → cart-DCwdpA4i.mjs} +3 -3
- package/dist/client/{checkout-Dq13KIgR.mjs → checkout-DTDW3l0R.mjs} +3 -3
- package/dist/client/checkoutUrls-DQYC_Br-.mjs +187 -0
- package/dist/client/client.mjs +556 -237
- package/dist/client/{context-B83PiNzm.mjs → context-TSK1CGx8.mjs} +1 -14
- package/dist/client/{courseRegistration-CKC5NmyH.mjs → courseRegistration-A-Tg7qw_.mjs} +3 -3
- package/dist/client/{eventCalendar-BF0Jatfw.mjs → eventCalendar-B0Zg-i_w.mjs} +5 -5
- package/dist/client/{eventCombined-BuoCF8je.mjs → eventCombined-B8Y2wizd.mjs} +3 -3
- package/dist/client/{eventDetails-CKwh0S9s.mjs → eventDetails-DPDOwURJ.mjs} +3 -3
- package/dist/client/{eventListing-eUxaWFaB.mjs → eventListing-CjBcmSLn.mjs} +3 -3
- package/dist/client/{eventRegistration-CfkNOkPb.mjs → eventRegistration-CK30HsAq.mjs} +111 -64
- package/dist/client/{form-C17H1c_H.mjs → form-CUXfsABE.mjs} +2 -2
- package/dist/client/{headerSection-DEwUmrtt.mjs → headerSection-N-mN3rjr.mjs} +2 -2
- package/dist/client/hooks.mjs +106 -3
- package/dist/client/{locationMap-Pf2QwuvW.mjs → locationMap-oiIDQMBt.mjs} +2 -2
- package/dist/client/{newsletterForm-BWQAH5Sv.mjs → newsletterForm-CkQ2tTrM.mjs} +2 -2
- package/dist/client/{pricing-CVdvbopJ.mjs → pricing-Caa0QWzh.mjs} +1 -1
- package/dist/client/{productDetail-BZi1Fa_G.mjs → productDetail-CnidyrsN.mjs} +3 -3
- package/dist/client/{productList-qq-55DNk.mjs → productList-CttYcS_S.mjs} +3 -3
- package/dist/client/{propsDecoder-BxmqPKdP.mjs → propsDecoder-CeUMxI9a.mjs} +211 -100
- package/dist/client/rendering/client.mjs +428 -151
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +643 -324
- package/dist/client/{scrollToBlock-B3CcKdtG.mjs → scrollToBlock-lPr1oqxB.mjs} +1 -1
- package/dist/client/{shop-DNWJPut5.mjs → shop-DXQtMo2O.mjs} +6 -6
- package/dist/client/{shop-commerce-BhvQCosS.mjs → shop-commerce-quDL411J.mjs} +7 -164
- package/dist/client/{shop-commerce-store-B04sCNnW.mjs → shop-commerce-store-Dnu-8Iub.mjs} +1 -1
- package/dist/client/{shopShared-DNNgZlmW.mjs → shopShared-BWPUURvG.mjs} +3 -3
- package/dist/client/{useEventFilters-CUmhE24_.mjs → useEventFilters-DRhWp2_5.mjs} +3 -3
- package/dist/client/{usePolling-M5jG675x.mjs → usePolling-UN4WKnaM.mjs} +2 -2
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-BEXb1wqo.mjs → sdk-runtime-Ca5RD78X.mjs} +1 -1
- package/dist/{separator-DGMuip1D.mjs → separator-CMhj6BTi.mjs} +1 -1
- package/dist/server/components.mjs +117 -37
- package/dist/server/config-validation.mjs +106 -3
- package/dist/server/config.mjs +106 -3
- package/dist/server/data.mjs +106 -3
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +186 -106
- package/dist/server/page-converter.mjs +105 -2
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +119 -37
- package/dist/server/rendering.mjs +117 -37
- package/dist/server/routing.mjs +132 -73
- package/dist/server/server.mjs +107 -4
- package/dist/server/theme-bridge.mjs +4 -4
- package/package.json +2 -2
- package/dist/client/checkoutUrls-Ct8Mxna3.mjs +0 -26
package/dist/server/next.mjs
CHANGED
|
@@ -9176,6 +9176,68 @@ z$1.object({
|
|
|
9176
9176
|
monthlyCurrency: z$1.literal("gbp")
|
|
9177
9177
|
});
|
|
9178
9178
|
//#endregion
|
|
9179
|
+
//#region ../blocks/src/system/types/link.ts
|
|
9180
|
+
const nullableString = z$1.union([z$1.string().min(1), z$1.null()]);
|
|
9181
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
9182
|
+
"page",
|
|
9183
|
+
"content",
|
|
9184
|
+
"pageSurface"
|
|
9185
|
+
];
|
|
9186
|
+
const resolvedInternalLinkKeys = [
|
|
9187
|
+
"entityId",
|
|
9188
|
+
"entityType",
|
|
9189
|
+
"href",
|
|
9190
|
+
"title",
|
|
9191
|
+
"typeLabel"
|
|
9192
|
+
];
|
|
9193
|
+
const internalRouteOnlyLinkSchema = z$1.object({
|
|
9194
|
+
kind: z$1.literal("internal"),
|
|
9195
|
+
routeId: z$1.string().min(1)
|
|
9196
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
9197
|
+
if (!resolvedInternalLinkKeys.some((key) => value[key] != null)) return;
|
|
9198
|
+
ctx.addIssue({
|
|
9199
|
+
code: "custom",
|
|
9200
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
9201
|
+
});
|
|
9202
|
+
});
|
|
9203
|
+
const internalResolvedLinkSchema = z$1.object({
|
|
9204
|
+
kind: z$1.literal("internal"),
|
|
9205
|
+
routeId: z$1.string().min(1),
|
|
9206
|
+
entityId: z$1.string().min(1),
|
|
9207
|
+
entityType: z$1.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
9208
|
+
href: z$1.string().min(1),
|
|
9209
|
+
title: z$1.string().min(1),
|
|
9210
|
+
typeLabel: z$1.string().min(1),
|
|
9211
|
+
contentTypeKey: nullableString.optional(),
|
|
9212
|
+
contentTypeName: nullableString.optional(),
|
|
9213
|
+
updatedAt: nullableString.optional()
|
|
9214
|
+
}).passthrough();
|
|
9215
|
+
const internalLinkSchema = z$1.union([internalResolvedLinkSchema, internalRouteOnlyLinkSchema]);
|
|
9216
|
+
const externalLinkSchema$1 = z$1.object({
|
|
9217
|
+
kind: z$1.literal("external"),
|
|
9218
|
+
href: z$1.string().min(1)
|
|
9219
|
+
}).passthrough();
|
|
9220
|
+
const customLinkSchema$1 = z$1.object({
|
|
9221
|
+
kind: z$1.literal("url"),
|
|
9222
|
+
href: z$1.string().min(1)
|
|
9223
|
+
}).passthrough();
|
|
9224
|
+
const pageLinkSchema$1 = z$1.object({
|
|
9225
|
+
kind: z$1.literal("page"),
|
|
9226
|
+
identifier: z$1.string().min(1)
|
|
9227
|
+
}).passthrough();
|
|
9228
|
+
const entryLinkSchema$1 = z$1.object({
|
|
9229
|
+
kind: z$1.literal("entry"),
|
|
9230
|
+
contentType: z$1.string().min(1),
|
|
9231
|
+
identifier: z$1.string().min(1)
|
|
9232
|
+
}).passthrough();
|
|
9233
|
+
const linkSchema = z$1.union([
|
|
9234
|
+
internalLinkSchema,
|
|
9235
|
+
externalLinkSchema$1,
|
|
9236
|
+
customLinkSchema$1,
|
|
9237
|
+
pageLinkSchema$1,
|
|
9238
|
+
entryLinkSchema$1
|
|
9239
|
+
]);
|
|
9240
|
+
//#endregion
|
|
9179
9241
|
//#region ../api/src/navigation/contracts.ts
|
|
9180
9242
|
/**
|
|
9181
9243
|
* Canonical navigation/link Zod contracts.
|
|
@@ -9205,7 +9267,7 @@ const internalLinkPayloadSchema = z$1.object({
|
|
|
9205
9267
|
kind: z$1.literal("internal"),
|
|
9206
9268
|
routeId: z$1.string().uuid(),
|
|
9207
9269
|
entityId: z$1.string().uuid(),
|
|
9208
|
-
entityType: z$1.enum(
|
|
9270
|
+
entityType: z$1.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
9209
9271
|
href: z$1.string().min(1),
|
|
9210
9272
|
title: z$1.string().min(1),
|
|
9211
9273
|
typeLabel: z$1.string().min(1),
|
|
@@ -9213,37 +9275,37 @@ const internalLinkPayloadSchema = z$1.object({
|
|
|
9213
9275
|
contentTypeName: z$1.string().nullable().optional(),
|
|
9214
9276
|
updatedAt: z$1.string().nullable().optional()
|
|
9215
9277
|
}).passthrough();
|
|
9216
|
-
const externalLinkSchema
|
|
9278
|
+
const externalLinkSchema = z$1.object({
|
|
9217
9279
|
kind: z$1.literal("external"),
|
|
9218
9280
|
href: z$1.string().url()
|
|
9219
9281
|
});
|
|
9220
|
-
const customLinkSchema
|
|
9282
|
+
const customLinkSchema = z$1.object({
|
|
9221
9283
|
kind: z$1.literal("url"),
|
|
9222
9284
|
href: z$1.string().min(1)
|
|
9223
9285
|
});
|
|
9224
|
-
const pageLinkSchema
|
|
9286
|
+
const pageLinkSchema = z$1.object({
|
|
9225
9287
|
kind: z$1.literal("page"),
|
|
9226
9288
|
identifier: z$1.string().min(1)
|
|
9227
9289
|
});
|
|
9228
|
-
const entryLinkSchema
|
|
9290
|
+
const entryLinkSchema = z$1.object({
|
|
9229
9291
|
kind: z$1.literal("entry"),
|
|
9230
9292
|
contentType: z$1.string().min(1),
|
|
9231
9293
|
identifier: z$1.string().min(1)
|
|
9232
9294
|
});
|
|
9233
9295
|
const linkPayloadSchema = z$1.discriminatedUnion("kind", [
|
|
9234
9296
|
internalLinkPayloadSchema,
|
|
9235
|
-
pageLinkSchema
|
|
9236
|
-
entryLinkSchema
|
|
9237
|
-
externalLinkSchema
|
|
9238
|
-
customLinkSchema
|
|
9297
|
+
pageLinkSchema,
|
|
9298
|
+
entryLinkSchema,
|
|
9299
|
+
externalLinkSchema,
|
|
9300
|
+
customLinkSchema,
|
|
9239
9301
|
portalLinkPayloadSchema,
|
|
9240
9302
|
cartLinkPayloadSchema
|
|
9241
9303
|
]);
|
|
9242
9304
|
const navigationLinkInputSchemaOptions = [
|
|
9243
|
-
pageLinkSchema
|
|
9244
|
-
entryLinkSchema
|
|
9245
|
-
externalLinkSchema
|
|
9246
|
-
customLinkSchema
|
|
9305
|
+
pageLinkSchema,
|
|
9306
|
+
entryLinkSchema,
|
|
9307
|
+
externalLinkSchema,
|
|
9308
|
+
customLinkSchema,
|
|
9247
9309
|
portalLinkPayloadSchema,
|
|
9248
9310
|
cartLinkPayloadSchema
|
|
9249
9311
|
];
|
|
@@ -18868,63 +18930,6 @@ z$1.object({
|
|
|
18868
18930
|
themes: z$1.array(themeSchema).length(3)
|
|
18869
18931
|
});
|
|
18870
18932
|
//#endregion
|
|
18871
|
-
//#region ../blocks/src/system/types/link.ts
|
|
18872
|
-
const nullableString = z$1.union([z$1.string().min(1), z$1.null()]);
|
|
18873
|
-
const resolvedInternalLinkKeys = [
|
|
18874
|
-
"entityId",
|
|
18875
|
-
"entityType",
|
|
18876
|
-
"href",
|
|
18877
|
-
"title",
|
|
18878
|
-
"typeLabel"
|
|
18879
|
-
];
|
|
18880
|
-
const internalRouteOnlyLinkSchema = z$1.object({
|
|
18881
|
-
kind: z$1.literal("internal"),
|
|
18882
|
-
routeId: z$1.string().min(1)
|
|
18883
|
-
}).passthrough().superRefine((value, ctx) => {
|
|
18884
|
-
if (!resolvedInternalLinkKeys.some((key) => value[key] != null)) return;
|
|
18885
|
-
ctx.addIssue({
|
|
18886
|
-
code: "custom",
|
|
18887
|
-
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
18888
|
-
});
|
|
18889
|
-
});
|
|
18890
|
-
const internalResolvedLinkSchema = z$1.object({
|
|
18891
|
-
kind: z$1.literal("internal"),
|
|
18892
|
-
routeId: z$1.string().min(1),
|
|
18893
|
-
entityId: z$1.string().min(1),
|
|
18894
|
-
entityType: z$1.enum(["page", "content"]),
|
|
18895
|
-
href: z$1.string().min(1),
|
|
18896
|
-
title: z$1.string().min(1),
|
|
18897
|
-
typeLabel: z$1.string().min(1),
|
|
18898
|
-
contentTypeKey: nullableString.optional(),
|
|
18899
|
-
contentTypeName: nullableString.optional(),
|
|
18900
|
-
updatedAt: nullableString.optional()
|
|
18901
|
-
}).passthrough();
|
|
18902
|
-
const internalLinkSchema = z$1.union([internalResolvedLinkSchema, internalRouteOnlyLinkSchema]);
|
|
18903
|
-
const externalLinkSchema = z$1.object({
|
|
18904
|
-
kind: z$1.literal("external"),
|
|
18905
|
-
href: z$1.string().min(1)
|
|
18906
|
-
}).passthrough();
|
|
18907
|
-
const customLinkSchema = z$1.object({
|
|
18908
|
-
kind: z$1.literal("url"),
|
|
18909
|
-
href: z$1.string().min(1)
|
|
18910
|
-
}).passthrough();
|
|
18911
|
-
const pageLinkSchema = z$1.object({
|
|
18912
|
-
kind: z$1.literal("page"),
|
|
18913
|
-
identifier: z$1.string().min(1)
|
|
18914
|
-
}).passthrough();
|
|
18915
|
-
const entryLinkSchema = z$1.object({
|
|
18916
|
-
kind: z$1.literal("entry"),
|
|
18917
|
-
contentType: z$1.string().min(1),
|
|
18918
|
-
identifier: z$1.string().min(1)
|
|
18919
|
-
}).passthrough();
|
|
18920
|
-
const linkSchema = z$1.union([
|
|
18921
|
-
internalLinkSchema,
|
|
18922
|
-
externalLinkSchema,
|
|
18923
|
-
customLinkSchema,
|
|
18924
|
-
pageLinkSchema,
|
|
18925
|
-
entryLinkSchema
|
|
18926
|
-
]);
|
|
18927
|
-
//#endregion
|
|
18928
18933
|
//#region ../media-core/src/fileSafety.ts
|
|
18929
18934
|
const CONTROL_CHARACTER_PATTERN = /[\u0000-\u001f\u007f]/u;
|
|
18930
18935
|
function containsUnsafePathSegmentCharacter(value) {
|
|
@@ -40172,6 +40177,22 @@ const blockBookingPaymentCollectionOptionSchema = z$1.union([
|
|
|
40172
40177
|
})
|
|
40173
40178
|
]);
|
|
40174
40179
|
const blockBookingPaymentTermsSchema = z$1.object({ allowedOptions: z$1.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
40180
|
+
const blockBookingConsentSchema = z$1.object({
|
|
40181
|
+
requirementId: z$1.string(),
|
|
40182
|
+
title: z$1.string(),
|
|
40183
|
+
agreement: RichTextDocSchema,
|
|
40184
|
+
checkboxLabel: z$1.string()
|
|
40185
|
+
});
|
|
40186
|
+
const bookingRequirementConsentFieldSchema = z$1.object({
|
|
40187
|
+
id: z$1.string(),
|
|
40188
|
+
label: z$1.string(),
|
|
40189
|
+
type: z$1.literal("booking_requirement_consent"),
|
|
40190
|
+
required: z$1.literal(true),
|
|
40191
|
+
agreement: RichTextDocSchema,
|
|
40192
|
+
checkboxLabel: z$1.string().min(1)
|
|
40193
|
+
});
|
|
40194
|
+
/** The two live public carriers for consent copy: Event data and appointment fields. */
|
|
40195
|
+
const bookingConsentCarrierSchema = z$1.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
40175
40196
|
//#endregion
|
|
40176
40197
|
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
40177
40198
|
function isSaleWindowOpen(option, now) {
|
|
@@ -40411,6 +40432,7 @@ const publicWholeSeriesOfferingSchema = z$1.object({
|
|
|
40411
40432
|
pricing: wholeSeriesPricingSchema,
|
|
40412
40433
|
currency: z$1.string(),
|
|
40413
40434
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
40435
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
40414
40436
|
enrollmentCapacity: z$1.number().nullable(),
|
|
40415
40437
|
acceptsMemberships: z$1.boolean(),
|
|
40416
40438
|
status: z$1.enum([
|
|
@@ -40728,6 +40750,7 @@ const publicEventSchema = z$1.object({
|
|
|
40728
40750
|
timeZone: z$1.string(),
|
|
40729
40751
|
pricing: publicEventPricingSchema,
|
|
40730
40752
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
40753
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
40731
40754
|
accessRestriction: accessRestrictionSchema,
|
|
40732
40755
|
allowedCategoryIds: z$1.array(z$1.string()),
|
|
40733
40756
|
requireGuestDetails: z$1.boolean().optional(),
|
|
@@ -41102,6 +41125,25 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
41102
41125
|
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
41103
41126
|
}
|
|
41104
41127
|
//#endregion
|
|
41128
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
41129
|
+
function planEventRegistrationScope(input) {
|
|
41130
|
+
const subject = input.subject;
|
|
41131
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
41132
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
41133
|
+
kind: "context",
|
|
41134
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
41135
|
+
occurrenceContext: input.occurrenceContext,
|
|
41136
|
+
subject
|
|
41137
|
+
})
|
|
41138
|
+
};
|
|
41139
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
41140
|
+
return {
|
|
41141
|
+
kind: "selectedRun",
|
|
41142
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
41143
|
+
offering: selectedRunOffering
|
|
41144
|
+
};
|
|
41145
|
+
}
|
|
41146
|
+
//#endregion
|
|
41105
41147
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
41106
41148
|
function isRecord$23(value) {
|
|
41107
41149
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -41512,10 +41554,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
41512
41554
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
41513
41555
|
}
|
|
41514
41556
|
function scopeEventRegistrationEvents(source) {
|
|
41515
|
-
|
|
41557
|
+
const scope = planEventRegistrationScope({
|
|
41558
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
41559
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
41516
41560
|
occurrenceContext: source.occurrenceContext,
|
|
41517
41561
|
subject: source.subject
|
|
41518
41562
|
});
|
|
41563
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
41519
41564
|
}
|
|
41520
41565
|
function shellLabelForRegistrationStep(step, events) {
|
|
41521
41566
|
switch (step) {
|
|
@@ -47546,6 +47591,7 @@ function normalizeGroupPresentation(value) {
|
|
|
47546
47591
|
function resolveAutoCtaPath(source, routes) {
|
|
47547
47592
|
const routeByNormalizedPath = /* @__PURE__ */ new Map();
|
|
47548
47593
|
for (const route of routes ?? []) {
|
|
47594
|
+
if (route.kind === "pageSurface") continue;
|
|
47549
47595
|
const normalized = normalizeRoutePath(route.path);
|
|
47550
47596
|
if (normalized && !routeByNormalizedPath.has(normalized)) routeByNormalizedPath.set(normalized, route.path);
|
|
47551
47597
|
}
|
|
@@ -47596,7 +47642,7 @@ const publicRouteCandidatesSchema = z$1.object({ routes: z$1.array(z$1.object({
|
|
|
47596
47642
|
entityId: z$1.string(),
|
|
47597
47643
|
path: z$1.string(),
|
|
47598
47644
|
title: z$1.string(),
|
|
47599
|
-
kind: z$1.enum(
|
|
47645
|
+
kind: z$1.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
47600
47646
|
contentTypeKey: z$1.string().nullable().optional()
|
|
47601
47647
|
})) });
|
|
47602
47648
|
const groupOverrideFields = [
|
|
@@ -54008,7 +54054,7 @@ function normalizeRel(target, rel) {
|
|
|
54008
54054
|
tokens.add("noreferrer");
|
|
54009
54055
|
return Array.from(tokens).join(" ");
|
|
54010
54056
|
}
|
|
54011
|
-
function renderMarks(text, marks, key) {
|
|
54057
|
+
function renderMarks(text, marks, key, linkTarget) {
|
|
54012
54058
|
if (!marks || marks.length === 0) return text;
|
|
54013
54059
|
return marks.reduce((acc, mark) => {
|
|
54014
54060
|
switch (mark.type) {
|
|
@@ -54021,7 +54067,8 @@ function renderMarks(text, marks, key) {
|
|
|
54021
54067
|
const attrs = mark.attrs ?? {};
|
|
54022
54068
|
const href = sanitizeHref(attrs.href);
|
|
54023
54069
|
if (!href) return acc;
|
|
54024
|
-
const
|
|
54070
|
+
const storedTarget = typeof attrs.target === "string" && attrs.target.trim().length > 0 ? attrs.target.trim() : void 0;
|
|
54071
|
+
const target = linkTarget === "new-tab" ? "_blank" : storedTarget;
|
|
54025
54072
|
return /* @__PURE__ */ jsx("a", {
|
|
54026
54073
|
href,
|
|
54027
54074
|
target,
|
|
@@ -54033,14 +54080,14 @@ function renderMarks(text, marks, key) {
|
|
|
54033
54080
|
}
|
|
54034
54081
|
}, text);
|
|
54035
54082
|
}
|
|
54036
|
-
function renderDoc(node, key, imageResolveContext) {
|
|
54083
|
+
function renderDoc(node, key, imageResolveContext, linkTarget) {
|
|
54037
54084
|
if (!node || !node.type) return null;
|
|
54038
|
-
const children = node.content?.map((child, index) => renderDoc(child, `${key}-${index}`, imageResolveContext));
|
|
54085
|
+
const children = node.content?.map((child, index) => renderDoc(child, `${key}-${index}`, imageResolveContext, linkTarget));
|
|
54039
54086
|
switch (node.type) {
|
|
54040
54087
|
case "doc": return /* @__PURE__ */ jsx(Fragment, { children });
|
|
54041
54088
|
case "paragraph":
|
|
54042
54089
|
if (!children && !node.text) return /* @__PURE__ */ jsx("p", {}, key);
|
|
54043
|
-
return /* @__PURE__ */ jsx("p", { children: children ?? renderMarks(node.text ?? "", node.marks, key) }, key);
|
|
54090
|
+
return /* @__PURE__ */ jsx("p", { children: children ?? renderMarks(node.text ?? "", node.marks, key, linkTarget) }, key);
|
|
54044
54091
|
case "heading": {
|
|
54045
54092
|
const headingTag = `h${Math.min(Math.max(node.attrs?.level ?? 2, 1), 6)}`;
|
|
54046
54093
|
return React.createElement(headingTag, { key }, children);
|
|
@@ -54082,14 +54129,14 @@ function renderDoc(node, key, imageResolveContext) {
|
|
|
54082
54129
|
decoding: "async"
|
|
54083
54130
|
}, key);
|
|
54084
54131
|
}
|
|
54085
|
-
case "text": return renderMarks(node.text ?? "", node.marks, key);
|
|
54132
|
+
case "text": return renderMarks(node.text ?? "", node.marks, key, linkTarget);
|
|
54086
54133
|
default: return null;
|
|
54087
54134
|
}
|
|
54088
54135
|
}
|
|
54089
54136
|
const DEFAULT_RICH_TEXT_CLASS = "rb-prose rb-max-w-none";
|
|
54090
|
-
function RichText$1({ as: Comp = "div", className, doc, path }) {
|
|
54137
|
+
function RichText$1({ as: Comp = "div", className, doc, path, linkTarget = "stored" }) {
|
|
54091
54138
|
const imageResolveContext = getCurrentResolveImageUrlContext() ?? null;
|
|
54092
|
-
const content = doc ? renderDoc(doc, "doc", imageResolveContext) : null;
|
|
54139
|
+
const content = doc ? renderDoc(doc, "doc", imageResolveContext, linkTarget) : null;
|
|
54093
54140
|
const dataAttributes = path ? { "data-builder-richtext": path } : void 0;
|
|
54094
54141
|
return /* @__PURE__ */ jsx(Comp, {
|
|
54095
54142
|
className: className?.trim() || DEFAULT_RICH_TEXT_CLASS,
|
|
@@ -55445,7 +55492,6 @@ function readBookingFieldType(value) {
|
|
|
55445
55492
|
case "select":
|
|
55446
55493
|
case "radio":
|
|
55447
55494
|
case "checkbox":
|
|
55448
|
-
case "booking_requirement_consent":
|
|
55449
55495
|
case "tel":
|
|
55450
55496
|
case "url":
|
|
55451
55497
|
case "number":
|
|
@@ -55480,7 +55526,7 @@ function normalizeBookingSettings(value) {
|
|
|
55480
55526
|
};
|
|
55481
55527
|
}
|
|
55482
55528
|
function isBookingFormService(value) {
|
|
55483
|
-
return isRecord$13(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
55529
|
+
return isRecord$13(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success);
|
|
55484
55530
|
}
|
|
55485
55531
|
function readNonEmptyString(value) {
|
|
55486
55532
|
if (typeof value !== "string") return null;
|
|
@@ -55505,6 +55551,15 @@ const bookingFieldOptionSchema = z$1.object({
|
|
|
55505
55551
|
value: z$1.string(),
|
|
55506
55552
|
label: z$1.string()
|
|
55507
55553
|
});
|
|
55554
|
+
const standardBookingFieldRules = {
|
|
55555
|
+
options: z$1.array(bookingFieldOptionSchema).optional(),
|
|
55556
|
+
multiple: z$1.boolean().optional(),
|
|
55557
|
+
minLength: z$1.number().optional(),
|
|
55558
|
+
maxLength: z$1.number().optional(),
|
|
55559
|
+
pattern: z$1.string().optional(),
|
|
55560
|
+
min: z$1.number().optional(),
|
|
55561
|
+
max: z$1.number().optional()
|
|
55562
|
+
};
|
|
55508
55563
|
const bookingFieldSchema = z$1.object({
|
|
55509
55564
|
id: z$1.string(),
|
|
55510
55565
|
label: z$1.string(),
|
|
@@ -55515,7 +55570,6 @@ const bookingFieldSchema = z$1.object({
|
|
|
55515
55570
|
"select",
|
|
55516
55571
|
"radio",
|
|
55517
55572
|
"checkbox",
|
|
55518
|
-
"booking_requirement_consent",
|
|
55519
55573
|
"tel",
|
|
55520
55574
|
"url",
|
|
55521
55575
|
"number",
|
|
@@ -55525,13 +55579,7 @@ const bookingFieldSchema = z$1.object({
|
|
|
55525
55579
|
required: z$1.boolean().optional(),
|
|
55526
55580
|
placeholder: z$1.string().optional(),
|
|
55527
55581
|
helpText: z$1.string().optional(),
|
|
55528
|
-
|
|
55529
|
-
multiple: z$1.boolean().optional(),
|
|
55530
|
-
minLength: z$1.number().optional(),
|
|
55531
|
-
maxLength: z$1.number().optional(),
|
|
55532
|
-
pattern: z$1.string().optional(),
|
|
55533
|
-
min: z$1.number().optional(),
|
|
55534
|
-
max: z$1.number().optional()
|
|
55582
|
+
...standardBookingFieldRules
|
|
55535
55583
|
});
|
|
55536
55584
|
const bookingSettingsSchema = z$1.object({
|
|
55537
55585
|
type: z$1.literal("booking"),
|
|
@@ -55574,7 +55622,8 @@ const bookingServiceSchema = z$1.object({
|
|
|
55574
55622
|
priceAmount: z$1.number().nullable().optional(),
|
|
55575
55623
|
priceCurrency: z$1.string().nullable().optional(),
|
|
55576
55624
|
paymentTerms: blockBookingPaymentTermsSchema.optional(),
|
|
55577
|
-
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional()
|
|
55625
|
+
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional(),
|
|
55626
|
+
consent: blockBookingConsentSchema.optional()
|
|
55578
55627
|
});
|
|
55579
55628
|
const bookingServicesSourceSchema = z$1.union([
|
|
55580
55629
|
z$1.array(bookingServiceSchema),
|
|
@@ -61126,12 +61175,46 @@ function collectConstrainedVideoMediaValues(options) {
|
|
|
61126
61175
|
*/
|
|
61127
61176
|
function hydrateManifestLinks(manifest, content, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
61128
61177
|
if (!routes || !manifest?.fields?.length) return content;
|
|
61129
|
-
return
|
|
61178
|
+
return hydrateLinks(content, routes, pagesByIdentifier, entriesByIdentifier);
|
|
61179
|
+
}
|
|
61180
|
+
/** Hydrate identifier-aware links in data loaded after manifest content. */
|
|
61181
|
+
function hydrateLinks(value, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
61182
|
+
return hydrateValue(value, {
|
|
61130
61183
|
routes,
|
|
61131
61184
|
pagesByIdentifier,
|
|
61132
61185
|
entriesByIdentifier
|
|
61133
61186
|
});
|
|
61134
61187
|
}
|
|
61188
|
+
/**
|
|
61189
|
+
* Hydrate links only inside resolved booking-consent documents. Loader payloads are
|
|
61190
|
+
* otherwise opaque and may legitimately contain objects that resemble link values.
|
|
61191
|
+
*/
|
|
61192
|
+
function hydrateResolvedBookingConsentLinks(value, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
61193
|
+
return hydrateResolvedBookingConsentValue(value, {
|
|
61194
|
+
routes,
|
|
61195
|
+
pagesByIdentifier,
|
|
61196
|
+
entriesByIdentifier
|
|
61197
|
+
});
|
|
61198
|
+
}
|
|
61199
|
+
function hydrateResolvedBookingConsentValue(value, context) {
|
|
61200
|
+
if (Array.isArray(value)) {
|
|
61201
|
+
const hydratedItems = value.map((item) => hydrateResolvedBookingConsentValue(item, context));
|
|
61202
|
+
return hydratedItems.every((item, index) => item === value[index]) ? value : hydratedItems;
|
|
61203
|
+
}
|
|
61204
|
+
if (!isRecord$26(value)) return value;
|
|
61205
|
+
if (isBookingConsentCarrier(value)) {
|
|
61206
|
+
const agreement = hydrateValue(value.agreement, context);
|
|
61207
|
+
return agreement === value.agreement ? value : {
|
|
61208
|
+
...value,
|
|
61209
|
+
agreement
|
|
61210
|
+
};
|
|
61211
|
+
}
|
|
61212
|
+
const hydratedEntries = Object.entries(value).map(([key, entry]) => [key, hydrateResolvedBookingConsentValue(entry, context)]);
|
|
61213
|
+
return hydratedEntries.every(([key, entry]) => entry === value[key]) ? value : Object.fromEntries(hydratedEntries);
|
|
61214
|
+
}
|
|
61215
|
+
function isBookingConsentCarrier(value) {
|
|
61216
|
+
return bookingConsentCarrierSchema.safeParse(value).success;
|
|
61217
|
+
}
|
|
61135
61218
|
function hydrateValue(value, context) {
|
|
61136
61219
|
try {
|
|
61137
61220
|
if (Array.isArray(value)) {
|
|
@@ -61200,6 +61283,13 @@ function hydrateEntryLink(link, context) {
|
|
|
61200
61283
|
};
|
|
61201
61284
|
}
|
|
61202
61285
|
//#endregion
|
|
61286
|
+
//#region ../blocks/src/system/manifest/resolveBlockData.ts
|
|
61287
|
+
function resolveBlockData$1(blockId, dataLoaders, dataContext, routes) {
|
|
61288
|
+
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
61289
|
+
if (isRecord$26(raw)) return routes ? hydrateResolvedBookingConsentLinks(raw, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : raw;
|
|
61290
|
+
return dataLoaders && typeof dataLoaders === "object" && Object.keys(dataLoaders).length > 0 ? {} : void 0;
|
|
61291
|
+
}
|
|
61292
|
+
//#endregion
|
|
61203
61293
|
//#region ../blocks/src/sdkBlockTransform.ts
|
|
61204
61294
|
/**
|
|
61205
61295
|
* Transforms an SDK custom block into a BlockManifest.
|
|
@@ -61794,8 +61884,8 @@ function generateInputCss({ themeId, theme, inputSystem }) {
|
|
|
61794
61884
|
const radioSelector = `${rootSelector} .form-radio`;
|
|
61795
61885
|
const checkableRules = [];
|
|
61796
61886
|
checkableRules.push("appearance: none");
|
|
61797
|
-
checkableRules.push("width:
|
|
61798
|
-
checkableRules.push("height:
|
|
61887
|
+
checkableRules.push("width: 1.125rem");
|
|
61888
|
+
checkableRules.push("height: 1.125rem");
|
|
61799
61889
|
checkableRules.push("flex-shrink: 0");
|
|
61800
61890
|
checkableRules.push(`border: ${borderPx} solid ${rgbColorValue(inputSystem.base.border.colorToken)}`);
|
|
61801
61891
|
if (inputSystem.base.background.type === "transparent") checkableRules.push("background-color: transparent");
|
|
@@ -65579,11 +65669,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
65579
65669
|
try {
|
|
65580
65670
|
const routes = routeMap ?? dataContext?.routes;
|
|
65581
65671
|
const hydratedContent = routes ? hydrateManifestLinks(definition.manifest, data, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : data;
|
|
65582
|
-
const resolved = resolveBlockData$1(
|
|
65583
|
-
block,
|
|
65584
|
-
definition,
|
|
65585
|
-
dataContext
|
|
65586
|
-
});
|
|
65672
|
+
const resolved = resolveBlockData$1(block.id, definition.dataLoaders, dataContext, routes);
|
|
65587
65673
|
const hasResolvedData = !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0;
|
|
65588
65674
|
const baseProps = {
|
|
65589
65675
|
content: hydratedContent,
|
|
@@ -65673,12 +65759,6 @@ function shouldDebugCustomBlocks() {
|
|
|
65673
65759
|
return false;
|
|
65674
65760
|
}
|
|
65675
65761
|
}
|
|
65676
|
-
function resolveBlockData$1({ block, definition, dataContext }) {
|
|
65677
|
-
const blockId = block.id ?? null;
|
|
65678
|
-
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
65679
|
-
if (isObjectRecord$1(raw)) return { ...raw };
|
|
65680
|
-
return definition.dataLoaders && Object.keys(definition.dataLoaders).length > 0 ? {} : void 0;
|
|
65681
|
-
}
|
|
65682
65762
|
/**
|
|
65683
65763
|
* Resolves block content based on stage priority.
|
|
65684
65764
|
* For draft/preview: draftContent takes priority over content.
|
|
@@ -87400,7 +87480,7 @@ var CircuitOpenError = class extends Error {
|
|
|
87400
87480
|
* 1. This constant
|
|
87401
87481
|
* 2. The "version" field in package.json
|
|
87402
87482
|
*/
|
|
87403
|
-
const SDK_VERSION = "0.
|
|
87483
|
+
const SDK_VERSION = "0.134.0";
|
|
87404
87484
|
//#endregion
|
|
87405
87485
|
//#region src/next/content-load-failure.ts
|
|
87406
87486
|
const SdkContentLoadError = RiverbankContentLoadError;
|
|
@@ -21072,6 +21072,23 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
21072
21072
|
]);
|
|
21073
21073
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
21074
21074
|
//#endregion
|
|
21075
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
21076
|
+
const blockBookingConsentSchema = z.object({
|
|
21077
|
+
requirementId: z.string(),
|
|
21078
|
+
title: z.string(),
|
|
21079
|
+
agreement: RichTextDocSchema,
|
|
21080
|
+
checkboxLabel: z.string()
|
|
21081
|
+
});
|
|
21082
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
21083
|
+
id: z.string(),
|
|
21084
|
+
label: z.string(),
|
|
21085
|
+
type: z.literal("booking_requirement_consent"),
|
|
21086
|
+
required: z.literal(true),
|
|
21087
|
+
agreement: RichTextDocSchema,
|
|
21088
|
+
checkboxLabel: z.string().min(1)
|
|
21089
|
+
});
|
|
21090
|
+
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
21091
|
+
//#endregion
|
|
21075
21092
|
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
21076
21093
|
const wholeSeriesVenueSchema = z.object({
|
|
21077
21094
|
id: z.string(),
|
|
@@ -21136,6 +21153,7 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
21136
21153
|
pricing: wholeSeriesPricingSchema,
|
|
21137
21154
|
currency: z.string(),
|
|
21138
21155
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
21156
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
21139
21157
|
enrollmentCapacity: z.number().nullable(),
|
|
21140
21158
|
acceptsMemberships: z.boolean(),
|
|
21141
21159
|
status: z.enum([
|
|
@@ -21453,6 +21471,7 @@ const publicEventSchema = z.object({
|
|
|
21453
21471
|
timeZone: z.string(),
|
|
21454
21472
|
pricing: publicEventPricingSchema,
|
|
21455
21473
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
21474
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
21456
21475
|
accessRestriction: accessRestrictionSchema,
|
|
21457
21476
|
allowedCategoryIds: z.array(z.string()),
|
|
21458
21477
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -21801,6 +21820,25 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
21801
21820
|
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
21802
21821
|
}
|
|
21803
21822
|
//#endregion
|
|
21823
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
21824
|
+
function planEventRegistrationScope(input) {
|
|
21825
|
+
const subject = input.subject;
|
|
21826
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
21827
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
21828
|
+
kind: "context",
|
|
21829
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
21830
|
+
occurrenceContext: input.occurrenceContext,
|
|
21831
|
+
subject
|
|
21832
|
+
})
|
|
21833
|
+
};
|
|
21834
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
21835
|
+
return {
|
|
21836
|
+
kind: "selectedRun",
|
|
21837
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
21838
|
+
offering: selectedRunOffering
|
|
21839
|
+
};
|
|
21840
|
+
}
|
|
21841
|
+
//#endregion
|
|
21804
21842
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
21805
21843
|
function isRecord$5(value) {
|
|
21806
21844
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -22214,10 +22252,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
22214
22252
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
22215
22253
|
}
|
|
22216
22254
|
function scopeEventRegistrationEvents(source) {
|
|
22217
|
-
|
|
22255
|
+
const scope = planEventRegistrationScope({
|
|
22256
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
22257
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
22218
22258
|
occurrenceContext: source.occurrenceContext,
|
|
22219
22259
|
subject: source.subject
|
|
22220
22260
|
});
|
|
22261
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
22221
22262
|
}
|
|
22222
22263
|
function shellLabelForRegistrationStep(step, events) {
|
|
22223
22264
|
switch (step) {
|
|
@@ -25341,6 +25382,68 @@ const recurringScheduleBlockDefinition = {
|
|
|
25341
25382
|
} }
|
|
25342
25383
|
};
|
|
25343
25384
|
//#endregion
|
|
25385
|
+
//#region ../blocks/src/system/types/link.ts
|
|
25386
|
+
const nullableString = z.union([z.string().min(1), z.null()]);
|
|
25387
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
25388
|
+
"page",
|
|
25389
|
+
"content",
|
|
25390
|
+
"pageSurface"
|
|
25391
|
+
];
|
|
25392
|
+
const resolvedInternalLinkKeys = [
|
|
25393
|
+
"entityId",
|
|
25394
|
+
"entityType",
|
|
25395
|
+
"href",
|
|
25396
|
+
"title",
|
|
25397
|
+
"typeLabel"
|
|
25398
|
+
];
|
|
25399
|
+
const internalRouteOnlyLinkSchema = z.object({
|
|
25400
|
+
kind: z.literal("internal"),
|
|
25401
|
+
routeId: z.string().min(1)
|
|
25402
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
25403
|
+
if (!resolvedInternalLinkKeys.some((key) => value[key] != null)) return;
|
|
25404
|
+
ctx.addIssue({
|
|
25405
|
+
code: "custom",
|
|
25406
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
25407
|
+
});
|
|
25408
|
+
});
|
|
25409
|
+
const internalResolvedLinkSchema = z.object({
|
|
25410
|
+
kind: z.literal("internal"),
|
|
25411
|
+
routeId: z.string().min(1),
|
|
25412
|
+
entityId: z.string().min(1),
|
|
25413
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
25414
|
+
href: z.string().min(1),
|
|
25415
|
+
title: z.string().min(1),
|
|
25416
|
+
typeLabel: z.string().min(1),
|
|
25417
|
+
contentTypeKey: nullableString.optional(),
|
|
25418
|
+
contentTypeName: nullableString.optional(),
|
|
25419
|
+
updatedAt: nullableString.optional()
|
|
25420
|
+
}).passthrough();
|
|
25421
|
+
const internalLinkSchema = z.union([internalResolvedLinkSchema, internalRouteOnlyLinkSchema]);
|
|
25422
|
+
const externalLinkSchema = z.object({
|
|
25423
|
+
kind: z.literal("external"),
|
|
25424
|
+
href: z.string().min(1)
|
|
25425
|
+
}).passthrough();
|
|
25426
|
+
const customLinkSchema = z.object({
|
|
25427
|
+
kind: z.literal("url"),
|
|
25428
|
+
href: z.string().min(1)
|
|
25429
|
+
}).passthrough();
|
|
25430
|
+
const pageLinkSchema = z.object({
|
|
25431
|
+
kind: z.literal("page"),
|
|
25432
|
+
identifier: z.string().min(1)
|
|
25433
|
+
}).passthrough();
|
|
25434
|
+
const entryLinkSchema = z.object({
|
|
25435
|
+
kind: z.literal("entry"),
|
|
25436
|
+
contentType: z.string().min(1),
|
|
25437
|
+
identifier: z.string().min(1)
|
|
25438
|
+
}).passthrough();
|
|
25439
|
+
z.union([
|
|
25440
|
+
internalLinkSchema,
|
|
25441
|
+
externalLinkSchema,
|
|
25442
|
+
customLinkSchema,
|
|
25443
|
+
pageLinkSchema,
|
|
25444
|
+
entryLinkSchema
|
|
25445
|
+
]);
|
|
25446
|
+
//#endregion
|
|
25344
25447
|
//#region ../blocks/src/system/blocks/offerings-preview/model.ts
|
|
25345
25448
|
const OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT = "Book";
|
|
25346
25449
|
const OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE = "Nothing scheduled just yet.";
|
|
@@ -25430,7 +25533,7 @@ const publicRouteCandidatesSchema = z.object({ routes: z.array(z.object({
|
|
|
25430
25533
|
entityId: z.string(),
|
|
25431
25534
|
path: z.string(),
|
|
25432
25535
|
title: z.string(),
|
|
25433
|
-
kind: z.enum(
|
|
25536
|
+
kind: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
25434
25537
|
contentTypeKey: z.string().nullable().optional()
|
|
25435
25538
|
})) });
|
|
25436
25539
|
const groupOverrideFields = [
|
package/dist/server/prebuild.mjs
CHANGED