@riverbankcms/sdk 0.135.1 → 0.136.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/CHANGELOG.md +13 -0
- package/README.md +4 -8
- package/dist/{PreviewEditorSidebar-D4p_5TdY.mjs → PreviewEditorSidebar-BU5ZlhQR.mjs} +4 -4
- package/dist/{PreviewEditorUI-D0cRoTX1.mjs → PreviewEditorUI-9XkHL-bC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-wbEpXryy.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BKLtM3Nz.mjs → SdkPreviewModeRuntime-CnWmj-2B.mjs} +50 -99
- package/dist/{SiteChromeCustomizeContext-61X2m7QV.mjs → SiteChromeCustomizeContext-B6d5zkog.mjs} +2299 -1149
- package/dist/_dts/ai/src/contracts/proposals.d.ts +8 -554
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +401 -2312
- package/dist/_dts/api/src/contentRuntime.d.ts +6 -0
- package/dist/_dts/api/src/endpoints.d.ts +7 -0
- package/dist/_dts/api/src/index.d.ts +1 -0
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
- package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +6 -432
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
- package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +12 -6
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
- package/dist/_dts/blocks/src/definitions.d.ts +14 -0
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +40 -0
- package/dist/_dts/blocks/src/server.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +44 -18
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +3 -3
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
- package/dist/_dts/calendar/src/grid.d.ts +24 -66
- package/dist/_dts/calendar/src/index.d.ts +2 -2
- package/dist/_dts/calendar/src/timetable.d.ts +5 -9
- package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
- package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
- package/dist/_dts/core/src/slug.d.ts +20 -5
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
- package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
- package/dist/_dts/theme-core/src/data.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +6 -807
- package/dist/_dts/theme-core/src/schema.d.ts +452 -1278
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +213 -1
- package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +0 -29
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +16 -2
- package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +161 -0
- package/dist/client/{BookingConsentAgreement-Bz9znbpn.mjs → BookingConsentAgreement-DCch21a6.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-35Ru8yB9.mjs → DiscountCodeDisclosure-DIj1T59K.mjs} +1 -1
- package/dist/client/{EventCombined.client-BKB0ZxRR.mjs → EventCombined.client-BWVNlXTx.mjs} +226 -206
- package/dist/client/{EventListing.client-Dx8I21ok.mjs → EventListing.client-DVFCDe3i.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CEWx-Bhe.mjs → LeafletStaticMap-BY5mIHw9.mjs} +1 -1
- package/dist/client/{accordion-KIDsKTwS.mjs → accordion-CK29E8rG.mjs} +1 -1
- package/dist/client/{bookingForm-D96Rmp-5.mjs → bookingForm-DFvnet-N.mjs} +5 -5
- package/dist/client/bookings.mjs +86 -47
- package/dist/client/{carousel-YwUgyL66.mjs → carousel-BVU5NQlb.mjs} +1 -1
- package/dist/client/{cart-BbwuNrUT.mjs → cart-BNItcZVa.mjs} +3 -3
- package/dist/client/{checkout-hp1ucmEY.mjs → checkout-Bu6iCdkP.mjs} +3 -3
- package/dist/client/client.mjs +1950 -1031
- package/dist/client/{context-DljQn8L5.mjs → context-BImarOAq.mjs} +12 -0
- package/dist/client/{eventCalendar-DU4iNLpo.mjs → eventCalendar-DS2h-UXD.mjs} +256 -114
- package/dist/client/{eventCombined-CZuupW8m.mjs → eventCombined-Drt4Oq9p.mjs} +3 -3
- package/dist/client/{eventDetails-DPQWwCIi.mjs → eventDetails-Bl2vWgTX.mjs} +4 -3
- package/dist/client/{eventListing-C7oMidwS.mjs → eventListing-CS7PHY7v.mjs} +3 -3
- package/dist/client/{eventRegistration-zEiunlUs.mjs → eventRegistration-D-j8eNy2.mjs} +85 -41
- package/dist/client/{form-D2KIyCVJ.mjs → form-RMpoLTyr.mjs} +2 -2
- package/dist/client/{headerSection-CK5uChUK.mjs → headerSection-BYE3Lb3k.mjs} +2 -2
- package/dist/client/hooks.mjs +2225 -276
- package/dist/client/{locationMap-DLQNH1ln.mjs → locationMap-BxSr7Kkh.mjs} +2 -2
- package/dist/client/{newsletterForm-ZuhIG7fZ.mjs → newsletterForm-DerbXwFC.mjs} +2 -2
- package/dist/client/{productDetail-7hIcGeae.mjs → productDetail-4SZCLhAf.mjs} +3 -3
- package/dist/client/{productList-T4Cii1ot.mjs → productList-D7AP4GNq.mjs} +3 -3
- package/dist/client/{propsDecoder-mB0aC_Fi.mjs → propsDecoder-pzBeCh14.mjs} +94 -24
- package/dist/client/rendering/client.mjs +758 -464
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +2126 -1244
- package/dist/client/{scrollToBlock-Du5mHgvL.mjs → scrollToBlock-CduAKf8T.mjs} +1 -1
- package/dist/client/{shop-B5zAcKZn.mjs → shop-Cp5p_kGe.mjs} +6 -6
- package/dist/client/{shop-commerce-BKBZB6l5.mjs → shop-commerce-DicXYaYX.mjs} +5 -5
- package/dist/client/{shop-commerce-store-Cq4qlNtQ.mjs → shop-commerce-store-CGWnpY4K.mjs} +1 -1
- package/dist/client/{shopShared-DYGzEs9D.mjs → shopShared-BDf9ljkm.mjs} +3 -3
- package/dist/client/{useEventFilters-Bphkda8m.mjs → useEventFilters-DeeyGYuk.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +7 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +7 -0
- package/dist/preview-next/middleware.mjs +7 -0
- package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-DbqBol0V.mjs} +7 -0
- package/dist/{sdk-runtime-BbIC8G4J.mjs → sdk-runtime-19MO27F0.mjs} +2 -2
- package/dist/{separator-CadhAtI7.mjs → separator-DaPLtJ1f.mjs} +1 -1
- package/dist/server/components.mjs +1527 -893
- package/dist/server/config-validation.mjs +65 -113
- package/dist/server/config.mjs +65 -113
- package/dist/server/data.mjs +65 -112
- package/dist/server/index.mjs +122 -4
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +1432 -708
- package/dist/server/page-converter.mjs +58 -91
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1682 -915
- package/dist/server/rendering.mjs +1694 -1020
- package/dist/server/routing.mjs +3230 -1843
- package/dist/server/server.mjs +21710 -19779
- package/dist/server/theme-bridge.mjs +656 -264
- package/dist/server/theme.mjs +2 -17
- package/dist/styles/index.css +609 -181
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { t as BlockApiProvider } from "./context-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-pzBeCh14.mjs";
|
|
2
|
+
import { t as BlockApiProvider } from "./context-BImarOAq.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-DVFCDe3i.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/rendering/islands/enhancers/eventListing.tsx
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as buildBookingPaymentSelectionViewModel, i as usePolling, n as StepIndicator$1, o as resolveBookingPaymentDueNowCents, r as SpinnerNode, s as formatPrice, t as BookingConsentAgreement } from "./BookingConsentAgreement-
|
|
3
|
-
import { $t as
|
|
4
|
-
import { n as useBlockApi, t as BlockApiProvider } from "./context-
|
|
2
|
+
import { a as buildBookingPaymentSelectionViewModel, i as usePolling, n as StepIndicator$1, o as resolveBookingPaymentDueNowCents, r as SpinnerNode, s as formatPrice, t as BookingConsentAgreement } from "./BookingConsentAgreement-DCch21a6.mjs";
|
|
3
|
+
import { $t as publicEventScalarPrice, At as assertNever, Bt as formatBookingDateTime, C as getStepNumber, Ht as formatBookingTime, Jt as toBookingTimeZone, O as resolveEventRegistrationScopedEvents, Qt as publicEventPricingType, S as WIZARD_STEPS, T as planEventRegistrationSurface, V as formatEventPriceDisplay, Xt as publicEventPricingCurrency, Y as resolveRuntimeEventPricing, Yt as toScheduledBookingDateTime, Zt as publicEventPricingMode, _ as findEventByOccurrenceId, b as resolveEventRequiresPayment, en as publicEventTicketTypes, g as toWholeSeriesRegistrationEvents, h as toRegistrationEvents, st as themeButtonClassName, t as defineIslandPropsDecoder, tn as formatCurrencyAmount, v as findPreSelectedEvent, w as getWizardStepsForContext, x as resolveRegistrationTarget, y as resolveDiscountContext, zt as formatBookingDate } from "./propsDecoder-pzBeCh14.mjs";
|
|
4
|
+
import { n as useBlockApi, t as BlockApiProvider } from "./context-BImarOAq.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-
|
|
6
|
+
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-CduAKf8T.mjs";
|
|
7
|
+
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-DIj1T59K.mjs";
|
|
8
8
|
import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
|
|
9
9
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
|
|
10
10
|
import { t as buildCheckoutReturnUrls } from "./checkoutUrls-BuseL0dw.mjs";
|
|
@@ -1512,47 +1512,88 @@ function cleanupStaleRegistrations() {
|
|
|
1512
1512
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.ts
|
|
1513
1513
|
const eventRegistrationStripeReturnDeps = {
|
|
1514
1514
|
usePaymentVerification,
|
|
1515
|
-
consumeReturnParams: () => consumeSearchParams([
|
|
1515
|
+
consumeReturnParams: () => consumeSearchParams([
|
|
1516
|
+
"registration",
|
|
1517
|
+
EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM,
|
|
1518
|
+
"session_id"
|
|
1519
|
+
]),
|
|
1516
1520
|
scrollToBlock,
|
|
1517
1521
|
cleanupStaleRegistrations,
|
|
1518
1522
|
clearPendingRegistration,
|
|
1519
1523
|
getPendingRegistration
|
|
1520
1524
|
};
|
|
1525
|
+
function restorePendingPresentation(options, pending) {
|
|
1526
|
+
options.setFormData(pending.formData);
|
|
1527
|
+
options.setTicketSelections(pending.ticketSelections);
|
|
1528
|
+
options.setTicketsCount(getTicketSelectionTotal(pending.ticketSelections));
|
|
1529
|
+
if (pending.selectedEventId) {
|
|
1530
|
+
const event = options.events.find((item) => item.selectionId === pending.selectedEventId) ?? null;
|
|
1531
|
+
if (event) options.setSelectedEvent(event);
|
|
1532
|
+
}
|
|
1533
|
+
options.setSelectedAttendanceMode(pending.selectedAttendanceMode ?? null);
|
|
1534
|
+
options.setPaymentSelection(pending.paymentSelection);
|
|
1535
|
+
}
|
|
1536
|
+
function showReturnReconciliation(options, message) {
|
|
1537
|
+
options.setErrorMessage(message);
|
|
1538
|
+
options.setStep("verifying-timeout");
|
|
1539
|
+
}
|
|
1540
|
+
async function handleCheckoutReturn(options, deps, checkoutAttemptIdRef) {
|
|
1541
|
+
deps.cleanupStaleRegistrations();
|
|
1542
|
+
const params = deps.consumeReturnParams();
|
|
1543
|
+
if (params.registration !== "cancelled" && params.registration !== "success") return;
|
|
1544
|
+
deps.scrollToBlock(EVENT_REGISTRATION_ANCHOR_ID);
|
|
1545
|
+
const siteId = options.api.config.siteId;
|
|
1546
|
+
const checkoutAttemptId = params.registration_attempt;
|
|
1547
|
+
if (!siteId) return;
|
|
1548
|
+
if (!checkoutAttemptId) {
|
|
1549
|
+
showReturnReconciliation(options, "We could not identify this payment attempt. Please contact us before trying again.");
|
|
1550
|
+
return;
|
|
1551
|
+
}
|
|
1552
|
+
const pending = deps.getPendingRegistration(siteId, checkoutAttemptId);
|
|
1553
|
+
checkoutAttemptIdRef.current = checkoutAttemptId;
|
|
1554
|
+
if (pending) restorePendingPresentation(options, pending);
|
|
1555
|
+
try {
|
|
1556
|
+
const outcome = params.registration === "success" ? params.session_id ? await options.api.resolveEventCheckoutReturn({
|
|
1557
|
+
kind: "resolveSuccess",
|
|
1558
|
+
checkoutAttemptId,
|
|
1559
|
+
sessionId: params.session_id
|
|
1560
|
+
}) : { kind: "notFound" } : await options.api.resolveEventCheckoutReturn({
|
|
1561
|
+
kind: "abandon",
|
|
1562
|
+
checkoutAttemptId
|
|
1563
|
+
});
|
|
1564
|
+
switch (outcome.kind) {
|
|
1565
|
+
case "resolved":
|
|
1566
|
+
options.setPendingRegistrationReference(outcome.reference);
|
|
1567
|
+
options.setStep("verifying-payment");
|
|
1568
|
+
return;
|
|
1569
|
+
case "abandoned":
|
|
1570
|
+
options.setErrorMessage("Your payment was cancelled. You can choose a payment option and try again.");
|
|
1571
|
+
options.setStep("select-payment");
|
|
1572
|
+
return;
|
|
1573
|
+
case "notFound":
|
|
1574
|
+
if (params.registration === "cancelled" && (options.registrationSubject?.kind === "occurrence" || pending?.reference.scope === "occurrence")) {
|
|
1575
|
+
options.setErrorMessage("Your payment was cancelled. You can choose a payment option and try again.");
|
|
1576
|
+
options.setStep("select-payment");
|
|
1577
|
+
return;
|
|
1578
|
+
}
|
|
1579
|
+
break;
|
|
1580
|
+
case "reconciliationRequired": break;
|
|
1581
|
+
}
|
|
1582
|
+
showReturnReconciliation(options, "We’re checking your payment. Please wait a moment before trying again.");
|
|
1583
|
+
} catch {
|
|
1584
|
+
showReturnReconciliation(options, "We could not check your payment yet. Please try again shortly.");
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1521
1587
|
function useEventRegistrationStripeReturn(options) {
|
|
1522
1588
|
return useEventRegistrationStripeReturnWithDeps(options, eventRegistrationStripeReturnDeps);
|
|
1523
1589
|
}
|
|
1524
1590
|
function useEventRegistrationStripeReturnWithDeps(options, deps) {
|
|
1525
|
-
const { api,
|
|
1591
|
+
const { api, pendingRegistrationReference, setErrorMessage, setRegistrationResult, setStep, step } = options;
|
|
1526
1592
|
const checkoutAttemptIdRef = useRef(null);
|
|
1527
1593
|
const verificationConfig = useMemo(() => step === "verifying-payment" && pendingRegistrationReference ? { reference: pendingRegistrationReference } : null, [step, pendingRegistrationReference]);
|
|
1528
1594
|
const verification = deps.usePaymentVerification(verificationConfig);
|
|
1529
1595
|
useEffect(() => {
|
|
1530
|
-
deps
|
|
1531
|
-
const returnParams = deps.consumeReturnParams();
|
|
1532
|
-
const registrationStatus = returnParams.registration;
|
|
1533
|
-
if (registrationStatus !== "cancelled" && registrationStatus !== "success") return;
|
|
1534
|
-
deps.scrollToBlock(EVENT_REGISTRATION_ANCHOR_ID);
|
|
1535
|
-
const siteId = api.config.siteId;
|
|
1536
|
-
if (!siteId) return;
|
|
1537
|
-
const checkoutAttemptId = returnParams[EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM];
|
|
1538
|
-
if (!checkoutAttemptId) return;
|
|
1539
|
-
const pending = deps.getPendingRegistration(siteId, checkoutAttemptId);
|
|
1540
|
-
if (!pending) return;
|
|
1541
|
-
checkoutAttemptIdRef.current = checkoutAttemptId;
|
|
1542
|
-
setFormData(pending.formData);
|
|
1543
|
-
setTicketSelections(pending.ticketSelections);
|
|
1544
|
-
setTicketsCount(getTicketSelectionTotal(pending.ticketSelections));
|
|
1545
|
-
if (pending.selectedEventId) {
|
|
1546
|
-
const event = events.find((e) => e.selectionId === pending.selectedEventId) ?? null;
|
|
1547
|
-
if (event) setSelectedEvent(event);
|
|
1548
|
-
}
|
|
1549
|
-
setSelectedAttendanceMode(pending.selectedAttendanceMode ?? null);
|
|
1550
|
-
setPaymentSelection(pending.paymentSelection);
|
|
1551
|
-
if (registrationStatus === "cancelled") setStep("select-payment");
|
|
1552
|
-
else if (registrationStatus === "success") {
|
|
1553
|
-
setPendingRegistrationReference(pending.reference);
|
|
1554
|
-
setStep("verifying-payment");
|
|
1555
|
-
}
|
|
1596
|
+
handleCheckoutReturn(options, deps, checkoutAttemptIdRef);
|
|
1556
1597
|
}, []);
|
|
1557
1598
|
useEffect(() => {
|
|
1558
1599
|
if (verification.status === "completed") {
|
|
@@ -1635,7 +1676,7 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
1635
1676
|
options.setStep("submitting");
|
|
1636
1677
|
try {
|
|
1637
1678
|
const prepared = prepareSubmitContext(options, target, method, passId, membershipId, selection);
|
|
1638
|
-
if (prepared.subject.kind === "wholeSeries" && method === "stripe") return submitWholeSeriesCheckout(options, deps, {
|
|
1679
|
+
if (prepared.subject.kind === "wholeSeries" && method === "stripe") return await submitWholeSeriesCheckout(options, deps, {
|
|
1639
1680
|
...prepared,
|
|
1640
1681
|
subject: prepared.subject
|
|
1641
1682
|
}, submitOptions);
|
|
@@ -1656,7 +1697,7 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
1656
1697
|
claimToken: options.claimToken ?? void 0,
|
|
1657
1698
|
guests: prepared.guestsPayload
|
|
1658
1699
|
});
|
|
1659
|
-
if (needsOccurrenceCheckout(result, method)) return submitOccurrenceCheckout(options, deps, prepared, result, method, submitOptions);
|
|
1700
|
+
if (needsOccurrenceCheckout(result, method)) return await submitOccurrenceCheckout(options, deps, prepared, result, method, submitOptions);
|
|
1660
1701
|
options.setRegistrationResult(toRegistrationResult(result));
|
|
1661
1702
|
options.setStep("success");
|
|
1662
1703
|
return {
|
|
@@ -1739,6 +1780,7 @@ async function submitWholeSeriesCheckout(options, deps, prepared, submitOptions)
|
|
|
1739
1780
|
claimToken: options.claimToken ?? void 0,
|
|
1740
1781
|
discountCode: options.discountCode.trim() || void 0,
|
|
1741
1782
|
collectionOptionKind: prepared.selectionSnapshot.collectionOptionKind,
|
|
1783
|
+
checkoutAttemptId,
|
|
1742
1784
|
...urls
|
|
1743
1785
|
});
|
|
1744
1786
|
if (result.scope !== "wholeSeries") throw new Error("Unexpected registration scope for event checkout.");
|
|
@@ -4928,7 +4970,7 @@ const VerifyingPaymentStep = () => {
|
|
|
4928
4970
|
* - "Check Again" button to restart polling
|
|
4929
4971
|
* - Contact support option for user reassurance
|
|
4930
4972
|
*/
|
|
4931
|
-
const VerifyingTimeoutStep = ({ onCheckAgain, supportEmail }) => {
|
|
4973
|
+
const VerifyingTimeoutStep = ({ onCheckAgain, supportEmail, title = "Your registration is saved", message = "We're still confirming your payment. This usually resolves within a few minutes. You'll receive a confirmation email once everything is verified." }) => {
|
|
4932
4974
|
return /* @__PURE__ */ jsx(TerminalPanel, {
|
|
4933
4975
|
tone: "warning",
|
|
4934
4976
|
className: "er-center",
|
|
@@ -4937,18 +4979,18 @@ const VerifyingTimeoutStep = ({ onCheckAgain, supportEmail }) => {
|
|
|
4937
4979
|
variant: "warning",
|
|
4938
4980
|
children: /* @__PURE__ */ jsx(ClockIcon, {})
|
|
4939
4981
|
}),
|
|
4940
|
-
title
|
|
4982
|
+
title,
|
|
4941
4983
|
body: /* @__PURE__ */ jsx("p", {
|
|
4942
4984
|
className: "er-text--muted er-message",
|
|
4943
|
-
children:
|
|
4985
|
+
children: message
|
|
4944
4986
|
}),
|
|
4945
4987
|
actionsClassName: "er-button-group",
|
|
4946
|
-
actions: /* @__PURE__ */ jsx("button", {
|
|
4988
|
+
actions: onCheckAgain ? /* @__PURE__ */ jsx("button", {
|
|
4947
4989
|
type: "button",
|
|
4948
4990
|
onClick: onCheckAgain,
|
|
4949
4991
|
className: "er-btn er-btn--primary",
|
|
4950
4992
|
children: "Check Again"
|
|
4951
|
-
}),
|
|
4993
|
+
}) : void 0,
|
|
4952
4994
|
secondaryBody: supportEmail ? /* @__PURE__ */ jsxs("p", {
|
|
4953
4995
|
className: "er-text--sm er-text--muted er-message",
|
|
4954
4996
|
children: [
|
|
@@ -5044,7 +5086,9 @@ function EventRegistrationTerminalState(props) {
|
|
|
5044
5086
|
onRetry: () => wizard.setStep("select-payment")
|
|
5045
5087
|
});
|
|
5046
5088
|
case "verifying-timeout": return /* @__PURE__ */ jsx(VerifyingTimeoutStep, {
|
|
5047
|
-
onCheckAgain: wizard.verification.retry,
|
|
5089
|
+
onCheckAgain: wizard.verification.status === "timeout" ? wizard.verification.retry : void 0,
|
|
5090
|
+
title: wizard.verification.status === "timeout" ? void 0 : "We’re checking your payment",
|
|
5091
|
+
message: wizard.verification.status === "timeout" ? void 0 : wizard.errorMessage,
|
|
5048
5092
|
supportEmail: props.supportEmail
|
|
5049
5093
|
});
|
|
5050
5094
|
case "success": return wizard.registrationResult ? /* @__PURE__ */ jsx(SuccessStep, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { D as clsx } from "./colorStyles-CrxJrPjJ.mjs";
|
|
3
|
-
import { At as assertNever, Mt as err, Nt as ok, st as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
4
|
-
import { n as useBlockApi, t as BlockApiProvider } from "./context-
|
|
3
|
+
import { At as assertNever, Mt as err, Nt as ok, st as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-pzBeCh14.mjs";
|
|
4
|
+
import { n as useBlockApi, t as BlockApiProvider } from "./context-BImarOAq.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-CtLvvS_d.mjs";
|
|
7
7
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { D as staticHeaderChromeRuntime, r as buildCartDisplay, st as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
+
import { D as staticHeaderChromeRuntime, r as buildCartDisplay, st as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-pzBeCh14.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-CGWnpY4K.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";
|