Merge branch 'ZiFFeL1992-reindent-angularize'

This commit is contained in:
Ibby Hadeed 2016-07-18 00:07:08 -04:00
commit fe74f9d277
70 changed files with 1747 additions and 1650 deletions

View File

@ -1,6 +1,9 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
declare var window: any;
/**
* @name 3DTouch
* @description

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Action Sheet

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
/**

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name App Availability

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova, CordovaProperty} from './plugin';
import { Cordova, CordovaProperty, Plugin } from './plugin';
declare var window;

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name App Version

View File

@ -1,6 +1,7 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
declare var window;

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Background Mode

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Badge

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Barcode Scanner

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Base64 To Gallery
* @description This plugin allows you to save base64 data as a png image into the device
@ -24,7 +24,7 @@ export class Base64ToGallery {
/**
* Converts a base64 string to an image file in the device gallery
* @param {string} data The actual base64 string that you want to save
* @param {sstring} prefix Prefix the file with a string. Default is 'img_'. Optional.
* @param {string} prefix Prefix the file with a string. Default is 'img_'. Optional.
* @returns {Promise} returns a promise that resolves when the image is saved.
*/
@Cordova()

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
/**

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
/**

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
/**

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Brightness

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
export interface CalendarOptions {
firstReminderMinutes?: number;

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
export interface CameraOptions {

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name CardIO

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Clipboard

View File

@ -1,6 +1,9 @@
import {Plugin, Cordova, InstanceProperty, CordovaInstance} from './plugin';
import { Cordova, CordovaInstance, Plugin, InstanceProperty } from './plugin';
declare var window: any,
navigator: any;
export interface IContactProperties {
/** A globally unique identifier. */
id?: string;
@ -32,7 +35,6 @@ export interface IContactProperties {
urls?: IContactField[];
}
/**
* @private
*/
@ -52,9 +54,11 @@ export class Contact implements IContactProperties {
@InstanceProperty get photos(): IContactField[] { return; }
@InstanceProperty get categories(): IContactField[] { return; }
@InstanceProperty get urls(): IContactField[] { return; }
constructor() {
this._objectInstance = navigator.contacts.create();
}
clone(): Contact {
let newContact = new Contact();
for (let prop in this) {
@ -63,17 +67,21 @@ export class Contact implements IContactProperties {
}
return newContact;
}
@CordovaInstance()
remove(): Promise<any> { return; }
@CordovaInstance()
save(): Promise<any> { return; }
}
interface IContactError {
/** Error code */
code: number;
/** Error message */
message: string;
}
declare var ContactError: {
new (code: number): IContactError;
UNKNOWN_ERROR: number;
@ -84,6 +92,7 @@ declare var ContactError: {
NOT_SUPPORTED_ERROR: number;
PERMISSION_DENIED_ERROR: number
};
export interface IContactName {
/** The complete name of the contact. */
formatted?: string;
@ -104,9 +113,11 @@ export interface IContactName {
*/
export class ContactName implements IContactName {
private _objectInstance: any;
constructor(formatted?: string, familyName?: string, givenName?: string, middleName?: string, honorificPrefix?: string, honorificSuffix?: string) {
this._objectInstance = new window.ContactName(formatted, familyName, givenName, middleName, honorificPrefix, honorificSuffix);
}
@InstanceProperty get formatted(): string { return; }
@InstanceProperty get familyName(): string { return; }
@InstanceProperty get givenName(): string { return; }
@ -129,9 +140,11 @@ export interface IContactField {
*/
export class ContactField implements IContactField {
private _objectInstance: any;
constructor(type?: string, value?: string, pref?: boolean) {
this._objectInstance = new window.ContactField(type, value, pref);
}
@InstanceProperty get type(): string { return; }
@InstanceProperty get value(): string { return; }
@InstanceProperty get pref(): boolean { return; }
@ -161,6 +174,7 @@ export interface IContactAddress {
*/
export class ContactAddress implements IContactAddress {
private _objectInstance: any;
constructor(pref?: boolean,
type?: string,
formatted?: string,
@ -171,6 +185,7 @@ export class ContactAddress implements IContactAddress {
country?: string) {
this._objectInstance = new window.ContactAddress(pref, type, formatted, streetAddress, locality, region, postalCode, country);
}
@InstanceProperty get pref(): boolean { return; }
@InstanceProperty get type(): string { return; }
@InstanceProperty get formatted(): string { return; }
@ -224,9 +239,11 @@ export interface IContactFindOptions {
*/
export class ContactFindOptions implements IContactFindOptions {
private _objectInstance: any;
constructor() {
this._objectInstance = new window.ContactFindOptions();
}
@InstanceProperty get filter(): string { return; }
@InstanceProperty get multiple(): boolean { return; }
@InstanceProperty get desiredFields(): any { return; }
@ -264,6 +281,7 @@ export class Contacts {
static create(): Contact {
return new Contact();
}
/**
* Search for contacts in the Contacts list.
* @param fields {string[]} Contact fields to be used as a search qualifier.
@ -283,6 +301,7 @@ export class Contacts {
errorIndex: 2
})
static find(fields: string[], options?: any): Promise<any> { return; }
/**
* Select a single Contact.
* @return Returns a Promise that resolves with the selected Contact

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
export interface DatePickerOptions {
/**

View File

@ -1,5 +1,7 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
/**
* @name DB Meter
* @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone.

View File

@ -1,6 +1,7 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
export interface DeeplinkMatch {
/**
* The route info for the matched route

View File

@ -1,4 +1,5 @@
import {Plugin, CordovaProperty} from './plugin';
import { CordovaProperty, Plugin } from './plugin';
declare var window: {
device: Device

View File

@ -1,4 +1,6 @@
import { Cordova, Plugin } from './plugin';
@Plugin({
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
pluginRef: 'plugins.DeviceAccounts',

View File

@ -1,6 +1,7 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
export interface AccelerationData {
/**
@ -73,9 +74,7 @@ export class DeviceMotion {
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
*/
@Cordova()
static getCurrentAcceleration(): Promise<AccelerationData> {
return;
}
static getCurrentAcceleration(): Promise<AccelerationData> { return; }
/**
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
@ -87,7 +86,5 @@ export class DeviceMotion {
observable: true,
clearFunction: 'clearWatch'
})
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> {
return;
}
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> { return; }
}

View File

@ -1,6 +1,7 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
export interface CompassHeading {
/**

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
@Plugin({
plugin: 'cordova.plugins.diagnostic',

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
export interface PromptCallback {
@ -11,7 +12,6 @@ export interface PromptCallback {
* The text entered in the prompt dialog box. (String)
*/
input1: string;
}

View File

@ -1,5 +1,8 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
declare var cordova: any;
/**
* @name Email Composer
* @description
@ -83,6 +86,7 @@ export class EmailComposer {
static open(email: Email, scope?: any): Promise<any> { return; }
}
export interface Email {
app?: string;
to?: string | Array<string>;

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Facebook

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
declare var window;

View File

@ -1,4 +1,5 @@
import {Plugin, CordovaInstance} from './plugin';
import { CordovaInstance, Plugin } from './plugin';
declare var FileTransfer;

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Flashlight
@ -21,7 +22,6 @@ import {Plugin, Cordova} from './plugin';
})
export class Flashlight {
/**
* Checks if the flashlight is available
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.

View File

@ -1,6 +1,7 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
declare var navigator: any;
export interface Coordinates {

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Globalization
@ -40,7 +40,7 @@ export class Globalization {
*/
@Cordova({
successIndex: 1,
errorIndex: 2
errorIndex 2
})
static dateToString(date: Date, options: { formatLength: string, selector: string }): Promise<{ value: string }> { return; }
@ -56,7 +56,6 @@ export class Globalization {
})
static stringToDate(dateString: string, options: { formatLength: string, selector: string }): Promise<{ year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number }> { return; }
/**
* Returns a pattern string to format and parse dates according to the client's user preferences.
* @param options Object with the format length and selector
@ -67,7 +66,6 @@ export class Globalization {
})
static getDatePattern(options: { formatLength: string, selector: string }): Promise<{ pattern: string }> { return; }
/**
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
* @param options Object with type (narrow or wide) and item (month or days).

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Google Plus

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
declare var window;

View File

@ -1,10 +1,13 @@
import { Cordova, CordovaInstance, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
/**
* @private
* Created by Ibrahim on 3/29/2016.
*/
declare var plugin: any;
/**
* @private
* You can listen to these events where appropriate

View File

@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Hotspot

View File

@ -1,5 +1,7 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
/**
* @name Httpd
* @description
@ -38,7 +40,9 @@ export class Httpd {
*/
@Cordova()
static getLocalPath(): Promise<string> { return; }
}
/**
* These options are used for the Httpd.startServer() function.
*/

View File

@ -1,6 +1,7 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
declare var cordova: any;
export interface Beacon {
@ -47,6 +48,7 @@ export interface Beacon {
accuracy: number;
}
export interface BeaconRegion {
/**
* A unique identifier for this region.
@ -76,6 +78,7 @@ export interface BeaconRegion {
*/
notifyEntryStateOnDisplay?: boolean;
}
export interface CircularRegion {
/**
* A unique identifier for this region.
@ -97,6 +100,7 @@ export interface CircularRegion {
*/
radius: number;
}
export type Region = BeaconRegion | CircularRegion;
export interface PluginResult {
@ -131,6 +135,7 @@ export interface PluginResult {
*/
error: string;
}
export interface Delegate {
/**
* An observable that publishes information about the location permission authorization status.
@ -270,7 +275,6 @@ export interface Delegate {
})
export class IBeacon {
/**
* Instances of this class are delegates between the {@link LocationManager} and
* the code that consumes the messages generated on in the native layer.

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
export interface ImagePickerOptions {
// max images to be selected, defaults to 15. If this is set to 1, upon
@ -55,4 +56,5 @@ export class ImagePicker {
callbackOrder: 'reverse'
})
static getPictures(options: ImagePickerOptions): Promise<any> { return; }
}

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
export interface InAppBrowserEvent extends Event {
/** the eventname, either loadstart, loadstop, loaderror, or exit. */
@ -82,4 +83,5 @@ export class InAppBrowser {
sync: true
})
static open(url: string, target?: string, options?: string): InAppBrowserRef { return; }
}

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Insomnia
@ -44,4 +45,5 @@ export class Insomnia {
*/
@Cordova()
static allowSleepAgain(): Promise<any> { return; }
}

View File

@ -1,6 +1,7 @@
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
/**
* @name Keyboard
* @description

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
export interface LaunchNavigatorOptions {

View File

@ -1,4 +1,6 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Local Notifications
* @description

View File

@ -1,6 +1,9 @@
import {Plugin, Cordova, CordovaProperty} from './plugin';
import { Cordova, CordovaProperty, Plugin } from './plugin';
import { Observable } from 'rxjs/Rx';
declare var navigator: any;
/**
* @name Media Capture
* @description

View File

@ -1,6 +1,9 @@
import { CordovaInstance, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
declare var Media: any;
/**
* @name MediaPlugin
* @description
@ -185,8 +188,6 @@ export class MediaPlugin {
})
stop(): void { }
}
export class MediaError {

View File

@ -1,4 +1,6 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Native Storage
* @description
@ -53,4 +55,5 @@ export class NativeStorage {
*/
@Cordova()
static clear(): Promise<any> {return; }
}

View File

@ -1,6 +1,7 @@
import {Plugin, Cordova, CordovaProperty} from './plugin';
import { Cordova, CordovaProperty, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
declare var navigator: any;
/**

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name OneSignal
@ -250,4 +251,5 @@ export class OneSignal {
logLevel: number,
visualLevel: number
}): void { }
}

View File

@ -1,4 +1,6 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Pin Dialog
* @description
@ -34,4 +36,5 @@ export class PinDialog {
successIndex: 1
})
static prompt(message: string, title: string, buttons: string[]): Promise<{ buttonIndex: number, input1: string }> { return; }
}

View File

@ -1,4 +1,6 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
declare var cordova: any;
export interface PrintOptions {
@ -61,4 +63,5 @@ export class Printer {
*/
@Cordova()
static print(content: string | HTMLElement, options?: PrintOptions): Promise<any> { return; }
}

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
export type EventResponse = RegistrationEventResponse | NotificationEventResponse | Error;

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name SafariViewController
@ -83,6 +84,7 @@ export class SafariViewController {
*/
@Cordova()
static mayLaunchUrl(url: string): Promise<any> { return; }
}
export interface SafariViewControllerOptions {

View File

@ -1,5 +1,8 @@
import { Cordova, Plugin } from './plugin';
declare var navigator: any;
@Plugin({
plugin: 'https://github.com/gitawego/cordova-screenshot.git',
pluginRef: 'navigator.screenshot',

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Sim

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* Options for sending an SMS

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Social Sharing
@ -20,7 +21,6 @@ import {Plugin, Cordova} from './plugin';
})
export class SocialSharing {
/**
* Shares using the share sheet
* @param message {string} The message you would like to share.
@ -141,5 +141,4 @@ export class SocialSharing {
})
static shareViaEmail(message: string, subject: string, to: Array<string>, cc: Array<string>, bcc: Array<string>, files: string | Array<string>): Promise<any> { return; }
}

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Spinner Dialog
@ -22,7 +23,6 @@ import {Plugin, Cordova} from './plugin';
})
export class SpinnerDialog {
/**
* Shows the spinner dialog
* @param title {string} Spinner title (shows on Android only)

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Splashscreen

View File

@ -1,5 +1,8 @@
import {CordovaInstance, Plugin, Cordova} from './plugin';
import { Cordova, CordovaInstance, Plugin } from './plugin';
declare var sqlitePlugin;
/**
* @name SQLite
*

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova, CordovaProperty} from './plugin';
import { Cordova, CordovaProperty, Plugin } from './plugin';
declare var window;
@ -117,4 +118,5 @@ export class StatusBar {
*/
@CordovaProperty
static get isVisible() { return window.StatusBar.isVisible; }
}

View File

@ -1,6 +1,7 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';
export interface ToastOptions {
/**
* Message to display

View File

@ -1,4 +1,5 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name TouchID
@ -82,4 +83,5 @@ export class TouchID {
*/
@Cordova()
static verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(message: string, enterPasswordLabel: string): Promise<any> { return; }
}

View File

@ -1,4 +1,6 @@
import {Plugin, Cordova} from './plugin';
import { Cordova, Plugin } from './plugin';
/**
* @name Vibration
* @description Vibrates the device

View File

@ -1,5 +1,8 @@
import { Cordova, CordovaProperty, Plugin } from './plugin';
declare var window;
/**
* @name WebIntent
* @description