import { AfterViewInit, ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core'; import { KeyboardLayout } from './interfaces/keyboards-layout/keyboard-layout'; import { KeyboardHandlerEvent, KeyboardOptions } from './interfaces/interfaces'; import { Position } from './interfaces/position'; import { KeyActions } from './interfaces/key-actions'; import { VirtualKeyboardEventsService } from './services/virtual-keyboard-events.service'; import * as i0 from "@angular/core"; export declare class VirtualKeyboardComponent implements OnInit, AfterViewInit { private renderer; private keyboardEventsService; private elementRef; keyboardLayout: KeyboardLayout | undefined; language: string | undefined; vk_dir: string; is_display_text_input: boolean; vk_is_visible: boolean; vk_is_readonly: boolean; vk_id: string | undefined; text_input_element: HTMLInputElement; validateCallBack: (args: string) => boolean; acceptCallBack: (args: string) => boolean | void; acceptWithIDCallBack: (vk_id: string, text: string) => any | void; _input: ElementRef; div_keyboard: ElementRef; acceptClick: EventEmitter; keyboardPosition: Position; getScreenWidth: any; getScreenHeight: any; isShiftOn: boolean; defaultKeyboardLayout: string[]; input: HTMLInputElement; defaultName: string; activeInputElement: HTMLInputElement | HTMLTextAreaElement | null; keyboard_css: string; textBeforeAccept: string; private value; set valueFiled(_value: string); /** * Getters */ getOptions: () => KeyboardOptions; getCaretPosition: () => number | null; getCaretPositionEnd: () => number | null; keyActions: KeyActions; options: KeyboardOptions; caretPosition: number | null; caretPositionEnd: number | null; /** * @type {boolean} Boolean value that shows whether maxLength has been reached */ maxLengthReached: boolean; css: { default: string; idSuffix: string; initialFocus: string; input: string; inputClone: string; wrapper: string; preview: string; keyboard: string; keySet: string; keyButton: string; keyWide: string; keyPrefix: string; keyText: string; keyHasActive: string; keyAction: string; keySpacer: string; keyToggle: string; keyDisabled: string; divWrapperCE: string; locked: string; alwaysOpen: string; noKeyboard: string; placeholder: string; hasFocus: string; isCurrent: string; inputValid: string; inputInvalid: string; inputAutoAccepted: string; endRow: string; }; self: this; constructor(renderer: Renderer2, keyboardEventsService: VirtualKeyboardEventsService, elementRef: ElementRef); ngAfterViewInit(): void; ngOnInit(): void; onMouseEnter(targetElement: any): void; onWindowResize(): void; activeFunction(): void; /** * Returns the display (label) name for a given button * * @param {string} button The button's layout name * @param {object} display The provided display option * @param {boolean} mergeDisplay Whether the provided param value should be merged with the default one. */ getButtonDisplayName(button: string): string; /** * Default button display labels * !!!! We declare this method at KeyboardLayout interface, * Because this is the most correct place to define this method */ /** * Adds default classes to a given button * * @param {string} button The button's layout name * @return {string} The classes to be added to the button */ getButtonClass(button: string): string; /** * Retrieve button type * * @param {string} button The button's layout name * @return {string} The button type */ getButtonType(button: string): string; /** * Calculate caret position offset when using rtl option */ getRtlOffset(index: number, input: string): number; /** * Adds a string to the input at a given position * * @param {string} source The source input * @param {string} str The string to add * @param {number} position The (cursor) position where the string should be added * @param {boolean} moveCaret Whether to update simple-keyboard's cursor */ addStringAt(source: string, str: string, position?: number, positionEnd?: number, moveCaret?: boolean): string; /** * Determines whether the maxLength has been reached. This function is called when the maxLength option it set. * * @param {object} inputObj * @param {string} updatedInput */ handleMaxLength(updatedInput: string): boolean; /** * Moves the cursor position by a given amount * * @param {number} length Represents by how many characters the input should be moved * @param {boolean} minus Whether the cursor should be moved to the left or not. */ updateCaretPos(length: number, minus?: boolean): void; /** * Action method of updateCaretPos * * @param {number} length Represents by how many characters the input should be moved * @param {boolean} minus Whether the cursor should be moved to the left or not. */ updateCaretPosAction(length: number, minus?: boolean): number | null; /** * Returns the updated input resulting from clicking a given button * * @param {string} button The button's layout name * @param {string} input The input string * @param {number} caretPos The cursor's current position * @param {number} caretPosEnd The cursor's current end position * @param {boolean} moveCaret Whether to update simple-keyboard's cursor */ getUpdatedInput(button: string, input: string, caretPos: any, caretPosEnd?: any, moveCaret?: boolean): string; /** * Gets the current value of maxLengthReached */ isMaxLengthReached(): boolean; /** * Removes an amount of characters before a given position * * @param {string} source The source input * @param {number} position The (cursor) position from where the characters should be removed * @param {boolean} moveCaret Whether to update simple-keyboard's cursor */ removeAt(source: string, position?: number, positionEnd?: number, moveCaret?: boolean): string; /** * Removes an amount of characters after a given position * * @param {string} source The source input * @param {number} position The (cursor) position from where the characters should be removed */ removeForwardsAt(source: string, position?: number, positionEnd?: number, moveCaret?: boolean): string; /** * Set the keyboard’s input. * @param {string} input the input value * @param {string} inputName optional - the internal input to select */ setInput(input_value: string, skipSync?: boolean): void; /** * Send a command to all simple-keyboard instances (if you have several instances). */ syncInstanceInputs(): void; /** * Check whether the button is a standard button */ isStandardButton: (button: string) => boolean | ""; /** * Changes the internal caret position * @param {number} position The caret's start position * @param {number} positionEnd The caret's end position */ setCaretPosition(position: number | null, endPosition?: number | null): void; onClick(event: Event, button: string): void; setCurrent(): void; /** * Handles clicks made to keyboard buttons * @param {string} button The button's layout name. */ handleButtonClicked(button: HTMLButtonElement, e?: KeyboardHandlerEvent): void; _setCaretPosition(position: number | null): void; /** * Called by {@link setEventListeners} when an event that warrants a cursor position update is triggered */ caretEventHandler(event: KeyboardHandlerEvent): void; /** * This handles the "inputPattern" option * by checking if the provided inputPattern passes */ inputPatternIsValid(inputVal: string): boolean; /** * Get the keyboard’s input (You can also get it from the onChange prop). * @param {string} [inputName] optional - the internal input to select */ getInput(inputName?: string, skipSync?: boolean): string; /** * Send a command to all simple-keyboard instances at once (if you have multiple instances). * @param {function(instance: object, key: string)} callback Function to run on every instance */ dispatch(callback: (instance: this, key?: string) => void): void; /** * Handles simple-keyboard event listeners */ setEventListeners(): void; /** * Event Handler: KeyUp */ handleKeyUp(event: KeyboardHandlerEvent): void; /** * Event Handler: KeyDown */ handleKeyDown(event: KeyboardHandlerEvent): void; /** * Event Handler: Focus in, When we click on input and we focus in then we execute this method */ handleFocusIn(event: KeyboardHandlerEvent): void; /** * Event Handler: MouseUp */ handleFocusOut(event: KeyboardHandlerEvent): void; /** * Event Handler: MouseUp */ handleMouseUp(event: KeyboardHandlerEvent): void; /** * Event Handler: TouchEnd */ handleTouchEnd(event: KeyboardHandlerEvent): void; /** * Event Handler: Select */ handleSelect(event: KeyboardHandlerEvent): void; /** * Event Handler: SelectionChange */ handleSelectionChange(event: KeyboardHandlerEvent): void; /** * This method responsible to calculate the virtual keyboard location. * For example: If We click on the input text element We wont to display the virtual keyboard near to input text * Sometimes the keyboard position will appear below the text and sometimes above, sometimes on the right and sometimes on the left * Its all depend in the input text element position on the page. */ calculationPosition(): void; /** * This method responsible to return the virtual keyboard y1 * !!! unused, We can delete this method */ getVK_Y1(): number; /** * This method responsible to return the virtual keyboard x1 * !!! unused, We can delete this method */ getVK_X1(): number; /** * This method responsible to return the virtual keyboard y2 * !!! unused, We can delete this method */ getVK_Y2(): number; /** * This method responsible to return the virtual keyboard x2 * !!! unused, We can delete this method */ getVK_X2(): number; /** * This method responsible to return the virtual keyboard width */ getVK_Width(): number; /** * This method responsible to return the virtual keyboard height */ getVK_Height(): number; /** * This method execute when we typing on VK and We making 'accept' or we dispatch 'document:click'. * This method responsible to making the validation process if his declare and to modify the new input text */ startAcceptingProcess(): void; keyaction: { accept: () => boolean; alt: () => void; bksp: () => void; cancel: () => boolean; clear: () => void; combo: () => boolean; dec: () => void; del: () => void; default: () => void; enter: () => void; lock: () => void; left: () => void; meta: () => void; next: () => boolean; normal: () => void; prev: () => boolean; right: () => void; shift: () => void; sign: () => void; space: () => void; tab: () => void; toggle: () => void; NBSP: string; ZWSP: string; ZWNJ: string; ZWJ: string; LRM: string; RLM: string; }; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }