@tripetto/block-text
Version:
Text input (single-line) block for Tripetto.
33 lines (32 loc) • 1.17 kB
TypeScript
/** Dependencies */
import { NodeBlock, Slots } from "@tripetto/runner";
import { TAutoComplete } from "./autocomplete";
import "./conditions/text";
import "./conditions/score";
export declare abstract class Text extends NodeBlock<{
readonly autoComplete?: TAutoComplete;
readonly prefill?: string;
readonly minLength?: number;
readonly useSuggestions?: boolean;
readonly suggestions?: {
readonly id: string;
readonly name: string;
readonly score?: number;
}[];
}> {
/** Contains the score slot. */
readonly scoreSlot:
| import("@tripetto/runner").Value<number, Slots.Numeric>
| undefined;
/** Contains the text slot with the value. */
readonly textSlot: import("@tripetto/runner").Value<string, Slots.Text>;
/** Contains if the block is required. */
readonly required: boolean;
/** Contains the maximum text length. */
readonly maxLength: number | undefined;
/** Contains the autocomplete for the input field. */
readonly autoComplete?: TAutoComplete;
/** Retrieves a list of suggestions. */
get suggestions(): string[] | undefined;
validate(): boolean;
}