import { cliffy } from "https://deno.land/x/alloy_folk@v1.1.1/deps.ts";
const { GenericList } = cliffy;
Generic list prompt representation.
Constructors
new
GenericList(settings: S)Methods
protected
addChar(char: string): voidprotected
body(): string | Promise<string>Render options.
protected
deleteChar(): voidprotected
deleteCharRight(): voidprotected
getInfo(): stringprotected
getList(): stringRender options list.
protected
getListHeight(): numberGet options row height.
protected
getListIndex(value?: string)protected
abstract
getListItem(item: GenericListOptionSettings, isSelected?: boolean): stringRender option.
protected
getOptionByValue(value: string): GenericListOptionSettings | undefinedFind option by value.
protected
getPageOffset(index: number)protected
handleEvent(event: KeyCode): Promise<void>Handle user input event.
protected
match(): voidprotected
message(): stringprotected
moveCursorLeft(): voidprotected
moveCursorRight(): voidprotected
read(): Promise<boolean>Read user input.
protected
selectNext(): voidSelect next option.
protected
selectNextPage(): voidSelect next page.
protected
selectPrevious(): voidSelect previous option.
protected
selectPreviousPage(): voidSelect previous page.
Static Methods
protected
mapOption(option: GenericListOption): GenericListOptionSettingsSet list option defaults.
separator(label?): GenericListOption
Create list separator.