@riverbankcms/sdk 0.96.0 → 0.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -1
- package/dist/{PreviewEditorSidebar-46VT4QVU.mjs → PreviewEditorSidebar-TPOKCCKY.mjs} +3 -3
- package/dist/{PreviewEditorUI-JD75GE5F.mjs → PreviewEditorUI-Y347GLC2.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-OGTXRQ4M.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -36
- package/dist/_dts/api/src/billing.d.ts +2 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +35 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +246 -0
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +109 -40
- package/dist/_dts/api/src/endpoints.d.ts +88 -0
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -1
- package/dist/_dts/api/src/siteOperations.d.ts +65 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +7 -1
- package/dist/_dts/billing/src/site-arrangements.d.ts +151 -0
- package/dist/_dts/billing/src/subscriptions/store.d.ts +2 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/resolveThumbnail.d.ts +2 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +8 -1
- package/dist/_dts/blocks/src/bindings/types.d.ts +0 -4
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +7 -0
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +12 -12
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/layout.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/weekly-slot-availability.d.ts +34 -0
- package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -0
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +4 -1
- package/dist/_dts/blocks/src/system/node/builder.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/schema.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/booking/DatePicker.d.ts +6 -2
- package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/components/booking/TimeSlotSelector.d.ts +10 -4
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAppointmentCheckoutVerification.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/StepIndicator.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +133 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.controller.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.state.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.server.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.view.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +31 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/FeedbackMessage.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/{nodes/event-registration → shared/components}/SelectableOptionCard.d.ts +11 -2
- package/dist/_dts/blocks/src/system/runtime/shared/components/StepIndicator.d.ts +16 -5
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +5 -0
- package/dist/_dts/blocks/src/utils/date-formatting.d.ts +18 -2
- package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +5 -5
- package/dist/_dts/content-model/src/templates/types.d.ts +2 -6
- package/dist/_dts/core/src/branded.d.ts +8 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +767 -20
- package/dist/_dts/field-primitives/src/bindings/index.d.ts +8 -0
- package/dist/_dts/sdk/src/__mocks__/next-cache.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +9 -3
- package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +34 -0
- package/dist/_dts/sdk/src/cli/commands/push.d.ts +13 -0
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/config-loader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +16 -14
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +6 -4
- package/dist/_dts/sdk/src/cli/env-scope.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +6 -7
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergeReport.d.ts +6 -18
- package/dist/_dts/sdk/src/cli/merge-remote/entrySnapshots.d.ts +2 -4
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +6 -18
- package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +2 -4
- package/dist/_dts/sdk/src/cli/merge-remote/sharedBaseSnapshots.d.ts +32 -0
- package/dist/_dts/sdk/src/cli/merge-remote/sharedMergePlan.d.ts +27 -0
- package/dist/_dts/sdk/src/cli/merge-remote/sharedMergeReport.d.ts +63 -0
- package/dist/_dts/sdk/src/cli/push-config.d.ts +13 -2
- package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +51 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +21 -0
- package/dist/_dts/sdk/src/client/index.d.ts +6 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +1 -1
- package/dist/_dts/sdk/src/client/types.d.ts +18 -2
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/bindings.d.ts +3 -7
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +13 -0
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +6 -1
- package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +3 -3
- package/dist/_dts/sdk/src/next/types.d.ts +19 -0
- package/dist/_dts/sdk/src/prebuild/loader.d.ts +8 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +174 -78
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -0
- package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +58 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +8 -0
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +18 -66
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +2 -0
- package/dist/_dts/sdk/src/routing/resolveRoute.d.ts +18 -0
- package/dist/_dts/sdk/src/test/apiClient.d.ts +17 -0
- package/dist/_dts/sdk/src/test/bunDom.setup.d.ts +1 -0
- package/dist/_dts/sdk/src/test/env.d.ts +4 -0
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +3 -3
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/interactive/generateBaseCSS.d.ts +6 -0
- package/dist/_dts/theme-core/src/status/contextualColors.d.ts +6 -0
- package/dist/_dts/theme-core/src/status/index.d.ts +1 -0
- package/dist/{chunk-VHIMXQ7Z.mjs → chunk-4HXF2QLH.mjs} +2 -2
- package/dist/{chunk-VTPPVAOL.mjs → chunk-EMJIT3ZJ.mjs} +1 -1
- package/dist/{chunk-4TLTV7OB.mjs → chunk-PM7HGDHM.mjs} +2 -2
- package/dist/{chunk-XMATDBXO.mjs → chunk-XO34WBBP.mjs} +2139 -1348
- package/dist/{chunk-EL55VV6Q.mjs → chunk-YGTTEVUM.mjs} +31 -10
- package/dist/{chunk-7ED5UNHL.mjs → chunk-YWTCCOSF.mjs} +117 -0
- package/dist/cli/index.mjs +2690 -1503
- package/dist/cli/init-docs/content/cli-reference.md +29 -1
- package/dist/cli/init-docs/content/getting-started.md +8 -0
- package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +3 -1
- package/dist/cli/init-docs/content/workflow-preview-mode.md +6 -0
- package/dist/cli/init-docs/content/workflow-remote-setup.md +51 -0
- package/dist/client/{accordion-GUNXIIZR.mjs → accordion-QSUEYL4L.mjs} +2 -2
- package/dist/client/{bookingForm-AOU4VHP5.mjs → bookingForm-QYGAHPDP.mjs} +376 -302
- package/dist/client/bookings.mjs +795 -429
- package/dist/client/{carousel-4QSX2JPC.mjs → carousel-SM2LEWAU.mjs} +3 -3
- package/dist/client/{cart-JKN6C4ZB.mjs → cart-3N3SFKNQ.mjs} +7 -7
- package/dist/client/{checkout-YY6YMITW.mjs → checkout-YFAYPKPZ.mjs} +7 -7
- package/dist/client/{chunk-SY543WZ3.mjs → chunk-5DLGREUB.mjs} +1 -1
- package/dist/client/{chunk-A3YN7M3G.mjs → chunk-CLZ7NBSP.mjs} +147 -75
- package/dist/client/{chunk-GWCRCJLB.mjs → chunk-CYJ3MUFP.mjs} +18 -6
- package/dist/client/{chunk-JNE6UI6U.mjs → chunk-H3H3ODO7.mjs} +1 -1
- package/dist/client/{chunk-CPKMJVBD.mjs → chunk-HPEQ4YWW.mjs} +83 -109
- package/dist/client/{chunk-PCHACQEB.mjs → chunk-IIUIKJ4K.mjs} +15 -7
- package/dist/client/{chunk-TNGL2WJF.mjs → chunk-IOAHWAQG.mjs} +18 -0
- package/dist/client/{chunk-6H27K6AA.mjs → chunk-JTKBF3W2.mjs} +10 -4
- package/dist/client/{chunk-OLAOAZEO.mjs → chunk-K7KTSACR.mjs} +1 -1
- package/dist/client/{chunk-BFCJZODD.mjs → chunk-R32M5HFS.mjs} +6 -6
- package/dist/client/{chunk-VJROUYOQ.mjs → chunk-WEVT46PX.mjs} +3 -3
- package/dist/client/{chunk-H7A6PUGM.mjs → chunk-ZU65LTI3.mjs} +1 -1
- package/dist/client/client.mjs +5052 -4083
- package/dist/client/{courseRegistration-UU2KMPSQ.mjs → courseRegistration-LYBE7VVK.mjs} +7 -7
- package/dist/client/{eventCalendar-WIVNS2TM.mjs → eventCalendar-FMTB75X6.mjs} +9 -9
- package/dist/client/{eventCombined-P3G5MW4J.mjs → eventCombined-E4LUCJXT.mjs} +9 -9
- package/dist/client/{eventDetails-2VHJ2RDG.mjs → eventDetails-GELSRR4Z.mjs} +9 -9
- package/dist/client/{eventListing-TGO6JI3R.mjs → eventListing-TB623B6R.mjs} +9 -9
- package/dist/client/{eventRegistration-B46HEJES.mjs → eventRegistration-NRIKHXTI.mjs} +9 -9
- package/dist/client/{form-VKRTFUNQ.mjs → form-Y4U4IAXE.mjs} +3 -3
- package/dist/client/{headerSection-XUX4ZJLO.mjs → headerSection-QSOVV5P7.mjs} +3 -3
- package/dist/client/hooks.mjs +1776 -1355
- package/dist/client/{locationMap-NQFI5MJO.mjs → locationMap-QYCAHH7H.mjs} +3 -3
- package/dist/client/{newsletterForm-P2GETCQK.mjs → newsletterForm-NWHY5TBY.mjs} +3 -3
- package/dist/client/{productDetail-7NQ7O5IF.mjs → productDetail-FYDMU2CE.mjs} +7 -7
- package/dist/client/{productList-RX6ZJ7BL.mjs → productList-D76CGACQ.mjs} +7 -7
- package/dist/client/rendering/client.mjs +2990 -2470
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3236 -2236
- package/dist/client/{shop-BHN5AKY6.mjs → shop-SOUACT5N.mjs} +7 -7
- package/dist/preview-next/before-render.mjs +117 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +117 -0
- package/dist/{sdk-runtime-X2LXQ5IC.mjs → sdk-runtime-XPVE3LBA.mjs} +6 -6
- package/dist/server/components.mjs +3115 -2484
- package/dist/server/config-template-validation.mjs +6 -2
- package/dist/server/config-validation.mjs +1961 -1580
- package/dist/server/config.mjs +1961 -1580
- package/dist/server/data.mjs +1762 -1352
- package/dist/server/index.mjs +266 -33
- package/dist/server/next/middleware.mjs +2 -2
- package/dist/server/next.mjs +3399 -2504
- package/dist/server/page-converter.mjs +1553 -1295
- package/dist/server/prebuild-loader.mjs +42 -23
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3151 -2489
- package/dist/server/rendering.mjs +3363 -2555
- package/dist/server/routing.mjs +1877 -1388
- package/dist/server/server.mjs +2057 -1402
- package/dist/server/theme-bridge.mjs +597 -505
- package/dist/server/theme.mjs +5 -4
- package/dist/styles/index.css +499 -490
- package/package.json +6 -4
- package/dist/SdkPreviewModeRuntime-MJUSYUFB.mjs +0 -8
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
* }, [verification.status]);
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
+
import { useBlockApi } from '../api';
|
|
26
27
|
import type { PaymentStatus, AttendeeStatus } from '../api/types';
|
|
27
28
|
export type PaymentVerificationConfig = {
|
|
28
29
|
/** Unique ID to check (attendeeId, customerPassId, etc.) */
|
|
@@ -46,6 +47,9 @@ export type PaymentVerificationResult = {
|
|
|
46
47
|
/** Manually trigger a poll (useful for retry after timeout) */
|
|
47
48
|
retry: () => void;
|
|
48
49
|
};
|
|
50
|
+
export type PaymentVerificationDeps = Readonly<{
|
|
51
|
+
useBlockApi: typeof useBlockApi;
|
|
52
|
+
}>;
|
|
49
53
|
/**
|
|
50
54
|
* Hook for polling payment status after Stripe redirects.
|
|
51
55
|
*
|
|
@@ -56,3 +60,4 @@ export type PaymentVerificationResult = {
|
|
|
56
60
|
* @returns Verification result with status, data, and retry function
|
|
57
61
|
*/
|
|
58
62
|
export declare function usePaymentVerification(config: PaymentVerificationConfig | null): PaymentVerificationResult;
|
|
63
|
+
export declare function usePaymentVerificationWithDeps(config: PaymentVerificationConfig | null, deps: PaymentVerificationDeps): PaymentVerificationResult;
|
|
@@ -47,6 +47,13 @@ export type BookingSlotSelection = Readonly<{
|
|
|
47
47
|
resourceName?: string;
|
|
48
48
|
label?: string;
|
|
49
49
|
}>;
|
|
50
|
+
export type BookingSlotDisplayOption = Readonly<{
|
|
51
|
+
key: string;
|
|
52
|
+
startAt: string;
|
|
53
|
+
endAt: string;
|
|
54
|
+
resourceId: AppointmentResourceId;
|
|
55
|
+
slot: BookingSlotView;
|
|
56
|
+
}>;
|
|
50
57
|
export type BookingResourceView = Readonly<{
|
|
51
58
|
id: AppointmentResourceId;
|
|
52
59
|
label: string;
|
|
@@ -429,6 +436,10 @@ export declare function resolveAvailabilitySelectionInvalidation(input: Readonly
|
|
|
429
436
|
}>): AvailabilitySelectionInvalidation;
|
|
430
437
|
export declare function toBookingSlotView(slot: BookingSlotSelection): BookingSlotView;
|
|
431
438
|
export declare function toBookingSlotViews(slots: readonly TimeSlot[]): BookingSlotView[];
|
|
439
|
+
export declare function deriveBookingSlotDisplayOptions(input: Readonly<{
|
|
440
|
+
slots: readonly BookingSlotView[];
|
|
441
|
+
hasSelectedResource: boolean;
|
|
442
|
+
}>): BookingSlotDisplayOption[];
|
|
432
443
|
export declare function toBookingFormData(state: BookingFlowReducerState): BookingFormData;
|
|
433
444
|
export declare function buildBookingStepPlan(input: BuildBookingStepPlanInput): readonly BookingStepPlanItem[];
|
|
434
445
|
export declare function validateBookingStep(input: Readonly<{
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Step indicator component for the event registration wizard.
|
|
3
|
-
* Thin wrapper around the shared StepIndicator
|
|
3
|
+
* Thin wrapper around the shared StepIndicator: styled by the shared
|
|
4
|
+
* registration-surface classes, with 'er'-prefixed classes kept in the
|
|
5
|
+
* markup as the stable hook surface for per-site theme CSS.
|
|
4
6
|
*/
|
|
5
7
|
import { type StepIndicatorBaseProps } from '../../shared';
|
|
6
8
|
export declare function StepIndicator(props: StepIndicatorBaseProps): import("react").JSX.Element;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Custom hooks for portal authentication and eligibility checking.
|
|
5
5
|
* Extracted from the main EventRegistrationClient for better separation of concerns.
|
|
6
6
|
*/
|
|
7
|
+
import { useBlockApi } from '../../api';
|
|
7
8
|
import type { EventTicketSelectionLine } from './types';
|
|
8
9
|
import { type EligibilityLookupState, type ExistingRegistrationLookupState } from './hooks.state';
|
|
9
10
|
export type PortalAuthState = 'checking' | 'authenticated' | 'unauthenticated';
|
|
@@ -24,6 +25,9 @@ export type UsePortalAuthResult = {
|
|
|
24
25
|
/** Logout function */
|
|
25
26
|
logout: () => void;
|
|
26
27
|
};
|
|
28
|
+
export type EventRegistrationHooksDeps = Readonly<{
|
|
29
|
+
useBlockApi: typeof useBlockApi;
|
|
30
|
+
}>;
|
|
27
31
|
/**
|
|
28
32
|
* Hook for managing portal authentication state.
|
|
29
33
|
*
|
|
@@ -31,6 +35,7 @@ export type UsePortalAuthResult = {
|
|
|
31
35
|
* fetches the portal profile if so.
|
|
32
36
|
*/
|
|
33
37
|
export declare function usePortalAuth(): UsePortalAuthResult;
|
|
38
|
+
export declare function usePortalAuthWithDeps(deps: EventRegistrationHooksDeps): UsePortalAuthResult;
|
|
34
39
|
export type UseEligibilityResult = {
|
|
35
40
|
state: EligibilityLookupState;
|
|
36
41
|
eligibility: EligibilityLookupState['eligibility'];
|
|
@@ -45,6 +50,14 @@ export declare function useEligibility(params: {
|
|
|
45
50
|
selectedSlidingAmount?: number | null;
|
|
46
51
|
email: string;
|
|
47
52
|
}): UseEligibilityResult;
|
|
53
|
+
export declare function useEligibilityWithDeps(params: {
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
occurrenceId: string;
|
|
56
|
+
attendanceMode?: 'in_person' | 'online' | null;
|
|
57
|
+
ticketSelections: readonly EventTicketSelectionLine[];
|
|
58
|
+
selectedSlidingAmount?: number | null;
|
|
59
|
+
email: string;
|
|
60
|
+
}, deps: EventRegistrationHooksDeps): UseEligibilityResult;
|
|
48
61
|
export type UseExistingEventRegistrationResult = {
|
|
49
62
|
state: ExistingRegistrationLookupState;
|
|
50
63
|
registration: ExistingRegistrationLookupState['registration'];
|
|
@@ -55,4 +68,5 @@ type UseExistingEventRegistrationParams = {
|
|
|
55
68
|
occurrenceId: string;
|
|
56
69
|
};
|
|
57
70
|
export declare function useExistingEventRegistration({ isAuthenticated, occurrenceId, }: UseExistingEventRegistrationParams): UseExistingEventRegistrationResult;
|
|
71
|
+
export declare function useExistingEventRegistrationWithDeps({ isAuthenticated, occurrenceId, }: UseExistingEventRegistrationParams, deps: EventRegistrationHooksDeps): UseExistingEventRegistrationResult;
|
|
58
72
|
export {};
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BlockApiClient } from '../../api';
|
|
2
|
+
import { savePendingRegistration } from './sessionStorage';
|
|
2
3
|
import type { EventTicketSelectionLine, FormData, Guest, RegistrationResult, RegistrationStep, PaymentSelection } from './types';
|
|
3
4
|
import type { PaymentMethod } from '../../api/types';
|
|
4
5
|
import type { RegistrationTarget } from './registrationDerivations';
|
|
@@ -21,7 +22,7 @@ export type EventRegistrationSubmitResult = Readonly<{
|
|
|
21
22
|
reason: 'blocked' | 'missing-target' | 'submission-failed';
|
|
22
23
|
message: string;
|
|
23
24
|
}>;
|
|
24
|
-
export
|
|
25
|
+
export type UseEventRegistrationSubmitInput = {
|
|
25
26
|
api: BlockApiClient;
|
|
26
27
|
registrationTarget: RegistrationTarget | null;
|
|
27
28
|
selectedAttendanceMode: 'in_person' | 'online' | null;
|
|
@@ -37,4 +38,9 @@ export declare function useEventRegistrationSubmit(options: {
|
|
|
37
38
|
setStep: (step: RegistrationStep) => void;
|
|
38
39
|
setRegistrationResult: (result: RegistrationResult) => void;
|
|
39
40
|
setErrorMessage: (message: string) => void;
|
|
40
|
-
}
|
|
41
|
+
};
|
|
42
|
+
export type EventRegistrationSubmitDeps = Readonly<{
|
|
43
|
+
savePendingRegistration: typeof savePendingRegistration;
|
|
44
|
+
}>;
|
|
45
|
+
export declare function useEventRegistrationSubmit(options: UseEventRegistrationSubmitInput): (method: PaymentMethod, passId?: string, membershipId?: string, selection?: PaymentSelection, submitOptions?: EventRegistrationSubmitOptions) => Promise<EventRegistrationSubmitResult>;
|
|
46
|
+
export declare function useEventRegistrationSubmitWithDeps(options: UseEventRegistrationSubmitInput, deps: EventRegistrationSubmitDeps): (method: PaymentMethod, passId?: string, membershipId?: string, selection?: PaymentSelection, submitOptions?: EventRegistrationSubmitOptions) => Promise<EventRegistrationSubmitResult>;
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { DiscountContext } from '../../api/types';
|
|
2
2
|
import type { EventTicketSelectionLine, EventRegistrationClientProps, FormData, Guest, GuestErrors, PaymentSelection, PaymentStepState, PublicEvent, RegistrationEvent, RegistrationResult, RegistrationStep } from './types';
|
|
3
|
+
import { usePortalAuth, useEligibility, useExistingEventRegistration } from './hooks';
|
|
4
|
+
import { useWaitlistClaim } from '../../shared/useWaitlistClaim';
|
|
5
|
+
import { useEventRegistrationStripeReturn } from './useEventRegistrationStripeReturn';
|
|
6
|
+
import { useEventRegistrationSubmit } from './useEventRegistrationSubmit';
|
|
7
|
+
import { useDiscountCodeUi } from './useDiscountCodeUi';
|
|
3
8
|
export type EventRegistrationDetailsCompleteResult = Readonly<{
|
|
4
9
|
ok: true;
|
|
5
10
|
outcome: 'payment-step' | 'submitted';
|
|
@@ -8,13 +13,139 @@ export type EventRegistrationDetailsCompleteResult = Readonly<{
|
|
|
8
13
|
reason: 'blocked' | 'validation-failed' | 'submission-failed';
|
|
9
14
|
message: string;
|
|
10
15
|
}>;
|
|
11
|
-
export
|
|
16
|
+
export type UseEventRegistrationWizardOptions = Readonly<{
|
|
12
17
|
anchorId: string;
|
|
13
18
|
occurrenceContext: EventRegistrationClientProps['occurrenceContext'];
|
|
14
19
|
contentEntry: EventRegistrationClientProps['contentEntry'];
|
|
15
20
|
events: PublicEvent[];
|
|
16
21
|
maxTicketsNum: number;
|
|
17
|
-
}
|
|
22
|
+
}>;
|
|
23
|
+
export type EventRegistrationWizardDeps = Readonly<{
|
|
24
|
+
usePortalAuth: typeof usePortalAuth;
|
|
25
|
+
useEligibility: typeof useEligibility;
|
|
26
|
+
useExistingEventRegistration: typeof useExistingEventRegistration;
|
|
27
|
+
useWaitlistClaim: typeof useWaitlistClaim;
|
|
28
|
+
useEventRegistrationStripeReturn: typeof useEventRegistrationStripeReturn;
|
|
29
|
+
useEventRegistrationSubmit: typeof useEventRegistrationSubmit;
|
|
30
|
+
useDiscountCodeUi: typeof useDiscountCodeUi;
|
|
31
|
+
}>;
|
|
32
|
+
export declare function useEventRegistrationWizard(options: UseEventRegistrationWizardOptions): {
|
|
33
|
+
api: import("../../api").BlockApiClient;
|
|
34
|
+
anchorId: string;
|
|
35
|
+
occurrenceContext: {
|
|
36
|
+
id: string;
|
|
37
|
+
seriesId: string;
|
|
38
|
+
startsAt: string;
|
|
39
|
+
endsAt: string;
|
|
40
|
+
timeZone: string;
|
|
41
|
+
capacityOverride?: number | null | undefined;
|
|
42
|
+
overrides?: Record<string, unknown> | null | undefined;
|
|
43
|
+
} | null | undefined;
|
|
44
|
+
registrationTarget: Readonly<{
|
|
45
|
+
occurrenceId: string;
|
|
46
|
+
selectedEventId: string | null;
|
|
47
|
+
}> | null;
|
|
48
|
+
contentEntry: {
|
|
49
|
+
id: string;
|
|
50
|
+
slug: string;
|
|
51
|
+
contentTypeSlug: string;
|
|
52
|
+
} | null | undefined;
|
|
53
|
+
events: PublicEvent[];
|
|
54
|
+
maxTicketsNum: number;
|
|
55
|
+
scopedEvents: RegistrationEvent[];
|
|
56
|
+
preSelectedEvent: RegistrationEvent | null;
|
|
57
|
+
hasPreSelectedContext: boolean;
|
|
58
|
+
step: RegistrationStep;
|
|
59
|
+
setStep: (nextStep: RegistrationStep) => void;
|
|
60
|
+
selectedEvent: RegistrationEvent | null;
|
|
61
|
+
setSelectedEvent: import("react").Dispatch<import("react").SetStateAction<RegistrationEvent | null>>;
|
|
62
|
+
ticketsCount: number;
|
|
63
|
+
setTicketsCount: (nextTicketsCount: number) => void;
|
|
64
|
+
selectedAttendanceMode: "in_person" | "online" | null;
|
|
65
|
+
setSelectedAttendanceMode: import("react").Dispatch<import("react").SetStateAction<"in_person" | "online" | null>>;
|
|
66
|
+
ticketSelections: Readonly<{
|
|
67
|
+
ticketTypeId: string | null;
|
|
68
|
+
quantity: number;
|
|
69
|
+
}>[];
|
|
70
|
+
selectedTicketLines: Readonly<{
|
|
71
|
+
ticketTypeId: string | null;
|
|
72
|
+
quantity: number;
|
|
73
|
+
}>[];
|
|
74
|
+
setSelectedTicketLines: (lines: readonly EventTicketSelectionLine[]) => void;
|
|
75
|
+
selectedSlidingAmountInput: string;
|
|
76
|
+
setSelectedSlidingAmountInput: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
77
|
+
selectedSlidingAmount: number | null;
|
|
78
|
+
selectedEventSlidingScale: Readonly<{
|
|
79
|
+
minAmount: number;
|
|
80
|
+
maxAmount: number;
|
|
81
|
+
suggestedAmount: number | null;
|
|
82
|
+
}> | null;
|
|
83
|
+
slidingScaleSelectionMessage: string | null;
|
|
84
|
+
selectedTicketType: import("./utils").SelectableEventTicketType | null;
|
|
85
|
+
ticketSelectionSummaryLines: Readonly<{
|
|
86
|
+
ticketTypeId: string | null;
|
|
87
|
+
label: string;
|
|
88
|
+
quantity: number;
|
|
89
|
+
unitPriceCents: number;
|
|
90
|
+
subtotalCents: number;
|
|
91
|
+
}>[];
|
|
92
|
+
ticketSelectionSubtotalCents: number;
|
|
93
|
+
visibleTicketTypes: import("./utils").SelectableEventTicketType[];
|
|
94
|
+
ticketTypeSelectionRequired: boolean;
|
|
95
|
+
hasValidTicketSelection: boolean;
|
|
96
|
+
eventRequiresPayment: boolean;
|
|
97
|
+
formData: FormData;
|
|
98
|
+
setFormData: import("react").Dispatch<import("react").SetStateAction<FormData>>;
|
|
99
|
+
errors: Partial<Record<keyof FormData, string>>;
|
|
100
|
+
guests: Guest[];
|
|
101
|
+
setGuests: import("react").Dispatch<import("react").SetStateAction<Guest[]>>;
|
|
102
|
+
guestErrors: GuestErrors;
|
|
103
|
+
guestSectionShake: boolean;
|
|
104
|
+
handleGuestShakeEnd: () => void;
|
|
105
|
+
registrationResult: RegistrationResult | null;
|
|
106
|
+
errorMessage: string;
|
|
107
|
+
altchaSolution: string | null;
|
|
108
|
+
setAltchaSolution: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
109
|
+
portalAuthState: import("./hooks").PortalAuthState;
|
|
110
|
+
portalProfile: import("./hooks").PortalProfile | null;
|
|
111
|
+
showMagicLinkModal: boolean;
|
|
112
|
+
setShowMagicLinkModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
113
|
+
handleLogout: () => void;
|
|
114
|
+
paymentStepState: PaymentStepState;
|
|
115
|
+
handlePaymentStepStateChange: (state: PaymentStepState) => void;
|
|
116
|
+
handlePaymentSelectionChange: (selection: PaymentSelection) => void;
|
|
117
|
+
paymentSelection: PaymentSelection;
|
|
118
|
+
isMembershipFastTrack: boolean;
|
|
119
|
+
waitlistClaim: import("../../shared/useWaitlistClaim").UseWaitlistClaimResult;
|
|
120
|
+
eligibility: import("./types").EligibilityData | null;
|
|
121
|
+
eligibilityLoading: boolean;
|
|
122
|
+
eligibilityError: string | null;
|
|
123
|
+
existingRegistration: import("../../api").CustomerEventRegistration | null;
|
|
124
|
+
existingRegistrationLoading: boolean;
|
|
125
|
+
existingRegistrationState: import("./hooks.state").ExistingRegistrationLookupState;
|
|
126
|
+
hasEligibility: boolean;
|
|
127
|
+
hasMembershipEligibility: boolean;
|
|
128
|
+
requireGuestDetails: boolean;
|
|
129
|
+
discountCode: string;
|
|
130
|
+
setDiscountCode: (code: string) => void;
|
|
131
|
+
discountUiOpen: boolean;
|
|
132
|
+
setDiscountUiOpen: (isOpen: boolean) => void;
|
|
133
|
+
discountsAvailable: boolean;
|
|
134
|
+
manualCodeEntryAllowed: boolean;
|
|
135
|
+
autoAppliedDiscount: import("../../api/types").AutoAppliedDiscountPreview | null;
|
|
136
|
+
discountsAvailableLoading: boolean;
|
|
137
|
+
discountContext: DiscountContext | null;
|
|
138
|
+
shouldShowDiscountToggle: boolean;
|
|
139
|
+
verification: import("../../hooks/usePaymentVerification").PaymentVerificationResult;
|
|
140
|
+
handleDetailsComplete: () => Promise<EventRegistrationDetailsCompleteResult>;
|
|
141
|
+
handlePaymentSelect: () => Promise<void>;
|
|
142
|
+
handleUseCardInsteadOfPass: () => void;
|
|
143
|
+
handleBookForSomeoneElse: () => void;
|
|
144
|
+
handleSubmit: (method: import("./PaymentSelectionStep").PaymentMethod, passId?: string, membershipId?: string, selection?: PaymentSelection, submitOptions?: import("./useEventRegistrationSubmit").EventRegistrationSubmitOptions) => Promise<import("./useEventRegistrationSubmit").EventRegistrationSubmitResult>;
|
|
145
|
+
handleEventSelect: (event: RegistrationEvent) => void;
|
|
146
|
+
handleRetry: () => void;
|
|
147
|
+
};
|
|
148
|
+
export declare function useEventRegistrationWizardWithDeps(options: UseEventRegistrationWizardOptions, deps: EventRegistrationWizardDeps): {
|
|
18
149
|
api: import("../../api").BlockApiClient;
|
|
19
150
|
anchorId: string;
|
|
20
151
|
occurrenceContext: {
|
package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.controller.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { BlockApiClient } from "../api";
|
|
2
|
+
import { type WeeklySlotAvailabilityClientInput, type WeeklySlotAvailabilityLoadState } from "./weekly-slot-availability.client.state";
|
|
3
|
+
export declare function useWeeklySlotAvailabilityLoadState(api: BlockApiClient, input: WeeklySlotAvailabilityClientInput): WeeklySlotAvailabilityLoadState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { WeeklySlotAvailabilityClientInput } from "./weekly-slot-availability.client.state";
|
|
3
|
+
export type WeeklySlotAvailabilityClientProps = WeeklySlotAvailabilityClientInput & Readonly<{
|
|
4
|
+
emptyMessage?: string | null;
|
|
5
|
+
ctaText?: string | null;
|
|
6
|
+
ctaUrl?: string | null;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function WeeklySlotAvailabilityClient({ serviceId, resourceId, horizonWeeks, timezone, availability: initialAvailability, emptyMessage, ctaText, ctaUrl, }: WeeklySlotAvailabilityClientProps): React.JSX.Element;
|
|
9
|
+
export default WeeklySlotAvailabilityClient;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WeeklySlotAvailabilityResponse } from "../api/types";
|
|
2
|
+
export type WeeklySlotAvailabilityClientInput = Readonly<{
|
|
3
|
+
serviceId?: string | null;
|
|
4
|
+
resourceId?: string | null;
|
|
5
|
+
horizonWeeks?: number | string | null;
|
|
6
|
+
timezone?: string | null;
|
|
7
|
+
availability?: WeeklySlotAvailabilityResponse | null;
|
|
8
|
+
}>;
|
|
9
|
+
export type WeeklySlotAvailabilityLoadState = Readonly<{
|
|
10
|
+
availability: WeeklySlotAvailabilityResponse | null;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
error: string | null;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function normalizeWeeklySlotAvailabilityHorizonWeeks(value: WeeklySlotAvailabilityClientInput["horizonWeeks"]): number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { WeeklySlotAvailabilityResponse } from "../api/types";
|
|
3
|
+
export type WeeklySlotAvailabilityNodeProps = Readonly<{
|
|
4
|
+
availability?: WeeklySlotAvailabilityResponse | null;
|
|
5
|
+
emptyMessage?: string | null;
|
|
6
|
+
ctaText?: string | null;
|
|
7
|
+
ctaUrl?: string | null;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function WeeklySlotAvailabilitySSR(props: WeeklySlotAvailabilityNodeProps): React.JSX.Element;
|
|
10
|
+
export default WeeklySlotAvailabilitySSR;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { WeeklySlotAvailabilityResponse } from "../api/types";
|
|
3
|
+
export type WeeklySlotAvailabilityViewProps = Readonly<{
|
|
4
|
+
availability?: WeeklySlotAvailabilityResponse | null;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
error?: string | null;
|
|
7
|
+
emptyMessage?: string | null;
|
|
8
|
+
ctaText?: string | null;
|
|
9
|
+
ctaUrl?: string | null;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function WeeklySlotAvailabilityView({ availability, loading, error, emptyMessage, ctaText, ctaUrl, }: WeeklySlotAvailabilityViewProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { NodeDefinition } from "../node";
|
|
2
|
+
import type { ConditionalAuthoringPresence, NodeDefinition } from "../node";
|
|
3
3
|
import { bindingSchema } from "../node";
|
|
4
4
|
import { type ThemeTokens } from "../theme";
|
|
5
5
|
import type { TransformRegistry, RouteMap, PageIdentifierMap, EntryIdentifierMap } from "../transforms";
|
|
@@ -10,6 +10,14 @@ export type PreviewTextFieldConstraints = Readonly<{
|
|
|
10
10
|
maxLength?: number;
|
|
11
11
|
}>;
|
|
12
12
|
export type PreviewFieldConstraintsMap = Readonly<Record<string, PreviewTextFieldConstraints | undefined>>;
|
|
13
|
+
export type PreviewAuthoringContext = Readonly<{
|
|
14
|
+
activeField?: PreviewAuthoringActiveField | null;
|
|
15
|
+
}>;
|
|
16
|
+
export type PreviewAuthoringActiveField = Readonly<{
|
|
17
|
+
kind: 'block-field';
|
|
18
|
+
blockId: string;
|
|
19
|
+
fieldPath: string;
|
|
20
|
+
}>;
|
|
13
21
|
export type ResolverContext = {
|
|
14
22
|
viewModel: ViewModel;
|
|
15
23
|
registry: ComponentRegistry;
|
|
@@ -29,6 +37,7 @@ export type ResolverContext = {
|
|
|
29
37
|
fragmentRegistry?: Record<string, unknown>;
|
|
30
38
|
fieldConstraints?: PreviewFieldConstraintsMap;
|
|
31
39
|
imageResolveContext?: ResolveImageUrlContext;
|
|
40
|
+
previewAuthoring?: PreviewAuthoringContext;
|
|
32
41
|
};
|
|
33
42
|
/** @internal Exported for testing */
|
|
34
43
|
export type ScopeEntry = {
|
|
@@ -46,6 +55,26 @@ export type ScopeEntry = {
|
|
|
46
55
|
export type InternalContext = ResolverContext & {
|
|
47
56
|
scopes: ScopeEntry[];
|
|
48
57
|
};
|
|
58
|
+
type ConditionalValuePresence = Readonly<{
|
|
59
|
+
kind: 'present';
|
|
60
|
+
}> | Readonly<{
|
|
61
|
+
kind: 'empty';
|
|
62
|
+
}>;
|
|
63
|
+
export type ConditionalNodeRenderDecision = Readonly<{
|
|
64
|
+
kind: 'render';
|
|
65
|
+
reason: 'condition-passed' | 'authoring-presence';
|
|
66
|
+
}> | Readonly<{
|
|
67
|
+
kind: 'skip';
|
|
68
|
+
reason: 'condition-failed' | 'not-editable' | 'inactive-authoring-context';
|
|
69
|
+
}>;
|
|
70
|
+
export declare function planConditionalNodeRender(input: {
|
|
71
|
+
readonly conditionMatched: boolean;
|
|
72
|
+
readonly conditionPresence: ConditionalValuePresence;
|
|
73
|
+
readonly conditionUsesPresenceSemantics: boolean;
|
|
74
|
+
readonly authoringPresence: ConditionalAuthoringPresence;
|
|
75
|
+
readonly editableTarget: PreviewAuthoringActiveField | null;
|
|
76
|
+
readonly authoringContext: PreviewAuthoringContext | undefined;
|
|
77
|
+
}): ConditionalNodeRenderDecision;
|
|
49
78
|
/**
|
|
50
79
|
* Resolves a binding to its value from the viewModel or scopes.
|
|
51
80
|
* Applies transforms and fallback handling.
|
|
@@ -68,3 +97,4 @@ export declare function resolveNode(node: NodeDefinition, context: InternalConte
|
|
|
68
97
|
* Accepts a single node or array of nodes and returns React elements.
|
|
69
98
|
*/
|
|
70
99
|
export declare function resolveTree(node: NodeDefinition | NodeDefinition[], options: ResolverContext): React.ReactNode;
|
|
100
|
+
export {};
|
|
@@ -5,10 +5,11 @@ export type FeedbackMessageProps = Readonly<{
|
|
|
5
5
|
tone: FeedbackTone;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
className?: string;
|
|
8
|
+
id?: string;
|
|
8
9
|
title?: ReactNode;
|
|
9
10
|
titleClassName?: string;
|
|
10
11
|
bodyClassName?: string;
|
|
11
12
|
role?: 'alert' | 'status';
|
|
12
13
|
live?: FeedbackLiveMode;
|
|
13
14
|
}>;
|
|
14
|
-
export declare function FeedbackMessage({ tone, children, className, title, titleClassName, bodyClassName, role, live, }: FeedbackMessageProps): import("react").JSX.Element;
|
|
15
|
+
export declare function FeedbackMessage({ tone, children, className, id, title, titleClassName, bodyClassName, role, live, }: FeedbackMessageProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Class-name preset applying the shared registration-surface option-card
|
|
4
|
+
* styling (`registration-surface.css`). Spread these and supply the
|
|
5
|
+
* block-specific content class names (icon/label/detail) alongside.
|
|
6
|
+
*/
|
|
7
|
+
export declare const RB_OPTION_CARD_CLASSES: {
|
|
8
|
+
readonly baseClassName: "rb-option-card";
|
|
9
|
+
readonly selectedClassName: "rb-option-card--selected";
|
|
10
|
+
readonly disabledClassName: "rb-option-card--disabled";
|
|
11
|
+
};
|
|
12
|
+
export type SelectableOptionCardProps = {
|
|
3
13
|
baseClassName: string;
|
|
4
14
|
selectedClassName: string;
|
|
5
15
|
disabledClassName: string;
|
|
@@ -18,4 +28,3 @@ type SelectableOptionCardProps = {
|
|
|
18
28
|
renderDisabledTooltip?: (tooltip: string) => React.ReactNode;
|
|
19
29
|
};
|
|
20
30
|
export declare function SelectableOptionCard(props: SelectableOptionCardProps): React.JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
* Shared step indicator component for registration wizards.
|
|
3
3
|
* Shows numbered steps with current progress and completion state.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* Two class channels can be emitted (independently or together):
|
|
6
|
+
* - `emitSharedClasses` adds the shared registration-surface classes
|
|
7
|
+
* (`rb-steps-nav`, `rb-step-circle`, ...) styled by
|
|
8
|
+
* theme-core `blocks-static/registration-surface.css`.
|
|
9
|
+
* - `classPrefix` adds block-prefixed classes (e.g. `er-step-circle`) — the
|
|
10
|
+
* legacy styling channel and the stable hook surface for per-site theme CSS.
|
|
11
|
+
*
|
|
12
|
+
* Blocks opt in to the shared channel as part of their registration-surface
|
|
13
|
+
* migration (issue 1174); until then a prefix-only render is unchanged output.
|
|
14
|
+
* At least one channel must be enabled or the indicator renders unstyled.
|
|
6
15
|
*/
|
|
7
16
|
/**
|
|
8
|
-
* Base props for StepIndicator wrappers (without
|
|
17
|
+
* Base props for StepIndicator wrappers (without class channel config).
|
|
9
18
|
* Use this type when creating block-specific thin wrappers.
|
|
10
19
|
*/
|
|
11
20
|
export type StepIndicatorBaseProps = {
|
|
@@ -20,7 +29,9 @@ export type StepIndicatorBaseProps = {
|
|
|
20
29
|
* Full props for the shared StepIndicator component.
|
|
21
30
|
*/
|
|
22
31
|
export type StepIndicatorProps = StepIndicatorBaseProps & {
|
|
23
|
-
/**
|
|
24
|
-
classPrefix
|
|
32
|
+
/** Block-prefixed class channel (e.g. 'cr' or 'er'); kept as a theme-CSS hook */
|
|
33
|
+
classPrefix?: string;
|
|
34
|
+
/** Also emit the shared registration-surface `rb-*` classes */
|
|
35
|
+
emitSharedClasses?: boolean;
|
|
25
36
|
};
|
|
26
|
-
export declare function StepIndicator({ currentStep, totalSteps, stepLabels, classPrefix, }: StepIndicatorProps): import("react").JSX.Element;
|
|
37
|
+
export declare function StepIndicator({ currentStep, totalSteps, stepLabels, classPrefix, emitSharedClasses, }: StepIndicatorProps): import("react").JSX.Element;
|
|
@@ -27,3 +27,5 @@ export { TerminalPanel } from './TerminalPanel';
|
|
|
27
27
|
export type { TerminalPanelProps, TerminalPanelTitleElement } from './TerminalPanel';
|
|
28
28
|
export { StepIndicator } from './StepIndicator';
|
|
29
29
|
export type { StepIndicatorBaseProps, StepIndicatorProps } from './StepIndicator';
|
|
30
|
+
export { RB_OPTION_CARD_CLASSES, SelectableOptionCard, } from './SelectableOptionCard';
|
|
31
|
+
export type { SelectableOptionCardProps } from './SelectableOptionCard';
|
|
@@ -8,5 +8,5 @@ export { DEFAULT_CURRENCY } from './types';
|
|
|
8
8
|
export { BOOK_TARGET_PARAMS, buildCheckoutReturnUrls, resolveDedicatedBookingHref, resolveDedicatedBookingPath, resolveDedicatedBookingTarget, formatPrice, scrollToBlock, consumeSearchParam, consumeSearchParams, validateFormData, getStepNumber, } from './utils';
|
|
9
9
|
export type { DedicatedBookingTarget, UniversalBookingRouteTarget, } from './utils';
|
|
10
10
|
export { createBodyThemePortalRoot } from './utils';
|
|
11
|
-
export { ActionRow, BookingOptionCompactRow, BookingOptionList, CheckIcon, ClockIcon, CrossIcon, BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES, DiscountCodeDisclosure, FieldValidationMessage, FeedbackMessage, getFieldValidationControlProps, MembershipHero, ModalShell, StateIcon, StepIndicator, TerminalPanel, } from './components';
|
|
12
|
-
export type { ActionRowProps, BookingOptionCompactRowAction, BookingOptionCompactRowProps, BookingOptionCompactRowViewModel, BookingOptionGroupViewModel, BookingOptionListProps, BookingOptionMetaItem, DiscountCodeDisclosureProps, DiscountCodeDisclosureSurface, FieldValidationControlInput, FieldValidationControlProps, FieldValidationMessageProps, FeedbackLiveMode, FeedbackMessageProps, FeedbackTone, ModalShellProps, StepIndicatorBaseProps, StepIndicatorProps, TerminalPanelProps, TerminalPanelTitleElement, } from './components';
|
|
11
|
+
export { ActionRow, BookingOptionCompactRow, BookingOptionList, CheckIcon, ClockIcon, CrossIcon, BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES, DiscountCodeDisclosure, FieldValidationMessage, FeedbackMessage, getFieldValidationControlProps, MembershipHero, ModalShell, RB_OPTION_CARD_CLASSES, SelectableOptionCard, StateIcon, StepIndicator, TerminalPanel, } from './components';
|
|
12
|
+
export type { ActionRowProps, SelectableOptionCardProps, BookingOptionCompactRowAction, BookingOptionCompactRowProps, BookingOptionCompactRowViewModel, BookingOptionGroupViewModel, BookingOptionListProps, BookingOptionMetaItem, DiscountCodeDisclosureProps, DiscountCodeDisclosureSurface, FieldValidationControlInput, FieldValidationControlProps, FieldValidationMessageProps, FeedbackLiveMode, FeedbackMessageProps, FeedbackTone, ModalShellProps, StepIndicatorBaseProps, StepIndicatorProps, TerminalPanelProps, TerminalPanelTitleElement, } from './components';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useBlockApi } from "../api";
|
|
1
2
|
import type { ResolveWaitlistClaimResponse } from "../api/types";
|
|
2
3
|
export declare function getWaitlistClaimTokenFromUrl(): string | null;
|
|
3
4
|
export type UseWaitlistClaimResult = {
|
|
@@ -8,4 +9,8 @@ export type UseWaitlistClaimResult = {
|
|
|
8
9
|
requiresPortalLogin: boolean;
|
|
9
10
|
isLoading: boolean;
|
|
10
11
|
};
|
|
12
|
+
export type UseWaitlistClaimDeps = Readonly<{
|
|
13
|
+
useBlockApi: typeof useBlockApi;
|
|
14
|
+
}>;
|
|
11
15
|
export declare function useWaitlistClaim(): UseWaitlistClaimResult;
|
|
16
|
+
export declare function useWaitlistClaimWithDeps(deps: UseWaitlistClaimDeps): UseWaitlistClaimResult;
|
|
@@ -17,16 +17,32 @@ export declare function getRuntimeTimeZone(): string;
|
|
|
17
17
|
* @param days - Number of days to generate
|
|
18
18
|
* @returns Array of date strings
|
|
19
19
|
*/
|
|
20
|
-
export declare function generateDateRange(days: number): string[];
|
|
20
|
+
export declare function generateDateRange(days: number, from?: Date): string[];
|
|
21
21
|
/**
|
|
22
22
|
* Formats an ISO date string (YYYY-MM-DD) to a human-readable format
|
|
23
23
|
* @param dateStr - ISO date string (e.g., "2025-03-15")
|
|
24
24
|
* @returns Formatted date (e.g., "Friday, March 15, 2025")
|
|
25
25
|
*/
|
|
26
26
|
export declare function formatDate(dateStr: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Formats an ISO date string (YYYY-MM-DD) into the compact parts shown on a
|
|
29
|
+
* booking date pill (e.g. { weekday: "Fri", day: "15", month: "Mar" }).
|
|
30
|
+
* Use formatDate() for the full accessible name.
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatDatePillParts(dateStr: string): Readonly<{
|
|
33
|
+
weekday: string;
|
|
34
|
+
day: string;
|
|
35
|
+
month: string;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Formats an ISO datetime string to a compact time without the timezone
|
|
39
|
+
* suffix (e.g. "2:30 PM") — used on booking time pills where the timezone is
|
|
40
|
+
* announced once for the whole group. Use formatTime() for the full form.
|
|
41
|
+
*/
|
|
42
|
+
export declare function formatTimeShort(isoString: string, timeZone?: string): string;
|
|
27
43
|
/**
|
|
28
44
|
* Formats an ISO datetime string to a human-readable time
|
|
29
45
|
* @param isoString - ISO datetime string (e.g., "2025-03-15T14:30:00Z")
|
|
30
46
|
* @returns Formatted time (e.g., "2:30 PM EST")
|
|
31
47
|
*/
|
|
32
|
-
export declare function formatTime(isoString: string): string;
|
|
48
|
+
export declare function formatTime(isoString: string, timeZone?: string): string;
|
|
@@ -5,5 +5,5 @@ type PreviewInlineTextEditorProps = TextProps & {
|
|
|
5
5
|
fallbackPlainText?: string;
|
|
6
6
|
onBlockFieldFocus?: (path: string) => void;
|
|
7
7
|
};
|
|
8
|
-
export declare function PreviewInlineTextEditor({ path, plainTextPath, fallbackPlainText, onBlockFieldFocus, className, maxLength, as: Comp, }: PreviewInlineTextEditorProps): import("react").JSX.Element | null;
|
|
8
|
+
export declare function PreviewInlineTextEditor({ path, plainTextPath, fallbackPlainText, onBlockFieldFocus, className, maxLength, placeholder, ariaLabel, as: Comp, }: PreviewInlineTextEditorProps): import("react").JSX.Element | null;
|
|
9
9
|
export {};
|
|
@@ -8,5 +8,5 @@ type PreviewRichTextEditorProps = RichTextPrimitiveProps & {
|
|
|
8
8
|
* Memoized version to prevent unnecessary re-renders.
|
|
9
9
|
* Only re-renders when path, doc, variant, or className props actually change.
|
|
10
10
|
*/
|
|
11
|
-
export declare const PreviewRichTextEditor: import("react").MemoExoticComponent<({ path, linkedEntryField, onLinkedEntryFieldFocus, onBlockFieldFocus, className, doc, variant }: PreviewRichTextEditorProps) => import("react").JSX.Element>;
|
|
11
|
+
export declare const PreviewRichTextEditor: import("react").MemoExoticComponent<({ path, linkedEntryField, onLinkedEntryFieldFocus, onBlockFieldFocus, className, doc, variant, placeholder, ariaLabel, }: PreviewRichTextEditorProps) => import("react").JSX.Element>;
|
|
12
12
|
export {};
|
|
@@ -56,7 +56,7 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
56
56
|
}>;
|
|
57
57
|
readonly headlineInline: Readonly<{
|
|
58
58
|
source: "transform";
|
|
59
|
-
transform: import("
|
|
59
|
+
transform: import("../../../field-primitives/src/bindings/index").BindingTransformName;
|
|
60
60
|
input?: import("./types").TemplateBindingDescriptor | string;
|
|
61
61
|
path?: string;
|
|
62
62
|
}>;
|
|
@@ -115,7 +115,7 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
115
115
|
}>;
|
|
116
116
|
readonly headlineInline: Readonly<{
|
|
117
117
|
source: "transform";
|
|
118
|
-
transform: import("
|
|
118
|
+
transform: import("../../../field-primitives/src/bindings/index").BindingTransformName;
|
|
119
119
|
input?: import("./types").TemplateBindingDescriptor | string;
|
|
120
120
|
path?: string;
|
|
121
121
|
}>;
|
|
@@ -191,7 +191,7 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
191
191
|
}>;
|
|
192
192
|
readonly headlineInline: Readonly<{
|
|
193
193
|
source: "transform";
|
|
194
|
-
transform: import("
|
|
194
|
+
transform: import("../../../field-primitives/src/bindings/index").BindingTransformName;
|
|
195
195
|
input?: import("./types").TemplateBindingDescriptor | string;
|
|
196
196
|
path?: string;
|
|
197
197
|
}>;
|
|
@@ -255,7 +255,7 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
255
255
|
}>;
|
|
256
256
|
readonly headlineInline: Readonly<{
|
|
257
257
|
source: "transform";
|
|
258
|
-
transform: import("
|
|
258
|
+
transform: import("../../../field-primitives/src/bindings/index").BindingTransformName;
|
|
259
259
|
input?: import("./types").TemplateBindingDescriptor | string;
|
|
260
260
|
path?: string;
|
|
261
261
|
}>;
|
|
@@ -306,7 +306,7 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
306
306
|
}>;
|
|
307
307
|
readonly headlineInline: Readonly<{
|
|
308
308
|
source: "transform";
|
|
309
|
-
transform: import("
|
|
309
|
+
transform: import("../../../field-primitives/src/bindings/index").BindingTransformName;
|
|
310
310
|
input?: import("./types").TemplateBindingDescriptor | string;
|
|
311
311
|
path?: string;
|
|
312
312
|
}>;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
+
import { type BindingTransformName } from '../../../field-primitives/src/bindings/index';
|
|
1
2
|
export type TemplateScope = 'entry' | 'template';
|
|
2
|
-
/**
|
|
3
|
-
* Keep in sync with:
|
|
4
|
-
* - @riverbankcms/blocks `TRANSFORMS`
|
|
5
|
-
* - @riverbankcms/sdk `BINDING_TRANSFORMS`
|
|
6
|
-
*/
|
|
7
3
|
export declare const TEMPLATE_BINDING_TRANSFORMS: {
|
|
8
4
|
readonly RICHTEXT_FIRST_PARAGRAPH: "richtext.firstParagraph";
|
|
9
5
|
readonly DATE_FORMAT_SHORT: "date.formatShort";
|
|
10
6
|
readonly DATE_FORMAT_LONG: "date.formatLong";
|
|
11
7
|
readonly TEXT_INLINE_TEXT: "text.inlineText";
|
|
12
8
|
};
|
|
13
|
-
export type TemplateBindingTransformName =
|
|
9
|
+
export type TemplateBindingTransformName = BindingTransformName;
|
|
14
10
|
export type TemplateBindingDescriptor = {
|
|
15
11
|
source: 'field' | 'meta';
|
|
16
12
|
path: string;
|