IAutoscrollProps interface
đ Descriptionâ
Properties interface for the AutoscrollRunner React component.
đ Type declarationâ
interface IAutoscrollProps { definition?: IDefinition | Promise<IDefinition | undefined>;Optional snapshot?: ISnapshot | Promise<ISnapshot | undefined>;Optional styles?: IAutoscrollStyles | Promise<IAutoscrollStyles | undefined>;Optional l10n?: IL10n | Promise<IL10n | undefined>;Optional license?: string | Promise<string | undefined>;Optional view?: "live" | "test" | "preview";Optional display?: "inline" | "page";Optional removeBranding?: boolean;Optional persistent?: boolean;Optional className?: string;Optional customStyle?: CSSProperties;Optional customCSS?: string;Optional attachments?: IRunnerAttachments;Optional language?: string;Optional locale?: L10n.ILocale | ((locale: string) => L10n.ILocale | Promise<L10n.ILocale | undefined> | undefined);Optional translations?: L10n.TTranslation | L10n.TTranslation[] | ((language: string, name: string, version: string) => L10n.TTranslation | L10n.TTranslation[] | Promise<L10n.TTranslation | L10n.TTranslation[] | undefined> | undefined);Optional loader?: JSX.Element;Optional controller?: MutableRefObject<IAutoscrollController | undefined>;Optional builder?: MutableRefObject<Builder | undefined>;Optional onReady?: (instance: Instance | undefined) => void;EventOptional onTouch?: () => void;EventOptional onAction?: ( type: "start" | "stage" | "unstage" | "focus" | "blur" | "pause" | "complete", definition: { fingerprint: string; name: string; }, block?: { id: string; name: string; alias?: string; } ) => void;EventOptional onImport?: (instance: Instance) => void;EventOptional onChange?: (instance: Instance) => void;EventOptional onData?: (instance: Instance) => void;EventOptional onPause?: { recipe: "email"; onPause: ( emailAddress: string, snapshot: ISnapshot, language: string, locale: string, namespace: string ) => Promise<void> | boolean | void; } | ((snapshot: ISnapshot, language: string, locale: string, namespace: string) => Promise<void> | boolean | void);EventOptional onSubmit?: (instance: Instance, language: string, locale: string, namespace: string) => Promise<string | undefined> | boolean | void;EventOptional onComplete?: (instance: Instance, id?: string) => void;EventOptional onReload?: () => IDefinition | Promise<IDefinition>;EventOptional onEdit?: (type: "prologue" | "epilogue" | "styles" | "l10n" | "block", id?: string) => void;EventOptional onDestroy?: () => void;EventOptional }
đī¸ Propertiesâ
đˇī¸ attachmentsâ
Specifies the attachments handler used by blocks that support file uploads. If your form does not need file upload support, you can omit this property.
Typeâ
If your form uses file uploads and no attachments handler is defined, the uploaded files are included in the dataset using Base64 encoding.
Have a look at the Handling file uploads guide to learn how to use this feature.
đˇī¸ builderâ
Property to receive a reference to a Builder instance. This will bind the runner with the builder and allows the builder to use the runner as a live form preview.
Typeâ
MutableRefObject<Builder | undefined>
Have a look at the Live preview guide to learn more about this feature.
đˇī¸ classNameâ
Specifies a custom class name for the HTML element that holds the runner.
Typeâ
string
Have a look at the Style forms guide to learn more about this feature.
đˇī¸ controllerâ
Property to receive a controller reference to the runner. This controller reference can be used to perform actions (like start, stop, pause) and retrieve status information from the runner.
Typeâ
MutableRefObject<IAutoscrollController | undefined>
Have a look at the Controlling the runner guide to learn more about this feature.
đˇī¸ customCSSâ
Specifies custom CSS rules for blocks used in the runner. Multiple CSS rules can be separated with a new line and nesting within CSS rules is supported. Each block is referenced by its block identifier (for the stock blocks, this identifier is always prefixed with @tripetto/block- followed by the lowercase name of the block).
Typeâ
string
Have a look at the Style forms guide to learn more about this feature.
đˇī¸ customStyleâ
Specifies the inline style for the HTML element that holds the runner.
Typeâ
CSSProperties
Have a look at the Style forms guide to learn more about this feature.
đˇī¸ definitionâ
Specifies the definition to run. This property also accepts a Promise. That's useful when you want to load the definition dynamically from an external source.
Typeâ
IDefinition | Promise<IDefinition | undefined>
đˇī¸ displayâ
Specifies the display mode of the runner. It can be one of the following values:
inline: The runner is shown inline with other content (this is the default value);page: The runner uses the whole page (viewport).
Typeâ
"inline" | "page"
Have a look at the Display guide to learn more about the runner display modes.
đˇī¸ l10nâ
Specifies the localization (locale and translation) information. This property also accepts a Promise. That's useful when you want to load the l10n data dynamically from an external source.
Typeâ
IL10n | Promise<IL10n | undefined>
Have a look at the Localization guide for more information about locales and translations.
đˇī¸ languageâ
Specifies the preferred language to use for the form locale and translation. This property is only used for form definitions that don't have a specified language. If a language is specified in the form definition, that language is always used.
Typeâ
string
Make sure to implement dynamic loading of locales and translations to let this feature work. Dynamic loading allows the runner to load the appropriate locale and translation based on the form language or the language specified by this property.
đˇī¸ licenseâ
Specifies a license code for the runner. This property also accepts a Promise. That's useful when you want to load the license code dynamically from an external source.
Typeâ
string | Promise<string | undefined>
Have a look at the License guide for more information about applying licenses.
đˇī¸ loaderâ
Specifies a loader that is shown when the runner is loading (e.g., awaiting any promises).
Typeâ
JSX.Element
đˇī¸ localeâ
Specifies the locale or the locale loader function to use. The locale data contains the number and date/time formats the runner uses.
Typeâ
L10n.ILocale | ((locale: string) => L10n.ILocale | Promise<L10n.ILocale | undefined> | undefined)
Have a look at the Localization guide to learn more about this feature.
đˇī¸ persistentâ
Specifies if the runner should try to store sessions in the local store to preserve persistency on navigation between multiple pages that host the runner.
Typeâ
boolean
Have a look at the Form data persistency guide to learn more about this feature.
đˇī¸ removeBrandingâ
Removes all visual Tripetto branding from the runner (a valid license is required).
Typeâ
boolean
Have a look at the Disable Tripetto branding guide to learn more about removing the branding.
đˇī¸ snapshotâ
Specifies the snapshot that should be restored. This property also accepts a Promise. That's useful when you want to load the snapshot dynamically from an external source.
Typeâ
ISnapshot | Promise<ISnapshot | undefined>
Have a look at the Pause and resume guide to learn more about pausing and resuming.
đˇī¸ stylesâ
Specifies the styles (colors, font, size, etc.) for the runner. This property also accepts a Promise. That's useful when you want to load the styles dynamically from an external source.
Typeâ
IAutoscrollStyles | Promise<IAutoscrollStyles | undefined>
Have a look at the Style forms guide to learn more about styling the runner.
đˇī¸ translationsâ
Specifies the translations or the translations loader function to use.
Typeâ
L10n.TTranslation | L10n.TTranslation[] | (language: string, name: string, version: string) => L10n.TTranslation | L10n.TTranslation[] | Promise<L10n.TTranslation | L10n.TTranslation[] | undefined> | undefined
Have a look at the Localization guide to learn more about this feature.
đˇī¸ viewâ
Specifies the initial view mode of the runner. It can be one of the following values:
live: The form is running in normal (production) mode (this is the default value);test: The form is running in test mode (no response data is submitted);preview: The form is running in preview mode, which shows all blocks in a single view.
Typeâ
"live" | "test" | "preview"