@riverbankcms/sdk 0.176.0 → 0.178.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 +12 -4
- package/dist/_dts/{BlocksIslandsHydrator-DvoTk7Py.d.ts → BlocksIslandsHydrator-CrKsXtpD.d.ts} +1 -1
- package/dist/_dts/{Page-D-l374tU.d.ts → Page-C9i27wZA.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-22DdQAj5.d.ts → SdkPreviewMode-DzGSR3jh.d.ts} +2 -2
- package/dist/_dts/{client-D4p0J1lK.d.ts → client-BnYN6XsH.d.ts} +31 -7
- package/dist/_dts/{content-types-0WWR6dC4.d.ts → content-types-CXj6lp3d.d.ts} +4 -8
- package/dist/_dts/{contracts-f_ZG_SwY.d.ts → contracts-BZLwkTwL.d.ts} +3 -3
- package/dist/_dts/{footerPageOutline-DSeZvOaj.d.ts → footerPageOutline-D_XbQW_o.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-BlitPA2D.d.ts → generatePageMetadata-ByEWwe9j.d.ts} +2 -2
- package/dist/_dts/{index-ZKEDvLuN.d.ts → index-0HFgCnGz.d.ts} +1 -1
- package/dist/_dts/{index-tcPtGdag.d.ts → index-BE9dWIsr.d.ts} +3 -3
- package/dist/_dts/{index-D-ai8IQd.d.ts → index-CKDRr54L.d.ts} +4 -4
- package/dist/_dts/{index-CoLcwjqJ.d.ts → index-D9-N1d9v.d.ts} +1 -1
- package/dist/_dts/{index-CKkkCgb6.d.ts → index-DCa-8TEY.d.ts} +1 -1
- package/dist/_dts/{index-DDsfmM4d.d.ts → index-cTpvQg_Q.d.ts} +2 -2
- package/dist/_dts/{index-EJMo-KSo.d.ts → index-nnEdgc3Z.d.ts} +2 -15
- package/dist/_dts/{loadContent-Ci932ORy.d.ts → loadContent-DYkVV6w4.d.ts} +7 -7
- package/dist/_dts/{request-B8jVdvgI.d.ts → request-B20VRWHH.d.ts} +55384 -55036
- package/dist/_dts/{resolveBlockData-DrSMuD76.d.ts → resolveBlockData-C_aK5GIS.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-Be4iL6-F.d.ts → resolvePageContent-YT6ndha1.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +24 -12
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +56 -4
- package/dist/_dts/sdk/src/portal/index.d.ts +95 -13
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-lwSgCWZ4.d.ts → types-CMZ5mkpv.d.ts} +11 -3
- package/dist/_dts/{types-BXMX4z2j.d.ts → types-CYcd15BQ.d.ts} +7 -7
- package/dist/_dts/{types-DXY64Xh4.d.ts → types-rm2M4LGx.d.ts} +4 -4
- package/dist/_dts/{validation-C5xp--Fu.d.ts → validation-BSxnRhyy.d.ts} +4 -6
- package/dist/client/{BlocksIslandsHydrator-CeYQQQs7.mjs → BlocksIslandsHydrator-D1n09bu-.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-CDDWrY_W.mjs → BookingMailingListNote-DSD4gS96.mjs} +6 -6
- package/dist/client/{BookingPanelArrangement-BShQSial.mjs → BookingPanelArrangement--EkA1ZQd.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-MbvIo2jS.mjs → BookingQuestionFields-B57oGPcj.mjs} +2 -2
- package/dist/client/{CalendarNavigationChevron-C6CSVfEB.mjs → CalendarNavigationChevron-qXvsFYOg.mjs} +7 -7
- package/dist/client/{DemoBookingPortalAccess-C9Ggcfx3.mjs → DemoBookingPortalAccess-Olvrwi3Z.mjs} +3 -3
- package/dist/client/{EventCalendar.client-BSMuSqg0.mjs → EventCalendar.client-DwFNFb-0.mjs} +10 -10
- package/dist/client/{EventCombined.client-BTrmSyUB.mjs → EventCombined.client-Ffu-aVOb.mjs} +9 -9
- package/dist/client/{EventItem-B0WjGXsH.mjs → EventItem-b8tVkNHA.mjs} +4 -4
- package/dist/client/{EventListWeekNavigation-8Ij7vuxY.mjs → EventListWeekNavigation-BxnJW_Gf.mjs} +1 -1
- package/dist/client/{EventListing.client-CWk2NEwd.mjs → EventListing.client-ViCnrNg4.mjs} +3 -3
- package/dist/client/{EventListing.view-BEH4UbSL.mjs → EventListing.view-CdjiepMf.mjs} +7 -7
- package/dist/client/{EventRegistrationPayment-B2EikR3f.mjs → EventRegistrationPayment-BVd70XkH.mjs} +262 -24
- package/dist/client/{LocationMapActions-myIQIvQL.mjs → LocationMapActions-CiMtl1Ha.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-BfsVyPvB.mjs → MapDrawingSvg-BCZa3dpf.mjs} +1 -1
- package/dist/client/{Page-F3lhDvw1.mjs → Page-DqETUt-U.mjs} +22 -13
- package/dist/client/{SiteTermsAgreementField-BYACYP0T.mjs → SiteTermsAgreementField-DkFnbzf_.mjs} +2 -2
- package/dist/client/{StepIndicator-Bb7rPtSq.mjs → StepIndicator-JO2PS03n.mjs} +79 -32
- package/dist/client/{accordion-BfsOiweL.mjs → accordion-XgNxl0Wg.mjs} +1 -1
- package/dist/client/{booking-form.client-B8ohIj13.mjs → booking-form.client-ljJoDwuI.mjs} +13 -13
- package/dist/client/{bookingForm-CXsck2oH.mjs → bookingForm-DtEHwY4W.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-B_hcuT06.mjs → boxStyleClassNames-BHoMAcun.mjs} +2 -2
- package/dist/client/{carousel-Cz5Ddbsx.mjs → carousel-B3UhbFu7.mjs} +1 -1
- package/dist/client/{cart-CTC2oS3p.mjs → cart-DzOJfYOR.mjs} +3 -3
- package/dist/client/{cart.client-c1YkTC-Q.mjs → cart.client-DBG77v-5.mjs} +1 -1
- package/dist/client/{checkout-BeW1ufaH.mjs → checkout-LmePoEgM.mjs} +3 -3
- package/dist/client/{checkout.client-BeU32khQ.mjs → checkout.client-DmgZuLBT.mjs} +1 -1
- package/dist/client/{checkoutUrls-DVfSUSKp.mjs → checkoutUrls-CMZI8o_V.mjs} +1 -1
- package/dist/client/client.mjs +93 -12
- package/dist/client/{context-R9p5c8IH.mjs → context-CJIz4FdL.mjs} +1 -1
- package/dist/client/{course-CUFVJEAc.mjs → course-DBEU9IA9.mjs} +11 -4
- package/dist/client/{dateFormatting-CF6FWCoo.mjs → dateFormatting-UoXqBh10.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-tZxIm3RL.mjs → demoPortalMagicLink-6CgFZNvu.mjs} +5 -4
- package/dist/client/{display-4HYOb-AK.mjs → display-D1oVR5Eh.mjs} +180 -15
- package/dist/client/{enhanceHeaderSection-DEYDI54E.mjs → enhanceHeaderSection-DaMo6len.mjs} +3 -3
- package/dist/client/{event-details.client-BwjBJP-f.mjs → event-details.client-BwASwKIq.mjs} +1 -1
- package/dist/client/{event-registration.client-DWvSODTI.mjs → event-registration.client-b6APrFQe.mjs} +118 -180
- package/dist/client/{eventCalendar-C9Pn9eeZ.mjs → eventCalendar-DJYz7yZf.mjs} +4 -4
- package/dist/client/{eventCombined-Bdhk0fp0.mjs → eventCombined-j9VCVgMW.mjs} +4 -4
- package/dist/client/{eventDetails-C2LfNW_o.mjs → eventDetails-BzGOVDI-.mjs} +2 -2
- package/dist/client/{eventListing-B-bJOQUk.mjs → eventListing-DWgpGuFM.mjs} +4 -4
- package/dist/client/{eventRegistration-CbdmUiDT.mjs → eventRegistration-DCinRot3.mjs} +4 -4
- package/dist/client/{form-BbUUt784.mjs → form-BBBtRwvy.mjs} +3 -3
- package/dist/client/{form.client-BVlz-9_t.mjs → form.client-CZeRQLGF.mjs} +4 -4
- package/dist/client/{form.parts-TB4UIrML.mjs → form.parts-DhGGv4_L.mjs} +1 -1
- package/dist/client/{formatDate-TDHhFjFN.mjs → formatDate-DVFVDcDW.mjs} +1 -1
- package/dist/client/gifting/client.mjs +6 -5
- package/dist/client/{gifting-CbNSrp7C.mjs → gifting-Di9-SpwW.mjs} +4 -4
- package/dist/client/{gifting.client-B__bGhFc.mjs → gifting.client-CjT5PrAZ.mjs} +4 -4
- package/dist/client/{gifting.parts-CTA1sDW6.mjs → gifting.parts-ffP6mjMd.mjs} +2 -2
- package/dist/client/{headerSection-5Wn9nUW_.mjs → headerSection-jjAvtSZk.mjs} +2 -2
- package/dist/client/{lookSurfaces-BwiNdgMU.mjs → lookSurfaces-C2VzJfyG.mjs} +1 -1
- package/dist/client/{newsletter-form.client-B17WYHxZ.mjs → newsletter-form.client-D45frHoa.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DN9wD1ZG.mjs → newsletter-form.parts-CHdg82ct.mjs} +1 -1
- package/dist/client/{newsletterForm-DLMlxInp.mjs → newsletterForm-tS465_vl.mjs} +3 -3
- package/dist/client/{noop-CaQxI-Js.mjs → noop-D11X-B6n.mjs} +123 -91
- package/dist/client/portal/client.mjs +384 -38
- package/dist/client/{product-detail.client-Di_anRGR.mjs → product-detail.client-DIWSeW7P.mjs} +1 -1
- package/dist/client/{product-list.client-Duhl6rtL.mjs → product-list.client-BRf14h_e.mjs} +1 -1
- package/dist/client/{productDetail-BgKmCwA8.mjs → productDetail-gxF5whea.mjs} +3 -3
- package/dist/client/{productList-C_wMKsYS.mjs → productList-B9t0XJrN.mjs} +3 -3
- package/dist/client/{propsDecoder-y3LvxaiG.mjs → propsDecoder-Db8wAmgr.mjs} +4 -4
- package/dist/client/{registry.server-CIWYKz1V.mjs → registry.server-Bn0gE0uP.mjs} +27 -27
- package/dist/client/rendering/client.mjs +23 -23
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +7 -7
- package/dist/client/{richText-coerce-DkPBFb_a.mjs → richText-coerce-COnKrLO7.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-BgO0rZce.mjs → routeIslandApiConfig-Bok1Oy50.mjs} +1 -1
- package/dist/client/{shop-CFbWlv_W.mjs → shop-D1oTPDxm.mjs} +3 -3
- package/dist/client/{shop-commerce-C-I29eaA.mjs → shop-commerce-DyMZLC0a.mjs} +12 -12
- package/dist/client/{shop-commerce-store-DGcc7twO.mjs → shop-commerce-store-FODNS63D.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-DOm7vx0X.mjs → shop-discount-apply.state-C4xcmFzZ.mjs} +2 -2
- package/dist/client/{shop.client-GHTWUKD6.mjs → shop.client-CRgRulfI.mjs} +12 -12
- package/dist/client/{shop.interactive-CxDJ8P2r.mjs → shop.interactive-D7wky1GL.mjs} +6 -33
- package/dist/client/{shopShared-Be9QJJpT.mjs → shopShared-Bd_hy9ZO.mjs} +2 -2
- package/dist/client/src-DqMbCjI1.mjs +3 -0
- package/dist/client/{src-xrjaKaCj.mjs → src-uwCpbHXG.mjs} +2 -1
- package/dist/client/{timetableModel--R0zVzZO.mjs → timetableModel-UlWfP1gh.mjs} +9 -9
- package/dist/client/{useAvailableSlots-BGu_2F50.mjs → useAvailableSlots-D-qoooLy.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-I_mXI9Yd.mjs → useDiscountCodeUi-B9DODAkj.mjs} +1 -1
- package/dist/client/{useEventPagination-DxIJ--JZ.mjs → useEventPagination-CQH2e9sQ.mjs} +7 -7
- package/dist/client/{view-BbzH5MQb.mjs → view-DNX59QwM.mjs} +10 -9
- package/dist/client/{view-3foOzGWR.mjs → view-bGU1ws-m.mjs} +3 -3
- package/dist/preview-next/client/{LocationPickerEnvironment-8iKKoYZr.mjs → LocationPickerEnvironment-BHAT81Wx.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-AIUPN1Zx.mjs → MapLibreEditMap-B52hkdIZ.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-0xyUPWUB.mjs → PageSectionToolbar-D-Le7O3o.mjs} +52 -8
- package/dist/preview-next/client/{PreviewEditorSidebar-D8vUzXtI.mjs → PreviewEditorSidebar-DNy5j_ce.mjs} +34 -39
- package/dist/preview-next/client/{PreviewEditorUI-CRjS4gAu.mjs → PreviewEditorUI-CzJvgbqt.mjs} +10 -10
- package/dist/preview-next/client/{PreviewShell-BvdBdeH_.mjs → PreviewShell-xhJ6ca1i.mjs} +9 -8
- package/dist/preview-next/client/{SdkPreviewModeRuntime-DWTyKbFj.mjs → SdkPreviewModeRuntime-BmYO1TdT.mjs} +16 -7
- package/dist/preview-next/client/{lucide-react-Dfgl3Vtq.mjs → lucide-react-McYZeSMb.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-BqY2TTcZ.mjs → previewAssistantSlot-BN93X9o1.mjs} +1211 -600
- package/dist/preview-next/client/{previewChromeRoot-BuRYe2iL.mjs → previewChromeRoot-C51RQseo.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-BnK5kH9f.mjs → sdk-runtime-oeGquJM-.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-DbKozRSn.mjs → siteStyleAccess-BGTAcPud.mjs} +27 -17
- package/dist/preview-next/client/src-EO5QoRlU.mjs +3 -0
- package/dist/preview-next/client/{src-DzXUmsyK.mjs → src-lX6heoDA.mjs} +2 -1
- package/dist/preview-next/client/{useAutosaveStatus-D9s6dyMW.mjs → useAutosaveStatus-BMGXjGZq.mjs} +3 -30
- package/dist/preview-next/client/{useOpenBlockForSetup-Ce4WCxpT.mjs → useOpenBlockForSetup-CTDoR_gQ.mjs} +2 -2
- package/dist/preview-next/container-responsive.css +3 -0
- package/dist/preview-next/editor-chrome.css +4 -2
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BYezcMx5.mjs → route-contract-BtdzkSUg.mjs} +71 -4
- package/dist/server/{Block.shared-Cn7gg13_.mjs → Block.shared-Bp3OlOjj.mjs} +5 -5
- package/dist/server/{bindings-VGgS6UvF.mjs → bindings-DrbJuftt.mjs} +3 -3
- package/dist/server/{client-Bvag5OtW.mjs → client-Bf06n9oj.mjs} +90 -9
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/constants-Cj7hfbrA.mjs +41 -0
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-CxASA3PE.mjs → loadContent-eaTY7RPg.mjs} +4 -4
- package/dist/server/{loadPage-CQgde5DN.mjs → loadPage-5iZefzDd.mjs} +2 -2
- package/dist/server/{navigation-iC_hXjJI.mjs → navigation-BcNfYYuu.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next/revalidate.mjs +15 -8
- package/dist/server/next.mjs +56 -13
- package/dist/server/{overrideResolution-BqVLO4gX.mjs → overrideResolution-CUHtm7tW.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-CfSnAkCO.mjs → pageRenderPlan-GmPXForc.mjs} +13 -6
- package/dist/server/{pageRuntimeSupport-uz4gzBOo.mjs → pageRuntimeSupport-Dd8LFzfa.mjs} +1 -1
- package/dist/server/{pageShared-D23o5QgC.mjs → pageShared-tz-GVWft.mjs} +96 -39
- package/dist/server/portal-B4JVkdjc.mjs +783 -0
- package/dist/server/portal.mjs +3 -3
- package/dist/server/{prebuild-BuoXWT9y.mjs → prebuild-JmsuYCIH.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-CCiYV8_s.mjs → prefetchBlockData-Ce9DDwON.mjs} +2 -2
- package/dist/server/{registry-CXRXsFSx.mjs → registry-D12XF_h1.mjs} +466 -311
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-yfe8WLEA.mjs → resolveBlockData-D9yZIN3V.mjs} +1 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/{validation-CozQ7wE0.mjs → validation-CLq5cw6M.mjs} +3 -5
- package/dist/server/{version-CgCWRFEY.mjs → version-oPbhAx8E.mjs} +1 -1
- package/dist/styles/index.css +27 -1
- package/package.json +1 -1
- package/dist/client/src-BozhJ43Z.mjs +0 -3
- package/dist/preview-next/client/src-LUhVXBEQ.mjs +0 -3
- package/dist/server/constants-hl17xz6x.mjs +0 -22
- package/dist/server/portal-BjVHMAUC.mjs +0 -371
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as toPageHydrationBootstrapConfig, t as PageContent } from "../../pageShared-
|
|
1
|
+
import { n as toPageHydrationBootstrapConfig, t as PageContent } from "../../pageShared-tz-GVWft.mjs";
|
|
2
2
|
export { PageContent, toPageHydrationBootstrapConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as loadPageWithDeps, t as loadPage } from "../../loadPage-
|
|
1
|
+
import { n as loadPageWithDeps, t as loadPage } from "../../loadPage-5iZefzDd.mjs";
|
|
2
2
|
export { loadPage, loadPageWithDeps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as invalidRenderableBlock, c as readSdkPreviewPublishedPlacement, d as siteBlockRenderContext, i as collectMediaAssetSidecar, l as resolveSdkBlockManifest, n as buildRenderablePageOutline, o as projectRenderablePageOutline, r as buildSiteRenderSupport, s as readInvalidBlockAdmission, t as buildPageOutline, u as sanitizeSdkRuntimeBlockContent } from "../../pageRuntimeSupport-
|
|
1
|
+
import { a as invalidRenderableBlock, c as readSdkPreviewPublishedPlacement, d as siteBlockRenderContext, i as collectMediaAssetSidecar, l as resolveSdkBlockManifest, n as buildRenderablePageOutline, o as projectRenderablePageOutline, r as buildSiteRenderSupport, s as readInvalidBlockAdmission, t as buildPageOutline, u as sanitizeSdkRuntimeBlockContent } from "../../pageRuntimeSupport-Dd8LFzfa.mjs";
|
|
2
2
|
export { buildPageOutline, buildRenderablePageOutline, buildSiteRenderSupport, collectMediaAssetSidecar, invalidRenderableBlock, projectRenderablePageOutline, readInvalidBlockAdmission, readSdkPreviewPublishedPlacement, resolveSdkBlockManifest, sanitizeSdkRuntimeBlockContent, siteBlockRenderContext };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as MissingBlockOverrideError } from "../pageShared-
|
|
1
|
+
import { d as MissingBlockOverrideError } from "../pageShared-tz-GVWft.mjs";
|
|
2
2
|
import { n as MissingSdkThemeError, t as MISSING_SDK_THEME_ERROR_CODE } from "../themeAdmission-DGSAlFUK.mjs";
|
|
3
3
|
import { n as defineBlockOverrides, r as defineLazyBlockOverride, t as defineBlockOverrideRegistrations } from "../overrides-CD4d-1w7.mjs";
|
|
4
|
-
import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, o as prefetchFooterBlockData, r as Layout, t as BlockContent } from "../Block.shared-
|
|
5
|
-
import { i as Page, n as collectUsedBlockKindsFromPageOutline, r as resolveBlockOverridesForPage, t as buildPageBlockKindIndex } from "../overrideResolution-
|
|
4
|
+
import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, o as prefetchFooterBlockData, r as Layout, t as BlockContent } from "../Block.shared-Bp3OlOjj.mjs";
|
|
5
|
+
import { i as Page, n as collectUsedBlockKindsFromPageOutline, r as resolveBlockOverridesForPage, t as buildPageBlockKindIndex } from "../overrideResolution-CUHtm7tW.mjs";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/rendering/components/Block.server.tsx
|
|
8
8
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { v as resolveAuthoredLinkHref } from "./pageRenderPlan-
|
|
2
|
-
import { at as computeMediaTransformStyle, ct as resolveImageUrlWithContext$1,
|
|
1
|
+
import { v as resolveAuthoredLinkHref } from "./pageRenderPlan-GmPXForc.mjs";
|
|
2
|
+
import { Xi as parseFieldDefinition, at as computeMediaTransformStyle, ct as resolveImageUrlWithContext$1, ft as buildResolveImageUrlContext, ms as sanitizeHref, nt as RichText$2, ot as resolveImageSourceSetWithContext$1, st as resolveImageUrl$1 } from "./registry-D12XF_h1.mjs";
|
|
3
3
|
import { _ as parseMediaIdentifier, a as persistableMediaSchema, c as buildRenderableMediaAssetIndex, d as resolveManagedMediaReference, g as parseCanonicalMediaIdentifier, h as mediaIdentifierSchema, i as mediaSchema, l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-luf7RF22.mjs";
|
|
4
|
-
import { d as MissingBlockOverrideError, f as PageRenderer, g as buildThemeRuntime, h as toBlocksMediaAssets, l as ThemeScope, m as toBlocksImageResolveContextInput, n as toPageHydrationBootstrapConfig, p as toBlocksPageRendererDataContext, t as PageContent, u as EditorPageRenderer } from "./pageShared-
|
|
5
|
-
import { _ as admitLayoutGridForPlan, b as projectRepeaterGridLayout$1, v as deriveFieldValidationPlan, x as projectRepeaterGridLayoutForRendering$1 } from "./pageRuntimeSupport-
|
|
6
|
-
import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-
|
|
4
|
+
import { d as MissingBlockOverrideError, f as PageRenderer, g as buildThemeRuntime, h as toBlocksMediaAssets, l as ThemeScope, m as toBlocksImageResolveContextInput, n as toPageHydrationBootstrapConfig, p as toBlocksPageRendererDataContext, t as PageContent, u as EditorPageRenderer } from "./pageShared-tz-GVWft.mjs";
|
|
5
|
+
import { _ as admitLayoutGridForPlan, b as projectRepeaterGridLayout$1, v as deriveFieldValidationPlan, x as projectRepeaterGridLayoutForRendering$1 } from "./pageRuntimeSupport-Dd8LFzfa.mjs";
|
|
6
|
+
import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-eaTY7RPg.mjs";
|
|
7
7
|
import { n as MissingSdkThemeError, t as MISSING_SDK_THEME_ERROR_CODE } from "./themeAdmission-DGSAlFUK.mjs";
|
|
8
|
-
import { t as loadPage } from "./loadPage-
|
|
8
|
+
import { t as loadPage } from "./loadPage-5iZefzDd.mjs";
|
|
9
9
|
import { n as defineBlockOverrides, r as defineLazyBlockOverride, t as defineBlockOverrideRegistrations } from "./overrides-CD4d-1w7.mjs";
|
|
10
|
-
import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, n as toBlockHydrationBootstrapConfig, r as Layout, t as BlockContent } from "./Block.shared-
|
|
10
|
+
import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, n as toBlockHydrationBootstrapConfig, r as Layout, t as BlockContent } from "./Block.shared-Bp3OlOjj.mjs";
|
|
11
11
|
import "react";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { BlocksIslandsHydrator } from "#sdk-rendering-client";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as allOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
|
|
2
|
-
import { n as prefetchBlockDataWithFailures } from "./prefetchBlockData-
|
|
2
|
+
import { n as prefetchBlockDataWithFailures } from "./prefetchBlockData-Ce9DDwON.mjs";
|
|
3
3
|
import { t as SYSTEM_BLOCK_KINDS } from "./block-kinds-BCY9z3oB.mjs";
|
|
4
4
|
import { a as defineOwnDataProperty, i as resolveDataLoaderBlockContent, n as getDataLoaderOwnerPageId, t as createDataLoaderContext } from "./dataLoaderContext-B3fXA54R.mjs";
|
|
5
5
|
//#region src/data/dataLoaderValue.ts
|
package/dist/server/server.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createRiverbankClient } from "./client-
|
|
2
|
-
import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-
|
|
3
|
-
import { t as loadPage } from "./loadPage-
|
|
1
|
+
import { t as createRiverbankClient } from "./client-Bf06n9oj.mjs";
|
|
2
|
+
import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-eaTY7RPg.mjs";
|
|
3
|
+
import { t as loadPage } from "./loadPage-5iZefzDd.mjs";
|
|
4
4
|
export { createRiverbankClient, isEntryContent, isPageContent, isPageSurfaceContent, loadContent, loadPage };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as builtinTransformDefinitions } from "./pageRenderPlan-
|
|
2
|
-
import {
|
|
1
|
+
import { d as builtinTransformDefinitions } from "./pageRenderPlan-GmPXForc.mjs";
|
|
2
|
+
import { Go as fieldSchema, Ho as blockCategoryEnum, Ko as validateManifestLookField, Uo as blockSectionDeclarationShape, Wo as builtInBlockKindsSchema, hs as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, js as parseMailingListProviderScope, t as getBlockDefinition, zo as NodeSchema } from "./registry-D12XF_h1.mjs";
|
|
3
3
|
import { a as SUPPORTED_LOADER_ENDPOINTS } from "./responseMedia-F-ElH2Rd.mjs";
|
|
4
4
|
import { r as footerModeSchema } from "./mode-bkFS8glh.mjs";
|
|
5
5
|
import { a as ALLOWED_TRANSFORM_IDS_SET, r as ALLOWED_NODE_TYPES_SET, t as titleSourceValueSchema } from "./titleSourceSchema-Cu-3PRvv.mjs";
|
|
6
6
|
import { n as collectBookingReservedFieldCollisions, t as APPOINTMENT_BOOKING_BLOCK_ID } from "./booking-form.reserved-fields-Cqp13TKc.mjs";
|
|
7
|
-
import { t as SUPPORTED_LOADER_ENDPOINTS$1 } from "./prefetchBlockData-
|
|
7
|
+
import { t as SUPPORTED_LOADER_ENDPOINTS$1 } from "./prefetchBlockData-Ce9DDwON.mjs";
|
|
8
8
|
import { n as BINDING_TRANSFORM_VALUES$1 } from "./bindings-DhmIW3Er.mjs";
|
|
9
9
|
import { t as SYSTEM_BLOCK_KINDS } from "./block-kinds-BCY9z3oB.mjs";
|
|
10
10
|
import { i as safeParseRouteTemplate, t as describeRouteTemplateParseError } from "./routeTemplate-AsKQwa47.mjs";
|
|
@@ -693,8 +693,6 @@ const navigationMenuConfigSchema = z.object({
|
|
|
693
693
|
});
|
|
694
694
|
});
|
|
695
695
|
const siteSettingsConfigSchema = z.object({
|
|
696
|
-
homepagePath: z.string().optional(),
|
|
697
|
-
siteTitle: z.string().optional(),
|
|
698
696
|
siteDescription: z.string().optional(),
|
|
699
697
|
defaultTemplates: z.record(z.string(), z.string()).optional()
|
|
700
698
|
});
|
package/dist/styles/index.css
CHANGED
|
@@ -10722,6 +10722,25 @@
|
|
|
10722
10722
|
margin-top: 0.75rem;
|
|
10723
10723
|
}
|
|
10724
10724
|
|
|
10725
|
+
:where(.theme-scope) :where([data-block="customer-portal"]) .cp-joining-details {
|
|
10726
|
+
display: flex;
|
|
10727
|
+
flex-wrap: wrap;
|
|
10728
|
+
align-items: baseline;
|
|
10729
|
+
gap: 0.25rem 1rem;
|
|
10730
|
+
font-size: 0.875rem;
|
|
10731
|
+
margin-top: 0.75rem;
|
|
10732
|
+
}
|
|
10733
|
+
|
|
10734
|
+
:where(.theme-scope) :where([data-block="customer-portal"]) .cp-joining-details__link {
|
|
10735
|
+
font-weight: 600;
|
|
10736
|
+
text-decoration: underline;
|
|
10737
|
+
}
|
|
10738
|
+
|
|
10739
|
+
:where(.theme-scope) :where([data-block="customer-portal"]) .cp-joining-details__notes {
|
|
10740
|
+
flex-basis: 100%;
|
|
10741
|
+
white-space: pre-line;
|
|
10742
|
+
}
|
|
10743
|
+
|
|
10725
10744
|
:where(.theme-scope) :where([data-block="customer-portal"]) .cp-card-footer {
|
|
10726
10745
|
display: flex;
|
|
10727
10746
|
align-items: center;
|
|
@@ -21968,9 +21987,13 @@
|
|
|
21968
21987
|
/* Surface variables live on slots, so the line is defined on slots too. */
|
|
21969
21988
|
[data-skin="poise"] [data-arrangement] [data-slot] {
|
|
21970
21989
|
--poise-line: var(--rb-skin-rule, 1.5px) solid var(--rb-surface-line-color);
|
|
21971
|
-
--poise-photo-radius: calc(var(--rb-skin-radius, 24px) + 8px);
|
|
21972
21990
|
--poise-inner-radius: calc(var(--rb-skin-radius, 24px) - 8px);
|
|
21973
21991
|
}
|
|
21992
|
+
/* Rounded corners on a photo means Poise's own photo rounding, so it's declared where the Look's frame reads it. */
|
|
21993
|
+
[data-skin="poise"] [data-arrangement] {
|
|
21994
|
+
--poise-photo-radius: calc(var(--rb-skin-radius, 24px) + 8px);
|
|
21995
|
+
--rb-media-shape-radius: var(--poise-photo-radius);
|
|
21996
|
+
}
|
|
21974
21997
|
|
|
21975
21998
|
/* ---------------------------------------------- 2. Section chrome and type */
|
|
21976
21999
|
[data-skin="poise"] [data-arrangement] [data-slot="section"],
|
|
@@ -22325,6 +22348,9 @@
|
|
|
22325
22348
|
* so they start level with the details. */
|
|
22326
22349
|
@media (min-width: 768px) {
|
|
22327
22350
|
[data-skin="poise"] [data-arrangement][data-treat="plates"] [data-card-list] > [data-card-list-item]:only-child:not(:has(> [data-slot="item-media"])) > [data-slot="item-body"] > [data-slot="dates"] { margin: 0; }
|
|
22351
|
+
/* Two or more cards go two across, each with its photo on top. A lone card keeps the wide layout above. */
|
|
22352
|
+
[data-skin="poise"] [data-arrangement][data-treat="plates"] [data-card-list]:has(> [data-card-list-item]:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
22353
|
+
[data-skin="poise"] [data-arrangement][data-treat="plates"] [data-card-list]:has(> [data-card-list-item]:nth-child(2)) > [data-card-list-item] { display: flex; flex-direction: column; align-items: stretch; }
|
|
22328
22354
|
}
|
|
22329
22355
|
|
|
22330
22356
|
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region src/portal/constants.ts
|
|
2
|
-
/**
|
|
3
|
-
* Portal Authentication Constants
|
|
4
|
-
*/
|
|
5
|
-
/** Cookie name for storing the portal session token */
|
|
6
|
-
const PORTAL_TOKEN_COOKIE = "portal_token";
|
|
7
|
-
/** Cookie max age in seconds (30 days) */
|
|
8
|
-
const PORTAL_COOKIE_MAX_AGE = 720 * 60 * 60;
|
|
9
|
-
/** Query parameter name for the short-lived exchange code in the callback URL */
|
|
10
|
-
const PORTAL_CODE_PARAM = "portal_code";
|
|
11
|
-
/** Query/form parameter name for redirect destination */
|
|
12
|
-
const REDIRECT_TO_PARAM = "redirect_to";
|
|
13
|
-
/** Canonical published-site path for the customer portal */
|
|
14
|
-
const CUSTOMER_PORTAL_PATH = "/portal";
|
|
15
|
-
/** Default redirect path for callback */
|
|
16
|
-
const DEFAULT_PORTAL_REDIRECT = CUSTOMER_PORTAL_PATH;
|
|
17
|
-
/** Default redirect path for logout */
|
|
18
|
-
const DEFAULT_LOGOUT_REDIRECT = "/";
|
|
19
|
-
/** Query parameter added to the redirect URL after a successful magic link login */
|
|
20
|
-
const PORTAL_LOGIN_SUCCESS_PARAM = "portal_login";
|
|
21
|
-
//#endregion
|
|
22
|
-
export { PORTAL_COOKIE_MAX_AGE as a, REDIRECT_TO_PARAM as c, PORTAL_CODE_PARAM as i, DEFAULT_LOGOUT_REDIRECT as n, PORTAL_LOGIN_SUCCESS_PARAM as o, DEFAULT_PORTAL_REDIRECT as r, PORTAL_TOKEN_COOKIE as s, CUSTOMER_PORTAL_PATH as t };
|
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
import { a as sanitizeSafeAppPath, i as safeAppPathOrFallback, n as assertSafeAppPath, r as buildSafeRedirectUrl } from "./src-DHK4JUlp.mjs";
|
|
2
|
-
import { a as PORTAL_COOKIE_MAX_AGE, c as REDIRECT_TO_PARAM, i as PORTAL_CODE_PARAM, o as PORTAL_LOGIN_SUCCESS_PARAM, r as DEFAULT_PORTAL_REDIRECT, s as PORTAL_TOKEN_COOKIE } from "./constants-hl17xz6x.mjs";
|
|
3
|
-
//#region src/portal/redirects.ts
|
|
4
|
-
const DEPRECATED_REDIRECT_PATH_WARNING = "[SDK] handlePortalCallback/handlePortalLogout: \"redirectPath\" is deprecated, use \"defaultRedirectPath\"";
|
|
5
|
-
function resolveRedirectPathOption({ options, defaultValue, warn, nodeEnv }) {
|
|
6
|
-
if (options.defaultRedirectPath !== void 0) return options.defaultRedirectPath;
|
|
7
|
-
if (options.redirectPath !== void 0) {
|
|
8
|
-
if (nodeEnv !== "production") warn(DEPRECATED_REDIRECT_PATH_WARNING);
|
|
9
|
-
return options.redirectPath;
|
|
10
|
-
}
|
|
11
|
-
return defaultValue;
|
|
12
|
-
}
|
|
13
|
-
function resolveDefaultRedirect(options, defaultValue, warn = console.warn, nodeEnv = process.env.NODE_ENV) {
|
|
14
|
-
return assertSafeAppPath(resolveRedirectPathOption({
|
|
15
|
-
options,
|
|
16
|
-
defaultValue,
|
|
17
|
-
warn,
|
|
18
|
-
nodeEnv
|
|
19
|
-
}));
|
|
20
|
-
}
|
|
21
|
-
function resolveCallbackRedirect(redirectTo, defaultRedirect) {
|
|
22
|
-
return safeAppPathOrFallback(redirectTo, defaultRedirect);
|
|
23
|
-
}
|
|
24
|
-
function resolveLogoutRedirect({ defaultRedirect, formRedirect, queryRedirect }) {
|
|
25
|
-
if (typeof formRedirect === "string") {
|
|
26
|
-
const sanitized = sanitizeSafeAppPath(formRedirect);
|
|
27
|
-
if (sanitized) return sanitized;
|
|
28
|
-
}
|
|
29
|
-
return sanitizeSafeAppPath(queryRedirect) ?? defaultRedirect;
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/portal/callback.ts
|
|
33
|
-
/**
|
|
34
|
-
* Check if running in production environment.
|
|
35
|
-
*/
|
|
36
|
-
function isProduction() {
|
|
37
|
-
return process.env.NODE_ENV === "production";
|
|
38
|
-
}
|
|
39
|
-
function serializeCookie(name, value, options) {
|
|
40
|
-
const parts = [`${name}=${encodeURIComponent(value)}`];
|
|
41
|
-
parts.push(`Path=${options.path ?? "/"}`);
|
|
42
|
-
if (options.httpOnly) parts.push("HttpOnly");
|
|
43
|
-
if (options.secure) parts.push("Secure");
|
|
44
|
-
if (options.sameSite) {
|
|
45
|
-
const sameSiteValue = options.sameSite === "lax" ? "Lax" : options.sameSite === "strict" ? "Strict" : "None";
|
|
46
|
-
parts.push(`SameSite=${sameSiteValue}`);
|
|
47
|
-
}
|
|
48
|
-
if (typeof options.maxAge === "number") parts.push(`Max-Age=${options.maxAge}`);
|
|
49
|
-
return parts.join("; ");
|
|
50
|
-
}
|
|
51
|
-
function createPortalRouteResponse(init) {
|
|
52
|
-
const headers = new Headers(init.headers);
|
|
53
|
-
const cookies = /* @__PURE__ */ new Map();
|
|
54
|
-
for (const cookie of init.cookies ?? []) {
|
|
55
|
-
cookies.set(cookie.name, cookie);
|
|
56
|
-
headers.append("Set-Cookie", serializeCookie(cookie.name, cookie.value, {
|
|
57
|
-
httpOnly: cookie.httpOnly,
|
|
58
|
-
secure: cookie.secure,
|
|
59
|
-
sameSite: cookie.sameSite,
|
|
60
|
-
path: cookie.path,
|
|
61
|
-
maxAge: cookie.maxAge
|
|
62
|
-
}));
|
|
63
|
-
}
|
|
64
|
-
const response = new Response(init.body ?? null, {
|
|
65
|
-
status: init.status,
|
|
66
|
-
headers
|
|
67
|
-
});
|
|
68
|
-
return Object.assign(response, { cookies: { get(name) {
|
|
69
|
-
return cookies.get(name);
|
|
70
|
-
} } });
|
|
71
|
-
}
|
|
72
|
-
function createJsonResponse(body, status) {
|
|
73
|
-
return createPortalRouteResponse({
|
|
74
|
-
body: JSON.stringify(body),
|
|
75
|
-
status,
|
|
76
|
-
headers: {
|
|
77
|
-
"Content-Type": "application/json",
|
|
78
|
-
"Cache-Control": "no-store",
|
|
79
|
-
"Referrer-Policy": "no-referrer"
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Resolve the external origin for redirects.
|
|
85
|
-
*
|
|
86
|
-
* In dev, NextRequest.nextUrl.host can be 'localhost' even when the request was
|
|
87
|
-
* made to a subdomain like `foo.localhost`. Use forwarded/host headers to preserve
|
|
88
|
-
* the real host so we don't accidentally redirect to localhost (which can then
|
|
89
|
-
* trigger frontend middleware redirects to the dashboard).
|
|
90
|
-
*/
|
|
91
|
-
function getRequestOrigin(request) {
|
|
92
|
-
const url = request.nextUrl;
|
|
93
|
-
const forwardedHost = request.headers.get("x-forwarded-host")?.split(",")[0]?.trim();
|
|
94
|
-
const host = request.headers.get("host")?.split(",")[0]?.trim();
|
|
95
|
-
const isInternalHost = (value) => {
|
|
96
|
-
const normalized = value.toLowerCase();
|
|
97
|
-
return normalized.includes("localhost") || normalized.endsWith(".local") || normalized.startsWith("127.") || normalized.startsWith("0.0.0.0") || normalized.startsWith("[::1]") || normalized === "::1";
|
|
98
|
-
};
|
|
99
|
-
const hostHeader = forwardedHost && (!host || isInternalHost(host) && !isInternalHost(forwardedHost)) ? forwardedHost : host || url.host;
|
|
100
|
-
const forwardedProto = request.headers.get("x-forwarded-proto")?.split(",")[0]?.trim();
|
|
101
|
-
const isLocalHost = hostHeader.includes("localhost") || hostHeader.includes(".local");
|
|
102
|
-
return `${forwardedProto || (isLocalHost ? "http" : url.protocol.replace(":", ""))}://${hostHeader}`;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Get dashboard URL from environment without requiring API keys.
|
|
106
|
-
* Returns null if not configured.
|
|
107
|
-
*
|
|
108
|
-
* This is a simpler alternative to getRiverbankEnv() that doesn't
|
|
109
|
-
* require SITE_ID or API_KEY to be set.
|
|
110
|
-
*/
|
|
111
|
-
function getDashboardUrl() {
|
|
112
|
-
const target = process.env.RIVERBANK_ENV?.toLowerCase();
|
|
113
|
-
const prefix = target === "remote" || target === "production" || target === "prod" ? "RIVERBANK_REMOTE" : "RIVERBANK_LOCAL";
|
|
114
|
-
const url = process.env[`${prefix}_DASHBOARD_URL`];
|
|
115
|
-
if (!url) return null;
|
|
116
|
-
return url.replace(/\/api$/, "").replace(/\/$/, "");
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Resolve dashboard URL from various sources.
|
|
120
|
-
*/
|
|
121
|
-
function resolveDashboardUrl(option) {
|
|
122
|
-
if (typeof option === "string") return option;
|
|
123
|
-
if (typeof option === "function") return option();
|
|
124
|
-
return getDashboardUrl();
|
|
125
|
-
}
|
|
126
|
-
function isApiSuccessEnvelope(value) {
|
|
127
|
-
return value !== null && typeof value === "object" && "success" in value && value.success === true && "data" in value;
|
|
128
|
-
}
|
|
129
|
-
function isApiErrorEnvelope(value) {
|
|
130
|
-
return value !== null && typeof value === "object" && "success" in value && value.success === false;
|
|
131
|
-
}
|
|
132
|
-
async function exchangePortalCode(params) {
|
|
133
|
-
const controller = new AbortController();
|
|
134
|
-
const timeout = setTimeout(() => controller.abort(), params.timeoutMs);
|
|
135
|
-
try {
|
|
136
|
-
const response = await fetch(`${params.dashboardUrl}/api/portal/auth/exchange`, {
|
|
137
|
-
method: "POST",
|
|
138
|
-
headers: { "Content-Type": "application/json" },
|
|
139
|
-
cache: "no-store",
|
|
140
|
-
body: JSON.stringify({
|
|
141
|
-
portalCode: params.portalCode,
|
|
142
|
-
callbackOrigin: params.callbackOrigin
|
|
143
|
-
}),
|
|
144
|
-
signal: controller.signal
|
|
145
|
-
});
|
|
146
|
-
const json = await response.json().catch(() => null);
|
|
147
|
-
if (response.ok && isApiSuccessEnvelope(json)) return {
|
|
148
|
-
success: true,
|
|
149
|
-
payload: json.data
|
|
150
|
-
};
|
|
151
|
-
const fallbackMessage = response.status >= 500 ? "Unable to complete portal sign-in right now. Please try again." : "Invalid or expired portal code.";
|
|
152
|
-
const envelopeMessage = isApiErrorEnvelope(json) && typeof json.error?.message === "string" ? json.error.message : null;
|
|
153
|
-
return {
|
|
154
|
-
success: false,
|
|
155
|
-
status: response.status,
|
|
156
|
-
message: envelopeMessage ?? fallbackMessage
|
|
157
|
-
};
|
|
158
|
-
} catch {
|
|
159
|
-
return {
|
|
160
|
-
success: false,
|
|
161
|
-
status: 502,
|
|
162
|
-
message: "Unable to complete portal sign-in right now. Please try again."
|
|
163
|
-
};
|
|
164
|
-
} finally {
|
|
165
|
-
clearTimeout(timeout);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
function portalSessionCookie(token, secure) {
|
|
169
|
-
return {
|
|
170
|
-
name: PORTAL_TOKEN_COOKIE,
|
|
171
|
-
value: token,
|
|
172
|
-
httpOnly: true,
|
|
173
|
-
secure,
|
|
174
|
-
sameSite: "lax",
|
|
175
|
-
path: "/",
|
|
176
|
-
maxAge: PORTAL_COOKIE_MAX_AGE
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
async function readCallbackPostCode(request, origin) {
|
|
180
|
-
if (request.headers.get("origin") !== origin) return {
|
|
181
|
-
kind: "error",
|
|
182
|
-
status: 403
|
|
183
|
-
};
|
|
184
|
-
if (request.headers.get("content-type")?.split(";")[0]?.trim() !== "application/json") return {
|
|
185
|
-
kind: "error",
|
|
186
|
-
status: 415
|
|
187
|
-
};
|
|
188
|
-
const body = await request.json().catch(() => null);
|
|
189
|
-
return body && typeof body === "object" && "portalCode" in body && typeof body.portalCode === "string" && body.portalCode.trim() ? {
|
|
190
|
-
kind: "code",
|
|
191
|
-
value: body.portalCode
|
|
192
|
-
} : {
|
|
193
|
-
kind: "error",
|
|
194
|
-
status: 400
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
async function completeCallbackPost(request, options, secure, exchangeTimeoutMs) {
|
|
198
|
-
const origin = getRequestOrigin(request);
|
|
199
|
-
const code = await readCallbackPostCode(request, origin);
|
|
200
|
-
if (code.kind === "error") return createJsonResponse({ success: false }, code.status);
|
|
201
|
-
const dashboardUrl = resolveDashboardUrl(options.dashboardUrl);
|
|
202
|
-
if (!dashboardUrl) return createJsonResponse({ success: false }, 500);
|
|
203
|
-
const result = await exchangePortalCode({
|
|
204
|
-
dashboardUrl,
|
|
205
|
-
portalCode: code.value,
|
|
206
|
-
callbackOrigin: origin,
|
|
207
|
-
timeoutMs: exchangeTimeoutMs
|
|
208
|
-
});
|
|
209
|
-
if (!result.success) return createJsonResponse({ success: false }, result.status >= 500 || result.status <= 0 ? 502 : result.status);
|
|
210
|
-
return createPortalRouteResponse({
|
|
211
|
-
status: 200,
|
|
212
|
-
body: JSON.stringify({ success: true }),
|
|
213
|
-
headers: {
|
|
214
|
-
"Content-Type": "application/json",
|
|
215
|
-
"Cache-Control": "no-store",
|
|
216
|
-
"Referrer-Policy": "no-referrer"
|
|
217
|
-
},
|
|
218
|
-
cookies: [portalSessionCookie(result.payload.sessionToken, secure)]
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Create a GET route handler for the portal callback.
|
|
223
|
-
*
|
|
224
|
-
* This handler:
|
|
225
|
-
* 1. Extracts the portal_code from the URL query params
|
|
226
|
-
* 2. Validates the redirect_to path (prevents open redirects)
|
|
227
|
-
* 3. Exchanges portal_code server-to-server for session token
|
|
228
|
-
* 4. Stores the token in an httpOnly cookie
|
|
229
|
-
* 5. Redirects to the validated path
|
|
230
|
-
*
|
|
231
|
-
* @param options - Configuration options
|
|
232
|
-
* @returns GET route handler function
|
|
233
|
-
*/
|
|
234
|
-
function handlePortalCallback(options = {}) {
|
|
235
|
-
const defaultRedirect = resolveDefaultRedirect(options, DEFAULT_PORTAL_REDIRECT);
|
|
236
|
-
const secure = options.secure ?? isProduction();
|
|
237
|
-
const exchangeTimeoutMs = options.exchangeTimeoutMs ?? 1e4;
|
|
238
|
-
const { dashboardUrl } = options;
|
|
239
|
-
return async function callback(request) {
|
|
240
|
-
if (request.method === "POST") return completeCallbackPost(request, options, secure, exchangeTimeoutMs);
|
|
241
|
-
const { searchParams } = request.nextUrl;
|
|
242
|
-
const portalCode = searchParams.get(PORTAL_CODE_PARAM);
|
|
243
|
-
const finalRedirect = resolveCallbackRedirect(searchParams.get(REDIRECT_TO_PARAM), defaultRedirect);
|
|
244
|
-
if (!portalCode) return createJsonResponse({ error: "Missing portal_code parameter" }, 400);
|
|
245
|
-
const url = resolveDashboardUrl(dashboardUrl);
|
|
246
|
-
if (!url) return createJsonResponse({ error: "Dashboard URL is not configured" }, 500);
|
|
247
|
-
const exchangeResult = await exchangePortalCode({
|
|
248
|
-
dashboardUrl: url,
|
|
249
|
-
portalCode,
|
|
250
|
-
callbackOrigin: getRequestOrigin(request),
|
|
251
|
-
timeoutMs: exchangeTimeoutMs
|
|
252
|
-
});
|
|
253
|
-
if (!exchangeResult.success) {
|
|
254
|
-
const status = exchangeResult.status >= 500 || exchangeResult.status <= 0 ? 502 : exchangeResult.status;
|
|
255
|
-
return createJsonResponse({ error: exchangeResult.message }, status);
|
|
256
|
-
}
|
|
257
|
-
const redirectUrl = buildSafeRedirectUrl(finalRedirect, getRequestOrigin(request));
|
|
258
|
-
redirectUrl.searchParams.set(PORTAL_LOGIN_SUCCESS_PARAM, "success");
|
|
259
|
-
return createPortalRouteResponse({
|
|
260
|
-
status: 307,
|
|
261
|
-
headers: {
|
|
262
|
-
Location: redirectUrl.toString(),
|
|
263
|
-
"Referrer-Policy": "no-referrer",
|
|
264
|
-
"Cache-Control": "no-store"
|
|
265
|
-
},
|
|
266
|
-
cookies: [portalSessionCookie(exchangeResult.payload.sessionToken, secure)]
|
|
267
|
-
});
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Create a POST route handler for portal logout.
|
|
272
|
-
*
|
|
273
|
-
* This handler:
|
|
274
|
-
* 1. Gets the redirect path from form data or query params
|
|
275
|
-
* 2. Calls the dashboard logout API to invalidate the session
|
|
276
|
-
* 3. Clears the portal token cookie
|
|
277
|
-
* 4. Redirects to the validated path
|
|
278
|
-
*
|
|
279
|
-
* @param options - Configuration options
|
|
280
|
-
* @returns POST route handler function
|
|
281
|
-
*/
|
|
282
|
-
function handlePortalLogout(options = {}) {
|
|
283
|
-
const defaultRedirect = resolveDefaultRedirect(options, "/");
|
|
284
|
-
const secure = options.secure ?? isProduction();
|
|
285
|
-
const { dashboardUrl } = options;
|
|
286
|
-
return async function POST(request) {
|
|
287
|
-
const portalToken = request.cookies.get(PORTAL_TOKEN_COOKIE)?.value;
|
|
288
|
-
let formRedirect = null;
|
|
289
|
-
try {
|
|
290
|
-
formRedirect = (await request.formData()).get(REDIRECT_TO_PARAM);
|
|
291
|
-
} catch {}
|
|
292
|
-
const redirectTo = resolveLogoutRedirect({
|
|
293
|
-
defaultRedirect,
|
|
294
|
-
formRedirect,
|
|
295
|
-
queryRedirect: request.nextUrl.searchParams.get(REDIRECT_TO_PARAM)
|
|
296
|
-
});
|
|
297
|
-
if (portalToken) {
|
|
298
|
-
const url = resolveDashboardUrl(dashboardUrl);
|
|
299
|
-
if (url) try {
|
|
300
|
-
await fetch(`${url}/api/portal/auth/logout`, {
|
|
301
|
-
method: "POST",
|
|
302
|
-
headers: { Authorization: `Bearer ${portalToken}` }
|
|
303
|
-
});
|
|
304
|
-
} catch {}
|
|
305
|
-
}
|
|
306
|
-
return createPortalRouteResponse({
|
|
307
|
-
status: 307,
|
|
308
|
-
headers: { Location: buildSafeRedirectUrl(redirectTo, getRequestOrigin(request)).toString() },
|
|
309
|
-
cookies: [{
|
|
310
|
-
name: PORTAL_TOKEN_COOKIE,
|
|
311
|
-
value: "",
|
|
312
|
-
httpOnly: true,
|
|
313
|
-
secure,
|
|
314
|
-
sameSite: "lax",
|
|
315
|
-
path: "/",
|
|
316
|
-
maxAge: 0
|
|
317
|
-
}]
|
|
318
|
-
});
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
//#endregion
|
|
322
|
-
//#region src/portal/validation.ts
|
|
323
|
-
/**
|
|
324
|
-
* Portal Validation Utilities
|
|
325
|
-
*/
|
|
326
|
-
/**
|
|
327
|
-
* Validate that a redirect path is safe (prevents open redirects).
|
|
328
|
-
*
|
|
329
|
-
* Valid paths must:
|
|
330
|
-
* - Resolve to the same origin when parsed against a fixed base
|
|
331
|
-
* - Not contain backslashes or control characters
|
|
332
|
-
* - Not include encoded path separator/control-character payloads in the pathname
|
|
333
|
-
*
|
|
334
|
-
* @param path - The path to validate
|
|
335
|
-
* @returns True if the path is safe to redirect to
|
|
336
|
-
*/
|
|
337
|
-
function isValidRedirectPath(path) {
|
|
338
|
-
return sanitizeSafeAppPath(path) !== null;
|
|
339
|
-
}
|
|
340
|
-
//#endregion
|
|
341
|
-
//#region src/portal/token.ts
|
|
342
|
-
/**
|
|
343
|
-
* Portal server helpers: callback, logout and cookie/token access.
|
|
344
|
-
*
|
|
345
|
-
* For a themed reserved route, use createPortalPage from @riverbankcms/sdk/next.
|
|
346
|
-
* For a custom host, import CustomerPortal from @riverbankcms/sdk/portal/client
|
|
347
|
-
* and pass siteId, apiBaseUrl and the nullable portalToken inside the site ThemeScope.
|
|
348
|
-
*/
|
|
349
|
-
/**
|
|
350
|
-
* Get the portal token from the cookie store.
|
|
351
|
-
*
|
|
352
|
-
* @param cookieStore - The cookie store from `await cookies()`
|
|
353
|
-
* @returns The portal token, or null if not present
|
|
354
|
-
*/
|
|
355
|
-
function getPortalToken(cookieStore) {
|
|
356
|
-
return cookieStore.get("portal_token")?.value ?? null;
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* Check if the user has a portal session.
|
|
360
|
-
*
|
|
361
|
-
* Note: This only checks if the cookie exists, not if it's valid.
|
|
362
|
-
* The actual validation happens when making API calls.
|
|
363
|
-
*
|
|
364
|
-
* @param cookieStore - The cookie store from `await cookies()`
|
|
365
|
-
* @returns True if a portal token cookie exists
|
|
366
|
-
*/
|
|
367
|
-
function hasPortalSession(cookieStore) {
|
|
368
|
-
return getPortalToken(cookieStore) !== null;
|
|
369
|
-
}
|
|
370
|
-
//#endregion
|
|
371
|
-
export { handlePortalCallback as a, getDashboardUrl as i, hasPortalSession as n, handlePortalLogout as o, isValidRedirectPath as r, getPortalToken as t };
|