2016-03-19 00:05:07 -04:00
|
|
|
import {Plugin, Cordova} from './plugin';
|
|
|
|
|
2016-03-24 13:15:55 -04:00
|
|
|
/**
|
|
|
|
* @name Spinner Dialog
|
|
|
|
* @description
|
|
|
|
* @usage
|
|
|
|
* ```js
|
|
|
|
* import {SpinnerDialog} from 'ionic-native';
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* SpinnerDialog.show();
|
|
|
|
*
|
|
|
|
* SpinnerDialog.hide();
|
|
|
|
* ```
|
|
|
|
*/
|
2016-03-19 00:05:07 -04:00
|
|
|
@Plugin({
|
|
|
|
plugin: 'cordova-plugin-spinner-dialog',
|
|
|
|
pluginRef: 'window.plugins.spinnerDialog',
|
2016-03-24 13:15:55 -04:00
|
|
|
repo: 'https://github.com/Paldom/SpinnerDialog',
|
2016-04-29 23:56:49 -04:00
|
|
|
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
2016-03-19 00:05:07 -04:00
|
|
|
})
|
|
|
|
export class SpinnerDialog {
|
|
|
|
|
|
|
|
|
2016-03-24 13:15:55 -04:00
|
|
|
/**
|
|
|
|
* Shows the spinner dialog
|
|
|
|
* @param title {string} Spinner title (shows on Android only)
|
|
|
|
* @param message {string} Spinner message
|
|
|
|
* @param cancelCallback {boolean|function} Set to false to set spinner not cancelable. Or provide a function to call when the user cancels the spinner.
|
|
|
|
* @param iOSOptions {object} Options for iOS only
|
|
|
|
*/
|
|
|
|
@Cordova({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-04-29 23:56:49 -04:00
|
|
|
static show(title?: string, message?: string, cancelCallback?: any, iOSOptions?: SpinnerDialogIOSOptions): void {}
|
2016-03-24 13:15:55 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Hides the spinner dialog if visible
|
|
|
|
*/
|
2016-03-19 00:05:07 -04:00
|
|
|
@Cordova({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-04-29 23:56:49 -04:00
|
|
|
static hide(): void {}
|
2016-03-19 00:05:07 -04:00
|
|
|
|
2016-03-24 13:15:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface SpinnerDialogIOSOptions {
|
2016-04-29 23:56:49 -04:00
|
|
|
overlayOpacity?: number;
|
|
|
|
textColorRed?: number;
|
|
|
|
textColorGreen?: number;
|
|
|
|
textColorBlue?: number;
|
2016-03-19 00:05:07 -04:00
|
|
|
}
|