Compare commits

...

20 Commits

Author SHA1 Message Date
Ibby 9974a1fbd8 chore(): update changelog 2017-01-07 08:04:21 -05:00
Ibby 67edb835f2 2.2.14 2017-01-07 08:03:34 -05:00
Jonathan Samines 5b6cb6e19f docs(device): fix reference (#930) 2017-01-07 08:00:56 -05:00
Ibby 9a5a62bc3a chore(): tslint 2017-01-07 07:59:06 -05:00
Ibby d192dee1ee docs(google-plus): add basic docs 2017-01-07 07:43:27 -05:00
Ibby 0d6997cbdd fix(push): fix typing for additionalData
closes #868
2017-01-07 06:42:38 -05:00
Ibby 49325e8b93 Merge branch 'master' of github.com:driftyco/ionic-native 2017-01-07 05:44:45 -05:00
Ibby de07df6f20 fix(inappbrowser): fix insertCSS method name
closes #921
2017-01-07 05:44:38 -05:00
Vlado Velichkovski ca60c5b912 fix(nfc): add missing param for addMimeTypeListener (#937)
Add missing  `mimeType` parameter in `addMimeTypeListener` function
2017-01-07 05:29:08 -05:00
Ibby 54d1a9891b chore(): add try/catch for callCordovaPlugin method
closes #882
2017-01-07 05:26:38 -05:00
Ibby 2c57bc965c docs(globalization): add platforms information
closes #935
2017-01-07 04:47:15 -05:00
Ibby d62779a2a6 feat(market): add search method, return promises 2017-01-07 04:38:37 -05:00
Ibby 009a20608e docs(ibeacon): fix method reference
closes #933
2017-01-07 04:32:18 -05:00
Ibby ca14bf6a75 fix(google-plus): fixes login without options
closes #932
2017-01-07 04:27:58 -05:00
Ibby 49fe24dee2 fix(google-analytics): fix startTrackerWithId when interval is not provided 2017-01-01 06:30:33 -05:00
Ibby d9d89341d2 docs(onesignal): fix docs 2017-01-01 04:11:51 -05:00
Guille bbf75bcbd7 fix(mixpanel): fix issue when not passing eventProperties (#927) 2016-12-30 06:32:53 -05:00
Megan Kearl 9441928884 style(): fix whitespace lint issue (#923) 2016-12-30 00:47:51 -05:00
Watchara S 8eb656cce8 feat(background-geolocation): add altitudeAccuracy into response typings (#922) 2016-12-29 04:39:16 -05:00
Alexey Vasiliev bf0486cb8b Fix doc about changed property (#919) 2016-12-27 16:44:03 -05:00
16 changed files with 86 additions and 20 deletions
+21
View File
@@ -1,3 +1,24 @@
<a name="2.2.14"></a>
## [2.2.14](https://github.com/driftyco/ionic-native/compare/v2.2.13...v2.2.14) (2017-01-07)
### Bug Fixes
* **google-analytics:** fix startTrackerWithId when interval is not provided ([49fe24d](https://github.com/driftyco/ionic-native/commit/49fe24d))
* **google-plus:** fixes login without options ([ca14bf6](https://github.com/driftyco/ionic-native/commit/ca14bf6)), closes [#932](https://github.com/driftyco/ionic-native/issues/932)
* **inappbrowser:** fix insertCSS method name ([de07df6](https://github.com/driftyco/ionic-native/commit/de07df6)), closes [#921](https://github.com/driftyco/ionic-native/issues/921)
* **mixpanel:** fix issue when not passing eventProperties ([#927](https://github.com/driftyco/ionic-native/issues/927)) ([bbf75bc](https://github.com/driftyco/ionic-native/commit/bbf75bc))
* **nfc:** add missing param for addMimeTypeListener ([#937](https://github.com/driftyco/ionic-native/issues/937)) ([ca60c5b](https://github.com/driftyco/ionic-native/commit/ca60c5b))
* **push:** fix typing for additionalData ([0d6997c](https://github.com/driftyco/ionic-native/commit/0d6997c)), closes [#868](https://github.com/driftyco/ionic-native/issues/868)
### Features
* **background-geolocation:** add altitudeAccuracy into response typings ([#922](https://github.com/driftyco/ionic-native/issues/922)) ([8eb656c](https://github.com/driftyco/ionic-native/commit/8eb656c))
* **market:** add search method, return promises ([d62779a](https://github.com/driftyco/ionic-native/commit/d62779a))
<a name="2.2.13"></a>
## [2.2.13](https://github.com/driftyco/ionic-native/compare/v2.2.12...v2.2.13) (2016-12-27)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "2.2.13",
"version": "2.2.14",
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
"main": "dist/es5/index.js",
"module": "dist/esm/index.js",
+1 -1
View File
@@ -16,7 +16,7 @@ import { Cordova, Plugin } from './plugin';
*
* if (Device.platform === 'iOS') {
* app = 'twitter://';
* } else if (device.platform === 'Android') {
* } else if (Device.platform === 'Android') {
* app = 'com.twitter.android';
* }
*
+5
View File
@@ -49,6 +49,11 @@ export interface BackgroundGeolocationResponse {
*/
altitude: number;
/**
* accuracy of the altitude if available.
*/
altitudeAccuracy: number;
/**
* bearing, in degrees.
*/
+2 -1
View File
@@ -14,7 +14,8 @@ import { Cordova, Plugin } from './plugin';
pluginName: 'Globalization',
plugin: 'cordova-plugin-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', 'Firefox OS', 'iOS', 'Windows Phone 8', 'Widnows', 'Browser']
})
export class Globalization {
+7 -1
View File
@@ -7,6 +7,9 @@ import { Cordova, Plugin } from './plugin';
* ```typescript
* import { GooglePlus } from 'ionic-native';
*
* GooglePlus.login()
* .then(res => console.log(res))
* .catch(err => console.error(err));
*
* ```
*/
@@ -25,7 +28,10 @@ export class GooglePlus {
* @param options
* @returns {Promise<any>}
*/
@Cordova()
@Cordova({
successIndex: 1,
errorIndex: 2
})
static login(options?: any): Promise<any> { return; }
/**
+4 -1
View File
@@ -41,7 +41,10 @@ export class GoogleAnalytics {
* @param {number} interval Optional dispatch period in seconds. Defaults to 30.
* @returns {Promise<any>}
*/
@Cordova()
@Cordova({
successIndex: 2,
errorIndex: 3
})
static startTrackerWithId(id: string, interval?: number): Promise<any> { return; }
/**
+1 -1
View File
@@ -237,7 +237,7 @@ export interface IBeaconDelegate {
* // Request permission to use location on iOS
* IBeacon.requestAlwaysAuthorization();
* // create a new delegate and register it with the native layer
* let delegate = IBeacon.IBeaconDelegate();
* let delegate = IBeacon.Delegate();
*
* // Subscribe to some of the delegate's event handlers
* delegate.didRangeBeaconsInRegion()
+3 -3
View File
@@ -81,7 +81,7 @@ export class InAppBrowser {
/**
* Injects JavaScript code into the InAppBrowser window.
* @param script Details of the script to run, specifying either a file or code key.
* @param script {Object} Details of the script to run, specifying either a file or code key.
* @returns {Promise<any>}
*/
@CordovaInstance()
@@ -89,11 +89,11 @@ export class InAppBrowser {
/**
* Injects CSS into the InAppBrowser window.
* @param {Object} Details of the script to run, specifying either a file or code key.
* @param css {Object} Details of the script to run, specifying either a file or code key.
* @returns {Promise<any>}
*/
@CordovaInstance()
insertCss(css: {file?: string, code?: string}): Promise<any> {return; }
insertCSS(css: {file?: string, code?: string}): Promise<any> {return; }
/**
* A method that allows you to listen to events happening in the browser.
+21 -3
View File
@@ -19,12 +19,30 @@ import { Plugin, Cordova } from './plugin';
repo: 'https://github.com/xmartlabs/cordova-plugin-market'
})
export class Market {
/**
* Opens an app in Google Play / App Store
* @param appId {string} Package name
* @param callbacks {Object} Optional callbacks in the format {success?: Function, failure?: Function}
* @return {Promise<any>}
*/
@Cordova({sync: true})
static open(appId: string, callbacks?: {success?: Function, failure?: Function}): void { }
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'failure'
})
static open(appId: string): Promise<any> { return; }
/**
* Search apps by keyword
* @param keyword {string} Keyword
* @return {Promise<any>}
*/
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'failure',
platforms: ['Android']
})
static search(keyword: string): Promise<any> { return; }
}
+4 -1
View File
@@ -85,7 +85,10 @@ export class Mixpanel {
* @param eventProperties {any} optional
* @returns {Promise<any>}
*/
@Cordova()
@Cordova({
successIndex: 2,
errorIndex: 3
})
static track(eventName: string, eventProperties?: any): Promise<any> { return; }
/**
+1 -1
View File
@@ -40,7 +40,7 @@ declare var navigator: any;
*
* ```
* @advanced
* The `connection` property will return one of the following connection types: `unknown`, `ethernet`, `wifi`, `2g`, `3g`, `4g`, `cellular`, `none`
* The `type` property will return one of the following connection types: `unknown`, `ethernet`, `wifi`, `2g`, `3g`, `4g`, `cellular`, `none`
*/
@Plugin({
pluginName: 'Network',
+4 -3
View File
@@ -62,18 +62,19 @@ export class NFC {
/**
* Registers an event listener for NDEF tags matching a specified MIME type.
* @param mimeType
* @param onSuccess
* @param onFailure
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
successIndex: 0,
errorIndex: 3,
successIndex: 1,
errorIndex: 4,
clearFunction: 'removeMimeTypeListener',
clearWithArgs: true
})
static addMimeTypeListener(onSuccess?: Function, onFailure?: Function): Observable<any> {return; }
static addMimeTypeListener(mimeType: string, onSuccess?: Function, onFailure?: Function): Observable<any> {return; }
/**
* Registers an event listener for formatable NDEF tags.
+1 -1
View File
@@ -382,7 +382,7 @@ export class OneSignal {
* Lets you retrieve the OneSignal user id and device token.
* Your handler is called after the device is successfully registered with OneSignal.
*
* @returns {Promise<{userId: string; pushToken: string}>} Returns a Promise that reolves if the device was successfully registered.
* @returns {Promise<Object>} Returns a Promise that resolves if the device was successfully registered.
*
* userId {string} OneSignal userId is a UUID formatted string. (unique per device per app)
*
+9 -1
View File
@@ -124,7 +124,15 @@ function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts
}
// TODO: Illegal invocation needs window context
return get(window, pluginObj.pluginRef)[methodName].apply(pluginInstance, args);
let value;
try {
value = get(window, pluginObj.pluginRef)[methodName].apply(pluginInstance, args);
} catch (e) {
value = {
error: 'cordova_not_available'
};
}
return value;
}
/**
+1 -1
View File
@@ -36,7 +36,7 @@ export interface NotificationEventResponse {
/**
* An optional collection of data sent by the 3rd party push service that does not fit in the above properties.
*/
additionalData: NotificationEventAdditionalData;
additionalData: NotificationEventAdditionalData | any;
}
/**