Revert "chore(package): bump dependencies and lint rules"

This reverts commit 21ad4734fa.
This commit is contained in:
Daniel
2018-03-16 22:04:01 +01:00
parent 21ad4734fa
commit 6c938bfdb7
178 changed files with 4221 additions and 10592 deletions
+26 -91
View File
@@ -1,47 +1,12 @@
import {
checkAvailability,
CordovaCheck,
CordovaInstance,
getPromise,
InstanceCheck,
InstanceProperty,
IonicNativePlugin,
Plugin,
} from '@ionic-native/core';
import { CordovaInstance, InstanceProperty, Plugin, getPromise, InstanceCheck, checkAvailability, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
declare const window: any, navigator: any;
declare const window: any,
navigator: any;
export type ContactFieldType =
| '*'
| 'addresses'
| 'birthday'
| 'categories'
| 'country'
| 'department'
| 'displayName'
| 'emails'
| 'name.familyName'
| 'name.formatted'
| 'name.givenName'
| 'name.honorificPrefix'
| 'name.honorificSuffix'
| 'id'
| 'ims'
| 'locality'
| 'name.middleName'
| 'name'
| 'nickname'
| 'note'
| 'organizations'
| 'phoneNumbers'
| 'photos'
| 'postalCode'
| 'region'
| 'streetAddress'
| 'title'
| 'urls';
export type ContactFieldType = '*' | 'addresses' | 'birthday' | 'categories' | 'country' | 'department' | 'displayName' | 'emails' | 'name.familyName' | 'name.formatted' | 'name.givenName' | 'name.honorificPrefix' | 'name.honorificSuffix' | 'id' | 'ims' | 'locality' | 'name.middleName' | 'name' | 'nickname' | 'note' | 'organizations' | 'phoneNumbers' | 'photos' | 'postalCode' | 'region' | 'streetAddress' | 'title' | 'urls';
export interface IContactProperties {
/** A globally unique identifier. */
id?: string;
@@ -83,6 +48,7 @@ export interface IContactProperties {
/** An array of web pages associated with the contact. */
urls?: IContactField[];
}
/**
@@ -108,9 +74,7 @@ export class Contact implements IContactProperties {
[key: string]: any;
constructor() {
if (
checkAvailability('navigator.contacts', 'create', 'Contacts') === true
) {
if (checkAvailability('navigator.contacts', 'create', 'Contacts') === true) {
this._objectInstance = navigator.contacts.create();
}
}
@@ -126,9 +90,7 @@ export class Contact implements IContactProperties {
}
@CordovaInstance()
remove(): Promise<any> {
return;
}
remove(): Promise<any> { return; }
@InstanceCheck()
save(): Promise<any> {
@@ -162,7 +124,7 @@ export declare const ContactError: {
PENDING_OPERATION_ERROR: number;
IO_ERROR: number;
NOT_SUPPORTED_ERROR: number;
PERMISSION_DENIED_ERROR: number;
PERMISSION_DENIED_ERROR: number
};
export interface IContactName {
@@ -184,14 +146,12 @@ export interface IContactName {
* @hidden
*/
export class ContactName implements IContactName {
constructor(
public formatted?: string,
constructor(public formatted?: string,
public familyName?: string,
public givenName?: string,
public middleName?: string,
public honorificPrefix?: string,
public honorificSuffix?: string
) {}
public honorificSuffix?: string) { }
}
export interface IContactField {
@@ -207,11 +167,9 @@ export interface IContactField {
* @hidden
*/
export class ContactField implements IContactField {
constructor(
public type?: string,
constructor(public type?: string,
public value?: string,
public pref?: boolean
) {}
public pref?: boolean) { }
}
export interface IContactAddress {
@@ -237,16 +195,14 @@ export interface IContactAddress {
* @hidden
*/
export class ContactAddress implements IContactAddress {
constructor(
public pref?: boolean,
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 country?: string) { }
}
export interface IContactOrganization {
@@ -272,7 +228,7 @@ export class ContactOrganization implements IContactOrganization {
public department?: string,
public title?: string,
public pref?: boolean
) {}
) { }
}
/** Search options to filter navigator.contacts. */
@@ -293,12 +249,10 @@ export interface IContactFindOptions {
* @hidden
*/
export class ContactFindOptions implements IContactFindOptions {
constructor(
public filter?: string,
constructor(public filter?: string,
public multiple?: boolean,
public desiredFields?: string[],
public hasPhoneNumber?: boolean
) {}
public hasPhoneNumber?: boolean) { }
}
/**
@@ -339,19 +293,10 @@ export class ContactFindOptions implements IContactFindOptions {
plugin: 'cordova-plugin-contacts',
pluginRef: 'navigator.contacts',
repo: 'https://github.com/apache/cordova-plugin-contacts',
platforms: [
'Android',
'BlackBerry 10',
'Browser',
'Firefox OS',
'iOS',
'Ubuntu',
'Windows',
'Windows 8',
'Windows Phone'
]
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows 8', 'Windows Phone']
})
export class Contacts extends IonicNativePlugin {
/**
* Create a single contact.
* @returns {Contact} Returns a Contact object
@@ -367,19 +312,11 @@ export class Contacts extends IonicNativePlugin {
* @returns {Promise<Contact[]>} Returns a Promise that resolves with the search results (an array of Contact objects)
*/
@CordovaCheck()
find(
fields: ContactFieldType[],
options?: IContactFindOptions
): Promise<Contact[]> {
find(fields: ContactFieldType[], options?: IContactFindOptions): Promise<Contact[]> {
return getPromise((resolve: Function, reject: Function) => {
navigator.contacts.find(
fields,
(contacts: any[]) => {
resolve(contacts.map(processContact));
},
reject,
options
);
navigator.contacts.find(fields, (contacts: any[]) => {
resolve(contacts.map(processContact));
}, reject, options);
});
}
@@ -390,12 +327,10 @@ export class Contacts extends IonicNativePlugin {
@CordovaCheck()
pickContact(): Promise<Contact> {
return getPromise((resolve: Function, reject: Function) => {
navigator.contacts.pickContact(
(contact: any) => resolve(processContact(contact)),
reject
);
navigator.contacts.pickContact((contact: any) => resolve(processContact(contact)), reject);
});
}
}
/**