@riverbankcms/sdk 0.139.0 → 0.140.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 +1 -1
- package/dist/{PreviewEditorSidebar-BDeenhi3.mjs → PreviewEditorSidebar-CUyTzd5z.mjs} +4 -4
- package/dist/{PreviewEditorUI-DSRhgjF5.mjs → PreviewEditorUI-Agkw4v5i.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D2K8GLUG.mjs → PreviewQueryProvider-CN0ewic5.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CL7wSnYu.mjs → SdkPreviewModeRuntime-DdbeAdS8.mjs} +22 -8
- package/dist/{SiteChromeCustomizeContext-BhDn-5ir.mjs → SiteChromeCustomizeContext-CqGOz-Kv.mjs} +2053 -1110
- package/dist/_dts/ai/src/contracts/proposals.d.ts +165 -165
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +212 -212
- package/dist/_dts/api/src/accessAdmin.d.ts +74 -104
- package/dist/_dts/api/src/aiEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/authSubmission.d.ts +46 -0
- package/dist/_dts/api/src/billing.d.ts +8 -4
- package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +26 -0
- package/dist/_dts/api/src/blocks.d.ts +2 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +8 -1
- package/dist/_dts/api/src/communications.d.ts +0 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +8 -3
- package/dist/_dts/api/src/endpoints.d.ts +93 -64
- package/dist/_dts/api/src/event-destination-policy.d.ts +2 -1
- package/dist/_dts/api/src/footerSettings.d.ts +9 -6
- package/dist/_dts/api/src/index.d.ts +5 -6
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/mailingListIntegration.d.ts +8 -2
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation/types.d.ts +1 -1
- package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +25 -0
- package/dist/_dts/api/src/onboarding/surfaceData.d.ts +32 -32
- package/dist/_dts/api/src/publicBookingAvailabilityEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +11 -3
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +3 -29
- package/dist/_dts/api/src/publicOnboardingAttemptEndpointDefinitions.d.ts +65 -0
- package/dist/_dts/api/src/saveOutcome.d.ts +20 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -22
- package/dist/_dts/api/src/sdkPushContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +44 -44
- package/dist/_dts/api/src/settings/permissions.d.ts +12 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +9 -5
- package/dist/_dts/api/src/siteOnboarding.d.ts +2 -9
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -4
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/siteSettings.d.ts +20 -7
- package/dist/_dts/api/src/types.d.ts +77 -77
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +2 -37
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/billing/src/plans/types.d.ts +3 -0
- package/dist/_dts/billing/src/site-arrangements.d.ts +14 -3
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +16 -4
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +2 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +5 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +2 -4
- package/dist/_dts/blocks/src/portal/waitlist-types.d.ts +35 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +2 -1
- package/dist/_dts/blocks/src/system/data/types.d.ts +9 -0
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +0 -28
- 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 +7 -3
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/waitlist-claims.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +30 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +15 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +1 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +56 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -6
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +27 -4
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +2 -1
- package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +3 -1
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +3 -0
- package/dist/_dts/core/src/branded.d.ts +0 -8
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/mailing-list-setup-parser.d.ts +1 -1
- package/dist/_dts/core/src/mailing-list-setup.d.ts +14 -1
- package/dist/_dts/core/src/mailing-list-submission.d.ts +7 -27
- package/dist/_dts/core/src/participants.d.ts +2 -29
- package/dist/_dts/core/src/public-experience.d.ts +4 -0
- package/dist/_dts/core/src/public-profile.d.ts +27 -1
- package/dist/_dts/core/src/site-route-target.d.ts +9 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +293 -606
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListGlobalSettingsSummary.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/context.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/targetingState.d.ts +19 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +14 -20
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/cards/types.d.ts +21 -21
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +8 -2
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -2
- package/dist/_dts/theme-core/src/inputs/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +54 -54
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +1 -4
- package/dist/_dts/theme-core/src/schema.d.ts +84 -84
- package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +77 -0
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/typography/generateTypographyCss.d.ts +2 -2
- package/dist/_dts/ui/src/lib/use-delayed-flag.d.ts +9 -0
- package/dist/_dts/ui/src/pending-button.d.ts +10 -0
- package/dist/client/{BookingConsentAgreement-CZvTDtsK.mjs → BookingConsentAgreement-CuKa82V4.mjs} +4 -4
- package/dist/client/{DiscountCodeDisclosure-D-DsLCMU.mjs → DiscountCodeDisclosure-BbYieKWB.mjs} +1 -1
- package/dist/client/{EventCombined.client-dWqgd5ZO.mjs → EventCombined.client-LTfR1Aby.mjs} +6 -6
- package/dist/client/{EventListing.client-BMRa9IYp.mjs → EventListing.client-DUHpYSuo.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-D21W9kBZ.mjs → LeafletStaticMap-CHRupL6m.mjs} +1 -1
- package/dist/client/{accordion-FxF_ta47.mjs → accordion-6HiIFxNL.mjs} +1 -1
- package/dist/client/{bookingForm-YnwW4TGw.mjs → bookingForm-Dlmid43H.mjs} +7 -7
- package/dist/client/bookings.mjs +325 -140
- package/dist/client/{carousel-vng7fFT5.mjs → carousel-DmkZRRq_.mjs} +2 -2
- package/dist/client/{carousel.client-59G_WMr4.mjs → carousel.client-DQTjCVQT.mjs} +1 -1
- package/dist/client/{cart-DEPDsjNk.mjs → cart-CIC24330.mjs} +3 -3
- package/dist/client/{checkout-CZRWu9rW.mjs → checkout-D1Zw9imo.mjs} +3 -3
- package/dist/client/{checkoutUrls-BuseL0dw.mjs → checkoutUrls-FL6lRkrt.mjs} +1 -1
- package/dist/client/client.mjs +1717 -882
- package/dist/client/{colorStyles-CrxJrPjJ.mjs → colorStyles-3013aRAY.mjs} +3 -1
- package/dist/client/{context-DvU_WUmd.mjs → context-Cy1OayHx.mjs} +6 -19
- package/dist/client/{dates-wnPMiRl5.mjs → dates-aDcfoLHr.mjs} +2 -2
- package/dist/client/{eventCalendar-BA3Q5L15.mjs → eventCalendar-FQxMPAjf.mjs} +8 -8
- package/dist/client/{eventCombined-51wgR-1R.mjs → eventCombined-Dr3ac6Hb.mjs} +3 -3
- package/dist/client/{eventDetails-modaetpm.mjs → eventDetails-D-AzUHFQ.mjs} +4 -4
- package/dist/client/{eventListing-D8t2J3Kv.mjs → eventListing-B3XxBf3i.mjs} +3 -3
- package/dist/client/{eventRegistration-CYqtkCE_.mjs → eventRegistration-I6EaokFD.mjs} +500 -152
- package/dist/client/{form-CBKXN5In.mjs → form-BbWckVWY.mjs} +3 -3
- package/dist/client/{headerSection-DylDqNrs.mjs → headerSection-C9qU4Y7x.mjs} +2 -2
- package/dist/client/hooks.mjs +445 -180
- package/dist/client/{locationMap-CvWrG0vZ.mjs → locationMap-CLCShvlG.mjs} +3 -3
- package/dist/client/{media-BOHuueS5.mjs → media-DHpfFwd3.mjs} +1 -1
- package/dist/client/{newsletterForm-Btwk70zw.mjs → newsletterForm-Briukxzi.mjs} +130 -87
- package/dist/client/{pricing-Uzw-GQ6Y.mjs → pricing-Copadu-2.mjs} +1 -1
- package/dist/client/{productDetail-JLcUYKnd.mjs → productDetail-oujlRd-r.mjs} +3 -3
- package/dist/client/{productList-FM0cbUzj.mjs → productList-BRiIRUcd.mjs} +3 -3
- package/dist/client/{propsDecoder-DYzafZb2.mjs → propsDecoder-CB2KS_ko.mjs} +130 -24
- package/dist/client/rendering/client.mjs +911 -400
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +1696 -818
- package/dist/client/{scrollToBlock-CvXszexS.mjs → scrollToBlock-B1IS1_ua.mjs} +1 -1
- package/dist/client/{shop-BIcjvy5a.mjs → shop-Vn6yNFED.mjs} +6 -6
- package/dist/client/{shop-commerce-BZQsy7xw.mjs → shop-commerce-BVTqipYp.mjs} +7 -7
- package/dist/client/{shop-commerce-store-D5V7XAb5.mjs → shop-commerce-store-BVnJVy7v.mjs} +1 -1
- package/dist/client/{shopShared-DowkXevB.mjs → shopShared-COIeK77T.mjs} +4 -4
- package/dist/client/{useEventFilters-oMoTw_JE.mjs → useEventFilters-DzIUcS9n.mjs} +7 -7
- package/dist/preview-next/before-render.mjs +119 -64
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +119 -64
- package/dist/preview-next/middleware.mjs +119 -64
- package/dist/{previewAuthStore-COUyAKaX.mjs → previewAuthStore-Gjb6r6vz.mjs} +119 -64
- package/dist/{sdk-runtime-D4k2LSGF.mjs → sdk-runtime-CnCLvZRv.mjs} +2 -2
- package/dist/{separator-UGtpag4Z.mjs → separator-DKDRJ1oH.mjs} +1 -1
- package/dist/server/components.mjs +787 -323
- package/dist/server/config-validation.mjs +328 -79
- package/dist/server/config.mjs +332 -83
- package/dist/server/data.mjs +441 -180
- package/dist/server/index.mjs +126 -66
- package/dist/server/next.mjs +1031 -595
- package/dist/server/page-converter.mjs +183 -74
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1068 -592
- package/dist/server/rendering.mjs +802 -324
- package/dist/server/routing.mjs +506 -214
- package/dist/server/server.mjs +468 -244
- package/dist/server/theme-bridge.mjs +433 -100
- package/dist/server/theme.mjs +8 -2
- package/dist/styles/index.css +237 -43
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionCompactRow.d.ts +0 -29
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionList.d.ts +0 -13
package/dist/client/bookings.mjs
CHANGED
|
@@ -6878,8 +6878,14 @@ const headerInteractionPillPaletteValues = [
|
|
|
6878
6878
|
"accent"
|
|
6879
6879
|
];
|
|
6880
6880
|
/**
|
|
6881
|
-
* "No pill":
|
|
6882
|
-
*
|
|
6881
|
+
* "No pill": a colour change on hover rather than a filled background.
|
|
6882
|
+
*
|
|
6883
|
+
* The palette step writes nothing (#1318 Phase 4c decision 2), but on a
|
|
6884
|
+
* foreground-adaptive style that is not the end of the story: the hover colour
|
|
6885
|
+
* is derived from the resolved opening foreground at render time, paired with
|
|
6886
|
+
* the resting colour, so `quiet` resolves to a definite colour rather than to
|
|
6887
|
+
* whatever brand token the recipe happened to name. See
|
|
6888
|
+
* `applyOpeningForeground`.
|
|
6883
6889
|
*
|
|
6884
6890
|
* It exists because "a colour change on hover, no filled background" was not
|
|
6885
6891
|
* expressible in the vocabulary, and it is what
|
|
@@ -7861,6 +7867,28 @@ const bookingRequirementConsentFieldSchema = z.object({
|
|
|
7861
7867
|
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
7862
7868
|
//#endregion
|
|
7863
7869
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
7870
|
+
const publicEventLoaderQuerySchemaShape = {
|
|
7871
|
+
limit: z.string().optional(),
|
|
7872
|
+
from: z.string().optional(),
|
|
7873
|
+
to: z.string().optional(),
|
|
7874
|
+
afterStartsAt: z.string().optional(),
|
|
7875
|
+
afterId: z.string().optional(),
|
|
7876
|
+
categoryIds: z.string().optional(),
|
|
7877
|
+
venueId: z.string().optional(),
|
|
7878
|
+
staffMemberId: z.string().optional(),
|
|
7879
|
+
eventSurface: z.string().optional(),
|
|
7880
|
+
eventPresets: z.string().optional(),
|
|
7881
|
+
scheduleScope: z.string().optional(),
|
|
7882
|
+
seriesId: z.string().optional(),
|
|
7883
|
+
seriesIds: z.string().optional(),
|
|
7884
|
+
runSeriesId: z.string().optional(),
|
|
7885
|
+
seriesSlug: z.string().optional(),
|
|
7886
|
+
includeOccurrenceId: z.string().optional(),
|
|
7887
|
+
readIntent: z.string().optional(),
|
|
7888
|
+
detailLevel: z.string().optional(),
|
|
7889
|
+
readProfile: z.string().optional()
|
|
7890
|
+
};
|
|
7891
|
+
z.object(publicEventLoaderQuerySchemaShape);
|
|
7864
7892
|
const eventPresetSchema = z.enum([
|
|
7865
7893
|
"event",
|
|
7866
7894
|
"class",
|
|
@@ -8727,6 +8755,9 @@ function isApiSuccessResponse(json) {
|
|
|
8727
8755
|
* });
|
|
8728
8756
|
* ```
|
|
8729
8757
|
*/
|
|
8758
|
+
function publicEventsQuery(params) {
|
|
8759
|
+
return { ...params ?? {} };
|
|
8760
|
+
}
|
|
8730
8761
|
function createBlockApi(config) {
|
|
8731
8762
|
const { baseUrl, auth, authOverrides, siteId, isPreview } = config;
|
|
8732
8763
|
const dedup = createDeduplicationCache({ ttl: 100 });
|
|
@@ -8879,23 +8910,7 @@ function createBlockApi(config) {
|
|
|
8879
8910
|
const path = buildPath(EVENTS.list.path, { siteId: sid });
|
|
8880
8911
|
return request(EVENTS.list, {
|
|
8881
8912
|
path,
|
|
8882
|
-
query:
|
|
8883
|
-
from: params?.from,
|
|
8884
|
-
to: params?.to,
|
|
8885
|
-
afterStartsAt: params?.afterStartsAt,
|
|
8886
|
-
afterId: params?.afterId,
|
|
8887
|
-
limit: params?.limit,
|
|
8888
|
-
stage: params?.stage,
|
|
8889
|
-
eventSurface: params?.eventSurface,
|
|
8890
|
-
eventPresets: params?.eventPresets,
|
|
8891
|
-
scheduleScope: params?.scheduleScope,
|
|
8892
|
-
categoryIds: params?.categoryIds,
|
|
8893
|
-
venueId: params?.venueId,
|
|
8894
|
-
staffMemberId: params?.staffMemberId,
|
|
8895
|
-
seriesId: params?.seriesId,
|
|
8896
|
-
includeOccurrenceId: params?.includeOccurrenceId,
|
|
8897
|
-
detailLevel: params?.detailLevel
|
|
8898
|
-
}
|
|
8913
|
+
query: publicEventsQuery(params)
|
|
8899
8914
|
});
|
|
8900
8915
|
},
|
|
8901
8916
|
async getEventFilters(params) {
|
|
@@ -8959,7 +8974,7 @@ function createBlockApi(config) {
|
|
|
8959
8974
|
const path = buildPath(WHOLE_SERIES.waitlistClaimResolve.path, { siteId: sid });
|
|
8960
8975
|
return request(WHOLE_SERIES.waitlistClaimResolve, {
|
|
8961
8976
|
path,
|
|
8962
|
-
body:
|
|
8977
|
+
body: data
|
|
8963
8978
|
});
|
|
8964
8979
|
},
|
|
8965
8980
|
async getDiscountsAvailable(data) {
|
|
@@ -14867,61 +14882,6 @@ const BookingFormClient$1 = ({ siteId: siteIdProp, render }) => {
|
|
|
14867
14882
|
});
|
|
14868
14883
|
};
|
|
14869
14884
|
//#endregion
|
|
14870
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.ts
|
|
14871
|
-
function resolveRegistrationRecoveryAction(step, action) {
|
|
14872
|
-
if (step === "payment-failed") return "payment-options";
|
|
14873
|
-
if (step === "verifying-payment" || step === "verifying-timeout" || step === "redirecting") return "payment-status";
|
|
14874
|
-
return action;
|
|
14875
|
-
}
|
|
14876
|
-
function canRecoverToWaitlist(eligibility) {
|
|
14877
|
-
return Boolean(eligibility?.isFull && eligibility.canJoinWaitlist);
|
|
14878
|
-
}
|
|
14879
|
-
function shouldRefreshAfterRegistrationError(step, action, enabled) {
|
|
14880
|
-
return enabled || step === "error" && action === "places";
|
|
14881
|
-
}
|
|
14882
|
-
function resetRegistrationAfterExpiry(input) {
|
|
14883
|
-
input.dispatchFlow({
|
|
14884
|
-
type: "reset",
|
|
14885
|
-
hasPreSelectedContext: input.hasPreSelectedContext
|
|
14886
|
-
});
|
|
14887
|
-
input.setSelectedTicketLines([]);
|
|
14888
|
-
input.setSelectedSlidingAmountInput("");
|
|
14889
|
-
const mode = input.preSelectedEvent?.deliveryMode;
|
|
14890
|
-
input.setSelectedAttendanceMode(mode === "online" || mode === "in_person" ? mode : null);
|
|
14891
|
-
input.setErrorMessage("");
|
|
14892
|
-
input.setPendingRegistrationReference(null);
|
|
14893
|
-
}
|
|
14894
|
-
/** Recovery never starts another payment. Unknown payment outcomes go to the portal. */
|
|
14895
|
-
function recoverRegistrationError(action, handlers) {
|
|
14896
|
-
switch (action) {
|
|
14897
|
-
case "none": return;
|
|
14898
|
-
case "portal":
|
|
14899
|
-
case "payment-status":
|
|
14900
|
-
window.location.assign("/portal");
|
|
14901
|
-
return;
|
|
14902
|
-
case "event":
|
|
14903
|
-
window.location.assign(window.location.pathname);
|
|
14904
|
-
return;
|
|
14905
|
-
case "retry":
|
|
14906
|
-
window.location.reload();
|
|
14907
|
-
return;
|
|
14908
|
-
case "details":
|
|
14909
|
-
handlers.clearError();
|
|
14910
|
-
handlers.setStep("enter-details");
|
|
14911
|
-
return;
|
|
14912
|
-
case "payment-options":
|
|
14913
|
-
case "places":
|
|
14914
|
-
handlers.refreshOptions();
|
|
14915
|
-
handlers.clearError();
|
|
14916
|
-
handlers.setStep(action === "places" ? handlers.canJoinWaitlist ? "enter-details" : "select-tickets" : "select-payment");
|
|
14917
|
-
return;
|
|
14918
|
-
case "start":
|
|
14919
|
-
handlers.refreshOptions();
|
|
14920
|
-
handlers.reset();
|
|
14921
|
-
return;
|
|
14922
|
-
}
|
|
14923
|
-
}
|
|
14924
|
-
//#endregion
|
|
14925
14885
|
//#region ../blocks/src/system/runtime/nodes/events/domain/capacity.ts
|
|
14926
14886
|
/**
|
|
14927
14887
|
* Compute remaining spots for an event from `availableSpots` with a fallback
|
|
@@ -14991,6 +14951,166 @@ function resolveRuntimeEventDestination(event) {
|
|
|
14991
14951
|
};
|
|
14992
14952
|
}
|
|
14993
14953
|
//#endregion
|
|
14954
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.ts
|
|
14955
|
+
/** Recovery may select held places; checkout still owns admission and payment validation. */
|
|
14956
|
+
function checkoutRecoveryOptionAvailability(availability) {
|
|
14957
|
+
if (availability.kind === "available" || availability.reason === "sold_out" || availability.reason === "overallCapacityUnavailable") return {
|
|
14958
|
+
kind: "available",
|
|
14959
|
+
remainingPlaces: null
|
|
14960
|
+
};
|
|
14961
|
+
return availability;
|
|
14962
|
+
}
|
|
14963
|
+
/**
|
|
14964
|
+
* A form-only projection for the explicit existing-checkout path. It permits
|
|
14965
|
+
* collecting the original selection without claiming a new place is available.
|
|
14966
|
+
* The public checkout service identifies the customer and remains the admission
|
|
14967
|
+
* authority; no reservation/customer data is exposed through this projection.
|
|
14968
|
+
*/
|
|
14969
|
+
function getCheckoutRecoveryFormEligibility(eligibility) {
|
|
14970
|
+
if (!eligibility || eligibility.registration.kind !== "none" && eligibility.registration.kind !== "pending_payment" || eligibility.availability.kind === "unavailable" && eligibility.availability.reason !== "full" && eligibility.availability.reason !== "selectionRequired") return eligibility;
|
|
14971
|
+
const amountCents = eligibility.price ?? 0;
|
|
14972
|
+
if (amountCents <= 0 || !eligibility.currency || eligibility.availability.kind === "unavailable" && eligibility.availability.reason === "selectionRequired") return eligibility.registration.kind === "pending_payment" ? {
|
|
14973
|
+
...eligibility,
|
|
14974
|
+
registration: { kind: "none" },
|
|
14975
|
+
ticketTypes: eligibility.ticketTypes.map((option) => ({
|
|
14976
|
+
...option,
|
|
14977
|
+
availability: checkoutRecoveryOptionAvailability(option.availability)
|
|
14978
|
+
}))
|
|
14979
|
+
} : eligibility;
|
|
14980
|
+
const currency = eligibility.currency;
|
|
14981
|
+
const paymentOptions = eligibility.paymentTerms.allowedOptions.map((option) => {
|
|
14982
|
+
switch (option.kind) {
|
|
14983
|
+
case "upfront": return {
|
|
14984
|
+
kind: "payInFull",
|
|
14985
|
+
amountCents,
|
|
14986
|
+
currency
|
|
14987
|
+
};
|
|
14988
|
+
case "deferred_manual": return {
|
|
14989
|
+
kind: "deferredManual",
|
|
14990
|
+
amountCents,
|
|
14991
|
+
currency
|
|
14992
|
+
};
|
|
14993
|
+
case "instalment_plan": return {
|
|
14994
|
+
kind: "instalmentPlan",
|
|
14995
|
+
amountCents,
|
|
14996
|
+
currency
|
|
14997
|
+
};
|
|
14998
|
+
case "flexible_balance": return {
|
|
14999
|
+
kind: "flexibleBalance",
|
|
15000
|
+
amountCents,
|
|
15001
|
+
currency
|
|
15002
|
+
};
|
|
15003
|
+
}
|
|
15004
|
+
});
|
|
15005
|
+
return {
|
|
15006
|
+
...eligibility,
|
|
15007
|
+
registration: { kind: "none" },
|
|
15008
|
+
availability: {
|
|
15009
|
+
kind: "available",
|
|
15010
|
+
remainingPlaces: null,
|
|
15011
|
+
waitlistEnabled: eligibility.waitlistEnabled
|
|
15012
|
+
},
|
|
15013
|
+
eligible: paymentOptions.length > 0,
|
|
15014
|
+
isFull: false,
|
|
15015
|
+
canJoinWaitlist: false,
|
|
15016
|
+
isFree: false,
|
|
15017
|
+
requiresPayment: true,
|
|
15018
|
+
canPayDirectly: paymentOptions.length > 0,
|
|
15019
|
+
paymentOptions,
|
|
15020
|
+
eligiblePasses: [],
|
|
15021
|
+
eligibleMemberships: [],
|
|
15022
|
+
ticketTypes: eligibility.ticketTypes.map((option) => ({
|
|
15023
|
+
...option,
|
|
15024
|
+
availability: checkoutRecoveryOptionAvailability(option.availability)
|
|
15025
|
+
}))
|
|
15026
|
+
};
|
|
15027
|
+
}
|
|
15028
|
+
function canJoinWaitlistOutsideRecovery(event, attendanceMode, checkoutRecovery) {
|
|
15029
|
+
return !checkoutRecovery && event !== null && canJoinEventWaitlist(event, { attendanceMode });
|
|
15030
|
+
}
|
|
15031
|
+
//#endregion
|
|
15032
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.ts
|
|
15033
|
+
/** Recovery belongs to the selected booking subject; changing events resets its scope. */
|
|
15034
|
+
function useCheckoutRecovery(event, setStep) {
|
|
15035
|
+
const [recoveryEventId, setRecoveryEventId] = useState(null);
|
|
15036
|
+
return {
|
|
15037
|
+
checkoutRecovery: event !== null && recoveryEventId === event.selectionId,
|
|
15038
|
+
startCheckoutRecovery: useCallback(() => {
|
|
15039
|
+
if (!event) return;
|
|
15040
|
+
setRecoveryEventId(event.selectionId);
|
|
15041
|
+
setStep("select-tickets");
|
|
15042
|
+
}, [event, setStep])
|
|
15043
|
+
};
|
|
15044
|
+
}
|
|
15045
|
+
/** Authenticated pending bookings enter the same form-only recovery path as guests. */
|
|
15046
|
+
function useCheckoutRecoveryEligibility(eligibility, step, checkoutRecovery, startCheckoutRecovery) {
|
|
15047
|
+
const registrationKind = eligibility?.registration.kind;
|
|
15048
|
+
useEffect(() => {
|
|
15049
|
+
if ((step === "select-event" || step === "select-tickets" || step === "enter-details" || step === "select-payment") && registrationKind === "pending_payment" && !checkoutRecovery) startCheckoutRecovery();
|
|
15050
|
+
}, [
|
|
15051
|
+
registrationKind,
|
|
15052
|
+
step,
|
|
15053
|
+
checkoutRecovery,
|
|
15054
|
+
startCheckoutRecovery
|
|
15055
|
+
]);
|
|
15056
|
+
return useMemo(() => checkoutRecovery ? getCheckoutRecoveryFormEligibility(eligibility) : eligibility, [checkoutRecovery, eligibility]);
|
|
15057
|
+
}
|
|
15058
|
+
//#endregion
|
|
15059
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.ts
|
|
15060
|
+
function resolveRegistrationRecoveryAction(step, action) {
|
|
15061
|
+
if (step === "payment-failed") return "payment-options";
|
|
15062
|
+
if (step === "verifying-payment" || step === "verifying-timeout" || step === "redirecting") return "payment-status";
|
|
15063
|
+
return action;
|
|
15064
|
+
}
|
|
15065
|
+
function canRecoverToWaitlist(eligibility) {
|
|
15066
|
+
return Boolean(eligibility?.isFull && eligibility.canJoinWaitlist);
|
|
15067
|
+
}
|
|
15068
|
+
function shouldRefreshAfterRegistrationError(step, action, enabled) {
|
|
15069
|
+
return enabled || step === "error" && action === "places";
|
|
15070
|
+
}
|
|
15071
|
+
function resetRegistrationAfterExpiry(input) {
|
|
15072
|
+
input.dispatchFlow({
|
|
15073
|
+
type: "reset",
|
|
15074
|
+
hasPreSelectedContext: input.hasPreSelectedContext
|
|
15075
|
+
});
|
|
15076
|
+
input.setSelectedTicketLines([]);
|
|
15077
|
+
input.setSelectedSlidingAmountInput("");
|
|
15078
|
+
const mode = input.preSelectedEvent?.deliveryMode;
|
|
15079
|
+
input.setSelectedAttendanceMode(mode === "online" || mode === "in_person" ? mode : null);
|
|
15080
|
+
input.setErrorMessage("");
|
|
15081
|
+
input.setPendingRegistrationReference(null);
|
|
15082
|
+
}
|
|
15083
|
+
/** Recovery never starts another payment. Unknown payment outcomes go to the portal. */
|
|
15084
|
+
function recoverRegistrationError(action, handlers) {
|
|
15085
|
+
switch (action) {
|
|
15086
|
+
case "none": return;
|
|
15087
|
+
case "portal":
|
|
15088
|
+
case "payment-status":
|
|
15089
|
+
window.location.assign("/portal");
|
|
15090
|
+
return;
|
|
15091
|
+
case "event":
|
|
15092
|
+
window.location.assign(window.location.pathname);
|
|
15093
|
+
return;
|
|
15094
|
+
case "retry":
|
|
15095
|
+
window.location.reload();
|
|
15096
|
+
return;
|
|
15097
|
+
case "details":
|
|
15098
|
+
handlers.clearError();
|
|
15099
|
+
handlers.setStep("enter-details");
|
|
15100
|
+
return;
|
|
15101
|
+
case "payment-options":
|
|
15102
|
+
case "places":
|
|
15103
|
+
handlers.refreshOptions();
|
|
15104
|
+
handlers.clearError();
|
|
15105
|
+
handlers.setStep(action === "places" ? handlers.canJoinWaitlist ? "enter-details" : "select-tickets" : "select-payment");
|
|
15106
|
+
return;
|
|
15107
|
+
case "start":
|
|
15108
|
+
handlers.refreshOptions();
|
|
15109
|
+
handlers.reset();
|
|
15110
|
+
return;
|
|
15111
|
+
}
|
|
15112
|
+
}
|
|
15113
|
+
//#endregion
|
|
14994
15114
|
//#region ../blocks/src/system/runtime/nodes/event-registration/validation.ts
|
|
14995
15115
|
function createInitialRegistrationFormData() {
|
|
14996
15116
|
return {
|
|
@@ -15514,6 +15634,10 @@ const eventRegistrationErrors = {
|
|
|
15514
15634
|
message: "We’re checking your booking and payment. Please don’t try to book again yet. If you’ve already paid, you don’t need to pay again.",
|
|
15515
15635
|
action: "payment-status"
|
|
15516
15636
|
},
|
|
15637
|
+
paymentProviderUnavailable: {
|
|
15638
|
+
message: "We couldn’t reach the payment provider. Please try again in a minute.",
|
|
15639
|
+
action: "retry"
|
|
15640
|
+
},
|
|
15517
15641
|
paymentPageUnavailable: {
|
|
15518
15642
|
message: "We couldn’t open the payment page. Please refresh this page and try again. If this keeps happening, contact the organiser for help.",
|
|
15519
15643
|
action: "retry"
|
|
@@ -15636,11 +15760,6 @@ function ensureWaitlistClaimLocationTracking() {
|
|
|
15636
15760
|
} catch {}
|
|
15637
15761
|
window.addEventListener("popstate", emitWaitlistClaimLocationChange);
|
|
15638
15762
|
}
|
|
15639
|
-
function getWaitlistClaimTokenFromUrl() {
|
|
15640
|
-
if (typeof window === "undefined") return null;
|
|
15641
|
-
const token = new URLSearchParams(window.location.search).get("waitlist_claim")?.trim() ?? "";
|
|
15642
|
-
return token.length > 0 ? token : null;
|
|
15643
|
-
}
|
|
15644
15763
|
const useWaitlistClaimDeps = { useBlockApi };
|
|
15645
15764
|
function subscribeToWaitlistClaimToken(callback) {
|
|
15646
15765
|
if (typeof window === "undefined") return () => {};
|
|
@@ -15650,28 +15769,42 @@ function subscribeToWaitlistClaimToken(callback) {
|
|
|
15650
15769
|
window.removeEventListener(WAITLIST_CLAIM_LOCATION_EVENT, callback);
|
|
15651
15770
|
};
|
|
15652
15771
|
}
|
|
15653
|
-
function
|
|
15654
|
-
return
|
|
15772
|
+
function getWaitlistClaimLocationSnapshot() {
|
|
15773
|
+
return typeof window === "undefined" ? "" : window.location.search;
|
|
15774
|
+
}
|
|
15775
|
+
function parseWaitlistClaimCredential(search) {
|
|
15776
|
+
const params = new URLSearchParams(search);
|
|
15777
|
+
const token = params.get("waitlist_claim")?.trim();
|
|
15778
|
+
if (token) return {
|
|
15779
|
+
kind: "emailedToken",
|
|
15780
|
+
token
|
|
15781
|
+
};
|
|
15782
|
+
const entryId = params.get("waitlistEntry")?.trim();
|
|
15783
|
+
return entryId ? {
|
|
15784
|
+
kind: "portalOwnedEntry",
|
|
15785
|
+
entryId
|
|
15786
|
+
} : null;
|
|
15655
15787
|
}
|
|
15656
15788
|
function useWaitlistClaim() {
|
|
15657
15789
|
return useWaitlistClaimWithDeps(useWaitlistClaimDeps);
|
|
15658
15790
|
}
|
|
15659
15791
|
function useWaitlistClaimWithDeps(deps) {
|
|
15660
|
-
|
|
15792
|
+
const locationSearch = useSyncExternalStore(subscribeToWaitlistClaimToken, getWaitlistClaimLocationSnapshot, () => "");
|
|
15793
|
+
return useResolvedWaitlistClaim(deps, useMemo(() => parseWaitlistClaimCredential(locationSearch), [locationSearch]));
|
|
15661
15794
|
}
|
|
15662
|
-
function useResolvedWaitlistClaim(deps,
|
|
15795
|
+
function useResolvedWaitlistClaim(deps, credential) {
|
|
15663
15796
|
const api = deps.useBlockApi();
|
|
15664
|
-
const [state, dispatch] = useReducer(waitlistClaimReducer, Boolean(
|
|
15797
|
+
const [state, dispatch] = useReducer(waitlistClaimReducer, Boolean(credential), createInitialWaitlistClaimState);
|
|
15665
15798
|
useEffect(() => {
|
|
15666
15799
|
let cancelled = false;
|
|
15667
15800
|
async function resolveClaim() {
|
|
15668
|
-
if (!
|
|
15801
|
+
if (!credential) {
|
|
15669
15802
|
dispatch({ type: "cleared" });
|
|
15670
15803
|
return;
|
|
15671
15804
|
}
|
|
15672
15805
|
dispatch({ type: "started" });
|
|
15673
15806
|
try {
|
|
15674
|
-
const result = await api.resolveWaitlistClaim({ claimToken: token });
|
|
15807
|
+
const result = credential.kind === "portalOwnedEntry" ? await api.resolveWaitlistClaim({ waitlistEntryId: credential.entryId }) : await api.resolveWaitlistClaim({ claimToken: credential.token });
|
|
15675
15808
|
if (cancelled) return;
|
|
15676
15809
|
dispatch({
|
|
15677
15810
|
type: "resolved",
|
|
@@ -15689,9 +15822,10 @@ function useResolvedWaitlistClaim(deps, token) {
|
|
|
15689
15822
|
return () => {
|
|
15690
15823
|
cancelled = true;
|
|
15691
15824
|
};
|
|
15692
|
-
}, [api,
|
|
15825
|
+
}, [api, credential]);
|
|
15693
15826
|
return {
|
|
15694
|
-
token,
|
|
15827
|
+
token: credential?.kind === "emailedToken" ? credential.token : null,
|
|
15828
|
+
entryId: credential?.kind === "portalOwnedEntry" ? credential.entryId : null,
|
|
15695
15829
|
claim: getWaitlistClaim(state),
|
|
15696
15830
|
error: getWaitlistClaimError(state),
|
|
15697
15831
|
loginMessage: getWaitlistClaimLoginMessage(state),
|
|
@@ -16173,15 +16307,12 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
16173
16307
|
* landed — a success, or a hand-off to checkout — because until then nobody
|
|
16174
16308
|
* knows whether the first one committed.
|
|
16175
16309
|
*
|
|
16176
|
-
*
|
|
16177
|
-
* details
|
|
16178
|
-
* anything, so a submission that already booked is answered with the booking
|
|
16179
|
-
* that exists — not refused for spending a credit or a claim that this very
|
|
16180
|
-
* command already spent, and not treated as a second booking because a name
|
|
16181
|
-
* or a note changed in between.
|
|
16310
|
+
* Identical retries retain the command after a lost response. Changed form
|
|
16311
|
+
* details get a new command so the server applies the new booking intent.
|
|
16182
16312
|
*/
|
|
16183
|
-
const
|
|
16184
|
-
|
|
16313
|
+
const commandRef = useRef(null);
|
|
16314
|
+
const inFlightRef = useRef(null);
|
|
16315
|
+
const submit = async (method, passId, membershipId, selection, submitOptions) => {
|
|
16185
16316
|
const target = options.registrationTarget;
|
|
16186
16317
|
if (!target) return {
|
|
16187
16318
|
ok: false,
|
|
@@ -16189,44 +16320,34 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
16189
16320
|
message: "Select an event to continue."
|
|
16190
16321
|
};
|
|
16191
16322
|
options.setStep("submitting");
|
|
16192
|
-
const registrationCommandId =
|
|
16193
|
-
commandIdRef.current = registrationCommandId;
|
|
16323
|
+
const registrationCommandId = commandRef.current?.id ?? deps.createClientCommandId();
|
|
16194
16324
|
try {
|
|
16195
|
-
|
|
16325
|
+
let prepared = prepareSubmitContext(options, registrationCommandId, target, method, passId, membershipId, selection);
|
|
16196
16326
|
if (prepared.subject.kind === "wholeSeries" && method === "stripe") {
|
|
16197
|
-
|
|
16327
|
+
commandRef.current = null;
|
|
16198
16328
|
return await submitWholeSeriesCheckout(options, deps, {
|
|
16199
16329
|
...prepared,
|
|
16200
16330
|
subject: prepared.subject
|
|
16201
16331
|
}, submitOptions);
|
|
16202
16332
|
}
|
|
16333
|
+
const request = buildOccurrenceRegistrationRequest(options, prepared, method, passId, membershipId);
|
|
16334
|
+
const intentKey = registrationRequestIntentKey(request);
|
|
16335
|
+
if (commandRef.current !== null && commandRef.current.intentKey !== intentKey) prepared = {
|
|
16336
|
+
...prepared,
|
|
16337
|
+
registrationCommandId: deps.createClientCommandId()
|
|
16338
|
+
};
|
|
16339
|
+
commandRef.current = {
|
|
16340
|
+
id: prepared.registrationCommandId,
|
|
16341
|
+
intentKey
|
|
16342
|
+
};
|
|
16203
16343
|
const result = await options.api.registerForEvent({
|
|
16204
|
-
|
|
16205
|
-
|
|
16206
|
-
ticketSelections: toTicketSelectionRequests(prepared.ticketSelections),
|
|
16207
|
-
selectedSlidingAmount: options.selectedSlidingAmount ?? void 0,
|
|
16208
|
-
email: options.formData.email.trim().toLowerCase(),
|
|
16209
|
-
name: options.formData.name.trim(),
|
|
16210
|
-
phone: options.formData.phone.trim() || void 0,
|
|
16211
|
-
notes: options.formData.notes.trim() || void 0,
|
|
16212
|
-
consentAccepted: options.formData.consentAccepted,
|
|
16213
|
-
altchaSolution: options.altchaSolution,
|
|
16214
|
-
paymentMethod: method,
|
|
16215
|
-
customerPassId: method === "pass" ? passId : void 0,
|
|
16216
|
-
customerMembershipId: method === "membership" ? membershipId : void 0,
|
|
16217
|
-
bundleProductId: prepared.bundleProductId,
|
|
16218
|
-
claimToken: options.claimToken ?? void 0,
|
|
16219
|
-
guests: prepared.guestsPayload
|
|
16344
|
+
...request,
|
|
16345
|
+
registrationCommandId: prepared.registrationCommandId
|
|
16220
16346
|
});
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
options.setRegistrationResult(toRegistrationResult(result));
|
|
16224
|
-
options.setStep("success");
|
|
16225
|
-
return {
|
|
16226
|
-
ok: true,
|
|
16227
|
-
outcome: { kind: "completed" }
|
|
16228
|
-
};
|
|
16347
|
+
commandRef.current = null;
|
|
16348
|
+
return await completeRegistrationSubmission(options, deps, prepared, result, method, submitOptions);
|
|
16229
16349
|
} catch (error) {
|
|
16350
|
+
if (error instanceof BlockApiError && error.tag === "registrationPreparationChanged") commandRef.current = null;
|
|
16230
16351
|
const { message, action } = registrationErrorPresentation(error);
|
|
16231
16352
|
options.setErrorAction?.(action);
|
|
16232
16353
|
options.setErrorMessage(message);
|
|
@@ -16238,6 +16359,24 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
16238
16359
|
};
|
|
16239
16360
|
}
|
|
16240
16361
|
};
|
|
16362
|
+
return (...args) => {
|
|
16363
|
+
if (inFlightRef.current) return inFlightRef.current;
|
|
16364
|
+
const pending = Promise.resolve().then(() => submit(...args));
|
|
16365
|
+
inFlightRef.current = pending;
|
|
16366
|
+
pending.finally(() => {
|
|
16367
|
+
if (inFlightRef.current === pending) inFlightRef.current = null;
|
|
16368
|
+
});
|
|
16369
|
+
return pending;
|
|
16370
|
+
};
|
|
16371
|
+
}
|
|
16372
|
+
async function completeRegistrationSubmission(options, deps, prepared, result, method, submitOptions) {
|
|
16373
|
+
if (needsOccurrenceCheckout(result, method)) return await submitOccurrenceCheckout(options, deps, prepared, result, method, submitOptions);
|
|
16374
|
+
options.setRegistrationResult(toRegistrationResult(result));
|
|
16375
|
+
options.setStep("success");
|
|
16376
|
+
return {
|
|
16377
|
+
ok: true,
|
|
16378
|
+
outcome: { kind: "completed" }
|
|
16379
|
+
};
|
|
16241
16380
|
}
|
|
16242
16381
|
function toTicketSelectionRequests(lines) {
|
|
16243
16382
|
return lines.map((line) => ({
|
|
@@ -16312,6 +16451,7 @@ async function submitWholeSeriesCheckout(options, deps, prepared, submitOptions)
|
|
|
16312
16451
|
altchaSolution: options.altchaSolution,
|
|
16313
16452
|
guests: prepared.guestsPayload,
|
|
16314
16453
|
claimToken: options.claimToken ?? void 0,
|
|
16454
|
+
waitlistEntryId: options.waitlistEntryId ?? void 0,
|
|
16315
16455
|
discountCode: options.discountCode.trim() || void 0,
|
|
16316
16456
|
collectionOptionKind: prepared.selectionSnapshot.collectionOptionKind,
|
|
16317
16457
|
checkoutAttemptId,
|
|
@@ -16333,14 +16473,14 @@ async function submitWholeSeriesCheckout(options, deps, prepared, submitOptions)
|
|
|
16333
16473
|
}
|
|
16334
16474
|
if (result.bypassed) return completeBypassedCheckout(options);
|
|
16335
16475
|
if (!result.checkoutUrl) throw new Error("Checkout URL missing");
|
|
16336
|
-
savePendingCheckout(options, deps, prepared, checkoutAttemptId, {
|
|
16476
|
+
savePendingCheckout(options, deps, prepared, result.checkoutAttemptId, {
|
|
16337
16477
|
scope: "wholeSeries",
|
|
16338
16478
|
registrationId: result.registrationId
|
|
16339
16479
|
});
|
|
16340
16480
|
return redirectToCheckout(result.checkoutUrl, submitOptions);
|
|
16341
16481
|
}
|
|
16342
16482
|
function needsOccurrenceCheckout(result, method) {
|
|
16343
|
-
return result.scope === "occurrence" &&
|
|
16483
|
+
return result.scope === "occurrence" && result.status === "confirmed" && result.pendingPayment && [
|
|
16344
16484
|
"stripe",
|
|
16345
16485
|
"pass_bundle",
|
|
16346
16486
|
"membership_bundle"
|
|
@@ -16360,6 +16500,7 @@ async function submitOccurrenceCheckout(options, deps, prepared, registration, m
|
|
|
16360
16500
|
kind: "occurrence",
|
|
16361
16501
|
attendeeId: registration.attendeeId
|
|
16362
16502
|
},
|
|
16503
|
+
registrationCommandId: prepared.registrationCommandId,
|
|
16363
16504
|
checkoutType: method === "pass_bundle" ? "pass_bundle" : method === "membership_bundle" ? "membership_bundle" : "event",
|
|
16364
16505
|
productId: prepared.bundleProductId,
|
|
16365
16506
|
discountCode: options.discountCode.trim() || void 0,
|
|
@@ -16402,6 +16543,31 @@ function redirectToCheckout(checkoutUrl, submitOptions) {
|
|
|
16402
16543
|
}
|
|
16403
16544
|
};
|
|
16404
16545
|
}
|
|
16546
|
+
function registrationRequestIntentKey(request) {
|
|
16547
|
+
const { registrationCommandId: _command, altchaSolution: _proof, ...intent } = request;
|
|
16548
|
+
return JSON.stringify(intent);
|
|
16549
|
+
}
|
|
16550
|
+
function buildOccurrenceRegistrationRequest(options, prepared, method, passId, membershipId) {
|
|
16551
|
+
return {
|
|
16552
|
+
registrationCommandId: prepared.registrationCommandId,
|
|
16553
|
+
subject: prepared.subject,
|
|
16554
|
+
ticketSelections: toTicketSelectionRequests(prepared.ticketSelections),
|
|
16555
|
+
selectedSlidingAmount: options.selectedSlidingAmount ?? void 0,
|
|
16556
|
+
email: options.formData.email.trim().toLowerCase(),
|
|
16557
|
+
name: options.formData.name.trim(),
|
|
16558
|
+
phone: options.formData.phone.trim() || void 0,
|
|
16559
|
+
notes: options.formData.notes.trim() || void 0,
|
|
16560
|
+
consentAccepted: options.formData.consentAccepted,
|
|
16561
|
+
altchaSolution: options.altchaSolution,
|
|
16562
|
+
paymentMethod: method,
|
|
16563
|
+
customerPassId: method === "pass" ? passId : void 0,
|
|
16564
|
+
customerMembershipId: method === "membership" ? membershipId : void 0,
|
|
16565
|
+
bundleProductId: prepared.bundleProductId,
|
|
16566
|
+
claimToken: options.claimToken ?? void 0,
|
|
16567
|
+
waitlistEntryId: options.waitlistEntryId ?? void 0,
|
|
16568
|
+
guests: prepared.guestsPayload
|
|
16569
|
+
};
|
|
16570
|
+
}
|
|
16405
16571
|
//#endregion
|
|
16406
16572
|
//#region ../blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.ts
|
|
16407
16573
|
function getApprovedDirectPaymentCollectionOptionKinds(paymentOptions) {
|
|
@@ -17424,14 +17590,28 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
17424
17590
|
}), [options.occurrenceContext, selectedEvent]);
|
|
17425
17591
|
const registrationOccurrenceId = getRegistrationOccurrenceId(registrationTarget);
|
|
17426
17592
|
const currentEvent = selectedEvent ?? preSelectedEvent;
|
|
17593
|
+
const setStep = useCallback((nextStep) => {
|
|
17594
|
+
dispatchFlow({
|
|
17595
|
+
type: "set-step",
|
|
17596
|
+
step: nextStep
|
|
17597
|
+
});
|
|
17598
|
+
}, []);
|
|
17599
|
+
const { checkoutRecovery, startCheckoutRecovery } = useCheckoutRecovery(currentEvent, setStep);
|
|
17427
17600
|
const currentEventUsesTicketTypes = usesTieredPricing(currentEvent);
|
|
17428
|
-
const currentCanJoinWaitlist =
|
|
17601
|
+
const currentCanJoinWaitlist = canJoinWaitlistOutsideRecovery(currentEvent, selectedAttendanceMode, checkoutRecovery);
|
|
17429
17602
|
const usesTicketTypeSelections = currentEventUsesTicketTypes && !currentCanJoinWaitlist;
|
|
17430
17603
|
const eventTicketTypesForSelection = useMemo(() => getVisibleTicketTypes({
|
|
17431
17604
|
event: currentEvent,
|
|
17432
17605
|
eligibility: null,
|
|
17433
17606
|
selectedAttendanceMode
|
|
17434
|
-
})
|
|
17607
|
+
}).map((option) => checkoutRecovery ? {
|
|
17608
|
+
...option,
|
|
17609
|
+
availability: checkoutRecoveryOptionAvailability(option.availability)
|
|
17610
|
+
} : option), [
|
|
17611
|
+
currentEvent,
|
|
17612
|
+
selectedAttendanceMode,
|
|
17613
|
+
checkoutRecovery
|
|
17614
|
+
]);
|
|
17435
17615
|
const normalizedSelectedTicketLines = useMemo(() => normalizeTicketSelectionLines(selectedTicketLines), [selectedTicketLines]);
|
|
17436
17616
|
const ticketTypeSelectionTotal = useMemo(() => getTicketSelectionTotal(normalizedSelectedTicketLines), [normalizedSelectedTicketLines]);
|
|
17437
17617
|
const ticketsCount = usesTicketTypeSelections ? ticketTypeSelectionTotal : flowState.ticketsCount;
|
|
@@ -17469,17 +17649,11 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
17469
17649
|
isAuthenticated: portalAuthState === "authenticated",
|
|
17470
17650
|
occurrenceId: registrationOccurrenceId
|
|
17471
17651
|
});
|
|
17472
|
-
const eligibility = eligibilityResult.eligibility;
|
|
17652
|
+
const eligibility = useCheckoutRecoveryEligibility(eligibilityResult.eligibility, step, checkoutRecovery, startCheckoutRecovery);
|
|
17473
17653
|
const eligibilityLoading = eligibilityResult.isLoading;
|
|
17474
17654
|
const eligibilityError = eligibilityResult.error;
|
|
17475
17655
|
const portalCreditState = eligibilityResult.creditState;
|
|
17476
17656
|
const registrationState = eligibility?.registration ?? { kind: "none" };
|
|
17477
|
-
const setStep = useCallback((nextStep) => {
|
|
17478
|
-
dispatchFlow({
|
|
17479
|
-
type: "set-step",
|
|
17480
|
-
step: nextStep
|
|
17481
|
-
});
|
|
17482
|
-
}, []);
|
|
17483
17657
|
const setTicketsCount = useCallback((nextTicketsCount) => {
|
|
17484
17658
|
dispatchFlow({
|
|
17485
17659
|
type: "set-tickets-count",
|
|
@@ -17587,10 +17761,14 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
17587
17761
|
event: currentEvent,
|
|
17588
17762
|
eligibility,
|
|
17589
17763
|
selectedAttendanceMode
|
|
17590
|
-
})
|
|
17764
|
+
}).map((option) => checkoutRecovery ? {
|
|
17765
|
+
...option,
|
|
17766
|
+
availability: checkoutRecoveryOptionAvailability(option.availability)
|
|
17767
|
+
} : option), [
|
|
17591
17768
|
currentEvent,
|
|
17592
17769
|
selectedAttendanceMode,
|
|
17593
|
-
eligibility
|
|
17770
|
+
eligibility,
|
|
17771
|
+
checkoutRecovery
|
|
17594
17772
|
]);
|
|
17595
17773
|
const singleSelectedPricingOptionId = getSingleSelectedPricingOptionId(normalizedSelectedTicketLines);
|
|
17596
17774
|
const selectedTicketType = useMemo(() => findSelectedTicketType({
|
|
@@ -17614,8 +17792,12 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
17614
17792
|
const event = currentEvent;
|
|
17615
17793
|
if (!usesTieredPricing(event)) return false;
|
|
17616
17794
|
if ((event.deliveryMode ?? "in_person") === "hybrid" && !selectedAttendanceMode) return false;
|
|
17617
|
-
return !canJoinEventWaitlist(event, { attendanceMode: selectedAttendanceMode });
|
|
17618
|
-
}, [
|
|
17795
|
+
return checkoutRecovery || !canJoinEventWaitlist(event, { attendanceMode: selectedAttendanceMode });
|
|
17796
|
+
}, [
|
|
17797
|
+
currentEvent,
|
|
17798
|
+
selectedAttendanceMode,
|
|
17799
|
+
checkoutRecovery
|
|
17800
|
+
]);
|
|
17619
17801
|
const hasValidTicketSelection = hasValidPricingOptionSelection({
|
|
17620
17802
|
selectionRequired: ticketTypeSelectionRequired,
|
|
17621
17803
|
lines: normalizedSelectedTicketLines,
|
|
@@ -17819,6 +18001,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
17819
18001
|
guests,
|
|
17820
18002
|
discountCode: discountUi.discountCode,
|
|
17821
18003
|
claimToken: waitlistClaim.token,
|
|
18004
|
+
waitlistEntryId: waitlistClaim.entryId,
|
|
17822
18005
|
setPendingRegistrationReference,
|
|
17823
18006
|
setStep,
|
|
17824
18007
|
setRegistrationResult: (result) => setRegistrationResult(result),
|
|
@@ -17881,6 +18064,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
17881
18064
|
scopedEvents,
|
|
17882
18065
|
preSelectedEvent,
|
|
17883
18066
|
hasPreSelectedContext,
|
|
18067
|
+
checkoutRecovery,
|
|
18068
|
+
startCheckoutRecovery,
|
|
17884
18069
|
step,
|
|
17885
18070
|
setStep,
|
|
17886
18071
|
selectedEvent,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CB2KS_ko.mjs";
|
|
2
2
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
3
|
-
import { n as normalizeCarouselProps, t as CarouselNodeClient } from "./carousel.client-
|
|
3
|
+
import { n as normalizeCarouselProps, t as CarouselNodeClient } from "./carousel.client-DQTjCVQT.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/rendering/islands/enhancers/carousel.tsx
|