@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"
|
|
@@ -41918,9 +42031,6 @@ function parseSignedNewsletterDestinationRef(value) {
|
|
|
41918
42031
|
const trimmed = parseTrimmedString$1(value);
|
|
41919
42032
|
return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
|
|
41920
42033
|
}
|
|
41921
|
-
function parseNewsletterSignupDestinationProvider(value) {
|
|
41922
|
-
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
41923
|
-
}
|
|
41924
42034
|
function buildNewsletterSignupBlockRef(blockId) {
|
|
41925
42035
|
const parsed = parseNewsletterSignupBlockId(blockId);
|
|
41926
42036
|
return parsed ? {
|
|
@@ -42067,19 +42177,9 @@ const newsletterFieldSchema = z$1.object({
|
|
|
42067
42177
|
});
|
|
42068
42178
|
const newsletterSignupBlockIdSchema = z$1.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
42069
42179
|
const signedNewsletterDestinationRefSchema = z$1.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
42070
|
-
const
|
|
42071
|
-
tag: z$1.literal("block_ref"),
|
|
42072
|
-
blockId: newsletterSignupBlockIdSchema
|
|
42073
|
-
}), z$1.object({
|
|
42074
|
-
tag: z$1.literal("signed_destination_ref"),
|
|
42075
|
-
token: signedNewsletterDestinationRefSchema
|
|
42076
|
-
})]);
|
|
42077
|
-
const newsletterSourceSchema = z$1.object({
|
|
42078
|
-
blockId: z$1.string().nullable().optional(),
|
|
42180
|
+
const newsletterSourceCommonSchema = z$1.object({
|
|
42079
42181
|
siteId: z$1.string().optional(),
|
|
42080
42182
|
apiBaseUrl: z$1.string().optional(),
|
|
42081
|
-
listId: z$1.string().nullable().optional(),
|
|
42082
|
-
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
42083
42183
|
preset: newsletterPresetSchema.optional(),
|
|
42084
42184
|
includePhone: z$1.boolean().optional(),
|
|
42085
42185
|
buttonLabel: z$1.string().nullable().optional(),
|
|
@@ -42090,6 +42190,25 @@ const newsletterSourceSchema = z$1.object({
|
|
|
42090
42190
|
spamProtectionEnabled: z$1.boolean().optional(),
|
|
42091
42191
|
className: z$1.string().nullable().optional()
|
|
42092
42192
|
});
|
|
42193
|
+
const newsletterSourceSchema = z$1.discriminatedUnion("source", [
|
|
42194
|
+
newsletterSourceCommonSchema.extend({
|
|
42195
|
+
source: z$1.literal("block"),
|
|
42196
|
+
blockId: z$1.string().nullable().optional(),
|
|
42197
|
+
listId: z$1.string().nullable().optional(),
|
|
42198
|
+
destinationProvider: newsletterDestinationProviderSchema.nullable().optional()
|
|
42199
|
+
}),
|
|
42200
|
+
newsletterSourceCommonSchema.extend({
|
|
42201
|
+
source: z$1.literal("signed-footer"),
|
|
42202
|
+
destinationRef: z$1.object({
|
|
42203
|
+
tag: z$1.literal("signed_destination_ref"),
|
|
42204
|
+
token: signedNewsletterDestinationRefSchema
|
|
42205
|
+
})
|
|
42206
|
+
}),
|
|
42207
|
+
newsletterSourceCommonSchema.extend({
|
|
42208
|
+
source: z$1.literal("legacy-direct-list"),
|
|
42209
|
+
listId: z$1.string().nullable()
|
|
42210
|
+
})
|
|
42211
|
+
]);
|
|
42093
42212
|
const newsletterDisplaySchema = z$1.object({
|
|
42094
42213
|
kind: z$1.literal("newsletter-form"),
|
|
42095
42214
|
className: z$1.string().nullable(),
|
|
@@ -42100,8 +42219,26 @@ const newsletterDisplaySchema = z$1.object({
|
|
|
42100
42219
|
fields: z$1.array(newsletterFieldSchema)
|
|
42101
42220
|
});
|
|
42102
42221
|
const newsletterHydrationSchema = z$1.object({
|
|
42103
|
-
|
|
42104
|
-
|
|
42222
|
+
target: z$1.discriminatedUnion("tag", [
|
|
42223
|
+
z$1.object({
|
|
42224
|
+
tag: z$1.literal("block-source"),
|
|
42225
|
+
destinationRef: z$1.object({
|
|
42226
|
+
tag: z$1.literal("block_ref"),
|
|
42227
|
+
blockId: newsletterSignupBlockIdSchema
|
|
42228
|
+
}).nullable()
|
|
42229
|
+
}),
|
|
42230
|
+
z$1.object({
|
|
42231
|
+
tag: z$1.literal("signed-footer-source"),
|
|
42232
|
+
destinationRef: z$1.object({
|
|
42233
|
+
tag: z$1.literal("signed_destination_ref"),
|
|
42234
|
+
token: signedNewsletterDestinationRefSchema
|
|
42235
|
+
})
|
|
42236
|
+
}),
|
|
42237
|
+
z$1.object({
|
|
42238
|
+
tag: z$1.literal("legacy-direct-list"),
|
|
42239
|
+
listId: z$1.string().nullable()
|
|
42240
|
+
})
|
|
42241
|
+
]),
|
|
42105
42242
|
preset: newsletterPresetSchema,
|
|
42106
42243
|
includePhone: z$1.boolean(),
|
|
42107
42244
|
tags: z$1.string().nullable().optional(),
|
|
@@ -42135,20 +42272,43 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
42135
42272
|
render: createZodCodec(newsletterRenderSchema)
|
|
42136
42273
|
},
|
|
42137
42274
|
buildRender: (source) => {
|
|
42138
|
-
const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
|
|
42275
|
+
const runtimeSource = source.source === "block" ? deriveNewsletterSignupRuntimeSource(source) : null;
|
|
42139
42276
|
return {
|
|
42140
42277
|
display: buildNewsletterDisplay(source),
|
|
42141
42278
|
hydration: {
|
|
42142
|
-
|
|
42143
|
-
listId: runtimeSource.listId,
|
|
42279
|
+
target: projectNewsletterFormHydrationTarget(source),
|
|
42144
42280
|
preset: source.preset ?? "emailOnly",
|
|
42145
42281
|
includePhone: source.includePhone ?? false,
|
|
42146
|
-
tags: runtimeSource.tags,
|
|
42282
|
+
tags: runtimeSource ? runtimeSource.tags : source.tags,
|
|
42147
42283
|
spamProtectionEnabled: source.spamProtectionEnabled
|
|
42148
42284
|
}
|
|
42149
42285
|
};
|
|
42150
42286
|
}
|
|
42151
42287
|
});
|
|
42288
|
+
function projectNewsletterFormHydrationTarget(source) {
|
|
42289
|
+
switch (source.source) {
|
|
42290
|
+
case "block": {
|
|
42291
|
+
const destinationRef = buildNewsletterSignupBlockRef(source.blockId);
|
|
42292
|
+
if (destinationRef?.tag === "block_ref") return {
|
|
42293
|
+
tag: "block-source",
|
|
42294
|
+
destinationRef
|
|
42295
|
+
};
|
|
42296
|
+
return {
|
|
42297
|
+
tag: "legacy-direct-list",
|
|
42298
|
+
listId: source.listId ?? null
|
|
42299
|
+
};
|
|
42300
|
+
}
|
|
42301
|
+
case "signed-footer": return {
|
|
42302
|
+
tag: "signed-footer-source",
|
|
42303
|
+
destinationRef: source.destinationRef
|
|
42304
|
+
};
|
|
42305
|
+
case "legacy-direct-list": return {
|
|
42306
|
+
tag: "legacy-direct-list",
|
|
42307
|
+
listId: source.listId
|
|
42308
|
+
};
|
|
42309
|
+
default: return assertNever$24(source);
|
|
42310
|
+
}
|
|
42311
|
+
}
|
|
42152
42312
|
function buildNewsletterFormInteractiveIslandProps(props) {
|
|
42153
42313
|
return buildInteractiveIslandProps({
|
|
42154
42314
|
runtime: newsletterFormBlockRuntime,
|
|
@@ -46410,6 +46570,33 @@ function uniqByOccurrenceId(events) {
|
|
|
46410
46570
|
}
|
|
46411
46571
|
return out;
|
|
46412
46572
|
}
|
|
46573
|
+
function selectFromOccurrenceContext(events, occurrenceContext) {
|
|
46574
|
+
if (!occurrenceContext) return null;
|
|
46575
|
+
const byId = events.find((event) => event.occurrenceId === occurrenceContext.id || event.id === occurrenceContext.id);
|
|
46576
|
+
if (byId) return byId;
|
|
46577
|
+
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
46578
|
+
startsAt: occurrenceContext.startsAt,
|
|
46579
|
+
timeZone: occurrenceContext.timeZone
|
|
46580
|
+
}));
|
|
46581
|
+
return events.find((event) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
46582
|
+
startsAt: event.startsAt,
|
|
46583
|
+
timeZone: event.timeZone
|
|
46584
|
+
})) === contextDate) ?? null;
|
|
46585
|
+
}
|
|
46586
|
+
function selectNextUpcoming(events, nowIso) {
|
|
46587
|
+
return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
|
|
46588
|
+
}
|
|
46589
|
+
function selectCompletedWholeSeries(events) {
|
|
46590
|
+
if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
|
|
46591
|
+
return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
|
|
46592
|
+
}
|
|
46593
|
+
function selectRelatedDates(input) {
|
|
46594
|
+
if (!input.seriesId) return [];
|
|
46595
|
+
const isWholeSeries = input.selected?.bookingScope === "whole_series";
|
|
46596
|
+
const selectedOccurrenceId = input.selected ? input.selected.occurrenceId || input.selected.id : null;
|
|
46597
|
+
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));
|
|
46598
|
+
return isWholeSeries ? dates : dates.slice(0, input.limit);
|
|
46599
|
+
}
|
|
46413
46600
|
function selectEventDetails(args) {
|
|
46414
46601
|
const all = uniqByOccurrenceId(resolveEventRegistrationScopedEvents((args.events ?? []).filter(Boolean), {
|
|
46415
46602
|
occurrenceContext: args.occurrenceContext,
|
|
@@ -46417,37 +46604,22 @@ function selectEventDetails(args) {
|
|
|
46417
46604
|
}));
|
|
46418
46605
|
const occurrenceContext = args.occurrenceContext ?? null;
|
|
46419
46606
|
const otherLimit = parseLimit$1(args.otherDatesLimit, 5);
|
|
46420
|
-
const selectedFromContext = (
|
|
46421
|
-
|
|
46422
|
-
|
|
46423
|
-
|
|
46424
|
-
|
|
46425
|
-
startsAt: occurrenceContext.startsAt,
|
|
46426
|
-
timeZone: occurrenceContext.timeZone
|
|
46427
|
-
}));
|
|
46428
|
-
return all.find((e) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
46429
|
-
startsAt: e.startsAt,
|
|
46430
|
-
timeZone: e.timeZone
|
|
46431
|
-
})) === ctxDate) ?? null;
|
|
46432
|
-
})();
|
|
46433
|
-
const nextUpcoming = (() => {
|
|
46434
|
-
const upcoming = all.filter((e) => isFutureOrNow(e.startsAt, args.nowIso));
|
|
46435
|
-
upcoming.sort((a, b) => Date.parse(a.startsAt) - Date.parse(b.startsAt));
|
|
46436
|
-
return upcoming[0] ?? null;
|
|
46437
|
-
})();
|
|
46438
|
-
const mode = selectedFromContext ? "selected" : "next";
|
|
46439
|
-
const selected = selectedFromContext ?? nextUpcoming;
|
|
46607
|
+
const selectedFromContext = selectFromOccurrenceContext(all, occurrenceContext);
|
|
46608
|
+
const nextUpcoming = selectNextUpcoming(all, args.nowIso);
|
|
46609
|
+
const completedWholeSeries = selectCompletedWholeSeries(all);
|
|
46610
|
+
const selected = selectedFromContext ?? nextUpcoming ?? completedWholeSeries;
|
|
46611
|
+
const mode = selectedFromContext ? "selected" : nextUpcoming ? "next" : completedWholeSeries ? "completed" : "next";
|
|
46440
46612
|
const timeZone = toBookingTimeZone(selected?.timeZone ?? all[0]?.timeZone ?? null);
|
|
46441
|
-
const seriesId = occurrenceContext?.seriesId ?? selected?.seriesId ?? all[0]?.seriesId ?? null;
|
|
46442
|
-
const selectedOccurrenceId = selected?.occurrenceId ?? null;
|
|
46443
46613
|
return {
|
|
46444
46614
|
mode,
|
|
46445
46615
|
selected,
|
|
46446
|
-
otherDates:
|
|
46447
|
-
|
|
46448
|
-
|
|
46449
|
-
|
|
46450
|
-
|
|
46616
|
+
otherDates: selectRelatedDates({
|
|
46617
|
+
events: all,
|
|
46618
|
+
seriesId: occurrenceContext?.seriesId ?? selected?.seriesId ?? all[0]?.seriesId ?? null,
|
|
46619
|
+
selected,
|
|
46620
|
+
nowIso: args.nowIso,
|
|
46621
|
+
limit: otherLimit
|
|
46622
|
+
}),
|
|
46451
46623
|
timeZone
|
|
46452
46624
|
};
|
|
46453
46625
|
}
|
|
@@ -46569,7 +46741,7 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing }) {
|
|
|
46569
46741
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
46570
46742
|
/* @__PURE__ */ jsx("div", {
|
|
46571
46743
|
className: "rb-label rb-mb-2",
|
|
46572
|
-
children: selection.mode === "next" ? "Next date" : "Date"
|
|
46744
|
+
children: selected.bookingScope === "whole_series" ? selection.mode === "next" ? "Next session" : "Selected session" : selection.mode === "next" ? "Next date" : "Date"
|
|
46573
46745
|
}),
|
|
46574
46746
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }),
|
|
46575
46747
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -46607,18 +46779,27 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing }) {
|
|
|
46607
46779
|
}) : null] }, member.id))
|
|
46608
46780
|
})]
|
|
46609
46781
|
}) : null,
|
|
46610
|
-
pricing
|
|
46782
|
+
pricing,
|
|
46783
|
+
selected.bookingScope === "whole_series" ? /* @__PURE__ */ jsxs("div", {
|
|
46784
|
+
className: "rb-mt-6",
|
|
46785
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
46786
|
+
className: "rb-label rb-mb-2",
|
|
46787
|
+
children: "Registration"
|
|
46788
|
+
}), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: selected.wholeSeries?.enrollmentOpen ? "Open" : "Closed" }) })]
|
|
46789
|
+
}) : null
|
|
46611
46790
|
]
|
|
46612
46791
|
});
|
|
46613
46792
|
}
|
|
46614
46793
|
function OtherEventDates({ selection }) {
|
|
46615
|
-
|
|
46794
|
+
const isWholeSeries = selection.selected?.bookingScope === "whole_series";
|
|
46795
|
+
const dates = isWholeSeries && selection.selected ? [selection.selected, ...selection.otherDates].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt)) : selection.otherDates;
|
|
46796
|
+
if (dates.length === 0) return null;
|
|
46616
46797
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
46617
46798
|
className: "rb-label",
|
|
46618
|
-
children: "Other dates"
|
|
46799
|
+
children: isWholeSeries ? "Session schedule" : "Other dates"
|
|
46619
46800
|
}), /* @__PURE__ */ jsx("div", {
|
|
46620
46801
|
className: "rb-mt-2 rb-tiles-grid",
|
|
46621
|
-
children:
|
|
46802
|
+
children: dates.map((event) => /* @__PURE__ */ jsx("a", {
|
|
46622
46803
|
className: "rb-tile rb-tile--interactive",
|
|
46623
46804
|
...resolveEventLinkProps(event),
|
|
46624
46805
|
children: /* @__PURE__ */ jsx(DateTimeTile, {
|
|
@@ -49817,13 +49998,13 @@ const FormNodeSSR = ({ blockId, value, submitLabel, successMessage, className, o
|
|
|
49817
49998
|
* Renders the newsletter signup form for SSR with hydration support.
|
|
49818
49999
|
* Uses the islands architecture pattern to hydrate on the client.
|
|
49819
50000
|
*/
|
|
49820
|
-
function NewsletterFormSSR(
|
|
50001
|
+
function NewsletterFormSSR(props) {
|
|
50002
|
+
const { siteId, apiBaseUrl, preset = "emailOnly", includePhone, buttonLabel = "Subscribe", buttonVariant = "primary", successMessage, privacyNote, tags, spamProtectionEnabled, className } = props;
|
|
50003
|
+
const blockId = props.source === "block" ? props.blockId : null;
|
|
49821
50004
|
const islandProps = buildNewsletterFormInteractiveIslandProps({
|
|
49822
|
-
|
|
50005
|
+
...props,
|
|
49823
50006
|
siteId,
|
|
49824
50007
|
apiBaseUrl,
|
|
49825
|
-
listId,
|
|
49826
|
-
destinationProvider,
|
|
49827
50008
|
preset,
|
|
49828
50009
|
includePhone,
|
|
49829
50010
|
buttonLabel,
|
|
@@ -52164,30 +52345,24 @@ const NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES = [
|
|
|
52164
52345
|
];
|
|
52165
52346
|
//#endregion
|
|
52166
52347
|
//#region ../theme-core/src/header/surfaceRules.ts
|
|
52167
|
-
/** Compile the
|
|
52168
|
-
function buildHeaderSurfaceRules(header, tokens
|
|
52348
|
+
/** Compile the at-rest surface independently of scroll treatment and paint geometry. */
|
|
52349
|
+
function buildHeaderSurfaceRules(header, tokens) {
|
|
52169
52350
|
const base = [];
|
|
52170
|
-
const scrolled = [];
|
|
52171
52351
|
const background = header.background;
|
|
52172
52352
|
if (background.type === "color") base.push(`background-color: ${tokens.getColor(background.color || "surface")};`);
|
|
52173
52353
|
else if (background.type === "gradient" && background.gradient) {
|
|
52174
52354
|
const stops = background.gradient.stops.map((stop) => tokens.getColor(stop.color)).join(", ");
|
|
52175
52355
|
base.push(`background-image: linear-gradient(${background.gradient.angle ?? 180}deg, ${stops});`);
|
|
52176
52356
|
}
|
|
52177
|
-
const blurRules = [`backdrop-filter: ${blur};`, `-webkit-backdrop-filter: ${blur};`];
|
|
52178
|
-
base.push(...blurRules);
|
|
52179
|
-
scrolled.push(...blurRules);
|
|
52180
52357
|
const borderWidth = getComponentBorderWidthPx(header.border?.width ?? "none");
|
|
52181
52358
|
if (!header.border || borderWidth === "0") return {
|
|
52182
52359
|
base,
|
|
52183
|
-
scrolled,
|
|
52184
52360
|
border: []
|
|
52185
52361
|
};
|
|
52186
52362
|
const color = rgbColorValue(header.border.colorToken?.trim() || "border");
|
|
52187
52363
|
const style = header.border.style === "dashed" ? "dashed" : "solid";
|
|
52188
52364
|
return {
|
|
52189
52365
|
base,
|
|
52190
|
-
scrolled,
|
|
52191
52366
|
border: header.border.position === "both" ? [`border-top: ${borderWidth} ${style} ${color};`, `border-bottom: ${borderWidth} ${style} ${color};`] : [`border-${header.border.position}: ${borderWidth} ${style} ${color};`]
|
|
52192
52367
|
};
|
|
52193
52368
|
}
|
|
@@ -52497,13 +52672,12 @@ function generateHeaderRootStyles(header, themeId, tokens) {
|
|
|
52497
52672
|
rules.push("isolation: isolate;");
|
|
52498
52673
|
const surfaceRules = isContainedNav ? {
|
|
52499
52674
|
base: [],
|
|
52500
|
-
scrolled: [],
|
|
52501
52675
|
border: []
|
|
52502
|
-
} : buildHeaderSurfaceRules(header, tokens
|
|
52676
|
+
} : buildHeaderSurfaceRules(header, tokens);
|
|
52503
52677
|
const floatingSurfaceBorder = header.variant === "floating";
|
|
52504
52678
|
if (!floatingSurfaceBorder) rules.push(...surfaceRules.border);
|
|
52505
52679
|
const basePaintRules = floatingSurfaceBorder ? [...surfaceRules.base, ...surfaceRules.border] : surfaceRules.base;
|
|
52506
|
-
const scrolledPaintRules = floatingSurfaceBorder ?
|
|
52680
|
+
const scrolledPaintRules = floatingSurfaceBorder ? surfaceRules.border : [];
|
|
52507
52681
|
if (header.positioning === "sticky" || header.positioning === "fixed") {
|
|
52508
52682
|
const shadowVar = getComponentShadowVar(header.shadow?.elevation ?? "none");
|
|
52509
52683
|
if (shadowVar) rules.push(`box-shadow: ${shadowVar};`);
|
|
@@ -69127,8 +69301,7 @@ function toBlocksBlockOverrides(overrides) {
|
|
|
69127
69301
|
};
|
|
69128
69302
|
return result;
|
|
69129
69303
|
}
|
|
69130
|
-
function
|
|
69131
|
-
if (!dataContext) return void 0;
|
|
69304
|
+
function toBlocksPageRendererDataContext(dataContext) {
|
|
69132
69305
|
return {
|
|
69133
69306
|
...dataContext,
|
|
69134
69307
|
mediaAssets: toBlocksMediaAssets(dataContext.mediaAssets),
|
|
@@ -69141,7 +69314,7 @@ function PageRenderer(props) {
|
|
|
69141
69314
|
const blocksProps = {
|
|
69142
69315
|
...props,
|
|
69143
69316
|
theme: blocksTheme,
|
|
69144
|
-
dataContext:
|
|
69317
|
+
dataContext: props.dataContext ? toBlocksPageRendererDataContext(props.dataContext) : void 0,
|
|
69145
69318
|
blockOverrides: toBlocksBlockOverrides(props.blockOverrides),
|
|
69146
69319
|
sdkConfig: blocksSdkConfig,
|
|
69147
69320
|
customBlocks: normalizeSdkCustomBlocks(props.customBlocks)
|
|
@@ -69868,7 +70041,7 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
69868
70041
|
try {
|
|
69869
70042
|
apiBaseUrl = getRiverbankEnv().baseUrl;
|
|
69870
70043
|
} catch {}
|
|
69871
|
-
const
|
|
70044
|
+
const sharedViewModelOverrides = {
|
|
69872
70045
|
$root: {
|
|
69873
70046
|
siteId: site.id,
|
|
69874
70047
|
apiBaseUrl,
|
|
@@ -69881,14 +70054,24 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
69881
70054
|
site,
|
|
69882
70055
|
menu: menuViewModel,
|
|
69883
70056
|
footerMenu: footerMenuViewModel,
|
|
69884
|
-
legalFooterMenu: legalFooterMenuViewModel
|
|
70057
|
+
legalFooterMenu: legalFooterMenuViewModel
|
|
70058
|
+
};
|
|
70059
|
+
const headerViewModelOverrides = {
|
|
70060
|
+
...sharedViewModelOverrides,
|
|
69885
70061
|
content: { logo: logoViewModel }
|
|
69886
70062
|
};
|
|
70063
|
+
const footerViewModelOverrides = {
|
|
70064
|
+
...sharedViewModelOverrides,
|
|
70065
|
+
content: {
|
|
70066
|
+
...layout.footer,
|
|
70067
|
+
logo: logoViewModel
|
|
70068
|
+
}
|
|
70069
|
+
};
|
|
69887
70070
|
let headerElement = null;
|
|
69888
70071
|
if (header === true) headerElement = renderBlock(siteHeaderManifest, headerContent, {
|
|
69889
70072
|
theme: builtThemeRuntime.tokens,
|
|
69890
70073
|
themeConfig: blocksThemeWithVariant,
|
|
69891
|
-
viewModelOverrides
|
|
70074
|
+
viewModelOverrides: headerViewModelOverrides
|
|
69892
70075
|
});
|
|
69893
70076
|
else if (typeof header === "function") headerElement = header(headerData);
|
|
69894
70077
|
let footerElement = null;
|
|
@@ -69923,7 +70106,7 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
69923
70106
|
const defaultFooterElement = footerPlan.renderDefaultFooter ? renderBlock(siteFooterManifest, layout.footer, {
|
|
69924
70107
|
theme: builtThemeRuntime.tokens,
|
|
69925
70108
|
themeConfig: blocksTheme,
|
|
69926
|
-
viewModelOverrides
|
|
70109
|
+
viewModelOverrides: footerViewModelOverrides
|
|
69927
70110
|
}) : null;
|
|
69928
70111
|
footerElement = footerPlan.mode === "default+blocks" ? /* @__PURE__ */ jsxs(Fragment, { children: [footerBlocksElement, defaultFooterElement] }) : footerPlan.mode === "blocks" ? footerBlocksElement : footerPlan.mode === "none" ? null : defaultFooterElement;
|
|
69929
70112
|
} else if (typeof footer === "function") footerElement = footer(footerData);
|
|
@@ -70107,6 +70290,7 @@ const SUPPORTED_LOADER_ENDPOINTS$1 = [
|
|
|
70107
70290
|
"listPublicRecurringSchedule",
|
|
70108
70291
|
"getPublicEventDetails",
|
|
70109
70292
|
"listPublicWholeSeriesOfferings",
|
|
70293
|
+
"getPublicWholeSeriesOffering",
|
|
70110
70294
|
"listPublicRouteCandidates",
|
|
70111
70295
|
"listPublicTeamMembers",
|
|
70112
70296
|
"listPublicProducts",
|