mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
chore(): update ActionSheet
This commit is contained in:
parent
927b1b1088
commit
b2f136773e
32
dist/plugins/actionsheet.d.ts
vendored
32
dist/plugins/actionsheet.d.ts
vendored
@ -1,4 +1,32 @@
|
||||
export declare class ActionSheet {
|
||||
static show(options: any): void;
|
||||
static hide(options: any): void;
|
||||
/**
|
||||
* Show the ActionSheet.
|
||||
* @param {options}
|
||||
* Available options:
|
||||
* buttonLabels: string[]
|
||||
* title: string
|
||||
* androidTheme (Android only): number 1-5
|
||||
* androidEnableCancelButton (Android only): boolean, default false
|
||||
* winphoneEnableCancelButton (WP only): boolean, default false
|
||||
* addCancelButtonWithLabel: string
|
||||
* addDestructiveButtonWithLabel: string
|
||||
* position: [x, y] (iPad pass in [x, y] coords of popover)
|
||||
* @returns {Promise} returns a promise that resolves with a number indicating
|
||||
* which button was pressed (1 for first, 2 for second).
|
||||
*/
|
||||
static show(options?: {
|
||||
buttonLabels: string[];
|
||||
title?: string;
|
||||
androidTheme?: number;
|
||||
androidEnableCancelButton?: boolean;
|
||||
winphoneEnableCancelButton?: boolean;
|
||||
addCancelButtonWithLabel?: string;
|
||||
addDestructiveButtonWithLabel?: string;
|
||||
position?: number[];
|
||||
}): Promise<any>;
|
||||
/**
|
||||
* Hide the ActionSheet.
|
||||
* @param {options}
|
||||
*/
|
||||
static hide(options: any): Promise<any>;
|
||||
}
|
||||
|
33
dist/plugins/actionsheet.js
vendored
33
dist/plugins/actionsheet.js
vendored
@ -8,9 +8,38 @@ var plugin_1 = require('./plugin');
|
||||
var ActionSheet = (function () {
|
||||
function ActionSheet() {
|
||||
}
|
||||
ActionSheet.show = function (options) { };
|
||||
/**
|
||||
* Show the ActionSheet.
|
||||
* @param {options}
|
||||
* Available options:
|
||||
* buttonLabels: string[]
|
||||
* title: string
|
||||
* androidTheme (Android only): number 1-5
|
||||
* androidEnableCancelButton (Android only): boolean, default false
|
||||
* winphoneEnableCancelButton (WP only): boolean, default false
|
||||
* addCancelButtonWithLabel: string
|
||||
* addDestructiveButtonWithLabel: string
|
||||
* position: [x, y] (iPad pass in [x, y] coords of popover)
|
||||
* @returns {Promise} returns a promise that resolves with a number indicating
|
||||
* which button was pressed (1 for first, 2 for second).
|
||||
*/
|
||||
ActionSheet.show = function (options) {
|
||||
// This returned Promise is replaced by one from the @Cordova decorator,
|
||||
// but since there's no way for TypeScript to know the return type from a
|
||||
// decorator we provide it. See https://github.com/Microsoft/TypeScript/issues/4881.
|
||||
return new Promise(function (s, e) { });
|
||||
};
|
||||
;
|
||||
ActionSheet.hide = function (options) { };
|
||||
/**
|
||||
* Hide the ActionSheet.
|
||||
* @param {options}
|
||||
*/
|
||||
ActionSheet.hide = function (options) {
|
||||
// This returned Promise is replaced by one from the @Cordova decorator,
|
||||
// but since there's no way for TypeScript to know the return type from a
|
||||
// decorator we provide it. See https://github.com/Microsoft/TypeScript/issues/4881.
|
||||
return new Promise(function (s, e) { });
|
||||
};
|
||||
;
|
||||
__decorate([
|
||||
plugin_1.Cordova()
|
||||
|
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;IAAAA;IAYAC,CAACA;IAJQD,gBAAIA,GADXA,UACYA,OAAWA,IAAEE,CAACA;;IAGnBF,gBAAIA,GADXA,UACYA,OAAWA,IAAEG,CAACA;;IAJ1BH;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAAeA;IAE1BA;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAAeA;IAX5BA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,aAAaA;YACnBA,MAAMA,EAAEA,4BAA4BA;YACpCA,SAASA,EAAEA,qBAAqBA;YAChCA,IAAIA,EAAEA,8DAA8DA;SACrEA,CAACA;oBAODA;IAADA,kBAACA;AAADA,CAACA,AAZD,IAYC;AANY,mBAAW,cAMvB,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;IAAAA;IAoDAC,CAACA;IA5CCD;;;;;;;;;;;;;;OAcGA;IAEIA,gBAAIA,GADXA,UACYA,OASXA;QACCE,wEAAwEA;QACxEA,yEAAyEA;QACzEA,oFAAoFA;QACpFA,MAAMA,CAACA,IAAIA,OAAOA,CAAMA,UAACA,CAACA,EAAEA,CAACA,IAAMA,CAACA,CAACA,CAACA;IACxCA,CAACA;;IAGDF;;;OAGGA;IAEIA,gBAAIA,GADXA,UACYA,OAAWA;QACrBG,wEAAwEA;QACxEA,yEAAyEA;QACzEA,oFAAoFA;QACpFA,MAAMA,CAACA,IAAIA,OAAOA,CAAMA,UAACA,CAACA,EAAEA,CAACA,IAAMA,CAACA,CAACA,CAACA;IACxCA,CAACA;;IA5BDH;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAcVA;IAODA;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAKVA;IAnDHA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,aAAaA;YACnBA,MAAMA,EAAEA,4BAA4BA;YACpCA,SAASA,EAAEA,qBAAqBA;YAChCA,IAAIA,EAAEA,8DAA8DA;SACrEA,CAACA;oBA+CDA;IAADA,kBAACA;AAADA,CAACA,AApDD,IAoDC;AA9CY,mBAAW,cA8CvB,CAAA"}
|
@ -7,9 +7,49 @@ import {Plugin, Cordova} from './plugin';
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet'
|
||||
})
|
||||
export class ActionSheet {
|
||||
@Cordova()
|
||||
static show(options:any){};
|
||||
|
||||
/**
|
||||
* Show the ActionSheet.
|
||||
* @param {options}
|
||||
* Available options:
|
||||
* buttonLabels: string[]
|
||||
* title: string
|
||||
* androidTheme (Android only): number 1-5
|
||||
* androidEnableCancelButton (Android only): boolean, default false
|
||||
* winphoneEnableCancelButton (WP only): boolean, default false
|
||||
* addCancelButtonWithLabel: string
|
||||
* addDestructiveButtonWithLabel: string
|
||||
* position: [x, y] (iPad pass in [x, y] coords of popover)
|
||||
* @returns {Promise} returns a promise that resolves with a number indicating
|
||||
* which button was pressed (1 for first, 2 for second).
|
||||
*/
|
||||
@Cordova()
|
||||
static hide(options:any){};
|
||||
static show(options?: {
|
||||
buttonLabels: string[],
|
||||
title?: string,
|
||||
androidTheme?: number,
|
||||
androidEnableCancelButton?: boolean,
|
||||
winphoneEnableCancelButton?: boolean,
|
||||
addCancelButtonWithLabel?: string,
|
||||
addDestructiveButtonWithLabel?: string,
|
||||
position?: number[]
|
||||
}){
|
||||
// This returned Promise is replaced by one from the @Cordova decorator,
|
||||
// but since there's no way for TypeScript to know the return type from a
|
||||
// decorator we provide it. See https://github.com/Microsoft/TypeScript/issues/4881.
|
||||
return new Promise<any>((s, e) => {});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Hide the ActionSheet.
|
||||
* @param {options}
|
||||
*/
|
||||
@Cordova()
|
||||
static hide(options:any){
|
||||
// This returned Promise is replaced by one from the @Cordova decorator,
|
||||
// but since there's no way for TypeScript to know the return type from a
|
||||
// decorator we provide it. See https://github.com/Microsoft/TypeScript/issues/4881.
|
||||
return new Promise<any>((s, e) => {});
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user