@riverbankcms/sdk 0.84.0 → 0.84.1
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-X7RLMEI6.mjs} +2 -2
- package/dist/{PreviewEditorUI-I4BQUU6K.mjs → PreviewEditorUI-CT67N4O3.mjs} +2 -2
- package/dist/SdkPreviewModeRuntime-EIMQ3S2V.mjs +8 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -4
- 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/useEventRegistrationWizard.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +8 -6
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +6 -4
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-MSHZO4SL.mjs → chunk-O62NDCTI.mjs} +268 -186
- package/dist/{chunk-HFMGVJCE.mjs → chunk-QRKJDWT7.mjs} +5 -5
- package/dist/{chunk-6X2OVO3S.mjs → chunk-RCTJAZSK.mjs} +1 -1
- package/dist/{chunk-5E33VO6J.mjs → chunk-X5ZCSU6F.mjs} +1 -1
- package/dist/cli/index.mjs +323 -35
- 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-DYXT6YB6.mjs} +3 -3
- package/dist/client/bookings.mjs +155 -134
- 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-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-RDJFCPY3.mjs → chunk-UHDWIXVR.mjs} +31 -115
- 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 +337 -217
- package/dist/client/{courseRegistration-QTUDC35T.mjs → courseRegistration-YBOGURTA.mjs} +3 -3
- package/dist/client/{eventCalendar-Q7NS4XLD.mjs → eventCalendar-K4QJVCMD.mjs} +5 -5
- package/dist/client/{eventCombined-QAO7VUO5.mjs → eventCombined-MTXGMTCZ.mjs} +5 -5
- package/dist/client/{eventDetails-WTNNU6Q3.mjs → eventDetails-3PC4NL3U.mjs} +5 -5
- package/dist/client/{eventListing-5TA2ELDT.mjs → eventListing-TFJET6DN.mjs} +5 -5
- package/dist/client/{eventRegistration-M6USZGRF.mjs → eventRegistration-QGPBGJTW.mjs} +5 -5
- package/dist/client/{form-DGVGXLMH.mjs → form-MDKR4FNB.mjs} +1 -1
- 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-ZR5UDGBT.mjs} +1 -1
- 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 +310 -190
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +310 -190
- package/dist/client/{shop-UIFX7XRK.mjs → shop-WXSYV5QO.mjs} +5 -5
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-ZENAOYMN.mjs → sdk-runtime-7HJYPRWQ.mjs} +4 -4
- 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 +1 -1
- package/dist/server/next.mjs +189 -62
- 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 +322 -42
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-MCKMVDTK.mjs +0 -8
|
@@ -1,303 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type { EligibilityData, FormData, Guest, GuestErrors, OccurrenceContext, PaymentSelection, PaymentStepState, PublicEvent, RegistrationEvent, RegistrationResult, RegistrationStep } from './types';
|
|
5
|
-
import type { SelectableEventTicketType } from './utils';
|
|
6
|
-
import type { PortalAuthState, PortalProfile } from './hooks';
|
|
7
|
-
import type { UseWaitlistClaimResult } from '../../shared/useWaitlistClaim';
|
|
8
|
-
import type { UseEventRegistrationWizardResult } from './useEventRegistrationWizard';
|
|
9
|
-
import type { EventRegistrationSubmitOptions, EventRegistrationSubmitResult } from './useEventRegistrationSubmit';
|
|
10
|
-
export declare const DEFAULT_EVENT_REGISTRATION_MAX_TICKETS = 5;
|
|
11
|
-
export type EventRegistrationLoadState<T> = Readonly<{
|
|
12
|
-
tag: 'idle';
|
|
13
|
-
value: T | null;
|
|
14
|
-
}> | Readonly<{
|
|
15
|
-
tag: 'loading';
|
|
16
|
-
value: T | null;
|
|
17
|
-
}> | Readonly<{
|
|
18
|
-
tag: 'loaded';
|
|
19
|
-
value: T;
|
|
20
|
-
}>;
|
|
21
|
-
export type EventRegistrationSubmitArgs = Readonly<{
|
|
22
|
-
method: PaymentMethod;
|
|
23
|
-
passId?: string;
|
|
24
|
-
membershipId?: string;
|
|
25
|
-
selection?: PaymentSelection;
|
|
26
|
-
}>;
|
|
27
|
-
export type EventRegistrationSubmitPlan = Readonly<{
|
|
28
|
-
ok: true;
|
|
29
|
-
args: EventRegistrationSubmitArgs;
|
|
30
|
-
}> | Readonly<{
|
|
31
|
-
ok: false;
|
|
32
|
-
reason: 'payment-selection-required';
|
|
33
|
-
message: string;
|
|
34
|
-
}>;
|
|
35
|
-
export type EventRegistrationFlowStatus = Readonly<{
|
|
36
|
-
tag: 'ready';
|
|
37
|
-
}> | Readonly<{
|
|
38
|
-
tag: 'submitting';
|
|
39
|
-
}> | Readonly<{
|
|
40
|
-
tag: 'redirecting';
|
|
41
|
-
}> | Readonly<{
|
|
42
|
-
tag: 'verifying-payment';
|
|
43
|
-
}> | Readonly<{
|
|
44
|
-
tag: 'verifying-timeout';
|
|
45
|
-
}> | Readonly<{
|
|
46
|
-
tag: 'payment-failed';
|
|
47
|
-
message: string;
|
|
48
|
-
}> | Readonly<{
|
|
49
|
-
tag: 'success';
|
|
50
|
-
result: RegistrationResult;
|
|
51
|
-
}> | Readonly<{
|
|
52
|
-
tag: 'error';
|
|
53
|
-
message: string;
|
|
54
|
-
}>;
|
|
55
|
-
export type EventRegistrationFlowView = Readonly<{
|
|
56
|
-
kind: 'empty';
|
|
57
|
-
message: string;
|
|
58
|
-
}> | Readonly<{
|
|
59
|
-
kind: 'unavailable';
|
|
60
|
-
message: string;
|
|
61
|
-
}> | Readonly<{
|
|
62
|
-
kind: 'form';
|
|
63
|
-
}> | Readonly<{
|
|
64
|
-
kind: 'verifying';
|
|
65
|
-
message: string;
|
|
66
|
-
}> | Readonly<{
|
|
67
|
-
kind: 'success';
|
|
68
|
-
result: RegistrationResult;
|
|
69
|
-
}> | Readonly<{
|
|
70
|
-
kind: 'error';
|
|
71
|
-
message: string;
|
|
72
|
-
}>;
|
|
73
|
-
export type EventRegistrationFlowStepId = 'select-event' | 'select-tickets' | 'enter-details' | 'select-payment';
|
|
74
|
-
export type EventRegistrationFlowStepState = 'complete' | 'active' | 'available' | 'blocked';
|
|
75
|
-
export type EventRegistrationFlowStep = Readonly<{
|
|
76
|
-
id: EventRegistrationFlowStepId;
|
|
77
|
-
label: string;
|
|
78
|
-
state: EventRegistrationFlowStepState;
|
|
79
|
-
index: number;
|
|
80
|
-
canEnter: boolean;
|
|
81
|
-
canLeave: boolean;
|
|
82
|
-
}>;
|
|
83
|
-
export type EventRegistrationFlowActionResult = Readonly<{
|
|
84
|
-
ok: true;
|
|
85
|
-
}> | Readonly<{
|
|
86
|
-
ok: false;
|
|
87
|
-
reason: 'blocked' | 'validation-failed' | 'submission-failed';
|
|
88
|
-
message: string;
|
|
89
|
-
}>;
|
|
90
|
-
export type EventRegistrationEventsModel = Readonly<{
|
|
91
|
-
items: readonly PublicEvent[];
|
|
92
|
-
scoped: readonly RegistrationEvent[];
|
|
93
|
-
selected: RegistrationEvent | null;
|
|
94
|
-
preSelected: RegistrationEvent | null;
|
|
95
|
-
hasPreSelectedContext: boolean;
|
|
96
|
-
target: UseEventRegistrationWizardResult['registrationTarget'];
|
|
97
|
-
occurrenceContext: OccurrenceContext | null | undefined;
|
|
98
|
-
contentEntry: EventRegistrationContentEntry | null | undefined;
|
|
99
|
-
}>;
|
|
100
|
-
export type EventRegistrationTicketsModel = Readonly<{
|
|
101
|
-
count: number;
|
|
102
|
-
max: number;
|
|
103
|
-
selectedTicketTypeId: string | null;
|
|
104
|
-
selectedTicketType: SelectableEventTicketType | null;
|
|
105
|
-
visibleTicketTypes: readonly SelectableEventTicketType[];
|
|
106
|
-
selectionRequired: boolean;
|
|
107
|
-
hasValidSelection: boolean;
|
|
108
|
-
eventRequiresPayment: boolean;
|
|
109
|
-
selectedAttendanceMode: 'in_person' | 'online' | null;
|
|
110
|
-
}>;
|
|
111
|
-
export type EventRegistrationAttendeeModel = Readonly<{
|
|
112
|
-
values: FormData;
|
|
113
|
-
errors: Partial<Record<keyof FormData, string>>;
|
|
114
|
-
}>;
|
|
115
|
-
export type EventRegistrationGuestsModel = Readonly<{
|
|
116
|
-
required: boolean;
|
|
117
|
-
items: readonly Guest[];
|
|
118
|
-
errors: GuestErrors;
|
|
119
|
-
shake: boolean;
|
|
120
|
-
}>;
|
|
121
|
-
export type EventRegistrationPaymentSelection = Readonly<{
|
|
122
|
-
method: 'none';
|
|
123
|
-
}> | Readonly<{
|
|
124
|
-
method: 'free';
|
|
125
|
-
}> | Readonly<{
|
|
126
|
-
method: 'stripe';
|
|
127
|
-
}> | Readonly<{
|
|
128
|
-
method: 'pass';
|
|
129
|
-
passId: string;
|
|
130
|
-
productName?: string;
|
|
131
|
-
}> | Readonly<{
|
|
132
|
-
method: 'membership';
|
|
133
|
-
membershipId: string;
|
|
134
|
-
productName?: string;
|
|
135
|
-
}> | Readonly<{
|
|
136
|
-
method: 'pass_bundle';
|
|
137
|
-
passId: string;
|
|
138
|
-
productName?: string;
|
|
139
|
-
}> | Readonly<{
|
|
140
|
-
method: 'membership_bundle';
|
|
141
|
-
membershipId: string;
|
|
142
|
-
productName?: string;
|
|
143
|
-
}>;
|
|
144
|
-
export type EventRegistrationPaymentModel = Readonly<{
|
|
145
|
-
kind: 'hidden';
|
|
146
|
-
selection: EventRegistrationPaymentSelection;
|
|
147
|
-
stepState: PaymentStepState;
|
|
148
|
-
}> | Readonly<{
|
|
149
|
-
kind: 'loading' | 'error' | 'not-eligible' | 'ready';
|
|
150
|
-
selection: EventRegistrationPaymentSelection;
|
|
151
|
-
stepState: PaymentStepState;
|
|
152
|
-
eligibility: EligibilityData | null;
|
|
153
|
-
eligibilityError: string | null | undefined;
|
|
154
|
-
}>;
|
|
155
|
-
export type EventRegistrationDiscountModel = Readonly<{
|
|
156
|
-
code: string;
|
|
157
|
-
isOpen: boolean;
|
|
158
|
-
available: boolean;
|
|
159
|
-
manualCodeEntryAllowed: boolean;
|
|
160
|
-
loading: boolean;
|
|
161
|
-
autoAppliedDiscount: UseEventRegistrationWizardResult['autoAppliedDiscount'];
|
|
162
|
-
}>;
|
|
163
|
-
export type EventRegistrationPortalAuthModel = Readonly<{
|
|
164
|
-
state: PortalAuthState;
|
|
165
|
-
profile: PortalProfile | null;
|
|
166
|
-
isAuthenticated: boolean;
|
|
167
|
-
showMagicLinkModal: boolean;
|
|
168
|
-
}>;
|
|
169
|
-
export type EventRegistrationSpamProtectionModel = Readonly<{
|
|
170
|
-
enabled: false;
|
|
171
|
-
}> | Readonly<{
|
|
172
|
-
enabled: true;
|
|
173
|
-
provider: 'altcha';
|
|
174
|
-
challenge: {
|
|
175
|
-
url: string;
|
|
176
|
-
auto: 'onfocus';
|
|
177
|
-
};
|
|
178
|
-
solution: string | null;
|
|
179
|
-
}>;
|
|
180
|
-
export type EventRegistrationTerminalModel = Readonly<{
|
|
181
|
-
result: RegistrationResult | null;
|
|
182
|
-
errorMessage: string;
|
|
183
|
-
verification: UseEventRegistrationWizardResult['verification'];
|
|
184
|
-
}>;
|
|
185
|
-
export type EventRegistrationFlowActions = Readonly<{
|
|
186
|
-
selectEvent: (event: RegistrationEvent) => void;
|
|
187
|
-
selectAttendanceMode: (mode: 'in_person' | 'online' | null) => void;
|
|
188
|
-
selectTicketType: (ticketTypeId: string | null) => void;
|
|
189
|
-
setTicketsCount: (count: number) => void;
|
|
190
|
-
updateAttendee: (values: FormData) => void;
|
|
191
|
-
updateGuests: (guests: Guest[]) => void;
|
|
192
|
-
selectPayment: (selection: EventRegistrationPaymentSelection) => void;
|
|
193
|
-
setDiscountCode: (code: string) => void;
|
|
194
|
-
setDiscountOpen: (isOpen: boolean) => void;
|
|
195
|
-
setAltchaSolution: (solution: string | null) => void;
|
|
196
|
-
requestLogin: () => void;
|
|
197
|
-
logout: () => void;
|
|
198
|
-
next: () => Promise<EventRegistrationFlowActionResult>;
|
|
199
|
-
back: () => void;
|
|
200
|
-
submit: (options?: EventRegistrationSubmitOptions) => Promise<EventRegistrationSubmitResult>;
|
|
201
|
-
retry: () => void;
|
|
202
|
-
}>;
|
|
203
|
-
export type HeadlessEventRegistrationFlow = Readonly<{
|
|
204
|
-
status: EventRegistrationFlowStatus;
|
|
205
|
-
view: EventRegistrationFlowView;
|
|
206
|
-
steps: readonly EventRegistrationFlowStep[];
|
|
207
|
-
currentStep: EventRegistrationFlowStep | null;
|
|
208
|
-
events: EventRegistrationEventsModel;
|
|
209
|
-
tickets: EventRegistrationTicketsModel;
|
|
210
|
-
attendee: EventRegistrationAttendeeModel;
|
|
211
|
-
guests: EventRegistrationGuestsModel;
|
|
212
|
-
payment: EventRegistrationPaymentModel;
|
|
213
|
-
discount: EventRegistrationDiscountModel;
|
|
214
|
-
portalAuth: EventRegistrationPortalAuthModel;
|
|
215
|
-
existingRegistration: Readonly<{
|
|
216
|
-
state: EventRegistrationLoadState<UseEventRegistrationWizardResult['existingRegistration']>;
|
|
217
|
-
registration: UseEventRegistrationWizardResult['existingRegistration'];
|
|
218
|
-
}>;
|
|
219
|
-
waitlistClaim: UseWaitlistClaimResult;
|
|
220
|
-
spamProtection: EventRegistrationSpamProtectionModel;
|
|
221
|
-
terminal: EventRegistrationTerminalModel;
|
|
222
|
-
actions: EventRegistrationFlowActions;
|
|
223
|
-
}>;
|
|
224
|
-
export type EventRegistrationOverrideData = Readonly<{
|
|
225
|
-
events?: readonly PublicEvent[] | null;
|
|
226
|
-
}>;
|
|
227
|
-
export type EventRegistrationOverridePropsLike = Readonly<{
|
|
228
|
-
content?: Partial<{
|
|
229
|
-
maxTickets: string | null;
|
|
230
|
-
showVenue: boolean | null;
|
|
231
|
-
showCapacity: boolean | null;
|
|
232
|
-
successMessage: string | null;
|
|
233
|
-
waitlistMessage: string | null;
|
|
234
|
-
buttonVariant: 'primary' | 'secondary' | 'outline' | null;
|
|
235
|
-
buttonText: string | null;
|
|
236
|
-
spamProtectionEnabled: boolean | null;
|
|
237
|
-
supportEmail: string | null;
|
|
238
|
-
}> | null;
|
|
239
|
-
data?: EventRegistrationOverrideData | Record<string, unknown> | null;
|
|
240
|
-
siteId?: string;
|
|
241
|
-
apiBaseUrl?: string;
|
|
242
|
-
portalToken?: string | null;
|
|
243
|
-
previewToken?: string | null;
|
|
244
|
-
stage?: 'preview' | 'published';
|
|
245
|
-
occurrenceContext?: OccurrenceContext | null;
|
|
246
|
-
contentEntry?: Record<string, unknown> | null;
|
|
247
|
-
blockId?: string | null;
|
|
248
|
-
}>;
|
|
249
|
-
export type EventRegistrationOverrideInput = Readonly<{
|
|
250
|
-
siteId: string;
|
|
251
|
-
apiBaseUrl: string;
|
|
252
|
-
portalToken: string | null;
|
|
253
|
-
previewToken: string | null;
|
|
254
|
-
stage?: 'preview' | 'published';
|
|
255
|
-
occurrenceContext?: OccurrenceContext | null;
|
|
256
|
-
contentEntry?: EventRegistrationContentEntry | null;
|
|
257
|
-
events: readonly PublicEvent[];
|
|
258
|
-
maxTickets?: string;
|
|
259
|
-
showVenue?: boolean;
|
|
260
|
-
showCapacity?: boolean;
|
|
261
|
-
successMessage?: string;
|
|
262
|
-
waitlistMessage?: string;
|
|
263
|
-
buttonText?: string | null;
|
|
264
|
-
buttonVariant?: 'primary' | 'secondary' | 'outline';
|
|
265
|
-
spamProtectionEnabled?: boolean;
|
|
266
|
-
supportEmail?: string;
|
|
267
|
-
blockId?: string | null;
|
|
268
|
-
}>;
|
|
269
|
-
export type EventRegistrationOverrideInputResult = Readonly<{
|
|
270
|
-
ok: true;
|
|
271
|
-
value: EventRegistrationOverrideInput;
|
|
272
|
-
}> | Readonly<{
|
|
273
|
-
ok: false;
|
|
274
|
-
reason: 'missing-site-id' | 'missing-api-base-url';
|
|
275
|
-
message: string;
|
|
276
|
-
}>;
|
|
277
|
-
export declare function createEventRegistrationBlockApiConfig(input: Readonly<{
|
|
278
|
-
siteId: string;
|
|
279
|
-
apiBaseUrl: string;
|
|
280
|
-
portalToken?: string | null;
|
|
281
|
-
previewToken?: string | null;
|
|
282
|
-
stage?: 'preview' | 'published';
|
|
283
|
-
}>): BlockApiConfig;
|
|
284
|
-
export declare function getRegistrableStatuses(isPreview: boolean | undefined): readonly PublicEvent['status'][];
|
|
285
|
-
export declare function normalizeEventRegistrationMaxTickets(value: string | number | undefined): number;
|
|
286
|
-
export declare function getEventRegistrationOverrideInput(props: EventRegistrationOverridePropsLike): EventRegistrationOverrideInputResult;
|
|
287
|
-
export declare function toHeadlessPaymentSelection(selection: PaymentSelection): EventRegistrationPaymentSelection;
|
|
288
|
-
export declare function toInternalPaymentSelection(selection: EventRegistrationPaymentSelection): PaymentSelection;
|
|
289
|
-
export declare function resolveEventRegistrationSubmitPlan(input: Readonly<{
|
|
290
|
-
paymentSelection: PaymentSelection;
|
|
291
|
-
eventRequiresPayment: boolean;
|
|
292
|
-
canJoinWaitlist?: boolean | null;
|
|
293
|
-
}>): EventRegistrationSubmitPlan;
|
|
294
|
-
export declare function resolveHeadlessEventRegistrationStatus(wizard: Pick<UseEventRegistrationWizardResult, 'step' | 'registrationResult' | 'errorMessage'>): EventRegistrationFlowStatus;
|
|
295
|
-
export declare function resolveHeadlessEventRegistrationView(wizard: Readonly<Pick<UseEventRegistrationWizardResult, 'step' | 'scopedEvents' | 'occurrenceContext' | 'registrationResult' | 'errorMessage'> & {
|
|
296
|
-
api: Pick<UseEventRegistrationWizardResult['api'], 'config'>;
|
|
297
|
-
}>): EventRegistrationFlowView;
|
|
298
|
-
export declare function deriveEventRegistrationSteps(input: Readonly<{
|
|
299
|
-
step: RegistrationStep;
|
|
300
|
-
hasPreSelectedContext: boolean;
|
|
301
|
-
eventRequiresPayment: boolean;
|
|
302
|
-
paymentSelection: PaymentSelection;
|
|
303
|
-
}>): readonly EventRegistrationFlowStep[];
|
|
1
|
+
export * from './event-registration.headless.contract';
|
|
2
|
+
export * from './event-registration.headless.override';
|
|
3
|
+
export * from './event-registration.headless.planning';
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { DiscountContext } from '../../api/types';
|
|
2
2
|
import type { EventRegistrationClientProps, FormData, Guest, GuestErrors, PaymentSelection, PaymentStepState, PublicEvent, RegistrationEvent, RegistrationResult, RegistrationStep } from './types';
|
|
3
|
+
export type EventRegistrationDetailsCompleteResult = Readonly<{
|
|
4
|
+
ok: true;
|
|
5
|
+
outcome: 'payment-step' | 'submitted';
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
ok: false;
|
|
8
|
+
reason: 'blocked' | 'validation-failed' | 'submission-failed';
|
|
9
|
+
message: string;
|
|
10
|
+
}>;
|
|
3
11
|
export declare function useEventRegistrationWizard(options: {
|
|
4
12
|
anchorId: string;
|
|
5
13
|
occurrenceContext: EventRegistrationClientProps['occurrenceContext'];
|
|
@@ -90,7 +98,7 @@ export declare function useEventRegistrationWizard(options: {
|
|
|
90
98
|
discountContext: DiscountContext | null;
|
|
91
99
|
shouldShowDiscountToggle: boolean;
|
|
92
100
|
verification: import("../../hooks/usePaymentVerification").PaymentVerificationResult;
|
|
93
|
-
handleDetailsComplete: () => Promise<
|
|
101
|
+
handleDetailsComplete: () => Promise<EventRegistrationDetailsCompleteResult>;
|
|
94
102
|
handlePaymentSelect: () => Promise<void>;
|
|
95
103
|
handleUseCardInsteadOfPass: () => void;
|
|
96
104
|
handleBookForSomeoneElse: () => void;
|
|
@@ -8,7 +8,9 @@ export type EventRegistrationContentEntry = Readonly<{
|
|
|
8
8
|
contentTypeSlug: string;
|
|
9
9
|
}>;
|
|
10
10
|
export declare const EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS: readonly ["Date", "Tickets", "Details"];
|
|
11
|
+
declare const EVENT_REGISTRATION_SHELL_STEP_LABELS: readonly ["Event", "Date", "Tickets", "Details", "Payment"];
|
|
11
12
|
export type EventRegistrationGenericShellStepLabels = typeof EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
13
|
+
type EventRegistrationShellStepLabel = typeof EVENT_REGISTRATION_SHELL_STEP_LABELS[number];
|
|
12
14
|
export type EventRegistrationSourceProps = Readonly<{
|
|
13
15
|
siteId?: string;
|
|
14
16
|
apiBaseUrl?: string;
|
|
@@ -35,7 +37,7 @@ export type EventRegistrationDisplay = Readonly<{
|
|
|
35
37
|
className: string | null;
|
|
36
38
|
titleText: string;
|
|
37
39
|
bodyText: string;
|
|
38
|
-
stepLabels:
|
|
40
|
+
stepLabels: readonly EventRegistrationShellStepLabel[];
|
|
39
41
|
summaryButtonText: string;
|
|
40
42
|
}>;
|
|
41
43
|
export type EventRegistrationHydration = Readonly<Omit<InternalEventRegistrationClientProps, 'siteId' | 'stage' | 'registrationEndpoint' | 'eligibilityEndpoint' | 'checkoutEndpoint' | 'buttonText' | 'className'>>;
|
|
@@ -80,7 +82,7 @@ export declare const eventRegistrationBlockRuntime: Readonly<{
|
|
|
80
82
|
className: string | null;
|
|
81
83
|
titleText: string;
|
|
82
84
|
bodyText: string;
|
|
83
|
-
stepLabels:
|
|
85
|
+
stepLabels: readonly EventRegistrationShellStepLabel[];
|
|
84
86
|
summaryButtonText: string;
|
|
85
87
|
}>;
|
|
86
88
|
hydration: Readonly<Omit<InternalEventRegistrationClientProps, "siteId" | "stage" | "className" | "buttonText" | "registrationEndpoint" | "eligibilityEndpoint" | "checkoutEndpoint">>;
|
|
@@ -144,7 +146,7 @@ export declare const eventRegistrationBlockRuntime: Readonly<{
|
|
|
144
146
|
className: string | null;
|
|
145
147
|
titleText: string;
|
|
146
148
|
bodyText: string;
|
|
147
|
-
stepLabels:
|
|
149
|
+
stepLabels: readonly EventRegistrationShellStepLabel[];
|
|
148
150
|
summaryButtonText: string;
|
|
149
151
|
}>;
|
|
150
152
|
hydration: Readonly<Omit<InternalEventRegistrationClientProps, "siteId" | "stage" | "className" | "buttonText" | "registrationEndpoint" | "eligibilityEndpoint" | "checkoutEndpoint">>;
|
|
@@ -156,7 +158,7 @@ export declare const eventRegistrationBlockRuntime: Readonly<{
|
|
|
156
158
|
className: string | null;
|
|
157
159
|
titleText: string;
|
|
158
160
|
bodyText: string;
|
|
159
|
-
stepLabels:
|
|
161
|
+
stepLabels: readonly EventRegistrationShellStepLabel[];
|
|
160
162
|
summaryButtonText: string;
|
|
161
163
|
}>;
|
|
162
164
|
hydration: Readonly<Omit<InternalEventRegistrationClientProps, "siteId" | "stage" | "className" | "buttonText" | "registrationEndpoint" | "eligibilityEndpoint" | "checkoutEndpoint">>;
|
|
@@ -182,7 +184,7 @@ export declare const eventRegistrationInteractiveIslandPropsCodec: Readonly<{
|
|
|
182
184
|
className: string | null;
|
|
183
185
|
titleText: string;
|
|
184
186
|
bodyText: string;
|
|
185
|
-
stepLabels:
|
|
187
|
+
stepLabels: readonly EventRegistrationShellStepLabel[];
|
|
186
188
|
summaryButtonText: string;
|
|
187
189
|
}>;
|
|
188
190
|
hydration: Readonly<Omit<InternalEventRegistrationClientProps, "siteId" | "stage" | "className" | "buttonText" | "registrationEndpoint" | "eligibilityEndpoint" | "checkoutEndpoint">>;
|
|
@@ -205,7 +207,7 @@ export declare const eventRegistrationInteractiveIslandPropsCodec: Readonly<{
|
|
|
205
207
|
className: string | null;
|
|
206
208
|
titleText: string;
|
|
207
209
|
bodyText: string;
|
|
208
|
-
stepLabels:
|
|
210
|
+
stepLabels: readonly EventRegistrationShellStepLabel[];
|
|
209
211
|
summaryButtonText: string;
|
|
210
212
|
}>;
|
|
211
213
|
hydration: Readonly<Omit<InternalEventRegistrationClientProps, "siteId" | "stage" | "className" | "buttonText" | "registrationEndpoint" | "eligibilityEndpoint" | "checkoutEndpoint">>;
|
|
@@ -4,7 +4,7 @@ import type { BlockManifest, Theme } from '../../blocks/src/index';
|
|
|
4
4
|
import { type PageDesignEditorBlock } from '../../theme-core/src/site-styles/index';
|
|
5
5
|
import { type EditorBlockId } from '../../core/src/index';
|
|
6
6
|
import type { ArrayKeysManager, DraftsSlice, UiStore as BlockEditorUiStore } from './block-editor/types';
|
|
7
|
-
type
|
|
7
|
+
export type BlockFormUiStoreState = {
|
|
8
8
|
setActivePreviewField: (field: {
|
|
9
9
|
kind: 'block';
|
|
10
10
|
blockId: EditorBlockId;
|
|
@@ -16,10 +16,12 @@ type UiStoreState = {
|
|
|
16
16
|
showAllValidation: (blockId: EditorBlockId) => boolean;
|
|
17
17
|
getBlockSaveability: (blockId: EditorBlockId) => BlockDraftSaveability;
|
|
18
18
|
};
|
|
19
|
-
drafts: Pick<DraftsSlice, 'getBlockSnapshot' | 'getCurrentValues' | '
|
|
19
|
+
drafts: Pick<DraftsSlice, 'getBlockSnapshot' | 'getCurrentValues' | 'clearError' | 'setAtPath' | 'getAtPath'> & {
|
|
20
|
+
updateBlockBaseline?: (blockId: EditorBlockId, data: Record<string, unknown> | null) => void;
|
|
21
|
+
};
|
|
20
22
|
arrayKeys: ArrayKeysManager;
|
|
21
23
|
};
|
|
22
|
-
type
|
|
24
|
+
export type BlockFormUiStore = BlockEditorUiStore<BlockFormUiStoreState>;
|
|
23
25
|
type BlockItem = {
|
|
24
26
|
id?: string | null;
|
|
25
27
|
kind: string;
|
|
@@ -37,7 +39,7 @@ export declare function BlockForm({ siteId: _siteId, block, manifest, uiStore, h
|
|
|
37
39
|
siteId: string;
|
|
38
40
|
block: BlockItem;
|
|
39
41
|
manifest: BlockManifest;
|
|
40
|
-
uiStore:
|
|
42
|
+
uiStore: BlockFormUiStore;
|
|
41
43
|
hasRecoveryConflict?: boolean;
|
|
42
44
|
focusSignal?: BlockFormFocusSignal | null;
|
|
43
45
|
onFocusHandled?: (requestId: number) => void;
|