Merge branch 'master' of github.com:ionic-team/ionic-native

This commit is contained in:
Ibby Hadeed 2018-01-25 12:23:32 -05:00
commit d0adae55cb
20 changed files with 38 additions and 24 deletions

View File

@ -27,8 +27,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
* *
* this.appAvailability.check(app) * this.appAvailability.check(app)
* .then( * .then(
* (yes: string) => console.log(app + ' is available'), * (yes: boolean) => console.log(app + ' is available'),
* (no: string) => console.log(app + ' is NOT available') * (no: boolean) => console.log(app + ' is NOT available')
* ); * );
* ``` * ```
*/ */

View File

@ -49,7 +49,7 @@ export interface BatteryStatusResponse {
plugin: 'cordova-plugin-battery-status', plugin: 'cordova-plugin-battery-status',
pluginRef: 'navigator.battery', pluginRef: 'navigator.battery',
repo: 'https://github.com/apache/cordova-plugin-battery-status', repo: 'https://github.com/apache/cordova-plugin-battery-status',
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows'] platforms: ['iOS', 'Android', 'Windows', 'Browser']
}) })
@Injectable() @Injectable()
export class BatteryStatus extends IonicNativePlugin { export class BatteryStatus extends IonicNativePlugin {

View File

@ -161,7 +161,7 @@ export enum Direction {
plugin: 'cordova-plugin-camera', plugin: 'cordova-plugin-camera',
pluginRef: 'navigator.camera', pluginRef: 'navigator.camera',
repo: 'https://github.com/apache/cordova-plugin-camera', repo: 'https://github.com/apache/cordova-plugin-camera',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone 8'] platforms: ['Android', 'Browser', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class Camera extends IonicNativePlugin { export class Camera extends IonicNativePlugin {

View File

@ -261,6 +261,10 @@ export class ContactFindOptions implements IContactFindOptions {
* @description * @description
* Access and manage Contacts on the device. * Access and manage Contacts on the device.
* *
* @deprecated
* This plugin is being deprecated. No more work will be done on this plugin by the Cordova development community.
* You can continue to use this plugin and it should work as-is in the future but any more arising issues will not be fixed by the Cordova community.
*
* @usage * @usage
* *
* ```typescript * ```typescript
@ -294,7 +298,7 @@ export class ContactFindOptions implements IContactFindOptions {
plugin: 'cordova-plugin-contacts', plugin: 'cordova-plugin-contacts',
pluginRef: 'navigator.contacts', pluginRef: 'navigator.contacts',
repo: 'https://github.com/apache/cordova-plugin-contacts', repo: 'https://github.com/apache/cordova-plugin-contacts',
platforms: ['Android', 'BlackBerry 10', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone 8'] platforms: ['Android', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class Contacts extends IonicNativePlugin { export class Contacts extends IonicNativePlugin {

View File

@ -38,6 +38,6 @@ export class Crop extends IonicNativePlugin {
@Cordova({ @Cordova({
callbackOrder: 'reverse' callbackOrder: 'reverse'
}) })
crop(pathToImage: string, options?: { quality: number }): Promise<string> { return; } crop(pathToImage: string, options?: { quality: number, targetHeight: number, targetWidth: number }): Promise<string> { return; }
} }

View File

@ -24,7 +24,7 @@ declare const window: any;
plugin: 'cordova-plugin-device', plugin: 'cordova-plugin-device',
pluginRef: 'device', pluginRef: 'device',
repo: 'https://github.com/apache/cordova-plugin-device', repo: 'https://github.com/apache/cordova-plugin-device',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Android', 'Browser', 'iOS', 'macOS', 'Windows']
}) })
@Injectable() @Injectable()
export class Device extends IonicNativePlugin { export class Device extends IonicNativePlugin {

View File

@ -46,7 +46,7 @@ export interface DialogsPromptCallback {
plugin: 'cordova-plugin-dialogs', plugin: 'cordova-plugin-dialogs',
pluginRef: 'navigator.notification', pluginRef: 'navigator.notification',
repo: 'https://github.com/apache/cordova-plugin-dialogs', repo: 'https://github.com/apache/cordova-plugin-dialogs',
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class Dialogs extends IonicNativePlugin { export class Dialogs extends IonicNativePlugin {

View File

@ -112,6 +112,10 @@ export interface FileTransferError {
* @description * @description
* This plugin allows you to upload and download files. * This plugin allows you to upload and download files.
* *
* @deprecated
* This plugin has been deprecated in favor of XHR2
* https://cordova.apache.org/blog/2017/10/18/from-filetransfer-to-xhr2.html
*
* @usage * @usage
* ```typescript * ```typescript
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer'; * import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer';

View File

@ -620,7 +620,7 @@ declare const window: Window;
plugin: 'cordova-plugin-file', plugin: 'cordova-plugin-file',
pluginRef: 'cordova.file', pluginRef: 'cordova.file',
repo: 'https://github.com/apache/cordova-plugin-file', repo: 'https://github.com/apache/cordova-plugin-file',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Android', 'Browser', 'iOS', 'macOS', 'Windows']
}) })
@Injectable() @Injectable()
export class File extends IonicNativePlugin { export class File extends IonicNativePlugin {

View File

@ -155,7 +155,7 @@ export interface GeolocationOptions {
repo: 'https://github.com/apache/cordova-plugin-geolocation', repo: 'https://github.com/apache/cordova-plugin-geolocation',
install: 'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"', install: 'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',
installVariables: ['GEOLOCATION_USAGE_DESCRIPTION'], installVariables: ['GEOLOCATION_USAGE_DESCRIPTION'],
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class Geolocation extends IonicNativePlugin { export class Geolocation extends IonicNativePlugin {

View File

@ -4,6 +4,12 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
/** /**
* @name Globalization * @name Globalization
* @description * @description
* This plugin obtains information and performs operations specific to the user's locale, language, and timezone.
*
* @deprecated
* With the [ECMA Internationalization API](https://www.ecma-international.org/ecma-402/1.0/) now supported on iOS, Android and Windows devices, this plugin is not required any more.
* Migrating from this plugin to the [ECMA Internationalization API](https://www.ecma-international.org/ecma-402/1.0/) is explained in this [Cordova blog post](https://cordova.apache.org/news/2017/11/20/migrate-from-cordova-globalization-plugin.html).
*
* @usage * @usage
* ```typescript * ```typescript
* import { Globalization } from '@ionic-native/globalization'; * import { Globalization } from '@ionic-native/globalization';
@ -26,7 +32,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-globalization', plugin: 'cordova-plugin-globalization',
pluginRef: 'navigator.globalization', pluginRef: 'navigator.globalization',
repo: 'https://github.com/apache/cordova-plugin-globalization', repo: 'https://github.com/apache/cordova-plugin-globalization',
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class Globalization extends IonicNativePlugin { export class Globalization extends IonicNativePlugin {

View File

@ -181,7 +181,7 @@ export class InAppBrowserObject {
plugin: 'cordova-plugin-inappbrowser', plugin: 'cordova-plugin-inappbrowser',
pluginRef: 'cordova.InAppBrowser', pluginRef: 'cordova.InAppBrowser',
repo: 'https://github.com/apache/cordova-plugin-inappbrowser', repo: 'https://github.com/apache/cordova-plugin-inappbrowser',
platforms: ['AmazonFire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['AmazonFire OS', 'Android', 'Browser', 'iOS', 'macOS', 'Windows']
}) })
@Injectable() @Injectable()
export class InAppBrowser extends IonicNativePlugin { export class InAppBrowser extends IonicNativePlugin {

View File

@ -147,7 +147,7 @@ export interface ConfigurationData {
plugin: 'cordova-plugin-media-capture', plugin: 'cordova-plugin-media-capture',
pluginRef: 'navigator.device.capture', pluginRef: 'navigator.device.capture',
repo: 'https://github.com/apache/cordova-plugin-media-capture', repo: 'https://github.com/apache/cordova-plugin-media-capture',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Android', 'Browser', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class MediaCapture extends IonicNativePlugin { export class MediaCapture extends IonicNativePlugin {

View File

@ -284,7 +284,7 @@ export type MediaErrorCallback = (error: MediaError) => void;
repo: 'https://github.com/apache/cordova-plugin-media', repo: 'https://github.com/apache/cordova-plugin-media',
plugin: 'cordova-plugin-media', plugin: 'cordova-plugin-media',
pluginRef: 'Media', pluginRef: 'Media',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Android', 'Browser', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class Media extends IonicNativePlugin { export class Media extends IonicNativePlugin {

View File

@ -53,7 +53,7 @@ declare const navigator: any;
plugin: 'cordova-plugin-network-information', plugin: 'cordova-plugin-network-information',
pluginRef: 'navigator.connection', pluginRef: 'navigator.connection',
repo: 'https://github.com/apache/cordova-plugin-network-information', repo: 'https://github.com/apache/cordova-plugin-network-information',
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class Network extends IonicNativePlugin { export class Network extends IonicNativePlugin {

View File

@ -49,9 +49,7 @@ export class ProDeploy {
* Check a channel for an available update * Check a channel for an available update
* @return {Promise<string>} Resolves with 'true' or 'false', or rejects with an error. * @return {Promise<string>} Resolves with 'true' or 'false', or rejects with an error.
*/ */
@CordovaInstance({ @CordovaInstance()
observable: true
})
check(): Promise<string> { return; } check(): Promise<string> { return; }
/** /**
@ -67,7 +65,9 @@ export class ProDeploy {
* Unzip the latest downloaded version * Unzip the latest downloaded version
* @return {Observable<any>} Updates with percent completion, or errors with a message. * @return {Observable<any>} Updates with percent completion, or errors with a message.
*/ */
@CordovaInstance() @CordovaInstance({
observable: true
})
extract(): Observable<any> { return; } extract(): Observable<any> { return; }
/** /**
@ -133,7 +133,7 @@ export class Pro extends IonicNativePlugin {
/** /**
* Ionic Pro Deploy .js API. * Ionic Pro Deploy .js API.
*/ */
deploy: ProDeploy = new ProDeploy(Pro.getPlugin().deploy); deploy: ProDeploy = new ProDeploy((Pro.getPlugin() || {}).deploy);
/** /**
* Not yet implemented * Not yet implemented

View File

@ -55,7 +55,7 @@ import { Observable } from 'rxjs/Observable';
plugin: 'cordova-plugin-screen-orientation', plugin: 'cordova-plugin-screen-orientation',
pluginRef: 'screen.orientation', pluginRef: 'screen.orientation',
repo: 'https://github.com/apache/cordova-plugin-screen-orientation', repo: 'https://github.com/apache/cordova-plugin-screen-orientation',
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows'] platforms: ['Android', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class ScreenOrientation extends IonicNativePlugin { export class ScreenOrientation extends IonicNativePlugin {

View File

@ -23,7 +23,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-splashscreen', plugin: 'cordova-plugin-splashscreen',
pluginRef: 'navigator.splashscreen', pluginRef: 'navigator.splashscreen',
repo: 'https://github.com/apache/cordova-plugin-splashscreen', repo: 'https://github.com/apache/cordova-plugin-splashscreen',
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Amazon Fire OS', 'Android', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class SplashScreen extends IonicNativePlugin { export class SplashScreen extends IonicNativePlugin {

View File

@ -29,7 +29,7 @@ import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-nati
plugin: 'cordova-plugin-statusbar', plugin: 'cordova-plugin-statusbar',
pluginRef: 'StatusBar', pluginRef: 'StatusBar',
repo: 'https://github.com/apache/cordova-plugin-statusbar', repo: 'https://github.com/apache/cordova-plugin-statusbar',
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone'] platforms: ['Android', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class StatusBar extends IonicNativePlugin { export class StatusBar extends IonicNativePlugin {

View File

@ -33,7 +33,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-vibration', plugin: 'cordova-plugin-vibration',
pluginRef: 'navigator', pluginRef: 'navigator',
repo: 'https://github.com/apache/cordova-plugin-vibration', repo: 'https://github.com/apache/cordova-plugin-vibration',
platforms: ['Android', 'BlackBerry 10', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone'] platforms: ['Android', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
export class Vibration extends IonicNativePlugin { export class Vibration extends IonicNativePlugin {