@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
|
@@ -498,6 +498,11 @@ function toLocationCoordinates(value) {
|
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
500
|
//#endregion
|
|
501
|
+
//#region ../core/src/newsletter-signup-destination.ts
|
|
502
|
+
function parseNewsletterSignupDestinationProvider(value) {
|
|
503
|
+
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
504
|
+
}
|
|
505
|
+
//#endregion
|
|
501
506
|
//#region ../core/src/planner.ts
|
|
502
507
|
/** Default clock for production callers that do not inject time explicitly. */
|
|
503
508
|
const systemPlanningClock = { now: () => Date.now() };
|
|
@@ -16634,10 +16639,16 @@ function getHeaderPaintTargets(variant, themeId, state = "base") {
|
|
|
16634
16639
|
ownerSelector: desktopOwner,
|
|
16635
16640
|
selector: `${desktopOwner}::before`,
|
|
16636
16641
|
mediaQuery: MQ_MD_UP,
|
|
16637
|
-
|
|
16638
|
-
|
|
16639
|
-
|
|
16640
|
-
|
|
16642
|
+
extent: {
|
|
16643
|
+
top: {
|
|
16644
|
+
customProperty: "--rb-header-floating-top-gap",
|
|
16645
|
+
value: "1rem",
|
|
16646
|
+
ownerProperty: "top"
|
|
16647
|
+
},
|
|
16648
|
+
bottom: {
|
|
16649
|
+
customProperty: "--rb-header-floating-bottom-extension",
|
|
16650
|
+
value: "0.75rem"
|
|
16651
|
+
}
|
|
16641
16652
|
},
|
|
16642
16653
|
ownerNeedsPositioning: false
|
|
16643
16654
|
}, {
|
|
@@ -16646,10 +16657,16 @@ function getHeaderPaintTargets(variant, themeId, state = "base") {
|
|
|
16646
16657
|
ownerSelector: mobileOwner,
|
|
16647
16658
|
selector: `${mobileOwner}::before`,
|
|
16648
16659
|
mediaQuery: MQ_MD_DOWN,
|
|
16649
|
-
|
|
16650
|
-
|
|
16651
|
-
|
|
16652
|
-
|
|
16660
|
+
extent: {
|
|
16661
|
+
top: {
|
|
16662
|
+
customProperty: "--rb-header-floating-top-gap",
|
|
16663
|
+
value: "0.75rem",
|
|
16664
|
+
ownerProperty: "margin-top"
|
|
16665
|
+
},
|
|
16666
|
+
bottom: {
|
|
16667
|
+
customProperty: "--rb-header-floating-bottom-extension",
|
|
16668
|
+
value: "0.75rem"
|
|
16669
|
+
}
|
|
16653
16670
|
},
|
|
16654
16671
|
ownerNeedsPositioning: true
|
|
16655
16672
|
}];
|
|
@@ -16690,10 +16707,11 @@ function renderHeaderPaintTargetRule(target, rules) {
|
|
|
16690
16707
|
return `${target.selector} {\n ${[...pseudoElementSetup, ...rules].join("\n ")}\n}`;
|
|
16691
16708
|
}
|
|
16692
16709
|
case "viewport-band": {
|
|
16693
|
-
const
|
|
16710
|
+
const { top, bottom } = target.extent;
|
|
16694
16711
|
const ownerRules = [
|
|
16695
|
-
`${
|
|
16696
|
-
`${
|
|
16712
|
+
`${top.customProperty}: ${top.value};`,
|
|
16713
|
+
`${bottom.customProperty}: ${bottom.value};`,
|
|
16714
|
+
`${top.ownerProperty}: var(${top.customProperty});`,
|
|
16697
16715
|
...target.ownerNeedsPositioning ? ["position: relative;"] : [],
|
|
16698
16716
|
"isolation: isolate;",
|
|
16699
16717
|
"background: none;",
|
|
@@ -16705,8 +16723,8 @@ function renderHeaderPaintTargetRule(target, rules) {
|
|
|
16705
16723
|
const bandRules = [
|
|
16706
16724
|
"content: \"\";",
|
|
16707
16725
|
"position: absolute;",
|
|
16708
|
-
`top: calc(-1 * var(${
|
|
16709
|
-
|
|
16726
|
+
`top: calc(-1 * var(${top.customProperty}));`,
|
|
16727
|
+
`bottom: calc(-1 * var(${bottom.customProperty}));`,
|
|
16710
16728
|
"left: 50%;",
|
|
16711
16729
|
"width: 100vw;",
|
|
16712
16730
|
"transform: translateX(-50%);",
|
|
@@ -16725,6 +16743,7 @@ const headerScrollTreatmentSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
|
16725
16743
|
kind: z$1.literal("contrast-glass"),
|
|
16726
16744
|
backgroundTone: z$1.enum(["light", "dark"])
|
|
16727
16745
|
})]).optional();
|
|
16746
|
+
const CONTRAST_GLASS_BLUR = "blur(12px)";
|
|
16728
16747
|
function generateMobileOverlayBackdropFilterFix(themeId, variant) {
|
|
16729
16748
|
const root = `:where([data-theme-scope="${themeId}"]) .header-root:has([data-nav-mobile-overlay][aria-hidden="false"])`;
|
|
16730
16749
|
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`;
|
|
@@ -16734,7 +16753,12 @@ function generateHeaderScrollTreatmentStyles(treatment, themeId, variant, surfac
|
|
|
16734
16753
|
switch (treatment.kind) {
|
|
16735
16754
|
case "contrast-glass": {
|
|
16736
16755
|
const backgroundChannels = treatment.backgroundTone === "dark" ? "0 0 0" : "255 255 255";
|
|
16737
|
-
return renderHeaderPaintTargetRules(getHeaderPaintTargets(variant, themeId, "scrolled"), [
|
|
16756
|
+
return renderHeaderPaintTargetRules(getHeaderPaintTargets(variant, themeId, "scrolled"), [
|
|
16757
|
+
`background-color: rgb(${backgroundChannels} / 0.60);`,
|
|
16758
|
+
`backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
|
|
16759
|
+
`-webkit-backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
|
|
16760
|
+
...surfaceRules
|
|
16761
|
+
]);
|
|
16738
16762
|
}
|
|
16739
16763
|
}
|
|
16740
16764
|
}
|
|
@@ -24364,6 +24388,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
24364
24388
|
}
|
|
24365
24389
|
],
|
|
24366
24390
|
layout: [el("newsletter-form", withApiBindings({
|
|
24391
|
+
source: "block",
|
|
24367
24392
|
destinationProvider: { $bind: { from: "destinationProvider" } },
|
|
24368
24393
|
listId: { $bind: { from: "listId" } },
|
|
24369
24394
|
preset: { $bind: { from: "preset" } },
|
|
@@ -26308,6 +26333,7 @@ const contactNewsletterLayout = styledSection({
|
|
|
26308
26333
|
as: "h2",
|
|
26309
26334
|
className: "newsletter-copy-title"
|
|
26310
26335
|
}, when("newsletterTitle"), bind("newsletterTitle")), richText({ className: "newsletter-copy-subtitle rb-prose rb-max-w-none" }, when("newsletterSubtitle"), bind("newsletterSubtitle"))]), el("newsletter-form", withApiBindings({
|
|
26336
|
+
source: "block",
|
|
26311
26337
|
listId: { $bind: { from: "listId" } },
|
|
26312
26338
|
preset: { $bind: { from: "preset" } },
|
|
26313
26339
|
includePhone: { $bind: { from: "includePhone" } },
|
|
@@ -28318,6 +28344,22 @@ const footerNavGroupsLayout = stack({
|
|
|
28318
28344
|
}, [text({ as: "span" }, bind("entry.label"))], repeat("group.children", "entry"))])], repeat("footerMenu.groups", "group"))], whenCollectionHasItems("footerMenu.groups"));
|
|
28319
28345
|
//#endregion
|
|
28320
28346
|
//#region ../blocks/src/system/blocks/site-footer.ts
|
|
28347
|
+
const footerStandardContactBindings = {
|
|
28348
|
+
value: { $bind: { from: "module.engagement.runtime.value" } },
|
|
28349
|
+
submitLabel: { $bind: { from: "module.engagement.runtime.submitLabel" } },
|
|
28350
|
+
successMessage: { $bind: { from: "module.engagement.runtime.successMessage" } }
|
|
28351
|
+
};
|
|
28352
|
+
const footerMailingListBindings = {
|
|
28353
|
+
source: { $bind: { from: "module.engagement.runtime.source" } },
|
|
28354
|
+
destinationRef: { $bind: { from: "module.engagement.runtime.destinationRef" } },
|
|
28355
|
+
listId: { $bind: { from: "module.engagement.runtime.listId" } },
|
|
28356
|
+
preset: { $bind: { from: "module.engagement.runtime.preset" } },
|
|
28357
|
+
includePhone: { $bind: { from: "module.engagement.runtime.includePhone" } },
|
|
28358
|
+
buttonLabel: { $bind: { from: "module.engagement.runtime.buttonLabel" } },
|
|
28359
|
+
successMessage: { $bind: { from: "module.engagement.runtime.successMessage" } },
|
|
28360
|
+
privacyNote: { $bind: { from: "module.engagement.runtime.privacyNote" } }
|
|
28361
|
+
};
|
|
28362
|
+
const footerSpamProtectionBinding = { spamProtectionEnabled: { $bind: { from: "$root.spamProtectionEnabled" } } };
|
|
28321
28363
|
const brandLogo = link({
|
|
28322
28364
|
href: "/",
|
|
28323
28365
|
className: { $bind: {
|
|
@@ -28395,6 +28437,23 @@ const authoredCopy = richText({
|
|
|
28395
28437
|
id: "content.interpolateRichTextTokens",
|
|
28396
28438
|
options: { tokens: ["year", "site_name"] }
|
|
28397
28439
|
}] }));
|
|
28440
|
+
const footerEngagement = stack({
|
|
28441
|
+
gap: "md",
|
|
28442
|
+
className: "rb-w-full"
|
|
28443
|
+
}, [
|
|
28444
|
+
text({
|
|
28445
|
+
as: "p",
|
|
28446
|
+
className: "rb-body rb-opacity-80"
|
|
28447
|
+
}, bind("module.engagement.intro"), when("module.engagement.intro")),
|
|
28448
|
+
form(withApiBindings({
|
|
28449
|
+
...footerStandardContactBindings,
|
|
28450
|
+
...footerSpamProtectionBinding
|
|
28451
|
+
}), [], when("module.engagement.kind", { equals: "standard-contact" })),
|
|
28452
|
+
el("newsletter-form", withApiBindings({
|
|
28453
|
+
...footerMailingListBindings,
|
|
28454
|
+
...footerSpamProtectionBinding
|
|
28455
|
+
}), [], when("module.engagement.kind", { equals: "mailing-list" }))
|
|
28456
|
+
], when("module.kind", { equals: "engagement" }));
|
|
28398
28457
|
const footerGroup = stack({
|
|
28399
28458
|
gap: "md",
|
|
28400
28459
|
align: "stretch",
|
|
@@ -28420,6 +28479,7 @@ const footerGroup = stack({
|
|
|
28420
28479
|
contact,
|
|
28421
28480
|
hours,
|
|
28422
28481
|
socials,
|
|
28482
|
+
footerEngagement,
|
|
28423
28483
|
stack({ className: "rb-w-full" }, [authoredCopy], when("module.kind", { equals: "supporting-text" })),
|
|
28424
28484
|
stack({ className: "rb-w-full rb-lg-col-span-3" }, [authoredCopy], when("module.kind", { equals: "legal" }))
|
|
28425
28485
|
], repeat("group.modules", "module"))], repeat("region.groups", "group"));
|
|
@@ -28427,6 +28487,10 @@ const footerMainRegion = stack({
|
|
|
28427
28487
|
className: { $bind: { from: "region.className" } },
|
|
28428
28488
|
"data-footer-region": { $bind: { from: "region.kind" } }
|
|
28429
28489
|
}, [footerGroup], when("region.kind", { equals: "main" }), repeat("content.footerRuntime.regions", "region"));
|
|
28490
|
+
const footerEngagementRegion = stack({
|
|
28491
|
+
className: { $bind: { from: "region.className" } },
|
|
28492
|
+
"data-footer-region": "engagement-row"
|
|
28493
|
+
}, [footerGroup], when("region.kind", { equals: "engagement-row" }), repeat("content.footerRuntime.regions", "region"));
|
|
28430
28494
|
const footerBottomRegion = stack({ className: { $bind: {
|
|
28431
28495
|
from: "$root.theme.footer",
|
|
28432
28496
|
transforms: [{ id: "layout.footerBottomBarContainerClass" }],
|
|
@@ -28462,7 +28526,11 @@ const siteFooterManifest = createBlockManifest({
|
|
|
28462
28526
|
fallback: mergeStyles(backgroundColorStyle("surface"), surfaceForegroundStyle({ text: "rgb(var(--tb-text))" }), borderColorStyle("border"))
|
|
28463
28527
|
} },
|
|
28464
28528
|
"data-footer-membership": { $bind: { from: "content.footerRuntime.membershipKey" } }
|
|
28465
|
-
}, [
|
|
28529
|
+
}, [
|
|
28530
|
+
footerEngagementRegion,
|
|
28531
|
+
footerMainRegion,
|
|
28532
|
+
footerBottomRegion
|
|
28533
|
+
]),
|
|
28466
28534
|
description: "Site-wide composed footer with canonical shared details.",
|
|
28467
28535
|
styleTokens: { spacing: "md" },
|
|
28468
28536
|
paletteHidden: true
|
|
@@ -31036,7 +31104,7 @@ const publicMembershipProductCollectionSchema = z$1.object({ memberships: z$1.ar
|
|
|
31036
31104
|
* Kept in a shared module so the block definition and runtime contracts can
|
|
31037
31105
|
* depend on the same schema without creating an initialization cycle.
|
|
31038
31106
|
*/
|
|
31039
|
-
const occurrenceContextSchema
|
|
31107
|
+
const occurrenceContextSchema = z$1.object({
|
|
31040
31108
|
id: z$1.string(),
|
|
31041
31109
|
seriesId: z$1.string(),
|
|
31042
31110
|
startsAt: z$1.string(),
|
|
@@ -31439,28 +31507,37 @@ const EVENT_REGISTRATION_SHELL_STEP_LABELS = [
|
|
|
31439
31507
|
"Payment"
|
|
31440
31508
|
];
|
|
31441
31509
|
const eventRegistrationPublicEventSchema = z$1.preprocess(normalizeEventRegistrationEventInput, publicEventSchema);
|
|
31442
|
-
const
|
|
31443
|
-
|
|
31444
|
-
apiBaseUrl: z$1.string().optional(),
|
|
31445
|
-
portalToken: z$1.string().nullable().optional(),
|
|
31446
|
-
previewToken: z$1.string().nullable().optional(),
|
|
31447
|
-
occurrenceContext: occurrenceContextSchema$1.optional(),
|
|
31510
|
+
const eventRegistrationHydrationSchemaShape = {
|
|
31511
|
+
occurrenceContext: occurrenceContextSchema.optional(),
|
|
31448
31512
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
31449
31513
|
events: z$1.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
31450
|
-
|
|
31451
|
-
|
|
31452
|
-
maxTickets: z$1.string().
|
|
31514
|
+
wholeSeriesOfferings: publicCoursesArraySchema.nullable().optional(),
|
|
31515
|
+
wholeSeriesOffering: publicCourseSchema.nullable().optional(),
|
|
31516
|
+
maxTickets: z$1.string().optional(),
|
|
31453
31517
|
showVenue: z$1.boolean().optional(),
|
|
31454
31518
|
showCapacity: z$1.boolean().optional(),
|
|
31519
|
+
showSessions: z$1.boolean().optional(),
|
|
31520
|
+
showPrice: z$1.boolean().optional(),
|
|
31455
31521
|
successMessage: z$1.string().optional(),
|
|
31456
31522
|
waitlistMessage: z$1.string().optional(),
|
|
31523
|
+
membershipMessage: z$1.string().optional(),
|
|
31457
31524
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
31458
31525
|
overlayEnabled: z$1.boolean().optional(),
|
|
31459
31526
|
spamProtectionEnabled: z$1.boolean().optional(),
|
|
31460
|
-
stage: previewStageSchema.optional(),
|
|
31461
31527
|
supportEmail: z$1.string().optional(),
|
|
31462
31528
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
31463
31529
|
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
31530
|
+
};
|
|
31531
|
+
const eventRegistrationSourceSchema = z$1.object({
|
|
31532
|
+
siteId: z$1.string().optional(),
|
|
31533
|
+
apiBaseUrl: z$1.string().optional(),
|
|
31534
|
+
portalToken: z$1.string().nullable().optional(),
|
|
31535
|
+
previewToken: z$1.string().nullable().optional(),
|
|
31536
|
+
...eventRegistrationHydrationSchemaShape,
|
|
31537
|
+
className: z$1.string().nullable().optional(),
|
|
31538
|
+
buttonText: z$1.string().nullable().optional(),
|
|
31539
|
+
maxTickets: z$1.string().nullable().optional(),
|
|
31540
|
+
stage: previewStageSchema.optional()
|
|
31464
31541
|
});
|
|
31465
31542
|
const eventRegistrationDisplaySchema = z$1.object({
|
|
31466
31543
|
kind: z$1.literal("event-registration"),
|
|
@@ -31471,22 +31548,7 @@ const eventRegistrationDisplaySchema = z$1.object({
|
|
|
31471
31548
|
stepLabels: z$1.array(z$1.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
31472
31549
|
summaryButtonText: z$1.string()
|
|
31473
31550
|
});
|
|
31474
|
-
const eventRegistrationHydrationSchema = z$1.object(
|
|
31475
|
-
occurrenceContext: occurrenceContextSchema$1.optional(),
|
|
31476
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
31477
|
-
events: z$1.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
31478
|
-
maxTickets: z$1.string().optional(),
|
|
31479
|
-
showVenue: z$1.boolean().optional(),
|
|
31480
|
-
showCapacity: z$1.boolean().optional(),
|
|
31481
|
-
successMessage: z$1.string().optional(),
|
|
31482
|
-
waitlistMessage: z$1.string().optional(),
|
|
31483
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
31484
|
-
overlayEnabled: z$1.boolean().optional(),
|
|
31485
|
-
spamProtectionEnabled: z$1.boolean().optional(),
|
|
31486
|
-
supportEmail: z$1.string().optional(),
|
|
31487
|
-
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
31488
|
-
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
31489
|
-
});
|
|
31551
|
+
const eventRegistrationHydrationSchema = z$1.object(eventRegistrationHydrationSchemaShape);
|
|
31490
31552
|
const eventRegistrationRenderSchema = z$1.object({
|
|
31491
31553
|
display: eventRegistrationDisplaySchema,
|
|
31492
31554
|
hydration: eventRegistrationHydrationSchema
|
|
@@ -31566,11 +31628,16 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
31566
31628
|
occurrenceContext: source.occurrenceContext ?? null,
|
|
31567
31629
|
subject: source.subject ?? null,
|
|
31568
31630
|
events: source.events ?? null,
|
|
31631
|
+
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
31632
|
+
wholeSeriesOffering: source.wholeSeriesOffering ?? null,
|
|
31569
31633
|
maxTickets: source.maxTickets ?? void 0,
|
|
31570
31634
|
showVenue: source.showVenue,
|
|
31571
31635
|
showCapacity: source.showCapacity,
|
|
31636
|
+
showSessions: source.showSessions,
|
|
31637
|
+
showPrice: source.showPrice,
|
|
31572
31638
|
successMessage: source.successMessage,
|
|
31573
31639
|
waitlistMessage: source.waitlistMessage,
|
|
31640
|
+
membershipMessage: source.membershipMessage,
|
|
31574
31641
|
buttonVariant: source.buttonVariant,
|
|
31575
31642
|
overlayEnabled: source.overlayEnabled,
|
|
31576
31643
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
@@ -31605,6 +31672,159 @@ function buildEventRegistrationInteractiveIslandProps(props) {
|
|
|
31605
31672
|
source: props
|
|
31606
31673
|
});
|
|
31607
31674
|
}
|
|
31675
|
+
//#endregion
|
|
31676
|
+
//#region ../blocks/src/system/blocks/courses/shared/pricing.ts
|
|
31677
|
+
function isSaleWindowOpen(option, now) {
|
|
31678
|
+
if (!option.isActive) return false;
|
|
31679
|
+
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
31680
|
+
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
31681
|
+
return true;
|
|
31682
|
+
}
|
|
31683
|
+
function toExactOrFreeDisplay(amount, currency) {
|
|
31684
|
+
if (amount <= 0) return {
|
|
31685
|
+
kind: "free",
|
|
31686
|
+
currency
|
|
31687
|
+
};
|
|
31688
|
+
return {
|
|
31689
|
+
kind: "exact",
|
|
31690
|
+
amount,
|
|
31691
|
+
currency
|
|
31692
|
+
};
|
|
31693
|
+
}
|
|
31694
|
+
function getSelectableCoursePricingOptionsForNow(course, now) {
|
|
31695
|
+
if (course.pricing.pricingStrategy !== "tiered") return [];
|
|
31696
|
+
return [...course.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
31697
|
+
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
31698
|
+
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
31699
|
+
return left.name.localeCompare(right.name);
|
|
31700
|
+
});
|
|
31701
|
+
}
|
|
31702
|
+
function resolveCoursePricingState(course, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
31703
|
+
const selectedSlidingAmount = typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null;
|
|
31704
|
+
const effectiveNowInput = typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? selectedSlidingAmountOrNowInput : nowInput;
|
|
31705
|
+
const currency = course.pricing.currency;
|
|
31706
|
+
switch (course.pricing.pricingStrategy) {
|
|
31707
|
+
case "free": return {
|
|
31708
|
+
currency,
|
|
31709
|
+
display: {
|
|
31710
|
+
kind: "free",
|
|
31711
|
+
currency
|
|
31712
|
+
},
|
|
31713
|
+
selectableOptions: [],
|
|
31714
|
+
requiresSelection: false,
|
|
31715
|
+
selectedOption: null,
|
|
31716
|
+
slidingScale: null,
|
|
31717
|
+
selectedSlidingAmount: null,
|
|
31718
|
+
selectedPriceAmount: 0,
|
|
31719
|
+
selectedRequiresPayment: false,
|
|
31720
|
+
hasPaidSelection: false,
|
|
31721
|
+
hasFreeSelection: true
|
|
31722
|
+
};
|
|
31723
|
+
case "single": {
|
|
31724
|
+
const amount = course.pricing.singlePriceAmount ?? 0;
|
|
31725
|
+
return {
|
|
31726
|
+
currency,
|
|
31727
|
+
display: toExactOrFreeDisplay(amount, currency),
|
|
31728
|
+
selectableOptions: [],
|
|
31729
|
+
requiresSelection: false,
|
|
31730
|
+
selectedOption: null,
|
|
31731
|
+
slidingScale: null,
|
|
31732
|
+
selectedSlidingAmount: null,
|
|
31733
|
+
selectedPriceAmount: amount,
|
|
31734
|
+
selectedRequiresPayment: amount > 0,
|
|
31735
|
+
hasPaidSelection: amount > 0,
|
|
31736
|
+
hasFreeSelection: amount <= 0
|
|
31737
|
+
};
|
|
31738
|
+
}
|
|
31739
|
+
case "tiered": {
|
|
31740
|
+
const selectableOptions = getSelectableCoursePricingOptionsForNow(course, resolvePlanningDateInput(effectiveNowInput));
|
|
31741
|
+
const selectedOption = (selectedPricingOptionId ? selectableOptions.find((option) => option.id === selectedPricingOptionId) : null) ?? (selectableOptions.length === 1 ? selectableOptions[0] ?? null : null);
|
|
31742
|
+
const lowestAmount = selectableOptions.reduce((lowest, option) => {
|
|
31743
|
+
if (lowest === null || option.priceAmount < lowest) return option.priceAmount;
|
|
31744
|
+
return lowest;
|
|
31745
|
+
}, null);
|
|
31746
|
+
return {
|
|
31747
|
+
currency,
|
|
31748
|
+
display: lowestAmount === null ? {
|
|
31749
|
+
kind: "unavailable",
|
|
31750
|
+
currency
|
|
31751
|
+
} : selectableOptions.length > 1 && lowestAmount > 0 ? {
|
|
31752
|
+
kind: "from",
|
|
31753
|
+
amount: lowestAmount,
|
|
31754
|
+
currency
|
|
31755
|
+
} : toExactOrFreeDisplay(lowestAmount, currency),
|
|
31756
|
+
selectableOptions,
|
|
31757
|
+
requiresSelection: selectableOptions.length > 1,
|
|
31758
|
+
selectedOption,
|
|
31759
|
+
slidingScale: null,
|
|
31760
|
+
selectedSlidingAmount: null,
|
|
31761
|
+
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
31762
|
+
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
31763
|
+
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
31764
|
+
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
31765
|
+
};
|
|
31766
|
+
}
|
|
31767
|
+
case "sliding_scale": {
|
|
31768
|
+
const minAmount = course.pricing.slidingMinAmount ?? null;
|
|
31769
|
+
const maxAmount = course.pricing.slidingMaxAmount ?? null;
|
|
31770
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return {
|
|
31771
|
+
currency,
|
|
31772
|
+
display: {
|
|
31773
|
+
kind: "unavailable",
|
|
31774
|
+
currency
|
|
31775
|
+
},
|
|
31776
|
+
selectableOptions: [],
|
|
31777
|
+
requiresSelection: true,
|
|
31778
|
+
selectedOption: null,
|
|
31779
|
+
slidingScale: null,
|
|
31780
|
+
selectedSlidingAmount: null,
|
|
31781
|
+
selectedPriceAmount: null,
|
|
31782
|
+
selectedRequiresPayment: false,
|
|
31783
|
+
hasPaidSelection: false,
|
|
31784
|
+
hasFreeSelection: false
|
|
31785
|
+
};
|
|
31786
|
+
const normalizedSelectedAmount = typeof selectedSlidingAmount === "number" && Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
31787
|
+
return {
|
|
31788
|
+
currency,
|
|
31789
|
+
display: {
|
|
31790
|
+
kind: "range",
|
|
31791
|
+
minAmount,
|
|
31792
|
+
maxAmount,
|
|
31793
|
+
currency
|
|
31794
|
+
},
|
|
31795
|
+
selectableOptions: [],
|
|
31796
|
+
requiresSelection: normalizedSelectedAmount === null,
|
|
31797
|
+
selectedOption: null,
|
|
31798
|
+
slidingScale: {
|
|
31799
|
+
minAmount,
|
|
31800
|
+
maxAmount,
|
|
31801
|
+
suggestedAmount: course.pricing.slidingSuggestedAmount ?? null
|
|
31802
|
+
},
|
|
31803
|
+
selectedSlidingAmount: normalizedSelectedAmount,
|
|
31804
|
+
selectedPriceAmount: normalizedSelectedAmount,
|
|
31805
|
+
selectedRequiresPayment: (normalizedSelectedAmount ?? 0) > 0,
|
|
31806
|
+
hasPaidSelection: maxAmount > 0,
|
|
31807
|
+
hasFreeSelection: minAmount === 0
|
|
31808
|
+
};
|
|
31809
|
+
}
|
|
31810
|
+
}
|
|
31811
|
+
}
|
|
31812
|
+
function formatCoursePriceDisplay(display, locale) {
|
|
31813
|
+
return formatBookingPriceDisplay(display, {
|
|
31814
|
+
decimals: "exact",
|
|
31815
|
+
locale
|
|
31816
|
+
});
|
|
31817
|
+
}
|
|
31818
|
+
function formatCoursePriceAmount(amount, currency, locale) {
|
|
31819
|
+
return formatCoursePriceDisplay(amount > 0 ? {
|
|
31820
|
+
kind: "exact",
|
|
31821
|
+
amount,
|
|
31822
|
+
currency
|
|
31823
|
+
} : {
|
|
31824
|
+
kind: "free",
|
|
31825
|
+
currency
|
|
31826
|
+
}, locale);
|
|
31827
|
+
}
|
|
31608
31828
|
const eventRegistrationBlockDefinition = {
|
|
31609
31829
|
manifest: createBlockManifest({
|
|
31610
31830
|
id: "block.event-registration",
|
|
@@ -31700,6 +31920,24 @@ const eventRegistrationBlockDefinition = {
|
|
|
31700
31920
|
defaultValue: true,
|
|
31701
31921
|
ui: { intent: "display" }
|
|
31702
31922
|
},
|
|
31923
|
+
{
|
|
31924
|
+
id: "showSessions",
|
|
31925
|
+
type: "boolean",
|
|
31926
|
+
label: "Show complete schedule",
|
|
31927
|
+
description: "Display every session for whole-series registrations",
|
|
31928
|
+
required: false,
|
|
31929
|
+
defaultValue: true,
|
|
31930
|
+
ui: { intent: "display" }
|
|
31931
|
+
},
|
|
31932
|
+
{
|
|
31933
|
+
id: "showPrice",
|
|
31934
|
+
type: "boolean",
|
|
31935
|
+
label: "Show price",
|
|
31936
|
+
description: "Display the whole-series price",
|
|
31937
|
+
required: false,
|
|
31938
|
+
defaultValue: true,
|
|
31939
|
+
ui: { intent: "display" }
|
|
31940
|
+
},
|
|
31703
31941
|
{
|
|
31704
31942
|
id: "successMessage",
|
|
31705
31943
|
type: "text",
|
|
@@ -31710,6 +31948,26 @@ const eventRegistrationBlockDefinition = {
|
|
|
31710
31948
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
31711
31949
|
maxLength: 500
|
|
31712
31950
|
},
|
|
31951
|
+
{
|
|
31952
|
+
id: "waitlistMessage",
|
|
31953
|
+
type: "text",
|
|
31954
|
+
label: "Waitlist message",
|
|
31955
|
+
description: "Message shown after joining a whole-series waitlist",
|
|
31956
|
+
required: false,
|
|
31957
|
+
multiline: true,
|
|
31958
|
+
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
31959
|
+
maxLength: 500
|
|
31960
|
+
},
|
|
31961
|
+
{
|
|
31962
|
+
id: "membershipMessage",
|
|
31963
|
+
type: "text",
|
|
31964
|
+
label: "Membership registration message",
|
|
31965
|
+
description: "Message shown when a whole-series place is covered by membership",
|
|
31966
|
+
required: false,
|
|
31967
|
+
multiline: true,
|
|
31968
|
+
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
31969
|
+
maxLength: 500
|
|
31970
|
+
},
|
|
31713
31971
|
{
|
|
31714
31972
|
id: "buttonText",
|
|
31715
31973
|
type: "text",
|
|
@@ -31741,8 +31999,11 @@ const eventRegistrationBlockDefinition = {
|
|
|
31741
31999
|
} },
|
|
31742
32000
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
31743
32001
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
32002
|
+
showSessions: { $bind: { from: "content.showSessions" } },
|
|
32003
|
+
showPrice: { $bind: { from: "content.showPrice" } },
|
|
31744
32004
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
31745
32005
|
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
32006
|
+
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
31746
32007
|
buttonText: { $bind: {
|
|
31747
32008
|
from: "content.buttonText",
|
|
31748
32009
|
fallback: "Complete Registration"
|
|
@@ -31756,6 +32017,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
31756
32017
|
fallback: false
|
|
31757
32018
|
} },
|
|
31758
32019
|
events: { $bind: { from: "data.events" } },
|
|
32020
|
+
wholeSeriesOffering: { $bind: { from: "data.wholeSeriesOffering.offering" } },
|
|
31759
32021
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
31760
32022
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
31761
32023
|
stage: { $bind: {
|
|
@@ -31769,9 +32031,10 @@ const eventRegistrationBlockDefinition = {
|
|
|
31769
32031
|
runtime: eventRegistrationBlockRuntime,
|
|
31770
32032
|
dataSchemas: {
|
|
31771
32033
|
events: publicEventsArraySchema.optional(),
|
|
32034
|
+
wholeSeriesOffering: z$1.object({ offering: publicCourseSchema }).optional(),
|
|
31772
32035
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
31773
32036
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
31774
|
-
occurrenceContext: occurrenceContextSchema
|
|
32037
|
+
occurrenceContext: occurrenceContextSchema.optional()
|
|
31775
32038
|
},
|
|
31776
32039
|
dataLoaders: {
|
|
31777
32040
|
events: {
|
|
@@ -31784,11 +32047,23 @@ const eventRegistrationBlockDefinition = {
|
|
|
31784
32047
|
fallback: "published"
|
|
31785
32048
|
} },
|
|
31786
32049
|
readProfile: "registration",
|
|
31787
|
-
seriesId: { $bind: { from: "$root.
|
|
32050
|
+
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
31788
32051
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
31789
32052
|
},
|
|
31790
32053
|
mode: "server"
|
|
31791
32054
|
},
|
|
32055
|
+
wholeSeriesOffering: {
|
|
32056
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
32057
|
+
params: {
|
|
32058
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
32059
|
+
eventSeriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
32060
|
+
stage: { $bind: {
|
|
32061
|
+
from: "$root.previewStage",
|
|
32062
|
+
fallback: "published"
|
|
32063
|
+
} }
|
|
32064
|
+
},
|
|
32065
|
+
mode: "server"
|
|
32066
|
+
},
|
|
31792
32067
|
sitePasses: {
|
|
31793
32068
|
endpoint: "listPublicPasses",
|
|
31794
32069
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -31802,159 +32077,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
31802
32077
|
}
|
|
31803
32078
|
};
|
|
31804
32079
|
//#endregion
|
|
31805
|
-
//#region ../blocks/src/system/blocks/courses/shared/pricing.ts
|
|
31806
|
-
function isSaleWindowOpen(option, now) {
|
|
31807
|
-
if (!option.isActive) return false;
|
|
31808
|
-
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
31809
|
-
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
31810
|
-
return true;
|
|
31811
|
-
}
|
|
31812
|
-
function toExactOrFreeDisplay(amount, currency) {
|
|
31813
|
-
if (amount <= 0) return {
|
|
31814
|
-
kind: "free",
|
|
31815
|
-
currency
|
|
31816
|
-
};
|
|
31817
|
-
return {
|
|
31818
|
-
kind: "exact",
|
|
31819
|
-
amount,
|
|
31820
|
-
currency
|
|
31821
|
-
};
|
|
31822
|
-
}
|
|
31823
|
-
function getSelectableCoursePricingOptionsForNow(course, now) {
|
|
31824
|
-
if (course.pricing.pricingStrategy !== "tiered") return [];
|
|
31825
|
-
return [...course.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
31826
|
-
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
31827
|
-
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
31828
|
-
return left.name.localeCompare(right.name);
|
|
31829
|
-
});
|
|
31830
|
-
}
|
|
31831
|
-
function resolveCoursePricingState(course, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
31832
|
-
const selectedSlidingAmount = typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null;
|
|
31833
|
-
const effectiveNowInput = typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? selectedSlidingAmountOrNowInput : nowInput;
|
|
31834
|
-
const currency = course.pricing.currency;
|
|
31835
|
-
switch (course.pricing.pricingStrategy) {
|
|
31836
|
-
case "free": return {
|
|
31837
|
-
currency,
|
|
31838
|
-
display: {
|
|
31839
|
-
kind: "free",
|
|
31840
|
-
currency
|
|
31841
|
-
},
|
|
31842
|
-
selectableOptions: [],
|
|
31843
|
-
requiresSelection: false,
|
|
31844
|
-
selectedOption: null,
|
|
31845
|
-
slidingScale: null,
|
|
31846
|
-
selectedSlidingAmount: null,
|
|
31847
|
-
selectedPriceAmount: 0,
|
|
31848
|
-
selectedRequiresPayment: false,
|
|
31849
|
-
hasPaidSelection: false,
|
|
31850
|
-
hasFreeSelection: true
|
|
31851
|
-
};
|
|
31852
|
-
case "single": {
|
|
31853
|
-
const amount = course.pricing.singlePriceAmount ?? 0;
|
|
31854
|
-
return {
|
|
31855
|
-
currency,
|
|
31856
|
-
display: toExactOrFreeDisplay(amount, currency),
|
|
31857
|
-
selectableOptions: [],
|
|
31858
|
-
requiresSelection: false,
|
|
31859
|
-
selectedOption: null,
|
|
31860
|
-
slidingScale: null,
|
|
31861
|
-
selectedSlidingAmount: null,
|
|
31862
|
-
selectedPriceAmount: amount,
|
|
31863
|
-
selectedRequiresPayment: amount > 0,
|
|
31864
|
-
hasPaidSelection: amount > 0,
|
|
31865
|
-
hasFreeSelection: amount <= 0
|
|
31866
|
-
};
|
|
31867
|
-
}
|
|
31868
|
-
case "tiered": {
|
|
31869
|
-
const selectableOptions = getSelectableCoursePricingOptionsForNow(course, resolvePlanningDateInput(effectiveNowInput));
|
|
31870
|
-
const selectedOption = (selectedPricingOptionId ? selectableOptions.find((option) => option.id === selectedPricingOptionId) : null) ?? (selectableOptions.length === 1 ? selectableOptions[0] ?? null : null);
|
|
31871
|
-
const lowestAmount = selectableOptions.reduce((lowest, option) => {
|
|
31872
|
-
if (lowest === null || option.priceAmount < lowest) return option.priceAmount;
|
|
31873
|
-
return lowest;
|
|
31874
|
-
}, null);
|
|
31875
|
-
return {
|
|
31876
|
-
currency,
|
|
31877
|
-
display: lowestAmount === null ? {
|
|
31878
|
-
kind: "unavailable",
|
|
31879
|
-
currency
|
|
31880
|
-
} : selectableOptions.length > 1 && lowestAmount > 0 ? {
|
|
31881
|
-
kind: "from",
|
|
31882
|
-
amount: lowestAmount,
|
|
31883
|
-
currency
|
|
31884
|
-
} : toExactOrFreeDisplay(lowestAmount, currency),
|
|
31885
|
-
selectableOptions,
|
|
31886
|
-
requiresSelection: selectableOptions.length > 1,
|
|
31887
|
-
selectedOption,
|
|
31888
|
-
slidingScale: null,
|
|
31889
|
-
selectedSlidingAmount: null,
|
|
31890
|
-
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
31891
|
-
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
31892
|
-
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
31893
|
-
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
31894
|
-
};
|
|
31895
|
-
}
|
|
31896
|
-
case "sliding_scale": {
|
|
31897
|
-
const minAmount = course.pricing.slidingMinAmount ?? null;
|
|
31898
|
-
const maxAmount = course.pricing.slidingMaxAmount ?? null;
|
|
31899
|
-
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return {
|
|
31900
|
-
currency,
|
|
31901
|
-
display: {
|
|
31902
|
-
kind: "unavailable",
|
|
31903
|
-
currency
|
|
31904
|
-
},
|
|
31905
|
-
selectableOptions: [],
|
|
31906
|
-
requiresSelection: true,
|
|
31907
|
-
selectedOption: null,
|
|
31908
|
-
slidingScale: null,
|
|
31909
|
-
selectedSlidingAmount: null,
|
|
31910
|
-
selectedPriceAmount: null,
|
|
31911
|
-
selectedRequiresPayment: false,
|
|
31912
|
-
hasPaidSelection: false,
|
|
31913
|
-
hasFreeSelection: false
|
|
31914
|
-
};
|
|
31915
|
-
const normalizedSelectedAmount = typeof selectedSlidingAmount === "number" && Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
31916
|
-
return {
|
|
31917
|
-
currency,
|
|
31918
|
-
display: {
|
|
31919
|
-
kind: "range",
|
|
31920
|
-
minAmount,
|
|
31921
|
-
maxAmount,
|
|
31922
|
-
currency
|
|
31923
|
-
},
|
|
31924
|
-
selectableOptions: [],
|
|
31925
|
-
requiresSelection: normalizedSelectedAmount === null,
|
|
31926
|
-
selectedOption: null,
|
|
31927
|
-
slidingScale: {
|
|
31928
|
-
minAmount,
|
|
31929
|
-
maxAmount,
|
|
31930
|
-
suggestedAmount: course.pricing.slidingSuggestedAmount ?? null
|
|
31931
|
-
},
|
|
31932
|
-
selectedSlidingAmount: normalizedSelectedAmount,
|
|
31933
|
-
selectedPriceAmount: normalizedSelectedAmount,
|
|
31934
|
-
selectedRequiresPayment: (normalizedSelectedAmount ?? 0) > 0,
|
|
31935
|
-
hasPaidSelection: maxAmount > 0,
|
|
31936
|
-
hasFreeSelection: minAmount === 0
|
|
31937
|
-
};
|
|
31938
|
-
}
|
|
31939
|
-
}
|
|
31940
|
-
}
|
|
31941
|
-
function formatCoursePriceDisplay(display, locale) {
|
|
31942
|
-
return formatBookingPriceDisplay(display, {
|
|
31943
|
-
decimals: "exact",
|
|
31944
|
-
locale
|
|
31945
|
-
});
|
|
31946
|
-
}
|
|
31947
|
-
function formatCoursePriceAmount(amount, currency, locale) {
|
|
31948
|
-
return formatCoursePriceDisplay(amount > 0 ? {
|
|
31949
|
-
kind: "exact",
|
|
31950
|
-
amount,
|
|
31951
|
-
currency
|
|
31952
|
-
} : {
|
|
31953
|
-
kind: "free",
|
|
31954
|
-
currency
|
|
31955
|
-
}, locale);
|
|
31956
|
-
}
|
|
31957
|
-
//#endregion
|
|
31958
32080
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
31959
32081
|
const courseRegistrationSourceSchema = z$1.object({
|
|
31960
32082
|
siteId: z$1.string().optional(),
|
|
@@ -32389,15 +32511,6 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
32389
32511
|
})], { gap: "lg" })
|
|
32390
32512
|
})]
|
|
32391
32513
|
});
|
|
32392
|
-
const occurrenceContextSchema = z$1.object({
|
|
32393
|
-
id: z$1.string(),
|
|
32394
|
-
seriesId: z$1.string(),
|
|
32395
|
-
startsAt: z$1.string(),
|
|
32396
|
-
endsAt: z$1.string(),
|
|
32397
|
-
timeZone: z$1.string(),
|
|
32398
|
-
capacityOverride: z$1.number().nullable().optional(),
|
|
32399
|
-
overrides: z$1.record(z$1.string(), z$1.unknown()).nullable().optional()
|
|
32400
|
-
}).nullable();
|
|
32401
32514
|
const eventAutoApplyDiscountPreviewBaseSchema = z$1.object({
|
|
32402
32515
|
id: z$1.string(),
|
|
32403
32516
|
publicLabel: z$1.string(),
|
|
@@ -32432,8 +32545,9 @@ const eventDetailsBlockDefinition = {
|
|
|
32432
32545
|
from: "$root.previewStage",
|
|
32433
32546
|
fallback: "published"
|
|
32434
32547
|
} },
|
|
32435
|
-
limit: "
|
|
32436
|
-
|
|
32548
|
+
limit: "100",
|
|
32549
|
+
readProfile: "details",
|
|
32550
|
+
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
32437
32551
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
32438
32552
|
},
|
|
32439
32553
|
mode: "server"
|
|
@@ -41170,9 +41284,6 @@ function parseSignedNewsletterDestinationRef(value) {
|
|
|
41170
41284
|
const trimmed = parseTrimmedString(value);
|
|
41171
41285
|
return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
|
|
41172
41286
|
}
|
|
41173
|
-
function parseNewsletterSignupDestinationProvider(value) {
|
|
41174
|
-
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
41175
|
-
}
|
|
41176
41287
|
function buildNewsletterSignupBlockRef(blockId) {
|
|
41177
41288
|
const parsed = parseNewsletterSignupBlockId(blockId);
|
|
41178
41289
|
return parsed ? {
|
|
@@ -41319,19 +41430,9 @@ const newsletterFieldSchema = z$1.object({
|
|
|
41319
41430
|
});
|
|
41320
41431
|
const newsletterSignupBlockIdSchema = z$1.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
41321
41432
|
const signedNewsletterDestinationRefSchema = z$1.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
41322
|
-
const
|
|
41323
|
-
tag: z$1.literal("block_ref"),
|
|
41324
|
-
blockId: newsletterSignupBlockIdSchema
|
|
41325
|
-
}), z$1.object({
|
|
41326
|
-
tag: z$1.literal("signed_destination_ref"),
|
|
41327
|
-
token: signedNewsletterDestinationRefSchema
|
|
41328
|
-
})]);
|
|
41329
|
-
const newsletterSourceSchema = z$1.object({
|
|
41330
|
-
blockId: z$1.string().nullable().optional(),
|
|
41433
|
+
const newsletterSourceCommonSchema = z$1.object({
|
|
41331
41434
|
siteId: z$1.string().optional(),
|
|
41332
41435
|
apiBaseUrl: z$1.string().optional(),
|
|
41333
|
-
listId: z$1.string().nullable().optional(),
|
|
41334
|
-
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
41335
41436
|
preset: newsletterPresetSchema.optional(),
|
|
41336
41437
|
includePhone: z$1.boolean().optional(),
|
|
41337
41438
|
buttonLabel: z$1.string().nullable().optional(),
|
|
@@ -41342,6 +41443,25 @@ const newsletterSourceSchema = z$1.object({
|
|
|
41342
41443
|
spamProtectionEnabled: z$1.boolean().optional(),
|
|
41343
41444
|
className: z$1.string().nullable().optional()
|
|
41344
41445
|
});
|
|
41446
|
+
const newsletterSourceSchema = z$1.discriminatedUnion("source", [
|
|
41447
|
+
newsletterSourceCommonSchema.extend({
|
|
41448
|
+
source: z$1.literal("block"),
|
|
41449
|
+
blockId: z$1.string().nullable().optional(),
|
|
41450
|
+
listId: z$1.string().nullable().optional(),
|
|
41451
|
+
destinationProvider: newsletterDestinationProviderSchema.nullable().optional()
|
|
41452
|
+
}),
|
|
41453
|
+
newsletterSourceCommonSchema.extend({
|
|
41454
|
+
source: z$1.literal("signed-footer"),
|
|
41455
|
+
destinationRef: z$1.object({
|
|
41456
|
+
tag: z$1.literal("signed_destination_ref"),
|
|
41457
|
+
token: signedNewsletterDestinationRefSchema
|
|
41458
|
+
})
|
|
41459
|
+
}),
|
|
41460
|
+
newsletterSourceCommonSchema.extend({
|
|
41461
|
+
source: z$1.literal("legacy-direct-list"),
|
|
41462
|
+
listId: z$1.string().nullable()
|
|
41463
|
+
})
|
|
41464
|
+
]);
|
|
41345
41465
|
const newsletterDisplaySchema = z$1.object({
|
|
41346
41466
|
kind: z$1.literal("newsletter-form"),
|
|
41347
41467
|
className: z$1.string().nullable(),
|
|
@@ -41352,8 +41472,26 @@ const newsletterDisplaySchema = z$1.object({
|
|
|
41352
41472
|
fields: z$1.array(newsletterFieldSchema)
|
|
41353
41473
|
});
|
|
41354
41474
|
const newsletterHydrationSchema = z$1.object({
|
|
41355
|
-
|
|
41356
|
-
|
|
41475
|
+
target: z$1.discriminatedUnion("tag", [
|
|
41476
|
+
z$1.object({
|
|
41477
|
+
tag: z$1.literal("block-source"),
|
|
41478
|
+
destinationRef: z$1.object({
|
|
41479
|
+
tag: z$1.literal("block_ref"),
|
|
41480
|
+
blockId: newsletterSignupBlockIdSchema
|
|
41481
|
+
}).nullable()
|
|
41482
|
+
}),
|
|
41483
|
+
z$1.object({
|
|
41484
|
+
tag: z$1.literal("signed-footer-source"),
|
|
41485
|
+
destinationRef: z$1.object({
|
|
41486
|
+
tag: z$1.literal("signed_destination_ref"),
|
|
41487
|
+
token: signedNewsletterDestinationRefSchema
|
|
41488
|
+
})
|
|
41489
|
+
}),
|
|
41490
|
+
z$1.object({
|
|
41491
|
+
tag: z$1.literal("legacy-direct-list"),
|
|
41492
|
+
listId: z$1.string().nullable()
|
|
41493
|
+
})
|
|
41494
|
+
]),
|
|
41357
41495
|
preset: newsletterPresetSchema,
|
|
41358
41496
|
includePhone: z$1.boolean(),
|
|
41359
41497
|
tags: z$1.string().nullable().optional(),
|
|
@@ -41387,20 +41525,43 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
41387
41525
|
render: createZodCodec(newsletterRenderSchema)
|
|
41388
41526
|
},
|
|
41389
41527
|
buildRender: (source) => {
|
|
41390
|
-
const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
|
|
41528
|
+
const runtimeSource = source.source === "block" ? deriveNewsletterSignupRuntimeSource(source) : null;
|
|
41391
41529
|
return {
|
|
41392
41530
|
display: buildNewsletterDisplay(source),
|
|
41393
41531
|
hydration: {
|
|
41394
|
-
|
|
41395
|
-
listId: runtimeSource.listId,
|
|
41532
|
+
target: projectNewsletterFormHydrationTarget(source),
|
|
41396
41533
|
preset: source.preset ?? "emailOnly",
|
|
41397
41534
|
includePhone: source.includePhone ?? false,
|
|
41398
|
-
tags: runtimeSource.tags,
|
|
41535
|
+
tags: runtimeSource ? runtimeSource.tags : source.tags,
|
|
41399
41536
|
spamProtectionEnabled: source.spamProtectionEnabled
|
|
41400
41537
|
}
|
|
41401
41538
|
};
|
|
41402
41539
|
}
|
|
41403
41540
|
});
|
|
41541
|
+
function projectNewsletterFormHydrationTarget(source) {
|
|
41542
|
+
switch (source.source) {
|
|
41543
|
+
case "block": {
|
|
41544
|
+
const destinationRef = buildNewsletterSignupBlockRef(source.blockId);
|
|
41545
|
+
if (destinationRef?.tag === "block_ref") return {
|
|
41546
|
+
tag: "block-source",
|
|
41547
|
+
destinationRef
|
|
41548
|
+
};
|
|
41549
|
+
return {
|
|
41550
|
+
tag: "legacy-direct-list",
|
|
41551
|
+
listId: source.listId ?? null
|
|
41552
|
+
};
|
|
41553
|
+
}
|
|
41554
|
+
case "signed-footer": return {
|
|
41555
|
+
tag: "signed-footer-source",
|
|
41556
|
+
destinationRef: source.destinationRef
|
|
41557
|
+
};
|
|
41558
|
+
case "legacy-direct-list": return {
|
|
41559
|
+
tag: "legacy-direct-list",
|
|
41560
|
+
listId: source.listId
|
|
41561
|
+
};
|
|
41562
|
+
default: return assertNever$4(source);
|
|
41563
|
+
}
|
|
41564
|
+
}
|
|
41404
41565
|
function buildNewsletterFormInteractiveIslandProps(props) {
|
|
41405
41566
|
return buildInteractiveIslandProps({
|
|
41406
41567
|
runtime: newsletterFormBlockRuntime,
|
|
@@ -45785,6 +45946,33 @@ function uniqByOccurrenceId(events) {
|
|
|
45785
45946
|
}
|
|
45786
45947
|
return out;
|
|
45787
45948
|
}
|
|
45949
|
+
function selectFromOccurrenceContext(events, occurrenceContext) {
|
|
45950
|
+
if (!occurrenceContext) return null;
|
|
45951
|
+
const byId = events.find((event) => event.occurrenceId === occurrenceContext.id || event.id === occurrenceContext.id);
|
|
45952
|
+
if (byId) return byId;
|
|
45953
|
+
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
45954
|
+
startsAt: occurrenceContext.startsAt,
|
|
45955
|
+
timeZone: occurrenceContext.timeZone
|
|
45956
|
+
}));
|
|
45957
|
+
return events.find((event) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
45958
|
+
startsAt: event.startsAt,
|
|
45959
|
+
timeZone: event.timeZone
|
|
45960
|
+
})) === contextDate) ?? null;
|
|
45961
|
+
}
|
|
45962
|
+
function selectNextUpcoming(events, nowIso) {
|
|
45963
|
+
return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
|
|
45964
|
+
}
|
|
45965
|
+
function selectCompletedWholeSeries(events) {
|
|
45966
|
+
if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
|
|
45967
|
+
return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
|
|
45968
|
+
}
|
|
45969
|
+
function selectRelatedDates(input) {
|
|
45970
|
+
if (!input.seriesId) return [];
|
|
45971
|
+
const isWholeSeries = input.selected?.bookingScope === "whole_series";
|
|
45972
|
+
const selectedOccurrenceId = input.selected ? input.selected.occurrenceId || input.selected.id : null;
|
|
45973
|
+
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));
|
|
45974
|
+
return isWholeSeries ? dates : dates.slice(0, input.limit);
|
|
45975
|
+
}
|
|
45788
45976
|
function selectEventDetails(args) {
|
|
45789
45977
|
const all = uniqByOccurrenceId(resolveEventRegistrationScopedEvents((args.events ?? []).filter(Boolean), {
|
|
45790
45978
|
occurrenceContext: args.occurrenceContext,
|
|
@@ -45792,37 +45980,22 @@ function selectEventDetails(args) {
|
|
|
45792
45980
|
}));
|
|
45793
45981
|
const occurrenceContext = args.occurrenceContext ?? null;
|
|
45794
45982
|
const otherLimit = parseLimit$1(args.otherDatesLimit, 5);
|
|
45795
|
-
const selectedFromContext = (
|
|
45796
|
-
|
|
45797
|
-
|
|
45798
|
-
|
|
45799
|
-
|
|
45800
|
-
startsAt: occurrenceContext.startsAt,
|
|
45801
|
-
timeZone: occurrenceContext.timeZone
|
|
45802
|
-
}));
|
|
45803
|
-
return all.find((e) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
45804
|
-
startsAt: e.startsAt,
|
|
45805
|
-
timeZone: e.timeZone
|
|
45806
|
-
})) === ctxDate) ?? null;
|
|
45807
|
-
})();
|
|
45808
|
-
const nextUpcoming = (() => {
|
|
45809
|
-
const upcoming = all.filter((e) => isFutureOrNow(e.startsAt, args.nowIso));
|
|
45810
|
-
upcoming.sort((a, b) => Date.parse(a.startsAt) - Date.parse(b.startsAt));
|
|
45811
|
-
return upcoming[0] ?? null;
|
|
45812
|
-
})();
|
|
45813
|
-
const mode = selectedFromContext ? "selected" : "next";
|
|
45814
|
-
const selected = selectedFromContext ?? nextUpcoming;
|
|
45983
|
+
const selectedFromContext = selectFromOccurrenceContext(all, occurrenceContext);
|
|
45984
|
+
const nextUpcoming = selectNextUpcoming(all, args.nowIso);
|
|
45985
|
+
const completedWholeSeries = selectCompletedWholeSeries(all);
|
|
45986
|
+
const selected = selectedFromContext ?? nextUpcoming ?? completedWholeSeries;
|
|
45987
|
+
const mode = selectedFromContext ? "selected" : nextUpcoming ? "next" : completedWholeSeries ? "completed" : "next";
|
|
45815
45988
|
const timeZone = toBookingTimeZone(selected?.timeZone ?? all[0]?.timeZone ?? null);
|
|
45816
|
-
const seriesId = occurrenceContext?.seriesId ?? selected?.seriesId ?? all[0]?.seriesId ?? null;
|
|
45817
|
-
const selectedOccurrenceId = selected?.occurrenceId ?? null;
|
|
45818
45989
|
return {
|
|
45819
45990
|
mode,
|
|
45820
45991
|
selected,
|
|
45821
|
-
otherDates:
|
|
45822
|
-
|
|
45823
|
-
|
|
45824
|
-
|
|
45825
|
-
|
|
45992
|
+
otherDates: selectRelatedDates({
|
|
45993
|
+
events: all,
|
|
45994
|
+
seriesId: occurrenceContext?.seriesId ?? selected?.seriesId ?? all[0]?.seriesId ?? null,
|
|
45995
|
+
selected,
|
|
45996
|
+
nowIso: args.nowIso,
|
|
45997
|
+
limit: otherLimit
|
|
45998
|
+
}),
|
|
45826
45999
|
timeZone
|
|
45827
46000
|
};
|
|
45828
46001
|
}
|
|
@@ -45967,7 +46140,7 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing }) {
|
|
|
45967
46140
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
45968
46141
|
/* @__PURE__ */ jsx("div", {
|
|
45969
46142
|
className: "rb-label rb-mb-2",
|
|
45970
|
-
children: selection.mode === "next" ? "Next date" : "Date"
|
|
46143
|
+
children: selected.bookingScope === "whole_series" ? selection.mode === "next" ? "Next session" : "Selected session" : selection.mode === "next" ? "Next date" : "Date"
|
|
45971
46144
|
}),
|
|
45972
46145
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }),
|
|
45973
46146
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -46005,18 +46178,27 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing }) {
|
|
|
46005
46178
|
}) : null] }, member.id))
|
|
46006
46179
|
})]
|
|
46007
46180
|
}) : null,
|
|
46008
|
-
pricing
|
|
46181
|
+
pricing,
|
|
46182
|
+
selected.bookingScope === "whole_series" ? /* @__PURE__ */ jsxs("div", {
|
|
46183
|
+
className: "rb-mt-6",
|
|
46184
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
46185
|
+
className: "rb-label rb-mb-2",
|
|
46186
|
+
children: "Registration"
|
|
46187
|
+
}), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: selected.wholeSeries?.enrollmentOpen ? "Open" : "Closed" }) })]
|
|
46188
|
+
}) : null
|
|
46009
46189
|
]
|
|
46010
46190
|
});
|
|
46011
46191
|
}
|
|
46012
46192
|
function OtherEventDates({ selection }) {
|
|
46013
|
-
|
|
46193
|
+
const isWholeSeries = selection.selected?.bookingScope === "whole_series";
|
|
46194
|
+
const dates = isWholeSeries && selection.selected ? [selection.selected, ...selection.otherDates].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt)) : selection.otherDates;
|
|
46195
|
+
if (dates.length === 0) return null;
|
|
46014
46196
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
46015
46197
|
className: "rb-label",
|
|
46016
|
-
children: "Other dates"
|
|
46198
|
+
children: isWholeSeries ? "Session schedule" : "Other dates"
|
|
46017
46199
|
}), /* @__PURE__ */ jsx("div", {
|
|
46018
46200
|
className: "rb-mt-2 rb-tiles-grid",
|
|
46019
|
-
children:
|
|
46201
|
+
children: dates.map((event) => /* @__PURE__ */ jsx("a", {
|
|
46020
46202
|
className: "rb-tile rb-tile--interactive",
|
|
46021
46203
|
...resolveEventLinkProps(event),
|
|
46022
46204
|
children: /* @__PURE__ */ jsx(DateTimeTile, {
|
|
@@ -49215,13 +49397,13 @@ const FormNodeSSR = ({ blockId, value, submitLabel, successMessage, className, o
|
|
|
49215
49397
|
* Renders the newsletter signup form for SSR with hydration support.
|
|
49216
49398
|
* Uses the islands architecture pattern to hydrate on the client.
|
|
49217
49399
|
*/
|
|
49218
|
-
function NewsletterFormSSR(
|
|
49400
|
+
function NewsletterFormSSR(props) {
|
|
49401
|
+
const { siteId, apiBaseUrl, preset = "emailOnly", includePhone, buttonLabel = "Subscribe", buttonVariant = "primary", successMessage, privacyNote, tags, spamProtectionEnabled, className } = props;
|
|
49402
|
+
const blockId = props.source === "block" ? props.blockId : null;
|
|
49219
49403
|
const islandProps = buildNewsletterFormInteractiveIslandProps({
|
|
49220
|
-
|
|
49404
|
+
...props,
|
|
49221
49405
|
siteId,
|
|
49222
49406
|
apiBaseUrl,
|
|
49223
|
-
listId,
|
|
49224
|
-
destinationProvider,
|
|
49225
49407
|
preset,
|
|
49226
49408
|
includePhone,
|
|
49227
49409
|
buttonLabel,
|
|
@@ -51477,30 +51659,24 @@ const NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES = [
|
|
|
51477
51659
|
];
|
|
51478
51660
|
//#endregion
|
|
51479
51661
|
//#region ../theme-core/src/header/surfaceRules.ts
|
|
51480
|
-
/** Compile the
|
|
51481
|
-
function buildHeaderSurfaceRules(header, tokens
|
|
51662
|
+
/** Compile the at-rest surface independently of scroll treatment and paint geometry. */
|
|
51663
|
+
function buildHeaderSurfaceRules(header, tokens) {
|
|
51482
51664
|
const base = [];
|
|
51483
|
-
const scrolled = [];
|
|
51484
51665
|
const background = header.background;
|
|
51485
51666
|
if (background.type === "color") base.push(`background-color: ${tokens.getColor(background.color || "surface")};`);
|
|
51486
51667
|
else if (background.type === "gradient" && background.gradient) {
|
|
51487
51668
|
const stops = background.gradient.stops.map((stop) => tokens.getColor(stop.color)).join(", ");
|
|
51488
51669
|
base.push(`background-image: linear-gradient(${background.gradient.angle ?? 180}deg, ${stops});`);
|
|
51489
51670
|
}
|
|
51490
|
-
const blurRules = [`backdrop-filter: ${blur};`, `-webkit-backdrop-filter: ${blur};`];
|
|
51491
|
-
base.push(...blurRules);
|
|
51492
|
-
scrolled.push(...blurRules);
|
|
51493
51671
|
const borderWidth = getComponentBorderWidthPx(header.border?.width ?? "none");
|
|
51494
51672
|
if (!header.border || borderWidth === "0") return {
|
|
51495
51673
|
base,
|
|
51496
|
-
scrolled,
|
|
51497
51674
|
border: []
|
|
51498
51675
|
};
|
|
51499
51676
|
const color = rgbColorValue(header.border.colorToken?.trim() || "border");
|
|
51500
51677
|
const style = header.border.style === "dashed" ? "dashed" : "solid";
|
|
51501
51678
|
return {
|
|
51502
51679
|
base,
|
|
51503
|
-
scrolled,
|
|
51504
51680
|
border: header.border.position === "both" ? [`border-top: ${borderWidth} ${style} ${color};`, `border-bottom: ${borderWidth} ${style} ${color};`] : [`border-${header.border.position}: ${borderWidth} ${style} ${color};`]
|
|
51505
51681
|
};
|
|
51506
51682
|
}
|
|
@@ -51810,13 +51986,12 @@ function generateHeaderRootStyles(header, themeId, tokens) {
|
|
|
51810
51986
|
rules.push("isolation: isolate;");
|
|
51811
51987
|
const surfaceRules = isContainedNav ? {
|
|
51812
51988
|
base: [],
|
|
51813
|
-
scrolled: [],
|
|
51814
51989
|
border: []
|
|
51815
|
-
} : buildHeaderSurfaceRules(header, tokens
|
|
51990
|
+
} : buildHeaderSurfaceRules(header, tokens);
|
|
51816
51991
|
const floatingSurfaceBorder = header.variant === "floating";
|
|
51817
51992
|
if (!floatingSurfaceBorder) rules.push(...surfaceRules.border);
|
|
51818
51993
|
const basePaintRules = floatingSurfaceBorder ? [...surfaceRules.base, ...surfaceRules.border] : surfaceRules.base;
|
|
51819
|
-
const scrolledPaintRules = floatingSurfaceBorder ?
|
|
51994
|
+
const scrolledPaintRules = floatingSurfaceBorder ? surfaceRules.border : [];
|
|
51820
51995
|
if (header.positioning === "sticky" || header.positioning === "fixed") {
|
|
51821
51996
|
const shadowVar = getComponentShadowVar(header.shadow?.elevation ?? "none");
|
|
51822
51997
|
if (shadowVar) rules.push(`box-shadow: ${shadowVar};`);
|
|
@@ -68442,8 +68617,7 @@ function toBlocksBlockOverrides(overrides) {
|
|
|
68442
68617
|
};
|
|
68443
68618
|
return result;
|
|
68444
68619
|
}
|
|
68445
|
-
function
|
|
68446
|
-
if (!dataContext) return void 0;
|
|
68620
|
+
function toBlocksPageRendererDataContext(dataContext) {
|
|
68447
68621
|
return {
|
|
68448
68622
|
...dataContext,
|
|
68449
68623
|
mediaAssets: toBlocksMediaAssets(dataContext.mediaAssets),
|
|
@@ -68456,7 +68630,7 @@ function PageRenderer(props) {
|
|
|
68456
68630
|
const blocksProps = {
|
|
68457
68631
|
...props,
|
|
68458
68632
|
theme: blocksTheme,
|
|
68459
|
-
dataContext:
|
|
68633
|
+
dataContext: props.dataContext ? toBlocksPageRendererDataContext(props.dataContext) : void 0,
|
|
68460
68634
|
blockOverrides: toBlocksBlockOverrides(props.blockOverrides),
|
|
68461
68635
|
sdkConfig: blocksSdkConfig,
|
|
68462
68636
|
customBlocks: normalizeSdkCustomBlocks(props.customBlocks)
|
|
@@ -69132,7 +69306,7 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
69132
69306
|
try {
|
|
69133
69307
|
apiBaseUrl = getRiverbankEnv().baseUrl;
|
|
69134
69308
|
} catch {}
|
|
69135
|
-
const
|
|
69309
|
+
const sharedViewModelOverrides = {
|
|
69136
69310
|
$root: {
|
|
69137
69311
|
siteId: site.id,
|
|
69138
69312
|
apiBaseUrl,
|
|
@@ -69145,14 +69319,24 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
69145
69319
|
site,
|
|
69146
69320
|
menu: menuViewModel,
|
|
69147
69321
|
footerMenu: footerMenuViewModel,
|
|
69148
|
-
legalFooterMenu: legalFooterMenuViewModel
|
|
69322
|
+
legalFooterMenu: legalFooterMenuViewModel
|
|
69323
|
+
};
|
|
69324
|
+
const headerViewModelOverrides = {
|
|
69325
|
+
...sharedViewModelOverrides,
|
|
69149
69326
|
content: { logo: logoViewModel }
|
|
69150
69327
|
};
|
|
69328
|
+
const footerViewModelOverrides = {
|
|
69329
|
+
...sharedViewModelOverrides,
|
|
69330
|
+
content: {
|
|
69331
|
+
...layout.footer,
|
|
69332
|
+
logo: logoViewModel
|
|
69333
|
+
}
|
|
69334
|
+
};
|
|
69151
69335
|
let headerElement = null;
|
|
69152
69336
|
if (header === true) headerElement = renderBlock(siteHeaderManifest, headerContent, {
|
|
69153
69337
|
theme: builtThemeRuntime.tokens,
|
|
69154
69338
|
themeConfig: blocksThemeWithVariant,
|
|
69155
|
-
viewModelOverrides
|
|
69339
|
+
viewModelOverrides: headerViewModelOverrides
|
|
69156
69340
|
});
|
|
69157
69341
|
else if (typeof header === "function") headerElement = header(headerData);
|
|
69158
69342
|
let footerElement = null;
|
|
@@ -69187,7 +69371,7 @@ async function Layout({ siteData: providedSiteData, client, siteId, slug, domain
|
|
|
69187
69371
|
const defaultFooterElement = footerPlan.renderDefaultFooter ? renderBlock(siteFooterManifest, layout.footer, {
|
|
69188
69372
|
theme: builtThemeRuntime.tokens,
|
|
69189
69373
|
themeConfig: blocksTheme,
|
|
69190
|
-
viewModelOverrides
|
|
69374
|
+
viewModelOverrides: footerViewModelOverrides
|
|
69191
69375
|
}) : null;
|
|
69192
69376
|
footerElement = footerPlan.mode === "default+blocks" ? /* @__PURE__ */ jsxs(Fragment, { children: [footerBlocksElement, defaultFooterElement] }) : footerPlan.mode === "blocks" ? footerBlocksElement : footerPlan.mode === "none" ? null : defaultFooterElement;
|
|
69193
69377
|
} else if (typeof footer === "function") footerElement = footer(footerData);
|
|
@@ -69497,6 +69681,7 @@ const SUPPORTED_LOADER_ENDPOINTS$1 = [
|
|
|
69497
69681
|
"listPublicRecurringSchedule",
|
|
69498
69682
|
"getPublicEventDetails",
|
|
69499
69683
|
"listPublicWholeSeriesOfferings",
|
|
69684
|
+
"getPublicWholeSeriesOffering",
|
|
69500
69685
|
"listPublicRouteCandidates",
|
|
69501
69686
|
"listPublicTeamMembers",
|
|
69502
69687
|
"listPublicProducts",
|
|
@@ -71922,6 +72107,7 @@ const loaderAdapters = {
|
|
|
71922
72107
|
listPublicEvents,
|
|
71923
72108
|
listPublicRecurringSchedule,
|
|
71924
72109
|
getPublicEventDetails,
|
|
72110
|
+
getPublicWholeSeriesOffering,
|
|
71925
72111
|
listPublicRouteCandidates,
|
|
71926
72112
|
listPublicTeamMembers,
|
|
71927
72113
|
listPublicProducts,
|
|
@@ -72016,6 +72202,13 @@ async function listPublicEvents({ client, params }) {
|
|
|
72016
72202
|
async function listPublicRecurringSchedule(input) {
|
|
72017
72203
|
return projectRecurringSchedule(await listPublicEvents(input));
|
|
72018
72204
|
}
|
|
72205
|
+
async function getPublicWholeSeriesOffering({ client, params }) {
|
|
72206
|
+
return await client.getPublicWholeSeriesOffering({
|
|
72207
|
+
siteId: requireStringParam(params, "siteId", "getPublicWholeSeriesOffering"),
|
|
72208
|
+
eventSeriesId: requireStringParam(params, "eventSeriesId", "getPublicWholeSeriesOffering"),
|
|
72209
|
+
stage: readStringParam(params, "stage")
|
|
72210
|
+
});
|
|
72211
|
+
}
|
|
72019
72212
|
async function getPublicEventDetails({ client, params }) {
|
|
72020
72213
|
return await client.getPublicEventDetails({
|
|
72021
72214
|
siteId: requireStringParam(params, "siteId", "getPublicEventDetails"),
|