From dd698104944197026772e81ebafaecf6824cc9b5 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Fri, 28 Apr 2017 15:32:13 +0200 Subject: [PATCH 001/115] docs(printer): fix example (#1439) `this.p` is not defined as Printer is imported as `printer` --- src/@ionic-native/plugins/printer/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/printer/index.ts b/src/@ionic-native/plugins/printer/index.ts index 845c8ddd8..a5ccd264d 100644 --- a/src/@ionic-native/plugins/printer/index.ts +++ b/src/@ionic-native/plugins/printer/index.ts @@ -62,7 +62,7 @@ export interface PrintOptions { * grayscale: true * }; * - * this.p.print(content, options).then(onSuccess, onError); + * this.printer.print(content, options).then(onSuccess, onError); * ``` * @interfaces * PrintOptions From f699c6d4b75b06945a574574fd3bf3eecced7b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bryder?= Date: Fri, 28 Apr 2017 15:32:44 +0200 Subject: [PATCH 002/115] feat(native-page-transitions): add pendingTransition methods (#1344) --- .../plugins/native-page-transitions/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/@ionic-native/plugins/native-page-transitions/index.ts b/src/@ionic-native/plugins/native-page-transitions/index.ts index 3000481ff..b3257dd17 100644 --- a/src/@ionic-native/plugins/native-page-transitions/index.ts +++ b/src/@ionic-native/plugins/native-page-transitions/index.ts @@ -113,4 +113,18 @@ export class NativePageTransitions extends IonicNativePlugin { @Cordova({platforms: ['iOS']}) curl(options: NativeTransitionOptions): Promise { return; } + /** + * Execute pending transition + * @returns {Promise} + */ + @Cordova() + executePendingTransition(): Promise { return; } + + /** + * Cancel pending transition + * @returns {Promise} + */ + @Cordova() + cancelPendingTransition(): Promise { return; } + } From 83a35691552a9be0995913827a6e0cc9b4dc9b64 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Fri, 28 Apr 2017 15:33:05 +0200 Subject: [PATCH 003/115] docs(): remove identifier from product id (#1432) --- src/@ionic-native/plugins/in-app-purchase/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/@ionic-native/plugins/in-app-purchase/index.ts b/src/@ionic-native/plugins/in-app-purchase/index.ts index 307c6485d..0310dd5b9 100644 --- a/src/@ionic-native/plugins/in-app-purchase/index.ts +++ b/src/@ionic-native/plugins/in-app-purchase/index.ts @@ -16,7 +16,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; * ... * * this.iap - * .getProducts(['com.yourapp.prod1', 'com.yourapp.prod2', ...]) + * .getProducts(['prod1', 'prod2', ...]) * .then((products) => { * console.log(products); * // [{ productId: 'com.yourapp.prod1', 'title': '...', description: '...', price: '...' }, ...] @@ -27,7 +27,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; * * * this.iap - * .buy('com.yourapp.prod1') + * .buy('prod1') * .then((data)=> { * console.log(data); * // { @@ -47,7 +47,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; * ```ts * // fist buy the product... * this.iap - * .buy('com.yourapp.consumable_prod1') + * .buy('consumable_prod1') * .then(data => this.iap.consume(data.productType, data.receipt, data.signature)) * .then(() => console.log('product was successfully consumed!')) * .catch( err=> console.log(err)) From 4ca4f9443dc4664fcea6c4cfcb8d809bf6cc90a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianfranc=C3=B8=20Palumbo?= Date: Fri, 28 Apr 2017 14:33:30 +0100 Subject: [PATCH 004/115] docs(): fix typos (#1435) the OCD in me is here to help :P --- src/@ionic-native/plugins/firebase/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@ionic-native/plugins/firebase/index.ts b/src/@ionic-native/plugins/firebase/index.ts index 8c42c587f..166521cce 100644 --- a/src/@ionic-native/plugins/firebase/index.ts +++ b/src/@ionic-native/plugins/firebase/index.ts @@ -60,7 +60,7 @@ export class Firebase extends IonicNativePlugin { onNotificationOpen(): Observable { return; } /** - * Grant permission to recieve push notifications + * Grant permission to receive push notifications * @return {Promise} */ @Cordova({ @@ -69,7 +69,7 @@ export class Firebase extends IonicNativePlugin { grantPermission(): Promise { return; } /** - * Check permission to recieve push notifications + * Check permission to receive push notifications * @return {Promise} */ @Cordova({ From 11232992748f8940274610476e4b2fffed90c1e0 Mon Sep 17 00:00:00 2001 From: Robert Coie Date: Fri, 28 Apr 2017 06:35:33 -0700 Subject: [PATCH 005/115] refactor(barcode-scanner): improve typings (#1437) --- src/@ionic-native/plugins/barcode-scanner/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/barcode-scanner/index.ts b/src/@ionic-native/plugins/barcode-scanner/index.ts index 1d4eb4b94..ee2fe178c 100644 --- a/src/@ionic-native/plugins/barcode-scanner/index.ts +++ b/src/@ionic-native/plugins/barcode-scanner/index.ts @@ -56,6 +56,12 @@ export interface BarcodeScannerOptions { } +export interface BarcodeScanResult { + format: "QR_CODE" | "DATA_MATRIX" | "UPC_E" | "UPC_A" | "EAN_8" | "EAN_13" | "CODE_128" | "CODE_39" | "CODE_93" | "CODABAR" | "ITF" | "RSS14" | "RSS_EXPANDED" | "PDF417" | "AZTEC" | "MSI"; + cancelled: boolean; + text: string; +} + /** * @name Barcode Scanner * @description @@ -80,6 +86,7 @@ export interface BarcodeScannerOptions { * ``` * @interfaces * BarcodeScannerOptions + * BarcodeScanResult */ @Plugin({ pluginName: 'BarcodeScanner', @@ -111,7 +118,7 @@ export class BarcodeScanner extends IonicNativePlugin { @Cordova({ callbackOrder: 'reverse' }) - scan(options?: BarcodeScannerOptions): Promise { return; } + scan(options?: BarcodeScannerOptions): Promise { return; } /** * Encodes data into a barcode. From 11dbe42a0d116e49ae3f29de046322163bd80ef8 Mon Sep 17 00:00:00 2001 From: Patrick Reames Date: Fri, 28 Apr 2017 08:39:28 -0700 Subject: [PATCH 006/115] feat(firebase): add support for firebase ErrorLog (#1440) * feat(firebase): add support for firebase ErrorLog * feat(firebase): add support for firebase ErrorLog --- src/@ionic-native/plugins/firebase/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/@ionic-native/plugins/firebase/index.ts b/src/@ionic-native/plugins/firebase/index.ts index 166521cce..92aaf1a26 100644 --- a/src/@ionic-native/plugins/firebase/index.ts +++ b/src/@ionic-native/plugins/firebase/index.ts @@ -117,6 +117,14 @@ export class Firebase extends IonicNativePlugin { @Cordova() logEvent(type: string, data: any): Promise { return; } + /** + * Log an Error using FirebaseCrash + * @param message {string} + * @return {Promise} + */ + @Cordova() + logError(message: string): Promise { return; } + /** * Set the name of the current screen in Analytics * @param name {string} Screen name From 58ad707dc32f93fe7aad9164b0000c4d8cce5bf4 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sun, 30 Apr 2017 19:18:49 +0200 Subject: [PATCH 007/115] docs(secure storage): rename item to key (#1445) --- src/@ionic-native/plugins/secure-storage/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/@ionic-native/plugins/secure-storage/index.ts b/src/@ionic-native/plugins/secure-storage/index.ts index 273d2e375..adecbc6b8 100644 --- a/src/@ionic-native/plugins/secure-storage/index.ts +++ b/src/@ionic-native/plugins/secure-storage/index.ts @@ -80,19 +80,19 @@ export class SecureStorageObject { * this.secureStorage.create('my_store_name') * .then((storage: SecureStorageObject) => { * - * storage.get('myitem') + * storage.get('key') * .then( * data => console.log(data), * error => console.log(error) * ); * - * storage.set('myitem', 'myvalue') + * storage.set('key', 'value') * .then( * data => console.log(data), * error => console.log(error) * ); * - * storage.remove('myitem') + * storage.remove('key') * .then( * data => console.log(data), * error => console.log(error) From 1a682bc3dea24de64efc57c6aab181588207222a Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sun, 30 Apr 2017 19:19:55 +0200 Subject: [PATCH 008/115] docs(README): Ionic 3 Update / typo (#1441) _ Update example import for Ionic - Removed Ionic 2.x - typo --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4f4aebbad..e9d7da842 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Ionic Native wraps plugin callbacks in a Promise or Observable, providing a comm ## Installation Run following command to install Ionic Native in your project. -``` +```bash npm install @ionic-native/core --save ``` @@ -95,13 +95,13 @@ To do this, you need to provide a mock implementation of the plugins you wish to First import the `Camera` class in your `src/app/app.module.ts` file: -```ts +```typescript import { Camera } from '@ionic-native/camera'; ``` Then create a new class that extends the `Camera` class with a mock implementation: -```ts +```typescript class CameraMock extends Camera { getPicture(options) { return new Promise((resolve, reject) => { @@ -113,7 +113,7 @@ class CameraMock extends Camera { Finally, override the previous `Camera` class in your `providers` for this module: -```ts +```typescript providers: [ { provide: Camera, useClass: CameraMock } ] @@ -121,8 +121,9 @@ providers: [ Here's the full example: -```ts +```typescript import { NgModule, ErrorHandler } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'; import { MyApp } from './app.component'; import { HomePage } from '../pages/home/home'; @@ -143,6 +144,7 @@ class CameraMock extends Camera { HomePage ], imports: [ + BrowserModule, IonicModule.forRoot(MyApp) ], bootstrap: [IonicApp], @@ -169,9 +171,9 @@ Spent way too long diagnosing an issue only to realize a plugin wasn't firing or ## Plugin Missing? Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart: -## Ionic 1/Angular 1 support +## Ionic V1/Angular 1 support -Ionic Native 3.x supports Ionic 2.x and above. For Ionic/Angular 1 support, please use version 2 of Ionic Native. See the [2.x README](https://github.com/driftyco/ionic-native/blob/8cd648db5cddd7bdbe2bd78839b19c620cc8c04c/README.md) for usage information. +For Ionic V1/Angular 1 support, please use version 2 of Ionic Native. See the [2.x README](https://github.com/driftyco/ionic-native/blob/8cd648db5cddd7bdbe2bd78839b19c620cc8c04c/README.md) for usage information. # Credits From 748c6bd9beaf962cf794b0fab505c0519312a289 Mon Sep 17 00:00:00 2001 From: SVANNER Date: Sun, 30 Apr 2017 19:21:28 +0200 Subject: [PATCH 009/115] feat(camera-preview): add new focus methods & getFlashMode() (#1442) 4 new methods are available in the master: - getSupportedFocusModes(); - getFocusMode(); - seFocusMode(); - getFlashMode(); --- .../plugins/camera-preview/index.ts | 59 ++++++++++++++++--- 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/src/@ionic-native/plugins/camera-preview/index.ts b/src/@ionic-native/plugins/camera-preview/index.ts index b8f29a8bb..e3804c2e7 100644 --- a/src/@ionic-native/plugins/camera-preview/index.ts +++ b/src/@ionic-native/plugins/camera-preview/index.ts @@ -134,7 +134,18 @@ export interface CameraPreviewPictureOptions { @Injectable() export class CameraPreview extends IonicNativePlugin { - EXPOSURE_MODES = { + FOCUS_MODE = { + FIXED: 'fixed', + AUTO: 'auto', + CONTINUOUS: 'continuous', // IOS Only + CONTINUOUS_PICTURE: 'continuous-picture', // Android Only + CONTINUOUS_VIDEO: 'continuous-video', // Android Only + EDOF: 'edof', // Android Only + INFINITY: 'infinity', // Android Only + MACRO: 'macro' // Android Only + }; + + EXPOSURE_MODE = { LOCK: 'lock', // IOS Only AUTO: 'auto', // IOS Only CONTINUOUS: 'continuous', @@ -265,6 +276,38 @@ export class CameraPreview extends IonicNativePlugin { }) setPreviewSize(dimensions?: CameraPreviewDimensions): Promise { return; } + /** + * Get focus mode + * @return {Promise} + */ + @Cordova() + getFocusMode(): Promise { return; } + + /** + * Set the focus mode + * @param [focusMode] {string} 'fixed', 'auto', 'continuous-picture', 'continuous-video' (iOS & Android), 'edof', 'infinity', 'macro' (Android Only) + * @return {Promise} + */ + @Cordova({ + successIndex: 1, + errorIndex: 2 + }) + setFocusMode(focusMode?: string): Promise { return; } + + /** + * Get supported focus modes + * @return {Promise} + */ + @Cordova() + getSupportedFocusModes(): Promise { return; } + + /** + * Get the current flash mode + * @return {Promise} + */ + @Cordova() + getFlashMode(): Promise { return; } + /** * Set the flashmode * @param [flashMode] {string} 'off' (iOS & Android), 'on' (iOS & Android), 'auto' (iOS & Android), 'torch' (Android) @@ -276,13 +319,6 @@ export class CameraPreview extends IonicNativePlugin { }) setFlashMode(flashMode?: string): Promise { return; } - /** - * Get supported picture sizes - * @return {Promise} - */ - @Cordova() - getSupportedPictureSizes(): Promise { return; } - /** * Get supported flash modes * @return {Promise} @@ -290,6 +326,13 @@ export class CameraPreview extends IonicNativePlugin { @Cordova() getSupportedFlashModes(): Promise { return; } + /** + * Get supported picture sizes + * @return {Promise} + */ + @Cordova() + getSupportedPictureSizes(): Promise { return; } + /** * Get exposure mode * @return {Promise} From a7c9abc44959913735a0fba4b1861605abbbb557 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sun, 30 Apr 2017 20:13:21 +0200 Subject: [PATCH 010/115] refactor(barcode-scanner): fix tslint error (#1447) --- src/@ionic-native/plugins/barcode-scanner/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/barcode-scanner/index.ts b/src/@ionic-native/plugins/barcode-scanner/index.ts index ee2fe178c..48def9f8a 100644 --- a/src/@ionic-native/plugins/barcode-scanner/index.ts +++ b/src/@ionic-native/plugins/barcode-scanner/index.ts @@ -57,7 +57,7 @@ export interface BarcodeScannerOptions { } export interface BarcodeScanResult { - format: "QR_CODE" | "DATA_MATRIX" | "UPC_E" | "UPC_A" | "EAN_8" | "EAN_13" | "CODE_128" | "CODE_39" | "CODE_93" | "CODABAR" | "ITF" | "RSS14" | "RSS_EXPANDED" | "PDF417" | "AZTEC" | "MSI"; + format: 'QR_CODE' | 'DATA_MATRIX' | 'UPC_E' | 'UPC_A' | 'EAN_8' | 'EAN_13' | 'CODE_128' | 'CODE_39' | 'CODE_93' | 'CODABAR' | 'ITF' | 'RSS14' | 'RSS_EXPANDED' | 'PDF417' | 'AZTEC' | 'MSI'; cancelled: boolean; text: string; } From c6f9fa356f2e4124a11a0b0a07bd2b1933d3d308 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sun, 30 Apr 2017 20:36:22 +0200 Subject: [PATCH 011/115] style(): unify docs and spacing (#1448) * typo(barcode-scanner): fixe circle lint error * typo(docs): Unified the documentations In some plugins the typescript markup was missing. I also unified the console.log string from console.log("hello") to console.log('Hello') so any plugin page look the same. --- src/@ionic-native/core/decorators.ts | 8 +- src/@ionic-native/core/ionic-native-plugin.ts | 2 +- src/@ionic-native/core/plugin.ts | 4 +- src/@ionic-native/plugins/admob-free/index.ts | 2 +- src/@ionic-native/plugins/alipay/index.ts | 3 +- .../plugins/android-fingerprint-auth/index.ts | 18 +-- src/@ionic-native/plugins/app-update/index.ts | 5 +- src/@ionic-native/plugins/appodeal/index.ts | 81 ++++++------- .../plugins/background-geolocation/index.ts | 4 +- .../plugins/background-mode/index.ts | 12 +- src/@ionic-native/plugins/backlight/index.ts | 2 +- .../plugins/base64-to-gallery/index.ts | 2 +- src/@ionic-native/plugins/ble/index.ts | 108 ++++++++--------- .../plugins/bluetooth-serial/index.ts | 2 +- .../plugins/broadcaster/index.ts | 2 +- .../plugins/browser-tab/index.ts | 2 +- src/@ionic-native/plugins/calendar/index.ts | 2 +- .../plugins/call-number/index.ts | 2 +- .../plugins/camera-preview/index.ts | 20 ++-- src/@ionic-native/plugins/card-io/index.ts | 2 +- src/@ionic-native/plugins/contacts/index.ts | 42 +++---- .../plugins/couchbase-lite/index.ts | 4 +- src/@ionic-native/plugins/crop/index.ts | 8 +- .../plugins/device-feedback/index.ts | 2 +- .../plugins/file-chooser/index.ts | 2 +- .../plugins/file-opener/index.ts | 8 +- src/@ionic-native/plugins/file-path/index.ts | 4 +- src/@ionic-native/plugins/file/index.ts | 78 ++++++------ .../plugins/fingerprint-aio/index.ts | 4 +- src/@ionic-native/plugins/firebase/index.ts | 10 +- src/@ionic-native/plugins/flashlight/index.ts | 1 - .../plugins/flurry-analytics/index.ts | 2 +- src/@ionic-native/plugins/geofence/index.ts | 12 +- .../plugins/geolocation/index.ts | 2 +- .../plugins/google-maps/index.ts | 112 +++++++++--------- src/@ionic-native/plugins/gyroscope/index.ts | 4 +- .../plugins/header-color/index.ts | 2 +- src/@ionic-native/plugins/health/index.ts | 2 +- src/@ionic-native/plugins/http/index.ts | 2 +- src/@ionic-native/plugins/ibeacon/index.ts | 50 ++++---- .../plugins/image-resizer/index.ts | 56 ++++----- .../plugins/in-app-purchase/index.ts | 8 +- src/@ionic-native/plugins/instagram/index.ts | 4 +- .../plugins/intel-security/index.ts | 2 +- src/@ionic-native/plugins/is-debug/index.ts | 2 +- src/@ionic-native/plugins/jins-meme/index.ts | 20 ++-- src/@ionic-native/plugins/keyboard/index.ts | 2 +- src/@ionic-native/plugins/keychain/index.ts | 2 +- .../plugins/launch-review/index.ts | 2 +- src/@ionic-native/plugins/linkedin/index.ts | 2 +- .../plugins/location-accuracy/index.ts | 2 +- src/@ionic-native/plugins/market/index.ts | 2 +- src/@ionic-native/plugins/mixpanel/index.ts | 2 +- .../plugins/music-controls/index.ts | 16 +-- .../plugins/native-geocoder/index.ts | 6 +- .../plugins/native-page-transitions/index.ts | 8 +- .../plugins/native-storage/index.ts | 8 +- src/@ionic-native/plugins/nfc/index.ts | 40 +++---- src/@ionic-native/plugins/paypal/index.ts | 20 ++-- src/@ionic-native/plugins/pedometer/index.ts | 16 +-- .../plugins/photo-library/index.ts | 10 +- src/@ionic-native/plugins/pinterest/index.ts | 2 +- .../plugins/power-management/index.ts | 10 +- src/@ionic-native/plugins/rollbar/index.ts | 2 +- .../plugins/safari-view-controller/index.ts | 2 +- .../plugins/secure-storage/index.ts | 2 +- src/@ionic-native/plugins/serial/index.ts | 3 +- src/@ionic-native/plugins/shake/index.ts | 2 +- src/@ionic-native/plugins/sms/index.ts | 2 +- .../plugins/social-sharing/index.ts | 6 +- .../plugins/speech-recognition/index.ts | 2 +- .../plugins/spinner-dialog/index.ts | 4 +- .../plugins/splash-screen/index.ts | 4 +- .../plugins/sqlite-porter/index.ts | 8 +- src/@ionic-native/plugins/sqlite/index.ts | 2 +- .../plugins/stepcounter/index.ts | 2 +- .../plugins/streaming-media/index.ts | 12 +- src/@ionic-native/plugins/stripe/index.ts | 2 +- .../plugins/taptic-engine/index.ts | 2 +- .../plugins/text-to-speech/index.ts | 14 +-- .../plugins/themeable-browser/index.ts | 10 +- .../plugins/three-dee-touch/index.ts | 12 +- src/@ionic-native/plugins/toast/index.ts | 2 +- .../plugins/twitter-connect/index.ts | 6 +- .../plugins/unique-device-id/index.ts | 2 +- .../plugins/video-editor/index.ts | 2 +- .../plugins/video-player/index.ts | 10 +- .../plugins/youtube-video-player/index.ts | 4 +- src/@ionic-native/plugins/zbar/index.ts | 4 +- src/@ionic-native/plugins/zip/index.ts | 4 +- 90 files changed, 497 insertions(+), 506 deletions(-) diff --git a/src/@ionic-native/core/decorators.ts b/src/@ionic-native/core/decorators.ts index 00d665eb3..a9dbab18f 100644 --- a/src/@ionic-native/core/decorators.ts +++ b/src/@ionic-native/core/decorators.ts @@ -127,10 +127,10 @@ export function InstanceCheck(opts: CordovaCheckOptions = {}) { if (opts.sync) { return; } else if (opts.observable) { - return new Observable(() => {}); + return new Observable(() => { }); } - return getPromise(() => {}); + return getPromise(() => { }); } } @@ -290,10 +290,10 @@ export function CordovaProperty(target: any, key: string) { export function InstanceProperty(target: any, key: string) { Object.defineProperty(target, key, { enumerable: true, - get: function(){ + get: function() { return this._objectInstance[key]; }, - set: function(value){ + set: function(value) { this._objectInstance[key] = value; } }); diff --git a/src/@ionic-native/core/ionic-native-plugin.ts b/src/@ionic-native/core/ionic-native-plugin.ts index 2fdedc5a9..dc5c30025 100644 --- a/src/@ionic-native/core/ionic-native-plugin.ts +++ b/src/@ionic-native/core/ionic-native-plugin.ts @@ -21,7 +21,7 @@ export class IonicNativePlugin { /** * Returns the original plugin object */ - static getPlugin(): any {} + static getPlugin(): any { } /** * Returns the plugin's name diff --git a/src/@ionic-native/core/plugin.ts b/src/@ionic-native/core/plugin.ts index f92f55141..aaaeae298 100644 --- a/src/@ionic-native/core/plugin.ts +++ b/src/@ionic-native/core/plugin.ts @@ -150,7 +150,7 @@ function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: any return p; } -function wrapOtherPromise(pluginObj: any, methodName: string, args: any[], opts: any= {}) { +function wrapOtherPromise(pluginObj: any, methodName: string, args: any[], opts: any = {}) { return getPromise((resolve, reject) => { const pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts); if (pluginResult) { @@ -225,7 +225,7 @@ export function overrideFunction(pluginObj: any, methodName: string, args: any[] if (availabilityCheck === true) { const pluginInstance = getPlugin(pluginObj.constructor.getPluginRef()); pluginInstance[methodName] = observer.next.bind(observer); - return () => pluginInstance[methodName] = () => {}; + return () => pluginInstance[methodName] = () => { }; } else { observer.error(availabilityCheck); observer.complete(); diff --git a/src/@ionic-native/plugins/admob-free/index.ts b/src/@ionic-native/plugins/admob-free/index.ts index f70dc65f1..a83166473 100644 --- a/src/@ionic-native/plugins/admob-free/index.ts +++ b/src/@ionic-native/plugins/admob-free/index.ts @@ -69,7 +69,7 @@ export interface AdMobFreeRewardVideoConfig { * @description * * @usage - * ``` + * ```typescript * import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free'; * * diff --git a/src/@ionic-native/plugins/alipay/index.ts b/src/@ionic-native/plugins/alipay/index.ts index f2eb5ffe4..1e9e24a58 100644 --- a/src/@ionic-native/plugins/alipay/index.ts +++ b/src/@ionic-native/plugins/alipay/index.ts @@ -67,7 +67,7 @@ export interface AlipayOrder { * Requires Cordova plugin: `cordova-alipay-base`. For more info, please see the [Alipay plugin docs](https://github.com/xueron/cordova-alipay-base). * * @usage - * ``` + * ```typescript * import { Alipay, AlipayOrder } from '@ionic-native/alipay'; * * constructor(private alipay: Alipay) { @@ -112,4 +112,3 @@ export class Alipay extends IonicNativePlugin { @Cordova() pay(order: AlipayOrder): Promise { return; } } - diff --git a/src/@ionic-native/plugins/android-fingerprint-auth/index.ts b/src/@ionic-native/plugins/android-fingerprint-auth/index.ts index b48b19ae0..ff1133e88 100644 --- a/src/@ionic-native/plugins/android-fingerprint-auth/index.ts +++ b/src/@ionic-native/plugins/android-fingerprint-auth/index.ts @@ -114,18 +114,18 @@ export interface AFAEncryptResponse { * if(result.isAvailable){ * // it is available * - * this.androidFingerprintAuth.encrypt({ clientId: "myAppName", username: "myUsername", password: "myPassword" }) + * this.androidFingerprintAuth.encrypt({ clientId: 'myAppName', username: 'myUsername', password: 'myPassword' }) * .then(result => { * if (result.withFingerprint) { - * console.log("Successfully encrypted credentials."); - * console.log("Encrypted credentials: " + result.token); + * console.log('Successfully encrypted credentials.'); + * console.log('Encrypted credentials: ' + result.token); * } else if (result.withBackup) { * console.log('Successfully authenticated with backup password!'); * } else console.log('Didn\'t authenticate!'); * }) * .catch(error => { - * if (error === "Cancelled") { - * console.log("Fingerprint authentication cancelled"); + * if (error === 'Cancelled') { + * console.log('Fingerprint authentication cancelled'); * } else console.error(error) * }); * @@ -156,7 +156,7 @@ export class AndroidFingerprintAuth extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - encrypt(options: AFAAuthOptions): Promise {return; } + encrypt(options: AFAAuthOptions): Promise { return; } /** * Opens a native dialog fragment to use the device hardware fingerprint scanner to authenticate against fingerprints registered for the device. @@ -164,19 +164,19 @@ export class AndroidFingerprintAuth extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - decrypt(options: AFAAuthOptions): Promise {return; } + decrypt(options: AFAAuthOptions): Promise { return; } /** * Check if service is available * @returns {Promise} Returns a Promise that resolves if fingerprint auth is available on the device */ @Cordova() - isAvailable(): Promise<{isAvailable: boolean}> { return; } + isAvailable(): Promise<{ isAvailable: boolean }> { return; } /** * Delete the cipher used for encryption and decryption by username * @returns {Promise} Returns a Promise that resolves if the cipher was successfully deleted */ @Cordova() - delete(options: {clientId: string; username: string; }): Promise<{deleted: boolean}> { return; } + delete(options: { clientId: string; username: string; }): Promise<{ deleted: boolean }> { return; } } diff --git a/src/@ionic-native/plugins/app-update/index.ts b/src/@ionic-native/plugins/app-update/index.ts index 4ef0c92fa..3b2158ac6 100644 --- a/src/@ionic-native/plugins/app-update/index.ts +++ b/src/@ionic-native/plugins/app-update/index.ts @@ -19,7 +19,7 @@ import { Injectable } from '@angular/core'; * * Then use the following code: * - * ``` + * ```typescript * import { AppUpdate } from '@ionic-native/app-update'; * * constructor(private appUpdate: AppUpdate) { @@ -28,8 +28,6 @@ import { Injectable } from '@angular/core'; * this.appUpdate.checkAppUpdate(updateUrl); * * } - * - * * ``` * * The plugin will compare the app version and update it automatically if the API has a newer version to install. @@ -53,4 +51,3 @@ export class AppUpdate extends IonicNativePlugin { }) checkAppUpdate(updateUrl: string): Promise { return; } } - diff --git a/src/@ionic-native/plugins/appodeal/index.ts b/src/@ionic-native/plugins/appodeal/index.ts index f6ac8046b..5821ce7ce 100644 --- a/src/@ionic-native/plugins/appodeal/index.ts +++ b/src/@ionic-native/plugins/appodeal/index.ts @@ -8,7 +8,7 @@ import { Injectable } from '@angular/core'; * Plugin to serve ads through native Appodeal SDKs * * @usage - * ``` + * ```typescript * import { Appodeal } from '@ionic-native/appodeal'; * * constructor(private appodeal: Appodeal) { @@ -18,9 +18,6 @@ import { Injectable } from '@angular/core'; * appodeal.show(appodeal.AD_TYPES.REWARDED_VIDEO); * * } - * - * - * * ``` */ @Plugin({ @@ -28,7 +25,7 @@ import { Injectable } from '@angular/core'; plugin: 'https://github.com/appodeal/appodeal-cordova-plugin', pluginRef: 'Appodeal', repo: 'https://github.com/appodeal/appodeal-cordova-plugin.git', - platforms: [ 'iOS', 'Android' ] + platforms: ['iOS', 'Android'] }) @Injectable() export class Appodeal extends IonicNativePlugin { @@ -49,7 +46,7 @@ export class Appodeal extends IonicNativePlugin { * @param {number} adType */ @Cordova() - initialize(appKey: string, adType: number): void {}; + initialize(appKey: string, adType: number): void { }; /** * check if SDK has been initialized @@ -76,21 +73,21 @@ export class Appodeal extends IonicNativePlugin { showWithPlacement( adType: number, placement: any - ): Promise { return; }; + ): Promise { return; }; /** * hide ad of specified type * @param {number} adType */ @Cordova() - hide(adType: number): void {}; + hide(adType: number): void { }; /** * confirm use of ads of specified type * @param {number} adType */ @Cordova() - confirm(adType: number): void {}; + confirm(adType: number): void { }; /** * check if ad of specified type has been loaded @@ -114,69 +111,69 @@ export class Appodeal extends IonicNativePlugin { * @param autoCache */ @Cordova() - setAutoCache(adType: number, autoCache: any): void {}; + setAutoCache(adType: number, autoCache: any): void { }; /** * forcefully cache an ad by type * @param {number} adType */ @Cordova() - cache(adType: number): void {}; + cache(adType: number): void { }; /** * * @param {boolean} set */ @Cordova() - setOnLoadedTriggerBoth(set: boolean): void {}; + setOnLoadedTriggerBoth(set: boolean): void { }; /** * enable or disable Smart Banners * @param {boolean} enabled */ @Cordova() - setSmartBanners(enabled: boolean): void {}; + setSmartBanners(enabled: boolean): void { }; /** * enable or disable banner backgrounds * @param {boolean} enabled */ @Cordova() - setBannerBackground(enabled: boolean): void {}; + setBannerBackground(enabled: boolean): void { }; /** * enable or disable banner animations * @param {boolean} enabled */ @Cordova() - setBannerAnimation(enabled: boolean): void {}; + setBannerAnimation(enabled: boolean): void { }; /** * * @param value */ @Cordova() - set728x90Banners(value: any): void {}; + set728x90Banners(value: any): void { }; /** * enable or disable logging * @param {boolean} logging */ @Cordova() - setLogging(logging: boolean): void {}; + setLogging(logging: boolean): void { }; /** * enable or disable testing mode * @param {boolean} testing */ @Cordova() - setTesting(testing: boolean): void {}; + setTesting(testing: boolean): void { }; /** * reset device ID */ @Cordova() - resetUUID(): void {}; + resetUUID(): void { }; /** * get version of Appdeal SDK @@ -190,7 +187,7 @@ export class Appodeal extends IonicNativePlugin { * @param {number} adType */ @Cordova() - disableNetwork(network?: string, adType?: number): void {}; + disableNetwork(network?: string, adType?: number): void { }; /** * @@ -198,54 +195,54 @@ export class Appodeal extends IonicNativePlugin { * @param {number} adType */ @Cordova() - disableNetworkType(network?: string, adType?: number): void {}; + disableNetworkType(network?: string, adType?: number): void { }; /** * disable Location permissions for Appodeal SDK */ @Cordova() - disableLocationPermissionCheck(): void {}; + disableLocationPermissionCheck(): void { }; /** * disable Storage permissions for Appodeal SDK */ @Cordova() - disableWriteExternalStoragePermissionCheck(): void {}; + disableWriteExternalStoragePermissionCheck(): void { }; /** * enable event listeners * @param {boolean} enabled */ @Cordova() - enableInterstitialCallbacks(enabled: boolean): void {}; + enableInterstitialCallbacks(enabled: boolean): void { }; /** * enable event listeners * @param {boolean} enabled */ @Cordova() - enableSkippableVideoCallbacks(enabled: boolean): void {}; + enableSkippableVideoCallbacks(enabled: boolean): void { }; /** * enable event listeners * @param {boolean} enabled */ @Cordova() - enableNonSkippableVideoCallbacks(enabled: boolean): void {}; + enableNonSkippableVideoCallbacks(enabled: boolean): void { }; /** * enable event listeners * @param {boolean} enabled */ @Cordova() - enableBannerCallbacks(enabled: boolean): void {}; + enableBannerCallbacks(enabled: boolean): void { }; /** * enable event listeners * @param {boolean} enabled */ @Cordova() - enableRewardedVideoCallbacks(enabled: boolean): void {}; + enableRewardedVideoCallbacks(enabled: boolean): void { }; /** * @@ -253,7 +250,7 @@ export class Appodeal extends IonicNativePlugin { * @param {boolean} value */ @Cordova() - setCustomBooleanRule(name: string, value: boolean): void {}; + setCustomBooleanRule(name: string, value: boolean): void { }; /** * @@ -261,7 +258,7 @@ export class Appodeal extends IonicNativePlugin { * @param {number} value */ @Cordova() - setCustomIntegerRule(name: string, value: number): void {}; + setCustomIntegerRule(name: string, value: number): void { }; /** * set rule with float value @@ -269,7 +266,7 @@ export class Appodeal extends IonicNativePlugin { * @param {number} value */ @Cordova() - setCustomDoubleRule(name: string, value: number): void {}; + setCustomDoubleRule(name: string, value: number): void { }; /** * set rule with string value @@ -277,77 +274,77 @@ export class Appodeal extends IonicNativePlugin { * @param {string} value */ @Cordova() - setCustomStringRule(name: string, value: string): void {}; + setCustomStringRule(name: string, value: string): void { }; /** * set ID preference in Appodeal for current user * @param id */ @Cordova() - setUserId(id: any): void {}; + setUserId(id: any): void { }; /** * set Email preference in Appodeal for current user * @param email */ @Cordova() - setEmail(email: any): void {}; + setEmail(email: any): void { }; /** * set Birthday preference in Appodeal for current user * @param birthday */ @Cordova() - setBirthday(birthday: any): void {}; + setBirthday(birthday: any): void { }; /** * et Age preference in Appodeal for current user * @param age */ @Cordova() - setAge(age: any): void {}; + setAge(age: any): void { }; /** * set Gender preference in Appodeal for current user * @param gender */ @Cordova() - setGender(gender: any): void {}; + setGender(gender: any): void { }; /** * set Occupation preference in Appodeal for current user * @param occupation */ @Cordova() - setOccupation(occupation: any): void {}; + setOccupation(occupation: any): void { }; /** * set Relation preference in Appodeal for current user * @param relation */ @Cordova() - setRelation(relation: any): void {}; + setRelation(relation: any): void { }; /** * set Smoking preference in Appodeal for current user * @param smoking */ @Cordova() - setSmoking(smoking: any): void {}; + setSmoking(smoking: any): void { }; /** * set Alcohol preference in Appodeal for current user * @param alcohol */ @Cordova() - setAlcohol(alcohol: any): void {}; + setAlcohol(alcohol: any): void { }; /** * set Interests preference in Appodeal for current user * @param interests */ @Cordova() - setInterests(interests: any): void {}; + setInterests(interests: any): void { }; @Cordova({ eventObservable: true, diff --git a/src/@ionic-native/plugins/background-geolocation/index.ts b/src/@ionic-native/plugins/background-geolocation/index.ts index b48b9c806..aba02ed21 100644 --- a/src/@ionic-native/plugins/background-geolocation/index.ts +++ b/src/@ionic-native/plugins/background-geolocation/index.ts @@ -448,13 +448,13 @@ export class BackgroundGeolocation extends IonicNativePlugin { /** * Display app settings to change permissions */ - @Cordova({sync: true}) + @Cordova({ sync: true }) showAppSettings(): void { } /** * Display device location settings */ - @Cordova({sync: true}) + @Cordova({ sync: true }) showLocationSettings(): void { } /** diff --git a/src/@ionic-native/plugins/background-mode/index.ts b/src/@ionic-native/plugins/background-mode/index.ts index 37c90164b..a3bcda477 100644 --- a/src/@ionic-native/plugins/background-mode/index.ts +++ b/src/@ionic-native/plugins/background-mode/index.ts @@ -148,7 +148,7 @@ export class BackgroundMode extends IonicNativePlugin { platforms: ['Android'], sync: true }) - moveToBackground(): void {} + moveToBackground(): void { } /** * Android allows to programmatically move from background to foreground. @@ -157,7 +157,7 @@ export class BackgroundMode extends IonicNativePlugin { platforms: ['Android'], sync: true }) - moveToForeground(): void {} + moveToForeground(): void { } /** * Override the back button on Android to go to background instead of closing the app. @@ -166,7 +166,7 @@ export class BackgroundMode extends IonicNativePlugin { platforms: ['Android'], sync: true }) - overrideBackButton(): void {} + overrideBackButton(): void { } /** * Exclude the app from the recent task list works on Android 5.0+. @@ -175,7 +175,7 @@ export class BackgroundMode extends IonicNativePlugin { platforms: ['Android'], sync: true }) - excludeFromTaskList(): void {} + excludeFromTaskList(): void { } /** * The method works async instead of isActive() or isEnabled(). @@ -192,7 +192,7 @@ export class BackgroundMode extends IonicNativePlugin { platforms: ['Android'], sync: true }) - wakeUp(): void {} + wakeUp(): void { } /** * Turn screen on and show app even locked @@ -201,6 +201,6 @@ export class BackgroundMode extends IonicNativePlugin { platforms: ['Android'], sync: true }) - unlock(): void {} + unlock(): void { } } diff --git a/src/@ionic-native/plugins/backlight/index.ts b/src/@ionic-native/plugins/backlight/index.ts index a9dd268fc..ab9c638da 100644 --- a/src/@ionic-native/plugins/backlight/index.ts +++ b/src/@ionic-native/plugins/backlight/index.ts @@ -9,7 +9,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; * This plugin adds turning on/off the device backlight. * * @usage - * ``` + * ```typescript * import { Backlight } from '@ionic-native/backlight'; * * constructor(private backlight: Backlight) { } diff --git a/src/@ionic-native/plugins/base64-to-gallery/index.ts b/src/@ionic-native/plugins/base64-to-gallery/index.ts index 7c0b51fa1..0acc4da06 100644 --- a/src/@ionic-native/plugins/base64-to-gallery/index.ts +++ b/src/@ionic-native/plugins/base64-to-gallery/index.ts @@ -40,7 +40,7 @@ export class Base64ToGallery extends IonicNativePlugin { successIndex: 2, errorIndex: 3 }) - base64ToGallery(data: string, options?: {prefix?: string; mediaScanner?: boolean}): Promise { + base64ToGallery(data: string, options?: { prefix?: string; mediaScanner?: boolean }): Promise { return; } diff --git a/src/@ionic-native/plugins/ble/index.ts b/src/@ionic-native/plugins/ble/index.ts index 409947c5e..eb35c4789 100644 --- a/src/@ionic-native/plugins/ble/index.ts +++ b/src/@ionic-native/plugins/ble/index.ts @@ -35,59 +35,59 @@ import { Observable } from 'rxjs/Observable'; * * ```typescript * { - * "name": "Battery Demo", - * "id": "20:FF:D0:FF:D1:C0", - * "advertising": [2,1,6,3,3,15,24,8,9,66,97,116,116,101,114,121], - * "rssi": -55 + * 'name': 'Battery Demo', + * 'id': '20:FF:D0:FF:D1:C0', + * 'advertising': [2,1,6,3,3,15,24,8,9,66,97,116,116,101,114,121], + * 'rssi': -55 * } * ``` * After connecting, the peripheral object also includes service, characteristic and descriptor information. * * ```typescript * { - * "name": "Battery Demo", - * "id": "20:FF:D0:FF:D1:C0", - * "advertising": [2,1,6,3,3,15,24,8,9,66,97,116,116,101,114,121], - * "rssi": -55, - * "services": [ - * "1800", - * "1801", - * "180f" + * 'name': 'Battery Demo', + * 'id': '20:FF:D0:FF:D1:C0', + * 'advertising': [2,1,6,3,3,15,24,8,9,66,97,116,116,101,114,121], + * 'rssi': -55, + * 'services': [ + * '1800', + * '1801', + * '180f' * ], - * "characteristics": [ + * 'characteristics': [ * { - * "service": "1800", - * "characteristic": "2a00", - * "properties": [ - * "Read" + * 'service': '1800', + * 'characteristic': '2a00', + * 'properties': [ + * 'Read' * ] * }, * { - * "service": "1800", - * "characteristic": "2a01", - * "properties": [ - * "Read" + * 'service': '1800', + * 'characteristic': '2a01', + * 'properties': [ + * 'Read' * ] * }, * { - * "service": "1801", - * "characteristic": "2a05", - * "properties": [ - * "Read" + * 'service': '1801', + * 'characteristic': '2a05', + * 'properties': [ + * 'Read' * ] * }, * { - * "service": "180f", - * "characteristic": "2a19", - * "properties": [ - * "Read" + * 'service': '180f', + * 'characteristic': '2a19', + * 'properties': [ + * 'Read' * ], - * "descriptors": [ + * 'descriptors': [ * { - * "uuid": "2901" + * 'uuid': '2901' * }, * { - * "uuid": "2904" + * 'uuid': '2904' * } * ] * } @@ -104,10 +104,10 @@ import { Observable } from 'rxjs/Observable'; * * ```typescript * { - * "name": "demo", - * "id": "00:1A:7D:DA:71:13", - * "advertising": ArrayBuffer, - * "rssi": -37 + * 'name': 'demo', + * 'id': '00:1A:7D:DA:71:13', + * 'advertising': ArrayBuffer, + * 'rssi': -37 * } * ``` * @@ -119,24 +119,24 @@ import { Observable } from 'rxjs/Observable'; * * ```typescript * { - * "name": "demo", - * "id": "D8479A4F-7517-BCD3-91B5-3302B2F81802", - * "advertising": { - * "kCBAdvDataChannel": 37, - * "kCBAdvDataServiceData": { - * "FED8": { - * "byteLength": 7 // data not shown + * 'name': 'demo', + * 'id': 'D8479A4F-7517-BCD3-91B5-3302B2F81802', + * 'advertising': { + * 'kCBAdvDataChannel': 37, + * 'kCBAdvDataServiceData': { + * 'FED8': { + * 'byteLength': 7 // data not shown * } * }, - * "kCBAdvDataLocalName": "demo", - * "kCBAdvDataServiceUUIDs": ["FED8"], - * "kCBAdvDataManufacturerData": { - * "byteLength": 7 // data not shown + * 'kCBAdvDataLocalName': 'demo', + * 'kCBAdvDataServiceUUIDs': ['FED8'], + * 'kCBAdvDataManufacturerData': { + * 'byteLength': 7 // data not shown * }, - * "kCBAdvDataTxPowerLevel": 32, - * "kCBAdvDataIsConnectable": true + * 'kCBAdvDataTxPowerLevel': 32, + * 'kCBAdvDataIsConnectable': true * }, - * "rssi": -53 + * 'rssi': -53 * } * ``` * @@ -230,7 +230,7 @@ export class BLE extends IonicNativePlugin { clearFunction: 'stopScan', clearWithArgs: false }) - startScanWithOptions(services: string[], options: {reportDuplicates?: boolean} | any): Observable { return; } + startScanWithOptions(services: string[], options: { reportDuplicates?: boolean } | any): Observable { return; } /** * Stop a scan started by `startScan`. @@ -306,14 +306,14 @@ export class BLE extends IonicNativePlugin { * // send 1 byte to switch a light on * var data = new Uint8Array(1); * data[0] = 1; - * BLE.write(device_id, "FF10", "FF11", data.buffer); + * BLE.write(device_id, 'FF10', 'FF11', data.buffer); * * // send a 3 byte value with RGB color * var data = new Uint8Array(3); * data[0] = 0xFF; // red * data[0] = 0x00; // green * data[0] = 0xFF; // blue - * BLE.write(device_id, "ccc0", "ccc1", data.buffer); + * BLE.write(device_id, 'ccc0', 'ccc1', data.buffer); * * // send a 32 bit integer * var data = new Uint32Array(1); @@ -357,7 +357,7 @@ export class BLE extends IonicNativePlugin { * * @usage * ``` - * BLE.startNotification(device_id, "FF10", "FF11").subscribe(buffer => { + * BLE.startNotification(device_id, 'FF10', 'FF11').subscribe(buffer => { * console.log(String.fromCharCode.apply(null, new Uint8Array(buffer)); * }); * ``` diff --git a/src/@ionic-native/plugins/bluetooth-serial/index.ts b/src/@ionic-native/plugins/bluetooth-serial/index.ts index 2ecc59983..ec5e3f336 100644 --- a/src/@ionic-native/plugins/bluetooth-serial/index.ts +++ b/src/@ionic-native/plugins/bluetooth-serial/index.ts @@ -13,7 +13,7 @@ import { Observable } from 'rxjs/Observable'; * * * // Write a string - * this.bluetoothSerial.write("hello world").then(success, failure); + * this.bluetoothSerial.write('hello world').then(success, failure); * * // Array of int or bytes * this.bluetoothSerial.write([186, 220, 222]).then(success, failure); diff --git a/src/@ionic-native/plugins/broadcaster/index.ts b/src/@ionic-native/plugins/broadcaster/index.ts index b7fe65520..e34561833 100644 --- a/src/@ionic-native/plugins/broadcaster/index.ts +++ b/src/@ionic-native/plugins/broadcaster/index.ts @@ -8,7 +8,7 @@ import { Observable } from 'rxjs/Observable'; * This plugin adds exchanging events between native code and your app. * * @usage - * ``` + * ```typescript * import { Broadcaster } from '@ionic-native/broadcaster'; * * constructor(private broadcaster: Broadcaster) { } diff --git a/src/@ionic-native/plugins/browser-tab/index.ts b/src/@ionic-native/plugins/browser-tab/index.ts index 03e8dd763..d41848c07 100644 --- a/src/@ionic-native/plugins/browser-tab/index.ts +++ b/src/@ionic-native/plugins/browser-tab/index.ts @@ -7,7 +7,7 @@ import { Injectable } from '@angular/core'; * This plugin provides an interface to in-app browser tabs that exist on some mobile platforms, specifically [Custom Tabs](http://developer.android.com/tools/support-library/features.html#custom-tabs) on Android (including the [Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) implementation), and [SFSafariViewController](https://developer.apple.com/library/ios/documentation/SafariServices/Reference/SFSafariViewController_Ref/) on iOS. * * @usage - * ``` + * ```typescript * import { BrowserTab } from '@ionic-native/browser-tab'; * * constructor(private browserTab: BrowserTab) { diff --git a/src/@ionic-native/plugins/calendar/index.ts b/src/@ionic-native/plugins/calendar/index.ts index 8094b267f..329df3666 100644 --- a/src/@ionic-native/plugins/calendar/index.ts +++ b/src/@ionic-native/plugins/calendar/index.ts @@ -59,7 +59,7 @@ export interface CalendarOptions { * * * @usage - * ``` + * ```typescript * import { Calendar } from '@ionic-native/calendar'; * * constructor(private calendar: Calendar) { } diff --git a/src/@ionic-native/plugins/call-number/index.ts b/src/@ionic-native/plugins/call-number/index.ts index 4d4d06e29..b7be20acf 100644 --- a/src/@ionic-native/plugins/call-number/index.ts +++ b/src/@ionic-native/plugins/call-number/index.ts @@ -6,7 +6,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; * Call a number directly from your Cordova/Ionic application. * * @usage - * ``` + * ```typescript * import { CallNumber } from '@ionic-native/call-number'; * * constructor(private callNumber: CallNumber) { } diff --git a/src/@ionic-native/plugins/camera-preview/index.ts b/src/@ionic-native/plugins/camera-preview/index.ts index e3804c2e7..bf7af50ae 100644 --- a/src/@ionic-native/plugins/camera-preview/index.ts +++ b/src/@ionic-native/plugins/camera-preview/index.ts @@ -39,12 +39,12 @@ export interface CameraPreviewOptions { } export interface CameraPreviewPictureOptions { - /** The width in pixels, default 0 */ - width?: number; - /** The height in pixels, default 0 */ - height?: number; - /** The picture quality, 0 - 100, default 85 */ - quality?: number; + /** The width in pixels, default 0 */ + width?: number; + /** The height in pixels, default 0 */ + height?: number; + /** The picture quality, 0 - 100, default 85 */ + quality?: number; } /** @@ -251,10 +251,10 @@ export class CameraPreview extends IonicNativePlugin { }) setZoom(zoom?: number): Promise { return; } -/** - * Get the maximum zoom (Android) - * @return {Promise} - */ + /** + * Get the maximum zoom (Android) + * @return {Promise} + */ @Cordova() getMaxZoom(): Promise { return; } diff --git a/src/@ionic-native/plugins/card-io/index.ts b/src/@ionic-native/plugins/card-io/index.ts index ab54349ec..8163be018 100644 --- a/src/@ionic-native/plugins/card-io/index.ts +++ b/src/@ionic-native/plugins/card-io/index.ts @@ -133,7 +133,7 @@ export interface CardIOResponse { * @name Card IO * @description * @usage - * ``` + * ```typescript * import { CardIO } from '@ionic-native/card-io'; * * constructor(private cardIO: CardIO) { } diff --git a/src/@ionic-native/plugins/contacts/index.ts b/src/@ionic-native/plugins/contacts/index.ts index 586c98f7e..a6e9d9816 100644 --- a/src/@ionic-native/plugins/contacts/index.ts +++ b/src/@ionic-native/plugins/contacts/index.ts @@ -145,16 +145,16 @@ export interface IContactName { */ export class ContactName implements IContactName { constructor(public formatted?: string, - public familyName?: string, - public givenName?: string, - public middleName?: string, - public honorificPrefix?: string, - public honorificSuffix?: string) {} + public familyName?: string, + public givenName?: string, + public middleName?: string, + public honorificPrefix?: string, + public honorificSuffix?: string) { } } export interface IContactField { /** A string that indicates what type of field this is, home for example. */ - type?: string; + type?: string; /** The value of the field, such as a phone number or email address. */ value?: string; /** Set to true if this ContactField contains the user's preferred value. */ @@ -166,15 +166,15 @@ export interface IContactField { */ export class ContactField implements IContactField { constructor(public type?: string, - public value?: string, - public pref?: boolean) {} + public value?: string, + public pref?: boolean) { } } export interface IContactAddress { /** Set to true if this ContactAddress contains the user's preferred value. */ pref?: boolean; /** A string indicating what type of field this is, home for example. */ - type?: string; + type?: string; /** The full address formatted for display. */ formatted?: string; /** The full street address. */ @@ -194,20 +194,20 @@ export interface IContactAddress { */ export class ContactAddress implements IContactAddress { constructor(public pref?: boolean, - public type?: string, - public formatted?: string, - public streetAddress?: string, - public locality?: string, - public region?: string, - public postalCode?: string, - public country?: string) {} + public type?: string, + public formatted?: string, + public streetAddress?: string, + public locality?: string, + public region?: string, + public postalCode?: string, + public country?: string) { } } export interface IContactOrganization { /** Set to true if this ContactOrganization contains the user's preferred value. */ pref?: boolean; /** A string that indicates what type of field this is, home for example. */ - type?: string; + type?: string; /** The name of the organization. */ name?: string; /** The department the contract works for. */ @@ -226,7 +226,7 @@ export class ContactOrganization implements IContactOrganization { public department?: string, public title?: string, public pref?: boolean - ) {} + ) { } } /** Search options to filter navigator.contacts. */ @@ -248,9 +248,9 @@ export interface IContactFindOptions { */ export class ContactFindOptions implements IContactFindOptions { constructor(public filter?: string, - public multiple?: boolean, - public desiredFields?: string[], - public hasPhoneNumber?: boolean) {} + public multiple?: boolean, + public desiredFields?: string[], + public hasPhoneNumber?: boolean) { } } /** diff --git a/src/@ionic-native/plugins/couchbase-lite/index.ts b/src/@ionic-native/plugins/couchbase-lite/index.ts index cd48254a6..8d843e208 100644 --- a/src/@ionic-native/plugins/couchbase-lite/index.ts +++ b/src/@ionic-native/plugins/couchbase-lite/index.ts @@ -8,7 +8,7 @@ import { Injectable } from '@angular/core'; * Plugin to install Couchbase Lite in your PhoneGap app on iOS or Android * * @usage - * ``` + * ```typescript * import { CouchbaseLite } from '@ionic-native/couchbase-lite'; * * constructor(private couchbase: CouchbaseLite) { @@ -38,6 +38,6 @@ export class CouchbaseLite extends IonicNativePlugin { @Cordova({ callbackStyle: 'node' }) - getURL(): Promise { return; } + getURL(): Promise { return; } } diff --git a/src/@ionic-native/plugins/crop/index.ts b/src/@ionic-native/plugins/crop/index.ts index f411de3fc..52c5c041e 100644 --- a/src/@ionic-native/plugins/crop/index.ts +++ b/src/@ionic-native/plugins/crop/index.ts @@ -5,7 +5,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; * @name Crop * @description Crops images * @usage - * ``` + * ```typescript * import { Crop } from '@ionic-native/crop'; * * constructor(private crop: Crop) { } @@ -14,8 +14,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; * * this.crop.crop('path/to/image.jpg', {quality: 75}) * .then( - * newImage => console.log("new image path is: " + newImage), - * error => console.error("Error cropping image", error) + * newImage => console.log('new image path is: ' + newImage), + * error => console.error('Error cropping image', error) * ); * ``` */ @@ -38,6 +38,6 @@ export class Crop extends IonicNativePlugin { @Cordova({ callbackOrder: 'reverse' }) - crop(pathToImage: string, options?: {quality: number}): Promise { return; } + crop(pathToImage: string, options?: { quality: number }): Promise { return; } } diff --git a/src/@ionic-native/plugins/device-feedback/index.ts b/src/@ionic-native/plugins/device-feedback/index.ts index 066d18ab1..5246e4e6d 100644 --- a/src/@ionic-native/plugins/device-feedback/index.ts +++ b/src/@ionic-native/plugins/device-feedback/index.ts @@ -7,7 +7,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; * Plugin that lets you provide haptic or acoustic feedback on Android devices. * * @usage - * ``` + * ```typescript * import { DeviceFeedback } from '@ionic-native/device-feedback'; * * constructor(private deviceFeedback: DeviceFeedback) { } diff --git a/src/@ionic-native/plugins/file-chooser/index.ts b/src/@ionic-native/plugins/file-chooser/index.ts index ae35b0197..670496db4 100644 --- a/src/@ionic-native/plugins/file-chooser/index.ts +++ b/src/@ionic-native/plugins/file-chooser/index.ts @@ -8,7 +8,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; * Opens the file picker on Android for the user to select a file, returns a file URI. * * @usage - * ``` + * ```typescript * import { FileChooser } from '@ionic-native/file-chooser'; * * constructor(private fileChooser: FileChooser) { } diff --git a/src/@ionic-native/plugins/file-opener/index.ts b/src/@ionic-native/plugins/file-opener/index.ts index d1f5917dc..1250e1c7d 100644 --- a/src/@ionic-native/plugins/file-opener/index.ts +++ b/src/@ionic-native/plugins/file-opener/index.ts @@ -7,7 +7,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; * This plugin will open a file on your device file system with its default application. * * @usage - * ``` + * ```typescript * import { FileOpener } from '@ionic-native/file-opener'; * * constructor(private fileOpener: FileOpener) { } @@ -41,7 +41,7 @@ export class FileOpener extends IonicNativePlugin { successName: 'success', errorName: 'error' }) - open(filePath: string, fileMIMEType: string): Promise {return; } + open(filePath: string, fileMIMEType: string): Promise { return; } /** * Uninstalls a package @@ -53,7 +53,7 @@ export class FileOpener extends IonicNativePlugin { successName: 'success', errorName: 'error' }) - uninstall(packageId: string): Promise {return; } + uninstall(packageId: string): Promise { return; } /** * Check if an app is already installed @@ -65,6 +65,6 @@ export class FileOpener extends IonicNativePlugin { successName: 'success', errorName: 'error' }) - appIsInstalled(packageId: string): Promise {return; } + appIsInstalled(packageId: string): Promise { return; } } diff --git a/src/@ionic-native/plugins/file-path/index.ts b/src/@ionic-native/plugins/file-path/index.ts index 2154eaa83..476db1c5d 100644 --- a/src/@ionic-native/plugins/file-path/index.ts +++ b/src/@ionic-native/plugins/file-path/index.ts @@ -10,7 +10,7 @@ declare var window: any; * This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library. * * @usage - * ``` + * ```typescript * import { FilePath } from '@ionic-native/file-path'; * * constructor(private filePath: FilePath) { } @@ -39,6 +39,6 @@ export class FilePath extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - resolveNativePath(path: string): Promise {return; } + resolveNativePath(path: string): Promise { return; } } diff --git a/src/@ionic-native/plugins/file/index.ts b/src/@ionic-native/plugins/file/index.ts index ef18ab0c7..a0971ed1a 100644 --- a/src/@ionic-native/plugins/file/index.ts +++ b/src/@ionic-native/plugins/file/index.ts @@ -34,7 +34,7 @@ export interface Entry { * @param errorCallback A callback that is called when errors happen. */ getMetadata(successCallback: (metadata: Metadata) => void, - errorCallback?: (error: FileError) => void): void; + errorCallback?: (error: FileError) => void): void; /** * Move an entry to a different location on the file system. It is an error to try to: * move a directory inside itself or to any child at any depth;move an entry into its parent if a name different from its current one isn't provided; @@ -49,9 +49,9 @@ export interface Entry { * @param errorCallback A callback that is called when errors happen. */ moveTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; + newName?: string, + successCallback?: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; /** * Copy an entry to a different location on the file system. It is an error to try to: * copy a directory inside itself or to any child at any depth; @@ -68,9 +68,9 @@ export interface Entry { * @param errorCallback A callback that is called when errors happen. */ copyTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; + newName?: string, + successCallback?: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; /** * Returns a URL that can be used as the src attribute of a