@riverbankcms/sdk 0.127.0 → 0.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PreviewEditorSidebar-BXtfF7tp.mjs → PreviewEditorSidebar-Dbvb7GIr.mjs} +9 -33
- package/dist/{PreviewEditorUI-Dou73Q0K.mjs → PreviewEditorUI-e9O9l20X.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DgFDIwvK.mjs → PreviewQueryProvider-B1kbhaJD.mjs} +1 -1
- package/dist/SdkPreviewModeRuntime-BZHt6e9w.mjs +11006 -0
- package/dist/{SiteChromeCustomizeContext-DZiDBAYu.mjs → SiteChromeCustomizeContext-CvuGbHJX.mjs} +31619 -1483
- package/dist/_dts/ai/src/contracts/proposals.d.ts +288 -36
- package/dist/_dts/api/src/bookingClosures.d.ts +19 -3
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -3
- package/dist/_dts/api/src/bookingRecords.d.ts +0 -13
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -2
- package/dist/_dts/api/src/communications.d.ts +2 -1
- package/dist/_dts/api/src/contactFormSummary.d.ts +15 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -5
- package/dist/_dts/api/src/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/footerSettings.d.ts +11 -0
- package/dist/_dts/api/src/index.d.ts +2 -1
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +48 -0
- package/dist/_dts/api/src/participantMessaging.d.ts +5 -3
- package/dist/_dts/api/src/publicExperience/siteEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +7 -5
- package/dist/_dts/api/src/siteOperations.d.ts +12 -3
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +3 -2
- package/dist/_dts/blocks/src/client/form.d.ts +1 -0
- package/dist/_dts/blocks/src/client/newsletter-form.d.ts +1 -0
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -8
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +41 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +14 -23
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +109 -23
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +42 -108
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -54
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +26 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +29 -78
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +3 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +27 -8
- package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +21 -0
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +3 -1
- package/dist/_dts/content-editor/src/FooterEngagementEditorFields.d.ts +31 -0
- package/dist/_dts/content-editor/src/FooterEngagementEditorPanel.d.ts +17 -0
- package/dist/_dts/content-editor/src/footerComposer.d.ts +3 -0
- package/dist/_dts/content-editor/src/footerEngagementDraft.d.ts +57 -0
- package/dist/_dts/content-editor/src/footerEngagementEditor.d.ts +11 -0
- package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +13 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +35 -0
- package/dist/_dts/core/src/footer-arrangement.d.ts +2 -0
- package/dist/_dts/core/src/footer-composition-types.d.ts +118 -0
- package/dist/_dts/core/src/footer-composition.d.ts +7 -116
- package/dist/_dts/core/src/footer-engagement.d.ts +30 -0
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/core/src/newsletter-signup-destination.d.ts +38 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +59 -6
- package/dist/_dts/db/src/index.d.ts +1 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +72 -2
- package/dist/_dts/db/src/schemas/standard-contact.d.ts +114 -0
- package/dist/_dts/preview-next/src/client/blocks/previewBatchLoaderParams.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -4
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -4
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +6 -5
- package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +9 -0
- package/dist/_dts/sdk/src/cli/content/footerFile.d.ts +10 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +3 -5
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +15 -3
- package/dist/_dts/sdk/src/client/combineAbortSignals.d.ts +2 -0
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -15
- package/dist/_dts/sdk/src/client/types.d.ts +10 -2
- package/dist/_dts/sdk/src/client/wholeSeriesReadOperations.d.ts +11 -0
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/event-registration-content.d.ts +16 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -15
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -18
- package/dist/_dts/sdk/src/public-api/teamMemberContracts.d.ts +17 -0
- package/dist/_dts/sdk/src/public-api/wholeSeriesContracts.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +7 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +5 -3
- package/dist/_dts/sdk/src/rendering/mediaAssets.d.ts +8 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commandContract.d.ts +8 -1
- package/dist/_dts/site-commands/src/commands.d.ts +16 -2
- package/dist/_dts/theme-core/src/header/paintTargets.d.ts +10 -4
- package/dist/_dts/theme-core/src/header/surfaceRules.d.ts +2 -3
- package/dist/cli/index.mjs +5302 -4628
- package/dist/client/{courseRegistration-DTEYWL6Z.mjs → CourseRegistrationWizard-xRmA7REV.mjs} +329 -49
- package/dist/client/{DiscountCodeDisclosure-BDFRp8Y7.mjs → DiscountCodeDisclosure-B9vriL5C.mjs} +1 -1
- package/dist/client/{EventCombined.client-DJgF1_lf.mjs → EventCombined.client-BgVnVTlz.mjs} +2 -2
- package/dist/client/{EventListing.client-CnWGNjOr.mjs → EventListing.client-CqdsO7jO.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BISs9Bl7.mjs → LeafletStaticMap-CKPxot9M.mjs} +1 -1
- package/dist/client/{StepIndicator-D8gVYkK-.mjs → StepIndicator-DGCYuBJ1.mjs} +2 -2
- package/dist/client/{accordion-DFDajgDz.mjs → accordion-BfN5Eqd-.mjs} +1 -1
- package/dist/client/{bookingForm-Bdqj9-52.mjs → bookingForm-DOvCpBFP.mjs} +5 -5
- package/dist/client/{carousel-Cvqf-kN8.mjs → carousel-DPNmiH0f.mjs} +1 -1
- package/dist/client/{cart-CuH2TJXP.mjs → cart--egVXlrR.mjs} +3 -3
- package/dist/client/{checkout-CMNPpejZ.mjs → checkout-DywWtMcq.mjs} +3 -3
- package/dist/client/client.mjs +4912 -4613
- package/dist/client/courseRegistration-Dk9qFVwt.mjs +46 -0
- package/dist/client/{eventCalendar-BW-XoxZ0.mjs → eventCalendar-Bkz2HjlS.mjs} +4 -4
- package/dist/client/{eventCombined-Bpn7s0y9.mjs → eventCombined-D4kipYWg.mjs} +2 -2
- package/dist/client/{eventDetails-D2uUSTMH.mjs → eventDetails-Dz_5ix2Q.mjs} +56 -35
- package/dist/client/{eventListing-CVr1c094.mjs → eventListing-D0vm-zST.mjs} +2 -2
- package/dist/client/{eventRegistration-Dv4AvkMw.mjs → eventRegistration-Cw1E4Q4p.mjs} +58 -6
- package/dist/client/{form-DxdKf9fs.mjs → form-C2Zf1n3K.mjs} +1 -1
- package/dist/client/{headerSection-BaXI5Sro.mjs → headerSection-CP05gzdc.mjs} +2 -2
- package/dist/client/hooks.mjs +212 -61
- package/dist/client/{locationMap-BEtW2fKz.mjs → locationMap-Cl3x9PYJ.mjs} +2 -2
- package/dist/client/{newsletterForm-BKKs0S4R.mjs → newsletterForm-DyEJoClm.mjs} +26 -20
- package/dist/client/{pricing-ClkqcElA.mjs → pricing-DGuNR1W4.mjs} +1 -1
- package/dist/client/{productDetail-H-ru8dyy.mjs → productDetail-Cq-HrGew.mjs} +3 -3
- package/dist/client/{productList-Buyi5c0C.mjs → productList-DbB3jwqd.mjs} +3 -3
- package/dist/client/{propsDecoder-BF7i6Ijg.mjs → propsDecoder-CiTuhUwY.mjs} +130 -87
- package/dist/client/rendering/client.mjs +416 -208
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +5522 -5237
- package/dist/client/{scrollToBlock-D_7t8yWb.mjs → scrollToBlock-CShkRqab.mjs} +1 -1
- package/dist/client/{shop-CF7SZQNX.mjs → shop-Cu4Ib-ZA.mjs} +5 -5
- package/dist/client/{shop-commerce-DA7_Rq5p.mjs → shop-commerce-BzpsOdh7.mjs} +4 -4
- package/dist/client/{shop-commerce-store-BmLqW7Gh.mjs → shop-commerce-store-DaE7Fhj8.mjs} +1 -1
- package/dist/client/{shopShared-WL-E1znM.mjs → shopShared-cF0c20vB.mjs} +2 -2
- package/dist/client/{useEventFilters-rc8VLeLV.mjs → useEventFilters-QZ3HMgaJ.mjs} +2 -2
- package/dist/client/{usePolling-1ncrfd4S.mjs → usePolling-BKf0GcE-.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +1 -1
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/{previewAuthStore-Dev9CdG9.mjs → previewAuthStore-BesgU5Xu.mjs} +1 -1
- package/dist/{sdk-runtime-BnrCCFJq.mjs → sdk-runtime-Cn_QSCOg.mjs} +2 -2
- package/dist/{separator-CFvBx2yl.mjs → separator-CEoGABRc.mjs} +1 -1
- package/dist/server/components.mjs +473 -289
- package/dist/server/config-validation.mjs +209 -61
- package/dist/server/config.mjs +209 -61
- package/dist/server/data.mjs +212 -61
- package/dist/server/index.mjs +40 -16
- package/dist/server/next.mjs +513 -307
- package/dist/server/page-converter.mjs +211 -64
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +475 -282
- package/dist/server/rendering.mjs +482 -290
- package/dist/server/routing.mjs +254 -80
- package/dist/server/server.mjs +252 -77
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-B0HPXr-l.mjs +0 -39546
- package/dist/client/MagicLinkForm-b5E_HoG9.mjs +0 -327
|
@@ -220,7 +220,7 @@ function formatEventPricing(pricing, options = {}) {
|
|
|
220
220
|
//#endregion
|
|
221
221
|
//#region ../core/src/event-page-surface-subject.ts
|
|
222
222
|
function parseEventPageSurfaceSubject(value) {
|
|
223
|
-
if (!isRecord$
|
|
223
|
+
if (!isRecord$38(value)) return err$3({ kind: "notObject" });
|
|
224
224
|
switch (value.kind) {
|
|
225
225
|
case "eventSeries": {
|
|
226
226
|
const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
|
|
@@ -263,7 +263,7 @@ function parseEventPageSurfaceSubject(value) {
|
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
function isRecord$
|
|
266
|
+
function isRecord$38(value) {
|
|
267
267
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
268
268
|
}
|
|
269
269
|
//#endregion
|
|
@@ -497,7 +497,7 @@ function toLocationCoordinates(value) {
|
|
|
497
497
|
}
|
|
498
498
|
//#endregion
|
|
499
499
|
//#region ../core/src/rich-text.ts
|
|
500
|
-
function isRecord$
|
|
500
|
+
function isRecord$36(value) {
|
|
501
501
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
502
502
|
}
|
|
503
503
|
function hasOnlyKeys(value, allowed) {
|
|
@@ -516,13 +516,16 @@ function isDenseArrayOf(value, predicate) {
|
|
|
516
516
|
return true;
|
|
517
517
|
}
|
|
518
518
|
function isTipTapMark(value) {
|
|
519
|
-
return isRecord$
|
|
519
|
+
return isRecord$36(value) && hasOnlyKeys(value, markKeys) && typeof value.type === "string" && value.type.length > 0 && (value.attrs === void 0 || isRecord$36(value.attrs));
|
|
520
520
|
}
|
|
521
521
|
function isTipTapNode(value) {
|
|
522
|
-
if (!isRecord$
|
|
522
|
+
if (!isRecord$36(value) || !hasOnlyKeys(value, nodeKeys) || typeof value.type !== "string" || value.type.length === 0 || value.type === "doc" || value.attrs !== void 0 && !isRecord$36(value.attrs) || value.marks !== void 0 && (!Array.isArray(value.marks) || !isDenseArrayOf(value.marks, isTipTapMark)) || value.content !== void 0 && (!Array.isArray(value.content) || !isDenseArrayOf(value.content, isTipTapNode))) return false;
|
|
523
523
|
if (value.type === "text") return typeof value.text === "string" && value.text.length > 0 && value.content === void 0;
|
|
524
524
|
return value.text === void 0;
|
|
525
525
|
}
|
|
526
|
+
function parseNewsletterSignupDestinationProvider(value) {
|
|
527
|
+
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
528
|
+
}
|
|
526
529
|
new Map([
|
|
527
530
|
"brand",
|
|
528
531
|
"supporting-text",
|
|
@@ -531,6 +534,7 @@ new Map([
|
|
|
531
534
|
"business-address",
|
|
532
535
|
"contact",
|
|
533
536
|
"opening-hours",
|
|
537
|
+
"engagement",
|
|
534
538
|
"legal-navigation",
|
|
535
539
|
"legal"
|
|
536
540
|
].map((kind, index) => [kind, index]));
|
|
@@ -568,9 +572,9 @@ function resolvePlanningDateInput(input = {}) {
|
|
|
568
572
|
}
|
|
569
573
|
//#endregion
|
|
570
574
|
//#region ../media-core/src/fileSafety.ts
|
|
571
|
-
const CONTROL_CHARACTER_PATTERN
|
|
575
|
+
const CONTROL_CHARACTER_PATTERN = /[\u0000-\u001f\u007f]/u;
|
|
572
576
|
function containsUnsafePathSegmentCharacter(value) {
|
|
573
|
-
return value.includes("/") || value.includes("\\") || CONTROL_CHARACTER_PATTERN
|
|
577
|
+
return value.includes("/") || value.includes("\\") || CONTROL_CHARACTER_PATTERN.test(value);
|
|
574
578
|
}
|
|
575
579
|
function isReservedPathSegment(value) {
|
|
576
580
|
return value === "." || value === "..";
|
|
@@ -17282,10 +17286,16 @@ function getHeaderPaintTargets(variant, themeId, state = "base") {
|
|
|
17282
17286
|
ownerSelector: desktopOwner,
|
|
17283
17287
|
selector: `${desktopOwner}::before`,
|
|
17284
17288
|
mediaQuery: MQ_MD_UP,
|
|
17285
|
-
|
|
17286
|
-
|
|
17287
|
-
|
|
17288
|
-
|
|
17289
|
+
extent: {
|
|
17290
|
+
top: {
|
|
17291
|
+
customProperty: "--rb-header-floating-top-gap",
|
|
17292
|
+
value: "1rem",
|
|
17293
|
+
ownerProperty: "top"
|
|
17294
|
+
},
|
|
17295
|
+
bottom: {
|
|
17296
|
+
customProperty: "--rb-header-floating-bottom-extension",
|
|
17297
|
+
value: "0.75rem"
|
|
17298
|
+
}
|
|
17289
17299
|
},
|
|
17290
17300
|
ownerNeedsPositioning: false
|
|
17291
17301
|
}, {
|
|
@@ -17294,10 +17304,16 @@ function getHeaderPaintTargets(variant, themeId, state = "base") {
|
|
|
17294
17304
|
ownerSelector: mobileOwner,
|
|
17295
17305
|
selector: `${mobileOwner}::before`,
|
|
17296
17306
|
mediaQuery: MQ_MD_DOWN,
|
|
17297
|
-
|
|
17298
|
-
|
|
17299
|
-
|
|
17300
|
-
|
|
17307
|
+
extent: {
|
|
17308
|
+
top: {
|
|
17309
|
+
customProperty: "--rb-header-floating-top-gap",
|
|
17310
|
+
value: "0.75rem",
|
|
17311
|
+
ownerProperty: "margin-top"
|
|
17312
|
+
},
|
|
17313
|
+
bottom: {
|
|
17314
|
+
customProperty: "--rb-header-floating-bottom-extension",
|
|
17315
|
+
value: "0.75rem"
|
|
17316
|
+
}
|
|
17301
17317
|
},
|
|
17302
17318
|
ownerNeedsPositioning: true
|
|
17303
17319
|
}];
|
|
@@ -17338,10 +17354,11 @@ function renderHeaderPaintTargetRule(target, rules) {
|
|
|
17338
17354
|
return `${target.selector} {\n ${[...pseudoElementSetup, ...rules].join("\n ")}\n}`;
|
|
17339
17355
|
}
|
|
17340
17356
|
case "viewport-band": {
|
|
17341
|
-
const
|
|
17357
|
+
const { top, bottom } = target.extent;
|
|
17342
17358
|
const ownerRules = [
|
|
17343
|
-
`${
|
|
17344
|
-
`${
|
|
17359
|
+
`${top.customProperty}: ${top.value};`,
|
|
17360
|
+
`${bottom.customProperty}: ${bottom.value};`,
|
|
17361
|
+
`${top.ownerProperty}: var(${top.customProperty});`,
|
|
17345
17362
|
...target.ownerNeedsPositioning ? ["position: relative;"] : [],
|
|
17346
17363
|
"isolation: isolate;",
|
|
17347
17364
|
"background: none;",
|
|
@@ -17353,8 +17370,8 @@ function renderHeaderPaintTargetRule(target, rules) {
|
|
|
17353
17370
|
const bandRules = [
|
|
17354
17371
|
"content: \"\";",
|
|
17355
17372
|
"position: absolute;",
|
|
17356
|
-
`top: calc(-1 * var(${
|
|
17357
|
-
|
|
17373
|
+
`top: calc(-1 * var(${top.customProperty}));`,
|
|
17374
|
+
`bottom: calc(-1 * var(${bottom.customProperty}));`,
|
|
17358
17375
|
"left: 50%;",
|
|
17359
17376
|
"width: 100vw;",
|
|
17360
17377
|
"transform: translateX(-50%);",
|
|
@@ -17373,6 +17390,7 @@ const headerScrollTreatmentSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
|
17373
17390
|
kind: z$1.literal("contrast-glass"),
|
|
17374
17391
|
backgroundTone: z$1.enum(["light", "dark"])
|
|
17375
17392
|
})]).optional();
|
|
17393
|
+
const CONTRAST_GLASS_BLUR = "blur(12px)";
|
|
17376
17394
|
function generateMobileOverlayBackdropFilterFix(themeId, variant) {
|
|
17377
17395
|
const root = `:where([data-theme-scope="${themeId}"]) .header-root:has([data-nav-mobile-overlay][aria-hidden="false"])`;
|
|
17378
17396
|
return `\n${(variant === "floating" ? [`${root} .header-mobile-bar`, `${root} .header-mobile-bar::before`] : [`${root}::before`]).join(",\n")} {\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n}\n`;
|
|
@@ -17382,7 +17400,12 @@ function generateHeaderScrollTreatmentStyles(treatment, themeId, variant, surfac
|
|
|
17382
17400
|
switch (treatment.kind) {
|
|
17383
17401
|
case "contrast-glass": {
|
|
17384
17402
|
const backgroundChannels = treatment.backgroundTone === "dark" ? "0 0 0" : "255 255 255";
|
|
17385
|
-
return renderHeaderPaintTargetRules(getHeaderPaintTargets(variant, themeId, "scrolled"), [
|
|
17403
|
+
return renderHeaderPaintTargetRules(getHeaderPaintTargets(variant, themeId, "scrolled"), [
|
|
17404
|
+
`background-color: rgb(${backgroundChannels} / 0.60);`,
|
|
17405
|
+
`backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
|
|
17406
|
+
`-webkit-backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
|
|
17407
|
+
...surfaceRules
|
|
17408
|
+
]);
|
|
17386
17409
|
}
|
|
17387
17410
|
}
|
|
17388
17411
|
}
|
|
@@ -25709,6 +25732,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
25709
25732
|
}
|
|
25710
25733
|
],
|
|
25711
25734
|
layout: [el("newsletter-form", withApiBindings({
|
|
25735
|
+
source: "block",
|
|
25712
25736
|
destinationProvider: { $bind: { from: "destinationProvider" } },
|
|
25713
25737
|
listId: { $bind: { from: "listId" } },
|
|
25714
25738
|
preset: { $bind: { from: "preset" } },
|
|
@@ -27231,6 +27255,7 @@ const contactNewsletterLayout = styledSection({
|
|
|
27231
27255
|
as: "h2",
|
|
27232
27256
|
className: "newsletter-copy-title"
|
|
27233
27257
|
}, when("newsletterTitle"), bind("newsletterTitle")), richText({ className: "newsletter-copy-subtitle rb-prose rb-max-w-none" }, when("newsletterSubtitle"), bind("newsletterSubtitle"))]), el("newsletter-form", withApiBindings({
|
|
27258
|
+
source: "block",
|
|
27234
27259
|
listId: { $bind: { from: "listId" } },
|
|
27235
27260
|
preset: { $bind: { from: "preset" } },
|
|
27236
27261
|
includePhone: { $bind: { from: "includePhone" } },
|
|
@@ -29229,6 +29254,22 @@ const footerNavGroupsLayout = stack({
|
|
|
29229
29254
|
}, [text({ as: "span" }, bind("entry.label"))], repeat("group.children", "entry"))])], repeat("footerMenu.groups", "group"))], whenCollectionHasItems("footerMenu.groups"));
|
|
29230
29255
|
//#endregion
|
|
29231
29256
|
//#region ../blocks/src/system/blocks/site-footer.ts
|
|
29257
|
+
const footerStandardContactBindings = {
|
|
29258
|
+
value: { $bind: { from: "module.engagement.runtime.value" } },
|
|
29259
|
+
submitLabel: { $bind: { from: "module.engagement.runtime.submitLabel" } },
|
|
29260
|
+
successMessage: { $bind: { from: "module.engagement.runtime.successMessage" } }
|
|
29261
|
+
};
|
|
29262
|
+
const footerMailingListBindings = {
|
|
29263
|
+
source: { $bind: { from: "module.engagement.runtime.source" } },
|
|
29264
|
+
destinationRef: { $bind: { from: "module.engagement.runtime.destinationRef" } },
|
|
29265
|
+
listId: { $bind: { from: "module.engagement.runtime.listId" } },
|
|
29266
|
+
preset: { $bind: { from: "module.engagement.runtime.preset" } },
|
|
29267
|
+
includePhone: { $bind: { from: "module.engagement.runtime.includePhone" } },
|
|
29268
|
+
buttonLabel: { $bind: { from: "module.engagement.runtime.buttonLabel" } },
|
|
29269
|
+
successMessage: { $bind: { from: "module.engagement.runtime.successMessage" } },
|
|
29270
|
+
privacyNote: { $bind: { from: "module.engagement.runtime.privacyNote" } }
|
|
29271
|
+
};
|
|
29272
|
+
const footerSpamProtectionBinding = { spamProtectionEnabled: { $bind: { from: "$root.spamProtectionEnabled" } } };
|
|
29232
29273
|
const brandLogo = link({
|
|
29233
29274
|
href: "/",
|
|
29234
29275
|
className: { $bind: {
|
|
@@ -29306,6 +29347,23 @@ const authoredCopy = richText({
|
|
|
29306
29347
|
id: "content.interpolateRichTextTokens",
|
|
29307
29348
|
options: { tokens: ["year", "site_name"] }
|
|
29308
29349
|
}] }));
|
|
29350
|
+
const footerEngagement = stack({
|
|
29351
|
+
gap: "md",
|
|
29352
|
+
className: "rb-w-full"
|
|
29353
|
+
}, [
|
|
29354
|
+
text({
|
|
29355
|
+
as: "p",
|
|
29356
|
+
className: "rb-body rb-opacity-80"
|
|
29357
|
+
}, bind("module.engagement.intro"), when("module.engagement.intro")),
|
|
29358
|
+
form(withApiBindings({
|
|
29359
|
+
...footerStandardContactBindings,
|
|
29360
|
+
...footerSpamProtectionBinding
|
|
29361
|
+
}), [], when("module.engagement.kind", { equals: "standard-contact" })),
|
|
29362
|
+
el("newsletter-form", withApiBindings({
|
|
29363
|
+
...footerMailingListBindings,
|
|
29364
|
+
...footerSpamProtectionBinding
|
|
29365
|
+
}), [], when("module.engagement.kind", { equals: "mailing-list" }))
|
|
29366
|
+
], when("module.kind", { equals: "engagement" }));
|
|
29309
29367
|
const footerGroup = stack({
|
|
29310
29368
|
gap: "md",
|
|
29311
29369
|
align: "stretch",
|
|
@@ -29331,6 +29389,7 @@ const footerGroup = stack({
|
|
|
29331
29389
|
contact,
|
|
29332
29390
|
hours,
|
|
29333
29391
|
socials,
|
|
29392
|
+
footerEngagement,
|
|
29334
29393
|
stack({ className: "rb-w-full" }, [authoredCopy], when("module.kind", { equals: "supporting-text" })),
|
|
29335
29394
|
stack({ className: "rb-w-full rb-lg-col-span-3" }, [authoredCopy], when("module.kind", { equals: "legal" }))
|
|
29336
29395
|
], repeat("group.modules", "module"))], repeat("region.groups", "group"));
|
|
@@ -29338,6 +29397,10 @@ const footerMainRegion = stack({
|
|
|
29338
29397
|
className: { $bind: { from: "region.className" } },
|
|
29339
29398
|
"data-footer-region": { $bind: { from: "region.kind" } }
|
|
29340
29399
|
}, [footerGroup], when("region.kind", { equals: "main" }), repeat("content.footerRuntime.regions", "region"));
|
|
29400
|
+
const footerEngagementRegion = stack({
|
|
29401
|
+
className: { $bind: { from: "region.className" } },
|
|
29402
|
+
"data-footer-region": "engagement-row"
|
|
29403
|
+
}, [footerGroup], when("region.kind", { equals: "engagement-row" }), repeat("content.footerRuntime.regions", "region"));
|
|
29341
29404
|
const footerBottomRegion = stack({ className: { $bind: {
|
|
29342
29405
|
from: "$root.theme.footer",
|
|
29343
29406
|
transforms: [{ id: "layout.footerBottomBarContainerClass" }],
|
|
@@ -29373,7 +29436,11 @@ const siteFooterManifest = createBlockManifest({
|
|
|
29373
29436
|
fallback: mergeStyles(backgroundColorStyle("surface"), surfaceForegroundStyle({ text: "rgb(var(--tb-text))" }), borderColorStyle("border"))
|
|
29374
29437
|
} },
|
|
29375
29438
|
"data-footer-membership": { $bind: { from: "content.footerRuntime.membershipKey" } }
|
|
29376
|
-
}, [
|
|
29439
|
+
}, [
|
|
29440
|
+
footerEngagementRegion,
|
|
29441
|
+
footerMainRegion,
|
|
29442
|
+
footerBottomRegion
|
|
29443
|
+
]),
|
|
29377
29444
|
description: "Site-wide composed footer with canonical shared details.",
|
|
29378
29445
|
styleTokens: { spacing: "md" },
|
|
29379
29446
|
paletteHidden: true
|
|
@@ -31957,7 +32024,7 @@ const publicMembershipProductCollectionSchema = z$1.object({ memberships: z$1.ar
|
|
|
31957
32024
|
* Kept in a shared module so the block definition and runtime contracts can
|
|
31958
32025
|
* depend on the same schema without creating an initialization cycle.
|
|
31959
32026
|
*/
|
|
31960
|
-
const occurrenceContextSchema
|
|
32027
|
+
const occurrenceContextSchema = z$1.object({
|
|
31961
32028
|
id: z$1.string(),
|
|
31962
32029
|
seriesId: z$1.string(),
|
|
31963
32030
|
startsAt: z$1.string(),
|
|
@@ -32357,28 +32424,37 @@ const EVENT_REGISTRATION_SHELL_STEP_LABELS = [
|
|
|
32357
32424
|
"Payment"
|
|
32358
32425
|
];
|
|
32359
32426
|
const eventRegistrationPublicEventSchema = z$1.preprocess(normalizeEventRegistrationEventInput, publicEventSchema);
|
|
32360
|
-
const
|
|
32361
|
-
|
|
32362
|
-
apiBaseUrl: z$1.string().optional(),
|
|
32363
|
-
portalToken: z$1.string().nullable().optional(),
|
|
32364
|
-
previewToken: z$1.string().nullable().optional(),
|
|
32365
|
-
occurrenceContext: occurrenceContextSchema$1.optional(),
|
|
32427
|
+
const eventRegistrationHydrationSchemaShape = {
|
|
32428
|
+
occurrenceContext: occurrenceContextSchema.optional(),
|
|
32366
32429
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
32367
32430
|
events: z$1.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
32368
|
-
|
|
32369
|
-
|
|
32370
|
-
maxTickets: z$1.string().
|
|
32431
|
+
wholeSeriesOfferings: publicCoursesArraySchema.nullable().optional(),
|
|
32432
|
+
wholeSeriesOffering: publicCourseSchema.nullable().optional(),
|
|
32433
|
+
maxTickets: z$1.string().optional(),
|
|
32371
32434
|
showVenue: z$1.boolean().optional(),
|
|
32372
32435
|
showCapacity: z$1.boolean().optional(),
|
|
32436
|
+
showSessions: z$1.boolean().optional(),
|
|
32437
|
+
showPrice: z$1.boolean().optional(),
|
|
32373
32438
|
successMessage: z$1.string().optional(),
|
|
32374
32439
|
waitlistMessage: z$1.string().optional(),
|
|
32440
|
+
membershipMessage: z$1.string().optional(),
|
|
32375
32441
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
32376
32442
|
overlayEnabled: z$1.boolean().optional(),
|
|
32377
32443
|
spamProtectionEnabled: z$1.boolean().optional(),
|
|
32378
|
-
stage: previewStageSchema.optional(),
|
|
32379
32444
|
supportEmail: z$1.string().optional(),
|
|
32380
32445
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
32381
32446
|
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
32447
|
+
};
|
|
32448
|
+
const eventRegistrationSourceSchema = z$1.object({
|
|
32449
|
+
siteId: z$1.string().optional(),
|
|
32450
|
+
apiBaseUrl: z$1.string().optional(),
|
|
32451
|
+
portalToken: z$1.string().nullable().optional(),
|
|
32452
|
+
previewToken: z$1.string().nullable().optional(),
|
|
32453
|
+
...eventRegistrationHydrationSchemaShape,
|
|
32454
|
+
className: z$1.string().nullable().optional(),
|
|
32455
|
+
buttonText: z$1.string().nullable().optional(),
|
|
32456
|
+
maxTickets: z$1.string().nullable().optional(),
|
|
32457
|
+
stage: previewStageSchema.optional()
|
|
32382
32458
|
});
|
|
32383
32459
|
const eventRegistrationDisplaySchema = z$1.object({
|
|
32384
32460
|
kind: z$1.literal("event-registration"),
|
|
@@ -32389,22 +32465,7 @@ const eventRegistrationDisplaySchema = z$1.object({
|
|
|
32389
32465
|
stepLabels: z$1.array(z$1.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
32390
32466
|
summaryButtonText: z$1.string()
|
|
32391
32467
|
});
|
|
32392
|
-
const eventRegistrationHydrationSchema = z$1.object(
|
|
32393
|
-
occurrenceContext: occurrenceContextSchema$1.optional(),
|
|
32394
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
32395
|
-
events: z$1.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
32396
|
-
maxTickets: z$1.string().optional(),
|
|
32397
|
-
showVenue: z$1.boolean().optional(),
|
|
32398
|
-
showCapacity: z$1.boolean().optional(),
|
|
32399
|
-
successMessage: z$1.string().optional(),
|
|
32400
|
-
waitlistMessage: z$1.string().optional(),
|
|
32401
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
32402
|
-
overlayEnabled: z$1.boolean().optional(),
|
|
32403
|
-
spamProtectionEnabled: z$1.boolean().optional(),
|
|
32404
|
-
supportEmail: z$1.string().optional(),
|
|
32405
|
-
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
32406
|
-
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
32407
|
-
});
|
|
32468
|
+
const eventRegistrationHydrationSchema = z$1.object(eventRegistrationHydrationSchemaShape);
|
|
32408
32469
|
const eventRegistrationRenderSchema = z$1.object({
|
|
32409
32470
|
display: eventRegistrationDisplaySchema,
|
|
32410
32471
|
hydration: eventRegistrationHydrationSchema
|
|
@@ -32484,11 +32545,16 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
32484
32545
|
occurrenceContext: source.occurrenceContext ?? null,
|
|
32485
32546
|
subject: source.subject ?? null,
|
|
32486
32547
|
events: source.events ?? null,
|
|
32548
|
+
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
32549
|
+
wholeSeriesOffering: source.wholeSeriesOffering ?? null,
|
|
32487
32550
|
maxTickets: source.maxTickets ?? void 0,
|
|
32488
32551
|
showVenue: source.showVenue,
|
|
32489
32552
|
showCapacity: source.showCapacity,
|
|
32553
|
+
showSessions: source.showSessions,
|
|
32554
|
+
showPrice: source.showPrice,
|
|
32490
32555
|
successMessage: source.successMessage,
|
|
32491
32556
|
waitlistMessage: source.waitlistMessage,
|
|
32557
|
+
membershipMessage: source.membershipMessage,
|
|
32492
32558
|
buttonVariant: source.buttonVariant,
|
|
32493
32559
|
overlayEnabled: source.overlayEnabled,
|
|
32494
32560
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
@@ -32523,6 +32589,159 @@ function buildEventRegistrationInteractiveIslandProps(props) {
|
|
|
32523
32589
|
source: props
|
|
32524
32590
|
});
|
|
32525
32591
|
}
|
|
32592
|
+
//#endregion
|
|
32593
|
+
//#region ../blocks/src/system/blocks/courses/shared/pricing.ts
|
|
32594
|
+
function isSaleWindowOpen(option, now) {
|
|
32595
|
+
if (!option.isActive) return false;
|
|
32596
|
+
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
32597
|
+
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
32598
|
+
return true;
|
|
32599
|
+
}
|
|
32600
|
+
function toExactOrFreeDisplay(amount, currency) {
|
|
32601
|
+
if (amount <= 0) return {
|
|
32602
|
+
kind: "free",
|
|
32603
|
+
currency
|
|
32604
|
+
};
|
|
32605
|
+
return {
|
|
32606
|
+
kind: "exact",
|
|
32607
|
+
amount,
|
|
32608
|
+
currency
|
|
32609
|
+
};
|
|
32610
|
+
}
|
|
32611
|
+
function getSelectableCoursePricingOptionsForNow(course, now) {
|
|
32612
|
+
if (course.pricing.pricingStrategy !== "tiered") return [];
|
|
32613
|
+
return [...course.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
32614
|
+
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
32615
|
+
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
32616
|
+
return left.name.localeCompare(right.name);
|
|
32617
|
+
});
|
|
32618
|
+
}
|
|
32619
|
+
function resolveCoursePricingState(course, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
32620
|
+
const selectedSlidingAmount = typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null;
|
|
32621
|
+
const effectiveNowInput = typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? selectedSlidingAmountOrNowInput : nowInput;
|
|
32622
|
+
const currency = course.pricing.currency;
|
|
32623
|
+
switch (course.pricing.pricingStrategy) {
|
|
32624
|
+
case "free": return {
|
|
32625
|
+
currency,
|
|
32626
|
+
display: {
|
|
32627
|
+
kind: "free",
|
|
32628
|
+
currency
|
|
32629
|
+
},
|
|
32630
|
+
selectableOptions: [],
|
|
32631
|
+
requiresSelection: false,
|
|
32632
|
+
selectedOption: null,
|
|
32633
|
+
slidingScale: null,
|
|
32634
|
+
selectedSlidingAmount: null,
|
|
32635
|
+
selectedPriceAmount: 0,
|
|
32636
|
+
selectedRequiresPayment: false,
|
|
32637
|
+
hasPaidSelection: false,
|
|
32638
|
+
hasFreeSelection: true
|
|
32639
|
+
};
|
|
32640
|
+
case "single": {
|
|
32641
|
+
const amount = course.pricing.singlePriceAmount ?? 0;
|
|
32642
|
+
return {
|
|
32643
|
+
currency,
|
|
32644
|
+
display: toExactOrFreeDisplay(amount, currency),
|
|
32645
|
+
selectableOptions: [],
|
|
32646
|
+
requiresSelection: false,
|
|
32647
|
+
selectedOption: null,
|
|
32648
|
+
slidingScale: null,
|
|
32649
|
+
selectedSlidingAmount: null,
|
|
32650
|
+
selectedPriceAmount: amount,
|
|
32651
|
+
selectedRequiresPayment: amount > 0,
|
|
32652
|
+
hasPaidSelection: amount > 0,
|
|
32653
|
+
hasFreeSelection: amount <= 0
|
|
32654
|
+
};
|
|
32655
|
+
}
|
|
32656
|
+
case "tiered": {
|
|
32657
|
+
const selectableOptions = getSelectableCoursePricingOptionsForNow(course, resolvePlanningDateInput(effectiveNowInput));
|
|
32658
|
+
const selectedOption = (selectedPricingOptionId ? selectableOptions.find((option) => option.id === selectedPricingOptionId) : null) ?? (selectableOptions.length === 1 ? selectableOptions[0] ?? null : null);
|
|
32659
|
+
const lowestAmount = selectableOptions.reduce((lowest, option) => {
|
|
32660
|
+
if (lowest === null || option.priceAmount < lowest) return option.priceAmount;
|
|
32661
|
+
return lowest;
|
|
32662
|
+
}, null);
|
|
32663
|
+
return {
|
|
32664
|
+
currency,
|
|
32665
|
+
display: lowestAmount === null ? {
|
|
32666
|
+
kind: "unavailable",
|
|
32667
|
+
currency
|
|
32668
|
+
} : selectableOptions.length > 1 && lowestAmount > 0 ? {
|
|
32669
|
+
kind: "from",
|
|
32670
|
+
amount: lowestAmount,
|
|
32671
|
+
currency
|
|
32672
|
+
} : toExactOrFreeDisplay(lowestAmount, currency),
|
|
32673
|
+
selectableOptions,
|
|
32674
|
+
requiresSelection: selectableOptions.length > 1,
|
|
32675
|
+
selectedOption,
|
|
32676
|
+
slidingScale: null,
|
|
32677
|
+
selectedSlidingAmount: null,
|
|
32678
|
+
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
32679
|
+
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
32680
|
+
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
32681
|
+
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
32682
|
+
};
|
|
32683
|
+
}
|
|
32684
|
+
case "sliding_scale": {
|
|
32685
|
+
const minAmount = course.pricing.slidingMinAmount ?? null;
|
|
32686
|
+
const maxAmount = course.pricing.slidingMaxAmount ?? null;
|
|
32687
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return {
|
|
32688
|
+
currency,
|
|
32689
|
+
display: {
|
|
32690
|
+
kind: "unavailable",
|
|
32691
|
+
currency
|
|
32692
|
+
},
|
|
32693
|
+
selectableOptions: [],
|
|
32694
|
+
requiresSelection: true,
|
|
32695
|
+
selectedOption: null,
|
|
32696
|
+
slidingScale: null,
|
|
32697
|
+
selectedSlidingAmount: null,
|
|
32698
|
+
selectedPriceAmount: null,
|
|
32699
|
+
selectedRequiresPayment: false,
|
|
32700
|
+
hasPaidSelection: false,
|
|
32701
|
+
hasFreeSelection: false
|
|
32702
|
+
};
|
|
32703
|
+
const normalizedSelectedAmount = typeof selectedSlidingAmount === "number" && Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
32704
|
+
return {
|
|
32705
|
+
currency,
|
|
32706
|
+
display: {
|
|
32707
|
+
kind: "range",
|
|
32708
|
+
minAmount,
|
|
32709
|
+
maxAmount,
|
|
32710
|
+
currency
|
|
32711
|
+
},
|
|
32712
|
+
selectableOptions: [],
|
|
32713
|
+
requiresSelection: normalizedSelectedAmount === null,
|
|
32714
|
+
selectedOption: null,
|
|
32715
|
+
slidingScale: {
|
|
32716
|
+
minAmount,
|
|
32717
|
+
maxAmount,
|
|
32718
|
+
suggestedAmount: course.pricing.slidingSuggestedAmount ?? null
|
|
32719
|
+
},
|
|
32720
|
+
selectedSlidingAmount: normalizedSelectedAmount,
|
|
32721
|
+
selectedPriceAmount: normalizedSelectedAmount,
|
|
32722
|
+
selectedRequiresPayment: (normalizedSelectedAmount ?? 0) > 0,
|
|
32723
|
+
hasPaidSelection: maxAmount > 0,
|
|
32724
|
+
hasFreeSelection: minAmount === 0
|
|
32725
|
+
};
|
|
32726
|
+
}
|
|
32727
|
+
}
|
|
32728
|
+
}
|
|
32729
|
+
function formatCoursePriceDisplay(display, locale) {
|
|
32730
|
+
return formatBookingPriceDisplay(display, {
|
|
32731
|
+
decimals: "exact",
|
|
32732
|
+
locale
|
|
32733
|
+
});
|
|
32734
|
+
}
|
|
32735
|
+
function formatCoursePriceAmount(amount, currency, locale) {
|
|
32736
|
+
return formatCoursePriceDisplay(amount > 0 ? {
|
|
32737
|
+
kind: "exact",
|
|
32738
|
+
amount,
|
|
32739
|
+
currency
|
|
32740
|
+
} : {
|
|
32741
|
+
kind: "free",
|
|
32742
|
+
currency
|
|
32743
|
+
}, locale);
|
|
32744
|
+
}
|
|
32526
32745
|
const eventRegistrationBlockDefinition = {
|
|
32527
32746
|
manifest: createBlockManifest({
|
|
32528
32747
|
id: "block.event-registration",
|
|
@@ -32618,6 +32837,24 @@ const eventRegistrationBlockDefinition = {
|
|
|
32618
32837
|
defaultValue: true,
|
|
32619
32838
|
ui: { intent: "display" }
|
|
32620
32839
|
},
|
|
32840
|
+
{
|
|
32841
|
+
id: "showSessions",
|
|
32842
|
+
type: "boolean",
|
|
32843
|
+
label: "Show complete schedule",
|
|
32844
|
+
description: "Display every session for whole-series registrations",
|
|
32845
|
+
required: false,
|
|
32846
|
+
defaultValue: true,
|
|
32847
|
+
ui: { intent: "display" }
|
|
32848
|
+
},
|
|
32849
|
+
{
|
|
32850
|
+
id: "showPrice",
|
|
32851
|
+
type: "boolean",
|
|
32852
|
+
label: "Show price",
|
|
32853
|
+
description: "Display the whole-series price",
|
|
32854
|
+
required: false,
|
|
32855
|
+
defaultValue: true,
|
|
32856
|
+
ui: { intent: "display" }
|
|
32857
|
+
},
|
|
32621
32858
|
{
|
|
32622
32859
|
id: "successMessage",
|
|
32623
32860
|
type: "text",
|
|
@@ -32628,6 +32865,26 @@ const eventRegistrationBlockDefinition = {
|
|
|
32628
32865
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
32629
32866
|
maxLength: 500
|
|
32630
32867
|
},
|
|
32868
|
+
{
|
|
32869
|
+
id: "waitlistMessage",
|
|
32870
|
+
type: "text",
|
|
32871
|
+
label: "Waitlist message",
|
|
32872
|
+
description: "Message shown after joining a whole-series waitlist",
|
|
32873
|
+
required: false,
|
|
32874
|
+
multiline: true,
|
|
32875
|
+
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
32876
|
+
maxLength: 500
|
|
32877
|
+
},
|
|
32878
|
+
{
|
|
32879
|
+
id: "membershipMessage",
|
|
32880
|
+
type: "text",
|
|
32881
|
+
label: "Membership registration message",
|
|
32882
|
+
description: "Message shown when a whole-series place is covered by membership",
|
|
32883
|
+
required: false,
|
|
32884
|
+
multiline: true,
|
|
32885
|
+
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
32886
|
+
maxLength: 500
|
|
32887
|
+
},
|
|
32631
32888
|
{
|
|
32632
32889
|
id: "buttonText",
|
|
32633
32890
|
type: "text",
|
|
@@ -32659,8 +32916,11 @@ const eventRegistrationBlockDefinition = {
|
|
|
32659
32916
|
} },
|
|
32660
32917
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
32661
32918
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
32919
|
+
showSessions: { $bind: { from: "content.showSessions" } },
|
|
32920
|
+
showPrice: { $bind: { from: "content.showPrice" } },
|
|
32662
32921
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
32663
32922
|
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
32923
|
+
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
32664
32924
|
buttonText: { $bind: {
|
|
32665
32925
|
from: "content.buttonText",
|
|
32666
32926
|
fallback: "Complete Registration"
|
|
@@ -32674,6 +32934,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
32674
32934
|
fallback: false
|
|
32675
32935
|
} },
|
|
32676
32936
|
events: { $bind: { from: "data.events" } },
|
|
32937
|
+
wholeSeriesOffering: { $bind: { from: "data.wholeSeriesOffering.offering" } },
|
|
32677
32938
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
32678
32939
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
32679
32940
|
stage: { $bind: {
|
|
@@ -32687,9 +32948,10 @@ const eventRegistrationBlockDefinition = {
|
|
|
32687
32948
|
runtime: eventRegistrationBlockRuntime,
|
|
32688
32949
|
dataSchemas: {
|
|
32689
32950
|
events: publicEventsArraySchema.optional(),
|
|
32951
|
+
wholeSeriesOffering: z$1.object({ offering: publicCourseSchema }).optional(),
|
|
32690
32952
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
32691
32953
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
32692
|
-
occurrenceContext: occurrenceContextSchema
|
|
32954
|
+
occurrenceContext: occurrenceContextSchema.optional()
|
|
32693
32955
|
},
|
|
32694
32956
|
dataLoaders: {
|
|
32695
32957
|
events: {
|
|
@@ -32702,11 +32964,23 @@ const eventRegistrationBlockDefinition = {
|
|
|
32702
32964
|
fallback: "published"
|
|
32703
32965
|
} },
|
|
32704
32966
|
readProfile: "registration",
|
|
32705
|
-
seriesId: { $bind: { from: "$root.
|
|
32967
|
+
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
32706
32968
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
32707
32969
|
},
|
|
32708
32970
|
mode: "server"
|
|
32709
32971
|
},
|
|
32972
|
+
wholeSeriesOffering: {
|
|
32973
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
32974
|
+
params: {
|
|
32975
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
32976
|
+
eventSeriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
32977
|
+
stage: { $bind: {
|
|
32978
|
+
from: "$root.previewStage",
|
|
32979
|
+
fallback: "published"
|
|
32980
|
+
} }
|
|
32981
|
+
},
|
|
32982
|
+
mode: "server"
|
|
32983
|
+
},
|
|
32710
32984
|
sitePasses: {
|
|
32711
32985
|
endpoint: "listPublicPasses",
|
|
32712
32986
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -32720,159 +32994,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
32720
32994
|
}
|
|
32721
32995
|
};
|
|
32722
32996
|
//#endregion
|
|
32723
|
-
//#region ../blocks/src/system/blocks/courses/shared/pricing.ts
|
|
32724
|
-
function isSaleWindowOpen(option, now) {
|
|
32725
|
-
if (!option.isActive) return false;
|
|
32726
|
-
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
32727
|
-
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
32728
|
-
return true;
|
|
32729
|
-
}
|
|
32730
|
-
function toExactOrFreeDisplay(amount, currency) {
|
|
32731
|
-
if (amount <= 0) return {
|
|
32732
|
-
kind: "free",
|
|
32733
|
-
currency
|
|
32734
|
-
};
|
|
32735
|
-
return {
|
|
32736
|
-
kind: "exact",
|
|
32737
|
-
amount,
|
|
32738
|
-
currency
|
|
32739
|
-
};
|
|
32740
|
-
}
|
|
32741
|
-
function getSelectableCoursePricingOptionsForNow(course, now) {
|
|
32742
|
-
if (course.pricing.pricingStrategy !== "tiered") return [];
|
|
32743
|
-
return [...course.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
32744
|
-
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
32745
|
-
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
32746
|
-
return left.name.localeCompare(right.name);
|
|
32747
|
-
});
|
|
32748
|
-
}
|
|
32749
|
-
function resolveCoursePricingState(course, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
32750
|
-
const selectedSlidingAmount = typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null;
|
|
32751
|
-
const effectiveNowInput = typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? selectedSlidingAmountOrNowInput : nowInput;
|
|
32752
|
-
const currency = course.pricing.currency;
|
|
32753
|
-
switch (course.pricing.pricingStrategy) {
|
|
32754
|
-
case "free": return {
|
|
32755
|
-
currency,
|
|
32756
|
-
display: {
|
|
32757
|
-
kind: "free",
|
|
32758
|
-
currency
|
|
32759
|
-
},
|
|
32760
|
-
selectableOptions: [],
|
|
32761
|
-
requiresSelection: false,
|
|
32762
|
-
selectedOption: null,
|
|
32763
|
-
slidingScale: null,
|
|
32764
|
-
selectedSlidingAmount: null,
|
|
32765
|
-
selectedPriceAmount: 0,
|
|
32766
|
-
selectedRequiresPayment: false,
|
|
32767
|
-
hasPaidSelection: false,
|
|
32768
|
-
hasFreeSelection: true
|
|
32769
|
-
};
|
|
32770
|
-
case "single": {
|
|
32771
|
-
const amount = course.pricing.singlePriceAmount ?? 0;
|
|
32772
|
-
return {
|
|
32773
|
-
currency,
|
|
32774
|
-
display: toExactOrFreeDisplay(amount, currency),
|
|
32775
|
-
selectableOptions: [],
|
|
32776
|
-
requiresSelection: false,
|
|
32777
|
-
selectedOption: null,
|
|
32778
|
-
slidingScale: null,
|
|
32779
|
-
selectedSlidingAmount: null,
|
|
32780
|
-
selectedPriceAmount: amount,
|
|
32781
|
-
selectedRequiresPayment: amount > 0,
|
|
32782
|
-
hasPaidSelection: amount > 0,
|
|
32783
|
-
hasFreeSelection: amount <= 0
|
|
32784
|
-
};
|
|
32785
|
-
}
|
|
32786
|
-
case "tiered": {
|
|
32787
|
-
const selectableOptions = getSelectableCoursePricingOptionsForNow(course, resolvePlanningDateInput(effectiveNowInput));
|
|
32788
|
-
const selectedOption = (selectedPricingOptionId ? selectableOptions.find((option) => option.id === selectedPricingOptionId) : null) ?? (selectableOptions.length === 1 ? selectableOptions[0] ?? null : null);
|
|
32789
|
-
const lowestAmount = selectableOptions.reduce((lowest, option) => {
|
|
32790
|
-
if (lowest === null || option.priceAmount < lowest) return option.priceAmount;
|
|
32791
|
-
return lowest;
|
|
32792
|
-
}, null);
|
|
32793
|
-
return {
|
|
32794
|
-
currency,
|
|
32795
|
-
display: lowestAmount === null ? {
|
|
32796
|
-
kind: "unavailable",
|
|
32797
|
-
currency
|
|
32798
|
-
} : selectableOptions.length > 1 && lowestAmount > 0 ? {
|
|
32799
|
-
kind: "from",
|
|
32800
|
-
amount: lowestAmount,
|
|
32801
|
-
currency
|
|
32802
|
-
} : toExactOrFreeDisplay(lowestAmount, currency),
|
|
32803
|
-
selectableOptions,
|
|
32804
|
-
requiresSelection: selectableOptions.length > 1,
|
|
32805
|
-
selectedOption,
|
|
32806
|
-
slidingScale: null,
|
|
32807
|
-
selectedSlidingAmount: null,
|
|
32808
|
-
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
32809
|
-
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
32810
|
-
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
32811
|
-
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
32812
|
-
};
|
|
32813
|
-
}
|
|
32814
|
-
case "sliding_scale": {
|
|
32815
|
-
const minAmount = course.pricing.slidingMinAmount ?? null;
|
|
32816
|
-
const maxAmount = course.pricing.slidingMaxAmount ?? null;
|
|
32817
|
-
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return {
|
|
32818
|
-
currency,
|
|
32819
|
-
display: {
|
|
32820
|
-
kind: "unavailable",
|
|
32821
|
-
currency
|
|
32822
|
-
},
|
|
32823
|
-
selectableOptions: [],
|
|
32824
|
-
requiresSelection: true,
|
|
32825
|
-
selectedOption: null,
|
|
32826
|
-
slidingScale: null,
|
|
32827
|
-
selectedSlidingAmount: null,
|
|
32828
|
-
selectedPriceAmount: null,
|
|
32829
|
-
selectedRequiresPayment: false,
|
|
32830
|
-
hasPaidSelection: false,
|
|
32831
|
-
hasFreeSelection: false
|
|
32832
|
-
};
|
|
32833
|
-
const normalizedSelectedAmount = typeof selectedSlidingAmount === "number" && Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
32834
|
-
return {
|
|
32835
|
-
currency,
|
|
32836
|
-
display: {
|
|
32837
|
-
kind: "range",
|
|
32838
|
-
minAmount,
|
|
32839
|
-
maxAmount,
|
|
32840
|
-
currency
|
|
32841
|
-
},
|
|
32842
|
-
selectableOptions: [],
|
|
32843
|
-
requiresSelection: normalizedSelectedAmount === null,
|
|
32844
|
-
selectedOption: null,
|
|
32845
|
-
slidingScale: {
|
|
32846
|
-
minAmount,
|
|
32847
|
-
maxAmount,
|
|
32848
|
-
suggestedAmount: course.pricing.slidingSuggestedAmount ?? null
|
|
32849
|
-
},
|
|
32850
|
-
selectedSlidingAmount: normalizedSelectedAmount,
|
|
32851
|
-
selectedPriceAmount: normalizedSelectedAmount,
|
|
32852
|
-
selectedRequiresPayment: (normalizedSelectedAmount ?? 0) > 0,
|
|
32853
|
-
hasPaidSelection: maxAmount > 0,
|
|
32854
|
-
hasFreeSelection: minAmount === 0
|
|
32855
|
-
};
|
|
32856
|
-
}
|
|
32857
|
-
}
|
|
32858
|
-
}
|
|
32859
|
-
function formatCoursePriceDisplay(display, locale) {
|
|
32860
|
-
return formatBookingPriceDisplay(display, {
|
|
32861
|
-
decimals: "exact",
|
|
32862
|
-
locale
|
|
32863
|
-
});
|
|
32864
|
-
}
|
|
32865
|
-
function formatCoursePriceAmount(amount, currency, locale) {
|
|
32866
|
-
return formatCoursePriceDisplay(amount > 0 ? {
|
|
32867
|
-
kind: "exact",
|
|
32868
|
-
amount,
|
|
32869
|
-
currency
|
|
32870
|
-
} : {
|
|
32871
|
-
kind: "free",
|
|
32872
|
-
currency
|
|
32873
|
-
}, locale);
|
|
32874
|
-
}
|
|
32875
|
-
//#endregion
|
|
32876
32997
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
32877
32998
|
const courseRegistrationSourceSchema = z$1.object({
|
|
32878
32999
|
siteId: z$1.string().optional(),
|
|
@@ -33307,15 +33428,6 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
33307
33428
|
})], { gap: "lg" })
|
|
33308
33429
|
})]
|
|
33309
33430
|
});
|
|
33310
|
-
const occurrenceContextSchema = z$1.object({
|
|
33311
|
-
id: z$1.string(),
|
|
33312
|
-
seriesId: z$1.string(),
|
|
33313
|
-
startsAt: z$1.string(),
|
|
33314
|
-
endsAt: z$1.string(),
|
|
33315
|
-
timeZone: z$1.string(),
|
|
33316
|
-
capacityOverride: z$1.number().nullable().optional(),
|
|
33317
|
-
overrides: z$1.record(z$1.string(), z$1.unknown()).nullable().optional()
|
|
33318
|
-
}).nullable();
|
|
33319
33431
|
const eventAutoApplyDiscountPreviewBaseSchema = z$1.object({
|
|
33320
33432
|
id: z$1.string(),
|
|
33321
33433
|
publicLabel: z$1.string(),
|
|
@@ -33350,8 +33462,9 @@ const eventDetailsBlockDefinition = {
|
|
|
33350
33462
|
from: "$root.previewStage",
|
|
33351
33463
|
fallback: "published"
|
|
33352
33464
|
} },
|
|
33353
|
-
limit: "
|
|
33354
|
-
|
|
33465
|
+
limit: "100",
|
|
33466
|
+
readProfile: "details",
|
|
33467
|
+
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
33355
33468
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
33356
33469
|
},
|
|
33357
33470
|
mode: "server"
|
|
@@ -42141,9 +42254,6 @@ function parseSignedNewsletterDestinationRef(value) {
|
|
|
42141
42254
|
const trimmed = parseTrimmedString$1(value);
|
|
42142
42255
|
return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
|
|
42143
42256
|
}
|
|
42144
|
-
function parseNewsletterSignupDestinationProvider(value) {
|
|
42145
|
-
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
42146
|
-
}
|
|
42147
42257
|
function buildNewsletterSignupBlockRef(blockId) {
|
|
42148
42258
|
const parsed = parseNewsletterSignupBlockId(blockId);
|
|
42149
42259
|
return parsed ? {
|
|
@@ -42310,19 +42420,9 @@ const newsletterFieldSchema = z$1.object({
|
|
|
42310
42420
|
});
|
|
42311
42421
|
const newsletterSignupBlockIdSchema = z$1.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
42312
42422
|
const signedNewsletterDestinationRefSchema = z$1.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
42313
|
-
const
|
|
42314
|
-
tag: z$1.literal("block_ref"),
|
|
42315
|
-
blockId: newsletterSignupBlockIdSchema
|
|
42316
|
-
}), z$1.object({
|
|
42317
|
-
tag: z$1.literal("signed_destination_ref"),
|
|
42318
|
-
token: signedNewsletterDestinationRefSchema
|
|
42319
|
-
})]);
|
|
42320
|
-
const newsletterSourceSchema = z$1.object({
|
|
42321
|
-
blockId: z$1.string().nullable().optional(),
|
|
42423
|
+
const newsletterSourceCommonSchema = z$1.object({
|
|
42322
42424
|
siteId: z$1.string().optional(),
|
|
42323
42425
|
apiBaseUrl: z$1.string().optional(),
|
|
42324
|
-
listId: z$1.string().nullable().optional(),
|
|
42325
|
-
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
42326
42426
|
preset: newsletterPresetSchema.optional(),
|
|
42327
42427
|
includePhone: z$1.boolean().optional(),
|
|
42328
42428
|
buttonLabel: z$1.string().nullable().optional(),
|
|
@@ -42333,6 +42433,25 @@ const newsletterSourceSchema = z$1.object({
|
|
|
42333
42433
|
spamProtectionEnabled: z$1.boolean().optional(),
|
|
42334
42434
|
className: z$1.string().nullable().optional()
|
|
42335
42435
|
});
|
|
42436
|
+
const newsletterSourceSchema = z$1.discriminatedUnion("source", [
|
|
42437
|
+
newsletterSourceCommonSchema.extend({
|
|
42438
|
+
source: z$1.literal("block"),
|
|
42439
|
+
blockId: z$1.string().nullable().optional(),
|
|
42440
|
+
listId: z$1.string().nullable().optional(),
|
|
42441
|
+
destinationProvider: newsletterDestinationProviderSchema.nullable().optional()
|
|
42442
|
+
}),
|
|
42443
|
+
newsletterSourceCommonSchema.extend({
|
|
42444
|
+
source: z$1.literal("signed-footer"),
|
|
42445
|
+
destinationRef: z$1.object({
|
|
42446
|
+
tag: z$1.literal("signed_destination_ref"),
|
|
42447
|
+
token: signedNewsletterDestinationRefSchema
|
|
42448
|
+
})
|
|
42449
|
+
}),
|
|
42450
|
+
newsletterSourceCommonSchema.extend({
|
|
42451
|
+
source: z$1.literal("legacy-direct-list"),
|
|
42452
|
+
listId: z$1.string().nullable()
|
|
42453
|
+
})
|
|
42454
|
+
]);
|
|
42336
42455
|
const newsletterDisplaySchema = z$1.object({
|
|
42337
42456
|
kind: z$1.literal("newsletter-form"),
|
|
42338
42457
|
className: z$1.string().nullable(),
|
|
@@ -42343,8 +42462,26 @@ const newsletterDisplaySchema = z$1.object({
|
|
|
42343
42462
|
fields: z$1.array(newsletterFieldSchema)
|
|
42344
42463
|
});
|
|
42345
42464
|
const newsletterHydrationSchema = z$1.object({
|
|
42346
|
-
|
|
42347
|
-
|
|
42465
|
+
target: z$1.discriminatedUnion("tag", [
|
|
42466
|
+
z$1.object({
|
|
42467
|
+
tag: z$1.literal("block-source"),
|
|
42468
|
+
destinationRef: z$1.object({
|
|
42469
|
+
tag: z$1.literal("block_ref"),
|
|
42470
|
+
blockId: newsletterSignupBlockIdSchema
|
|
42471
|
+
}).nullable()
|
|
42472
|
+
}),
|
|
42473
|
+
z$1.object({
|
|
42474
|
+
tag: z$1.literal("signed-footer-source"),
|
|
42475
|
+
destinationRef: z$1.object({
|
|
42476
|
+
tag: z$1.literal("signed_destination_ref"),
|
|
42477
|
+
token: signedNewsletterDestinationRefSchema
|
|
42478
|
+
})
|
|
42479
|
+
}),
|
|
42480
|
+
z$1.object({
|
|
42481
|
+
tag: z$1.literal("legacy-direct-list"),
|
|
42482
|
+
listId: z$1.string().nullable()
|
|
42483
|
+
})
|
|
42484
|
+
]),
|
|
42348
42485
|
preset: newsletterPresetSchema,
|
|
42349
42486
|
includePhone: z$1.boolean(),
|
|
42350
42487
|
tags: z$1.string().nullable().optional(),
|
|
@@ -42378,20 +42515,43 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
42378
42515
|
render: createZodCodec(newsletterRenderSchema)
|
|
42379
42516
|
},
|
|
42380
42517
|
buildRender: (source) => {
|
|
42381
|
-
const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
|
|
42518
|
+
const runtimeSource = source.source === "block" ? deriveNewsletterSignupRuntimeSource(source) : null;
|
|
42382
42519
|
return {
|
|
42383
42520
|
display: buildNewsletterDisplay(source),
|
|
42384
42521
|
hydration: {
|
|
42385
|
-
|
|
42386
|
-
listId: runtimeSource.listId,
|
|
42522
|
+
target: projectNewsletterFormHydrationTarget(source),
|
|
42387
42523
|
preset: source.preset ?? "emailOnly",
|
|
42388
42524
|
includePhone: source.includePhone ?? false,
|
|
42389
|
-
tags: runtimeSource.tags,
|
|
42525
|
+
tags: runtimeSource ? runtimeSource.tags : source.tags,
|
|
42390
42526
|
spamProtectionEnabled: source.spamProtectionEnabled
|
|
42391
42527
|
}
|
|
42392
42528
|
};
|
|
42393
42529
|
}
|
|
42394
42530
|
});
|
|
42531
|
+
function projectNewsletterFormHydrationTarget(source) {
|
|
42532
|
+
switch (source.source) {
|
|
42533
|
+
case "block": {
|
|
42534
|
+
const destinationRef = buildNewsletterSignupBlockRef(source.blockId);
|
|
42535
|
+
if (destinationRef?.tag === "block_ref") return {
|
|
42536
|
+
tag: "block-source",
|
|
42537
|
+
destinationRef
|
|
42538
|
+
};
|
|
42539
|
+
return {
|
|
42540
|
+
tag: "legacy-direct-list",
|
|
42541
|
+
listId: source.listId ?? null
|
|
42542
|
+
};
|
|
42543
|
+
}
|
|
42544
|
+
case "signed-footer": return {
|
|
42545
|
+
tag: "signed-footer-source",
|
|
42546
|
+
destinationRef: source.destinationRef
|
|
42547
|
+
};
|
|
42548
|
+
case "legacy-direct-list": return {
|
|
42549
|
+
tag: "legacy-direct-list",
|
|
42550
|
+
listId: source.listId
|
|
42551
|
+
};
|
|
42552
|
+
default: return assertNever$24(source);
|
|
42553
|
+
}
|
|
42554
|
+
}
|
|
42395
42555
|
function buildNewsletterFormInteractiveIslandProps(props) {
|
|
42396
42556
|
return buildInteractiveIslandProps({
|
|
42397
42557
|
runtime: newsletterFormBlockRuntime,
|
|
@@ -46790,6 +46950,33 @@ function uniqByOccurrenceId(events) {
|
|
|
46790
46950
|
}
|
|
46791
46951
|
return out;
|
|
46792
46952
|
}
|
|
46953
|
+
function selectFromOccurrenceContext(events, occurrenceContext) {
|
|
46954
|
+
if (!occurrenceContext) return null;
|
|
46955
|
+
const byId = events.find((event) => event.occurrenceId === occurrenceContext.id || event.id === occurrenceContext.id);
|
|
46956
|
+
if (byId) return byId;
|
|
46957
|
+
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
46958
|
+
startsAt: occurrenceContext.startsAt,
|
|
46959
|
+
timeZone: occurrenceContext.timeZone
|
|
46960
|
+
}));
|
|
46961
|
+
return events.find((event) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
46962
|
+
startsAt: event.startsAt,
|
|
46963
|
+
timeZone: event.timeZone
|
|
46964
|
+
})) === contextDate) ?? null;
|
|
46965
|
+
}
|
|
46966
|
+
function selectNextUpcoming(events, nowIso) {
|
|
46967
|
+
return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
|
|
46968
|
+
}
|
|
46969
|
+
function selectCompletedWholeSeries(events) {
|
|
46970
|
+
if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
|
|
46971
|
+
return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
|
|
46972
|
+
}
|
|
46973
|
+
function selectRelatedDates(input) {
|
|
46974
|
+
if (!input.seriesId) return [];
|
|
46975
|
+
const isWholeSeries = input.selected?.bookingScope === "whole_series";
|
|
46976
|
+
const selectedOccurrenceId = input.selected ? input.selected.occurrenceId || input.selected.id : null;
|
|
46977
|
+
const dates = input.events.filter((event) => event.seriesId === input.seriesId).filter((event) => isWholeSeries || isFutureOrNow(event.startsAt, input.nowIso)).filter((event) => !selectedOccurrenceId || (event.occurrenceId || event.id) !== selectedOccurrenceId).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
|
|
46978
|
+
return isWholeSeries ? dates : dates.slice(0, input.limit);
|
|
46979
|
+
}
|
|
46793
46980
|
function selectEventDetails(args) {
|
|
46794
46981
|
const all = uniqByOccurrenceId(resolveEventRegistrationScopedEvents((args.events ?? []).filter(Boolean), {
|
|
46795
46982
|
occurrenceContext: args.occurrenceContext,
|
|
@@ -46797,37 +46984,22 @@ function selectEventDetails(args) {
|
|
|
46797
46984
|
}));
|
|
46798
46985
|
const occurrenceContext = args.occurrenceContext ?? null;
|
|
46799
46986
|
const otherLimit = parseLimit$1(args.otherDatesLimit, 5);
|
|
46800
|
-
const selectedFromContext = (
|
|
46801
|
-
|
|
46802
|
-
|
|
46803
|
-
|
|
46804
|
-
|
|
46805
|
-
startsAt: occurrenceContext.startsAt,
|
|
46806
|
-
timeZone: occurrenceContext.timeZone
|
|
46807
|
-
}));
|
|
46808
|
-
return all.find((e) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
46809
|
-
startsAt: e.startsAt,
|
|
46810
|
-
timeZone: e.timeZone
|
|
46811
|
-
})) === ctxDate) ?? null;
|
|
46812
|
-
})();
|
|
46813
|
-
const nextUpcoming = (() => {
|
|
46814
|
-
const upcoming = all.filter((e) => isFutureOrNow(e.startsAt, args.nowIso));
|
|
46815
|
-
upcoming.sort((a, b) => Date.parse(a.startsAt) - Date.parse(b.startsAt));
|
|
46816
|
-
return upcoming[0] ?? null;
|
|
46817
|
-
})();
|
|
46818
|
-
const mode = selectedFromContext ? "selected" : "next";
|
|
46819
|
-
const selected = selectedFromContext ?? nextUpcoming;
|
|
46987
|
+
const selectedFromContext = selectFromOccurrenceContext(all, occurrenceContext);
|
|
46988
|
+
const nextUpcoming = selectNextUpcoming(all, args.nowIso);
|
|
46989
|
+
const completedWholeSeries = selectCompletedWholeSeries(all);
|
|
46990
|
+
const selected = selectedFromContext ?? nextUpcoming ?? completedWholeSeries;
|
|
46991
|
+
const mode = selectedFromContext ? "selected" : nextUpcoming ? "next" : completedWholeSeries ? "completed" : "next";
|
|
46820
46992
|
const timeZone = toBookingTimeZone(selected?.timeZone ?? all[0]?.timeZone ?? null);
|
|
46821
|
-
const seriesId = occurrenceContext?.seriesId ?? selected?.seriesId ?? all[0]?.seriesId ?? null;
|
|
46822
|
-
const selectedOccurrenceId = selected?.occurrenceId ?? null;
|
|
46823
46993
|
return {
|
|
46824
46994
|
mode,
|
|
46825
46995
|
selected,
|
|
46826
|
-
otherDates:
|
|
46827
|
-
|
|
46828
|
-
|
|
46829
|
-
|
|
46830
|
-
|
|
46996
|
+
otherDates: selectRelatedDates({
|
|
46997
|
+
events: all,
|
|
46998
|
+
seriesId: occurrenceContext?.seriesId ?? selected?.seriesId ?? all[0]?.seriesId ?? null,
|
|
46999
|
+
selected,
|
|
47000
|
+
nowIso: args.nowIso,
|
|
47001
|
+
limit: otherLimit
|
|
47002
|
+
}),
|
|
46831
47003
|
timeZone
|
|
46832
47004
|
};
|
|
46833
47005
|
}
|
|
@@ -46949,7 +47121,7 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing }) {
|
|
|
46949
47121
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
46950
47122
|
/* @__PURE__ */ jsx("div", {
|
|
46951
47123
|
className: "rb-label rb-mb-2",
|
|
46952
|
-
children: selection.mode === "next" ? "Next date" : "Date"
|
|
47124
|
+
children: selected.bookingScope === "whole_series" ? selection.mode === "next" ? "Next session" : "Selected session" : selection.mode === "next" ? "Next date" : "Date"
|
|
46953
47125
|
}),
|
|
46954
47126
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }),
|
|
46955
47127
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -46987,18 +47159,27 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing }) {
|
|
|
46987
47159
|
}) : null] }, member.id))
|
|
46988
47160
|
})]
|
|
46989
47161
|
}) : null,
|
|
46990
|
-
pricing
|
|
47162
|
+
pricing,
|
|
47163
|
+
selected.bookingScope === "whole_series" ? /* @__PURE__ */ jsxs("div", {
|
|
47164
|
+
className: "rb-mt-6",
|
|
47165
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
47166
|
+
className: "rb-label rb-mb-2",
|
|
47167
|
+
children: "Registration"
|
|
47168
|
+
}), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: selected.wholeSeries?.enrollmentOpen ? "Open" : "Closed" }) })]
|
|
47169
|
+
}) : null
|
|
46991
47170
|
]
|
|
46992
47171
|
});
|
|
46993
47172
|
}
|
|
46994
47173
|
function OtherEventDates({ selection }) {
|
|
46995
|
-
|
|
47174
|
+
const isWholeSeries = selection.selected?.bookingScope === "whole_series";
|
|
47175
|
+
const dates = isWholeSeries && selection.selected ? [selection.selected, ...selection.otherDates].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt)) : selection.otherDates;
|
|
47176
|
+
if (dates.length === 0) return null;
|
|
46996
47177
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
46997
47178
|
className: "rb-label",
|
|
46998
|
-
children: "Other dates"
|
|
47179
|
+
children: isWholeSeries ? "Session schedule" : "Other dates"
|
|
46999
47180
|
}), /* @__PURE__ */ jsx("div", {
|
|
47000
47181
|
className: "rb-mt-2 rb-tiles-grid",
|
|
47001
|
-
children:
|
|
47182
|
+
children: dates.map((event) => /* @__PURE__ */ jsx("a", {
|
|
47002
47183
|
className: "rb-tile rb-tile--interactive",
|
|
47003
47184
|
...resolveEventLinkProps(event),
|
|
47004
47185
|
children: /* @__PURE__ */ jsx(DateTimeTile, {
|
|
@@ -50197,13 +50378,13 @@ const FormNodeSSR = ({ blockId, value, submitLabel, successMessage, className, o
|
|
|
50197
50378
|
* Renders the newsletter signup form for SSR with hydration support.
|
|
50198
50379
|
* Uses the islands architecture pattern to hydrate on the client.
|
|
50199
50380
|
*/
|
|
50200
|
-
function NewsletterFormSSR(
|
|
50381
|
+
function NewsletterFormSSR(props) {
|
|
50382
|
+
const { siteId, apiBaseUrl, preset = "emailOnly", includePhone, buttonLabel = "Subscribe", buttonVariant = "primary", successMessage, privacyNote, tags, spamProtectionEnabled, className } = props;
|
|
50383
|
+
const blockId = props.source === "block" ? props.blockId : null;
|
|
50201
50384
|
const islandProps = buildNewsletterFormInteractiveIslandProps({
|
|
50202
|
-
|
|
50385
|
+
...props,
|
|
50203
50386
|
siteId,
|
|
50204
50387
|
apiBaseUrl,
|
|
50205
|
-
listId,
|
|
50206
|
-
destinationProvider,
|
|
50207
50388
|
preset,
|
|
50208
50389
|
includePhone,
|
|
50209
50390
|
buttonLabel,
|
|
@@ -52544,30 +52725,24 @@ const NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES = [
|
|
|
52544
52725
|
];
|
|
52545
52726
|
//#endregion
|
|
52546
52727
|
//#region ../theme-core/src/header/surfaceRules.ts
|
|
52547
|
-
/** Compile the
|
|
52548
|
-
function buildHeaderSurfaceRules(header, tokens
|
|
52728
|
+
/** Compile the at-rest surface independently of scroll treatment and paint geometry. */
|
|
52729
|
+
function buildHeaderSurfaceRules(header, tokens) {
|
|
52549
52730
|
const base = [];
|
|
52550
|
-
const scrolled = [];
|
|
52551
52731
|
const background = header.background;
|
|
52552
52732
|
if (background.type === "color") base.push(`background-color: ${tokens.getColor(background.color || "surface")};`);
|
|
52553
52733
|
else if (background.type === "gradient" && background.gradient) {
|
|
52554
52734
|
const stops = background.gradient.stops.map((stop) => tokens.getColor(stop.color)).join(", ");
|
|
52555
52735
|
base.push(`background-image: linear-gradient(${background.gradient.angle ?? 180}deg, ${stops});`);
|
|
52556
52736
|
}
|
|
52557
|
-
const blurRules = [`backdrop-filter: ${blur};`, `-webkit-backdrop-filter: ${blur};`];
|
|
52558
|
-
base.push(...blurRules);
|
|
52559
|
-
scrolled.push(...blurRules);
|
|
52560
52737
|
const borderWidth = getComponentBorderWidthPx(header.border?.width ?? "none");
|
|
52561
52738
|
if (!header.border || borderWidth === "0") return {
|
|
52562
52739
|
base,
|
|
52563
|
-
scrolled,
|
|
52564
52740
|
border: []
|
|
52565
52741
|
};
|
|
52566
52742
|
const color = rgbColorValue(header.border.colorToken?.trim() || "border");
|
|
52567
52743
|
const style = header.border.style === "dashed" ? "dashed" : "solid";
|
|
52568
52744
|
return {
|
|
52569
52745
|
base,
|
|
52570
|
-
scrolled,
|
|
52571
52746
|
border: header.border.position === "both" ? [`border-top: ${borderWidth} ${style} ${color};`, `border-bottom: ${borderWidth} ${style} ${color};`] : [`border-${header.border.position}: ${borderWidth} ${style} ${color};`]
|
|
52572
52747
|
};
|
|
52573
52748
|
}
|
|
@@ -52877,13 +53052,12 @@ function generateHeaderRootStyles(header, themeId, tokens) {
|
|
|
52877
53052
|
rules.push("isolation: isolate;");
|
|
52878
53053
|
const surfaceRules = isContainedNav ? {
|
|
52879
53054
|
base: [],
|
|
52880
|
-
scrolled: [],
|
|
52881
53055
|
border: []
|
|
52882
|
-
} : buildHeaderSurfaceRules(header, tokens
|
|
53056
|
+
} : buildHeaderSurfaceRules(header, tokens);
|
|
52883
53057
|
const floatingSurfaceBorder = header.variant === "floating";
|
|
52884
53058
|
if (!floatingSurfaceBorder) rules.push(...surfaceRules.border);
|
|
52885
53059
|
const basePaintRules = floatingSurfaceBorder ? [...surfaceRules.base, ...surfaceRules.border] : surfaceRules.base;
|
|
52886
|
-
const scrolledPaintRules = floatingSurfaceBorder ?
|
|
53060
|
+
const scrolledPaintRules = floatingSurfaceBorder ? surfaceRules.border : [];
|
|
52887
53061
|
if (header.positioning === "sticky" || header.positioning === "fixed") {
|
|
52888
53062
|
const shadowVar = getComponentShadowVar(header.shadow?.elevation ?? "none");
|
|
52889
53063
|
if (shadowVar) rules.push(`box-shadow: ${shadowVar};`);
|
|
@@ -69507,8 +69681,7 @@ function toBlocksBlockOverrides(overrides) {
|
|
|
69507
69681
|
};
|
|
69508
69682
|
return result;
|
|
69509
69683
|
}
|
|
69510
|
-
function
|
|
69511
|
-
if (!dataContext) return void 0;
|
|
69684
|
+
function toBlocksPageRendererDataContext(dataContext) {
|
|
69512
69685
|
return {
|
|
69513
69686
|
...dataContext,
|
|
69514
69687
|
mediaAssets: toBlocksMediaAssets(dataContext.mediaAssets),
|
|
@@ -69521,7 +69694,7 @@ function PageRenderer(props) {
|
|
|
69521
69694
|
const blocksProps = {
|
|
69522
69695
|
...props,
|
|
69523
69696
|
theme: blocksTheme,
|
|
69524
|
-
dataContext:
|
|
69697
|
+
dataContext: props.dataContext ? toBlocksPageRendererDataContext(props.dataContext) : void 0,
|
|
69525
69698
|
blockOverrides: toBlocksBlockOverrides(props.blockOverrides),
|
|
69526
69699
|
sdkConfig: blocksSdkConfig,
|
|
69527
69700
|
customBlocks: normalizeSdkCustomBlocks(props.customBlocks)
|
|
@@ -70248,7 +70421,7 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
70248
70421
|
try {
|
|
70249
70422
|
apiBaseUrl = getRiverbankEnv().baseUrl;
|
|
70250
70423
|
} catch {}
|
|
70251
|
-
const
|
|
70424
|
+
const sharedViewModelOverrides = {
|
|
70252
70425
|
$root: {
|
|
70253
70426
|
siteId: site.id,
|
|
70254
70427
|
apiBaseUrl,
|
|
@@ -70261,14 +70434,24 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
70261
70434
|
site,
|
|
70262
70435
|
menu: menuViewModel,
|
|
70263
70436
|
footerMenu: footerMenuViewModel,
|
|
70264
|
-
legalFooterMenu: legalFooterMenuViewModel
|
|
70437
|
+
legalFooterMenu: legalFooterMenuViewModel
|
|
70438
|
+
};
|
|
70439
|
+
const headerViewModelOverrides = {
|
|
70440
|
+
...sharedViewModelOverrides,
|
|
70265
70441
|
content: { logo: logoViewModel }
|
|
70266
70442
|
};
|
|
70443
|
+
const footerViewModelOverrides = {
|
|
70444
|
+
...sharedViewModelOverrides,
|
|
70445
|
+
content: {
|
|
70446
|
+
...layout.footer,
|
|
70447
|
+
logo: logoViewModel
|
|
70448
|
+
}
|
|
70449
|
+
};
|
|
70267
70450
|
let headerElement = null;
|
|
70268
70451
|
if (header === true) headerElement = renderBlock(siteHeaderManifest, headerContent, {
|
|
70269
70452
|
theme: builtThemeRuntime.tokens,
|
|
70270
70453
|
themeConfig: blocksThemeWithVariant,
|
|
70271
|
-
viewModelOverrides
|
|
70454
|
+
viewModelOverrides: headerViewModelOverrides
|
|
70272
70455
|
});
|
|
70273
70456
|
else if (typeof header === "function") headerElement = header(headerData);
|
|
70274
70457
|
let footerElement = null;
|
|
@@ -70303,7 +70486,7 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
70303
70486
|
const defaultFooterElement = footerPlan.renderDefaultFooter ? renderBlock(siteFooterManifest, layout.footer, {
|
|
70304
70487
|
theme: builtThemeRuntime.tokens,
|
|
70305
70488
|
themeConfig: blocksTheme,
|
|
70306
|
-
viewModelOverrides
|
|
70489
|
+
viewModelOverrides: footerViewModelOverrides
|
|
70307
70490
|
}) : null;
|
|
70308
70491
|
footerElement = footerPlan.mode === "default+blocks" ? /* @__PURE__ */ jsxs(Fragment, { children: [footerBlocksElement, defaultFooterElement] }) : footerPlan.mode === "blocks" ? footerBlocksElement : footerPlan.mode === "none" ? null : defaultFooterElement;
|
|
70309
70492
|
} else if (typeof footer === "function") footerElement = footer(footerData);
|
|
@@ -70631,6 +70814,7 @@ const SUPPORTED_LOADER_ENDPOINTS$1 = [
|
|
|
70631
70814
|
"listPublicRecurringSchedule",
|
|
70632
70815
|
"getPublicEventDetails",
|
|
70633
70816
|
"listPublicWholeSeriesOfferings",
|
|
70817
|
+
"getPublicWholeSeriesOffering",
|
|
70634
70818
|
"listPublicRouteCandidates",
|
|
70635
70819
|
"listPublicTeamMembers",
|
|
70636
70820
|
"listPublicProducts",
|
|
@@ -73366,6 +73550,7 @@ const loaderAdapters = {
|
|
|
73366
73550
|
listPublicEvents,
|
|
73367
73551
|
listPublicRecurringSchedule,
|
|
73368
73552
|
getPublicEventDetails,
|
|
73553
|
+
getPublicWholeSeriesOffering,
|
|
73369
73554
|
listPublicRouteCandidates,
|
|
73370
73555
|
listPublicTeamMembers,
|
|
73371
73556
|
listPublicProducts,
|
|
@@ -73460,6 +73645,13 @@ async function listPublicEvents({ client, params }) {
|
|
|
73460
73645
|
async function listPublicRecurringSchedule(input) {
|
|
73461
73646
|
return projectRecurringSchedule(await listPublicEvents(input));
|
|
73462
73647
|
}
|
|
73648
|
+
async function getPublicWholeSeriesOffering({ client, params }) {
|
|
73649
|
+
return await client.getPublicWholeSeriesOffering({
|
|
73650
|
+
siteId: requireStringParam(params, "siteId", "getPublicWholeSeriesOffering"),
|
|
73651
|
+
eventSeriesId: requireStringParam(params, "eventSeriesId", "getPublicWholeSeriesOffering"),
|
|
73652
|
+
stage: readStringParam(params, "stage")
|
|
73653
|
+
});
|
|
73654
|
+
}
|
|
73463
73655
|
async function getPublicEventDetails({ client, params }) {
|
|
73464
73656
|
return await client.getPublicEventDetails({
|
|
73465
73657
|
siteId: requireStringParam(params, "siteId", "getPublicEventDetails"),
|
|
@@ -77536,4 +77728,4 @@ function defineBlockOverrideRegistrations(registrations) {
|
|
|
77536
77728
|
* ```
|
|
77537
77729
|
*/
|
|
77538
77730
|
//#endregion
|
|
77539
|
-
export { Block, ImagePresets, Layout, Page, PageRenderer, RichText, ThemeScope, buildThemeRuntime, defineBlockOverrideRegistrations, defineBlockOverrides, defineLazyBlockOverride, isEntryContent, isPageContent, isPageSurfaceContent, loadContent, loadPage, resolveImageSourceSetWithContext, resolveImageUrl, resolveImageUrlWithContext };
|
|
77731
|
+
export { Block, ImagePresets, Layout, Page, PageRenderer, RichText, ThemeScope, buildThemeRuntime, defineBlockOverrideRegistrations, defineBlockOverrides, defineLazyBlockOverride, isEntryContent, isPageContent, isPageSurfaceContent, loadContent, loadPage, resolveImageSourceSetWithContext, resolveImageUrl, resolveImageUrlWithContext, toBlocksImageResolveContextInput, toBlocksMediaAssets, toBlocksPageRendererDataContext };
|