@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
|
@@ -9497,6 +9497,11 @@ z.object({
|
|
|
9497
9497
|
//#endregion
|
|
9498
9498
|
//#region ../blocks/src/system/types/link.ts
|
|
9499
9499
|
const nullableString = z.union([z.string().min(1), z.null()]);
|
|
9500
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
9501
|
+
"page",
|
|
9502
|
+
"content",
|
|
9503
|
+
"pageSurface"
|
|
9504
|
+
];
|
|
9500
9505
|
const resolvedInternalLinkKeys = [
|
|
9501
9506
|
"entityId",
|
|
9502
9507
|
"entityType",
|
|
@@ -9518,7 +9523,7 @@ const internalResolvedLinkSchema = z.object({
|
|
|
9518
9523
|
kind: z.literal("internal"),
|
|
9519
9524
|
routeId: z.string().min(1),
|
|
9520
9525
|
entityId: z.string().min(1),
|
|
9521
|
-
entityType: z.enum(
|
|
9526
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
9522
9527
|
href: z.string().min(1),
|
|
9523
9528
|
title: z.string().min(1),
|
|
9524
9529
|
typeLabel: z.string().min(1),
|
|
@@ -30740,6 +30745,24 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
30740
30745
|
]);
|
|
30741
30746
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
30742
30747
|
//#endregion
|
|
30748
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
30749
|
+
const blockBookingConsentSchema = z.object({
|
|
30750
|
+
requirementId: z.string(),
|
|
30751
|
+
title: z.string(),
|
|
30752
|
+
agreement: RichTextDocSchema,
|
|
30753
|
+
checkboxLabel: z.string()
|
|
30754
|
+
});
|
|
30755
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
30756
|
+
id: z.string(),
|
|
30757
|
+
label: z.string(),
|
|
30758
|
+
type: z.literal("booking_requirement_consent"),
|
|
30759
|
+
required: z.literal(true),
|
|
30760
|
+
agreement: RichTextDocSchema,
|
|
30761
|
+
checkboxLabel: z.string().min(1)
|
|
30762
|
+
});
|
|
30763
|
+
/** The two live public carriers for consent copy: Event data and appointment fields. */
|
|
30764
|
+
const bookingConsentCarrierSchema = z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
30765
|
+
//#endregion
|
|
30743
30766
|
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
30744
30767
|
function isSaleWindowOpen(option, now) {
|
|
30745
30768
|
if (!option.isActive) return false;
|
|
@@ -30978,6 +31001,7 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
30978
31001
|
pricing: wholeSeriesPricingSchema,
|
|
30979
31002
|
currency: z.string(),
|
|
30980
31003
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
31004
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
30981
31005
|
enrollmentCapacity: z.number().nullable(),
|
|
30982
31006
|
acceptsMemberships: z.boolean(),
|
|
30983
31007
|
status: z.enum([
|
|
@@ -31295,6 +31319,7 @@ const publicEventSchema = z.object({
|
|
|
31295
31319
|
timeZone: z.string(),
|
|
31296
31320
|
pricing: publicEventPricingSchema,
|
|
31297
31321
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
31322
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
31298
31323
|
accessRestriction: accessRestrictionSchema,
|
|
31299
31324
|
allowedCategoryIds: z.array(z.string()),
|
|
31300
31325
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -31669,6 +31694,25 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
31669
31694
|
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
31670
31695
|
}
|
|
31671
31696
|
//#endregion
|
|
31697
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
31698
|
+
function planEventRegistrationScope(input) {
|
|
31699
|
+
const subject = input.subject;
|
|
31700
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
31701
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
31702
|
+
kind: "context",
|
|
31703
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
31704
|
+
occurrenceContext: input.occurrenceContext,
|
|
31705
|
+
subject
|
|
31706
|
+
})
|
|
31707
|
+
};
|
|
31708
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
31709
|
+
return {
|
|
31710
|
+
kind: "selectedRun",
|
|
31711
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
31712
|
+
offering: selectedRunOffering
|
|
31713
|
+
};
|
|
31714
|
+
}
|
|
31715
|
+
//#endregion
|
|
31672
31716
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
31673
31717
|
function isRecord$12(value) {
|
|
31674
31718
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -32082,10 +32126,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
32082
32126
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
32083
32127
|
}
|
|
32084
32128
|
function scopeEventRegistrationEvents(source) {
|
|
32085
|
-
|
|
32129
|
+
const scope = planEventRegistrationScope({
|
|
32130
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
32131
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
32086
32132
|
occurrenceContext: source.occurrenceContext,
|
|
32087
32133
|
subject: source.subject
|
|
32088
32134
|
});
|
|
32135
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
32089
32136
|
}
|
|
32090
32137
|
function shellLabelForRegistrationStep(step, events) {
|
|
32091
32138
|
switch (step) {
|
|
@@ -38086,6 +38133,7 @@ function normalizeGroupPresentation(value) {
|
|
|
38086
38133
|
function resolveAutoCtaPath(source, routes) {
|
|
38087
38134
|
const routeByNormalizedPath = /* @__PURE__ */ new Map();
|
|
38088
38135
|
for (const route of routes ?? []) {
|
|
38136
|
+
if (route.kind === "pageSurface") continue;
|
|
38089
38137
|
const normalized = normalizeRoutePath(route.path);
|
|
38090
38138
|
if (normalized && !routeByNormalizedPath.has(normalized)) routeByNormalizedPath.set(normalized, route.path);
|
|
38091
38139
|
}
|
|
@@ -38136,7 +38184,7 @@ const publicRouteCandidatesSchema = z.object({ routes: z.array(z.object({
|
|
|
38136
38184
|
entityId: z.string(),
|
|
38137
38185
|
path: z.string(),
|
|
38138
38186
|
title: z.string(),
|
|
38139
|
-
kind: z.enum(
|
|
38187
|
+
kind: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
38140
38188
|
contentTypeKey: z.string().nullable().optional()
|
|
38141
38189
|
})) });
|
|
38142
38190
|
const groupOverrideFields = [
|
|
@@ -44605,7 +44653,7 @@ function normalizeRel(target, rel) {
|
|
|
44605
44653
|
tokens.add("noreferrer");
|
|
44606
44654
|
return Array.from(tokens).join(" ");
|
|
44607
44655
|
}
|
|
44608
|
-
function renderMarks(text, marks, key) {
|
|
44656
|
+
function renderMarks(text, marks, key, linkTarget) {
|
|
44609
44657
|
if (!marks || marks.length === 0) return text;
|
|
44610
44658
|
return marks.reduce((acc, mark) => {
|
|
44611
44659
|
switch (mark.type) {
|
|
@@ -44618,7 +44666,8 @@ function renderMarks(text, marks, key) {
|
|
|
44618
44666
|
const attrs = mark.attrs ?? {};
|
|
44619
44667
|
const href = sanitizeHref(attrs.href);
|
|
44620
44668
|
if (!href) return acc;
|
|
44621
|
-
const
|
|
44669
|
+
const storedTarget = typeof attrs.target === "string" && attrs.target.trim().length > 0 ? attrs.target.trim() : void 0;
|
|
44670
|
+
const target = linkTarget === "new-tab" ? "_blank" : storedTarget;
|
|
44622
44671
|
return /* @__PURE__ */ jsx("a", {
|
|
44623
44672
|
href,
|
|
44624
44673
|
target,
|
|
@@ -44630,14 +44679,14 @@ function renderMarks(text, marks, key) {
|
|
|
44630
44679
|
}
|
|
44631
44680
|
}, text);
|
|
44632
44681
|
}
|
|
44633
|
-
function renderDoc(node, key, imageResolveContext) {
|
|
44682
|
+
function renderDoc(node, key, imageResolveContext, linkTarget) {
|
|
44634
44683
|
if (!node || !node.type) return null;
|
|
44635
|
-
const children = node.content?.map((child, index) => renderDoc(child, `${key}-${index}`, imageResolveContext));
|
|
44684
|
+
const children = node.content?.map((child, index) => renderDoc(child, `${key}-${index}`, imageResolveContext, linkTarget));
|
|
44636
44685
|
switch (node.type) {
|
|
44637
44686
|
case "doc": return /* @__PURE__ */ jsx(Fragment, { children });
|
|
44638
44687
|
case "paragraph":
|
|
44639
44688
|
if (!children && !node.text) return /* @__PURE__ */ jsx("p", {}, key);
|
|
44640
|
-
return /* @__PURE__ */ jsx("p", { children: children ?? renderMarks(node.text ?? "", node.marks, key) }, key);
|
|
44689
|
+
return /* @__PURE__ */ jsx("p", { children: children ?? renderMarks(node.text ?? "", node.marks, key, linkTarget) }, key);
|
|
44641
44690
|
case "heading": {
|
|
44642
44691
|
const headingTag = `h${Math.min(Math.max(node.attrs?.level ?? 2, 1), 6)}`;
|
|
44643
44692
|
return React.createElement(headingTag, { key }, children);
|
|
@@ -44679,14 +44728,14 @@ function renderDoc(node, key, imageResolveContext) {
|
|
|
44679
44728
|
decoding: "async"
|
|
44680
44729
|
}, key);
|
|
44681
44730
|
}
|
|
44682
|
-
case "text": return renderMarks(node.text ?? "", node.marks, key);
|
|
44731
|
+
case "text": return renderMarks(node.text ?? "", node.marks, key, linkTarget);
|
|
44683
44732
|
default: return null;
|
|
44684
44733
|
}
|
|
44685
44734
|
}
|
|
44686
44735
|
const DEFAULT_RICH_TEXT_CLASS = "rb-prose rb-max-w-none";
|
|
44687
|
-
function RichText({ as: Comp = "div", className, doc, path }) {
|
|
44736
|
+
function RichText({ as: Comp = "div", className, doc, path, linkTarget = "stored" }) {
|
|
44688
44737
|
const imageResolveContext = getCurrentResolveImageUrlContext() ?? null;
|
|
44689
|
-
const content = doc ? renderDoc(doc, "doc", imageResolveContext) : null;
|
|
44738
|
+
const content = doc ? renderDoc(doc, "doc", imageResolveContext, linkTarget) : null;
|
|
44690
44739
|
const dataAttributes = path ? { "data-builder-richtext": path } : void 0;
|
|
44691
44740
|
return /* @__PURE__ */ jsx(Comp, {
|
|
44692
44741
|
className: className?.trim() || DEFAULT_RICH_TEXT_CLASS,
|
|
@@ -46024,7 +46073,6 @@ function readBookingFieldType(value) {
|
|
|
46024
46073
|
case "select":
|
|
46025
46074
|
case "radio":
|
|
46026
46075
|
case "checkbox":
|
|
46027
|
-
case "booking_requirement_consent":
|
|
46028
46076
|
case "tel":
|
|
46029
46077
|
case "url":
|
|
46030
46078
|
case "number":
|
|
@@ -46059,7 +46107,7 @@ function normalizeBookingSettings(value) {
|
|
|
46059
46107
|
};
|
|
46060
46108
|
}
|
|
46061
46109
|
function isBookingFormService(value) {
|
|
46062
|
-
return isRecord$5(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
46110
|
+
return isRecord$5(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success);
|
|
46063
46111
|
}
|
|
46064
46112
|
function readNonEmptyString(value) {
|
|
46065
46113
|
if (typeof value !== "string") return null;
|
|
@@ -46086,6 +46134,15 @@ const bookingFieldOptionSchema = z.object({
|
|
|
46086
46134
|
value: z.string(),
|
|
46087
46135
|
label: z.string()
|
|
46088
46136
|
});
|
|
46137
|
+
const standardBookingFieldRules = {
|
|
46138
|
+
options: z.array(bookingFieldOptionSchema).optional(),
|
|
46139
|
+
multiple: z.boolean().optional(),
|
|
46140
|
+
minLength: z.number().optional(),
|
|
46141
|
+
maxLength: z.number().optional(),
|
|
46142
|
+
pattern: z.string().optional(),
|
|
46143
|
+
min: z.number().optional(),
|
|
46144
|
+
max: z.number().optional()
|
|
46145
|
+
};
|
|
46089
46146
|
const bookingFieldSchema = z.object({
|
|
46090
46147
|
id: z.string(),
|
|
46091
46148
|
label: z.string(),
|
|
@@ -46096,7 +46153,6 @@ const bookingFieldSchema = z.object({
|
|
|
46096
46153
|
"select",
|
|
46097
46154
|
"radio",
|
|
46098
46155
|
"checkbox",
|
|
46099
|
-
"booking_requirement_consent",
|
|
46100
46156
|
"tel",
|
|
46101
46157
|
"url",
|
|
46102
46158
|
"number",
|
|
@@ -46106,13 +46162,7 @@ const bookingFieldSchema = z.object({
|
|
|
46106
46162
|
required: z.boolean().optional(),
|
|
46107
46163
|
placeholder: z.string().optional(),
|
|
46108
46164
|
helpText: z.string().optional(),
|
|
46109
|
-
|
|
46110
|
-
multiple: z.boolean().optional(),
|
|
46111
|
-
minLength: z.number().optional(),
|
|
46112
|
-
maxLength: z.number().optional(),
|
|
46113
|
-
pattern: z.string().optional(),
|
|
46114
|
-
min: z.number().optional(),
|
|
46115
|
-
max: z.number().optional()
|
|
46165
|
+
...standardBookingFieldRules
|
|
46116
46166
|
});
|
|
46117
46167
|
const bookingSettingsSchema = z.object({
|
|
46118
46168
|
type: z.literal("booking"),
|
|
@@ -46155,7 +46205,8 @@ const bookingServiceSchema = z.object({
|
|
|
46155
46205
|
priceAmount: z.number().nullable().optional(),
|
|
46156
46206
|
priceCurrency: z.string().nullable().optional(),
|
|
46157
46207
|
paymentTerms: blockBookingPaymentTermsSchema.optional(),
|
|
46158
|
-
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional()
|
|
46208
|
+
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional(),
|
|
46209
|
+
consent: blockBookingConsentSchema.optional()
|
|
46159
46210
|
});
|
|
46160
46211
|
const bookingServicesSourceSchema = z.union([
|
|
46161
46212
|
z.array(bookingServiceSchema),
|
|
@@ -51686,12 +51737,46 @@ function renderBlock(manifest, content, options = {}) {
|
|
|
51686
51737
|
*/
|
|
51687
51738
|
function hydrateManifestLinks(manifest, content, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
51688
51739
|
if (!routes || !manifest?.fields?.length) return content;
|
|
51689
|
-
return
|
|
51740
|
+
return hydrateLinks(content, routes, pagesByIdentifier, entriesByIdentifier);
|
|
51741
|
+
}
|
|
51742
|
+
/** Hydrate identifier-aware links in data loaded after manifest content. */
|
|
51743
|
+
function hydrateLinks(value, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
51744
|
+
return hydrateValue(value, {
|
|
51690
51745
|
routes,
|
|
51691
51746
|
pagesByIdentifier,
|
|
51692
51747
|
entriesByIdentifier
|
|
51693
51748
|
});
|
|
51694
51749
|
}
|
|
51750
|
+
/**
|
|
51751
|
+
* Hydrate links only inside resolved booking-consent documents. Loader payloads are
|
|
51752
|
+
* otherwise opaque and may legitimately contain objects that resemble link values.
|
|
51753
|
+
*/
|
|
51754
|
+
function hydrateResolvedBookingConsentLinks(value, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
51755
|
+
return hydrateResolvedBookingConsentValue(value, {
|
|
51756
|
+
routes,
|
|
51757
|
+
pagesByIdentifier,
|
|
51758
|
+
entriesByIdentifier
|
|
51759
|
+
});
|
|
51760
|
+
}
|
|
51761
|
+
function hydrateResolvedBookingConsentValue(value, context) {
|
|
51762
|
+
if (Array.isArray(value)) {
|
|
51763
|
+
const hydratedItems = value.map((item) => hydrateResolvedBookingConsentValue(item, context));
|
|
51764
|
+
return hydratedItems.every((item, index) => item === value[index]) ? value : hydratedItems;
|
|
51765
|
+
}
|
|
51766
|
+
if (!isRecord$13(value)) return value;
|
|
51767
|
+
if (isBookingConsentCarrier(value)) {
|
|
51768
|
+
const agreement = hydrateValue(value.agreement, context);
|
|
51769
|
+
return agreement === value.agreement ? value : {
|
|
51770
|
+
...value,
|
|
51771
|
+
agreement
|
|
51772
|
+
};
|
|
51773
|
+
}
|
|
51774
|
+
const hydratedEntries = Object.entries(value).map(([key, entry]) => [key, hydrateResolvedBookingConsentValue(entry, context)]);
|
|
51775
|
+
return hydratedEntries.every(([key, entry]) => entry === value[key]) ? value : Object.fromEntries(hydratedEntries);
|
|
51776
|
+
}
|
|
51777
|
+
function isBookingConsentCarrier(value) {
|
|
51778
|
+
return bookingConsentCarrierSchema.safeParse(value).success;
|
|
51779
|
+
}
|
|
51695
51780
|
function hydrateValue(value, context) {
|
|
51696
51781
|
try {
|
|
51697
51782
|
if (Array.isArray(value)) {
|
|
@@ -51760,6 +51845,13 @@ function hydrateEntryLink(link, context) {
|
|
|
51760
51845
|
};
|
|
51761
51846
|
}
|
|
51762
51847
|
//#endregion
|
|
51848
|
+
//#region ../blocks/src/system/manifest/resolveBlockData.ts
|
|
51849
|
+
function resolveBlockData(blockId, dataLoaders, dataContext, routes) {
|
|
51850
|
+
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
51851
|
+
if (isRecord$13(raw)) return routes ? hydrateResolvedBookingConsentLinks(raw, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : raw;
|
|
51852
|
+
return dataLoaders && typeof dataLoaders === "object" && Object.keys(dataLoaders).length > 0 ? {} : void 0;
|
|
51853
|
+
}
|
|
51854
|
+
//#endregion
|
|
51763
51855
|
//#region ../blocks/src/sdkBlockTransform.ts
|
|
51764
51856
|
/**
|
|
51765
51857
|
* Transforms an SDK custom block into a BlockManifest.
|
|
@@ -52354,8 +52446,8 @@ function generateInputCss({ themeId, theme, inputSystem }) {
|
|
|
52354
52446
|
const radioSelector = `${rootSelector} .form-radio`;
|
|
52355
52447
|
const checkableRules = [];
|
|
52356
52448
|
checkableRules.push("appearance: none");
|
|
52357
|
-
checkableRules.push("width:
|
|
52358
|
-
checkableRules.push("height:
|
|
52449
|
+
checkableRules.push("width: 1.125rem");
|
|
52450
|
+
checkableRules.push("height: 1.125rem");
|
|
52359
52451
|
checkableRules.push("flex-shrink: 0");
|
|
52360
52452
|
checkableRules.push(`border: ${borderPx} solid ${rgbColorValue(inputSystem.base.border.colorToken)}`);
|
|
52361
52453
|
if (inputSystem.base.background.type === "transparent") checkableRules.push("background-color: transparent");
|
|
@@ -56139,11 +56231,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
56139
56231
|
try {
|
|
56140
56232
|
const routes = routeMap ?? dataContext?.routes;
|
|
56141
56233
|
const hydratedContent = routes ? hydrateManifestLinks(definition.manifest, data, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : data;
|
|
56142
|
-
const resolved = resolveBlockData(
|
|
56143
|
-
block,
|
|
56144
|
-
definition,
|
|
56145
|
-
dataContext
|
|
56146
|
-
});
|
|
56234
|
+
const resolved = resolveBlockData(block.id, definition.dataLoaders, dataContext, routes);
|
|
56147
56235
|
const hasResolvedData = !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0;
|
|
56148
56236
|
const baseProps = {
|
|
56149
56237
|
content: hydratedContent,
|
|
@@ -56233,12 +56321,6 @@ function shouldDebugCustomBlocks() {
|
|
|
56233
56321
|
return false;
|
|
56234
56322
|
}
|
|
56235
56323
|
}
|
|
56236
|
-
function resolveBlockData({ block, definition, dataContext }) {
|
|
56237
|
-
const blockId = block.id ?? null;
|
|
56238
|
-
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
56239
|
-
if (isObjectRecord$1(raw)) return { ...raw };
|
|
56240
|
-
return definition.dataLoaders && Object.keys(definition.dataLoaders).length > 0 ? {} : void 0;
|
|
56241
|
-
}
|
|
56242
56324
|
/**
|
|
56243
56325
|
* Resolves block content based on stage priority.
|
|
56244
56326
|
* For draft/preview: draftContent takes priority over content.
|
|
@@ -73327,7 +73409,7 @@ const internalLinkPayloadSchema = z.object({
|
|
|
73327
73409
|
kind: z.literal("internal"),
|
|
73328
73410
|
routeId: z.string().uuid(),
|
|
73329
73411
|
entityId: z.string().uuid(),
|
|
73330
|
-
entityType: z.enum(
|
|
73412
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
73331
73413
|
href: z.string().min(1),
|
|
73332
73414
|
title: z.string().min(1),
|
|
73333
73415
|
typeLabel: z.string().min(1),
|
|
@@ -9495,6 +9495,11 @@ z$1.object({
|
|
|
9495
9495
|
//#endregion
|
|
9496
9496
|
//#region ../blocks/src/system/types/link.ts
|
|
9497
9497
|
const nullableString = z$1.union([z$1.string().min(1), z$1.null()]);
|
|
9498
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
9499
|
+
"page",
|
|
9500
|
+
"content",
|
|
9501
|
+
"pageSurface"
|
|
9502
|
+
];
|
|
9498
9503
|
const resolvedInternalLinkKeys = [
|
|
9499
9504
|
"entityId",
|
|
9500
9505
|
"entityType",
|
|
@@ -9516,7 +9521,7 @@ const internalResolvedLinkSchema = z$1.object({
|
|
|
9516
9521
|
kind: z$1.literal("internal"),
|
|
9517
9522
|
routeId: z$1.string().min(1),
|
|
9518
9523
|
entityId: z$1.string().min(1),
|
|
9519
|
-
entityType: z$1.enum(
|
|
9524
|
+
entityType: z$1.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
9520
9525
|
href: z$1.string().min(1),
|
|
9521
9526
|
title: z$1.string().min(1),
|
|
9522
9527
|
typeLabel: z$1.string().min(1),
|
|
@@ -31660,6 +31665,22 @@ const blockBookingPaymentCollectionOptionSchema = z$1.union([
|
|
|
31660
31665
|
})
|
|
31661
31666
|
]);
|
|
31662
31667
|
const blockBookingPaymentTermsSchema = z$1.object({ allowedOptions: z$1.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
31668
|
+
const blockBookingConsentSchema = z$1.object({
|
|
31669
|
+
requirementId: z$1.string(),
|
|
31670
|
+
title: z$1.string(),
|
|
31671
|
+
agreement: RichTextDocSchema,
|
|
31672
|
+
checkboxLabel: z$1.string()
|
|
31673
|
+
});
|
|
31674
|
+
const bookingRequirementConsentFieldSchema = z$1.object({
|
|
31675
|
+
id: z$1.string(),
|
|
31676
|
+
label: z$1.string(),
|
|
31677
|
+
type: z$1.literal("booking_requirement_consent"),
|
|
31678
|
+
required: z$1.literal(true),
|
|
31679
|
+
agreement: RichTextDocSchema,
|
|
31680
|
+
checkboxLabel: z$1.string().min(1)
|
|
31681
|
+
});
|
|
31682
|
+
/** The two live public carriers for consent copy: Event data and appointment fields. */
|
|
31683
|
+
const bookingConsentCarrierSchema = z$1.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
31663
31684
|
//#endregion
|
|
31664
31685
|
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
31665
31686
|
function isSaleWindowOpen(option, now) {
|
|
@@ -31899,6 +31920,7 @@ const publicWholeSeriesOfferingSchema = z$1.object({
|
|
|
31899
31920
|
pricing: wholeSeriesPricingSchema,
|
|
31900
31921
|
currency: z$1.string(),
|
|
31901
31922
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
31923
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
31902
31924
|
enrollmentCapacity: z$1.number().nullable(),
|
|
31903
31925
|
acceptsMemberships: z$1.boolean(),
|
|
31904
31926
|
status: z$1.enum([
|
|
@@ -32216,6 +32238,7 @@ const publicEventSchema = z$1.object({
|
|
|
32216
32238
|
timeZone: z$1.string(),
|
|
32217
32239
|
pricing: publicEventPricingSchema,
|
|
32218
32240
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
32241
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
32219
32242
|
accessRestriction: accessRestrictionSchema,
|
|
32220
32243
|
allowedCategoryIds: z$1.array(z$1.string()),
|
|
32221
32244
|
requireGuestDetails: z$1.boolean().optional(),
|
|
@@ -32590,6 +32613,25 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
32590
32613
|
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
32591
32614
|
}
|
|
32592
32615
|
//#endregion
|
|
32616
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
32617
|
+
function planEventRegistrationScope(input) {
|
|
32618
|
+
const subject = input.subject;
|
|
32619
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
32620
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
32621
|
+
kind: "context",
|
|
32622
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
32623
|
+
occurrenceContext: input.occurrenceContext,
|
|
32624
|
+
subject
|
|
32625
|
+
})
|
|
32626
|
+
};
|
|
32627
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
32628
|
+
return {
|
|
32629
|
+
kind: "selectedRun",
|
|
32630
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
32631
|
+
offering: selectedRunOffering
|
|
32632
|
+
};
|
|
32633
|
+
}
|
|
32634
|
+
//#endregion
|
|
32593
32635
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
32594
32636
|
function isRecord$24(value) {
|
|
32595
32637
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -33000,10 +33042,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
33000
33042
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
33001
33043
|
}
|
|
33002
33044
|
function scopeEventRegistrationEvents(source) {
|
|
33003
|
-
|
|
33045
|
+
const scope = planEventRegistrationScope({
|
|
33046
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
33047
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
33004
33048
|
occurrenceContext: source.occurrenceContext,
|
|
33005
33049
|
subject: source.subject
|
|
33006
33050
|
});
|
|
33051
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
33007
33052
|
}
|
|
33008
33053
|
function shellLabelForRegistrationStep(step, events) {
|
|
33009
33054
|
switch (step) {
|
|
@@ -39059,6 +39104,7 @@ function normalizeGroupPresentation(value) {
|
|
|
39059
39104
|
function resolveAutoCtaPath(source, routes) {
|
|
39060
39105
|
const routeByNormalizedPath = /* @__PURE__ */ new Map();
|
|
39061
39106
|
for (const route of routes ?? []) {
|
|
39107
|
+
if (route.kind === "pageSurface") continue;
|
|
39062
39108
|
const normalized = normalizeRoutePath(route.path);
|
|
39063
39109
|
if (normalized && !routeByNormalizedPath.has(normalized)) routeByNormalizedPath.set(normalized, route.path);
|
|
39064
39110
|
}
|
|
@@ -39109,7 +39155,7 @@ const publicRouteCandidatesSchema = z$1.object({ routes: z$1.array(z$1.object({
|
|
|
39109
39155
|
entityId: z$1.string(),
|
|
39110
39156
|
path: z$1.string(),
|
|
39111
39157
|
title: z$1.string(),
|
|
39112
|
-
kind: z$1.enum(
|
|
39158
|
+
kind: z$1.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
39113
39159
|
contentTypeKey: z$1.string().nullable().optional()
|
|
39114
39160
|
})) });
|
|
39115
39161
|
const groupOverrideFields = [
|
|
@@ -45594,7 +45640,7 @@ function normalizeRel(target, rel) {
|
|
|
45594
45640
|
tokens.add("noreferrer");
|
|
45595
45641
|
return Array.from(tokens).join(" ");
|
|
45596
45642
|
}
|
|
45597
|
-
function renderMarks(text, marks, key) {
|
|
45643
|
+
function renderMarks(text, marks, key, linkTarget) {
|
|
45598
45644
|
if (!marks || marks.length === 0) return text;
|
|
45599
45645
|
return marks.reduce((acc, mark) => {
|
|
45600
45646
|
switch (mark.type) {
|
|
@@ -45607,7 +45653,8 @@ function renderMarks(text, marks, key) {
|
|
|
45607
45653
|
const attrs = mark.attrs ?? {};
|
|
45608
45654
|
const href = sanitizeHref(attrs.href);
|
|
45609
45655
|
if (!href) return acc;
|
|
45610
|
-
const
|
|
45656
|
+
const storedTarget = typeof attrs.target === "string" && attrs.target.trim().length > 0 ? attrs.target.trim() : void 0;
|
|
45657
|
+
const target = linkTarget === "new-tab" ? "_blank" : storedTarget;
|
|
45611
45658
|
return /* @__PURE__ */ jsx("a", {
|
|
45612
45659
|
href,
|
|
45613
45660
|
target,
|
|
@@ -45619,14 +45666,14 @@ function renderMarks(text, marks, key) {
|
|
|
45619
45666
|
}
|
|
45620
45667
|
}, text);
|
|
45621
45668
|
}
|
|
45622
|
-
function renderDoc(node, key, imageResolveContext) {
|
|
45669
|
+
function renderDoc(node, key, imageResolveContext, linkTarget) {
|
|
45623
45670
|
if (!node || !node.type) return null;
|
|
45624
|
-
const children = node.content?.map((child, index) => renderDoc(child, `${key}-${index}`, imageResolveContext));
|
|
45671
|
+
const children = node.content?.map((child, index) => renderDoc(child, `${key}-${index}`, imageResolveContext, linkTarget));
|
|
45625
45672
|
switch (node.type) {
|
|
45626
45673
|
case "doc": return /* @__PURE__ */ jsx(Fragment, { children });
|
|
45627
45674
|
case "paragraph":
|
|
45628
45675
|
if (!children && !node.text) return /* @__PURE__ */ jsx("p", {}, key);
|
|
45629
|
-
return /* @__PURE__ */ jsx("p", { children: children ?? renderMarks(node.text ?? "", node.marks, key) }, key);
|
|
45676
|
+
return /* @__PURE__ */ jsx("p", { children: children ?? renderMarks(node.text ?? "", node.marks, key, linkTarget) }, key);
|
|
45630
45677
|
case "heading": {
|
|
45631
45678
|
const headingTag = `h${Math.min(Math.max(node.attrs?.level ?? 2, 1), 6)}`;
|
|
45632
45679
|
return React.createElement(headingTag, { key }, children);
|
|
@@ -45668,14 +45715,14 @@ function renderDoc(node, key, imageResolveContext) {
|
|
|
45668
45715
|
decoding: "async"
|
|
45669
45716
|
}, key);
|
|
45670
45717
|
}
|
|
45671
|
-
case "text": return renderMarks(node.text ?? "", node.marks, key);
|
|
45718
|
+
case "text": return renderMarks(node.text ?? "", node.marks, key, linkTarget);
|
|
45672
45719
|
default: return null;
|
|
45673
45720
|
}
|
|
45674
45721
|
}
|
|
45675
45722
|
const DEFAULT_RICH_TEXT_CLASS = "rb-prose rb-max-w-none";
|
|
45676
|
-
function RichText$2({ as: Comp = "div", className, doc, path }) {
|
|
45723
|
+
function RichText$2({ as: Comp = "div", className, doc, path, linkTarget = "stored" }) {
|
|
45677
45724
|
const imageResolveContext = getCurrentResolveImageUrlContext() ?? null;
|
|
45678
|
-
const content = doc ? renderDoc(doc, "doc", imageResolveContext) : null;
|
|
45725
|
+
const content = doc ? renderDoc(doc, "doc", imageResolveContext, linkTarget) : null;
|
|
45679
45726
|
const dataAttributes = path ? { "data-builder-richtext": path } : void 0;
|
|
45680
45727
|
return /* @__PURE__ */ jsx(Comp, {
|
|
45681
45728
|
className: className?.trim() || DEFAULT_RICH_TEXT_CLASS,
|
|
@@ -47031,7 +47078,6 @@ function readBookingFieldType(value) {
|
|
|
47031
47078
|
case "select":
|
|
47032
47079
|
case "radio":
|
|
47033
47080
|
case "checkbox":
|
|
47034
|
-
case "booking_requirement_consent":
|
|
47035
47081
|
case "tel":
|
|
47036
47082
|
case "url":
|
|
47037
47083
|
case "number":
|
|
@@ -47066,7 +47112,7 @@ function normalizeBookingSettings(value) {
|
|
|
47066
47112
|
};
|
|
47067
47113
|
}
|
|
47068
47114
|
function isBookingFormService(value) {
|
|
47069
|
-
return isRecord$13(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
47115
|
+
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);
|
|
47070
47116
|
}
|
|
47071
47117
|
function readNonEmptyString(value) {
|
|
47072
47118
|
if (typeof value !== "string") return null;
|
|
@@ -47091,6 +47137,15 @@ const bookingFieldOptionSchema = z$1.object({
|
|
|
47091
47137
|
value: z$1.string(),
|
|
47092
47138
|
label: z$1.string()
|
|
47093
47139
|
});
|
|
47140
|
+
const standardBookingFieldRules = {
|
|
47141
|
+
options: z$1.array(bookingFieldOptionSchema).optional(),
|
|
47142
|
+
multiple: z$1.boolean().optional(),
|
|
47143
|
+
minLength: z$1.number().optional(),
|
|
47144
|
+
maxLength: z$1.number().optional(),
|
|
47145
|
+
pattern: z$1.string().optional(),
|
|
47146
|
+
min: z$1.number().optional(),
|
|
47147
|
+
max: z$1.number().optional()
|
|
47148
|
+
};
|
|
47094
47149
|
const bookingFieldSchema = z$1.object({
|
|
47095
47150
|
id: z$1.string(),
|
|
47096
47151
|
label: z$1.string(),
|
|
@@ -47101,7 +47156,6 @@ const bookingFieldSchema = z$1.object({
|
|
|
47101
47156
|
"select",
|
|
47102
47157
|
"radio",
|
|
47103
47158
|
"checkbox",
|
|
47104
|
-
"booking_requirement_consent",
|
|
47105
47159
|
"tel",
|
|
47106
47160
|
"url",
|
|
47107
47161
|
"number",
|
|
@@ -47111,13 +47165,7 @@ const bookingFieldSchema = z$1.object({
|
|
|
47111
47165
|
required: z$1.boolean().optional(),
|
|
47112
47166
|
placeholder: z$1.string().optional(),
|
|
47113
47167
|
helpText: z$1.string().optional(),
|
|
47114
|
-
|
|
47115
|
-
multiple: z$1.boolean().optional(),
|
|
47116
|
-
minLength: z$1.number().optional(),
|
|
47117
|
-
maxLength: z$1.number().optional(),
|
|
47118
|
-
pattern: z$1.string().optional(),
|
|
47119
|
-
min: z$1.number().optional(),
|
|
47120
|
-
max: z$1.number().optional()
|
|
47168
|
+
...standardBookingFieldRules
|
|
47121
47169
|
});
|
|
47122
47170
|
const bookingSettingsSchema = z$1.object({
|
|
47123
47171
|
type: z$1.literal("booking"),
|
|
@@ -47160,7 +47208,8 @@ const bookingServiceSchema = z$1.object({
|
|
|
47160
47208
|
priceAmount: z$1.number().nullable().optional(),
|
|
47161
47209
|
priceCurrency: z$1.string().nullable().optional(),
|
|
47162
47210
|
paymentTerms: blockBookingPaymentTermsSchema.optional(),
|
|
47163
|
-
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional()
|
|
47211
|
+
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional(),
|
|
47212
|
+
consent: blockBookingConsentSchema.optional()
|
|
47164
47213
|
});
|
|
47165
47214
|
const bookingServicesSourceSchema = z$1.union([
|
|
47166
47215
|
z$1.array(bookingServiceSchema),
|
|
@@ -52751,12 +52800,46 @@ function collectConstrainedVideoMediaValues(options) {
|
|
|
52751
52800
|
*/
|
|
52752
52801
|
function hydrateManifestLinks(manifest, content, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
52753
52802
|
if (!routes || !manifest?.fields?.length) return content;
|
|
52754
|
-
return
|
|
52803
|
+
return hydrateLinks(content, routes, pagesByIdentifier, entriesByIdentifier);
|
|
52804
|
+
}
|
|
52805
|
+
/** Hydrate identifier-aware links in data loaded after manifest content. */
|
|
52806
|
+
function hydrateLinks(value, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
52807
|
+
return hydrateValue(value, {
|
|
52755
52808
|
routes,
|
|
52756
52809
|
pagesByIdentifier,
|
|
52757
52810
|
entriesByIdentifier
|
|
52758
52811
|
});
|
|
52759
52812
|
}
|
|
52813
|
+
/**
|
|
52814
|
+
* Hydrate links only inside resolved booking-consent documents. Loader payloads are
|
|
52815
|
+
* otherwise opaque and may legitimately contain objects that resemble link values.
|
|
52816
|
+
*/
|
|
52817
|
+
function hydrateResolvedBookingConsentLinks(value, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
52818
|
+
return hydrateResolvedBookingConsentValue(value, {
|
|
52819
|
+
routes,
|
|
52820
|
+
pagesByIdentifier,
|
|
52821
|
+
entriesByIdentifier
|
|
52822
|
+
});
|
|
52823
|
+
}
|
|
52824
|
+
function hydrateResolvedBookingConsentValue(value, context) {
|
|
52825
|
+
if (Array.isArray(value)) {
|
|
52826
|
+
const hydratedItems = value.map((item) => hydrateResolvedBookingConsentValue(item, context));
|
|
52827
|
+
return hydratedItems.every((item, index) => item === value[index]) ? value : hydratedItems;
|
|
52828
|
+
}
|
|
52829
|
+
if (!isRecord$27(value)) return value;
|
|
52830
|
+
if (isBookingConsentCarrier(value)) {
|
|
52831
|
+
const agreement = hydrateValue(value.agreement, context);
|
|
52832
|
+
return agreement === value.agreement ? value : {
|
|
52833
|
+
...value,
|
|
52834
|
+
agreement
|
|
52835
|
+
};
|
|
52836
|
+
}
|
|
52837
|
+
const hydratedEntries = Object.entries(value).map(([key, entry]) => [key, hydrateResolvedBookingConsentValue(entry, context)]);
|
|
52838
|
+
return hydratedEntries.every(([key, entry]) => entry === value[key]) ? value : Object.fromEntries(hydratedEntries);
|
|
52839
|
+
}
|
|
52840
|
+
function isBookingConsentCarrier(value) {
|
|
52841
|
+
return bookingConsentCarrierSchema.safeParse(value).success;
|
|
52842
|
+
}
|
|
52760
52843
|
function hydrateValue(value, context) {
|
|
52761
52844
|
try {
|
|
52762
52845
|
if (Array.isArray(value)) {
|
|
@@ -52825,6 +52908,13 @@ function hydrateEntryLink(link, context) {
|
|
|
52825
52908
|
};
|
|
52826
52909
|
}
|
|
52827
52910
|
//#endregion
|
|
52911
|
+
//#region ../blocks/src/system/manifest/resolveBlockData.ts
|
|
52912
|
+
function resolveBlockData$1(blockId, dataLoaders, dataContext, routes) {
|
|
52913
|
+
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
52914
|
+
if (isRecord$27(raw)) return routes ? hydrateResolvedBookingConsentLinks(raw, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : raw;
|
|
52915
|
+
return dataLoaders && typeof dataLoaders === "object" && Object.keys(dataLoaders).length > 0 ? {} : void 0;
|
|
52916
|
+
}
|
|
52917
|
+
//#endregion
|
|
52828
52918
|
//#region ../blocks/src/sdkBlockTransform.ts
|
|
52829
52919
|
/**
|
|
52830
52920
|
* Transforms an SDK custom block into a BlockManifest.
|
|
@@ -53419,8 +53509,8 @@ function generateInputCss({ themeId, theme, inputSystem }) {
|
|
|
53419
53509
|
const radioSelector = `${rootSelector} .form-radio`;
|
|
53420
53510
|
const checkableRules = [];
|
|
53421
53511
|
checkableRules.push("appearance: none");
|
|
53422
|
-
checkableRules.push("width:
|
|
53423
|
-
checkableRules.push("height:
|
|
53512
|
+
checkableRules.push("width: 1.125rem");
|
|
53513
|
+
checkableRules.push("height: 1.125rem");
|
|
53424
53514
|
checkableRules.push("flex-shrink: 0");
|
|
53425
53515
|
checkableRules.push(`border: ${borderPx} solid ${rgbColorValue(inputSystem.base.border.colorToken)}`);
|
|
53426
53516
|
if (inputSystem.base.background.type === "transparent") checkableRules.push("background-color: transparent");
|
|
@@ -57204,11 +57294,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
57204
57294
|
try {
|
|
57205
57295
|
const routes = routeMap ?? dataContext?.routes;
|
|
57206
57296
|
const hydratedContent = routes ? hydrateManifestLinks(definition.manifest, data, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : data;
|
|
57207
|
-
const resolved = resolveBlockData$1(
|
|
57208
|
-
block,
|
|
57209
|
-
definition,
|
|
57210
|
-
dataContext
|
|
57211
|
-
});
|
|
57297
|
+
const resolved = resolveBlockData$1(block.id, definition.dataLoaders, dataContext, routes);
|
|
57212
57298
|
const hasResolvedData = !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0;
|
|
57213
57299
|
const baseProps = {
|
|
57214
57300
|
content: hydratedContent,
|
|
@@ -57298,12 +57384,6 @@ function shouldDebugCustomBlocks() {
|
|
|
57298
57384
|
return false;
|
|
57299
57385
|
}
|
|
57300
57386
|
}
|
|
57301
|
-
function resolveBlockData$1({ block, definition, dataContext }) {
|
|
57302
|
-
const blockId = block.id ?? null;
|
|
57303
|
-
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
57304
|
-
if (isObjectRecord$1(raw)) return { ...raw };
|
|
57305
|
-
return definition.dataLoaders && Object.keys(definition.dataLoaders).length > 0 ? {} : void 0;
|
|
57306
|
-
}
|
|
57307
57387
|
/**
|
|
57308
57388
|
* Resolves block content based on stage priority.
|
|
57309
57389
|
* For draft/preview: draftContent takes priority over content.
|
|
@@ -75546,7 +75626,7 @@ const internalLinkPayloadSchema = z$1.object({
|
|
|
75546
75626
|
kind: z$1.literal("internal"),
|
|
75547
75627
|
routeId: z$1.string().uuid(),
|
|
75548
75628
|
entityId: z$1.string().uuid(),
|
|
75549
|
-
entityType: z$1.enum(
|
|
75629
|
+
entityType: z$1.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
75550
75630
|
href: z$1.string().min(1),
|
|
75551
75631
|
title: z$1.string().min(1),
|
|
75552
75632
|
typeLabel: z$1.string().min(1),
|