UNPKG

igniteui-webcomponents

Version:

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.

35 lines (34 loc) 1.61 kB
import { IgcInputBaseComponent } from '../input/input-base.js'; import type { RangeTextSelectMode, SelectionRangeDirection } from '../types.js'; import { MaskParser } from './mask-parser.js'; export type MaskRange = { start: number; end: number; }; export declare abstract class IgcMaskInputBaseComponent extends IgcInputBaseComponent { protected parser: MaskParser; protected selection: MaskRange; protected compositionStart: number; protected focused: boolean; protected maskedValue: string; protected _mask: string; /** The prompt symbol to use for unfilled parts of the mask. */ prompt: string; protected get inputSelection(): MaskRange; protected get emptyMask(): string; connectedCallback(): void; /** Selects all text within the input. */ select(): void; protected handleInput({ inputType, isComposing }: InputEvent): void | Promise<void>; protected handleKeydown({ key }: KeyboardEvent): void; protected handleCut(): void; protected handleDragStart(): void; protected handleCompositionStart(): void; protected handleCompositionEnd({ data }: CompositionEvent): void; protected handleClick(): void; setSelectionRange(start: number, end: number, direction?: SelectionRangeDirection): void; /** Replaces the selected text in the control and re-applies the mask */ setRangeText(replacement: string, start?: number, end?: number, selectMode?: RangeTextSelectMode): void; protected abstract _updateSetRangeTextValue(): void; protected abstract updateInput(string: string, range: MaskRange): void; }