@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
package/dist/client/client.mjs
CHANGED
|
@@ -24142,6 +24142,32 @@ var init_event_registration_shared = __esm({
|
|
|
24142
24142
|
}
|
|
24143
24143
|
});
|
|
24144
24144
|
|
|
24145
|
+
// ../blocks/src/system/constants/events.ts
|
|
24146
|
+
function isEventCalendarDisplayMode(value) {
|
|
24147
|
+
return typeof value === "string" && eventCalendarDisplayModeValues.includes(value);
|
|
24148
|
+
}
|
|
24149
|
+
function isEventCalendarListLayout(value) {
|
|
24150
|
+
return typeof value === "string" && eventCalendarListLayoutValues.includes(value);
|
|
24151
|
+
}
|
|
24152
|
+
function isEventContentType(slug) {
|
|
24153
|
+
if (!slug) return false;
|
|
24154
|
+
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
24155
|
+
}
|
|
24156
|
+
var EVENT_CONTENT_TYPE_SLUGS, eventCalendarDisplayModeValues, eventCalendarListLayoutValues, eventCalendarListLayoutOptions;
|
|
24157
|
+
var init_events = __esm({
|
|
24158
|
+
"../blocks/src/system/constants/events.ts"() {
|
|
24159
|
+
"use strict";
|
|
24160
|
+
EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
24161
|
+
eventCalendarDisplayModeValues = ["combined", "month", "week", "list", "timetable"];
|
|
24162
|
+
eventCalendarListLayoutValues = ["stack", "grid", "compact"];
|
|
24163
|
+
eventCalendarListLayoutOptions = [
|
|
24164
|
+
{ id: "stack", label: "Stack" },
|
|
24165
|
+
{ id: "grid", label: "Grid" },
|
|
24166
|
+
{ id: "compact", label: "Compact" }
|
|
24167
|
+
];
|
|
24168
|
+
}
|
|
24169
|
+
});
|
|
24170
|
+
|
|
24145
24171
|
// ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
|
|
24146
24172
|
function resolveRuntimeEventPricing(event) {
|
|
24147
24173
|
if (isPublicEventPricing(event.pricing)) {
|
|
@@ -24268,32 +24294,6 @@ var init_pricing = __esm({
|
|
|
24268
24294
|
}
|
|
24269
24295
|
});
|
|
24270
24296
|
|
|
24271
|
-
// ../blocks/src/system/constants/events.ts
|
|
24272
|
-
function isEventCalendarDisplayMode(value) {
|
|
24273
|
-
return typeof value === "string" && eventCalendarDisplayModeValues.includes(value);
|
|
24274
|
-
}
|
|
24275
|
-
function isEventCalendarListLayout(value) {
|
|
24276
|
-
return typeof value === "string" && eventCalendarListLayoutValues.includes(value);
|
|
24277
|
-
}
|
|
24278
|
-
function isEventContentType(slug) {
|
|
24279
|
-
if (!slug) return false;
|
|
24280
|
-
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
24281
|
-
}
|
|
24282
|
-
var EVENT_CONTENT_TYPE_SLUGS, eventCalendarDisplayModeValues, eventCalendarListLayoutValues, eventCalendarListLayoutOptions;
|
|
24283
|
-
var init_events = __esm({
|
|
24284
|
-
"../blocks/src/system/constants/events.ts"() {
|
|
24285
|
-
"use strict";
|
|
24286
|
-
EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
24287
|
-
eventCalendarDisplayModeValues = ["combined", "month", "week", "list", "timetable"];
|
|
24288
|
-
eventCalendarListLayoutValues = ["stack", "grid", "compact"];
|
|
24289
|
-
eventCalendarListLayoutOptions = [
|
|
24290
|
-
{ id: "stack", label: "Stack" },
|
|
24291
|
-
{ id: "grid", label: "Grid" },
|
|
24292
|
-
{ id: "compact", label: "Compact" }
|
|
24293
|
-
];
|
|
24294
|
-
}
|
|
24295
|
-
});
|
|
24296
|
-
|
|
24297
24297
|
// ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
24298
24298
|
import { z as z47 } from "zod";
|
|
24299
24299
|
var previewStageSchema, registrationButtonVariantSchema, eventButtonVariantSchema, eventLayoutSchema, eventCalendarDisplayModeSchema, columnOptionSchema, weekStartSchema, filterAutoShowSchema, calendarTabViewsSchema;
|
|
@@ -24313,19 +24313,205 @@ var init_contract_schemas = __esm({
|
|
|
24313
24313
|
}
|
|
24314
24314
|
});
|
|
24315
24315
|
|
|
24316
|
+
// ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
24317
|
+
function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
24318
|
+
const baseSteps = hasPreSelectedContext ? ["select-tickets", "enter-details"] : ["select-event", "select-tickets", "enter-details"];
|
|
24319
|
+
if (!needsPaymentStep) {
|
|
24320
|
+
return baseSteps;
|
|
24321
|
+
}
|
|
24322
|
+
return [...baseSteps, "select-payment"];
|
|
24323
|
+
}
|
|
24324
|
+
function getStepNumber(step, wizardSteps) {
|
|
24325
|
+
const index = wizardSteps.indexOf(step);
|
|
24326
|
+
return index >= 0 ? index + 1 : 1;
|
|
24327
|
+
}
|
|
24328
|
+
var WIZARD_STEPS;
|
|
24329
|
+
var init_wizardSteps = __esm({
|
|
24330
|
+
"../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts"() {
|
|
24331
|
+
"use strict";
|
|
24332
|
+
WIZARD_STEPS = [
|
|
24333
|
+
"select-event",
|
|
24334
|
+
"select-tickets",
|
|
24335
|
+
"enter-details",
|
|
24336
|
+
"select-payment"
|
|
24337
|
+
];
|
|
24338
|
+
}
|
|
24339
|
+
});
|
|
24340
|
+
|
|
24341
|
+
// ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
24342
|
+
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
24343
|
+
return event.registrationOccurrenceId === occurrenceId || event.publicEventId === occurrenceId;
|
|
24344
|
+
}
|
|
24345
|
+
function findEventByOccurrenceId(events, occurrenceId) {
|
|
24346
|
+
return events.find((event) => eventMatchesOccurrenceId(event, occurrenceId)) ?? null;
|
|
24347
|
+
}
|
|
24348
|
+
function findPreSelectedEvent(input) {
|
|
24349
|
+
const occurrenceContext = input.occurrenceContext;
|
|
24350
|
+
if (!occurrenceContext) {
|
|
24351
|
+
return null;
|
|
24352
|
+
}
|
|
24353
|
+
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
24354
|
+
startsAt: occurrenceContext.startsAt,
|
|
24355
|
+
timeZone: occurrenceContext.timeZone
|
|
24356
|
+
}));
|
|
24357
|
+
return input.scopedEvents.find(
|
|
24358
|
+
(event) => eventMatchesOccurrenceId(event, occurrenceContext.id) || getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
24359
|
+
startsAt: event.startsAt,
|
|
24360
|
+
timeZone: event.timeZone
|
|
24361
|
+
})) === contextDate
|
|
24362
|
+
) ?? null;
|
|
24363
|
+
}
|
|
24364
|
+
function resolveRegistrationTarget(input) {
|
|
24365
|
+
const occurrenceId = input.occurrenceContext?.id ?? input.selectedEvent?.registrationOccurrenceId ?? null;
|
|
24366
|
+
if (!occurrenceId) {
|
|
24367
|
+
return null;
|
|
24368
|
+
}
|
|
24369
|
+
return {
|
|
24370
|
+
occurrenceId,
|
|
24371
|
+
selectedEventId: input.selectedEvent?.publicEventId ?? null
|
|
24372
|
+
};
|
|
24373
|
+
}
|
|
24374
|
+
function resolveEventRequiresPayment(input) {
|
|
24375
|
+
if (input.eligibility) {
|
|
24376
|
+
return input.eligibility.requiresPayment;
|
|
24377
|
+
}
|
|
24378
|
+
if (input.selectedTicketType) {
|
|
24379
|
+
return input.selectedTicketType.priceAmount > 0;
|
|
24380
|
+
}
|
|
24381
|
+
if (!input.event) {
|
|
24382
|
+
return false;
|
|
24383
|
+
}
|
|
24384
|
+
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
|
|
24385
|
+
}
|
|
24386
|
+
function resolveDiscountContext(input) {
|
|
24387
|
+
const selection = input.paymentSelection.method ? input.paymentSelection : null;
|
|
24388
|
+
if (!input.event) {
|
|
24389
|
+
return null;
|
|
24390
|
+
}
|
|
24391
|
+
if (selection?.method === "pass_bundle" && selection.bundlePassId) {
|
|
24392
|
+
return { type: "pass", passId: selection.bundlePassId };
|
|
24393
|
+
}
|
|
24394
|
+
if (selection?.method === "membership_bundle" && selection.bundleMembershipId) {
|
|
24395
|
+
return { type: "membership", membershipId: selection.bundleMembershipId };
|
|
24396
|
+
}
|
|
24397
|
+
if (!input.eventRequiresPayment) {
|
|
24398
|
+
return null;
|
|
24399
|
+
}
|
|
24400
|
+
if (selection?.method && selection.method !== "stripe") {
|
|
24401
|
+
return null;
|
|
24402
|
+
}
|
|
24403
|
+
return {
|
|
24404
|
+
type: "event",
|
|
24405
|
+
eventSeriesId: input.event.seriesId,
|
|
24406
|
+
eventCategoryId: input.event.eventCategory?.id ?? null,
|
|
24407
|
+
ticketsCount: input.ticketsCount
|
|
24408
|
+
};
|
|
24409
|
+
}
|
|
24410
|
+
var init_registrationDerivations = __esm({
|
|
24411
|
+
"../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts"() {
|
|
24412
|
+
"use strict";
|
|
24413
|
+
init_src();
|
|
24414
|
+
init_pricing();
|
|
24415
|
+
}
|
|
24416
|
+
});
|
|
24417
|
+
|
|
24418
|
+
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
24419
|
+
function toRegistrationEvent(event) {
|
|
24420
|
+
return {
|
|
24421
|
+
...event,
|
|
24422
|
+
pricing: resolveRuntimeEventPricing(event),
|
|
24423
|
+
publicEventId: event.id,
|
|
24424
|
+
registrationOccurrenceId: event.occurrenceId
|
|
24425
|
+
};
|
|
24426
|
+
}
|
|
24427
|
+
function toRegistrationEvents(events) {
|
|
24428
|
+
return events.map(toRegistrationEvent);
|
|
24429
|
+
}
|
|
24430
|
+
var init_registrationEventAdapter = __esm({
|
|
24431
|
+
"../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts"() {
|
|
24432
|
+
"use strict";
|
|
24433
|
+
init_pricing();
|
|
24434
|
+
}
|
|
24435
|
+
});
|
|
24436
|
+
|
|
24316
24437
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
24317
24438
|
import { z as z48 } from "zod";
|
|
24318
24439
|
function buildEventRegistrationDisplay(source) {
|
|
24440
|
+
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
24319
24441
|
return {
|
|
24320
24442
|
kind: "event-registration",
|
|
24321
24443
|
state: "generic-shell",
|
|
24322
24444
|
className: source.className ?? null,
|
|
24323
24445
|
titleText: "Event registration",
|
|
24324
|
-
bodyText:
|
|
24325
|
-
stepLabels
|
|
24446
|
+
bodyText: buildEventRegistrationShellBodyText(stepLabels),
|
|
24447
|
+
stepLabels,
|
|
24326
24448
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
24327
24449
|
};
|
|
24328
24450
|
}
|
|
24451
|
+
function buildEventRegistrationShellStepLabels(source) {
|
|
24452
|
+
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
24453
|
+
if (scopedEvents.length === 0) {
|
|
24454
|
+
return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
24455
|
+
}
|
|
24456
|
+
const preSelectedEvent = findPreSelectedEvent({
|
|
24457
|
+
scopedEvents,
|
|
24458
|
+
occurrenceContext: source.occurrenceContext
|
|
24459
|
+
});
|
|
24460
|
+
const hasPreSelectedContext = Boolean(source.occurrenceContext || preSelectedEvent);
|
|
24461
|
+
const needsPaymentStep = hasPreSelectedContext && preSelectedEvent ? resolveEventRequiresPayment({
|
|
24462
|
+
eligibility: null,
|
|
24463
|
+
selectedTicketType: null,
|
|
24464
|
+
event: preSelectedEvent
|
|
24465
|
+
}) : false;
|
|
24466
|
+
return getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
24467
|
+
}
|
|
24468
|
+
function scopeEventRegistrationEvents(source) {
|
|
24469
|
+
const events = toRegistrationEvents(source.events ?? []);
|
|
24470
|
+
if (source.occurrenceContext?.seriesId) {
|
|
24471
|
+
return events.filter((event) => event.seriesId === source.occurrenceContext?.seriesId);
|
|
24472
|
+
}
|
|
24473
|
+
const entrySlug = source.contentEntry?.slug;
|
|
24474
|
+
const entryContentType = source.contentEntry?.contentTypeSlug;
|
|
24475
|
+
if (entrySlug && entryContentType && isEventContentType(entryContentType)) {
|
|
24476
|
+
return events.filter((event) => event.slug === entrySlug);
|
|
24477
|
+
}
|
|
24478
|
+
return events;
|
|
24479
|
+
}
|
|
24480
|
+
function shellLabelForRegistrationStep(step, events) {
|
|
24481
|
+
switch (step) {
|
|
24482
|
+
case "select-event":
|
|
24483
|
+
return isDateSelection(events) ? "Date" : "Event";
|
|
24484
|
+
case "select-tickets":
|
|
24485
|
+
return "Tickets";
|
|
24486
|
+
case "enter-details":
|
|
24487
|
+
return "Details";
|
|
24488
|
+
case "select-payment":
|
|
24489
|
+
return "Payment";
|
|
24490
|
+
case "error":
|
|
24491
|
+
case "success":
|
|
24492
|
+
case "submitting":
|
|
24493
|
+
case "redirecting":
|
|
24494
|
+
case "verifying-payment":
|
|
24495
|
+
case "verifying-timeout":
|
|
24496
|
+
case "payment-failed":
|
|
24497
|
+
return "Details";
|
|
24498
|
+
}
|
|
24499
|
+
}
|
|
24500
|
+
function isDateSelection(events) {
|
|
24501
|
+
const firstSeriesId = events[0]?.seriesId;
|
|
24502
|
+
return Boolean(
|
|
24503
|
+
events.length > 1 && firstSeriesId && events.every((event) => event.seriesId === firstSeriesId)
|
|
24504
|
+
);
|
|
24505
|
+
}
|
|
24506
|
+
function buildEventRegistrationShellBodyText(stepLabels) {
|
|
24507
|
+
if (stepLabels.includes("Payment")) {
|
|
24508
|
+
return "Preparing tickets, details, and payment options.";
|
|
24509
|
+
}
|
|
24510
|
+
if (stepLabels[0] === "Tickets") {
|
|
24511
|
+
return "Preparing tickets and booking details.";
|
|
24512
|
+
}
|
|
24513
|
+
return "Preparing dates, tickets, and booking details.";
|
|
24514
|
+
}
|
|
24329
24515
|
function normalizeEventRegistrationEventInput(value) {
|
|
24330
24516
|
if (!isRecord6(value)) {
|
|
24331
24517
|
return value;
|
|
@@ -24352,22 +24538,22 @@ function buildEventRegistrationInteractiveIslandProps(props2) {
|
|
|
24352
24538
|
source: props2
|
|
24353
24539
|
});
|
|
24354
24540
|
}
|
|
24355
|
-
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS,
|
|
24541
|
+
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS, EVENT_REGISTRATION_SHELL_STEP_LABELS, contentEntrySchema, eventRegistrationPublicEventSchema, eventRegistrationSourceSchema, eventRegistrationDisplaySchema, eventRegistrationHydrationSchema, eventRegistrationRenderSchema, eventRegistrationIslandMetaCodec, eventRegistrationIslandMetaKeys, eventRegistrationBlockRuntime, eventRegistrationInteractiveIslandPropsCodec;
|
|
24356
24542
|
var init_event_registration_interactive = __esm({
|
|
24357
24543
|
"../blocks/src/system/runtime/nodes/event-registration.interactive.ts"() {
|
|
24358
24544
|
"use strict";
|
|
24359
24545
|
init_schemas2();
|
|
24360
24546
|
init_event_registration_shared();
|
|
24547
|
+
init_events();
|
|
24361
24548
|
init_pricing();
|
|
24362
24549
|
init_islands();
|
|
24363
24550
|
init_runtime();
|
|
24364
24551
|
init_contract_schemas();
|
|
24552
|
+
init_wizardSteps();
|
|
24553
|
+
init_registrationDerivations();
|
|
24554
|
+
init_registrationEventAdapter();
|
|
24365
24555
|
EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
|
|
24366
|
-
[
|
|
24367
|
-
eventRegistrationGenericDateStepLabel,
|
|
24368
|
-
eventRegistrationGenericTicketsStepLabel,
|
|
24369
|
-
eventRegistrationGenericDetailsStepLabel
|
|
24370
|
-
] = EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
24556
|
+
EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
|
|
24371
24557
|
contentEntrySchema = z48.object({
|
|
24372
24558
|
id: z48.string(),
|
|
24373
24559
|
slug: z48.string(),
|
|
@@ -24403,11 +24589,7 @@ var init_event_registration_interactive = __esm({
|
|
|
24403
24589
|
className: z48.string().nullable(),
|
|
24404
24590
|
titleText: z48.string(),
|
|
24405
24591
|
bodyText: z48.string(),
|
|
24406
|
-
stepLabels: z48.
|
|
24407
|
-
z48.literal(eventRegistrationGenericDateStepLabel),
|
|
24408
|
-
z48.literal(eventRegistrationGenericTicketsStepLabel),
|
|
24409
|
-
z48.literal(eventRegistrationGenericDetailsStepLabel)
|
|
24410
|
-
]),
|
|
24592
|
+
stepLabels: z48.array(z48.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
24411
24593
|
summaryButtonText: z48.string()
|
|
24412
24594
|
});
|
|
24413
24595
|
eventRegistrationHydrationSchema = z48.object({
|
|
@@ -31488,6 +31670,15 @@ var init_timetableModel = __esm({
|
|
|
31488
31670
|
}
|
|
31489
31671
|
});
|
|
31490
31672
|
|
|
31673
|
+
// ../blocks/src/system/runtime/nodes/event-registration/constants.ts
|
|
31674
|
+
var EVENT_REGISTRATION_ANCHOR_ID;
|
|
31675
|
+
var init_constants3 = __esm({
|
|
31676
|
+
"../blocks/src/system/runtime/nodes/event-registration/constants.ts"() {
|
|
31677
|
+
"use strict";
|
|
31678
|
+
EVENT_REGISTRATION_ANCHOR_ID = "event-registration";
|
|
31679
|
+
}
|
|
31680
|
+
});
|
|
31681
|
+
|
|
31491
31682
|
// ../blocks/src/system/runtime/shared/components/FeedbackMessage.tsx
|
|
31492
31683
|
import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
31493
31684
|
function joinClasses6(...parts) {
|
|
@@ -39351,10 +39542,6 @@ function getCmsApiUrl2() {
|
|
|
39351
39542
|
if (dashboardUrl) {
|
|
39352
39543
|
return `${dashboardUrl.replace(/\/$/, "")}/api`;
|
|
39353
39544
|
}
|
|
39354
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
39355
|
-
if (legacyApiUrl) {
|
|
39356
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
39357
|
-
}
|
|
39358
39545
|
throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
|
|
39359
39546
|
}
|
|
39360
39547
|
function getChallengeUrl() {
|
|
@@ -43302,11 +43489,11 @@ var init_validation2 = __esm({
|
|
|
43302
43489
|
});
|
|
43303
43490
|
|
|
43304
43491
|
// ../blocks/src/system/runtime/shared/utils/wizardSteps.ts
|
|
43305
|
-
function
|
|
43492
|
+
function getStepNumber2(step, wizardSteps) {
|
|
43306
43493
|
const index = wizardSteps.indexOf(step);
|
|
43307
43494
|
return index >= 0 ? index + 1 : 1;
|
|
43308
43495
|
}
|
|
43309
|
-
var
|
|
43496
|
+
var init_wizardSteps2 = __esm({
|
|
43310
43497
|
"../blocks/src/system/runtime/shared/utils/wizardSteps.ts"() {
|
|
43311
43498
|
"use strict";
|
|
43312
43499
|
}
|
|
@@ -43322,7 +43509,7 @@ var init_utils4 = __esm({
|
|
|
43322
43509
|
init_themePortalRoot();
|
|
43323
43510
|
init_urlParams();
|
|
43324
43511
|
init_validation2();
|
|
43325
|
-
|
|
43512
|
+
init_wizardSteps2();
|
|
43326
43513
|
}
|
|
43327
43514
|
});
|
|
43328
43515
|
|
|
@@ -43968,31 +44155,6 @@ var init_StepIndicator2 = __esm({
|
|
|
43968
44155
|
}
|
|
43969
44156
|
});
|
|
43970
44157
|
|
|
43971
|
-
// ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
43972
|
-
function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
43973
|
-
const baseSteps = hasPreSelectedContext ? ["select-tickets", "enter-details"] : ["select-event", "select-tickets", "enter-details"];
|
|
43974
|
-
if (!needsPaymentStep) {
|
|
43975
|
-
return baseSteps;
|
|
43976
|
-
}
|
|
43977
|
-
return [...baseSteps, "select-payment"];
|
|
43978
|
-
}
|
|
43979
|
-
function getStepNumber2(step, wizardSteps) {
|
|
43980
|
-
const index = wizardSteps.indexOf(step);
|
|
43981
|
-
return index >= 0 ? index + 1 : 1;
|
|
43982
|
-
}
|
|
43983
|
-
var WIZARD_STEPS;
|
|
43984
|
-
var init_wizardSteps2 = __esm({
|
|
43985
|
-
"../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts"() {
|
|
43986
|
-
"use strict";
|
|
43987
|
-
WIZARD_STEPS = [
|
|
43988
|
-
"select-event",
|
|
43989
|
-
"select-tickets",
|
|
43990
|
-
"enter-details",
|
|
43991
|
-
"select-payment"
|
|
43992
|
-
];
|
|
43993
|
-
}
|
|
43994
|
-
});
|
|
43995
|
-
|
|
43996
44158
|
// ../blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.ts
|
|
43997
44159
|
function createInitialRegistrationFlowState(hasPreSelectedContext) {
|
|
43998
44160
|
return {
|
|
@@ -44151,7 +44313,23 @@ var init_registrationStateMachine = __esm({
|
|
|
44151
44313
|
}
|
|
44152
44314
|
});
|
|
44153
44315
|
|
|
44154
|
-
// ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.
|
|
44316
|
+
// ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.ts
|
|
44317
|
+
var DEFAULT_EVENT_REGISTRATION_MAX_TICKETS;
|
|
44318
|
+
var init_event_registration_headless_contract = __esm({
|
|
44319
|
+
"../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.ts"() {
|
|
44320
|
+
"use strict";
|
|
44321
|
+
DEFAULT_EVENT_REGISTRATION_MAX_TICKETS = 5;
|
|
44322
|
+
}
|
|
44323
|
+
});
|
|
44324
|
+
|
|
44325
|
+
// ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.ts
|
|
44326
|
+
var init_event_registration_headless_override = __esm({
|
|
44327
|
+
"../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.ts"() {
|
|
44328
|
+
"use strict";
|
|
44329
|
+
}
|
|
44330
|
+
});
|
|
44331
|
+
|
|
44332
|
+
// ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.ts
|
|
44155
44333
|
function getRegistrableStatuses(isPreview) {
|
|
44156
44334
|
return isPreview ? ["active", "draft"] : ["active"];
|
|
44157
44335
|
}
|
|
@@ -44224,11 +44402,20 @@ function missingPaymentSelection() {
|
|
|
44224
44402
|
message: "Select a payment option to continue."
|
|
44225
44403
|
};
|
|
44226
44404
|
}
|
|
44227
|
-
var
|
|
44405
|
+
var init_event_registration_headless_planning = __esm({
|
|
44406
|
+
"../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.ts"() {
|
|
44407
|
+
"use strict";
|
|
44408
|
+
init_event_registration_headless_contract();
|
|
44409
|
+
}
|
|
44410
|
+
});
|
|
44411
|
+
|
|
44412
|
+
// ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.state.ts
|
|
44228
44413
|
var init_event_registration_headless_state = __esm({
|
|
44229
44414
|
"../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.state.ts"() {
|
|
44230
44415
|
"use strict";
|
|
44231
|
-
|
|
44416
|
+
init_event_registration_headless_contract();
|
|
44417
|
+
init_event_registration_headless_override();
|
|
44418
|
+
init_event_registration_headless_planning();
|
|
44232
44419
|
}
|
|
44233
44420
|
});
|
|
44234
44421
|
|
|
@@ -44775,9 +44962,9 @@ var init_EventSelectionStep = __esm({
|
|
|
44775
44962
|
showCapacity
|
|
44776
44963
|
}) => {
|
|
44777
44964
|
const selectionMode = getEventSelectionMode(events);
|
|
44778
|
-
const
|
|
44965
|
+
const isDateSelection2 = selectionMode === "date";
|
|
44779
44966
|
return /* @__PURE__ */ jsxs61("div", { className: "er-stack", children: [
|
|
44780
|
-
/* @__PURE__ */ jsx89("h3", { className: "er-title", children:
|
|
44967
|
+
/* @__PURE__ */ jsx89("h3", { className: "er-title", children: isDateSelection2 ? "Choose a date" : "Select an event" }),
|
|
44781
44968
|
/* @__PURE__ */ jsx89("div", { className: "er-event-grid", children: events.map((event) => {
|
|
44782
44969
|
const isSelected = selectedEvent?.publicEventId === event.publicEventId;
|
|
44783
44970
|
const isSoldOut = event.capacity !== null && event.availableSpots === 0;
|
|
@@ -44805,9 +44992,9 @@ var init_EventSelectionStep = __esm({
|
|
|
44805
44992
|
className: cardClasses,
|
|
44806
44993
|
children: /* @__PURE__ */ jsxs61("div", { className: "er-event-option", children: [
|
|
44807
44994
|
/* @__PURE__ */ jsxs61("div", { className: "er-event-option-main", children: [
|
|
44808
|
-
/* @__PURE__ */ jsx89("h4", { className: "er-event-title", children:
|
|
44995
|
+
/* @__PURE__ */ jsx89("h4", { className: "er-event-title", children: isDateSelection2 ? formatDate3(event.startsAt, { timeZone }) : event.title }),
|
|
44809
44996
|
/* @__PURE__ */ jsxs61("p", { className: "er-text er-text--muted", children: [
|
|
44810
|
-
|
|
44997
|
+
isDateSelection2 ? formatTime3(event.startsAt, { timeZone }) : `${formatDate3(event.startsAt, { timeZone })} at ${formatTime3(event.startsAt, { timeZone })}`,
|
|
44811
44998
|
showVenue && event.venue && /* @__PURE__ */ jsxs61(Fragment15, { children: [
|
|
44812
44999
|
/* @__PURE__ */ jsx89("span", { "aria-hidden": "true", children: " \xB7 " }),
|
|
44813
45000
|
event.venue.name
|
|
@@ -45584,7 +45771,7 @@ var init_PaymentSelectionStep = __esm({
|
|
|
45584
45771
|
label: "Pay by Card",
|
|
45585
45772
|
detail: formatPrice(totalPrice, eligibility.currency),
|
|
45586
45773
|
selected: selectedMethod === "stripe",
|
|
45587
|
-
onClick: () => onSelectionChange({ method: "stripe" })
|
|
45774
|
+
onClick: () => onSelectionChange({ method: "stripe", collectionOptionKind: "upfront" })
|
|
45588
45775
|
}
|
|
45589
45776
|
),
|
|
45590
45777
|
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx95(
|
|
@@ -45834,7 +46021,7 @@ var init_event_registration = __esm({
|
|
|
45834
46021
|
init_utils5();
|
|
45835
46022
|
init_hooks();
|
|
45836
46023
|
init_sessionStorage();
|
|
45837
|
-
|
|
46024
|
+
init_wizardSteps();
|
|
45838
46025
|
init_EventSelectionStep();
|
|
45839
46026
|
init_TicketSelectionStep();
|
|
45840
46027
|
init_AttendeeDetailsStep();
|
|
@@ -46523,6 +46710,7 @@ function useEventRegistrationSubmit(options) {
|
|
|
46523
46710
|
checkoutType,
|
|
46524
46711
|
productId: bundleProductId,
|
|
46525
46712
|
discountCode: options.discountCode.trim() ? options.discountCode.trim() : void 0,
|
|
46713
|
+
collectionOptionKind: selectionSnapshot.collectionOptionKind,
|
|
46526
46714
|
successUrl,
|
|
46527
46715
|
cancelUrl
|
|
46528
46716
|
});
|
|
@@ -46599,102 +46787,6 @@ var init_useEventRegistrationSubmit = __esm({
|
|
|
46599
46787
|
}
|
|
46600
46788
|
});
|
|
46601
46789
|
|
|
46602
|
-
// ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
46603
|
-
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
46604
|
-
return event.registrationOccurrenceId === occurrenceId || event.publicEventId === occurrenceId;
|
|
46605
|
-
}
|
|
46606
|
-
function findEventByOccurrenceId(events, occurrenceId) {
|
|
46607
|
-
return events.find((event) => eventMatchesOccurrenceId(event, occurrenceId)) ?? null;
|
|
46608
|
-
}
|
|
46609
|
-
function findPreSelectedEvent(input) {
|
|
46610
|
-
const occurrenceContext = input.occurrenceContext;
|
|
46611
|
-
if (!occurrenceContext) {
|
|
46612
|
-
return null;
|
|
46613
|
-
}
|
|
46614
|
-
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
46615
|
-
startsAt: occurrenceContext.startsAt,
|
|
46616
|
-
timeZone: occurrenceContext.timeZone
|
|
46617
|
-
}));
|
|
46618
|
-
return input.scopedEvents.find(
|
|
46619
|
-
(event) => eventMatchesOccurrenceId(event, occurrenceContext.id) || getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
46620
|
-
startsAt: event.startsAt,
|
|
46621
|
-
timeZone: event.timeZone
|
|
46622
|
-
})) === contextDate
|
|
46623
|
-
) ?? null;
|
|
46624
|
-
}
|
|
46625
|
-
function resolveRegistrationTarget(input) {
|
|
46626
|
-
const occurrenceId = input.occurrenceContext?.id ?? input.selectedEvent?.registrationOccurrenceId ?? null;
|
|
46627
|
-
if (!occurrenceId) {
|
|
46628
|
-
return null;
|
|
46629
|
-
}
|
|
46630
|
-
return {
|
|
46631
|
-
occurrenceId,
|
|
46632
|
-
selectedEventId: input.selectedEvent?.publicEventId ?? null
|
|
46633
|
-
};
|
|
46634
|
-
}
|
|
46635
|
-
function resolveEventRequiresPayment(input) {
|
|
46636
|
-
if (input.eligibility) {
|
|
46637
|
-
return input.eligibility.requiresPayment;
|
|
46638
|
-
}
|
|
46639
|
-
if (input.selectedTicketType) {
|
|
46640
|
-
return input.selectedTicketType.priceAmount > 0;
|
|
46641
|
-
}
|
|
46642
|
-
if (!input.event) {
|
|
46643
|
-
return false;
|
|
46644
|
-
}
|
|
46645
|
-
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
|
|
46646
|
-
}
|
|
46647
|
-
function resolveDiscountContext(input) {
|
|
46648
|
-
const selection = input.paymentSelection.method ? input.paymentSelection : null;
|
|
46649
|
-
if (!input.event) {
|
|
46650
|
-
return null;
|
|
46651
|
-
}
|
|
46652
|
-
if (selection?.method === "pass_bundle" && selection.bundlePassId) {
|
|
46653
|
-
return { type: "pass", passId: selection.bundlePassId };
|
|
46654
|
-
}
|
|
46655
|
-
if (selection?.method === "membership_bundle" && selection.bundleMembershipId) {
|
|
46656
|
-
return { type: "membership", membershipId: selection.bundleMembershipId };
|
|
46657
|
-
}
|
|
46658
|
-
if (!input.eventRequiresPayment) {
|
|
46659
|
-
return null;
|
|
46660
|
-
}
|
|
46661
|
-
if (selection?.method && selection.method !== "stripe") {
|
|
46662
|
-
return null;
|
|
46663
|
-
}
|
|
46664
|
-
return {
|
|
46665
|
-
type: "event",
|
|
46666
|
-
eventSeriesId: input.event.seriesId,
|
|
46667
|
-
eventCategoryId: input.event.eventCategory?.id ?? null,
|
|
46668
|
-
ticketsCount: input.ticketsCount
|
|
46669
|
-
};
|
|
46670
|
-
}
|
|
46671
|
-
var init_registrationDerivations = __esm({
|
|
46672
|
-
"../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts"() {
|
|
46673
|
-
"use strict";
|
|
46674
|
-
init_src();
|
|
46675
|
-
init_pricing();
|
|
46676
|
-
}
|
|
46677
|
-
});
|
|
46678
|
-
|
|
46679
|
-
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
46680
|
-
function toRegistrationEvent(event) {
|
|
46681
|
-
return {
|
|
46682
|
-
...event,
|
|
46683
|
-
pricing: resolveRuntimeEventPricing(event),
|
|
46684
|
-
publicEventId: event.id,
|
|
46685
|
-
registrationOccurrenceId: event.occurrenceId
|
|
46686
|
-
};
|
|
46687
|
-
}
|
|
46688
|
-
function toRegistrationEvents(events) {
|
|
46689
|
-
return events.map(toRegistrationEvent);
|
|
46690
|
-
}
|
|
46691
|
-
var init_registrationEventAdapter = __esm({
|
|
46692
|
-
"../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts"() {
|
|
46693
|
-
"use strict";
|
|
46694
|
-
init_pricing();
|
|
46695
|
-
}
|
|
46696
|
-
});
|
|
46697
|
-
|
|
46698
46790
|
// ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
|
|
46699
46791
|
import { useCallback as useCallback8, useEffect as useEffect17, useMemo as useMemo12, useReducer as useReducer6, useState as useState13 } from "react";
|
|
46700
46792
|
function useEventRegistrationWizard(options) {
|
|
@@ -46989,23 +47081,29 @@ function useEventRegistrationWizard(options) {
|
|
|
46989
47081
|
);
|
|
46990
47082
|
const handleDetailsComplete = async () => {
|
|
46991
47083
|
if (ticketTypeSelectionRequired && !hasValidSelectedTicketType) {
|
|
46992
|
-
|
|
47084
|
+
const message = "Select a ticket type to continue.";
|
|
47085
|
+
setErrorMessage(message);
|
|
46993
47086
|
setStep("error");
|
|
46994
|
-
return;
|
|
47087
|
+
return { ok: false, reason: "blocked", message };
|
|
46995
47088
|
}
|
|
46996
47089
|
if (!validateForm()) {
|
|
46997
47090
|
setGuestSectionShake(true);
|
|
46998
|
-
return
|
|
47091
|
+
return {
|
|
47092
|
+
ok: false,
|
|
47093
|
+
reason: "validation-failed",
|
|
47094
|
+
message: "Check the highlighted fields and try again."
|
|
47095
|
+
};
|
|
46999
47096
|
}
|
|
47000
47097
|
if (waitlistClaim.claim === null && eligibility?.isFull && !eligibility.canJoinWaitlist) {
|
|
47001
|
-
|
|
47098
|
+
const message = "This event is sold out.";
|
|
47099
|
+
setErrorMessage(message);
|
|
47002
47100
|
setStep("error");
|
|
47003
|
-
return;
|
|
47101
|
+
return { ok: false, reason: "blocked", message };
|
|
47004
47102
|
}
|
|
47005
47103
|
const shouldCollectPayment = !eligibility?.canJoinWaitlist && requiresPaymentStep({ eventRequiresPayment, paymentSelection });
|
|
47006
47104
|
if (shouldCollectPayment) {
|
|
47007
47105
|
setStep("select-payment");
|
|
47008
|
-
return;
|
|
47106
|
+
return { ok: true, outcome: "payment-step" };
|
|
47009
47107
|
}
|
|
47010
47108
|
const submitPlan = resolveEventRegistrationSubmitPlan({
|
|
47011
47109
|
paymentSelection,
|
|
@@ -47015,14 +47113,22 @@ function useEventRegistrationWizard(options) {
|
|
|
47015
47113
|
if (!submitPlan.ok) {
|
|
47016
47114
|
setErrorMessage(submitPlan.message);
|
|
47017
47115
|
setStep("error");
|
|
47018
|
-
return;
|
|
47116
|
+
return { ok: false, reason: "blocked", message: submitPlan.message };
|
|
47019
47117
|
}
|
|
47020
|
-
await handleSubmit(
|
|
47118
|
+
const submitResult = await handleSubmit(
|
|
47021
47119
|
submitPlan.args.method,
|
|
47022
47120
|
submitPlan.args.passId,
|
|
47023
47121
|
submitPlan.args.membershipId,
|
|
47024
47122
|
submitPlan.args.selection
|
|
47025
47123
|
);
|
|
47124
|
+
if (!submitResult.ok) {
|
|
47125
|
+
return {
|
|
47126
|
+
ok: false,
|
|
47127
|
+
reason: submitResult.reason === "submission-failed" ? "submission-failed" : "blocked",
|
|
47128
|
+
message: submitResult.message
|
|
47129
|
+
};
|
|
47130
|
+
}
|
|
47131
|
+
return { ok: true, outcome: "submitted" };
|
|
47026
47132
|
};
|
|
47027
47133
|
const handlePaymentSelect = async () => {
|
|
47028
47134
|
const submitPlan = resolveEventRegistrationSubmitPlan({
|
|
@@ -47390,7 +47496,7 @@ function EventRegistrationWizard(props2) {
|
|
|
47390
47496
|
return "";
|
|
47391
47497
|
}
|
|
47392
47498
|
});
|
|
47393
|
-
const currentStepNumber =
|
|
47499
|
+
const currentStepNumber = getStepNumber(wizard.step, activeWizardSteps);
|
|
47394
47500
|
const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
47395
47501
|
const summaryEventPricingType = summaryEvent ? publicEventPricingType(summaryEvent.pricing) : "free";
|
|
47396
47502
|
const waitlistClaimRequiresPortalLogin = wizard.waitlistClaim.requiresPortalLogin && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking";
|
|
@@ -47469,7 +47575,7 @@ function EventRegistrationWizard(props2) {
|
|
|
47469
47575
|
wizard.step === "error" && /* @__PURE__ */ jsx105(ErrorStep, { message: wizard.errorMessage, onRetry: wizard.handleRetry })
|
|
47470
47576
|
] }) });
|
|
47471
47577
|
}
|
|
47472
|
-
var
|
|
47578
|
+
var EVENT_PORTAL_AUTH_COPY;
|
|
47473
47579
|
var init_EventRegistrationWizard = __esm({
|
|
47474
47580
|
"../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.tsx"() {
|
|
47475
47581
|
"use strict";
|
|
@@ -47477,7 +47583,7 @@ var init_EventRegistrationWizard = __esm({
|
|
|
47477
47583
|
init_src();
|
|
47478
47584
|
init_client2();
|
|
47479
47585
|
init_StepIndicator2();
|
|
47480
|
-
|
|
47586
|
+
init_wizardSteps();
|
|
47481
47587
|
init_registrationStateMachine();
|
|
47482
47588
|
init_event_registration_headless_state();
|
|
47483
47589
|
init_EventRegistrationWizardContent();
|
|
@@ -47488,8 +47594,8 @@ var init_EventRegistrationWizard = __esm({
|
|
|
47488
47594
|
init_MagicLinkForm();
|
|
47489
47595
|
init_spinner2();
|
|
47490
47596
|
init_buttons();
|
|
47597
|
+
init_constants3();
|
|
47491
47598
|
init_event_registration();
|
|
47492
|
-
EVENT_REGISTRATION_ANCHOR_ID = "event-registration";
|
|
47493
47599
|
EVENT_PORTAL_AUTH_COPY = {
|
|
47494
47600
|
membership: {
|
|
47495
47601
|
title: "Have a pass or membership?",
|
|
@@ -47563,6 +47669,7 @@ var init_event_registration_client = __esm({
|
|
|
47563
47669
|
"use strict";
|
|
47564
47670
|
"use client";
|
|
47565
47671
|
init_EventRegistrationWizard();
|
|
47672
|
+
init_constants3();
|
|
47566
47673
|
init_PastOccurrenceNotice();
|
|
47567
47674
|
EventRegistrationClient = (clientProps) => {
|
|
47568
47675
|
const isPast = isPastOccurrence(clientProps.occurrenceContext?.startsAt);
|
|
@@ -51847,7 +51954,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
51847
51954
|
),
|
|
51848
51955
|
[hasPreSelectedCourse, hasCoursePayment, canUseMembership, bookingMode, isMembershipFastTrack]
|
|
51849
51956
|
);
|
|
51850
|
-
const currentStepNumber =
|
|
51957
|
+
const currentStepNumber = getStepNumber2(step, wizardSteps);
|
|
51851
51958
|
const totalSteps = wizardSteps.length;
|
|
51852
51959
|
const stepLabels = getStepLabels(wizardSteps);
|
|
51853
51960
|
const canShowPortalAuthSidebarOnCurrentStep = step !== "success" && step !== "waitlist" && step !== "error";
|
|
@@ -77708,6 +77815,7 @@ var EventListingSSR = (props2) => {
|
|
|
77708
77815
|
|
|
77709
77816
|
// ../blocks/src/system/runtime/nodes/event-registration.server.tsx
|
|
77710
77817
|
init_event_registration_interactive();
|
|
77818
|
+
init_constants3();
|
|
77711
77819
|
import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
77712
77820
|
function cx(...classes) {
|
|
77713
77821
|
return classes.filter((className) => Boolean(className)).join(" ");
|
|
@@ -77775,42 +77883,51 @@ function EventRegistrationSSR({
|
|
|
77775
77883
|
function EventRegistrationShell({
|
|
77776
77884
|
display
|
|
77777
77885
|
}) {
|
|
77778
|
-
return /* @__PURE__ */ jsx48(
|
|
77779
|
-
|
|
77780
|
-
|
|
77781
|
-
|
|
77782
|
-
|
|
77783
|
-
|
|
77784
|
-
|
|
77785
|
-
|
|
77786
|
-
|
|
77787
|
-
|
|
77788
|
-
|
|
77789
|
-
|
|
77790
|
-
|
|
77791
|
-
|
|
77792
|
-
|
|
77886
|
+
return /* @__PURE__ */ jsx48(
|
|
77887
|
+
"div",
|
|
77888
|
+
{
|
|
77889
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
77890
|
+
className: "er-container er-registration-shell",
|
|
77891
|
+
"aria-busy": "true",
|
|
77892
|
+
role: "status",
|
|
77893
|
+
children: /* @__PURE__ */ jsxs34("div", { className: "er-payment-layout er-payment-layout--no-sidebar", children: [
|
|
77894
|
+
/* @__PURE__ */ jsxs34("div", { className: "er-payment-layout-main", children: [
|
|
77895
|
+
/* @__PURE__ */ jsx48("div", { className: "er-steps-nav er-registration-shell__steps", "aria-hidden": "true", children: /* @__PURE__ */ jsx48("ol", { className: "er-steps", children: display.stepLabels.map((label, index) => {
|
|
77896
|
+
const isActive = index === 0;
|
|
77897
|
+
return /* @__PURE__ */ jsxs34("li", { className: "er-step", children: [
|
|
77898
|
+
/* @__PURE__ */ jsx48("span", { className: cx("er-step-circle", isActive && "er-step-circle--active"), children: index + 1 }),
|
|
77899
|
+
/* @__PURE__ */ jsx48("span", { className: cx("er-step-label", isActive && "er-step-label--active"), children: label }),
|
|
77900
|
+
index < display.stepLabels.length - 1 ? /* @__PURE__ */ jsx48("span", { className: "er-step-connector" }) : null
|
|
77901
|
+
] }, label);
|
|
77902
|
+
}) }) }),
|
|
77903
|
+
/* @__PURE__ */ jsxs34("div", { className: "er-stack", children: [
|
|
77904
|
+
/* @__PURE__ */ jsxs34("div", { children: [
|
|
77905
|
+
/* @__PURE__ */ jsx48("p", { className: "er-registration-shell__eyebrow", children: "Registration" }),
|
|
77906
|
+
/* @__PURE__ */ jsx48("h3", { className: "er-title er-registration-shell__title", children: display.titleText }),
|
|
77907
|
+
/* @__PURE__ */ jsx48("p", { className: "er-text er-text--muted er-registration-shell__copy", children: display.bodyText })
|
|
77908
|
+
] }),
|
|
77909
|
+
/* @__PURE__ */ jsxs34("div", { className: "er-event-grid er-registration-shell__cards", "aria-hidden": "true", children: [
|
|
77910
|
+
/* @__PURE__ */ jsxs34("div", { className: "er-event-card er-registration-shell__card", children: [
|
|
77911
|
+
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--lg" }),
|
|
77912
|
+
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--sm" })
|
|
77913
|
+
] }),
|
|
77914
|
+
/* @__PURE__ */ jsxs34("div", { className: "er-event-card er-registration-shell__card", children: [
|
|
77915
|
+
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--md" }),
|
|
77916
|
+
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--xs" })
|
|
77917
|
+
] })
|
|
77918
|
+
] })
|
|
77919
|
+
] })
|
|
77793
77920
|
] }),
|
|
77794
|
-
/* @__PURE__ */ jsxs34("div", { className: "er-
|
|
77795
|
-
/* @__PURE__ */ jsxs34("div", { className: "er-
|
|
77796
|
-
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--lg" }),
|
|
77797
|
-
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--sm" })
|
|
77798
|
-
] }),
|
|
77799
|
-
/* @__PURE__ */ jsxs34("div", { className: "er-event-card er-registration-shell__card", children: [
|
|
77921
|
+
/* @__PURE__ */ jsx48("div", { className: "er-payment-layout-footer", children: /* @__PURE__ */ jsxs34("div", { className: "er-summary-bar er-registration-shell__summary", "aria-hidden": "true", children: [
|
|
77922
|
+
/* @__PURE__ */ jsxs34("div", { className: "er-summary-bar-info", children: [
|
|
77800
77923
|
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--md" }),
|
|
77801
77924
|
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--xs" })
|
|
77802
|
-
] })
|
|
77803
|
-
|
|
77925
|
+
] }),
|
|
77926
|
+
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__button-placeholder", children: display.summaryButtonText })
|
|
77927
|
+
] }) })
|
|
77804
77928
|
] })
|
|
77805
|
-
|
|
77806
|
-
|
|
77807
|
-
/* @__PURE__ */ jsxs34("div", { className: "er-summary-bar-info", children: [
|
|
77808
|
-
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--md" }),
|
|
77809
|
-
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__line er-registration-shell__line--xs" })
|
|
77810
|
-
] }),
|
|
77811
|
-
/* @__PURE__ */ jsx48("div", { className: "er-registration-shell__button-placeholder", children: display.summaryButtonText })
|
|
77812
|
-
] }) })
|
|
77813
|
-
] }) });
|
|
77929
|
+
}
|
|
77930
|
+
);
|
|
77814
77931
|
}
|
|
77815
77932
|
var event_registration_server_default = EventRegistrationSSR;
|
|
77816
77933
|
|
|
@@ -95444,17 +95561,21 @@ function looksLikeLocalAuthority(authority) {
|
|
|
95444
95561
|
const normalized = authority.toLowerCase();
|
|
95445
95562
|
return normalized === "localhost" || normalized.startsWith("localhost:") || normalized.startsWith("127.") || normalized.startsWith("0.0.0.0") || normalized.includes(".localhost") || normalized.endsWith(".local") || normalized.endsWith(".test");
|
|
95446
95563
|
}
|
|
95447
|
-
function
|
|
95564
|
+
function normalizeDashboardOrigin(input) {
|
|
95448
95565
|
const trimmed = input.trim();
|
|
95449
95566
|
if (!trimmed) return "";
|
|
95450
95567
|
const withoutTrailingSlash = trimmed.replace(/\/+$/, "");
|
|
95451
95568
|
const withoutApiSuffix = withoutTrailingSlash.replace(/\/api\/?$/, "");
|
|
95452
95569
|
if (/^https?:\/\//i.test(withoutApiSuffix)) {
|
|
95453
|
-
return withoutApiSuffix;
|
|
95570
|
+
return new URL(withoutApiSuffix).origin;
|
|
95454
95571
|
}
|
|
95455
95572
|
const authority = withoutApiSuffix.replace(/^\/+/, "");
|
|
95456
95573
|
const protocol = looksLikeLocalAuthority(authority) ? "http" : "https";
|
|
95457
|
-
return `${protocol}://${authority}
|
|
95574
|
+
return new URL(`${protocol}://${authority}`).origin;
|
|
95575
|
+
}
|
|
95576
|
+
function deriveCmsApiUrlFromDashboardUrl(input) {
|
|
95577
|
+
const origin = normalizeDashboardOrigin(input);
|
|
95578
|
+
return origin ? `${origin}/api` : "";
|
|
95458
95579
|
}
|
|
95459
95580
|
function getCmsApiUrl() {
|
|
95460
95581
|
if (typeof window !== "undefined") {
|
|
@@ -95466,15 +95587,10 @@ function getCmsApiUrl() {
|
|
|
95466
95587
|
}
|
|
95467
95588
|
const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
|
|
95468
95589
|
if (dashboardUrl) {
|
|
95469
|
-
|
|
95470
|
-
return `${base}/api`;
|
|
95471
|
-
}
|
|
95472
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
95473
|
-
if (legacyApiUrl) {
|
|
95474
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
95590
|
+
return deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
|
|
95475
95591
|
}
|
|
95476
95592
|
throw new Error(
|
|
95477
|
-
"NEXT_PUBLIC_DASHBOARD_URL is not configured. Set
|
|
95593
|
+
"CMS_API_URL or NEXT_PUBLIC_DASHBOARD_URL is not configured. Set NEXT_PUBLIC_DASHBOARD_URL to your dashboard URL (e.g., http://localhost:4000)"
|
|
95478
95594
|
);
|
|
95479
95595
|
}
|
|
95480
95596
|
function resolveApiBaseUrl() {
|
|
@@ -97877,7 +97993,7 @@ var SimpleCache = class {
|
|
|
97877
97993
|
};
|
|
97878
97994
|
|
|
97879
97995
|
// src/version.ts
|
|
97880
|
-
var SDK_VERSION = "0.84.
|
|
97996
|
+
var SDK_VERSION = "0.84.2";
|
|
97881
97997
|
|
|
97882
97998
|
// src/client/error.ts
|
|
97883
97999
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|