@fanfare-io/fanfare-sdk-react 0.12.0 → 0.14.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/dist/components/checkout/checkout-processing-panel.d.ts +2 -2
- package/dist/components/checkout/index.d.ts +0 -1
- package/dist/components/checkout/payment-collection-panel.d.ts +2 -3
- package/dist/components/checkout/stripe-card-field.d.ts +1 -1
- package/dist/components/checkout/stripe-client.d.ts +12 -5
- package/dist/components/compositions/granted-panel.d.ts +10 -5
- package/dist/components/compositions/index.d.ts +1 -1
- package/dist/components/compositions/outcome-panel.d.ts +12 -1
- package/dist/components/module/index.d.ts +2 -0
- package/dist/components/module/stage-steps.d.ts +26 -0
- package/dist/components/widgets/experience-widget.d.ts +44 -44
- package/dist/components/widgets/internal/auction-module.d.ts +4 -1
- package/dist/components/widgets/internal/draw-module.d.ts +4 -1
- package/dist/components/widgets/internal/queue-module.d.ts +4 -1
- package/dist/components/widgets/internal/timed-release-module.d.ts +4 -1
- package/dist/index-DMM2uyyz.js +5960 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +30 -30
- package/dist/{stripe-card-field-D1b4Y7LK.js → stripe-card-field-Ncp6eVoo.js} +1 -1
- package/dist/styles/base.css +1 -1
- package/package.json +6 -6
- package/dist/components/checkout/reservation-checkout-panel.d.ts +0 -18
- package/dist/index-Ce5dVdo3.js +0 -6053
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CheckoutProcessingSlotProps } from '../widgets/experience-widget';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
/**
|
|
4
|
-
* Default processing panel shown for the gap between a submitted
|
|
5
|
-
*
|
|
4
|
+
* Default processing panel shown for the gap between a submitted checkout and the server's
|
|
5
|
+
* confirmation.
|
|
6
6
|
*
|
|
7
7
|
* The consumer must not navigate away while the payment settles, so the wait is announced rather
|
|
8
8
|
* than shown only as motion.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { PaymentCollectionSlotProps } from '../widgets/experience-widget';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
/**
|
|
4
|
-
* Default payment-collection panel for pre-auth
|
|
5
|
-
* about to enter and when a failed authorization leaves a retry open.
|
|
4
|
+
* Default payment-collection panel for pre-auth entry/re-entry and grant-keyed at-end checkout.
|
|
6
5
|
*
|
|
7
6
|
* The hold amount is rendered from the view's own figure — the client never derives one.
|
|
8
7
|
*
|
|
@@ -15,4 +14,4 @@ import * as React from "react";
|
|
|
15
14
|
* minted across the whole flow. An ended view carries no pending action, so the retry mount reaches
|
|
16
15
|
* none of this.
|
|
17
16
|
*/
|
|
18
|
-
export declare function PaymentCollectionPanel(
|
|
17
|
+
export declare function PaymentCollectionPanel(props: PaymentCollectionSlotProps): React.ReactElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StripeClientConfig } from './stripe-client';
|
|
2
2
|
/**
|
|
3
3
|
* The SDK's card-entry field: a Stripe Card Element and the controller that turns it into a
|
|
4
|
-
* payment-method id. It knows nothing about
|
|
4
|
+
* payment-method id. It knows nothing about settlement, pre-auth, or amounts.
|
|
5
5
|
*
|
|
6
6
|
* `@stripe/stripe-js` is a type-only dependency across the SDK, so no vendor bytes ship in any
|
|
7
7
|
* chunk. This module is the one lazy split: it is reached only through a dynamic `import()` from
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SequenceView } from '@fanfare-io/fanfare-sdk-core/experiences';
|
|
2
2
|
import { Stripe, StripeConstructor, StripeElementStyle } from '@stripe/stripe-js';
|
|
3
|
+
/** How a granted win settles, as the granted views carry it. */
|
|
4
|
+
type GrantedSettlement = Extract<SequenceView, {
|
|
5
|
+
phase: "granted";
|
|
6
|
+
}>["settlement"];
|
|
3
7
|
/**
|
|
4
8
|
* The wire block a checkout-capable view carries, reached through the adapter's declared
|
|
5
9
|
* dependency on `fanfare-sdk-core` rather than the contracts package: core re-exports the contract
|
|
6
|
-
* types so adapter modules never resolve `@fanfare-io/fanfare-sdk-contracts` directly.
|
|
10
|
+
* types so adapter modules never resolve `@fanfare-io/fanfare-sdk-contracts` directly. Core names
|
|
11
|
+
* the shape only within the arms that carry it, so it is read back off one of them.
|
|
7
12
|
*/
|
|
8
|
-
type PaymentProviderConfig = NonNullable<
|
|
13
|
+
type PaymentProviderConfig = NonNullable<Extract<GrantedSettlement, {
|
|
14
|
+
mode: "at_end";
|
|
15
|
+
}>["paymentProvider"]>;
|
|
9
16
|
declare global {
|
|
10
17
|
interface Window {
|
|
11
18
|
Stripe?: StripeConstructor;
|
|
@@ -62,8 +69,8 @@ export declare function deriveStripeCardStyle(root: HTMLElement): StripeElementS
|
|
|
62
69
|
*
|
|
63
70
|
* `null` means no usable Stripe client configuration reached this view. On a checkout-capable arm
|
|
64
71
|
* that has exactly one cause — the configuration read failed — because the processor discriminator
|
|
65
|
-
* is the `processor`
|
|
66
|
-
* block. The condition is transient and retryable.
|
|
72
|
+
* is the settlement's `processor`/`mode` pair (granted) or `checkoutMode` (enterable), never the
|
|
73
|
+
* presence of this block. The condition is transient and retryable.
|
|
67
74
|
*/
|
|
68
75
|
export declare function resolveStripeClientConfig(source: PaymentProviderConfig | undefined): StripeClientConfig | null;
|
|
69
76
|
/** Test-only seam over every memo this module holds. Never exported from an adapter's public entry. */
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared granted composition for distribution modules. Renders the
|
|
5
5
|
* winning-state panel: status badge, expiry countdown (or fallback message
|
|
6
|
-
* when no expiry is known), and
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* when no expiry is known), and — only when the caller supplies a
|
|
7
|
+
* destination — a checkout CTA. Used by queue / draw / auction /
|
|
8
|
+
* timed-release modules — the JSX is structurally identical across all
|
|
9
|
+
* four; only the i18n strings differ.
|
|
10
|
+
*
|
|
11
|
+
* A granted frame with no `onCtaClick` renders no button: the grant is
|
|
12
|
+
* already settled where the consumer stands, so an inert affordance would
|
|
13
|
+
* promise a hand-off that does not exist.
|
|
9
14
|
*
|
|
10
15
|
* <GrantedPanel
|
|
11
16
|
* label="Congratulations!"
|
|
@@ -24,9 +29,9 @@ import * as React from "react";
|
|
|
24
29
|
export interface GrantedPanelProps {
|
|
25
30
|
label: React.ReactNode;
|
|
26
31
|
fallbackMessage: React.ReactNode;
|
|
27
|
-
ctaLabel
|
|
32
|
+
ctaLabel?: React.ReactNode;
|
|
28
33
|
expiresAt?: Date;
|
|
29
|
-
onCtaClick
|
|
34
|
+
onCtaClick?: () => void;
|
|
30
35
|
className?: string;
|
|
31
36
|
}
|
|
32
37
|
export declare function GrantedPanel({ label, fallbackMessage, ctaLabel, expiresAt, onCtaClick, className, }: GrantedPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,6 @@ export { JourneyGate, type JourneyGateProps, type JourneyGateStage } from './jou
|
|
|
10
10
|
export { ChallengeGate, type ChallengeGateProps } from './challenge-gate';
|
|
11
11
|
export { AccessCodeForm, type AccessCodeFormProps } from './access-code-form';
|
|
12
12
|
export { GrantedPanel, type GrantedPanelProps } from './granted-panel';
|
|
13
|
-
export { OutcomePanel, type OutcomePanelProps } from './outcome-panel';
|
|
13
|
+
export { OutcomePanel, type OutcomeAction, type OutcomePanelProps } from './outcome-panel';
|
|
14
14
|
export { EndedModule, type EndedModuleProps } from './ended-module';
|
|
15
15
|
export { ErrorView, type ErrorViewProps } from './error-view';
|
|
@@ -4,6 +4,15 @@ import { OutcomeReason } from '../module';
|
|
|
4
4
|
* (e.g. the expired re-enter button label) so each module shows terminology
|
|
5
5
|
* appropriate to its mechanism rather than queue-specific copy.
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* A host-provided action for a terminal panel, such as "See what's still
|
|
9
|
+
* available" after a loss. The widget renders it as a secondary button; the
|
|
10
|
+
* host decides where it leads.
|
|
11
|
+
*/
|
|
12
|
+
export interface OutcomeAction {
|
|
13
|
+
label: string;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
}
|
|
7
16
|
export type ParticipationType = "queue" | "draw" | "auction" | "timed_release" | "appointment";
|
|
8
17
|
export interface OutcomePanelProps {
|
|
9
18
|
outcomeReason: OutcomeReason;
|
|
@@ -14,9 +23,11 @@ export interface OutcomePanelProps {
|
|
|
14
23
|
participationType?: ParticipationType;
|
|
15
24
|
onReenter?: () => Promise<void>;
|
|
16
25
|
isReentering?: boolean;
|
|
26
|
+
/** Secondary action offered once the outcome is final. */
|
|
27
|
+
action?: OutcomeAction;
|
|
17
28
|
className?: string;
|
|
18
29
|
}
|
|
19
|
-
export declare function OutcomePanel({ outcomeReason, participationType, onReenter, isReentering, className, }: OutcomePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function OutcomePanel({ outcomeReason, participationType, onReenter, isReentering, action, className, }: OutcomePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
20
31
|
export declare namespace OutcomePanel {
|
|
21
32
|
var displayName: string;
|
|
22
33
|
}
|
|
@@ -13,6 +13,8 @@ export { PanelHeading } from './panel-heading';
|
|
|
13
13
|
export type { PanelHeadingProps, PanelHeadingVariant } from './panel-heading';
|
|
14
14
|
export { InfoPanel } from './info-panel';
|
|
15
15
|
export type { InfoPanelProps } from './info-panel';
|
|
16
|
+
export { StageSteps } from './stage-steps';
|
|
17
|
+
export type { StageStep, StageStepStatus, StageStepsProps } from './stage-steps';
|
|
16
18
|
export { AlertPanel } from './alert-panel';
|
|
17
19
|
export type { AlertPanelProps } from './alert-panel';
|
|
18
20
|
export { normalizeOutcomeReason, normalizeSequenceOutcomeReason } from './outcome-reason';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StageSteps
|
|
3
|
+
*
|
|
4
|
+
* A row of named stages for a phase whose end time is unknown. Completed
|
|
5
|
+
* stages read solid, the active stage pulses and its connector flows toward
|
|
6
|
+
* the next, and pending stages stay outlined. It communicates where the
|
|
7
|
+
* consumer is in a process without implying a percentage or a deadline.
|
|
8
|
+
*
|
|
9
|
+
* <StageSteps
|
|
10
|
+
* steps={[
|
|
11
|
+
* { label: "You're in", status: "done" },
|
|
12
|
+
* { label: "Drawing", status: "active" },
|
|
13
|
+
* { label: "Results", status: "pending" },
|
|
14
|
+
* ]}
|
|
15
|
+
* />
|
|
16
|
+
*/
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
export type StageStepStatus = "done" | "active" | "pending";
|
|
19
|
+
export interface StageStep {
|
|
20
|
+
label: string;
|
|
21
|
+
status: StageStepStatus;
|
|
22
|
+
}
|
|
23
|
+
export interface StageStepsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
steps: readonly StageStep[];
|
|
25
|
+
}
|
|
26
|
+
export declare const StageSteps: React.ForwardRefExoticComponent<StageStepsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { BotMitigationState, RoutingChallenge } from '@fanfare-io/fanfare-sdk-core/challenges';
|
|
2
|
-
import {
|
|
2
|
+
import { SDKEvents } from '@fanfare-io/fanfare-sdk-core/events';
|
|
3
|
+
import { CheckoutNextAction, FanfareCheckoutResult, JourneyHandle, JourneySnapshot, JourneyView, PaymentInput, PaymentMethodSummary, SequenceView } from '@fanfare-io/fanfare-sdk-core/experiences';
|
|
3
4
|
import { BrandTheme, WidgetVariant } from '../../theme';
|
|
4
5
|
import { AuthInputMode } from '../auth/auth-input';
|
|
6
|
+
import { OutcomeAction } from '../compositions/outcome-panel';
|
|
5
7
|
import * as React from "react";
|
|
6
8
|
type ParticipationType = "queue" | "draw" | "auction" | "timed_release" | "appointment";
|
|
7
9
|
type EnterableSlotSequence = Extract<SequenceView, {
|
|
@@ -15,6 +17,8 @@ type ParticipatingSlotSequence = Extract<SequenceView, {
|
|
|
15
17
|
type GrantedSlotSequence = Extract<SequenceView, {
|
|
16
18
|
phase: "granted";
|
|
17
19
|
}>;
|
|
20
|
+
/** How a granted win settles: who consumes the grant, and whether money has already moved for it. */
|
|
21
|
+
type GrantedSettlement = GrantedSlotSequence["settlement"];
|
|
18
22
|
/** Props passed to slot render functions */
|
|
19
23
|
export interface SlotProps {
|
|
20
24
|
snapshot: JourneySnapshot | null;
|
|
@@ -59,22 +63,17 @@ export interface GrantedSlotProps extends SlotProps {
|
|
|
59
63
|
grant?: string;
|
|
60
64
|
expiresAt?: number;
|
|
61
65
|
}
|
|
62
|
-
|
|
63
|
-
preAuthAmount: string;
|
|
64
|
-
preAuthCurrencyCode: string;
|
|
66
|
+
interface PaymentCollectionBaseSlotProps extends SlotProps {
|
|
65
67
|
savedPaymentMethods: PaymentMethodSummary[];
|
|
66
|
-
/**
|
|
68
|
+
/** Submits pre-auth entry or confirms at-end checkout; rejects when the panel should keep recovery UI mounted. */
|
|
67
69
|
onEnter: (paymentInput: PaymentInput) => Promise<void>;
|
|
68
70
|
isEntering: boolean;
|
|
69
|
-
/** "enter" collects payment before first entry; "reenter" collects payment to retry after a failed or expired authorization hold. */
|
|
70
|
-
intent: "enter" | "reenter";
|
|
71
71
|
/**
|
|
72
|
-
* Client configuration for the processor
|
|
73
|
-
*
|
|
74
|
-
* configuration.
|
|
72
|
+
* Client configuration for the internal processor, as the server supplied it. Carried by the
|
|
73
|
+
* enterable pre-auth and granted at-end arms; an ended retry holds no configuration.
|
|
75
74
|
*/
|
|
76
75
|
paymentProvider?: PaymentProviderConfig;
|
|
77
|
-
/** Present while the processor is waiting on an out-of-band action
|
|
76
|
+
/** Present while the internal processor is waiting on an out-of-band action. */
|
|
78
77
|
pendingAction?: CheckoutNextAction;
|
|
79
78
|
/**
|
|
80
79
|
* Re-reads the consumer's journeys from the server so a provider configuration that was missing
|
|
@@ -83,35 +82,22 @@ export interface PaymentCollectionSlotProps extends SlotProps {
|
|
|
83
82
|
*/
|
|
84
83
|
onRetryPaymentConfig?: () => Promise<void>;
|
|
85
84
|
}
|
|
85
|
+
export type PaymentCollectionSlotProps = PaymentCollectionBaseSlotProps & ({
|
|
86
|
+
intent: "checkout";
|
|
87
|
+
onResume: () => Promise<void>;
|
|
88
|
+
} | {
|
|
89
|
+
intent: "enter" | "reenter";
|
|
90
|
+
preAuthAmount: string;
|
|
91
|
+
preAuthCurrencyCode: string;
|
|
92
|
+
onResume?: never;
|
|
93
|
+
});
|
|
86
94
|
/**
|
|
87
|
-
* The processor's client configuration block, named through
|
|
88
|
-
*
|
|
95
|
+
* The processor's client configuration block, named through an arm that carries it: core names the
|
|
96
|
+
* shape only within those arms, not as a standalone export.
|
|
89
97
|
*/
|
|
90
|
-
type PaymentProviderConfig = NonNullable<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
token: string;
|
|
94
|
-
expiresAt: number;
|
|
95
|
-
};
|
|
96
|
-
savedPaymentMethods: PaymentMethodSummary[];
|
|
97
|
-
/** Which processor executes this reservation's payment leg; narrow before rendering processor-specific UI. */
|
|
98
|
-
processor: CheckoutProcessor;
|
|
99
|
-
/** Client configuration for the processor settling this reservation, as the server supplied it. */
|
|
100
|
-
paymentProvider?: PaymentProviderConfig;
|
|
101
|
-
/** Present while the processor is waiting on an out-of-band action; complete it, then call `onResume`. */
|
|
102
|
-
pendingAction?: CheckoutNextAction;
|
|
103
|
-
/** Rejects on a recoverable payment failure (e.g. a declined card) — the panel owns recovery UI for its own submit. */
|
|
104
|
-
onConfirm: (paymentInput: PaymentInput) => Promise<void>;
|
|
105
|
-
/** Re-submits the paused checkout after `pendingAction` has been completed. Idempotent server-side. */
|
|
106
|
-
onResume: () => Promise<void>;
|
|
107
|
-
isConfirming: boolean;
|
|
108
|
-
/**
|
|
109
|
-
* Re-reads the consumer's journeys from the server so a provider configuration that was missing
|
|
110
|
-
* or unreadable at render can arrive. This is the panel's only recovery when `paymentProvider` is
|
|
111
|
-
* absent — the value is a prop, so nothing the panel does to its own state can produce it.
|
|
112
|
-
*/
|
|
113
|
-
onRetryPaymentConfig?: () => Promise<void>;
|
|
114
|
-
}
|
|
98
|
+
type PaymentProviderConfig = NonNullable<Extract<GrantedSettlement, {
|
|
99
|
+
mode: "at_end";
|
|
100
|
+
}>["paymentProvider"]>;
|
|
115
101
|
export type CheckoutProcessingSlotProps = SlotProps;
|
|
116
102
|
/**
|
|
117
103
|
* A Fanfare-managed payment is terminal: it produces a receipt, never an admission credential. The
|
|
@@ -137,7 +123,8 @@ export interface EndedSlotProps extends SlotProps {
|
|
|
137
123
|
}
|
|
138
124
|
export interface ErrorSlotProps extends SlotProps {
|
|
139
125
|
error: string;
|
|
140
|
-
|
|
126
|
+
/** Absent when the refusal cannot be cleared by retrying — render no retry affordance. */
|
|
127
|
+
onRetry?: () => void;
|
|
141
128
|
}
|
|
142
129
|
export interface LoadingSlotProps extends SlotProps {
|
|
143
130
|
/** Stage-specific message (e.g. routing). `undefined` for generic loading — show just a spinner. */
|
|
@@ -162,13 +149,18 @@ export interface ExperienceWidgetSlots {
|
|
|
162
149
|
participating?: (props: ParticipatingSlotProps) => React.ReactNode;
|
|
163
150
|
granted?: (props: GrantedSlotProps) => React.ReactNode;
|
|
164
151
|
paymentCollection?: (props: PaymentCollectionSlotProps) => React.ReactNode;
|
|
165
|
-
|
|
152
|
+
/** Rendered by the at-end checkout surface while a collected payment is settling. */
|
|
166
153
|
checkoutProcessing?: (props: CheckoutProcessingSlotProps) => React.ReactNode;
|
|
167
154
|
receipt?: (props: ReceiptSlotProps) => React.ReactNode;
|
|
168
155
|
expired?: (props: ExpiredSlotProps) => React.ReactNode;
|
|
169
156
|
ended?: (props: EndedSlotProps) => React.ReactNode;
|
|
170
157
|
error?: (props: ErrorSlotProps) => React.ReactNode;
|
|
171
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Surface the widget is mounted on, named through the bus payload that carries it: core
|
|
161
|
+
* re-exports the event map but not the contract's own name for this shape.
|
|
162
|
+
*/
|
|
163
|
+
type BeaconPageType = SDKEvents["experience:widget-mounted"]["pageType"];
|
|
172
164
|
/** Render props for full control */
|
|
173
165
|
export interface ExperienceRenderProps {
|
|
174
166
|
journey: JourneyHandle | null;
|
|
@@ -193,24 +185,32 @@ export interface ExperienceWidgetProps {
|
|
|
193
185
|
variant?: WidgetVariant;
|
|
194
186
|
/** Slots for targeted overrides */
|
|
195
187
|
slots?: ExperienceWidgetSlots;
|
|
188
|
+
/**
|
|
189
|
+
* Surface this widget renders on, carried on the `experience:widget-mounted` announcement.
|
|
190
|
+
* Defaults to `embed`, the merchant-page case; Fanfare-hosted drop pages pass `hosted`.
|
|
191
|
+
*/
|
|
192
|
+
pageType?: BeaconPageType;
|
|
196
193
|
/** Render prop for full control (ignores slots if provided) */
|
|
197
194
|
children?: (props: ExperienceRenderProps) => React.ReactNode;
|
|
198
195
|
/** Checkout URL for granted state */
|
|
199
196
|
checkoutUrl?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Action offered on terminal panels (not selected, sold out, closed), such as
|
|
199
|
+
* a link back to what is still available. Omit to show none.
|
|
200
|
+
*/
|
|
201
|
+
endedAction?: OutcomeAction;
|
|
200
202
|
/** Called when journey state changes */
|
|
201
203
|
onJourneyChange?: (snapshot: JourneySnapshot) => void;
|
|
202
204
|
/** Called when the journey receives a grant */
|
|
203
205
|
onGranted?: (grant: string) => void;
|
|
204
|
-
/** Called when a Fanfare-managed checkout completes
|
|
206
|
+
/** Called when a Fanfare-managed checkout completes */
|
|
205
207
|
onFanfareCheckout?: (result: FanfareCheckoutResult) => void;
|
|
206
|
-
/** Called when the consumer wins a `post_win` distribution and must complete checkout before `expiresAt` */
|
|
207
|
-
onReserved?: (expiresAt: number) => void;
|
|
208
208
|
/** Called when an error occurs */
|
|
209
209
|
onError?: (error: Error) => void;
|
|
210
210
|
/** Additional class name */
|
|
211
211
|
className?: string;
|
|
212
212
|
}
|
|
213
|
-
export declare function ExperienceWidget({ experienceId, autoStart, accessCode, autoEnterWaitlist, theme, variant, slots, children, checkoutUrl, onJourneyChange, onGranted, onFanfareCheckout,
|
|
213
|
+
export declare function ExperienceWidget({ experienceId, autoStart, accessCode, autoEnterWaitlist, theme, variant, slots, pageType, children, checkoutUrl, endedAction, onJourneyChange, onGranted, onFanfareCheckout, onError, className, }: ExperienceWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
214
214
|
export declare namespace ExperienceWidget {
|
|
215
215
|
var displayName: string;
|
|
216
216
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AuctionDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
2
2
|
import { ReadableAtom } from 'nanostores';
|
|
3
|
+
import { OutcomeAction } from '../../compositions/outcome-panel';
|
|
3
4
|
import { OutcomeReason } from '../../module';
|
|
4
5
|
export interface AuctionModuleProps {
|
|
5
6
|
display$?: ReadableAtom<AuctionDisplayState>;
|
|
@@ -23,11 +24,13 @@ export interface AuctionModuleProps {
|
|
|
23
24
|
checkoutUrl?: string;
|
|
24
25
|
onCheckoutClick?: () => void;
|
|
25
26
|
outcomeReason?: OutcomeReason;
|
|
27
|
+
/** Host-provided action shown on the terminal panel. */
|
|
28
|
+
outcomeAction?: OutcomeAction;
|
|
26
29
|
onReenter?: () => Promise<void>;
|
|
27
30
|
isReentering?: boolean;
|
|
28
31
|
className?: string;
|
|
29
32
|
}
|
|
30
|
-
export declare function AuctionModule({ display$, fallbackState, sequencePhase, canEnter, canLeave, onEnter, onLeave, onBid, isEntering, isLeaving, countdownTo, defaultBidAmount, currencyCode, locale, grant: _grant, expiresAt, checkoutUrl, onCheckoutClick, outcomeReason, onReenter, isReentering, className, }: AuctionModuleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
export declare function AuctionModule({ display$, fallbackState, sequencePhase, canEnter, canLeave, onEnter, onLeave, onBid, isEntering, isLeaving, countdownTo, defaultBidAmount, currencyCode, locale, grant: _grant, expiresAt, checkoutUrl, onCheckoutClick, outcomeReason, outcomeAction, onReenter, isReentering, className, }: AuctionModuleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
31
34
|
export declare namespace AuctionModule {
|
|
32
35
|
var displayName: string;
|
|
33
36
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DrawDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
2
2
|
import { ReadableAtom } from 'nanostores';
|
|
3
|
+
import { OutcomeAction } from '../../compositions/outcome-panel';
|
|
3
4
|
import { OutcomeReason } from '../../module';
|
|
4
5
|
export interface DrawModuleProps {
|
|
5
6
|
/** Reactive display state atom from the journey */
|
|
@@ -30,6 +31,8 @@ export interface DrawModuleProps {
|
|
|
30
31
|
onCheckoutClick?: () => void;
|
|
31
32
|
/** Denial reason (denied) */
|
|
32
33
|
outcomeReason?: OutcomeReason;
|
|
34
|
+
/** Host-provided action shown on the terminal panel. */
|
|
35
|
+
outcomeAction?: OutcomeAction;
|
|
33
36
|
/** Re-enter handler (denied with reason="expired") */
|
|
34
37
|
onReenter?: () => Promise<void>;
|
|
35
38
|
/** Whether re-entering is in progress */
|
|
@@ -37,7 +40,7 @@ export interface DrawModuleProps {
|
|
|
37
40
|
/** Additional class name */
|
|
38
41
|
className?: string;
|
|
39
42
|
}
|
|
40
|
-
export declare function DrawModule({ display$, sequencePhase, canEnter, canLeave, onEnter, onLeave, isEntering, isLeaving, countdownTo, grant: _grant, expiresAt, checkoutUrl, onCheckoutClick, outcomeReason, onReenter, isReentering, className, }: DrawModuleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
43
|
+
export declare function DrawModule({ display$, sequencePhase, canEnter, canLeave, onEnter, onLeave, isEntering, isLeaving, countdownTo, grant: _grant, expiresAt, checkoutUrl, onCheckoutClick, outcomeReason, outcomeAction, onReenter, isReentering, className, }: DrawModuleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
41
44
|
export declare namespace DrawModule {
|
|
42
45
|
var displayName: string;
|
|
43
46
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { QueueDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
2
2
|
import { ReadableAtom } from 'nanostores';
|
|
3
|
+
import { OutcomeAction } from '../../compositions/outcome-panel';
|
|
3
4
|
import { OutcomeReason } from '../../module';
|
|
4
5
|
export interface QueueModuleProps {
|
|
5
6
|
display$?: ReadableAtom<QueueDisplayState>;
|
|
@@ -17,11 +18,13 @@ export interface QueueModuleProps {
|
|
|
17
18
|
checkoutUrl?: string;
|
|
18
19
|
onCheckoutClick?: () => void;
|
|
19
20
|
outcomeReason?: OutcomeReason;
|
|
21
|
+
/** Host-provided action shown on the terminal panel. */
|
|
22
|
+
outcomeAction?: OutcomeAction;
|
|
20
23
|
onReenter?: () => Promise<void>;
|
|
21
24
|
isReentering?: boolean;
|
|
22
25
|
className?: string;
|
|
23
26
|
}
|
|
24
|
-
export declare function QueueModule({ display$, sequencePhase, canEnter, canLeave, onEnter, onLeave, isEntering, isLeaving, closeAt, grant: _grant, expiresAt, checkoutUrl, onCheckoutClick, outcomeReason, onReenter, isReentering, className, }: QueueModuleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export declare function QueueModule({ display$, sequencePhase, canEnter, canLeave, onEnter, onLeave, isEntering, isLeaving, closeAt, grant: _grant, expiresAt, checkoutUrl, onCheckoutClick, outcomeReason, outcomeAction, onReenter, isReentering, className, }: QueueModuleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
28
|
export declare namespace QueueModule {
|
|
26
29
|
var displayName: string;
|
|
27
30
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TimedReleaseDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
2
2
|
import { ReadableAtom } from 'nanostores';
|
|
3
|
+
import { OutcomeAction } from '../../compositions/outcome-panel';
|
|
3
4
|
import { OutcomeReason } from '../../module';
|
|
4
5
|
export interface TimedReleaseModuleProps {
|
|
5
6
|
display$?: ReadableAtom<TimedReleaseDisplayState>;
|
|
@@ -17,11 +18,13 @@ export interface TimedReleaseModuleProps {
|
|
|
17
18
|
grant?: string;
|
|
18
19
|
expiresAt?: number | Date;
|
|
19
20
|
outcomeReason?: OutcomeReason;
|
|
21
|
+
/** Host-provided action shown on the terminal panel. */
|
|
22
|
+
outcomeAction?: OutcomeAction;
|
|
20
23
|
onReenter?: () => Promise<void>;
|
|
21
24
|
isReentering?: boolean;
|
|
22
25
|
className?: string;
|
|
23
26
|
}
|
|
24
|
-
export declare function TimedReleaseModule({ display$, sequencePhase, canEnter, canLeave, onEnter, onLeave, onComplete, isEntering, isLeaving, countdownTo, checkoutUrl, onCheckoutClick, grant: _grant, expiresAt, outcomeReason, onReenter, isReentering, className, }: TimedReleaseModuleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export declare function TimedReleaseModule({ display$, sequencePhase, canEnter, canLeave, onEnter, onLeave, onComplete, isEntering, isLeaving, countdownTo, checkoutUrl, onCheckoutClick, grant: _grant, expiresAt, outcomeReason, outcomeAction, onReenter, isReentering, className, }: TimedReleaseModuleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
28
|
export declare namespace TimedReleaseModule {
|
|
26
29
|
var displayName: string;
|
|
27
30
|
}
|