@riverbankcms/sdk 0.127.0 → 0.129.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/README.md +33 -0
- package/dist/{PreviewEditorSidebar-BXtfF7tp.mjs → PreviewEditorSidebar-B43CJ0g_.mjs} +9 -33
- package/dist/{PreviewEditorUI-Dou73Q0K.mjs → PreviewEditorUI-DHirVkeM.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DgFDIwvK.mjs → PreviewQueryProvider-B1kbhaJD.mjs} +1 -1
- package/dist/SdkPreviewModeRuntime-BJumZy1B.mjs +11209 -0
- package/dist/{SiteChromeCustomizeContext-DZiDBAYu.mjs → SiteChromeCustomizeContext-D9SlpwEj.mjs} +31757 -1621
- 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/PageRenderer.d.ts +20 -10
- 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/index.d.ts +2 -1
- package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +30 -0
- package/dist/_dts/blocks/src/pageRenderingMode.d.ts +37 -0
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -1
- package/dist/_dts/blocks/src/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 +73 -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/pageDesignRuntimePreview.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/blocks/previewBatchLoaderParams.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +47 -47
- 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 +19 -7
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +30 -23
- package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +18 -5
- package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +9 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +21 -6
- package/dist/_dts/preview-next/src/client/sdk-runtime.d.ts +8 -8
- 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/next/catch-all.d.ts +6 -0
- package/dist/_dts/sdk/src/next/index.d.ts +2 -1
- package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +33 -0
- package/dist/_dts/sdk/src/next/types.d.ts +23 -9
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +4 -6
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +3 -3
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- 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 +32 -3
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +13 -2
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +31 -18
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +20 -9
- package/dist/_dts/sdk/src/rendering/index.d.ts +8 -4
- package/dist/_dts/sdk/src/rendering/mediaAssets.d.ts +8 -2
- package/dist/_dts/sdk/src/rendering/renderingMode.d.ts +23 -0
- package/dist/_dts/sdk/src/rendering/server.d.ts +5 -3
- package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +6 -0
- 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 +5535 -4835
- package/dist/cli/init-docs/content/workflow-preview-mode.md +24 -11
- 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 +5324 -4942
- 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 +6026 -5596
- 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 +11 -4
- 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-CfZd5pAm.mjs} +2 -2
- package/dist/{separator-CFvBx2yl.mjs → separator-DkTe68HE.mjs} +1 -1
- package/dist/server/components.mjs +950 -639
- 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 +1181 -835
- package/dist/server/page-converter.mjs +211 -64
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +974 -637
- package/dist/server/rendering.mjs +980 -644
- 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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CiTuhUwY.mjs";
|
|
2
|
+
import { t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
3
|
+
import { o as CourseRegistrationErrorBoundary, t as CourseRegistrationWizard } from "./CourseRegistrationWizard-xRmA7REV.mjs";
|
|
4
|
+
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
5
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
6
|
+
import "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
//#region ../blocks/src/system/runtime/nodes/course-registration.client.tsx
|
|
9
|
+
function toCourseRegistrationClientProps(props) {
|
|
10
|
+
return {
|
|
11
|
+
...props.render.hydration,
|
|
12
|
+
buttonText: props.render.display.summaryButtonText,
|
|
13
|
+
className: props.render.display.className ?? void 0
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function CourseRegistrationClient(props) {
|
|
17
|
+
return /* @__PURE__ */ jsx(CourseRegistrationErrorBoundary, {
|
|
18
|
+
className: props.className,
|
|
19
|
+
children: /* @__PURE__ */ jsx(CourseRegistrationWizard, { ...props })
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function CourseRegistrationIslandClient(props) {
|
|
23
|
+
return /* @__PURE__ */ jsx(CourseRegistrationClient, { ...toCourseRegistrationClientProps(props) });
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/rendering/islands/enhancers/courseRegistration.tsx
|
|
27
|
+
const decode = defineIslandPropsDecoder("course-registration");
|
|
28
|
+
const enhance = (root, props) => {
|
|
29
|
+
const { siteId, apiBaseUrl, stage, portalToken } = props;
|
|
30
|
+
if (!siteId) throw new Error("[sdk:islands] course-registration requires siteId");
|
|
31
|
+
if (!apiBaseUrl) throw new Error("[sdk:islands] course-registration requires apiBaseUrl");
|
|
32
|
+
const apiConfig = buildRouteIslandApiConfig({
|
|
33
|
+
apiBaseUrl,
|
|
34
|
+
portalToken,
|
|
35
|
+
siteId,
|
|
36
|
+
stage
|
|
37
|
+
});
|
|
38
|
+
return mountReactIsland(root, ({ root: reactRoot }) => {
|
|
39
|
+
reactRoot.render(/* @__PURE__ */ jsx(BlockApiProvider, {
|
|
40
|
+
config: apiConfig,
|
|
41
|
+
children: /* @__PURE__ */ jsx(CourseRegistrationIslandClient, { ...props })
|
|
42
|
+
}));
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { decode, enhance };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as clsx } from "./clsx-DgIEfj3H.mjs";
|
|
3
|
-
import { E as getEventRuntimeFiltersKey, F as formatEventTeacherLine, G as getLocalDateKey, I as formatTime, K as getLocalMinuteOfDay, T as buildEventRuntimeFilters, U as getEventAvailability, V as resolveEventLinkProps, W as getEventAvailabilityStatus, X as themeButtonClassName, t as defineIslandPropsDecoder, w as buildEventCalendarListingRender, z as groupEventsByDate } from "./propsDecoder-
|
|
4
|
-
import { o as EventFilters, t as useEventFilters } from "./useEventFilters-
|
|
5
|
-
import { a as CalendarDayCell, c as useCalendarEvents, d as getOrderedDayNames, f as getWeekCalendarDayTuple, h as isToday, i as WeekAgendaView, l as MONTH_NAMES, m as isSameLocalDay, o as EventModalProvider, p as getWeekCalendarDays, r as EventModals, s as useEventModal, t as EventCombinedClient, u as formatDateKey } from "./EventCombined.client-
|
|
3
|
+
import { E as getEventRuntimeFiltersKey, F as formatEventTeacherLine, G as getLocalDateKey, I as formatTime, K as getLocalMinuteOfDay, T as buildEventRuntimeFilters, U as getEventAvailability, V as resolveEventLinkProps, W as getEventAvailabilityStatus, X as themeButtonClassName, t as defineIslandPropsDecoder, w as buildEventCalendarListingRender, z as groupEventsByDate } from "./propsDecoder-CiTuhUwY.mjs";
|
|
4
|
+
import { o as EventFilters, t as useEventFilters } from "./useEventFilters-QZ3HMgaJ.mjs";
|
|
5
|
+
import { a as CalendarDayCell, c as useCalendarEvents, d as getOrderedDayNames, f as getWeekCalendarDayTuple, h as isToday, i as WeekAgendaView, l as MONTH_NAMES, m as isSameLocalDay, o as EventModalProvider, p as getWeekCalendarDays, r as EventModals, s as useEventModal, t as EventCombinedClient, u as formatDateKey } from "./EventCombined.client-BgVnVTlz.mjs";
|
|
6
6
|
import { t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
7
7
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
8
8
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
9
|
-
import { n as EventListingController } from "./EventListing.client-
|
|
9
|
+
import { n as EventListingController } from "./EventListing.client-CqdsO7jO.mjs";
|
|
10
10
|
import { useEffect, useId, useMemo, useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region ../calendar/src/lane-packing.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { n as EventCombinedIslandClient } from "./EventCombined.client-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CiTuhUwY.mjs";
|
|
2
|
+
import { n as EventCombinedIslandClient } from "./EventCombined.client-BgVnVTlz.mjs";
|
|
3
3
|
import { t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
4
4
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
5
5
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Ft as toBookingTimeZone, H as resolveRuntimeEventPricing, It as toScheduledBookingDateTime, M as formatEventDateParts, Mt as getBookingLocalDateKey, N as formatEventPrice, V as resolveEventLinkProps, Vt as publicEventPricingType, Wt as formatCurrencyAmount, Y as resolveEventRegistrationScopedEvents, t as defineIslandPropsDecoder, zt as publicEventPricingCurrency } from "./propsDecoder-
|
|
2
|
-
import { n as formatCoursePriceDisplay, r as resolveCoursePricingState, t as formatCoursePriceAmount } from "./pricing-
|
|
1
|
+
import { Ft as toBookingTimeZone, H as resolveRuntimeEventPricing, It as toScheduledBookingDateTime, M as formatEventDateParts, Mt as getBookingLocalDateKey, N as formatEventPrice, V as resolveEventLinkProps, Vt as publicEventPricingType, Wt as formatCurrencyAmount, Y as resolveEventRegistrationScopedEvents, t as defineIslandPropsDecoder, zt as publicEventPricingCurrency } from "./propsDecoder-CiTuhUwY.mjs";
|
|
2
|
+
import { n as formatCoursePriceDisplay, r as resolveCoursePricingState, t as formatCoursePriceAmount } from "./pricing-DGuNR1W4.mjs";
|
|
3
3
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
4
4
|
import { n as filterPassesForEvent, t as filterMembershipsForEvent } from "./eventProductEligibility-AVxyCB1u.mjs";
|
|
5
|
-
import { t as LeafletStaticMap } from "./LeafletStaticMap-
|
|
5
|
+
import { t as LeafletStaticMap } from "./LeafletStaticMap-CKPxot9M.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region ../blocks/src/system/runtime/nodes/event-details/logic.ts
|
|
@@ -27,6 +27,33 @@ function uniqByOccurrenceId(events) {
|
|
|
27
27
|
}
|
|
28
28
|
return out;
|
|
29
29
|
}
|
|
30
|
+
function selectFromOccurrenceContext(events, occurrenceContext) {
|
|
31
|
+
if (!occurrenceContext) return null;
|
|
32
|
+
const byId = events.find((event) => event.occurrenceId === occurrenceContext.id || event.id === occurrenceContext.id);
|
|
33
|
+
if (byId) return byId;
|
|
34
|
+
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
35
|
+
startsAt: occurrenceContext.startsAt,
|
|
36
|
+
timeZone: occurrenceContext.timeZone
|
|
37
|
+
}));
|
|
38
|
+
return events.find((event) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
39
|
+
startsAt: event.startsAt,
|
|
40
|
+
timeZone: event.timeZone
|
|
41
|
+
})) === contextDate) ?? null;
|
|
42
|
+
}
|
|
43
|
+
function selectNextUpcoming(events, nowIso) {
|
|
44
|
+
return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
|
|
45
|
+
}
|
|
46
|
+
function selectCompletedWholeSeries(events) {
|
|
47
|
+
if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
|
|
48
|
+
return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
|
|
49
|
+
}
|
|
50
|
+
function selectRelatedDates(input) {
|
|
51
|
+
if (!input.seriesId) return [];
|
|
52
|
+
const isWholeSeries = input.selected?.bookingScope === "whole_series";
|
|
53
|
+
const selectedOccurrenceId = input.selected ? input.selected.occurrenceId || input.selected.id : null;
|
|
54
|
+
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));
|
|
55
|
+
return isWholeSeries ? dates : dates.slice(0, input.limit);
|
|
56
|
+
}
|
|
30
57
|
function selectEventDetails(args) {
|
|
31
58
|
const all = uniqByOccurrenceId(resolveEventRegistrationScopedEvents((args.events ?? []).filter(Boolean), {
|
|
32
59
|
occurrenceContext: args.occurrenceContext,
|
|
@@ -34,37 +61,22 @@ function selectEventDetails(args) {
|
|
|
34
61
|
}));
|
|
35
62
|
const occurrenceContext = args.occurrenceContext ?? null;
|
|
36
63
|
const otherLimit = parseLimit(args.otherDatesLimit, 5);
|
|
37
|
-
const selectedFromContext = (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
startsAt: occurrenceContext.startsAt,
|
|
43
|
-
timeZone: occurrenceContext.timeZone
|
|
44
|
-
}));
|
|
45
|
-
return all.find((e) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
46
|
-
startsAt: e.startsAt,
|
|
47
|
-
timeZone: e.timeZone
|
|
48
|
-
})) === ctxDate) ?? null;
|
|
49
|
-
})();
|
|
50
|
-
const nextUpcoming = (() => {
|
|
51
|
-
const upcoming = all.filter((e) => isFutureOrNow(e.startsAt, args.nowIso));
|
|
52
|
-
upcoming.sort((a, b) => Date.parse(a.startsAt) - Date.parse(b.startsAt));
|
|
53
|
-
return upcoming[0] ?? null;
|
|
54
|
-
})();
|
|
55
|
-
const mode = selectedFromContext ? "selected" : "next";
|
|
56
|
-
const selected = selectedFromContext ?? nextUpcoming;
|
|
64
|
+
const selectedFromContext = selectFromOccurrenceContext(all, occurrenceContext);
|
|
65
|
+
const nextUpcoming = selectNextUpcoming(all, args.nowIso);
|
|
66
|
+
const completedWholeSeries = selectCompletedWholeSeries(all);
|
|
67
|
+
const selected = selectedFromContext ?? nextUpcoming ?? completedWholeSeries;
|
|
68
|
+
const mode = selectedFromContext ? "selected" : nextUpcoming ? "next" : completedWholeSeries ? "completed" : "next";
|
|
57
69
|
const timeZone = toBookingTimeZone(selected?.timeZone ?? all[0]?.timeZone ?? null);
|
|
58
|
-
const seriesId = occurrenceContext?.seriesId ?? selected?.seriesId ?? all[0]?.seriesId ?? null;
|
|
59
|
-
const selectedOccurrenceId = selected?.occurrenceId ?? null;
|
|
60
70
|
return {
|
|
61
71
|
mode,
|
|
62
72
|
selected,
|
|
63
|
-
otherDates:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
otherDates: selectRelatedDates({
|
|
74
|
+
events: all,
|
|
75
|
+
seriesId: occurrenceContext?.seriesId ?? selected?.seriesId ?? all[0]?.seriesId ?? null,
|
|
76
|
+
selected,
|
|
77
|
+
nowIso: args.nowIso,
|
|
78
|
+
limit: otherLimit
|
|
79
|
+
}),
|
|
68
80
|
timeZone
|
|
69
81
|
};
|
|
70
82
|
}
|
|
@@ -209,7 +221,7 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing }) {
|
|
|
209
221
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
210
222
|
/* @__PURE__ */ jsx("div", {
|
|
211
223
|
className: "rb-label rb-mb-2",
|
|
212
|
-
children: selection.mode === "next" ? "Next date" : "Date"
|
|
224
|
+
children: selected.bookingScope === "whole_series" ? selection.mode === "next" ? "Next session" : "Selected session" : selection.mode === "next" ? "Next date" : "Date"
|
|
213
225
|
}),
|
|
214
226
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }),
|
|
215
227
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -247,18 +259,27 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing }) {
|
|
|
247
259
|
}) : null] }, member.id))
|
|
248
260
|
})]
|
|
249
261
|
}) : null,
|
|
250
|
-
pricing
|
|
262
|
+
pricing,
|
|
263
|
+
selected.bookingScope === "whole_series" ? /* @__PURE__ */ jsxs("div", {
|
|
264
|
+
className: "rb-mt-6",
|
|
265
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
266
|
+
className: "rb-label rb-mb-2",
|
|
267
|
+
children: "Registration"
|
|
268
|
+
}), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: selected.wholeSeries?.enrollmentOpen ? "Open" : "Closed" }) })]
|
|
269
|
+
}) : null
|
|
251
270
|
]
|
|
252
271
|
});
|
|
253
272
|
}
|
|
254
273
|
function OtherEventDates({ selection }) {
|
|
255
|
-
|
|
274
|
+
const isWholeSeries = selection.selected?.bookingScope === "whole_series";
|
|
275
|
+
const dates = isWholeSeries && selection.selected ? [selection.selected, ...selection.otherDates].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt)) : selection.otherDates;
|
|
276
|
+
if (dates.length === 0) return null;
|
|
256
277
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
257
278
|
className: "rb-label",
|
|
258
|
-
children: "Other dates"
|
|
279
|
+
children: isWholeSeries ? "Session schedule" : "Other dates"
|
|
259
280
|
}), /* @__PURE__ */ jsx("div", {
|
|
260
281
|
className: "rb-mt-2 rb-tiles-grid",
|
|
261
|
-
children:
|
|
282
|
+
children: dates.map((event) => /* @__PURE__ */ jsx("a", {
|
|
262
283
|
className: "rb-tile rb-tile--interactive",
|
|
263
284
|
...resolveEventLinkProps(event),
|
|
264
285
|
children: /* @__PURE__ */ jsx(DateTimeTile, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CiTuhUwY.mjs";
|
|
2
2
|
import { t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
3
3
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
4
4
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
5
|
-
import { t as EventListingClient } from "./EventListing.client-
|
|
5
|
+
import { t as EventListingClient } from "./EventListing.client-CqdsO7jO.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/rendering/islands/enhancers/eventListing.tsx
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as buildBookingPaymentSelectionViewModel, t as usePolling } from "./usePolling-
|
|
3
|
-
import { At as formatBookingTime, Bt as publicEventPricingMode, C as getWizardStepsForContext, Dt as formatBookingDate, Ft as toBookingTimeZone, H as resolveRuntimeEventPricing, Ht as publicEventScalarPrice, It as toScheduledBookingDateTime, Ot as formatBookingDateTime, P as formatEventPriceDisplay, S as getStepNumber, Ut as publicEventTicketTypes, Vt as publicEventPricingType, Wt as formatCurrencyAmount, X as themeButtonClassName, Y as resolveEventRegistrationScopedEvents, _ as findPreSelectedEvent, b as resolveRegistrationTarget, g as findEventByOccurrenceId, h as toRegistrationEvents, t as defineIslandPropsDecoder, v as resolveDiscountContext, x as WIZARD_STEPS, y as resolveEventRequiresPayment, yt as assertNever, zt as publicEventPricingCurrency } from "./propsDecoder-
|
|
2
|
+
import { n as buildBookingPaymentSelectionViewModel, t as usePolling } from "./usePolling-BKf0GcE-.mjs";
|
|
3
|
+
import { At as formatBookingTime, Bt as publicEventPricingMode, C as getWizardStepsForContext, Dt as formatBookingDate, Ft as toBookingTimeZone, H as resolveRuntimeEventPricing, Ht as publicEventScalarPrice, It as toScheduledBookingDateTime, Ot as formatBookingDateTime, P as formatEventPriceDisplay, S as getStepNumber, Ut as publicEventTicketTypes, Vt as publicEventPricingType, Wt as formatCurrencyAmount, X as themeButtonClassName, Y as resolveEventRegistrationScopedEvents, _ as findPreSelectedEvent, b as resolveRegistrationTarget, g as findEventByOccurrenceId, h as toRegistrationEvents, t as defineIslandPropsDecoder, v as resolveDiscountContext, x as WIZARD_STEPS, y as resolveEventRequiresPayment, yt as assertNever, zt as publicEventPricingCurrency } from "./propsDecoder-CiTuhUwY.mjs";
|
|
4
4
|
import { n as useBlockApi, t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
5
5
|
import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
|
|
6
|
-
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-
|
|
7
|
-
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-
|
|
8
|
-
import { n as SpinnerNode, r as formatPrice, t as StepIndicator$1 } from "./StepIndicator-
|
|
6
|
+
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-CShkRqab.mjs";
|
|
7
|
+
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-B9vriL5C.mjs";
|
|
8
|
+
import { n as SpinnerNode, r as formatPrice, t as StepIndicator$1 } from "./StepIndicator-DGCYuBJ1.mjs";
|
|
9
9
|
import { t as FeedbackMessage } from "./FeedbackMessage-ByMrs3cr.mjs";
|
|
10
10
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
|
|
11
11
|
import { t as buildCheckoutReturnUrls } from "./checkoutUrls-Ct8Mxna3.mjs";
|
|
12
12
|
import { t as createBodyThemePortalRoot } from "./themePortalRoot-AGs4cE7t.mjs";
|
|
13
13
|
import { t as consumeSearchParam } from "./urlParams-D71VXFGx.mjs";
|
|
14
|
-
import { a as
|
|
14
|
+
import { a as LoggedInAsUser, i as useWaitlistClaim, n as MagicLinkForm, o as CourseRegistrationErrorBoundary, r as logoutPortal, s as ClockIcon, t as CourseRegistrationWizard } from "./CourseRegistrationWizard-xRmA7REV.mjs";
|
|
15
15
|
import { t as CrossIcon } from "./CrossIcon-Dn1KRKW5.mjs";
|
|
16
16
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
17
17
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
@@ -4003,6 +4003,30 @@ function EventRegistrationWizard(props) {
|
|
|
4003
4003
|
});
|
|
4004
4004
|
}
|
|
4005
4005
|
//#endregion
|
|
4006
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
4007
|
+
function planEventRegistrationSurface(input) {
|
|
4008
|
+
const scopedEvents = resolveEventRegistrationScopedEvents(input.events, {
|
|
4009
|
+
occurrenceContext: input.occurrenceContext,
|
|
4010
|
+
subject: input.subject
|
|
4011
|
+
});
|
|
4012
|
+
const bookingScopes = new Set(scopedEvents.map((event) => event.bookingScope));
|
|
4013
|
+
if (!input.occurrenceContext && !input.subject && bookingScopes.has("single_occurrence")) return {
|
|
4014
|
+
kind: "occurrence",
|
|
4015
|
+
events: scopedEvents.filter((event) => event.bookingScope === "single_occurrence")
|
|
4016
|
+
};
|
|
4017
|
+
if (bookingScopes.size === 0 || bookingScopes.has("single_occurrence")) return bookingScopes.has("whole_series") ? { kind: "mixedBookingScopes" } : {
|
|
4018
|
+
kind: "occurrence",
|
|
4019
|
+
events: scopedEvents
|
|
4020
|
+
};
|
|
4021
|
+
const requiredSeriesIds = new Set(scopedEvents.map((event) => event.seriesId));
|
|
4022
|
+
const offerings = input.wholeSeriesOfferings.filter((offering) => requiredSeriesIds.has(offering.eventSeriesId));
|
|
4023
|
+
const loadedSeriesIds = new Set(offerings.map((offering) => offering.eventSeriesId));
|
|
4024
|
+
return [...requiredSeriesIds].every((seriesId) => loadedSeriesIds.has(seriesId)) && offerings.length > 0 ? {
|
|
4025
|
+
kind: "wholeSeries",
|
|
4026
|
+
offerings
|
|
4027
|
+
} : { kind: "unavailableWholeSeries" };
|
|
4028
|
+
}
|
|
4029
|
+
//#endregion
|
|
4006
4030
|
//#region ../blocks/src/system/runtime/nodes/event-registration/PastOccurrenceNotice.tsx
|
|
4007
4031
|
function isPastOccurrence(startsAt) {
|
|
4008
4032
|
if (!startsAt) return false;
|
|
@@ -4054,6 +4078,34 @@ function toEventRegistrationClientProps(props) {
|
|
|
4054
4078
|
};
|
|
4055
4079
|
}
|
|
4056
4080
|
const EventRegistrationClient = (clientProps) => {
|
|
4081
|
+
const surface = planEventRegistrationSurface({
|
|
4082
|
+
events: clientProps.events ?? [],
|
|
4083
|
+
wholeSeriesOfferings: clientProps.wholeSeriesOffering ? [clientProps.wholeSeriesOffering] : clientProps.wholeSeriesOfferings ?? [],
|
|
4084
|
+
occurrenceContext: clientProps.occurrenceContext,
|
|
4085
|
+
subject: clientProps.subject
|
|
4086
|
+
});
|
|
4087
|
+
if (surface.kind === "wholeSeries") return /* @__PURE__ */ jsx(CourseRegistrationErrorBoundary, {
|
|
4088
|
+
className: clientProps.className,
|
|
4089
|
+
children: /* @__PURE__ */ jsx(CourseRegistrationWizard, {
|
|
4090
|
+
subject: clientProps.subject,
|
|
4091
|
+
courses: [...surface.offerings],
|
|
4092
|
+
showSessions: clientProps.showSessions,
|
|
4093
|
+
showPrice: clientProps.showPrice,
|
|
4094
|
+
showCapacity: clientProps.showCapacity,
|
|
4095
|
+
showVenue: clientProps.showVenue,
|
|
4096
|
+
successMessage: clientProps.successMessage,
|
|
4097
|
+
waitlistMessage: clientProps.waitlistMessage,
|
|
4098
|
+
membershipMessage: clientProps.membershipMessage,
|
|
4099
|
+
buttonText: clientProps.buttonText,
|
|
4100
|
+
buttonVariant: clientProps.buttonVariant,
|
|
4101
|
+
className: clientProps.className
|
|
4102
|
+
})
|
|
4103
|
+
});
|
|
4104
|
+
if (surface.kind === "unavailableWholeSeries" || surface.kind === "mixedBookingScopes") return /* @__PURE__ */ jsx("div", {
|
|
4105
|
+
className: clientProps.className,
|
|
4106
|
+
role: "status",
|
|
4107
|
+
children: "Registration is temporarily unavailable. Please refresh the page or try again shortly."
|
|
4108
|
+
});
|
|
4057
4109
|
if (isPastOccurrence(clientProps.occurrenceContext?.startsAt) && clientProps.occurrenceContext?.startsAt) return /* @__PURE__ */ jsx(PastOccurrenceNotice, {
|
|
4058
4110
|
anchorId: EVENT_REGISTRATION_ANCHOR_ID,
|
|
4059
4111
|
className: clientProps.className,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as clsx } from "./clsx-DgIEfj3H.mjs";
|
|
3
|
-
import { St as ok, X as themeButtonClassName, t as defineIslandPropsDecoder, xt as err, yt as assertNever } from "./propsDecoder-
|
|
3
|
+
import { St as ok, X as themeButtonClassName, t as defineIslandPropsDecoder, xt as err, yt as assertNever } from "./propsDecoder-CiTuhUwY.mjs";
|
|
4
4
|
import { n as useBlockApi, t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
|
|
5
5
|
import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
|
|
6
6
|
import { t as FeedbackMessage } from "./FeedbackMessage-ByMrs3cr.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { X as themeButtonClassName, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
+
import { X as themeButtonClassName, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-CiTuhUwY.mjs";
|
|
3
3
|
import { t as resolveDedicatedCheckoutPath } from "./checkoutRoute-ClwHwYVA.mjs";
|
|
4
|
-
import { n as useCommerceCart } from "./shop-commerce-store-
|
|
4
|
+
import { n as useCommerceCart } from "./shop-commerce-store-DaE7Fhj8.mjs";
|
|
5
5
|
import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|