mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-23 00:52:33 +08:00

- Use path mappings in tsconfig.json to resolve module typings - Only use ambient mobules for global API's - Move single-file modules to a subdir with the same name so that we can provide a hand-written typing next to it (via package.json) - Delete all mentions of tns-core-modules.d.ts - Delete reference d.ts assembly build steps. Not needed anymore. - HACK! Use a <reference> for global typings in application.d.ts to avoid publishing a separate @types/tns-core-modules package. - Rename declarations.d.ts to tns-core-modules.d.ts to preserve JS project mappings in references.d.ts (the only place we use those)
63 lines
2.3 KiB
TypeScript
63 lines
2.3 KiB
TypeScript
import { TextBase, Property, CssProperty, Style, Color, FormattedString } from "ui/text-base";
|
|
|
|
export const keyboardTypeProperty: Property<EditableTextBase, string>;
|
|
export const returnKeyTypeProperty: Property<EditableTextBase, string>;
|
|
export const editableProperty: Property<EditableTextBase, boolean>;
|
|
export const updateTextTriggerProperty: Property<EditableTextBase, string>;
|
|
export const autocapitalizationTypeProperty: Property<EditableTextBase, string>;
|
|
export const autocorrectProperty: Property<EditableTextBase, boolean>;
|
|
export const hintProperty: Property<EditableTextBase, string>;
|
|
export const placeholderColorProperty: CssProperty<Style, Color>;
|
|
|
|
/**
|
|
* Represents the base class for all editable text views.
|
|
*/
|
|
export class EditableTextBase extends TextBase {
|
|
/**
|
|
* Gets or sets the soft keyboard type. Possible values are contained in the [KeyboardType enumeration](../enums/KeyboardType/README.md).
|
|
*/
|
|
keyboardType: "datetime" | "phone" | "number" | "url" | "email";
|
|
|
|
/**
|
|
* Gets or sets the soft keyboard return key flavor. Possible values are contained in the [ReturnKeyType enumeration](../enums/ReturnKeyType/README.md).
|
|
*/
|
|
returnKeyType: "done" | "next" | "go" | "search" | "send";
|
|
|
|
/**
|
|
* Gets or sets a value indicating when the text property will be updated.
|
|
* Possible values are contained in the [UpdateTextTrigger enumeration](../enums/UpdateTextTrigger/README.md).
|
|
*/
|
|
updateTextTrigger: "focusLost" | "textChanged";
|
|
|
|
/**
|
|
* Gets or sets the autocapitalization type. Possible values are contained in the [AutocapitalizationType enumeration](../enums/AutocapitalizationType/README.md).
|
|
*/
|
|
autocapitalizationType: "none" | "words" | "sentences" | "allCharacters";
|
|
|
|
/**
|
|
* Gets or sets whether the instance is editable.
|
|
*/
|
|
editable: boolean;
|
|
|
|
/**
|
|
* Enables or disables autocorrection.
|
|
*/
|
|
autocorrect: boolean;
|
|
|
|
/**
|
|
* Gets or sets the placeholder text.
|
|
*/
|
|
hint: string;
|
|
|
|
/**
|
|
* Hides the soft input method, ususally a soft keyboard.
|
|
*/
|
|
dismissSoftInput(): void;
|
|
}
|
|
|
|
//@private
|
|
export function _updateCharactersInRangeReplacementString(formattedText: FormattedString, rangeLocation: number, rangeLength: number, replacementString: string): void;
|
|
//@endprivate
|
|
|
|
export * from "ui/text-base";
|