From 8d6c2dfb9abb5768c820ca80c7d1a7dfa80decb6 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Tue, 29 Nov 2016 13:11:15 -0500 Subject: [PATCH 1/5] docs(datepicker): update docs --- src/plugins/datepicker.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/datepicker.ts b/src/plugins/datepicker.ts index 57bfe705..ede2450c 100644 --- a/src/plugins/datepicker.ts +++ b/src/plugins/datepicker.ts @@ -107,10 +107,6 @@ export interface DatePickerOptions { * @description * The DatePicker plugin allows the user to fetch date or time using native dialogs. * - * Platforms supported: iOS, Android, Windows - * - * Requires Cordova plugin: `cordova-plugin-datepicker`. For more info, please see the [DatePicker plugin docs](https://github.com/VitaliiBlagodir/cordova-plugin-datepicker). - * * @usage * ```typescript * import { DatePicker } from 'ionic-native'; @@ -131,7 +127,8 @@ export interface DatePickerOptions { pluginName: 'DatePicker', plugin: 'cordova-plugin-datepicker', pluginRef: 'datePicker', - repo: 'https://github.com/VitaliiBlagodir/cordova-plugin-datepicker' + repo: 'https://github.com/VitaliiBlagodir/cordova-plugin-datepicker', + platforms: ['Android', 'iOS', 'Windows'] }) export class DatePicker { From 785646800b3a1656328ed4e069d2355bb2cf45b3 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Tue, 29 Nov 2016 13:13:35 -0500 Subject: [PATCH 2/5] refractor(backgroundmode): fix return types --- src/plugins/backgroundmode.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/backgroundmode.ts b/src/plugins/backgroundmode.ts index 3896602d..ae697c25 100644 --- a/src/plugins/backgroundmode.ts +++ b/src/plugins/backgroundmode.ts @@ -49,7 +49,7 @@ export class BackgroundMode { * Once the background mode has been disabled, the app will be paused when in background. */ @Cordova() - static disable(): void { } + static disable(): Promise { return; } /** * Checks if background mode is enabled or not. @@ -73,7 +73,7 @@ export class BackgroundMode { @Cordova({ platforms: ['Android'] }) - static setDefaults(options?: Configure): void { } + static setDefaults(options?: Configure): Promise { return; } /** * Modify the displayed information. @@ -83,7 +83,7 @@ export class BackgroundMode { @Cordova({ platforms: ['Android'] }) - static configure(options?: Configure): void { } + static configure(options?: Configure): Promise { return; } /** * Called when background mode is activated. From 5b98a808286af671da3d341d87af68f40eb61651 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Tue, 29 Nov 2016 13:14:34 -0500 Subject: [PATCH 3/5] docs(backgroundmode): update docs --- src/plugins/backgroundmode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/backgroundmode.ts b/src/plugins/backgroundmode.ts index ae697c25..a76e7fd5 100644 --- a/src/plugins/backgroundmode.ts +++ b/src/plugins/backgroundmode.ts @@ -53,14 +53,14 @@ export class BackgroundMode { /** * Checks if background mode is enabled or not. - * @returns {Promise} returns a true of false if the background mode is enabled. + * @returns {Promise} returns a promise that resolves with boolean that indicates if the background mode is enabled. */ @Cordova() static isEnabled(): Promise { return; } /** * Can be used to get the information if the background mode is active. - * @returns {Promise} returns true or false if the background mode is active. + * @returns {Promise} returns a promise that resolves with boolean that indicates if the background mode is active. */ @Cordova() static isActive(): Promise { return; } From efb2ee78807778bafe9dd0c64ff396ca2b188b39 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Tue, 29 Nov 2016 13:33:11 -0500 Subject: [PATCH 4/5] refractor(camera): remove public statements --- src/plugins/camera.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/camera.ts b/src/plugins/camera.ts index 2942162f..d30cbe08 100644 --- a/src/plugins/camera.ts +++ b/src/plugins/camera.ts @@ -121,7 +121,7 @@ export class Camera { * @private * @enum {number} */ - public static DestinationType = { + static DestinationType = { /** Return base64 encoded string. DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI or NATIVE_URI if possible */ DATA_URL: 0, /** Return file uri (content://media/external/images/media/2 for Android) */ @@ -134,7 +134,7 @@ export class Camera { * @private * @enum {number} */ - public static EncodingType = { + static EncodingType = { /** Return JPEG encoded image */ JPEG: 0, /** Return PNG encoded image */ @@ -144,7 +144,7 @@ export class Camera { * @private * @enum {number} */ - public static MediaType = { + static MediaType = { /** Allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType */ PICTURE: 0, /** Allow selection of video only, ONLY RETURNS URL */ @@ -157,7 +157,7 @@ export class Camera { * @private * @enum {number} */ - public static PictureSourceType = { + static PictureSourceType = { /** Choose image from picture library (same as SAVEDPHOTOALBUM for Android) */ PHOTOLIBRARY: 0, /** Take picture from camera */ @@ -171,7 +171,7 @@ export class Camera { * Matches iOS UIPopoverArrowDirection constants to specify arrow location on popover. * @enum {number} */ - public static PopoverArrowDirection = { + static PopoverArrowDirection = { ARROW_UP: 1, ARROW_DOWN: 2, ARROW_LEFT: 4, @@ -183,7 +183,7 @@ export class Camera { * @private * @enum {number} */ - public static Direction = { + static Direction = { /** Use the back-facing camera */ BACK: 0, /** Use the front-facing camera */ From 1072ab115b382cb35df737ca4c00e305c0c2ed25 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Tue, 29 Nov 2016 14:28:26 -0500 Subject: [PATCH 5/5] fix(globalization): add missing parameter to numberToString function closes #835 --- src/plugins/globalization.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/globalization.ts b/src/plugins/globalization.ts index 172ba6c6..fe4f880d 100644 --- a/src/plugins/globalization.ts +++ b/src/plugins/globalization.ts @@ -93,13 +93,14 @@ export class Globalization { /** * Returns a number formatted as a string according to the client's user preferences. - * @param options + * @param number {Number} The number to convert + * @param options {Object} Object with property `type` that can be set to: decimal, percent, or currency. */ @Cordova({ successIndex: 1, errorIndex: 2 }) - static numberToString(options: { type: string }): Promise<{ value: string }> { return; } + static numberToString(number: number, options: { type: string }): Promise<{ value: string }> { return; } /** *