@riverbankcms/sdk 0.84.0 → 0.84.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PreviewEditorSidebar-HML67UDA.mjs → PreviewEditorSidebar-4PH35ZIE.mjs} +3 -3
- package/dist/{PreviewEditorUI-I4BQUU6K.mjs → PreviewEditorUI-WHMCRJGM.mjs} +11 -6
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +8 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +2 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +2 -1
- package/dist/_dts/api/src/sdk-event-payment-terms.d.ts +16 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +11 -2
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -0
- package/dist/_dts/api/src/types.d.ts +1 -0
- package/dist/_dts/api/src/url.d.ts +12 -4
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.d.ts +0 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/constants.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +275 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +22 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.state.d.ts +3 -303
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +8 -6
- package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +8 -0
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +6 -4
- package/dist/_dts/preview-next/src/client/preview/MaintenanceModeBadge.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorUI.d.ts +2 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-LBBPD2IW.mjs → chunk-4QNLOTES.mjs} +11 -16
- package/dist/{chunk-5E33VO6J.mjs → chunk-NFWGLRZZ.mjs} +1 -70
- package/dist/{chunk-HFMGVJCE.mjs → chunk-OCGTXHSO.mjs} +8 -7
- package/dist/{chunk-3LXFQS7T.mjs → chunk-PYDHOMEO.mjs} +1 -1
- package/dist/{chunk-6X2OVO3S.mjs → chunk-WFPYN7KA.mjs} +2 -2
- package/dist/{chunk-MSHZO4SL.mjs → chunk-ZR2GQK2A.mjs} +274 -223
- package/dist/cli/index.mjs +332 -45
- package/dist/cli/init-docs/content/agents-section.md +5 -0
- package/dist/cli/init-docs/content/cli-reference.md +13 -0
- package/dist/cli/init-docs/content/content-management.md +31 -0
- package/dist/cli/init-docs/content/getting-started.md +12 -0
- package/dist/cli/init-docs/content/workflow-add-block.md +3 -1
- package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +81 -0
- package/dist/cli/init-docs/content/workflow-create-page.md +13 -3
- package/dist/cli/init-docs/content/workflow-custom-block.md +9 -0
- package/dist/cli/init-docs/content/workflow-templates.md +14 -0
- package/dist/client/{accordion-ESY65T56.mjs → accordion-2UZPBMYM.mjs} +1 -1
- package/dist/client/{bookingForm-JRFNZUHD.mjs → bookingForm-36CWQUMV.mjs} +4 -4
- package/dist/client/bookings.mjs +156 -138
- package/dist/client/{carousel-CPR5VWIP.mjs → carousel-QH77HR6X.mjs} +2 -2
- package/dist/client/{cart-ZUX5BA7O.mjs → cart-X4YK4FTW.mjs} +5 -5
- package/dist/client/{checkout-RULGBADZ.mjs → checkout-OM2BEPWD.mjs} +5 -5
- package/dist/client/{chunk-RDJFCPY3.mjs → chunk-3C2VTPWI.mjs} +34 -117
- package/dist/client/{chunk-BT6AEIKN.mjs → chunk-3DTWLTXM.mjs} +1 -1
- package/dist/client/{chunk-JWEYB4V6.mjs → chunk-4OXKTA3D.mjs} +1 -1
- package/dist/client/{chunk-URQCZD5W.mjs → chunk-52CGCQ7B.mjs} +4 -4
- package/dist/client/{chunk-52I7BGEK.mjs → chunk-7UCLJ5SP.mjs} +1 -1
- package/dist/client/{chunk-Z5OBQ5I4.mjs → chunk-F5VRX5Y6.mjs} +1 -1
- package/dist/client/{chunk-GFSQNTRW.mjs → chunk-SDIYSQAY.mjs} +0 -4
- package/dist/client/{chunk-HXPWP5EN.mjs → chunk-VGDBVNOO.mjs} +175 -14
- package/dist/client/{chunk-5ZEAZ33K.mjs → chunk-ZKUO52W3.mjs} +1 -1
- package/dist/client/client.mjs +348 -232
- package/dist/client/{courseRegistration-QTUDC35T.mjs → courseRegistration-TMKU6ABO.mjs} +4 -4
- package/dist/client/{eventCalendar-Q7NS4XLD.mjs → eventCalendar-G6TI32X6.mjs} +6 -6
- package/dist/client/{eventCombined-QAO7VUO5.mjs → eventCombined-SCKEMNAR.mjs} +6 -6
- package/dist/client/{eventDetails-WTNNU6Q3.mjs → eventDetails-XPIFXXPK.mjs} +6 -6
- package/dist/client/{eventListing-5TA2ELDT.mjs → eventListing-7QFMEMGT.mjs} +6 -6
- package/dist/client/{eventRegistration-M6USZGRF.mjs → eventRegistration-TOODSZUI.mjs} +6 -6
- package/dist/client/{form-DGVGXLMH.mjs → form-MTCMVCZT.mjs} +2 -2
- package/dist/client/{headerSection-O2AGMPCU.mjs → headerSection-Y5TMR3TW.mjs} +2 -2
- package/dist/client/hooks.mjs +315 -35
- package/dist/client/{locationMap-EJRNRIKJ.mjs → locationMap-RH2LG7FZ.mjs} +1 -1
- package/dist/client/{newsletterForm-7NTC2DTR.mjs → newsletterForm-PCAIPFMA.mjs} +2 -2
- package/dist/client/{productDetail-HH4LP53D.mjs → productDetail-OIGDR4YE.mjs} +5 -5
- package/dist/client/{productList-YVHYM2AF.mjs → productList-4MA5S2CX.mjs} +5 -5
- package/dist/client/rendering/client.mjs +312 -195
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +312 -195
- package/dist/client/{shop-UIFX7XRK.mjs → shop-WXSYV5QO.mjs} +5 -5
- package/dist/client/spam-protection.mjs +0 -4
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-ZENAOYMN.mjs → sdk-runtime-QLOCYKVU.mjs} +6 -6
- package/dist/server/components.mjs +188 -61
- package/dist/server/config-validation.mjs +313 -33
- package/dist/server/config.mjs +313 -33
- package/dist/server/data.mjs +315 -35
- package/dist/server/index.mjs +10 -11
- package/dist/server/next.mjs +198 -72
- package/dist/server/page-converter.mjs +315 -35
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +188 -61
- package/dist/server/rendering.mjs +188 -61
- package/dist/server/routing.mjs +334 -34
- package/dist/server/server.mjs +331 -52
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-MCKMVDTK.mjs +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ApiRequestError } from './chunk-
|
|
2
|
+
import { ApiRequestError } from './chunk-4QNLOTES.mjs';
|
|
3
3
|
import { __commonJS, __export, __toESM } from './chunk-R7POPVJR.mjs';
|
|
4
4
|
import * as React61 from 'react';
|
|
5
5
|
import React61__default, { createContext, forwardRef, useContext, createElement, useRef, useMemo, useEffect, useState, useCallback, useImperativeHandle, useLayoutEffect, memo, createRef, Component as Component$1, useDebugValue, useId as useId$1, useSyncExternalStore, isValidElement, cloneElement, useReducer, startTransition } from 'react';
|
|
@@ -29488,20 +29488,6 @@ function useDebouncedLatestSave(config) {
|
|
|
29488
29488
|
}
|
|
29489
29489
|
|
|
29490
29490
|
// ../content-editor/src/hooks/useSimpleAutosave.ts
|
|
29491
|
-
var DEBUG_RICHTEXT_FOCUS = process.env.NEXT_PUBLIC_DEBUG_RICHTEXT_FOCUS === "1";
|
|
29492
|
-
function describeActiveElement() {
|
|
29493
|
-
if (typeof document === "undefined") return null;
|
|
29494
|
-
const el2 = document.activeElement;
|
|
29495
|
-
if (!el2) return null;
|
|
29496
|
-
return {
|
|
29497
|
-
tag: el2.tagName,
|
|
29498
|
-
id: el2.id || null,
|
|
29499
|
-
role: el2.getAttribute("role"),
|
|
29500
|
-
className: typeof el2.className === "string" ? el2.className : null,
|
|
29501
|
-
isProseMirror: el2.classList?.contains("ProseMirror") ?? false,
|
|
29502
|
-
withinProseMirror: Boolean(el2.closest?.(".ProseMirror"))
|
|
29503
|
-
};
|
|
29504
|
-
}
|
|
29505
29491
|
function useSimpleAutosave(config) {
|
|
29506
29492
|
const {
|
|
29507
29493
|
saveFn,
|
|
@@ -29529,15 +29515,7 @@ function useSimpleAutosave(config) {
|
|
|
29529
29515
|
maxWait,
|
|
29530
29516
|
enabled,
|
|
29531
29517
|
onSaving: () => {
|
|
29532
|
-
if (DEBUG_RICHTEXT_FOCUS && type === "content") {
|
|
29533
|
-
console.log("[useSimpleAutosave] saving:start (pre)", { type, active: describeActiveElement() });
|
|
29534
|
-
}
|
|
29535
29518
|
updateStatus({ status: "saving" });
|
|
29536
|
-
if (DEBUG_RICHTEXT_FOCUS && type === "content") {
|
|
29537
|
-
setTimeout(() => {
|
|
29538
|
-
console.log("[useSimpleAutosave] saving:start (post)", { type, active: describeActiveElement() });
|
|
29539
|
-
}, 0);
|
|
29540
|
-
}
|
|
29541
29519
|
},
|
|
29542
29520
|
onSaved: (result, sentValuesRef) => {
|
|
29543
29521
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -60078,6 +60056,27 @@ var occurrenceContextSchema = z.object({
|
|
|
60078
60056
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
60079
60057
|
}).nullable();
|
|
60080
60058
|
|
|
60059
|
+
// ../blocks/src/system/constants/events.ts
|
|
60060
|
+
var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
60061
|
+
var eventCalendarDisplayModeValues = ["combined", "month", "week", "list", "timetable"];
|
|
60062
|
+
var eventCalendarListLayoutValues = ["stack", "grid", "compact"];
|
|
60063
|
+
var eventCalendarListLayoutOptions = [
|
|
60064
|
+
{ id: "stack", label: "Stack" },
|
|
60065
|
+
{ id: "grid", label: "Grid" },
|
|
60066
|
+
{ id: "compact", label: "Compact" }
|
|
60067
|
+
];
|
|
60068
|
+
var eventCalendarListLayoutCompatibleDisplayModeValues = ["combined", "list"];
|
|
60069
|
+
function isEventCalendarDisplayMode(value) {
|
|
60070
|
+
return typeof value === "string" && eventCalendarDisplayModeValues.includes(value);
|
|
60071
|
+
}
|
|
60072
|
+
function isEventCalendarListLayout(value) {
|
|
60073
|
+
return typeof value === "string" && eventCalendarListLayoutValues.includes(value);
|
|
60074
|
+
}
|
|
60075
|
+
function isEventContentType(slug) {
|
|
60076
|
+
if (!slug) return false;
|
|
60077
|
+
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
60078
|
+
}
|
|
60079
|
+
|
|
60081
60080
|
// ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
|
|
60082
60081
|
var DEFAULT_EVENT_CURRENCY = "USD";
|
|
60083
60082
|
function resolveRuntimeEventPricing(event) {
|
|
@@ -60197,29 +60196,6 @@ function readCoursePriceDisplay(value, currency) {
|
|
|
60197
60196
|
function readAmount(value) {
|
|
60198
60197
|
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
60199
60198
|
}
|
|
60200
|
-
|
|
60201
|
-
// ../blocks/src/system/constants/events.ts
|
|
60202
|
-
var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
60203
|
-
var eventCalendarDisplayModeValues = ["combined", "month", "week", "list", "timetable"];
|
|
60204
|
-
var eventCalendarListLayoutValues = ["stack", "grid", "compact"];
|
|
60205
|
-
var eventCalendarListLayoutOptions = [
|
|
60206
|
-
{ id: "stack", label: "Stack" },
|
|
60207
|
-
{ id: "grid", label: "Grid" },
|
|
60208
|
-
{ id: "compact", label: "Compact" }
|
|
60209
|
-
];
|
|
60210
|
-
var eventCalendarListLayoutCompatibleDisplayModeValues = ["combined", "list"];
|
|
60211
|
-
function isEventCalendarDisplayMode(value) {
|
|
60212
|
-
return typeof value === "string" && eventCalendarDisplayModeValues.includes(value);
|
|
60213
|
-
}
|
|
60214
|
-
function isEventCalendarListLayout(value) {
|
|
60215
|
-
return typeof value === "string" && eventCalendarListLayoutValues.includes(value);
|
|
60216
|
-
}
|
|
60217
|
-
function isEventContentType(slug) {
|
|
60218
|
-
if (!slug) return false;
|
|
60219
|
-
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
60220
|
-
}
|
|
60221
|
-
|
|
60222
|
-
// ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
60223
60199
|
var previewStageSchema = z.enum(["preview", "published"]);
|
|
60224
60200
|
var registrationButtonVariantSchema = z.enum(["primary", "secondary", "outline"]);
|
|
60225
60201
|
var eventButtonVariantSchema = z.enum(["primary", "secondary", "outline", "link"]);
|
|
@@ -60230,13 +60206,111 @@ var weekStartSchema = z.enum(["sunday", "monday"]);
|
|
|
60230
60206
|
var filterAutoShowSchema = z.enum(["auto", "always", "never"]);
|
|
60231
60207
|
var calendarTabViewsSchema = z.enum(["both", "month", "week"]);
|
|
60232
60208
|
|
|
60209
|
+
// ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
60210
|
+
var WIZARD_STEPS = [
|
|
60211
|
+
"select-event",
|
|
60212
|
+
"select-tickets",
|
|
60213
|
+
"enter-details",
|
|
60214
|
+
"select-payment"
|
|
60215
|
+
];
|
|
60216
|
+
function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
60217
|
+
const baseSteps = hasPreSelectedContext ? ["select-tickets", "enter-details"] : ["select-event", "select-tickets", "enter-details"];
|
|
60218
|
+
if (!needsPaymentStep) {
|
|
60219
|
+
return baseSteps;
|
|
60220
|
+
}
|
|
60221
|
+
return [...baseSteps, "select-payment"];
|
|
60222
|
+
}
|
|
60223
|
+
function getStepNumber(step, wizardSteps) {
|
|
60224
|
+
const index2 = wizardSteps.indexOf(step);
|
|
60225
|
+
return index2 >= 0 ? index2 + 1 : 1;
|
|
60226
|
+
}
|
|
60227
|
+
|
|
60228
|
+
// ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
60229
|
+
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
60230
|
+
return event.registrationOccurrenceId === occurrenceId || event.publicEventId === occurrenceId;
|
|
60231
|
+
}
|
|
60232
|
+
function findEventByOccurrenceId(events2, occurrenceId) {
|
|
60233
|
+
return events2.find((event) => eventMatchesOccurrenceId(event, occurrenceId)) ?? null;
|
|
60234
|
+
}
|
|
60235
|
+
function findPreSelectedEvent(input) {
|
|
60236
|
+
const occurrenceContext = input.occurrenceContext;
|
|
60237
|
+
if (!occurrenceContext) {
|
|
60238
|
+
return null;
|
|
60239
|
+
}
|
|
60240
|
+
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
60241
|
+
startsAt: occurrenceContext.startsAt,
|
|
60242
|
+
timeZone: occurrenceContext.timeZone
|
|
60243
|
+
}));
|
|
60244
|
+
return input.scopedEvents.find(
|
|
60245
|
+
(event) => eventMatchesOccurrenceId(event, occurrenceContext.id) || getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
60246
|
+
startsAt: event.startsAt,
|
|
60247
|
+
timeZone: event.timeZone
|
|
60248
|
+
})) === contextDate
|
|
60249
|
+
) ?? null;
|
|
60250
|
+
}
|
|
60251
|
+
function resolveRegistrationTarget(input) {
|
|
60252
|
+
const occurrenceId = input.occurrenceContext?.id ?? input.selectedEvent?.registrationOccurrenceId ?? null;
|
|
60253
|
+
if (!occurrenceId) {
|
|
60254
|
+
return null;
|
|
60255
|
+
}
|
|
60256
|
+
return {
|
|
60257
|
+
occurrenceId,
|
|
60258
|
+
selectedEventId: input.selectedEvent?.publicEventId ?? null
|
|
60259
|
+
};
|
|
60260
|
+
}
|
|
60261
|
+
function resolveEventRequiresPayment(input) {
|
|
60262
|
+
if (input.eligibility) {
|
|
60263
|
+
return input.eligibility.requiresPayment;
|
|
60264
|
+
}
|
|
60265
|
+
if (input.selectedTicketType) {
|
|
60266
|
+
return input.selectedTicketType.priceAmount > 0;
|
|
60267
|
+
}
|
|
60268
|
+
if (!input.event) {
|
|
60269
|
+
return false;
|
|
60270
|
+
}
|
|
60271
|
+
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
|
|
60272
|
+
}
|
|
60273
|
+
function resolveDiscountContext(input) {
|
|
60274
|
+
const selection = input.paymentSelection.method ? input.paymentSelection : null;
|
|
60275
|
+
if (!input.event) {
|
|
60276
|
+
return null;
|
|
60277
|
+
}
|
|
60278
|
+
if (selection?.method === "pass_bundle" && selection.bundlePassId) {
|
|
60279
|
+
return { type: "pass", passId: selection.bundlePassId };
|
|
60280
|
+
}
|
|
60281
|
+
if (selection?.method === "membership_bundle" && selection.bundleMembershipId) {
|
|
60282
|
+
return { type: "membership", membershipId: selection.bundleMembershipId };
|
|
60283
|
+
}
|
|
60284
|
+
if (!input.eventRequiresPayment) {
|
|
60285
|
+
return null;
|
|
60286
|
+
}
|
|
60287
|
+
if (selection?.method && selection.method !== "stripe") {
|
|
60288
|
+
return null;
|
|
60289
|
+
}
|
|
60290
|
+
return {
|
|
60291
|
+
type: "event",
|
|
60292
|
+
eventSeriesId: input.event.seriesId,
|
|
60293
|
+
eventCategoryId: input.event.eventCategory?.id ?? null,
|
|
60294
|
+
ticketsCount: input.ticketsCount
|
|
60295
|
+
};
|
|
60296
|
+
}
|
|
60297
|
+
|
|
60298
|
+
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
60299
|
+
function toRegistrationEvent(event) {
|
|
60300
|
+
return {
|
|
60301
|
+
...event,
|
|
60302
|
+
pricing: resolveRuntimeEventPricing(event),
|
|
60303
|
+
publicEventId: event.id,
|
|
60304
|
+
registrationOccurrenceId: event.occurrenceId
|
|
60305
|
+
};
|
|
60306
|
+
}
|
|
60307
|
+
function toRegistrationEvents(events2) {
|
|
60308
|
+
return events2.map(toRegistrationEvent);
|
|
60309
|
+
}
|
|
60310
|
+
|
|
60233
60311
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
60234
60312
|
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
|
|
60235
|
-
var [
|
|
60236
|
-
eventRegistrationGenericDateStepLabel,
|
|
60237
|
-
eventRegistrationGenericTicketsStepLabel,
|
|
60238
|
-
eventRegistrationGenericDetailsStepLabel
|
|
60239
|
-
] = EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
60313
|
+
var EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
|
|
60240
60314
|
var contentEntrySchema = z.object({
|
|
60241
60315
|
id: z.string(),
|
|
60242
60316
|
slug: z.string(),
|
|
@@ -60272,11 +60346,7 @@ var eventRegistrationDisplaySchema = z.object({
|
|
|
60272
60346
|
className: z.string().nullable(),
|
|
60273
60347
|
titleText: z.string(),
|
|
60274
60348
|
bodyText: z.string(),
|
|
60275
|
-
stepLabels: z.
|
|
60276
|
-
z.literal(eventRegistrationGenericDateStepLabel),
|
|
60277
|
-
z.literal(eventRegistrationGenericTicketsStepLabel),
|
|
60278
|
-
z.literal(eventRegistrationGenericDetailsStepLabel)
|
|
60279
|
-
]),
|
|
60349
|
+
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
60280
60350
|
summaryButtonText: z.string()
|
|
60281
60351
|
});
|
|
60282
60352
|
var eventRegistrationHydrationSchema = z.object({
|
|
@@ -60304,16 +60374,81 @@ createZodCodec(z.object({
|
|
|
60304
60374
|
stage: previewStageSchema.optional()
|
|
60305
60375
|
}));
|
|
60306
60376
|
function buildEventRegistrationDisplay(source) {
|
|
60377
|
+
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
60307
60378
|
return {
|
|
60308
60379
|
kind: "event-registration",
|
|
60309
60380
|
state: "generic-shell",
|
|
60310
60381
|
className: source.className ?? null,
|
|
60311
60382
|
titleText: "Event registration",
|
|
60312
|
-
bodyText:
|
|
60313
|
-
stepLabels
|
|
60383
|
+
bodyText: buildEventRegistrationShellBodyText(stepLabels),
|
|
60384
|
+
stepLabels,
|
|
60314
60385
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
60315
60386
|
};
|
|
60316
60387
|
}
|
|
60388
|
+
function buildEventRegistrationShellStepLabels(source) {
|
|
60389
|
+
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
60390
|
+
if (scopedEvents.length === 0) {
|
|
60391
|
+
return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
60392
|
+
}
|
|
60393
|
+
const preSelectedEvent = findPreSelectedEvent({
|
|
60394
|
+
scopedEvents,
|
|
60395
|
+
occurrenceContext: source.occurrenceContext
|
|
60396
|
+
});
|
|
60397
|
+
const hasPreSelectedContext = Boolean(source.occurrenceContext || preSelectedEvent);
|
|
60398
|
+
const needsPaymentStep = hasPreSelectedContext && preSelectedEvent ? resolveEventRequiresPayment({
|
|
60399
|
+
eligibility: null,
|
|
60400
|
+
selectedTicketType: null,
|
|
60401
|
+
event: preSelectedEvent
|
|
60402
|
+
}) : false;
|
|
60403
|
+
return getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
60404
|
+
}
|
|
60405
|
+
function scopeEventRegistrationEvents(source) {
|
|
60406
|
+
const events2 = toRegistrationEvents(source.events ?? []);
|
|
60407
|
+
if (source.occurrenceContext?.seriesId) {
|
|
60408
|
+
return events2.filter((event) => event.seriesId === source.occurrenceContext?.seriesId);
|
|
60409
|
+
}
|
|
60410
|
+
const entrySlug = source.contentEntry?.slug;
|
|
60411
|
+
const entryContentType = source.contentEntry?.contentTypeSlug;
|
|
60412
|
+
if (entrySlug && entryContentType && isEventContentType(entryContentType)) {
|
|
60413
|
+
return events2.filter((event) => event.slug === entrySlug);
|
|
60414
|
+
}
|
|
60415
|
+
return events2;
|
|
60416
|
+
}
|
|
60417
|
+
function shellLabelForRegistrationStep(step, events2) {
|
|
60418
|
+
switch (step) {
|
|
60419
|
+
case "select-event":
|
|
60420
|
+
return isDateSelection(events2) ? "Date" : "Event";
|
|
60421
|
+
case "select-tickets":
|
|
60422
|
+
return "Tickets";
|
|
60423
|
+
case "enter-details":
|
|
60424
|
+
return "Details";
|
|
60425
|
+
case "select-payment":
|
|
60426
|
+
return "Payment";
|
|
60427
|
+
case "error":
|
|
60428
|
+
case "success":
|
|
60429
|
+
case "submitting":
|
|
60430
|
+
case "redirecting":
|
|
60431
|
+
case "verifying-payment":
|
|
60432
|
+
case "verifying-timeout":
|
|
60433
|
+
case "payment-failed":
|
|
60434
|
+
return "Details";
|
|
60435
|
+
}
|
|
60436
|
+
}
|
|
60437
|
+
function isDateSelection(events2) {
|
|
60438
|
+
const firstSeriesId = events2[0]?.seriesId;
|
|
60439
|
+
return Boolean(
|
|
60440
|
+
events2.length > 1 && firstSeriesId && events2.every((event) => event.seriesId === firstSeriesId)
|
|
60441
|
+
);
|
|
60442
|
+
}
|
|
60443
|
+
function buildEventRegistrationShellBodyText(stepLabels) {
|
|
60444
|
+
if (stepLabels.includes("Payment")) {
|
|
60445
|
+
return "Preparing tickets, details, and payment options.";
|
|
60446
|
+
}
|
|
60447
|
+
if (stepLabels[0] === "Tickets") {
|
|
60448
|
+
return "Preparing tickets and booking details.";
|
|
60449
|
+
}
|
|
60450
|
+
return "Preparing dates, tickets, and booking details.";
|
|
60451
|
+
}
|
|
60317
60452
|
var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
60318
60453
|
kind: "client-owned",
|
|
60319
60454
|
contracts: {
|
|
@@ -76008,6 +76143,9 @@ var EventListingSSR = (props2) => {
|
|
|
76008
76143
|
)
|
|
76009
76144
|
] });
|
|
76010
76145
|
};
|
|
76146
|
+
|
|
76147
|
+
// ../blocks/src/system/runtime/nodes/event-registration/constants.ts
|
|
76148
|
+
var EVENT_REGISTRATION_ANCHOR_ID = "event-registration";
|
|
76011
76149
|
function cx(...classes) {
|
|
76012
76150
|
return classes.filter((className) => Boolean(className)).join(" ");
|
|
76013
76151
|
}
|
|
@@ -76074,42 +76212,51 @@ function EventRegistrationSSR({
|
|
|
76074
76212
|
function EventRegistrationShell({
|
|
76075
76213
|
display
|
|
76076
76214
|
}) {
|
|
76077
|
-
return /* @__PURE__ */ jsx(
|
|
76078
|
-
|
|
76079
|
-
|
|
76080
|
-
|
|
76081
|
-
|
|
76082
|
-
|
|
76083
|
-
|
|
76084
|
-
|
|
76085
|
-
|
|
76086
|
-
|
|
76087
|
-
|
|
76088
|
-
|
|
76089
|
-
|
|
76090
|
-
|
|
76091
|
-
|
|
76215
|
+
return /* @__PURE__ */ jsx(
|
|
76216
|
+
"div",
|
|
76217
|
+
{
|
|
76218
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
76219
|
+
className: "er-container er-registration-shell",
|
|
76220
|
+
"aria-busy": "true",
|
|
76221
|
+
role: "status",
|
|
76222
|
+
children: /* @__PURE__ */ jsxs("div", { className: "er-payment-layout er-payment-layout--no-sidebar", children: [
|
|
76223
|
+
/* @__PURE__ */ jsxs("div", { className: "er-payment-layout-main", children: [
|
|
76224
|
+
/* @__PURE__ */ jsx("div", { className: "er-steps-nav er-registration-shell__steps", "aria-hidden": "true", children: /* @__PURE__ */ jsx("ol", { className: "er-steps", children: display.stepLabels.map((label, index2) => {
|
|
76225
|
+
const isActive2 = index2 === 0;
|
|
76226
|
+
return /* @__PURE__ */ jsxs("li", { className: "er-step", children: [
|
|
76227
|
+
/* @__PURE__ */ jsx("span", { className: cx("er-step-circle", isActive2 && "er-step-circle--active"), children: index2 + 1 }),
|
|
76228
|
+
/* @__PURE__ */ jsx("span", { className: cx("er-step-label", isActive2 && "er-step-label--active"), children: label }),
|
|
76229
|
+
index2 < display.stepLabels.length - 1 ? /* @__PURE__ */ jsx("span", { className: "er-step-connector" }) : null
|
|
76230
|
+
] }, label);
|
|
76231
|
+
}) }) }),
|
|
76232
|
+
/* @__PURE__ */ jsxs("div", { className: "er-stack", children: [
|
|
76233
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
76234
|
+
/* @__PURE__ */ jsx("p", { className: "er-registration-shell__eyebrow", children: "Registration" }),
|
|
76235
|
+
/* @__PURE__ */ jsx("h3", { className: "er-title er-registration-shell__title", children: display.titleText }),
|
|
76236
|
+
/* @__PURE__ */ jsx("p", { className: "er-text er-text--muted er-registration-shell__copy", children: display.bodyText })
|
|
76237
|
+
] }),
|
|
76238
|
+
/* @__PURE__ */ jsxs("div", { className: "er-event-grid er-registration-shell__cards", "aria-hidden": "true", children: [
|
|
76239
|
+
/* @__PURE__ */ jsxs("div", { className: "er-event-card er-registration-shell__card", children: [
|
|
76240
|
+
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--lg" }),
|
|
76241
|
+
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--sm" })
|
|
76242
|
+
] }),
|
|
76243
|
+
/* @__PURE__ */ jsxs("div", { className: "er-event-card er-registration-shell__card", children: [
|
|
76244
|
+
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--md" }),
|
|
76245
|
+
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--xs" })
|
|
76246
|
+
] })
|
|
76247
|
+
] })
|
|
76248
|
+
] })
|
|
76092
76249
|
] }),
|
|
76093
|
-
/* @__PURE__ */ jsxs("div", { className: "er-
|
|
76094
|
-
/* @__PURE__ */ jsxs("div", { className: "er-
|
|
76095
|
-
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--lg" }),
|
|
76096
|
-
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--sm" })
|
|
76097
|
-
] }),
|
|
76098
|
-
/* @__PURE__ */ jsxs("div", { className: "er-event-card er-registration-shell__card", children: [
|
|
76250
|
+
/* @__PURE__ */ jsx("div", { className: "er-payment-layout-footer", children: /* @__PURE__ */ jsxs("div", { className: "er-summary-bar er-registration-shell__summary", "aria-hidden": "true", children: [
|
|
76251
|
+
/* @__PURE__ */ jsxs("div", { className: "er-summary-bar-info", children: [
|
|
76099
76252
|
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--md" }),
|
|
76100
76253
|
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--xs" })
|
|
76101
|
-
] })
|
|
76102
|
-
|
|
76254
|
+
] }),
|
|
76255
|
+
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__button-placeholder", children: display.summaryButtonText })
|
|
76256
|
+
] }) })
|
|
76103
76257
|
] })
|
|
76104
|
-
|
|
76105
|
-
|
|
76106
|
-
/* @__PURE__ */ jsxs("div", { className: "er-summary-bar-info", children: [
|
|
76107
|
-
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--md" }),
|
|
76108
|
-
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__line er-registration-shell__line--xs" })
|
|
76109
|
-
] }),
|
|
76110
|
-
/* @__PURE__ */ jsx("div", { className: "er-registration-shell__button-placeholder", children: display.summaryButtonText })
|
|
76111
|
-
] }) })
|
|
76112
|
-
] }) });
|
|
76258
|
+
}
|
|
76259
|
+
);
|
|
76113
76260
|
}
|
|
76114
76261
|
var event_registration_server_default = EventRegistrationSSR;
|
|
76115
76262
|
function joinClasses6(...parts) {
|
|
@@ -125741,10 +125888,6 @@ function getCmsApiUrl() {
|
|
|
125741
125888
|
if (dashboardUrl) {
|
|
125742
125889
|
return `${dashboardUrl.replace(/\/$/, "")}/api`;
|
|
125743
125890
|
}
|
|
125744
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
125745
|
-
if (legacyApiUrl) {
|
|
125746
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
125747
|
-
}
|
|
125748
125891
|
throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
|
|
125749
125892
|
}
|
|
125750
125893
|
function getChallengeUrl() {
|
|
@@ -129076,7 +129219,7 @@ function validateFormData(data) {
|
|
|
129076
129219
|
}
|
|
129077
129220
|
|
|
129078
129221
|
// ../blocks/src/system/runtime/shared/utils/wizardSteps.ts
|
|
129079
|
-
function
|
|
129222
|
+
function getStepNumber2(step, wizardSteps) {
|
|
129080
129223
|
const index2 = wizardSteps.indexOf(step);
|
|
129081
129224
|
return index2 >= 0 ? index2 + 1 : 1;
|
|
129082
129225
|
}
|
|
@@ -129622,25 +129765,6 @@ function StepIndicator2(props2) {
|
|
|
129622
129765
|
return /* @__PURE__ */ jsx(StepIndicator, { ...props2, classPrefix: "er" });
|
|
129623
129766
|
}
|
|
129624
129767
|
|
|
129625
|
-
// ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
129626
|
-
var WIZARD_STEPS = [
|
|
129627
|
-
"select-event",
|
|
129628
|
-
"select-tickets",
|
|
129629
|
-
"enter-details",
|
|
129630
|
-
"select-payment"
|
|
129631
|
-
];
|
|
129632
|
-
function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
129633
|
-
const baseSteps = hasPreSelectedContext ? ["select-tickets", "enter-details"] : ["select-event", "select-tickets", "enter-details"];
|
|
129634
|
-
if (!needsPaymentStep) {
|
|
129635
|
-
return baseSteps;
|
|
129636
|
-
}
|
|
129637
|
-
return [...baseSteps, "select-payment"];
|
|
129638
|
-
}
|
|
129639
|
-
function getStepNumber2(step, wizardSteps) {
|
|
129640
|
-
const index2 = wizardSteps.indexOf(step);
|
|
129641
|
-
return index2 >= 0 ? index2 + 1 : 1;
|
|
129642
|
-
}
|
|
129643
|
-
|
|
129644
129768
|
// ../blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.ts
|
|
129645
129769
|
function createInitialRegistrationFlowState(hasPreSelectedContext) {
|
|
129646
129770
|
return {
|
|
@@ -129794,8 +129918,10 @@ function requiresPaymentStep(params) {
|
|
|
129794
129918
|
return !isEntitlementSelection(params.paymentSelection);
|
|
129795
129919
|
}
|
|
129796
129920
|
|
|
129797
|
-
// ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.
|
|
129921
|
+
// ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.ts
|
|
129798
129922
|
var DEFAULT_EVENT_REGISTRATION_MAX_TICKETS = 5;
|
|
129923
|
+
|
|
129924
|
+
// ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.ts
|
|
129799
129925
|
function getRegistrableStatuses(isPreview) {
|
|
129800
129926
|
return isPreview ? ["active", "draft"] : ["active"];
|
|
129801
129927
|
}
|
|
@@ -130365,9 +130491,9 @@ var EventSelectionStep = ({
|
|
|
130365
130491
|
showCapacity
|
|
130366
130492
|
}) => {
|
|
130367
130493
|
const selectionMode = getEventSelectionMode(events2);
|
|
130368
|
-
const
|
|
130494
|
+
const isDateSelection2 = selectionMode === "date";
|
|
130369
130495
|
return /* @__PURE__ */ jsxs("div", { className: "er-stack", children: [
|
|
130370
|
-
/* @__PURE__ */ jsx("h3", { className: "er-title", children:
|
|
130496
|
+
/* @__PURE__ */ jsx("h3", { className: "er-title", children: isDateSelection2 ? "Choose a date" : "Select an event" }),
|
|
130371
130497
|
/* @__PURE__ */ jsx("div", { className: "er-event-grid", children: events2.map((event) => {
|
|
130372
130498
|
const isSelected = selectedEvent?.publicEventId === event.publicEventId;
|
|
130373
130499
|
const isSoldOut = event.capacity !== null && event.availableSpots === 0;
|
|
@@ -130395,9 +130521,9 @@ var EventSelectionStep = ({
|
|
|
130395
130521
|
className: cardClasses,
|
|
130396
130522
|
children: /* @__PURE__ */ jsxs("div", { className: "er-event-option", children: [
|
|
130397
130523
|
/* @__PURE__ */ jsxs("div", { className: "er-event-option-main", children: [
|
|
130398
|
-
/* @__PURE__ */ jsx("h4", { className: "er-event-title", children:
|
|
130524
|
+
/* @__PURE__ */ jsx("h4", { className: "er-event-title", children: isDateSelection2 ? formatDate3(event.startsAt, { timeZone }) : event.title }),
|
|
130399
130525
|
/* @__PURE__ */ jsxs("p", { className: "er-text er-text--muted", children: [
|
|
130400
|
-
|
|
130526
|
+
isDateSelection2 ? formatTime3(event.startsAt, { timeZone }) : `${formatDate3(event.startsAt, { timeZone })} at ${formatTime3(event.startsAt, { timeZone })}`,
|
|
130401
130527
|
showVenue && event.venue && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
130402
130528
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: " \xB7 " }),
|
|
130403
130529
|
event.venue.name
|
|
@@ -131089,7 +131215,7 @@ var PaymentSelectionStep = ({
|
|
|
131089
131215
|
label: "Pay by Card",
|
|
131090
131216
|
detail: formatPrice(totalPrice, eligibility.currency),
|
|
131091
131217
|
selected: selectedMethod === "stripe",
|
|
131092
|
-
onClick: () => onSelectionChange({ method: "stripe" })
|
|
131218
|
+
onClick: () => onSelectionChange({ method: "stripe", collectionOptionKind: "upfront" })
|
|
131093
131219
|
}
|
|
131094
131220
|
),
|
|
131095
131221
|
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx(
|
|
@@ -131878,6 +132004,7 @@ function useEventRegistrationSubmit(options) {
|
|
|
131878
132004
|
checkoutType,
|
|
131879
132005
|
productId: bundleProductId,
|
|
131880
132006
|
discountCode: options.discountCode.trim() ? options.discountCode.trim() : void 0,
|
|
132007
|
+
collectionOptionKind: selectionSnapshot.collectionOptionKind,
|
|
131881
132008
|
successUrl,
|
|
131882
132009
|
cancelUrl
|
|
131883
132010
|
});
|
|
@@ -131947,89 +132074,6 @@ function useEventRegistrationSubmit(options) {
|
|
|
131947
132074
|
};
|
|
131948
132075
|
}
|
|
131949
132076
|
|
|
131950
|
-
// ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
131951
|
-
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
131952
|
-
return event.registrationOccurrenceId === occurrenceId || event.publicEventId === occurrenceId;
|
|
131953
|
-
}
|
|
131954
|
-
function findEventByOccurrenceId(events2, occurrenceId) {
|
|
131955
|
-
return events2.find((event) => eventMatchesOccurrenceId(event, occurrenceId)) ?? null;
|
|
131956
|
-
}
|
|
131957
|
-
function findPreSelectedEvent(input) {
|
|
131958
|
-
const occurrenceContext = input.occurrenceContext;
|
|
131959
|
-
if (!occurrenceContext) {
|
|
131960
|
-
return null;
|
|
131961
|
-
}
|
|
131962
|
-
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
131963
|
-
startsAt: occurrenceContext.startsAt,
|
|
131964
|
-
timeZone: occurrenceContext.timeZone
|
|
131965
|
-
}));
|
|
131966
|
-
return input.scopedEvents.find(
|
|
131967
|
-
(event) => eventMatchesOccurrenceId(event, occurrenceContext.id) || getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
131968
|
-
startsAt: event.startsAt,
|
|
131969
|
-
timeZone: event.timeZone
|
|
131970
|
-
})) === contextDate
|
|
131971
|
-
) ?? null;
|
|
131972
|
-
}
|
|
131973
|
-
function resolveRegistrationTarget(input) {
|
|
131974
|
-
const occurrenceId = input.occurrenceContext?.id ?? input.selectedEvent?.registrationOccurrenceId ?? null;
|
|
131975
|
-
if (!occurrenceId) {
|
|
131976
|
-
return null;
|
|
131977
|
-
}
|
|
131978
|
-
return {
|
|
131979
|
-
occurrenceId,
|
|
131980
|
-
selectedEventId: input.selectedEvent?.publicEventId ?? null
|
|
131981
|
-
};
|
|
131982
|
-
}
|
|
131983
|
-
function resolveEventRequiresPayment(input) {
|
|
131984
|
-
if (input.eligibility) {
|
|
131985
|
-
return input.eligibility.requiresPayment;
|
|
131986
|
-
}
|
|
131987
|
-
if (input.selectedTicketType) {
|
|
131988
|
-
return input.selectedTicketType.priceAmount > 0;
|
|
131989
|
-
}
|
|
131990
|
-
if (!input.event) {
|
|
131991
|
-
return false;
|
|
131992
|
-
}
|
|
131993
|
-
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
|
|
131994
|
-
}
|
|
131995
|
-
function resolveDiscountContext(input) {
|
|
131996
|
-
const selection = input.paymentSelection.method ? input.paymentSelection : null;
|
|
131997
|
-
if (!input.event) {
|
|
131998
|
-
return null;
|
|
131999
|
-
}
|
|
132000
|
-
if (selection?.method === "pass_bundle" && selection.bundlePassId) {
|
|
132001
|
-
return { type: "pass", passId: selection.bundlePassId };
|
|
132002
|
-
}
|
|
132003
|
-
if (selection?.method === "membership_bundle" && selection.bundleMembershipId) {
|
|
132004
|
-
return { type: "membership", membershipId: selection.bundleMembershipId };
|
|
132005
|
-
}
|
|
132006
|
-
if (!input.eventRequiresPayment) {
|
|
132007
|
-
return null;
|
|
132008
|
-
}
|
|
132009
|
-
if (selection?.method && selection.method !== "stripe") {
|
|
132010
|
-
return null;
|
|
132011
|
-
}
|
|
132012
|
-
return {
|
|
132013
|
-
type: "event",
|
|
132014
|
-
eventSeriesId: input.event.seriesId,
|
|
132015
|
-
eventCategoryId: input.event.eventCategory?.id ?? null,
|
|
132016
|
-
ticketsCount: input.ticketsCount
|
|
132017
|
-
};
|
|
132018
|
-
}
|
|
132019
|
-
|
|
132020
|
-
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
132021
|
-
function toRegistrationEvent(event) {
|
|
132022
|
-
return {
|
|
132023
|
-
...event,
|
|
132024
|
-
pricing: resolveRuntimeEventPricing(event),
|
|
132025
|
-
publicEventId: event.id,
|
|
132026
|
-
registrationOccurrenceId: event.occurrenceId
|
|
132027
|
-
};
|
|
132028
|
-
}
|
|
132029
|
-
function toRegistrationEvents(events2) {
|
|
132030
|
-
return events2.map(toRegistrationEvent);
|
|
132031
|
-
}
|
|
132032
|
-
|
|
132033
132077
|
// ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
|
|
132034
132078
|
function useEventRegistrationWizard(options) {
|
|
132035
132079
|
const api = useBlockApi();
|
|
@@ -132323,23 +132367,29 @@ function useEventRegistrationWizard(options) {
|
|
|
132323
132367
|
);
|
|
132324
132368
|
const handleDetailsComplete = async () => {
|
|
132325
132369
|
if (ticketTypeSelectionRequired && !hasValidSelectedTicketType) {
|
|
132326
|
-
|
|
132370
|
+
const message2 = "Select a ticket type to continue.";
|
|
132371
|
+
setErrorMessage(message2);
|
|
132327
132372
|
setStep("error");
|
|
132328
|
-
return;
|
|
132373
|
+
return { ok: false, reason: "blocked", message: message2 };
|
|
132329
132374
|
}
|
|
132330
132375
|
if (!validateForm()) {
|
|
132331
132376
|
setGuestSectionShake(true);
|
|
132332
|
-
return
|
|
132377
|
+
return {
|
|
132378
|
+
ok: false,
|
|
132379
|
+
reason: "validation-failed",
|
|
132380
|
+
message: "Check the highlighted fields and try again."
|
|
132381
|
+
};
|
|
132333
132382
|
}
|
|
132334
132383
|
if (waitlistClaim.claim === null && eligibility?.isFull && !eligibility.canJoinWaitlist) {
|
|
132335
|
-
|
|
132384
|
+
const message2 = "This event is sold out.";
|
|
132385
|
+
setErrorMessage(message2);
|
|
132336
132386
|
setStep("error");
|
|
132337
|
-
return;
|
|
132387
|
+
return { ok: false, reason: "blocked", message: message2 };
|
|
132338
132388
|
}
|
|
132339
132389
|
const shouldCollectPayment = !eligibility?.canJoinWaitlist && requiresPaymentStep({ eventRequiresPayment, paymentSelection });
|
|
132340
132390
|
if (shouldCollectPayment) {
|
|
132341
132391
|
setStep("select-payment");
|
|
132342
|
-
return;
|
|
132392
|
+
return { ok: true, outcome: "payment-step" };
|
|
132343
132393
|
}
|
|
132344
132394
|
const submitPlan = resolveEventRegistrationSubmitPlan({
|
|
132345
132395
|
paymentSelection,
|
|
@@ -132349,14 +132399,22 @@ function useEventRegistrationWizard(options) {
|
|
|
132349
132399
|
if (!submitPlan.ok) {
|
|
132350
132400
|
setErrorMessage(submitPlan.message);
|
|
132351
132401
|
setStep("error");
|
|
132352
|
-
return;
|
|
132402
|
+
return { ok: false, reason: "blocked", message: submitPlan.message };
|
|
132353
132403
|
}
|
|
132354
|
-
await handleSubmit(
|
|
132404
|
+
const submitResult = await handleSubmit(
|
|
132355
132405
|
submitPlan.args.method,
|
|
132356
132406
|
submitPlan.args.passId,
|
|
132357
132407
|
submitPlan.args.membershipId,
|
|
132358
132408
|
submitPlan.args.selection
|
|
132359
132409
|
);
|
|
132410
|
+
if (!submitResult.ok) {
|
|
132411
|
+
return {
|
|
132412
|
+
ok: false,
|
|
132413
|
+
reason: submitResult.reason === "submission-failed" ? "submission-failed" : "blocked",
|
|
132414
|
+
message: submitResult.message
|
|
132415
|
+
};
|
|
132416
|
+
}
|
|
132417
|
+
return { ok: true, outcome: "submitted" };
|
|
132360
132418
|
};
|
|
132361
132419
|
const handlePaymentSelect = async () => {
|
|
132362
132420
|
const submitPlan = resolveEventRegistrationSubmitPlan({
|
|
@@ -132608,7 +132666,6 @@ function MagicLinkForm({
|
|
|
132608
132666
|
)
|
|
132609
132667
|
] });
|
|
132610
132668
|
}
|
|
132611
|
-
var EVENT_REGISTRATION_ANCHOR_ID = "event-registration";
|
|
132612
132669
|
var EVENT_PORTAL_AUTH_COPY = {
|
|
132613
132670
|
membership: {
|
|
132614
132671
|
title: "Have a pass or membership?",
|
|
@@ -132698,7 +132755,7 @@ function EventRegistrationWizard(props2) {
|
|
|
132698
132755
|
return "";
|
|
132699
132756
|
}
|
|
132700
132757
|
});
|
|
132701
|
-
const currentStepNumber =
|
|
132758
|
+
const currentStepNumber = getStepNumber(wizard.step, activeWizardSteps);
|
|
132702
132759
|
const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
132703
132760
|
const summaryEventPricingType = summaryEvent ? publicEventPricingType(summaryEvent.pricing) : "free";
|
|
132704
132761
|
const waitlistClaimRequiresPortalLogin = wizard.waitlistClaim.requiresPortalLogin && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking";
|
|
@@ -134010,7 +134067,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
134010
134067
|
),
|
|
134011
134068
|
[hasPreSelectedCourse, hasCoursePayment, canUseMembership, bookingMode, isMembershipFastTrack]
|
|
134012
134069
|
);
|
|
134013
|
-
const currentStepNumber =
|
|
134070
|
+
const currentStepNumber = getStepNumber2(step, wizardSteps);
|
|
134014
134071
|
const totalSteps = wizardSteps.length;
|
|
134015
134072
|
const stepLabels = getStepLabels(wizardSteps);
|
|
134016
134073
|
const canShowPortalAuthSidebarOnCurrentStep = step !== "success" && step !== "waitlist" && step !== "error";
|
|
@@ -182786,9 +182843,6 @@ function applyRfc6902Patch(base2, ops) {
|
|
|
182786
182843
|
}
|
|
182787
182844
|
var PreviewThemeOverlayContext = createContext(null);
|
|
182788
182845
|
var NO_THEME_OVERLAY = { kind: "none" };
|
|
182789
|
-
function isDebugEnabled() {
|
|
182790
|
-
return process.env.NEXT_PUBLIC_AI_ASSISTANT_DEBUG === "1";
|
|
182791
|
-
}
|
|
182792
182846
|
function PreviewThemeOverlayProvider({ baseTheme, children }) {
|
|
182793
182847
|
const [overlay, setOverlay] = useState(NO_THEME_OVERLAY);
|
|
182794
182848
|
const overlayOps = overlay.kind === "patch" ? [...overlay.ops] : null;
|
|
@@ -182843,12 +182897,9 @@ function PreviewThemeOverlayProvider({ baseTheme, children }) {
|
|
|
182843
182897
|
try {
|
|
182844
182898
|
return applyRfc6902Patch(baseTheme, [...overlay.ops]);
|
|
182845
182899
|
} catch (error) {
|
|
182846
|
-
|
|
182847
|
-
|
|
182848
|
-
|
|
182849
|
-
overlayOps: overlay.ops
|
|
182850
|
-
});
|
|
182851
|
-
}
|
|
182900
|
+
console.warn("[preview-theme-overlay] failed to apply theme overlay patch", {
|
|
182901
|
+
error: error instanceof Error ? error.message : String(error)
|
|
182902
|
+
});
|
|
182852
182903
|
return baseTheme;
|
|
182853
182904
|
}
|
|
182854
182905
|
}, [baseTheme, overlay]);
|