import { TextBase } from "../text-base"; import { Color } from "../../color"; import { FormattedString } from "../text-base/formatted-string"; import { Style } from "../styling/style"; import { Property, CssProperty } from "../core/properties"; /** * Represents the base class for all editable text views. */ export class EditableTextBase extends TextBase { public static blurEvent: string; public static focusEvent: string; public static textChangeEvent: string; /** * Gets or sets the soft keyboard type. */ keyboardType: KeyboardType; /** * Gets or sets the soft keyboard return key flavor. */ returnKeyType: ReturnKeyType; /** * Gets or sets a value indicating when the text property will be updated. */ updateTextTrigger: UpdateTextTrigger; /** * Gets or sets the autocapitalization type. */ autocapitalizationType: AutocapitalizationType; /** * Gets or sets whether the instance is editable. */ editable: boolean; /** * Enables or disables autocorrection. */ autocorrect: boolean; /** * Gets or sets the placeholder text. */ hint: string; /** * Limits input to a certain number of characters. */ maxLength: number; /** * Hides the soft input method, ususally a soft keyboard. */ dismissSoftInput(): void; //@private /** * @private */ public _setInputType(inputType: number): void; //@endprivate } export type KeyboardType = | "datetime" | "phone" | "number" | "url" | "email" | "integer"; export type ReturnKeyType = "done" | "next" | "go" | "search" | "send"; export type UpdateTextTrigger = "focusLost" | "textChanged"; export type AutocapitalizationType = | "none" | "words" | "sentences" | "allcharacters"; export const keyboardTypeProperty: Property; export const returnKeyTypeProperty: Property; export const editableProperty: Property; export const updateTextTriggerProperty: Property< EditableTextBase, UpdateTextTrigger >; export const autocapitalizationTypeProperty: Property< EditableTextBase, AutocapitalizationType >; export const autocorrectProperty: Property; export const hintProperty: Property; export const placeholderColorProperty: CssProperty; export const maxLengthProperty: Property; //@private /** * @private */ export function _updateCharactersInRangeReplacementString( formattedText: FormattedString, rangeLocation: number, rangeLength: number, replacementString: string ): void; //@endprivate export * from "../text-base";