mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +08:00
fix(keyboard): Update types with new 2.2.0 methods (#3187)
This commit is contained in:
parent
a575233f23
commit
a1fb93707f
@ -2,6 +2,19 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
export enum KeyboardStyle {
|
||||||
|
Light = 'light',
|
||||||
|
Dark = 'dark'
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum KeyboardResizeMode {
|
||||||
|
Native = 'native',
|
||||||
|
Ionic = 'ionic',
|
||||||
|
Body = 'body',
|
||||||
|
None = 'none'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Keyboard
|
* @name Keyboard
|
||||||
* @description
|
* @description
|
||||||
@ -43,7 +56,10 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
||||||
* @param hide {boolean}
|
* @param hide {boolean}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({
|
||||||
|
sync: true,
|
||||||
|
platforms: ['iOS']
|
||||||
|
})
|
||||||
hideFormAccessoryBar(hide: boolean): void {}
|
hideFormAccessoryBar(hide: boolean): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,7 +88,27 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
setResizeMode(mode: string): void {}
|
setResizeMode(mode: KeyboardResizeMode): void {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Programatically set Keyboard style
|
||||||
|
* @param mode {string}
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
sync: true,
|
||||||
|
platforms: ['iOS']
|
||||||
|
})
|
||||||
|
setKeyboardStyle(style: KeyboardStyle): void {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Programatically enable or disable the WebView scroll
|
||||||
|
* @param mode {string}
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
sync: true,
|
||||||
|
platforms: ['iOS']
|
||||||
|
})
|
||||||
|
disableScroll(disable: boolean): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch.
|
* Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch.
|
||||||
@ -100,6 +136,19 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an observable that notifies you when the keyboard did show. Unsubscribe to observable to cancel event watch.
|
||||||
|
* @returns {Observable<any>}
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
eventObservable: true,
|
||||||
|
event: 'keyboardDidShow',
|
||||||
|
platforms: ['iOS', 'Android']
|
||||||
|
})
|
||||||
|
onKeyboardDidShow(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
@ -125,4 +174,17 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
onKeyboardWillHide(): Observable<any> {
|
onKeyboardWillHide(): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an observable that notifies you when the keyboard did hide. Unsubscribe to observable to cancel event watch.
|
||||||
|
* @returns {Observable<any>}
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
eventObservable: true,
|
||||||
|
event: 'keyboardDidHide',
|
||||||
|
platforms: ['iOS', 'Android']
|
||||||
|
})
|
||||||
|
onKeyboardDidHide(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user