diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9986d14fb..6b2cd6b65 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,23 @@
+
+# [4.14.0](https://github.com/ionic-team/ionic-native/compare/v4.13.0...v4.14.0) (2018-09-18)
+
+
+### Bug Fixes
+
+* **mobile-accessibility:** add correct pluginRef ([3699fa9](https://github.com/ionic-team/ionic-native/commit/3699fa9)), closes [#1860](https://github.com/ionic-team/ionic-native/issues/1860)
+* **onesignal:** add missing setLocationShared method ([#2723](https://github.com/ionic-team/ionic-native/issues/2723)) ([8bab321](https://github.com/ionic-team/ionic-native/commit/8bab321))
+* **push:** add missing Chanel options ([3ef9593](https://github.com/ionic-team/ionic-native/commit/3ef9593)), closes [#2712](https://github.com/ionic-team/ionic-native/issues/2712)
+* **web-intent:** add missing properties ([d077c48](https://github.com/ionic-team/ionic-native/commit/d077c48)), closes [#2701](https://github.com/ionic-team/ionic-native/issues/2701)
+
+
+### Features
+
+* **chooster:** add plugin ([04db233](https://github.com/ionic-team/ionic-native/commit/04db233)), closes [#2612](https://github.com/ionic-team/ionic-native/issues/2612)
+* **local-notifications:** add missing functions ([10d222d](https://github.com/ionic-team/ionic-native/commit/10d222d))
+* **onesignal:** add missing functions ([51006a7](https://github.com/ionic-team/ionic-native/commit/51006a7)), closes [#2504](https://github.com/ionic-team/ionic-native/issues/2504)
+
+
+
# [4.13.0](https://github.com/ionic-team/ionic-native/compare/v4.12.3...v4.13.0) (2018-09-15)
diff --git a/package-lock.json b/package-lock.json
index 43a92146e..da340453b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "ionic-native",
- "version": "4.13.0",
+ "version": "4.14.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -2923,9 +2923,9 @@
"dev": true
},
"dependency-graph": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.4.1.tgz",
- "integrity": "sha1-MC5YIY2FxRqXY4cw2/m32FKhlpM=",
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.7.2.tgz",
+ "integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==",
"dev": true
},
"deprecated": {
@@ -2963,34 +2963,20 @@
}
},
"dgeni": {
- "version": "0.4.7",
- "resolved": "https://registry.npmjs.org/dgeni/-/dgeni-0.4.7.tgz",
- "integrity": "sha1-UHBifdKPiNSABuIfVa+xipy4vmg=",
+ "version": "0.4.10",
+ "resolved": "https://registry.npmjs.org/dgeni/-/dgeni-0.4.10.tgz",
+ "integrity": "sha512-In8huU+6W+Rd7MdfzhQoRbntF4AsJgtbwRUTyfPgvhaC3RGJX/YOEkMnn7vLLk3zaCrEkIQGW6eADoudpnBceg==",
"dev": true,
"requires": {
"canonical-path": "~0.0.2",
- "dependency-graph": "~0.4.1",
+ "dependency-graph": "^0.7.0",
"di": "0.0.1",
- "lodash": "^3.10.1",
+ "lodash": "^4.17.10",
"objectdiff": "^1.1.0",
"optimist": "~0.6.1",
- "q": "~1.4.1",
- "validate.js": "^0.9.0",
+ "q": "^1.5.1",
+ "validate.js": "^0.12.0",
"winston": "^2.1.1"
- },
- "dependencies": {
- "lodash": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
- "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
- "dev": true
- },
- "q": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
- "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=",
- "dev": true
- }
}
},
"dgeni-packages": {
@@ -11589,9 +11575,9 @@
}
},
"validate.js": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/validate.js/-/validate.js-0.9.0.tgz",
- "integrity": "sha1-is8BRPFSChmDXGzGY/ReCDaqVsg=",
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/validate.js/-/validate.js-0.12.0.tgz",
+ "integrity": "sha512-/x2RJSvbqEyxKj0RPN4xaRquK+EggjeVXiDDEyrJzsJogjtiZ9ov7lj/svVb4DM5Q5braQF4cooAryQbUwOxlA==",
"dev": true
},
"verror": {
@@ -11757,9 +11743,9 @@
"optional": true
},
"winston": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.0.tgz",
- "integrity": "sha1-gIBQuT1SZh7Z+2wms/DIJnCLCu4=",
+ "version": "2.4.4",
+ "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.4.tgz",
+ "integrity": "sha512-NBo2Pepn4hK4V01UfcWcDlmiVTs7VTB1h7bgnB0rgP146bYhMxX0ypCz3lBOfNxCO4Zuek7yeT+y/zM1OfMw4Q==",
"dev": true,
"requires": {
"async": "~1.0.0",
diff --git a/package.json b/package.json
index ab7e93ef5..6390017ba 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ionic-native",
- "version": "4.13.0",
+ "version": "4.14.0",
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
"homepage": "https://ionicframework.com/",
"author": "Ionic Team (https://ionic.io)",
@@ -16,7 +16,7 @@
"child-process-promise": "2.2.1",
"conventional-changelog-cli": "^2.0.5",
"cz-conventional-changelog": "^2.1.0",
- "dgeni": "0.4.7",
+ "dgeni": "^0.4.10",
"dgeni-packages": "0.16.10",
"fs-extra": "^7.0.0",
"gulp": "3.9.1",
diff --git a/scripts/build/publish.js b/scripts/build/publish.js
index 449b7a195..bf7560c15 100644
--- a/scripts/build/publish.js
+++ b/scripts/build/publish.js
@@ -10,7 +10,7 @@ const ROOT = path.resolve(path.join(__dirname, '../../')),
const FLAGS = '--access public'; // add any flags here if you want... (example: --tag alpha)
-const PACKAGES = fs.readdir(DIST);
+const PACKAGES = fs.readdirSync(DIST);
const failedPackages = [];
diff --git a/src/@ionic-native/plugins/chooser/index.ts b/src/@ionic-native/plugins/chooser/index.ts
new file mode 100644
index 000000000..2b9732041
--- /dev/null
+++ b/src/@ionic-native/plugins/chooser/index.ts
@@ -0,0 +1,67 @@
+import { Injectable } from '@angular/core';
+import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
+
+export interface ChooserResult {
+ data: Uint8Array;
+ dataURI: string;
+ mediaType: string;
+ name: string;
+ uri: string;
+}
+
+/**
+ * @name Chooser
+ * @description
+ * File chooser plugin for Cordova.
+ *
+ * The following must be added to config.xml to prevent crashing when selecting large files on Android:
+ * ```xml
+ *
+ *
+ *
+ *
+ *
+ * ```
+ *
+ * @usage
+ * ```typescript
+ * import { Chooser } from '@ionic-native/chooser';
+ *
+ *
+ * constructor(private chooser: Chooser) { }
+ *
+ * ...
+ *
+ *
+ * this.chooser.getFile()
+ * .then(file => console.log(file ? file.name : 'canceled'))
+ * .catch((error: any) => console.error(error));
+ *
+ * ```
+ *
+ * @interfaces
+ * ChooserResult
+ */
+@Plugin({
+ pluginName: 'Chooser',
+ plugin: 'cordova-plugin-chooser',
+ pluginRef: 'chooser',
+ repo: 'https://github.com/cyph/cordova-plugin-chooser',
+ platforms: ['Android', 'iOS']
+})
+@Injectable()
+export class Chooser extends IonicNativePlugin {
+ /**
+ * Displays native prompt for user to select a file.
+ * @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
+ * @return {Promise} Promise containing selected file's raw binary data,
+ * base64-encoded data: URI, MIME type, display name, and original URI.
+ */
+ @Cordova()
+ getFile(accept: string): Promise {
+ return;
+ }
+}
diff --git a/src/@ionic-native/plugins/email-composer/index.ts b/src/@ionic-native/plugins/email-composer/index.ts
index a7f794ef2..3891c259b 100644
--- a/src/@ionic-native/plugins/email-composer/index.ts
+++ b/src/@ionic-native/plugins/email-composer/index.ts
@@ -117,6 +117,30 @@ export interface EmailComposerOptions {
})
@Injectable()
export class EmailComposer extends IonicNativePlugin {
+ /**
+ * Checks if the app has a permission to access email accounts information
+ * @return {Promise} returns a promise that resolves with a boolean that indicates if the permission was granted
+ */
+ @Cordova({
+ successIndex: 0,
+ errorIndex: 2
+ })
+ hasPermission(): Promise {
+ return;
+ }
+
+ /**
+ * Request permission to access email accounts information
+ * @return {Promise} returns a promise that resolves with a boolean that indicates if the permission was granted
+ */
+ @Cordova({
+ successIndex: 0,
+ errorIndex: 2
+ })
+ requestPermission(): Promise {
+ return;
+ }
+
/**
* Verifies if sending emails is supported on the device.
*
@@ -146,39 +170,6 @@ export class EmailComposer extends IonicNativePlugin {
});
}
- /**
- * Request permission to access email accounts information
- * @return {Promise} returns a promise that resolves with a boolean that indicates if the permission was granted
- */
- @Cordova({
- successIndex: 0,
- errorIndex: 2
- })
- requestPermission(): Promise {
- return;
- }
-
- /**
- * Checks if the app has a permission to access email accounts information
- * @return {Promise} returns a promise that resolves with a boolean that indicates if the permission was granted
- */
- @Cordova({
- successIndex: 0,
- errorIndex: 2
- })
- hasPermission(): Promise {
- return;
- }
-
- /**
- * Adds a new mail app alias.
- *
- * @param {string} alias The alias name
- * @param {string} packageName The package name
- */
- @Cordova()
- addAlias(alias: string, packageName: string): void {}
-
/**
* Displays the email composer pre-filled with data.
*
@@ -193,4 +184,13 @@ export class EmailComposer extends IonicNativePlugin {
open(options: EmailComposerOptions, scope?: any): Promise {
return;
}
+
+ /**
+ * Adds a new mail app alias.
+ *
+ * @param {string} alias The alias name
+ * @param {string} packageName The package name
+ */
+ @Cordova()
+ addAlias(alias: string, packageName: string): void {}
}
diff --git a/src/@ionic-native/plugins/ibeacon/index.ts b/src/@ionic-native/plugins/ibeacon/index.ts
index d23a8c23d..959d4b1d1 100644
--- a/src/@ionic-native/plugins/ibeacon/index.ts
+++ b/src/@ionic-native/plugins/ibeacon/index.ts
@@ -266,7 +266,7 @@ export interface IBeaconDelegate {
*
* this.ibeacon.startMonitoringForRegion(beaconRegion)
* .then(
- * () => console.log('Native layer recieved the request to monitoring'),
+ * () => console.log('Native layer received the request to monitoring'),
* error => console.error('Native layer failed to begin monitoring: ', error)
* );
* ```
diff --git a/src/@ionic-native/plugins/local-notifications/index.ts b/src/@ionic-native/plugins/local-notifications/index.ts
index 38dbd7d5d..8e98036c8 100755
--- a/src/@ionic-native/plugins/local-notifications/index.ts
+++ b/src/@ionic-native/plugins/local-notifications/index.ts
@@ -483,6 +483,24 @@ export interface ILocalNotification {
})
@Injectable()
export class LocalNotifications extends IonicNativePlugin {
+ /**
+ * Informs if the app has the permission to show notifications.
+ * @returns {Promise}
+ */
+ @Cordova()
+ hasPermission(): Promise {
+ return;
+ }
+
+ /**
+ * Request permission to show notifications if not already granted.
+ * @returns {Promise}
+ */
+ @Cordova()
+ requestPermission(): Promise {
+ return;
+ }
+
/**
* Schedules a single or multiple notifications
* @param options {Notification | Array} optional
@@ -569,6 +587,26 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
+ /**
+ * Check if a notification has a given type.
+ * @param {number} id The ID of the notification.
+ * @param {string} type The type of the notification.
+ * @returns {Promise}
+ */
+ @Cordova()
+ hasType(id: number, type: string): Promise {
+ return;
+ }
+
+ /**
+ * Get the type (triggered, scheduled) for the notification.
+ * @param {number} id The ID of the notification.
+ */
+ @Cordova()
+ getType(id: number): Promise {
+ return;
+ }
+
/**
* Get all the notification ids
* @returns {Promise>}
@@ -578,15 +616,6 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
- /**
- * Get the ids of triggered notifications
- * @returns {Promise>}
- */
- @Cordova()
- getTriggeredIds(): Promise {
- return;
- }
-
/**
* Get the ids of scheduled notifications
* @returns {Promise>} Returns a promise
@@ -596,6 +625,15 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
+ /**
+ * Get the ids of triggered notifications
+ * @returns {Promise>}
+ */
+ @Cordova()
+ getTriggeredIds(): Promise {
+ return;
+ }
+
/**
* Get a notification object
* @param notificationId {any} The id of the notification to get
@@ -606,6 +644,15 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
+ /**
+ * Get all notification objects
+ * @returns {Promise>}
+ */
+ @Cordova()
+ getAll(): Promise {
+ return;
+ }
+
/**
* Get a scheduled notification object
* @param notificationId {any} The id of the notification to get
@@ -626,51 +673,6 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
- /**
- * Get all notification objects
- * @returns {Promise>}
- */
- @Cordova()
- getAll(): Promise {
- return;
- }
-
- /**
- * Get all scheduled notification objects
- * @returns {Promise>}
- */
- @Cordova()
- getAllScheduled(): Promise {
- return;
- }
-
- /**
- * Get all triggered notification objects
- * @returns {Promise>}
- */
- @Cordova()
- getAllTriggered(): Promise {
- return;
- }
-
- /**
- * Request permission to show notifications if not already granted.
- * @returns {Promise}
- */
- @Cordova()
- requestPermission(): Promise {
- return;
- }
-
- /**
- * Informs if the app has the permission to show notifications.
- * @returns {Promise}
- */
- @Cordova()
- hasPermission(): Promise {
- return;
- }
-
/**
* Adds a group of actions
* @param groupId The id of the action group
@@ -678,10 +680,7 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise}
*/
@Cordova()
- addActions(
- groupId: any,
- actions: ILocalNotificationAction[]
- ): Promise {
+ addActions(groupId: any, actions: ILocalNotificationAction[]): Promise {
return;
}
@@ -727,6 +726,24 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
+ /**
+ * Get all scheduled notification objects
+ * @returns {Promise>}
+ */
+ @Cordova()
+ getAllScheduled(): Promise {
+ return;
+ }
+
+ /**
+ * Get all triggered notification objects
+ * @returns {Promise>}
+ */
+ @Cordova()
+ getAllTriggered(): Promise {
+ return;
+ }
+
/**
* Sets a callback for a specific event
* @param eventName {string} The name of the event. Available events: schedule, trigger, click, update, clear, clearall, cancel, cancelall. Custom event names are possible for actions
diff --git a/src/@ionic-native/plugins/mobile-accessibility/index.ts b/src/@ionic-native/plugins/mobile-accessibility/index.ts
index a37261aa9..8e0774c72 100644
--- a/src/@ionic-native/plugins/mobile-accessibility/index.ts
+++ b/src/@ionic-native/plugins/mobile-accessibility/index.ts
@@ -23,7 +23,7 @@ import { Injectable } from '@angular/core';
@Plugin({
pluginName: 'MobileAccessibility',
plugin: 'phonegap-plugin-mobile-accessibility',
- pluginRef: 'MobileAccessibility',
+ pluginRef: 'window.MobileAccessibility',
repo: 'https://github.com/phonegap/phonegap-mobile-accessibility',
platforms: ['Android Fire OS', 'Android', 'iOS', 'Windows']
})
diff --git a/src/@ionic-native/plugins/onesignal/index.ts b/src/@ionic-native/plugins/onesignal/index.ts
index 641d11655..51d64e81f 100644
--- a/src/@ionic-native/plugins/onesignal/index.ts
+++ b/src/@ionic-native/plugins/onesignal/index.ts
@@ -415,6 +415,7 @@ export enum OSActionType {
export class OneSignal extends IonicNativePlugin {
/**
* constants to use in inFocusDisplaying()
+ * @hidden
*/
OSInFocusDisplayOption = {
None: 0,
@@ -668,6 +669,13 @@ export class OneSignal extends IonicNativePlugin {
@Cordova({ sync: true })
setLogLevel(logLevel: { logLevel: number; visualLevel: number }): void {}
+ /**
+ * Disable or enable location collection (Defaults to enabled) if your app has location permission.
+ * @param shared {boolean}
+ */
+ @Cordova({ sync: true })
+ setLocationShared(shared: boolean): void {}
+
/**
* The passed in function will be fired when a notification permission setting changes.
* This includes the following events:
@@ -699,9 +707,66 @@ export class OneSignal extends IonicNativePlugin {
return;
}
+ /**
+ * Allows you to set the user's email address with the OneSignal SDK.
+ * @param {string} email Email address
+ * @param {string} [emailAuthToken] Email auth token
+ */
+ @Cordova()
+ setEmail(email: string, emailAuthToken?: string): Promise {
+ return;
+ }
+
+ /**
+ * If your app implements logout functionality, you can call logoutEmail to dissociate the email from the device
+ */
+ @Cordova()
+ logoutEmail(): Promise {
+ return;
+ }
+
+ /**
+ * The passed in function will be fired when a notification subscription property changes.
+ * This includes the following events:
+ * - Getting a push token from Apple / Google.
+ * - Getting a player / user id from OneSignal
+ * - OneSignal.setSubscription is called
+ * - User disables or enables notifications
+ * @return {Observable}
+ */
+ @Cordova({
+ observable: true
+ })
+ addEmailSubscriptionObserver(): Observable {
+ return;
+ }
+
/**
* Clears all OneSignal notifications
*/
@Cordova({ sync: true })
clearOneSignalNotifications(): void {}
+
+ /**
+ * Allows you to delay the initialization of the SDK until the user provides privacy consent.
+ * The SDK will not be fully initialized until the provideUserConsent(true) method is called.
+ * @param {boolean} required
+ */
+ @Cordova()
+ setRequiresUserPrivacyConsent(required: boolean): void {}
+
+ /**
+ * If your application is set to require the user's privacy consent, you can provide this consent using this method.
+ * Until you call provideUserConsent(true), the SDK will not fully initialize and will not send any data to OneSignal.
+ * @param {boolean} granted
+ */
+ @Cordova()
+ provideUserConsent(granted: boolean): void {}
+
+ /**
+ * Accepts a callback, which returns a boolean variable indicating if the user has given privacy consent yet.
+ * @param {Function} callback
+ */
+ @Cordova()
+ userProvidedPrivacyConsent(callback: Function): void {}
}
diff --git a/src/@ionic-native/plugins/push/index.ts b/src/@ionic-native/plugins/push/index.ts
index 9cf05c660..45c59edda 100644
--- a/src/@ionic-native/plugins/push/index.ts
+++ b/src/@ionic-native/plugins/push/index.ts
@@ -221,12 +221,15 @@ export interface PushOptions {
}
export type Priority = 1 | 2 | 3 | 4 | 5;
+export type Visibility = 0 | 1 | -1;
export interface Channel {
id: string;
description: string;
importance: Priority;
sound?: string;
+ vibration?: boolean | number[];
+ visibility?: Visibility;
}
export type PushEvent = string;
diff --git a/src/@ionic-native/plugins/web-intent/index.ts b/src/@ionic-native/plugins/web-intent/index.ts
index e95a1f101..aa76e2068 100644
--- a/src/@ionic-native/plugins/web-intent/index.ts
+++ b/src/@ionic-native/plugins/web-intent/index.ts
@@ -127,6 +127,20 @@ export class WebIntent extends IonicNativePlugin {
@CordovaProperty
ACTION_PICK: string;
+ /**
+ * Convenience constant for actions
+ * @type {string}
+ */
+ @CordovaProperty
+ ACTION_INSTALL_PACKAGE: string;
+
+ /**
+ * Convenience constant for actions
+ * @type {string}
+ */
+ @CordovaProperty
+ ACTION_UNINSTALL_PACKAGE: string;
+
/**
* Launches an Android intent
* @param options {IntentOptions}