mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
docs(dialogs): fix jsdoc
This commit is contained in:
parent
9e744e7c29
commit
fc9add88dc
@ -1,9 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
export interface DialogsPromptCallback {
|
||||
|
||||
/**
|
||||
* The index of the pressed button. (Number) Note that the index uses one-based indexing, so the value is 1, 2, 3, etc.
|
||||
*/
|
||||
@ -13,10 +11,8 @@ export interface DialogsPromptCallback {
|
||||
* The text entered in the prompt dialog box. (String)
|
||||
*/
|
||||
input1: string;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @name Dialogs
|
||||
* @description
|
||||
@ -50,47 +46,60 @@ export interface DialogsPromptCallback {
|
||||
})
|
||||
@Injectable()
|
||||
export class Dialogs extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Shows a custom alert or dialog box.
|
||||
* @param {string} message Dialog message.
|
||||
* @param {string} title Dialog title. (Optional, defaults to Alert)
|
||||
* @param {string} buttonName Button name. (Optional, defaults to OK)
|
||||
* @param {string} [title] Dialog title. (Optional, defaults to Alert)
|
||||
* @param {string} [buttonName] Button name. (Optional, defaults to OK)
|
||||
* @returns {Promise<any>} Returns a blank promise once the user has dismissed the alert.
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 4
|
||||
})
|
||||
alert(message: string, title?: string, buttonName?: string): Promise<any> { return; }
|
||||
alert(message: string, title?: string, buttonName?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a customizable confirmation dialog box.
|
||||
* @param {string} message Dialog message.
|
||||
* @param {string} title Dialog title. (Optional, defaults to Confirm)
|
||||
* @param {Array<string>} buttonLabels Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
|
||||
* @param {string} [title] Dialog title. (Optional, defaults to Confirm)
|
||||
* @param {Array<string>} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
|
||||
* @returns {Promise<number>} Returns a promise that resolves the button index that was clicked, or 0 if the user has dismissed the dialog by clicking outside the dialog box. Note that the index use one-based indexing.
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 4
|
||||
})
|
||||
confirm(message: string, title?: string, buttonLabels?: string[]): Promise<number> { return; }
|
||||
confirm(
|
||||
message: string,
|
||||
title?: string,
|
||||
buttonLabels?: string[]
|
||||
): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a native dialog box that is more customizable than the browser's prompt function.
|
||||
* @param {string} message Dialog message.
|
||||
* @param {string} title Dialog title. (Optional, defaults to Prompt)
|
||||
* @param {Array<string>} buttonLabels Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
|
||||
* @param {string} defaultText Default textbox input value. (Optional, Default: empty string)
|
||||
* @param {string} [message] Dialog message.
|
||||
* @param {string} [title] Dialog title. (Optional, defaults to Prompt)
|
||||
* @param {Array<string>} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
|
||||
* @param {string} [defaultText] Default text box input value. (Optional, Default: empty string)
|
||||
* @returns {Promise<DialogsPromptCallback>} Returns a promise that resolves an object with the button index clicked and the text entered
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 5
|
||||
})
|
||||
prompt(message?: string, title?: string, buttonLabels?: string[], defaultText?: string): Promise<DialogsPromptCallback> { return; }
|
||||
|
||||
prompt(
|
||||
message?: string,
|
||||
title?: string,
|
||||
buttonLabels?: string[],
|
||||
defaultText?: string
|
||||
): Promise<DialogsPromptCallback> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The device plays a beep sound.
|
||||
@ -99,6 +108,5 @@ export class Dialogs extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
beep(times: number): void { }
|
||||
|
||||
beep(times: number): void {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user