1 | import { EventEmitter, NgZone } from '@angular/core';
|
2 | import { Config } from '../config/config';
|
3 | import { DomController } from './dom-controller';
|
4 | import { Platform } from './platform';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare class Keyboard {
|
21 | private _plt;
|
22 | private _zone;
|
23 | private _dom;
|
24 | _tmr: number;
|
25 | willShow: EventEmitter<void>;
|
26 | willHide: EventEmitter<void>;
|
27 | didShow: EventEmitter<void>;
|
28 | didHide: EventEmitter<void>;
|
29 | eventsAvailable: boolean;
|
30 | constructor(config: Config, _plt: Platform, _zone: NgZone, _dom: DomController);
|
31 | private listenV2(win);
|
32 | private listenV1(win);
|
33 | private blurActiveInput(shouldBlur);
|
34 | /**
|
35 | * Check to see if the keyboard is open or not.
|
36 | *
|
37 | * ```ts
|
38 | * export class MyClass {
|
39 | * constructor(public keyboard: Keyboard) {
|
40 | *
|
41 | * }
|
42 | *
|
43 | * keyboardCheck() {
|
44 | * console.log('The keyboard is open:', this.keyboard.isOpen());
|
45 | * }
|
46 | * }
|
47 | * ```
|
48 | *
|
49 | * @return {boolean} returns a true or false value if the keyboard is open or not.
|
50 | */
|
51 | isOpen(): boolean;
|
52 | /**
|
53 | * When the keyboard is closed, call any methods you want.
|
54 | *
|
55 | * ```ts
|
56 | * export class MyClass {
|
57 | * constructor(public keyboard: Keyboard) {
|
58 | * this.keyboard.onClose(this.closeCallback);
|
59 | * }
|
60 | * closeCallback() {
|
61 | *
|
62 | * console.log('Closing time');
|
63 | * }
|
64 | * }
|
65 | * ```
|
66 | *
|
67 | * @param {function} callback method you want to call when the keyboard has been closed.
|
68 | * @return {function} returns a callback that gets fired when the keyboard is closed.
|
69 | */
|
70 | onClose(callback: Function, pollingInternval?: number, pollingChecksMax?: number): Promise<any>;
|
71 | /**
|
72 | * Programmatically close the keyboard.
|
73 | */
|
74 | close(): void;
|
75 | /**
|
76 | * @hidden
|
77 | */
|
78 | focusOutline(setting: any): void;
|
79 | hasFocusedTextInput(): boolean;
|
80 | }
|
81 |
|
\ | No newline at end of file |