Merge in v5 code

This commit is contained in:
Ibby Hadeed
2017-12-28 07:28:44 -05:00
parent d43fe72f7b
commit 0f9c21ab42
255 changed files with 11473 additions and 6501 deletions
@@ -1,3 +1,6 @@
import { checkAvailability } from './decorators/common';
import { get } from './util';
export class IonicNativePlugin {
static pluginName: string;
@@ -16,31 +19,31 @@ export class IonicNativePlugin {
* Returns a boolean that indicates whether the plugin is installed
* @return {boolean}
*/
static installed(): boolean { return false; }
static installed(): boolean { return checkAvailability(this.pluginRef) === true; }
/**
* Returns the original plugin object
*/
static getPlugin(): any { }
static getPlugin(): any { return get(window, this.pluginRef); }
/**
* Returns the plugin's name
*/
static getPluginName(): string { return; }
static getPluginName(): string { return this.pluginName; }
/**
* Returns the plugin's reference
*/
static getPluginRef(): string { return; }
static getPluginRef(): string { return this.pluginRef; }
/**
* Returns the plugin's install name
*/
static getPluginInstallName(): string { return; }
static getPluginInstallName(): string { return this.plugin; }
/**
* Returns the plugin's supported platforms
*/
static getSupportedPlatforms(): string[] { return; }
static getSupportedPlatforms(): string[] { return this.platforms || []; }
}