Compare commits

...

27 Commits

Author SHA1 Message Date
perry fb275e0d9f amend(docs): typo in the last commit 2017-01-11 13:02:00 -06:00
perry 5c7d7ac527 chore(docs): add beta warning to docs pages 2017-01-11 13:00:52 -06:00
perry 1134ac96b6 chore(docs): mark static properties as properties Closes #962 2017-01-11 11:28:59 -06:00
Abdelaziz Bennouna e902856089 feat(barcodescanner): add missing options (#966)
Fixes #965
2017-01-11 11:31:29 -05:00
Ibby 67adb23a14 chore(): optimize CordovaProperty
closes #954
2017-01-10 20:45:11 -05:00
Ibby 028a568515 chore(): update changelog 2017-01-10 20:39:12 -05:00
Ibby 7a8d30f4e1 2.2.16 2017-01-10 20:38:53 -05:00
Ibby 9541009742 chore(): fix the callCordovaPlugin check
the previous approach doesn't handle __proto__ methods
2017-01-10 20:38:48 -05:00
Ibby 9dee2fbc0c chore(): update changelog 2017-01-10 19:17:27 -05:00
Ibby 60b9c69763 2.2.15 2017-01-10 19:17:16 -05:00
Ibby b98fa28b4b fix(apprate): captialize URL in storeAppURL property 2017-01-10 18:49:53 -05:00
Ibby 603aa9f6d2 chore(): ignore errors when deleting old docs 2017-01-10 16:46:35 -05:00
Ibby f4fa8c31f0 chore(): ignore errors when deleting old docs 2017-01-10 16:42:40 -05:00
Ibby 8e787fdd5f docs(video-player): update install source
closes #959
2017-01-10 16:39:36 -05:00
Ibby c5ec7c33b5 refractor(): lodash contains to includes 2017-01-10 16:34:56 -05:00
Ibby c6dbf343fb chore(): add beta tags 2017-01-10 07:41:44 -05:00
Ibby fa311e6a7c chore(): update packages 2017-01-10 07:40:21 -05:00
Ibby 04347c3df8 chore(): bump tslint ionic rules to 0.0.7 2017-01-10 07:15:57 -05:00
Ibby 8adb36e2a0 chore(): remove old tsconfig 2017-01-10 07:15:00 -05:00
Ibby c700c31127 chore(): bump rxjs to 5.0.0-beta.12 2017-01-10 07:13:08 -05:00
Ibby Hadeed 5981622f3a chore(): replace try/catch with better approach (#956)
* chore(): replace try/catch with better approach

* optimize last commit
2017-01-10 07:06:44 -05:00
perry 77d6308bca chore(dgeni): add beta tag support 2017-01-09 13:59:03 -06:00
Ibby 92e0bb55c3 Merge branch 'master' of github.com:driftyco/ionic-native 2017-01-09 07:13:04 -05:00
Ibby 452aa5d8c9 chore(): lock typescript to 2.0.x 2017-01-09 07:12:58 -05:00
MSadiqR 2ddb8be775 Typescript error solved (#947)
Added a placeholder parameter to resolve typescript error
2017-01-09 06:10:08 -05:00
Josh Gibbs ebf07161b6 fix(onesignal): OSNotification.app_id is optional (#946)
OSNotification::app_id is not required when sending a selfNotification.
2017-01-09 05:07:57 -05:00
Thomas Kemmer 6ddd2aa184 fix(ble): stopScan takes no args when used as clear function (#944) 2017-01-09 05:06:33 -05:00
19 changed files with 96 additions and 45 deletions
+17
View File
@@ -1,3 +1,20 @@
<a name="2.2.16"></a>
## [2.2.16](https://github.com/driftyco/ionic-native/compare/v2.2.15...v2.2.16) (2017-01-11)
<a name="2.2.15"></a>
## [2.2.15](https://github.com/driftyco/ionic-native/compare/v2.2.14...v2.2.15) (2017-01-11)
### Bug Fixes
* **apprate:** captialize URL in storeAppURL property ([b98fa28](https://github.com/driftyco/ionic-native/commit/b98fa28))
* **ble:** stopScan takes no args when used as clear function ([#944](https://github.com/driftyco/ionic-native/issues/944)) ([6ddd2aa](https://github.com/driftyco/ionic-native/commit/6ddd2aa))
* **onesignal:** OSNotification.app_id is optional ([#946](https://github.com/driftyco/ionic-native/issues/946)) ([ebf0716](https://github.com/driftyco/ionic-native/commit/ebf0716))
<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)
+16 -17
View File
@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "2.2.14",
"version": "2.2.16",
"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",
@@ -9,40 +9,40 @@
"dist"
],
"dependencies": {
"rxjs": "^5.0.0-beta.6"
"rxjs": "5.0.0-beta.12"
},
"devDependencies": {
"browserify": "^13.0.1",
"browserify": "^13.3.0",
"canonical-path": "0.0.2",
"conventional-changelog-cli": "^1.2.0",
"conventional-github-releaser": "^1.1.3",
"cpr": "^1.0.0",
"cz-conventional-changelog": "^1.1.6",
"cpr": "^2.0.2",
"cz-conventional-changelog": "^1.2.0",
"decamelize": "^1.2.0",
"dgeni": "^0.4.2",
"dgeni-packages": "^0.10.18",
"es6-shim": "~0.35.1",
"glob": "^6.0.4",
"es6-shim": "~0.35.2",
"glob": "^7.1.1",
"gulp": "^3.9.1",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
"gulp-tslint": "^6.1.2",
"gulp-uglify": "^1.5.4",
"jasmine-core": "~2.5.0",
"karma": "~1.2.0",
"gulp-uglify": "^2.0.0",
"jasmine-core": "~2.5.2",
"karma": "~1.3.0",
"karma-browserify": "~5.1.0",
"karma-jasmine": "~1.0.2",
"karma-jasmine": "~1.1.0",
"karma-phantomjs-launcher": "~1.0.2",
"lodash": "3.10.1",
"lodash": "4.17.4",
"minimist": "^1.1.3",
"mkdirp": "^0.5.1",
"node-html-encoder": "0.0.2",
"q": "1.4.1",
"semver": "^5.0.1",
"tsify": "~1.0.4",
"semver": "^5.3.0",
"tsify": "~3.0.0",
"tslint": "^3.15.1",
"tslint-ionic-rules": "0.0.5",
"typescript": "^2.0.1",
"tslint-ionic-rules": "0.0.7",
"typescript": "~2.0.10",
"watchify": "~3.7.0"
},
"scripts": {
@@ -50,7 +50,6 @@
"test:watch": "npm test -- --watch",
"start": "npm run test:watch",
"lint": "gulp lint",
"watch": "tsc -w",
"build": "npm run lint && npm run build:js && npm run build:esm && npm run build:bundle && npm run build:minify",
"build:js": "tsc -p tsconfig-es5.json",
"build:esm": "tsc -p tsconfig-esm.json",
+1 -1
View File
@@ -76,7 +76,7 @@ module.exports = function(currentVersion) {
versions = [];
// new version, add it to the versions list
if (currentVersion != 'nightly' && !_.contains(versions, currentVersion)) {
if (currentVersion != 'nightly' && !_.includes(versions, currentVersion)) {
versions.unshift(currentVersion);
}
//First semver valid version is latest
+1 -1
View File
@@ -30,7 +30,7 @@ function run {
git pull origin master
fi
git rm -rf content/docs/v2/native/*/
git rm -rf content/docs/v2/native/*/ || true
}
@@ -5,6 +5,15 @@ module.exports = function collectInputsOutputs() {
$process: function(docs) {
docs.forEach(function(doc) {
if (doc.statics && doc.statics.length) {
for (var i in doc.statics) {
// identify properties to differentiate from methods
if (typeof doc.statics[i].parameters == 'undefined') {
doc.statics[i].isProperty = true;
}
}
}
if (doc.members && doc.members.length) {
var members = [];
var inputs = [];
+3 -1
View File
@@ -20,7 +20,9 @@ module.exports = function jekyll(renderDocsProcessor) {
doc.outputPath = doc.outputPath.toLowerCase().replace(' ', '-');
docs[i].URL = doc.outputPath.replace('docs/v2//', 'docs/v2/')
.replace('/index.md', '')
.replace('content/','');
.replace('content/', '');
docs[i].demo = !!docs[i].demo;
});
docs.push({
+4
View File
@@ -1,6 +1,10 @@
module.exports = [
{'name': 'advanced'},
{'name': 'demo'},
{'name': 'beta', transforms: function(doc, tag, value) {
// make the value true or undefined instead of '' or undefined
return typeof value !== 'undefined';
}},
{'name': 'usage'},
{'name': 'classes'}, // related classes
{'name': 'interfaces'} // related interfaces
+13 -2
View File
@@ -200,7 +200,9 @@ docType: "<$ doc.docType $>"
Delegate: <$ doc.delegate $>
</small>
<@ endif @>
<@- if doc.beta == true -@>
<span class="beta" title="beta">&beta;</span>
<@- endif -@>
</h1>
<a class="improve-v2-docs" href="http://github.com/driftyco/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
@@ -213,6 +215,15 @@ docType: "<$ doc.docType $>"
<@- if doc.decorators @>
<@ for prop in doc.decorators[0].argumentInfo @>
<@ if doc.beta == true @>
<p class="beta-notice">
This plugin is still in beta stage and may not work as expected. Please
submit any issues to the <a target="_blank"
href="<$ prop.repo $>/issues">plugin repo</a>.
</p>
<@ endif @>
<pre><code>$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plugin $><@ endif -@></code></pre>
<p>Repo:
<a href="<$ prop.repo $>">
@@ -244,7 +255,7 @@ docType: "<$ doc.docType $>"
<!-- @platforms tag end -->
<@ endif @>
<@ endfor @>
<@ endif -@>
<@ endif -@><!-- if doc.decorators -->
<!-- @usage tag -->
<@ if doc.usage @>
+6 -1
View File
@@ -1,4 +1,9 @@
<@ for doc in docs @><@ if doc.URL and doc.private != true @>
<@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta != true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|replace(' ','-') $>' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $></a>
</li><@ endif @><@ endfor @>
<@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta == true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|replace(' ','-') $>' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $> <span class="beta">&beta;</span></a>
</li><@ endif @><@ endfor @>
+1 -1
View File
@@ -47,7 +47,7 @@ export interface AppRatePreferences {
/**
* App Store URLS
*/
storeAppUrl?: AppRateStoreAppUrls;
storeAppURL?: AppRateStoreAppUrls;
}
+10
View File
@@ -37,6 +37,16 @@ export interface BarcodeScannerOptions {
*/
orientation?: string;
/**
* Launch with the torch switched on (if available). Supported on Android only.
*/
torchOn?: boolean;
/**
* Display scanned text for X ms. 0 suppresses it entirely, default 1500. Supported on Android only.
*/
resultDisplayDuration?: number;
}
/**
+2 -2
View File
@@ -205,7 +205,7 @@ export class BLE {
@Cordova({
observable: true,
clearFunction: 'stopScan',
clearWithArgs: true
clearWithArgs: false
})
static startScan(services: string[]): Observable<any> { return; }
@@ -218,7 +218,7 @@ export class BLE {
@Cordova({
observable: true,
clearFunction: 'stopScan',
clearWithArgs: true
clearWithArgs: false
})
static startScanWithOptions(services: string[], options: {reportDuplicates?: boolean} | any): Observable<any> { return; }
+1
View File
@@ -22,6 +22,7 @@ export interface CameraPreviewSize {
}
/**
* @beta
* @name CameraPreview
* @description
* Showing camera preview in HTML
+1
View File
@@ -24,6 +24,7 @@ export interface EmailComposerOptions {
/**
* @beta
* @name Email Composer
* @description
*
+1
View File
@@ -103,6 +103,7 @@ export interface HotspotDevice {
}
/**
* @beta
* @name Hotspot
* @description
* @usage
+1 -1
View File
@@ -26,7 +26,7 @@ export interface OSNotification {
* **ANDROID** - Notification is a summary notification for a group this will contain all notification payloads it was created from.
*/
groupedNotifications?: OSNotificationPayload[];
app_id: string;
app_id?: string;
contents: any;
headings?: any;
isIos?: boolean;
+7 -16
View File
@@ -108,7 +108,7 @@ function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts
let pluginInstance = getPlugin(pluginObj.pluginRef);
if (!pluginInstance) {
if (!pluginInstance || pluginInstance[methodName] === 'undefined') {
// Do this check in here in the case that the Web API for this plugin is available (for example, Geolocation).
if (!window.cordova) {
cordovaWarn(pluginObj.pluginName, methodName);
@@ -123,16 +123,7 @@ function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts
};
}
// TODO: Illegal invocation needs window context
let value;
try {
value = get(window, pluginObj.pluginRef)[methodName].apply(pluginInstance, args);
} catch (e) {
value = {
error: 'cordova_not_available'
};
}
return value;
return pluginInstance[methodName].apply(pluginInstance, args);
}
/**
@@ -416,9 +407,9 @@ export function CordovaInstance(opts: any = {}) {
* Before calling the original method, ensure Cordova and the plugin are installed.
*/
export function CordovaProperty(target: any, key: string) {
const pluginInstance = getPlugin(target.pluginRef);
const exists = () => {
let pluginInstance = getPlugin(target.pluginRef);
if (!pluginInstance) {
if (!pluginInstance || pluginInstance[key] === 'undefined') {
pluginWarn(target, key);
return false;
}
@@ -428,14 +419,14 @@ export function CordovaProperty(target: any, key: string) {
Object.defineProperty(target, key, {
get: () => {
if (exists()) {
return getPlugin(target.pluginRef)[key];
return pluginInstance[key];
} else {
return {};
return null;
}
},
set: (value) => {
if (exists()) {
getPlugin(target.pluginRef)[key] = value;
pluginInstance[key] = value;
}
}
});
+1 -1
View File
@@ -21,7 +21,7 @@ declare var sqlitePlugin;
* })
* .then((db: SQLite) => {
*
* db.executeSql('create table danceMoves(name VARCHAR(32))').then(() => {}).catch(() => {});
* db.executeSql('create table danceMoves(name VARCHAR(32))', {}).then(() => {}).catch(() => {});
*
* })
* .catch(error => console.error('Error opening database', error);
+1 -1
View File
@@ -41,7 +41,7 @@ export interface VideoOptions {
*/
@Plugin({
pluginName: 'VideoPlayer',
plugin: 'cordova-plugin-videoplayer',
plugin: 'https://github.com/moust/cordova-plugin-videoplayer',
pluginRef: 'VideoPlayer',
repo: 'https://github.com/moust/cordova-plugin-videoplayer',
platforms: ['Android']