docs(actionsheet): update
This commit is contained in:
parent
7985cf03a6
commit
8562195533
40
dist/plugins/actionsheet.d.ts
vendored
40
dist/plugins/actionsheet.d.ts
vendored
@ -1,20 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
* The ActionSheet plugin shows a native list of options the user can choose from.
|
* The ActionSheet plugin shows a native list of options the user can choose from.
|
||||||
|
*
|
||||||
|
* Requires Cordova plugin: `cordova-plugin-actionsheet`. For more info, please see the [ActionSheet plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
|
||||||
|
*
|
||||||
|
* @usage
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* import {ActionSheet} from 'ionic-native';
|
||||||
|
*
|
||||||
|
* let buttonLabels = ['Share via Facebook', 'Share via Twitter'];
|
||||||
|
* ActionSheet.show({
|
||||||
|
* 'title': 'What do you want with this image?',
|
||||||
|
* 'buttonLabels': buttonLabels,
|
||||||
|
* 'addCancelButtonWithLabel': 'Cancel',
|
||||||
|
* 'addDestructiveButtonWithLabel' : 'Delete'
|
||||||
|
* }).then(buttonIndex => {
|
||||||
|
* console.log('Button pressed: ' + buttonLabels[buttonIndex - 1]);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
export declare class ActionSheet {
|
export declare class ActionSheet {
|
||||||
/**
|
/**
|
||||||
* Show the ActionSheet.
|
* Show the ActionSheet.
|
||||||
* @param {options}
|
* @param {options} options
|
||||||
* Available options:
|
* `buttonLabels`: string[]
|
||||||
* buttonLabels: string[]
|
* `title`: string
|
||||||
* title: string
|
* `androidTheme` (Android only): number 1-5
|
||||||
* androidTheme (Android only): number 1-5
|
* `androidEnableCancelButton` (Android only): boolean, default false
|
||||||
* androidEnableCancelButton (Android only): boolean, default false
|
* `winphoneEnableCancelButton` (WP only): boolean, default false
|
||||||
* winphoneEnableCancelButton (WP only): boolean, default false
|
* `addCancelButtonWithLabel`: string
|
||||||
* addCancelButtonWithLabel: string
|
* `addDestructiveButtonWithLabel`: string
|
||||||
* addDestructiveButtonWithLabel: string
|
* `position`: [x, y] (iPad pass in [x, y] coords of popover)
|
||||||
* position: [x, y] (iPad pass in [x, y] coords of popover)
|
* @returns {Promise} Returns a Promise that resolves with the index of the
|
||||||
* @returns {Promise} returns a promise that resolves with the index of the
|
|
||||||
* button pressed (1 based, so 1, 2, 3, etc.)
|
* button pressed (1 based, so 1, 2, 3, etc.)
|
||||||
*/
|
*/
|
||||||
static show(options?: {
|
static show(options?: {
|
||||||
|
42
dist/plugins/actionsheet.js
vendored
42
dist/plugins/actionsheet.js
vendored
@ -7,23 +7,41 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|||||||
var plugin_1 = require('./plugin');
|
var plugin_1 = require('./plugin');
|
||||||
/**
|
/**
|
||||||
* The ActionSheet plugin shows a native list of options the user can choose from.
|
* The ActionSheet plugin shows a native list of options the user can choose from.
|
||||||
|
*
|
||||||
|
* Requires Cordova plugin: `cordova-plugin-actionsheet`. For more info, please see the [ActionSheet plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
|
||||||
|
*
|
||||||
|
* @usage
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* import {ActionSheet} from 'ionic-native';
|
||||||
|
*
|
||||||
|
* let buttonLabels = ['Share via Facebook', 'Share via Twitter'];
|
||||||
|
* ActionSheet.show({
|
||||||
|
* 'title': 'What do you want with this image?',
|
||||||
|
* 'buttonLabels': buttonLabels,
|
||||||
|
* 'addCancelButtonWithLabel': 'Cancel',
|
||||||
|
* 'addDestructiveButtonWithLabel' : 'Delete'
|
||||||
|
* }).then(buttonIndex => {
|
||||||
|
* console.log('Button pressed: ' + buttonLabels[buttonIndex - 1]);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
var ActionSheet = (function () {
|
var ActionSheet = (function () {
|
||||||
function ActionSheet() {
|
function ActionSheet() {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Show the ActionSheet.
|
* Show the ActionSheet.
|
||||||
* @param {options}
|
* @param {options} options
|
||||||
* Available options:
|
* `buttonLabels`: string[]
|
||||||
* buttonLabels: string[]
|
* `title`: string
|
||||||
* title: string
|
* `androidTheme` (Android only): number 1-5
|
||||||
* androidTheme (Android only): number 1-5
|
* `androidEnableCancelButton` (Android only): boolean, default false
|
||||||
* androidEnableCancelButton (Android only): boolean, default false
|
* `winphoneEnableCancelButton` (WP only): boolean, default false
|
||||||
* winphoneEnableCancelButton (WP only): boolean, default false
|
* `addCancelButtonWithLabel`: string
|
||||||
* addCancelButtonWithLabel: string
|
* `addDestructiveButtonWithLabel`: string
|
||||||
* addDestructiveButtonWithLabel: string
|
* `position`: [x, y] (iPad pass in [x, y] coords of popover)
|
||||||
* position: [x, y] (iPad pass in [x, y] coords of popover)
|
* @returns {Promise} Returns a Promise that resolves with the index of the
|
||||||
* @returns {Promise} returns a promise that resolves with the index of the
|
|
||||||
* button pressed (1 based, so 1, 2, 3, etc.)
|
* button pressed (1 based, so 1, 2, 3, etc.)
|
||||||
*/
|
*/
|
||||||
ActionSheet.show = function (options) {
|
ActionSheet.show = function (options) {
|
||||||
@ -34,7 +52,6 @@ var ActionSheet = (function () {
|
|||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||||
return new Promise(function (res, rej) { });
|
return new Promise(function (res, rej) { });
|
||||||
};
|
};
|
||||||
;
|
|
||||||
/**
|
/**
|
||||||
* Hide the ActionSheet.
|
* Hide the ActionSheet.
|
||||||
*/
|
*/
|
||||||
@ -46,7 +63,6 @@ var ActionSheet = (function () {
|
|||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||||
return new Promise(function (res, rej) { });
|
return new Promise(function (res, rej) { });
|
||||||
};
|
};
|
||||||
;
|
|
||||||
__decorate([
|
__decorate([
|
||||||
plugin_1.Cordova()
|
plugin_1.Cordova()
|
||||||
], ActionSheet, "show", null);
|
], ActionSheet, "show", null);
|
||||||
|
2
dist/plugins/actionsheet.js.map
vendored
2
dist/plugins/actionsheet.js.map
vendored
@ -1 +1 @@
|
|||||||
{"version":3,"file":"actionsheet.js","sourceRoot":"","sources":["../../src/plugins/actionsheet.ts"],"names":["ActionSheet","ActionSheet.constructor","ActionSheet.show","ActionSheet.hide"],"mappings":";;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAEzC;;GAEG;AACH;IAAAA;IAuDAC,CAACA;IA/CCD;;;;;;;;;;;;;;OAcGA;IAEIA,gBAAIA,GADXA,UACYA,OASXA;QACCE,yEAAyEA;QACzEA,oEAAoEA;QACpEA,wEAAwEA;QACxEA,mDAAmDA;QACnDA,0DAA0DA;QAC1DA,MAAMA,CAACA,IAAIA,OAAOA,CAAMA,UAACA,GAAGA,EAAEA,GAAGA,IAAMA,CAACA,CAACA,CAACA;IAC5CA,CAACA;;IAGDF;;OAEGA;IAEIA,gBAAIA,GADXA;QAEEG,yEAAyEA;QACzEA,oEAAoEA;QACpEA,wEAAwEA;QACxEA,mDAAmDA;QACnDA,0DAA0DA;QAC1DA,MAAMA,CAACA,IAAIA,OAAOA,CAAMA,UAACA,GAAGA,EAAEA,GAAGA,IAAMA,CAACA,CAACA,CAACA;IAC5CA,CAACA;;IA/BDH;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAgBVA;IAMDA;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAOVA;IAtDHA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,aAAaA;YACnBA,MAAMA,EAAEA,4BAA4BA;YACpCA,SAASA,EAAEA,qBAAqBA;YAChCA,IAAIA,EAAEA,8DAA8DA;SACrEA,CAACA;oBAkDDA;IAADA,kBAACA;AAADA,CAACA,AAvDD,IAuDC;AAjDY,mBAAW,cAiDvB,CAAA"}
|
{"version":3,"file":"actionsheet.js","sourceRoot":"","sources":["../../src/plugins/actionsheet.ts"],"names":["ActionSheet","ActionSheet.constructor","ActionSheet.show","ActionSheet.hide"],"mappings":";;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IAAAA;IAsDAC,CAACA;IA9CCD;;;;;;;;;;;;;OAaGA;IAEIA,gBAAIA,GADXA,UACYA,OASXA;QACCE,yEAAyEA;QACzEA,oEAAoEA;QACpEA,wEAAwEA;QACxEA,mDAAmDA;QACnDA,0DAA0DA;QAC1DA,MAAMA,CAACA,IAAIA,OAAOA,CAAMA,UAACA,GAAGA,EAAEA,GAAGA,IAAMA,CAACA,CAACA,CAACA;IAC5CA,CAACA;IAGDF;;OAEGA;IAEIA,gBAAIA,GADXA;QAEEG,yEAAyEA;QACzEA,oEAAoEA;QACpEA,wEAAwEA;QACxEA,mDAAmDA;QACnDA,0DAA0DA;QAC1DA,MAAMA,CAACA,IAAIA,OAAOA,CAAMA,UAACA,GAAGA,EAAEA,GAAGA,IAAMA,CAACA,CAACA,CAACA;IAC5CA,CAACA;IA/BDH;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAgBVA;IAMDA;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAOVA;IArDHA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,aAAaA;YACnBA,MAAMA,EAAEA,4BAA4BA;YACpCA,SAASA,EAAEA,qBAAqBA;YAChCA,IAAIA,EAAEA,8DAA8DA;SACrEA,CAACA;oBAiDDA;IAADA,kBAACA;AAADA,CAACA,AAtDD,IAsDC;AAhDY,mBAAW,cAgDvB,CAAA"}
|
@ -2,6 +2,25 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The ActionSheet plugin shows a native list of options the user can choose from.
|
* The ActionSheet plugin shows a native list of options the user can choose from.
|
||||||
|
*
|
||||||
|
* Requires Cordova plugin: `cordova-plugin-actionsheet`. For more info, please see the [ActionSheet plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
|
||||||
|
*
|
||||||
|
* @usage
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* import {ActionSheet} from 'ionic-native';
|
||||||
|
*
|
||||||
|
* let buttonLabels = ['Share via Facebook', 'Share via Twitter'];
|
||||||
|
* ActionSheet.show({
|
||||||
|
* 'title': 'What do you want with this image?',
|
||||||
|
* 'buttonLabels': buttonLabels,
|
||||||
|
* 'addCancelButtonWithLabel': 'Cancel',
|
||||||
|
* 'addDestructiveButtonWithLabel' : 'Delete'
|
||||||
|
* }).then(buttonIndex => {
|
||||||
|
* console.log('Button pressed: ' + buttonLabels[buttonIndex - 1]);
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
name: 'ActionSheet',
|
name: 'ActionSheet',
|
||||||
@ -13,17 +32,16 @@ export class ActionSheet {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the ActionSheet.
|
* Show the ActionSheet.
|
||||||
* @param {options}
|
* @param {options} options
|
||||||
* Available options:
|
* `buttonLabels`: string[]
|
||||||
* buttonLabels: string[]
|
* `title`: string
|
||||||
* title: string
|
* `androidTheme` (Android only): number 1-5
|
||||||
* androidTheme (Android only): number 1-5
|
* `androidEnableCancelButton` (Android only): boolean, default false
|
||||||
* androidEnableCancelButton (Android only): boolean, default false
|
* `winphoneEnableCancelButton` (WP only): boolean, default false
|
||||||
* winphoneEnableCancelButton (WP only): boolean, default false
|
* `addCancelButtonWithLabel`: string
|
||||||
* addCancelButtonWithLabel: string
|
* `addDestructiveButtonWithLabel`: string
|
||||||
* addDestructiveButtonWithLabel: string
|
* `position`: [x, y] (iPad pass in [x, y] coords of popover)
|
||||||
* position: [x, y] (iPad pass in [x, y] coords of popover)
|
* @returns {Promise} Returns a Promise that resolves with the index of the
|
||||||
* @returns {Promise} returns a promise that resolves with the index of the
|
|
||||||
* button pressed (1 based, so 1, 2, 3, etc.)
|
* button pressed (1 based, so 1, 2, 3, etc.)
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -43,7 +61,7 @@ export class ActionSheet {
|
|||||||
// for it to know the return type from a decorator.
|
// for it to know the return type from a decorator.
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||||
return new Promise<any>((res, rej) => {});
|
return new Promise<any>((res, rej) => {});
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,5 +75,5 @@ export class ActionSheet {
|
|||||||
// for it to know the return type from a decorator.
|
// for it to know the return type from a decorator.
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||||
return new Promise<any>((res, rej) => {});
|
return new Promise<any>((res, rej) => {});
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user