mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-04 00:06:19 +08:00
Compare commits
117 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0669ba5222 | ||
|
|
bec0eac122 | ||
|
|
00e63d9fc8 | ||
|
|
ac181c5439 | ||
|
|
8fbf1f2b34 | ||
|
|
685ac5c7a0 | ||
|
|
634843e1b2 | ||
|
|
d5310b0f73 | ||
|
|
a72cd59b99 | ||
|
|
6f4737190b | ||
|
|
c98b4f4c85 | ||
|
|
8f5532eb74 | ||
|
|
4340597fc9 | ||
|
|
7324246e6a | ||
|
|
55b6ab9c54 | ||
|
|
a5e591cfa6 | ||
|
|
48e5d46f1e | ||
|
|
0388ac3f6b | ||
|
|
24752652b7 | ||
|
|
eb03de96ba | ||
|
|
0317d4455f | ||
|
|
757d0961b9 | ||
|
|
693ba01137 | ||
|
|
fa0175d248 | ||
|
|
04d01ac1b3 | ||
|
|
77c7b9d00a | ||
|
|
ee4cfadff1 | ||
|
|
49d8348db3 | ||
|
|
6e445b1beb | ||
|
|
1a803e70be | ||
|
|
6982a2d35f | ||
|
|
0660a3bc67 | ||
|
|
96776567eb | ||
|
|
d09018d2d4 | ||
|
|
0649d8ca8c | ||
|
|
41abaeb7c9 | ||
|
|
4dc82383a0 | ||
|
|
799e2f0b2e | ||
|
|
b95f88c165 | ||
|
|
bbda6e22a2 | ||
|
|
3edfafb6f9 | ||
|
|
99c1d499f7 | ||
|
|
37ed9a097a | ||
|
|
db3d5b63c6 | ||
|
|
6521e1833c | ||
|
|
debe6834ef | ||
|
|
292c8801ea | ||
|
|
b031ceed99 | ||
|
|
82d4ec2738 | ||
|
|
9c55358620 | ||
|
|
51bc5ef542 | ||
|
|
74a252b324 | ||
|
|
43c8592b40 | ||
|
|
babfb0dca3 | ||
|
|
ceb4217415 | ||
|
|
798625698d | ||
|
|
5cfb3b033b | ||
|
|
95d666c348 | ||
|
|
276d61bf3a | ||
|
|
397a209ad2 | ||
|
|
d2f42ef33a | ||
|
|
fe46907aaa | ||
|
|
5c92455ee9 | ||
|
|
046cbe7fca | ||
|
|
32f09275aa | ||
|
|
542ff4cf95 | ||
|
|
5710eb78a8 | ||
|
|
842a80d493 | ||
|
|
c2d4f1c0da | ||
|
|
e28e5b0f5f | ||
|
|
bff4862979 | ||
|
|
6bcef44d42 | ||
|
|
69c9b6f555 | ||
|
|
7f38cb5a16 | ||
|
|
cf7abe110d | ||
|
|
5b060345d2 | ||
|
|
1784036ef7 | ||
|
|
7a8577007c | ||
|
|
7c6e6d8b6b | ||
|
|
c5fd83ddb6 | ||
|
|
7b2fe69c7c | ||
|
|
f0961c7b23 | ||
|
|
35c8bbd49e | ||
|
|
1a343c1ea5 | ||
|
|
4fef8ff326 | ||
|
|
13681756ae | ||
|
|
4a798281e4 | ||
|
|
79670b7878 | ||
|
|
720084578d | ||
|
|
3dd6a92ccf | ||
|
|
7d1686ef93 | ||
|
|
b40b0fff98 | ||
|
|
4dba0580ac | ||
|
|
11653ce752 | ||
|
|
d3e6f3ba41 | ||
|
|
2c6cc37a5f | ||
|
|
4c7defb2ec | ||
|
|
2da02e6d46 | ||
|
|
7a91c87a72 | ||
|
|
598f8a9e7c | ||
|
|
6f0f02bb66 | ||
|
|
e4bde77bd4 | ||
|
|
c24b331866 | ||
|
|
4ac348bd0f | ||
|
|
f0026572e7 | ||
|
|
e30ccabf7b | ||
|
|
6b286db51a | ||
|
|
d79d62bfa0 | ||
|
|
2bdd3a3868 | ||
|
|
09d481e1d6 | ||
|
|
6f23bef5d1 | ||
|
|
84f54d64aa | ||
|
|
c9ddec3bb5 | ||
|
|
f62e1081e1 | ||
|
|
7dba41cbe1 | ||
|
|
77b0277290 | ||
|
|
40325cad9f |
15
.github/CONTRIBUTING.md
vendored
15
.github/CONTRIBUTING.md
vendored
@@ -1,18 +1,19 @@
|
||||
# Contributing to Ionic Native
|
||||
|
||||
|
||||
## Feature request?
|
||||
Have a plugin you'd like to see supported? Since Ionic Native is a thin wrapper around existing Cordova plugins, adding support for new plugins is as easy as creating a new wrapper for whatever plugin you'd like to add.
|
||||
|
||||
Take a look at our [Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.
|
||||
|
||||
## Have an issue?
|
||||
#### There are no rules, but here are a few things to consider:
|
||||
###### Before you submit an issue:
|
||||
* Do a quick search to see if there are similar issues
|
||||
* **Check that you are using the latest version of** `ionic-native`
|
||||
* Make sure that you are waiting for `deviceready` to fire before interacting with any plugin. If you are using Ionic 2, this can be done using [the `Platform.ready()` function](http://ionicframework.com/docs/v2/api/platform/Platform/#ready).
|
||||
* **Check that you are using the latest version of** `ionic-native`, you can install the latest version by running `npm i --save ionic-native@latest`
|
||||
|
||||
###### Still having problems? submit an issue with the following details:
|
||||
* Short description of the issue
|
||||
* Steps to reproduce
|
||||
* Stack trace (if available)
|
||||
|
||||
|
||||
## Feature request?
|
||||
Have a plugin you'd like to see supported? Since Ionic Native is a thin wrapper around existing Cordova plugins, adding support for new plugins is as easy as creating a new wrapper for whatever plugin you'd like to add.
|
||||
|
||||
Take a look at our [Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.
|
||||
149
CHANGELOG.md
149
CHANGELOG.md
@@ -1,3 +1,152 @@
|
||||
<a name="2.2.4"></a>
|
||||
## [2.2.4](https://github.com/driftyco/ionic-native/compare/v2.2.3...v2.2.4) (2016-10-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **sqlite:** fix callback order for transaction ([#700](https://github.com/driftyco/ionic-native/issues/700)) ([799e2f0](https://github.com/driftyco/ionic-native/commit/799e2f0))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **device-feedback:** add DeviceFeedback plugin ([#696](https://github.com/driftyco/ionic-native/issues/696)) ([bbda6e2](https://github.com/driftyco/ionic-native/commit/bbda6e2))
|
||||
* **image-picker:** add new android methods ([3edfafb](https://github.com/driftyco/ionic-native/commit/3edfafb))
|
||||
* **mixpanel:** MixpanelPeople returns promises ([#681](https://github.com/driftyco/ionic-native/issues/681)) ([b95f88c](https://github.com/driftyco/ionic-native/commit/b95f88c)), closes [#667](https://github.com/driftyco/ionic-native/issues/667)
|
||||
|
||||
|
||||
|
||||
<a name="2.2.3"></a>
|
||||
## [2.2.3](https://github.com/driftyco/ionic-native/compare/v2.2.2...v2.2.3) (2016-10-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **googlemaps:** Expose 'type' property in GoogleMapsLatLngBounds [#693](https://github.com/driftyco/ionic-native/issues/693) ([#694](https://github.com/driftyco/ionic-native/issues/694)) ([74a252b](https://github.com/driftyco/ionic-native/commit/74a252b))
|
||||
* **onesignal:** update to match latest API version ([#691](https://github.com/driftyco/ionic-native/issues/691)) ([babfb0d](https://github.com/driftyco/ionic-native/commit/babfb0d))
|
||||
|
||||
|
||||
|
||||
<a name="2.2.2"></a>
|
||||
## [2.2.2](https://github.com/driftyco/ionic-native/compare/v2.2.1...v2.2.2) (2016-10-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **file:** getFreeDiskSpace now works ([d2f42ef](https://github.com/driftyco/ionic-native/commit/d2f42ef))
|
||||
* **file:** read methods can accept Blobs too ([276d61b](https://github.com/driftyco/ionic-native/commit/276d61b))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **file:** getFile and getDirectory are now public ([5c92455](https://github.com/driftyco/ionic-native/commit/5c92455)), closes [#657](https://github.com/driftyco/ionic-native/issues/657)
|
||||
|
||||
|
||||
|
||||
<a name="2.2.1"></a>
|
||||
## [2.2.1](https://github.com/driftyco/ionic-native/compare/v2.2.0...v2.2.1) (2016-10-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **diagnostic:** misspelled getContactsAuthorizationStatus method ([#678](https://github.com/driftyco/ionic-native/issues/678)) ([bff4862](https://github.com/driftyco/ionic-native/commit/bff4862))
|
||||
* **file:** fix writeFile method ([842a80d](https://github.com/driftyco/ionic-native/commit/842a80d))
|
||||
* **file:** last parameter for writeFile now only accepts options ([5710eb7](https://github.com/driftyco/ionic-native/commit/5710eb7))
|
||||
* **http:** export via window.IonicNative ([#675](https://github.com/driftyco/ionic-native/issues/675)) ([cf7abe1](https://github.com/driftyco/ionic-native/commit/cf7abe1))
|
||||
* **location-accuracy:** accuracy param is number ([c2d4f1c](https://github.com/driftyco/ionic-native/commit/c2d4f1c)), closes [#676](https://github.com/driftyco/ionic-native/issues/676)
|
||||
* **themeablebrowser:** add missed options ([#680](https://github.com/driftyco/ionic-native/issues/680)) ([e28e5b0](https://github.com/driftyco/ionic-native/commit/e28e5b0))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **file:** resolveLocalFilesystemUrl and resolveDirectoryUrl are now public methods ([542ff4c](https://github.com/driftyco/ionic-native/commit/542ff4c)), closes [#657](https://github.com/driftyco/ionic-native/issues/657)
|
||||
|
||||
|
||||
|
||||
<a name="2.2.0"></a>
|
||||
# [2.2.0](https://github.com/driftyco/ionic-native/compare/v2.1.9...v2.2.0) (2016-10-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **native-transitions:** add missing interface properties ([35c8bbd](https://github.com/driftyco/ionic-native/commit/35c8bbd))
|
||||
* **onesignal:** update to match latest api ([#671](https://github.com/driftyco/ionic-native/issues/671)) ([7c6e6d8](https://github.com/driftyco/ionic-native/commit/7c6e6d8)), closes [#667](https://github.com/driftyco/ionic-native/issues/667)
|
||||
* **thmeable-browser:** fix the name of the plugin ([#663](https://github.com/driftyco/ionic-native/issues/663)) ([1368175](https://github.com/driftyco/ionic-native/commit/1368175))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **http:** add cordovaHTTP wrapper ([#674](https://github.com/driftyco/ionic-native/issues/674)) ([f0961c7](https://github.com/driftyco/ionic-native/commit/f0961c7))
|
||||
|
||||
|
||||
|
||||
<a name="2.1.9"></a>
|
||||
## [2.1.9](https://github.com/driftyco/ionic-native/compare/v2.1.8...v2.1.9) (2016-10-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **paypal:** add optional details param to paypalpayment ([7200845](https://github.com/driftyco/ionic-native/commit/7200845))
|
||||
* **paypal:** problems with selection of PayPal environment ([#662](https://github.com/driftyco/ionic-native/issues/662)) ([3dd6a92](https://github.com/driftyco/ionic-native/commit/3dd6a92))
|
||||
|
||||
|
||||
|
||||
<a name="2.1.8"></a>
|
||||
## [2.1.8](https://github.com/driftyco/ionic-native/compare/v2.1.7...v2.1.8) (2016-10-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **googlemaps:** fixes GoogleMapsLatLng class ([11653ce](https://github.com/driftyco/ionic-native/commit/11653ce))
|
||||
|
||||
|
||||
|
||||
<a name="2.1.7"></a>
|
||||
## [2.1.7](https://github.com/driftyco/ionic-native/compare/v2.1.6...v2.1.7) (2016-10-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **paypal:** fixed currency code not found issue ([#653](https://github.com/driftyco/ionic-native/issues/653)) ([598f8a9](https://github.com/driftyco/ionic-native/commit/598f8a9))
|
||||
|
||||
|
||||
|
||||
<a name="2.1.6"></a>
|
||||
## [2.1.6](https://github.com/driftyco/ionic-native/compare/v2.1.5...v2.1.6) (2016-10-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **paypal:** fix helper classes ([f002657](https://github.com/driftyco/ionic-native/commit/f002657))
|
||||
|
||||
|
||||
|
||||
<a name="2.1.5"></a>
|
||||
## [2.1.5](https://github.com/driftyco/ionic-native/compare/v2.1.4...v2.1.5) (2016-10-06)
|
||||
|
||||
|
||||
|
||||
<a name="2.1.4"></a>
|
||||
## [2.1.4](https://github.com/driftyco/ionic-native/compare/v2.1.3...v2.1.4) (2016-10-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **google-analytics:** specify successIndex and errorIndex for methods with optional params ([6f23bef](https://github.com/driftyco/ionic-native/commit/6f23bef))
|
||||
|
||||
|
||||
|
||||
<a name="2.1.3"></a>
|
||||
## [2.1.3](https://github.com/driftyco/ionic-native/compare/v2.1.2...v2.1.3) (2016-10-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **google-analytics:** add missing methods, fix return types ([77b0277](https://github.com/driftyco/ionic-native/commit/77b0277))
|
||||
* **google-analytics:** add newSession param ([f62e108](https://github.com/driftyco/ionic-native/commit/f62e108))
|
||||
* **google-analytics:** fix depreciated plugin reference ([40325ca](https://github.com/driftyco/ionic-native/commit/40325ca))
|
||||
|
||||
|
||||
|
||||
<a name="2.1.2"></a>
|
||||
## [2.1.2](https://github.com/driftyco/ionic-native/compare/v2.1.1...v2.1.2) (2016-10-06)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ var gulp = require('gulp');
|
||||
var minimist = require('minimist');
|
||||
var uglify = require('gulp-uglify');
|
||||
var rename = require("gulp-rename");
|
||||
var tslint = require('ionic-gulp-tslint');
|
||||
var tslint = require('gulp-tslint');
|
||||
var decamelize = require('decamelize');
|
||||
var replace = require('gulp-replace');
|
||||
|
||||
@@ -28,7 +28,12 @@ gulp.task("minify:dist", function(){
|
||||
});
|
||||
|
||||
gulp.task('lint', function() {
|
||||
tslint({src: 'src/**/*.ts'});
|
||||
gulp.src('src/**/*.ts')
|
||||
.pipe(tslint({
|
||||
formatter: "verbose",
|
||||
configuration: 'tslint.json'
|
||||
}))
|
||||
.pipe(tslint.report())
|
||||
});
|
||||
|
||||
gulp.task('plugin:create', function(){
|
||||
|
||||
@@ -22,6 +22,7 @@ module.exports = config => {
|
||||
},
|
||||
|
||||
browserify: {
|
||||
debug: true,
|
||||
plugin: [ 'tsify' ],
|
||||
extensions: ['.js', '.ts']
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "2.1.2",
|
||||
"version": "2.2.5",
|
||||
"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",
|
||||
@@ -26,9 +26,8 @@
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-replace": "^0.5.4",
|
||||
"gulp-tslint": "^5.0.0",
|
||||
"gulp-tslint": "^6.1.2",
|
||||
"gulp-uglify": "^1.5.4",
|
||||
"ionic-gulp-tslint": "^1.0.0",
|
||||
"jasmine-core": "~2.5.0",
|
||||
"karma": "~1.2.0",
|
||||
"karma-browserify": "~5.1.0",
|
||||
@@ -41,7 +40,7 @@
|
||||
"q": "1.4.1",
|
||||
"semver": "^5.0.1",
|
||||
"tsify": "~1.0.4",
|
||||
"tslint": "^3.8.1",
|
||||
"tslint": "^3.15.1",
|
||||
"tslint-ionic-rules": "0.0.5",
|
||||
"typescript": "^2.0.1",
|
||||
"watchify": "~3.7.0"
|
||||
|
||||
@@ -11,6 +11,7 @@ import { Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'PluginName',
|
||||
plugin: '',
|
||||
pluginRef: '',
|
||||
repo: ''
|
||||
|
||||
@@ -29,6 +29,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'PluginName',
|
||||
plugin: '', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: '', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: '', // the github repository URL for the plugin
|
||||
|
||||
19
src/index.ts
19
src/index.ts
@@ -32,6 +32,7 @@ import { DatePicker } from './plugins/datepicker';
|
||||
import { DBMeter } from './plugins/dbmeter';
|
||||
import { Deeplinks } from './plugins/deeplinks';
|
||||
import { Device } from './plugins/device';
|
||||
import { DeviceFeedback } from './plugins/device-feedback';
|
||||
import { DeviceAccounts } from './plugins/deviceaccounts';
|
||||
import { DeviceMotion } from './plugins/devicemotion';
|
||||
import { DeviceOrientation } from './plugins/deviceorientation';
|
||||
@@ -43,15 +44,17 @@ import { Facebook } from './plugins/facebook';
|
||||
import { File } from './plugins/file';
|
||||
import { FileChooser } from './plugins/file-chooser';
|
||||
import { FileOpener } from './plugins/file-opener';
|
||||
import { FilePath } from './plugins/filepath';
|
||||
import { Transfer } from './plugins/filetransfer';
|
||||
import { Flashlight } from './plugins/flashlight';
|
||||
import { Geofence } from './plugins/geofence';
|
||||
import { Geolocation } from './plugins/geolocation';
|
||||
import { Globalization } from './plugins/globalization';
|
||||
import { GooglePlus } from './plugins/google-plus';
|
||||
import { GoogleMap } from './plugins/googlemaps';
|
||||
import { GoogleMap } from './plugins/googlemap';
|
||||
import { GoogleAnalytics } from './plugins/googleanalytics';
|
||||
import { Hotspot } from './plugins/hotspot';
|
||||
import { HTTP } from './plugins/http';
|
||||
import { Httpd } from './plugins/httpd';
|
||||
import { IBeacon } from './plugins/ibeacon';
|
||||
import { ImagePicker } from './plugins/imagepicker';
|
||||
@@ -100,7 +103,7 @@ import { ThreeDeeTouch } from './plugins/3dtouch';
|
||||
import { Toast } from './plugins/toast';
|
||||
import { TouchID } from './plugins/touchid';
|
||||
import { TextToSpeech } from './plugins/text-to-speech';
|
||||
import { ThemableBrowser } from './plugins/themable-browser';
|
||||
import { ThemeableBrowser } from './plugins/themeable-browser';
|
||||
import { TwitterConnect } from './plugins/twitter-connect';
|
||||
import { Vibration } from './plugins/vibration';
|
||||
import { VideoEditor } from './plugins/video-editor';
|
||||
@@ -138,6 +141,7 @@ export * from './plugins/datepicker';
|
||||
export * from './plugins/dbmeter';
|
||||
export * from './plugins/deeplinks';
|
||||
export * from './plugins/device';
|
||||
export * from './plugins/device-feedback';
|
||||
export * from './plugins/deviceaccounts';
|
||||
export * from './plugins/devicemotion';
|
||||
export * from './plugins/deviceorientation';
|
||||
@@ -150,14 +154,16 @@ export * from './plugins/file';
|
||||
export * from './plugins/file-chooser';
|
||||
export * from './plugins/file-opener';
|
||||
export * from './plugins/filetransfer';
|
||||
export * from './plugins/filepath';
|
||||
export * from './plugins/flashlight';
|
||||
export * from './plugins/geofence';
|
||||
export * from './plugins/geolocation';
|
||||
export * from './plugins/globalization';
|
||||
export * from './plugins/google-plus';
|
||||
export * from './plugins/googleanalytics';
|
||||
export * from './plugins/googlemaps';
|
||||
export * from './plugins/googlemap';
|
||||
export * from './plugins/hotspot';
|
||||
export * from './plugins/http';
|
||||
export * from './plugins/httpd';
|
||||
export * from './plugins/ibeacon';
|
||||
export * from './plugins/imagepicker';
|
||||
@@ -204,7 +210,7 @@ export * from './plugins/statusbar';
|
||||
export * from './plugins/stepcounter';
|
||||
export * from './plugins/streaming-media';
|
||||
export * from './plugins/text-to-speech';
|
||||
export * from './plugins/themable-browser';
|
||||
export * from './plugins/themeable-browser';
|
||||
export * from './plugins/toast';
|
||||
export * from './plugins/touchid';
|
||||
export * from './plugins/twitter-connect';
|
||||
@@ -246,6 +252,7 @@ window['IonicNative'] = {
|
||||
DBMeter,
|
||||
Deeplinks,
|
||||
Device,
|
||||
DeviceFeedback,
|
||||
DeviceAccounts,
|
||||
DeviceMotion,
|
||||
DeviceOrientation,
|
||||
@@ -257,6 +264,7 @@ window['IonicNative'] = {
|
||||
File,
|
||||
FileChooser,
|
||||
FileOpener,
|
||||
FilePath,
|
||||
Flashlight,
|
||||
Geofence,
|
||||
Geolocation,
|
||||
@@ -265,6 +273,7 @@ window['IonicNative'] = {
|
||||
GoogleMap,
|
||||
GoogleAnalytics,
|
||||
Hotspot,
|
||||
HTTP,
|
||||
Httpd,
|
||||
IBeacon,
|
||||
ImagePicker,
|
||||
@@ -314,7 +323,7 @@ window['IonicNative'] = {
|
||||
TouchID,
|
||||
Transfer,
|
||||
TextToSpeech,
|
||||
ThemableBrowser,
|
||||
ThemeableBrowser,
|
||||
TwitterConnect,
|
||||
VideoEditor,
|
||||
VideoPlayer,
|
||||
|
||||
@@ -54,7 +54,7 @@ declare var window: any;
|
||||
* ];
|
||||
* ThreeDeeTouch.configureQuickActions(actions);
|
||||
*
|
||||
* ThreeDeeTouchForceTouch.onHomeIconPressed().subscribe(
|
||||
* ThreeDeeTouch.onHomeIconPressed().subscribe(
|
||||
* (payload) => {
|
||||
* // returns an object that is the button you presed
|
||||
* console.log('Pressed the ${payload.title} button')
|
||||
@@ -65,6 +65,7 @@ declare var window: any;
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'ThreeDeeTouch',
|
||||
plugin: 'cordova-plugin-3dtouch',
|
||||
pluginRef: 'ThreeDeeTouch',
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-3dtouch',
|
||||
@@ -94,6 +95,7 @@ export class ThreeDeeTouch {
|
||||
* @param {string} title Title for your action
|
||||
* @param {string} subtitle (optional) A short description for your action
|
||||
* @param {string} iconType (optional) Choose between Prohibit, Contact, Home, MarkLocation, Favorite, Love, Cloud, Invitation, Confirmation, Mail, Message, Date, Time, CapturePhoto, CaptureVideo, Task, TaskCompleted, Alarm, Bookmark, Shuffle, Audio, Update
|
||||
* @param {string} iconTemplate (optional) Can be used to provide your own icon
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true
|
||||
@@ -139,6 +141,7 @@ export interface ThreeDeeTouchQuickAction {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
iconType?: string;
|
||||
iconTemplate?: string;
|
||||
}
|
||||
|
||||
export interface ThreeDeeTouchForceTouch {
|
||||
|
||||
@@ -41,6 +41,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'ActionSheet',
|
||||
plugin: 'cordova-plugin-actionsheet',
|
||||
pluginRef: 'plugins.actionsheet',
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet',
|
||||
|
||||
@@ -8,6 +8,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* Please refer the the plugin's original repository for detailed usage.
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'AdMob',
|
||||
plugin: 'cordova-plugin-admobpro',
|
||||
pluginRef: 'AdMob',
|
||||
repo: 'https://github.com/floatinghotpot/cordova-admob-pro',
|
||||
|
||||
@@ -30,6 +30,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'AndroidFingerprintAuth',
|
||||
plugin: 'cordova-plugin-android-fingerprint-auth',
|
||||
pluginRef: 'FingerprintAuth',
|
||||
repo: 'https://github.com/mjwheatley/cordova-plugin-android-fingerprint-auth'
|
||||
|
||||
@@ -28,6 +28,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'AppAvailability',
|
||||
plugin: 'cordova-plugin-appavailability',
|
||||
pluginRef: 'appAvailability',
|
||||
repo: 'https://github.com/ohh2ahh/AppAvailability',
|
||||
|
||||
@@ -44,6 +44,7 @@ declare var window;
|
||||
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'AppRate',
|
||||
plugin: 'cordova-plugin-apprate',
|
||||
pluginRef: 'AppRate',
|
||||
repo: 'https://github.com/pushandplay/cordova-plugin-apprate',
|
||||
|
||||
@@ -19,6 +19,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'AppVersion',
|
||||
plugin: 'cordova-plugin-app-version',
|
||||
pluginRef: 'cordova.getAppVersion',
|
||||
repo: 'https://github.com/whiteoctober/cordova-plugin-app-version',
|
||||
|
||||
@@ -236,8 +236,8 @@ export interface Config {
|
||||
*
|
||||
* // When device is ready :
|
||||
* platform.ready().then(() => {
|
||||
* // IMPORTANT: BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission.
|
||||
*
|
||||
* // IMPORTANT: BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission.
|
||||
*
|
||||
* // BackgroundGeolocation is highly configurable. See platform specific configuration options
|
||||
* let config = {
|
||||
* desiredAccuracy: 10,
|
||||
@@ -272,6 +272,7 @@ export interface Config {
|
||||
* Config
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'BackgroundGeolocation',
|
||||
plugin: 'cordova-plugin-mauron85-background-geolocation',
|
||||
pluginRef: 'backgroundGeolocation',
|
||||
repo: 'https://github.com/mauron85/cordova-plugin-background-geolocation',
|
||||
@@ -330,10 +331,9 @@ export class BackgroundGeolocation {
|
||||
/**
|
||||
* Configure the plugin.
|
||||
*
|
||||
* @param {Function} Success callback will be called when background location is determined.
|
||||
* @param {Function} Fail callback to be executed every time a geolocation error occurs.
|
||||
* @param {Object} An object of type Config
|
||||
*
|
||||
* @param {Function} callback callback will be called when background location is determined.
|
||||
* @param {Function} errorCallback callback to be executed every time a geolocation error occurs.
|
||||
* @param {Config} options An object of type Config
|
||||
* @return Location object, which tries to mimic w3c Coordinates interface.
|
||||
* See http://dev.w3.org/geo/api/spec-source.html#coordinates_interface
|
||||
* Callback to be executed every time a geolocation is recorded in the background.
|
||||
@@ -341,7 +341,7 @@ export class BackgroundGeolocation {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
static configure(callback: Function, errorCallback: Function, options: Config): void { return; }
|
||||
static configure(callback: Function, errorCallback: Function, options: Config): any { return; }
|
||||
|
||||
/**
|
||||
* Turn ON the background-geolocation system.
|
||||
|
||||
@@ -28,6 +28,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'BackgroundMode',
|
||||
plugin: 'cordova-plugin-background-mode',
|
||||
pluginRef: 'cordova.plugins.backgroundMode',
|
||||
repo: 'https://github.com/katzer/cordova-plugin-background-mode',
|
||||
|
||||
@@ -18,6 +18,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Badge',
|
||||
plugin: 'cordova-plugin-badge',
|
||||
pluginRef: 'cordova.plugins.notification.badge',
|
||||
repo: 'https://github.com/katzer/cordova-plugin-badge',
|
||||
|
||||
@@ -20,6 +20,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'BarcodeScanner',
|
||||
plugin: 'phonegap-plugin-barcodescanner',
|
||||
pluginRef: 'cordova.plugins.barcodeScanner',
|
||||
repo: 'https://github.com/phonegap/phonegap-plugin-barcodescanner',
|
||||
|
||||
@@ -14,6 +14,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Base64ToGallery',
|
||||
plugin: 'cordova-base64-to-gallery',
|
||||
pluginRef: 'cordova',
|
||||
repo: 'https://github.com/Nexxa/cordova-base64-to-gallery',
|
||||
@@ -24,7 +25,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 {any} options (optional) An object with properties: prefix: string, mediaScanner: boolean. Prefix will be prepended to the filename. If true, mediaScanner runs Media Scanner on Android and saves to Camera Roll on iOS; if false, saves to Library folder on iOS.
|
||||
* @param {any} options (optional) An object with properties: prefix: string, mediaScanner: boolean. Prefix will be prepended to the filename. If true, mediaScanner runs Media Scanner on Android and saves to Camera Roll on iOS; if false, saves to Library folder on iOS.
|
||||
* @returns {Promise} returns a promise that resolves when the image is saved.
|
||||
*/
|
||||
@Cordova({
|
||||
|
||||
@@ -24,6 +24,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'BatteryStatus',
|
||||
plugin: 'cordova-plugin-battery-status',
|
||||
repo: 'https://github.com/apache/cordova-plugin-battery-status',
|
||||
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser']
|
||||
|
||||
@@ -160,6 +160,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'BLE',
|
||||
plugin: 'cordova-plugin-ble-central',
|
||||
pluginRef: 'ble',
|
||||
repo: 'https://github.com/don/cordova-plugin-ble-central',
|
||||
@@ -400,17 +401,10 @@ export class BLE {
|
||||
/**
|
||||
* Report if bluetooth is enabled.
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* BLE.isEnabled().then(
|
||||
* () => { console.log('enabled'); },
|
||||
* () => { console.log('not enabled'); }
|
||||
* );
|
||||
* ```
|
||||
* @return Returns a Promise.
|
||||
* @return {Promise<void>} Returns a Promise that resolves if Bluetooth is enabled, and rejects if disabled.
|
||||
*/
|
||||
@Cordova()
|
||||
static isEnabled(): Promise<any> { return; }
|
||||
static isEnabled(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Open System Bluetooth settings (Android only).
|
||||
|
||||
@@ -28,6 +28,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'BluetoothSerial',
|
||||
repo: 'https://github.com/don/BluetoothSerial',
|
||||
plugin: 'cordova-plugin-bluetooth-serial',
|
||||
pluginRef: 'bluetoothSerial',
|
||||
|
||||
@@ -18,6 +18,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Brightness',
|
||||
plugin: 'cordova-plugin-brightness',
|
||||
pluginRef: 'cordova.plugins.brightness',
|
||||
repo: 'https://github.com/mgcrea/cordova-plugin-brightness',
|
||||
|
||||
@@ -38,6 +38,7 @@ export interface CalendarOptions {
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Calendar',
|
||||
plugin: 'cordova-plugin-calendar',
|
||||
pluginRef: 'plugins.calendar',
|
||||
repo: 'https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin',
|
||||
@@ -53,7 +54,7 @@ export class Calendar {
|
||||
* - You're using Android < 6, or
|
||||
* - You've already granted permission
|
||||
*
|
||||
* If this returns false, you should call `requestReadWritePermissions` function
|
||||
* If this returns false, you should call the `requestReadWritePermission` function
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'CallNumber',
|
||||
plugin: 'call-number',
|
||||
pluginRef: 'plugins.CallNumber',
|
||||
repo: 'https://github.com/Rohfosho/CordovaCallNumberPlugin',
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface CameraPreviewSize {
|
||||
* @description
|
||||
* Showing camera preview in HTML
|
||||
*
|
||||
* For more info, please see the [Cordova Camera Preview Plugin Docs](https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview).
|
||||
* For more info, please see the [Cordova Camera Preview Plugin Docs](https://github.com/westonganger/cordova-plugin-camera-preview).
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
@@ -69,9 +69,10 @@ export interface CameraPreviewSize {
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'CameraPreview',
|
||||
plugin: 'cordova-plugin-camera-preview',
|
||||
pluginRef: 'cordova.plugins.camerapreview',
|
||||
repo: 'https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview',
|
||||
repo: 'https://github.com/westonganger/cordova-plugin-camera-preview',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
export class CameraPreview {
|
||||
@@ -139,14 +140,6 @@ export class CameraPreview {
|
||||
})
|
||||
static hide(): void { };
|
||||
|
||||
/**
|
||||
* Set the default mode for the Flash.
|
||||
*/
|
||||
// @Cordova({
|
||||
// sync: true
|
||||
// })
|
||||
// static setFlashMode(mode: number): void { };
|
||||
|
||||
/**
|
||||
* Set camera color effect.
|
||||
*/
|
||||
@@ -154,15 +147,4 @@ export class CameraPreview {
|
||||
sync: true
|
||||
})
|
||||
static setColorEffect(effect: string): void { };
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @enum {number}
|
||||
*/
|
||||
static FlashMode = {
|
||||
OFF: 0,
|
||||
ON: 1,
|
||||
AUTO: 2
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ export interface CameraOptions {
|
||||
quality?: number;
|
||||
/**
|
||||
* Choose the format of the return value.
|
||||
* Defined in navigator.camera.DestinationType. Default is FILE_URI.
|
||||
* Defined in Camera.DestinationType. Default is FILE_URI.
|
||||
* DATA_URL : 0, Return image as base64-encoded string,
|
||||
* FILE_URI : 1, Return image file URI,
|
||||
* NATIVE_URI : 2 Return image native URI
|
||||
@@ -15,7 +15,7 @@ export interface CameraOptions {
|
||||
destinationType?: number;
|
||||
/**
|
||||
* Set the source of the picture.
|
||||
* Defined in navigator.camera.PictureSourceType. Default is CAMERA.
|
||||
* Defined in Camera.PictureSourceType. Default is CAMERA.
|
||||
* PHOTOLIBRARY : 0,
|
||||
* CAMERA : 1,
|
||||
* SAVEDPHOTOALBUM : 2
|
||||
@@ -25,7 +25,7 @@ export interface CameraOptions {
|
||||
allowEdit?: boolean;
|
||||
/**
|
||||
* Choose the returned image file's encoding.
|
||||
* Defined in navigator.camera.EncodingType. Default is JPEG
|
||||
* Defined in Camera.EncodingType. Default is JPEG
|
||||
* JPEG : 0 Return JPEG encoded image
|
||||
* PNG : 1 Return PNG encoded image
|
||||
*/
|
||||
@@ -42,7 +42,7 @@ export interface CameraOptions {
|
||||
targetHeight?: number;
|
||||
/**
|
||||
* Set the type of media to select from. Only works when PictureSourceType
|
||||
* is PHOTOLIBRARY or SAVEDPHOTOALBUM. Defined in nagivator.camera.MediaType
|
||||
* is PHOTOLIBRARY or SAVEDPHOTOALBUM. Defined in Camera.MediaType
|
||||
* PICTURE: 0 allow selection of still pictures only. DEFAULT.
|
||||
* Will return format specified via DestinationType
|
||||
* VIDEO: 1 allow selection of video only, WILL ALWAYS RETURN FILE_URI
|
||||
@@ -55,7 +55,7 @@ export interface CameraOptions {
|
||||
saveToPhotoAlbum?: boolean;
|
||||
/**
|
||||
* Choose the camera to use (front- or back-facing).
|
||||
* Defined in navigator.camera.Direction. Default is BACK.
|
||||
* Defined in Camera.Direction. Default is BACK.
|
||||
* FRONT: 0
|
||||
* BACK: 1
|
||||
*/
|
||||
@@ -110,6 +110,7 @@ export interface CameraPopoverOptions {
|
||||
* CameraPopoverOptions
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Camera',
|
||||
plugin: 'cordova-plugin-camera',
|
||||
pluginRef: 'navigator.camera',
|
||||
repo: 'https://github.com/apache/cordova-plugin-camera',
|
||||
|
||||
@@ -25,6 +25,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'CardIO',
|
||||
plugin: 'https://github.com/card-io/card.io-Cordova-Plugin',
|
||||
pluginRef: 'CardIO',
|
||||
repo: 'https://github.com/card-io/card.io-Cordova-Plugin',
|
||||
|
||||
@@ -28,6 +28,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Clipboard',
|
||||
plugin: 'https://github.com/VersoSolutions/CordovaClipboard.git',
|
||||
pluginRef: 'cordova.plugins.clipboard',
|
||||
repo: 'https://github.com/VersoSolutions/CordovaClipboard',
|
||||
|
||||
@@ -420,6 +420,7 @@ export interface DownloadProgress {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'CodePush',
|
||||
plugin: 'cordova-plugin-code-push',
|
||||
pluginRef: 'codePush',
|
||||
repo: 'https://github.com/Microsoft/cordova-plugin-code-push',
|
||||
|
||||
@@ -80,7 +80,7 @@ export class Contact implements IContactProperties {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
interface IContactError {
|
||||
export interface IContactError {
|
||||
/** Error code */
|
||||
code: number;
|
||||
/** Error message */
|
||||
@@ -90,7 +90,7 @@ interface IContactError {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
declare var ContactError: {
|
||||
export declare var ContactError: {
|
||||
new (code: number): IContactError;
|
||||
UNKNOWN_ERROR: number;
|
||||
INVALID_ARGUMENT_ERROR: number;
|
||||
@@ -316,6 +316,7 @@ export class ContactFindOptions implements IContactFindOptions {
|
||||
* ContactAddress
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Contacts',
|
||||
plugin: 'cordova-plugin-contacts',
|
||||
pluginRef: 'navigator.contacts',
|
||||
repo: 'https://github.com/apache/cordova-plugin-contacts'
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Crop',
|
||||
plugin: 'cordova-plugin-crop',
|
||||
pluginRef: 'plugins',
|
||||
repo: 'https://github.com/jeduan/cordova-plugin-crop'
|
||||
|
||||
@@ -1,66 +1,104 @@
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import {Cordova, Plugin} from './plugin';
|
||||
|
||||
|
||||
export interface DatePickerOptions {
|
||||
/**
|
||||
* Platforms: iOS, Android, Windows
|
||||
* The mode of the date picker
|
||||
* Values: date | time | datetime
|
||||
*/
|
||||
mode: string;
|
||||
|
||||
/**
|
||||
* Platforms: iOS, Android, Windows
|
||||
* Selected date
|
||||
*/
|
||||
date: Date | string | number;
|
||||
|
||||
/**
|
||||
* Platforms: iOS, Android, Windows
|
||||
* Minimum date
|
||||
* Type: Date | empty String
|
||||
* Default: empty String
|
||||
*/
|
||||
minDate?: Date | string | number;
|
||||
|
||||
/**
|
||||
* Platforms?: iOS, Android, Windows
|
||||
* Maximum date
|
||||
* Type?: Date | empty String
|
||||
* Default?: empty String
|
||||
*/
|
||||
maxDate?: Date | string | number;
|
||||
|
||||
/**
|
||||
* Platforms?: Android
|
||||
* Label for the dialog title. If empty, uses android default (Set date/Set time).
|
||||
* Type?: String
|
||||
* Default?: empty String
|
||||
*/
|
||||
titleText?: string;
|
||||
|
||||
/**
|
||||
* Platforms?: Android
|
||||
* Label of BUTTON_POSITIVE (done button) on Android
|
||||
*/
|
||||
okText?: string;
|
||||
|
||||
// TODO complete documentation here, and copy params & docs to main plugin docs
|
||||
/**
|
||||
* Label of BUTTON_NEGATIVE (cancel button). If empty, uses android.R.string.cancel.
|
||||
*/
|
||||
cancelText?: string;
|
||||
/**
|
||||
* Label of today button. If empty, doesn't show the option to select current date.
|
||||
*/
|
||||
todayText?: string;
|
||||
/**
|
||||
* Label of now button. If empty, doesn't show the option to select current time.
|
||||
*/
|
||||
nowText?: string;
|
||||
/**
|
||||
* Shows time dialog in 24 hours format.
|
||||
*/
|
||||
is24Hour?: boolean;
|
||||
/**
|
||||
* Choose the Android theme for the picker. You can use the DatePicker.ANDROID_THEMES property.
|
||||
* Values: 1: THEME_TRADITIONAL | 2: THEME_HOLO_DARK | 3: THEME_HOLO_LIGHT | 4: THEME_DEVICE_DEFAULT_DARK | 5: THEME_DEVICE_DEFAULT_LIGHT
|
||||
*/
|
||||
androidTheme?: number;
|
||||
/**
|
||||
* Shows or hide dates earlier then selected date.
|
||||
*/
|
||||
allowOldDate?: boolean;
|
||||
/**
|
||||
* Shows or hide dates after selected date.
|
||||
*/
|
||||
allowFutureDates?: boolean;
|
||||
/**
|
||||
* Label of done button.
|
||||
*/
|
||||
doneButtonLabel?: string;
|
||||
/**
|
||||
* Hex color of done button.
|
||||
*/
|
||||
doneButtonColor?: string;
|
||||
/**
|
||||
* Label of cancel button.
|
||||
*/
|
||||
cancelButtonLabel?: string;
|
||||
/**
|
||||
* Hex color of cancel button.
|
||||
*/
|
||||
cancelButtonColor?: string;
|
||||
/**
|
||||
* X position of date picker. The position is absolute to the root view of the application.
|
||||
*/
|
||||
x?: number;
|
||||
/**
|
||||
* Y position of date picker. The position is absolute to the root view of the application.
|
||||
*/
|
||||
y?: number;
|
||||
/**
|
||||
* Interval between options in the minute section of the date picker.
|
||||
*/
|
||||
minuteInterval?: number;
|
||||
/**
|
||||
* Force the UIPopoverArrowDirection enum. The value any will revert to default UIPopoverArrowDirectionAny and let the app choose the proper direction itself.
|
||||
*/
|
||||
popoverArrowDirection?: string;
|
||||
/**
|
||||
* Force locale for datePicker.
|
||||
*/
|
||||
locale?: string;
|
||||
}
|
||||
|
||||
@@ -86,21 +124,36 @@ export interface DatePickerOptions {
|
||||
* err => console.log('Error occurred while getting date: ', err)
|
||||
* );
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
* DatePickerOptions
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'DatePicker',
|
||||
plugin: 'cordova-plugin-datepicker',
|
||||
pluginRef: 'datePicker',
|
||||
repo: 'https://github.com/VitaliiBlagodir/cordova-plugin-datepicker'
|
||||
})
|
||||
export class DatePicker {
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
static ANDROID_THEMES = {
|
||||
THEME_TRADITIONAL: 1,
|
||||
THEME_HOLO_DARK: 2,
|
||||
THEME_HOLO_LIGHT: 3,
|
||||
THEME_DEVICE_DEFAULT_DARK: 4,
|
||||
THEME_DEVICE_DEFAULT_LIGHT: 5
|
||||
};
|
||||
|
||||
/**
|
||||
* Shows the date and/or time picker dialog(s)
|
||||
* @param {DatePickerOptions} options Options for the date picker.
|
||||
* @returns {Promise<Date>} Returns a promise that resolves with the picked date and/or time, or rejects with an error.
|
||||
*/
|
||||
@Cordova()
|
||||
static show(options: DatePickerOptions): Promise<Date> { return; }
|
||||
static show(options: DatePickerOptions): Promise<Date> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'DBMeter',
|
||||
plugin: 'cordova-plugin-dbmeter',
|
||||
pluginRef: 'DBMeter',
|
||||
repo: 'https://github.com/akofman/cordova-plugin-dbmeter',
|
||||
|
||||
@@ -28,11 +28,38 @@ export interface DeeplinkMatch {
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { IonicDeeplinks } from 'ionic-native';
|
||||
* import { Deeplinks } from 'ionic-native';
|
||||
*
|
||||
* Deeplinks.route({
|
||||
'/about-us': AboutPage,
|
||||
'/universal-links-test': AboutPage,
|
||||
'/products/:productId': ProductPage
|
||||
}).subscribe((match) => {
|
||||
// match.$route - the route we matched, which is the matched entry from the arguments to route()
|
||||
// match.$args - the args passed in the link
|
||||
// match.$link - the full link data
|
||||
console.log('Successfully matched route', match);
|
||||
}, (nomatch) => {
|
||||
// nomatch.$link - the full link data
|
||||
console.error('Got a deeplink that didn\'t match', nomatch);
|
||||
});
|
||||
* ```
|
||||
*
|
||||
* Alternatively, if you're using Ionic 2, there's a convenience method that takes a reference to a `NavController` and handles
|
||||
* the actual navigation for you:
|
||||
*
|
||||
* ```typescript
|
||||
* Deeplinks.routeWithNavController(this.navController, {
|
||||
'/about-us': AboutPage,
|
||||
'/products/:productId': ProductPage
|
||||
});
|
||||
* ```
|
||||
*
|
||||
* See the [Ionic 2 Deeplinks Demo](https://github.com/driftyco/ionic2-deeplinks-demo/blob/master/app/app.ts) for an example of how to
|
||||
* retrieve the `NavController` reference at runtime.
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Deeplinks',
|
||||
plugin: 'ionic-plugin-deeplinks',
|
||||
pluginRef: 'IonicDeeplink',
|
||||
repo: 'https://github.com/driftyco/ionic-plugin-deeplinks',
|
||||
@@ -48,8 +75,8 @@ export class Deeplinks {
|
||||
* paths takes an object of the form { 'path': data }. If a deeplink
|
||||
* matches the path, the resulting path-data pair will be returned in the
|
||||
* promise result which you can then use to navigate in the app as you see fit.
|
||||
* @returns {Promise} Returns a Promise that resolves when a deeplink comes through, and
|
||||
* is rejected if a deeplink comes through that does not match a given path.
|
||||
* @returns {Observable} Returns an Observable that is called each time a deeplink comes through, and
|
||||
* errors if a deeplink comes through that does not match a given path.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true
|
||||
@@ -71,8 +98,8 @@ export class Deeplinks {
|
||||
* matches the path, the resulting path-data pair will be returned in the
|
||||
* promise result which you can then use to navigate in the app as you see fit.
|
||||
*
|
||||
* @returns {Promise} Returns a Promise that resolves when a deeplink comes through, and
|
||||
* is rejected if a deeplink comes through that does not match a given path.
|
||||
* @returns {Observable} Returns an Observable that resolves each time a deeplink comes through, and
|
||||
* errors if a deeplink comes through that does not match a given path.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true
|
||||
|
||||
55
src/plugins/device-feedback.ts
Normal file
55
src/plugins/device-feedback.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { Plugin, Cordova } from './plugin';
|
||||
/**
|
||||
* @name DeviceFeedback
|
||||
* @description
|
||||
*
|
||||
* Plugin that lets you provide haptic or acoustic feedback on Android devices.
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { DeviceFeedback } from 'ionic-native';
|
||||
*
|
||||
* DeviceFeedback.acoustic();
|
||||
*
|
||||
* DeviceFeedback.haptic(0);
|
||||
*
|
||||
* DeviceFeedback.isFeedbackEnabled()
|
||||
* .then((feedback) => {
|
||||
* console.log(feedback);
|
||||
* // {
|
||||
* // acoustic: true,
|
||||
* // haptic: true
|
||||
* // }
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'DeviceFeedback',
|
||||
plugin: 'cordova-plugin-velda-devicefeedback',
|
||||
pluginRef: 'plugins.deviceFeedback',
|
||||
repo: 'https://github.com/VVelda/device-feedback',
|
||||
platforms: ['Android']
|
||||
})
|
||||
export class DeviceFeedback {
|
||||
|
||||
/**
|
||||
* Provide sound feedback to user, nevertheless respect user's settings and current active device profile as native feedback do.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static acoustic(): void { }
|
||||
|
||||
/**
|
||||
* Provide vibrate feedback to user, nevertheless respect user's tactile feedback setting as native feedback do.
|
||||
* @param type {Number} Specify type of vibration feedback. 0 for long press, 1 for virtual key, or 3 for keyboard tap.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static haptic(type: number): void { }
|
||||
|
||||
/**
|
||||
* Check if haptic and acoustic feedback is enabled by user settings.
|
||||
*/
|
||||
@Cordova()
|
||||
static isFeedbackEnabled(): Promise<{ haptic: boolean; acoustic: boolean; }> { return; }
|
||||
|
||||
}
|
||||
@@ -41,6 +41,7 @@ export interface Device {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Device',
|
||||
plugin: 'cordova-plugin-device',
|
||||
pluginRef: 'device',
|
||||
repo: 'https://github.com/apache/cordova-plugin-device'
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
@Plugin({
|
||||
name: 'DeviceAccounts',
|
||||
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
|
||||
pluginRef: 'plugins.DeviceAccounts',
|
||||
repo: 'https://github.com/loicknuchel/cordova-device-accounts',
|
||||
|
||||
@@ -62,6 +62,7 @@ export interface AccelerometerOptions {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'DeviceMotion',
|
||||
plugin: 'cordova-plugin-device-motion',
|
||||
pluginRef: 'navigator.accelerometer',
|
||||
repo: 'https://github.com/apache/cordova-plugin-device-motion'
|
||||
|
||||
@@ -67,6 +67,7 @@ export interface CompassOptions {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'DeviceOrientation',
|
||||
plugin: 'cordova-plugin-device-orientation',
|
||||
pluginRef: 'navigator.compass',
|
||||
repo: 'https://github.com/apache/cordova-plugin-device-orientation'
|
||||
|
||||
@@ -29,6 +29,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Diagnostic',
|
||||
plugin: 'cordova.plugins.diagnostic',
|
||||
pluginRef: 'cordova.plugins.diagnostic',
|
||||
repo: 'https://github.com/dpa99c/cordova-diagnostic-plugin'
|
||||
@@ -279,7 +280,7 @@ export class Diagnostic {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||
static getContactsAuthroizationStatus(): Promise<any> { return; }
|
||||
static getContactsAuthorizationStatus(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Requests contacts authorization for the application.
|
||||
@@ -440,6 +441,24 @@ export class Diagnostic {
|
||||
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
|
||||
static requestRuntimePermissions(permissions: any[]): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Indicates if the plugin is currently requesting a runtime permission via the native API.
|
||||
* Note that only one request can be made concurrently because the native API cannot handle concurrent requests,
|
||||
* so the plugin will invoke the error callback if attempting to make more than one simultaneous request.
|
||||
* Multiple permission requests should be grouped into a single call since the native API is setup to handle batch requests of multiple permission groups.
|
||||
* @return {boolean}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static isRequestingPermission(): boolean { return; }
|
||||
|
||||
/**
|
||||
* Registers a function to be called when a runtime permission request has completed.
|
||||
* Pass in a falsey value to de-register the currently registered function.
|
||||
* @param handler {Function}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static registerPermissionRequestCompleteHandler(handler: Function): void { return; }
|
||||
|
||||
/**
|
||||
* Checks if the device setting for Bluetooth is switched on.
|
||||
* This requires `BLUETOOTH` permission on Android
|
||||
|
||||
@@ -32,6 +32,7 @@ export interface PromptCallback {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Dialogs',
|
||||
plugin: 'cordova-plugin-dialogs',
|
||||
pluginRef: 'navigator.notification',
|
||||
repo: 'https://github.com/apache/cordova-plugin-dialogs.git'
|
||||
|
||||
@@ -44,6 +44,7 @@ declare var cordova: any;
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'EmailComposer',
|
||||
plugin: 'cordova-plugin-email',
|
||||
pluginRef: 'cordova.plugins.email',
|
||||
repo: 'https://github.com/hypery2k/cordova-email-plugin',
|
||||
|
||||
@@ -9,6 +9,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'EstimoteBeacons',
|
||||
plugin: 'cordova-plugin-estimote',
|
||||
pluginRef: 'estimote.beacons',
|
||||
repo: 'https://github.com/evothings/phonegap-estimotebeacons',
|
||||
|
||||
@@ -78,6 +78,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Facebook',
|
||||
plugin: 'cordova-plugin-facebook4',
|
||||
pluginRef: 'facebookConnectPlugin',
|
||||
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'FileChooser',
|
||||
plugin: 'http://github.com/don/cordova-filechooser.git',
|
||||
pluginRef: 'fileChooser',
|
||||
repo: 'https://github.com/don/cordova-filechooser',
|
||||
|
||||
@@ -13,6 +13,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'FileOpener',
|
||||
plugin: 'cordova-plugin-file-opener2',
|
||||
pluginRef: 'cordova.plugins.fileOpener2',
|
||||
repo: 'https://github.com/pwlin/cordova-plugin-file-opener2'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from './plugin';
|
||||
import { Plugin, pluginWarn } from './plugin';
|
||||
|
||||
declare var window: any;
|
||||
declare var cordova: any;
|
||||
@@ -301,10 +301,10 @@ export interface FileReader {
|
||||
onabort: (evt: ProgressEvent) => void;
|
||||
|
||||
abort(): void;
|
||||
readAsText(fe: File, encoding?: string): void;
|
||||
readAsDataURL(fe: File): void;
|
||||
readAsBinaryString(fe: File): void;
|
||||
readAsArrayBuffer(fe: File): void;
|
||||
readAsText(fe: File | Blob, encoding?: string): void;
|
||||
readAsDataURL(fe: File | Blob): void;
|
||||
readAsBinaryString(fe: File | Blob): void;
|
||||
readAsArrayBuffer(fe: File | Blob): void;
|
||||
}
|
||||
|
||||
declare var FileReader: {
|
||||
@@ -337,6 +337,7 @@ declare var FileError: {
|
||||
PATH_EXISTS_ERR: number;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @name File
|
||||
* @description
|
||||
@@ -359,6 +360,7 @@ declare var FileError: {
|
||||
* It also implements the FileWriter spec : http://dev.w3.org/2009/dap/file-system/file-writer.html
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'File',
|
||||
plugin: 'cordova-plugin-file',
|
||||
pluginRef: 'cordova.file',
|
||||
repo: 'https://github.com/apache/cordova-plugin-file'
|
||||
@@ -381,9 +383,22 @@ export class File {
|
||||
14: 'DIR_READ_ERR',
|
||||
};
|
||||
|
||||
@Cordova()
|
||||
/**
|
||||
* Get free disk space
|
||||
* @returns {Promise<number>} Returns a promise that resolves with the remaining free disk space
|
||||
*/
|
||||
static getFreeDiskSpace(): Promise<number> {
|
||||
return;
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
if (!cordova || !cordova.exec) {
|
||||
pluginWarn({
|
||||
name: 'File',
|
||||
plugin: 'cordova-plugin-file'
|
||||
});
|
||||
reject({ error: 'plugin_not_installed' });
|
||||
} else {
|
||||
cordova.exec(resolve, reject, 'File', 'getFreeDiskSpace', []);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -393,7 +408,6 @@ export class File {
|
||||
* @param {string} dir Name of directory to check
|
||||
* @return {Promise<boolean|FileError>} Returns a Promise that resolves to true if the directory exists or rejects with an error.
|
||||
*/
|
||||
|
||||
static checkDir(path: string, dir: string): Promise<boolean|FileError> {
|
||||
if ((/^\//.test(dir))) {
|
||||
let err = new FileError(5);
|
||||
@@ -418,7 +432,6 @@ export class File {
|
||||
* @param {boolean} replace If true, replaces file with same name. If false returns error
|
||||
* @return {Promise<DirectoryEntry|FileError>} Returns a Promise that resolves with a DirectoryEntry or rejects with an error.
|
||||
*/
|
||||
|
||||
static createDir(path: string, dirName: string, replace: boolean): Promise<DirectoryEntry|FileError> {
|
||||
if ((/^\//.test(dirName))) {
|
||||
let err = new FileError(5);
|
||||
@@ -447,7 +460,6 @@ export class File {
|
||||
* @param {string} dirName The directory name
|
||||
* @return {Promise<RemoveResult|FileError>} Returns a Promise that resolves to a RemoveResult or rejects with an error.
|
||||
*/
|
||||
|
||||
static removeDir(path: string, dirName: string): Promise<RemoveResult|FileError> {
|
||||
if ((/^\//.test(dirName))) {
|
||||
let err = new FileError(5);
|
||||
@@ -473,7 +485,6 @@ export class File {
|
||||
* @param {string} newDirName The destination directory name
|
||||
* @return {Promise<DirectoryEntry|Entry|FileError>} Returns a Promise that resolves to the new DirectoryEntry object or rejects with an error.
|
||||
*/
|
||||
|
||||
static moveDir(path: string, dirName: string, newPath: string, newDirName: string): Promise<DirectoryEntry|Entry|FileError> {
|
||||
newDirName = newDirName || dirName;
|
||||
|
||||
@@ -530,7 +541,6 @@ export class File {
|
||||
* @param {string} dirName Name of directory
|
||||
* @return {Promise<Entry[]>} Returns a Promise that resolves to an array of Entry objects or rejects with an error.
|
||||
*/
|
||||
|
||||
static listDir(path: string, dirName: string): Promise<Entry[]> {
|
||||
if ((/^\//.test(dirName))) {
|
||||
let err = new FileError(5);
|
||||
@@ -555,7 +565,6 @@ export class File {
|
||||
* @param {string} dirName Name of directory
|
||||
* @return {Promise<RemoveResult>} Returns a Promise that resolves with a RemoveResult or rejects with an error.
|
||||
*/
|
||||
|
||||
static removeRecursively(path: string, dirName: string): Promise<RemoveResult> {
|
||||
if ((/^\//.test(dirName))) {
|
||||
let err = new FileError(5);
|
||||
@@ -579,7 +588,6 @@ export class File {
|
||||
* @param {string} file Name of file to check
|
||||
* @return {Promise<boolean|FileError>} Returns a Promise that resolves with a boolean or rejects with an error.
|
||||
*/
|
||||
|
||||
static checkFile(path: string, file: string): Promise<boolean|FileError> {
|
||||
if ((/^\//.test(file))) {
|
||||
let err = new FileError(5);
|
||||
@@ -637,7 +645,6 @@ export class File {
|
||||
* @param {string} fileName Name of file to remove
|
||||
* @return {Promise<RemoveResult|FileError>} Returns a Promise that resolves to a RemoveResult or rejects with an error.
|
||||
*/
|
||||
|
||||
static removeFile(path: string, fileName: string): Promise<RemoveResult|FileError> {
|
||||
if ((/^\//.test(fileName))) {
|
||||
let err = new FileError(5);
|
||||
@@ -659,38 +666,37 @@ export class File {
|
||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystems above
|
||||
* @param {string} fileName path relative to base path
|
||||
* @param {string | Blob} text content or blob to write
|
||||
* @param {boolean | WriteOptions} replaceOrOptions replace file if set to true. See WriteOptions for more information.
|
||||
* @param {WriteOptions} options replace file if set to true. See WriteOptions for more information.
|
||||
* @returns {Promise<void>} Returns a Promise that resolves or rejects with an error.
|
||||
*/
|
||||
static writeFile(path: string, fileName: string,
|
||||
text: string | Blob, replaceOrOptions: boolean | WriteOptions): Promise<void> {
|
||||
text: string | Blob, options: WriteOptions): Promise<void> {
|
||||
if ((/^\//.test(fileName))) {
|
||||
let err = new FileError(5);
|
||||
err.message = 'file-name cannot start with \/';
|
||||
return Promise.reject(err);
|
||||
}
|
||||
|
||||
let opts: WriteOptions = {};
|
||||
if (replaceOrOptions) {
|
||||
if (typeof(replaceOrOptions) === 'boolean') {
|
||||
opts.replace = <boolean>replaceOrOptions;
|
||||
}
|
||||
}
|
||||
let getFileOpts: Flags = {
|
||||
create: true,
|
||||
exclusive: options.replace
|
||||
};
|
||||
|
||||
return File.resolveDirectoryUrl(path)
|
||||
.then((fse) => {
|
||||
return File.getFile(fse, fileName, opts);
|
||||
return File.getFile(fse, fileName, getFileOpts);
|
||||
})
|
||||
.then((fe) => {
|
||||
return File.createWriter(fe);
|
||||
})
|
||||
.then((writer) => {
|
||||
if (opts.append) {
|
||||
|
||||
if (options.append) {
|
||||
writer.seek(writer.length);
|
||||
}
|
||||
|
||||
if (opts.hasOwnProperty('truncate')) {
|
||||
writer.truncate(opts.truncate);
|
||||
if (options.truncate) {
|
||||
writer.truncate(options.truncate);
|
||||
}
|
||||
|
||||
return File.write(writer, text);
|
||||
@@ -959,12 +965,14 @@ export class File {
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Resolves a local file system URL
|
||||
* @param fileUrl {string} file system url
|
||||
* @returns {Promise<Entry>}
|
||||
*/
|
||||
private static resolveLocalFilesystemUrl(furl: string): Promise<Entry> {
|
||||
static resolveLocalFilesystemUrl(fileUrl: string): Promise<Entry> {
|
||||
return new Promise<Entry>((resolve, reject) => {
|
||||
try {
|
||||
window.resolveLocalFileSystemURL(furl, (entry) => {
|
||||
window.resolveLocalFileSystemURL(fileUrl, (entry) => {
|
||||
resolve(entry);
|
||||
}, (err) => {
|
||||
File.fillErrorMessage(err);
|
||||
@@ -978,10 +986,12 @@ export class File {
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Resolves a local directory url
|
||||
* @param directoryUrl {string} directory system url
|
||||
* @returns {Promise<DirectoryEntry>}
|
||||
*/
|
||||
private static resolveDirectoryUrl(durl: string): Promise<DirectoryEntry> {
|
||||
return File.resolveLocalFilesystemUrl(durl)
|
||||
static resolveDirectoryUrl(directoryUrl: string): Promise<DirectoryEntry> {
|
||||
return File.resolveLocalFilesystemUrl(directoryUrl)
|
||||
.then((de) => {
|
||||
if (de.isDirectory) {
|
||||
return <DirectoryEntry>de;
|
||||
@@ -994,12 +1004,16 @@ export class File {
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Get a directory
|
||||
* @param directoryEntry {DirectoryEntry} Directory entry, obtained by resolveDirectoryUrl method
|
||||
* @param directoryName {string} Directory name
|
||||
* @param flags {Flags} Options
|
||||
* @returns {Promise<DirectoryEntry>}
|
||||
*/
|
||||
private static getDirectory(fse: DirectoryEntry, dn: string, flags: Flags): Promise<DirectoryEntry> {
|
||||
static getDirectory(directoryEntry: DirectoryEntry, directoryName: string, flags: Flags): Promise<DirectoryEntry> {
|
||||
return new Promise<DirectoryEntry>((resolve, reject) => {
|
||||
try {
|
||||
fse.getDirectory(dn, flags, (de) => {
|
||||
directoryEntry.getDirectory(directoryName, flags, (de) => {
|
||||
resolve(de);
|
||||
}, (err) => {
|
||||
File.fillErrorMessage(err);
|
||||
@@ -1013,14 +1027,16 @@ export class File {
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Get a file
|
||||
* @param directoryEntry {DirectoryEntry} Directory entry, obtained by resolveDirectoryUrl method
|
||||
* @param fileName {string} File name
|
||||
* @param flags {Flags} Options
|
||||
* @returns {Promise<FileEntry>}
|
||||
*/
|
||||
private static getFile(fse: DirectoryEntry, fn: string, flags: Flags): Promise<FileEntry> {
|
||||
static getFile(directoryEntry: DirectoryEntry, fileName: string, flags: Flags): Promise<FileEntry> {
|
||||
return new Promise<FileEntry>((resolve, reject) => {
|
||||
try {
|
||||
fse.getFile(fn, flags, (fe) => {
|
||||
resolve(fe);
|
||||
}, (err) => {
|
||||
directoryEntry.getFile(fileName, flags, resolve, (err) => {
|
||||
File.fillErrorMessage(err);
|
||||
reject(err);
|
||||
});
|
||||
@@ -1123,12 +1139,12 @@ export class File {
|
||||
return this.writeFileInChunks(writer, gu);
|
||||
}
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
writer.onwriteend = (evt) => {
|
||||
if (writer.error) {
|
||||
reject(writer.error);
|
||||
} else {
|
||||
resolve();
|
||||
resolve(evt);
|
||||
}
|
||||
};
|
||||
writer.write(gu);
|
||||
|
||||
35
src/plugins/filepath.ts
Normal file
35
src/plugins/filepath.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Plugin, Cordova } from './plugin';
|
||||
|
||||
declare var window: any;
|
||||
|
||||
/**
|
||||
* @name FilePath
|
||||
* @description
|
||||
*
|
||||
* This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library.
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import {FilePath} from 'ionic-native';
|
||||
*
|
||||
* FilePath.resolveNativePath(path)
|
||||
* .then(filePath => console.log(filePath);
|
||||
* .catch(err => console.log(err);
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'FilePath',
|
||||
plugin: 'cordova-plugin-filepath',
|
||||
pluginRef: 'window.FilePath',
|
||||
repo: 'https://github.com/hiddentao/cordova-plugin-filepath',
|
||||
platforms: ['Android']
|
||||
})
|
||||
export class FilePath {
|
||||
/**
|
||||
* Resolve native path for given content URL/path.
|
||||
* @param {String} path Content URL/path.
|
||||
*/
|
||||
@Cordova()
|
||||
static resolveNativePath(path: string): Promise<string> {return; }
|
||||
}
|
||||
@@ -138,7 +138,7 @@ export interface FileTransferError {
|
||||
* fileKey: 'file',
|
||||
* fileName: 'name.jpg',
|
||||
* headers: {}
|
||||
* .....
|
||||
* .....
|
||||
* }
|
||||
* fileTransfer.upload("<file path>", "<api endpoint>", options)
|
||||
* .then((data) => {
|
||||
@@ -148,10 +148,32 @@ export interface FileTransferError {
|
||||
* })
|
||||
* }
|
||||
*
|
||||
* // Cordova
|
||||
* declare var cordova: any;
|
||||
*
|
||||
* download() {
|
||||
* const fileTransfer = new Transfer();
|
||||
* let url = 'http://www.example.com/file.pdf';
|
||||
* fileTransfer.download(url, cordova.file.dataDirectory + 'file.pdf').then((entry) => {
|
||||
* console.log('download complete: ' + entry.toURL());
|
||||
* }, (error) => {
|
||||
* // handle error
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* Note: You will not see your documents using a file explorer on your device. Use adb:
|
||||
*
|
||||
* ```
|
||||
* adb shell
|
||||
* run-as com.your.app
|
||||
* cd files
|
||||
* ls
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'FileTransfer',
|
||||
plugin: 'cordova-plugin-file-transfer',
|
||||
pluginRef: 'FileTransfer',
|
||||
repo: 'https://github.com/apache/cordova-plugin-file-transfer'
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Flashlight',
|
||||
plugin: 'cordova-plugin-flashlight',
|
||||
pluginRef: 'window.plugins.flashlight',
|
||||
repo: 'https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin.git'
|
||||
|
||||
@@ -74,6 +74,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
declare var window: any;
|
||||
|
||||
@Plugin({
|
||||
name: 'Geofence',
|
||||
plugin: 'cordova-plugin-geofence',
|
||||
pluginRef: 'geofence',
|
||||
repo: 'https://github.com/cowbell/cordova-plugin-geofence/',
|
||||
@@ -146,7 +147,7 @@ export class Geofence {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the user clicks a geofence notification. iOS and Android only.
|
||||
* Called when the user clicks a geofence notification. iOS and Android only.
|
||||
*
|
||||
* @return {Promise<Object>}
|
||||
*/
|
||||
|
||||
@@ -139,6 +139,7 @@ export interface GeolocationOptions {
|
||||
* GeolocationOptions
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Geolocation',
|
||||
plugin: 'cordova-plugin-geolocation',
|
||||
pluginRef: 'navigator.geolocation',
|
||||
repo: 'https://github.com/apache/cordova-plugin-geolocation'
|
||||
@@ -173,7 +174,7 @@ export class Geolocation {
|
||||
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
|
||||
* @return Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
||||
*/
|
||||
static watchPosition(options?: GeolocationOptions): Observable<Geoposition | PositionError> {
|
||||
static watchPosition(options?: GeolocationOptions): Observable<Geoposition & PositionError> {
|
||||
return new Observable<Geoposition>(
|
||||
(observer: any) => {
|
||||
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.next.bind(observer), options);
|
||||
|
||||
@@ -11,6 +11,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Globalization',
|
||||
plugin: 'cordova-plugin-globalization',
|
||||
pluginRef: 'navigator.globalization',
|
||||
repo: 'https://github.com/apache/cordova-plugin-globalization'
|
||||
|
||||
@@ -12,11 +12,12 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-plugin-googleplus',
|
||||
pluginRef: 'window.plugins.googleplus',
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-googleplus',
|
||||
platforms: ['Web', 'Android', 'iOS'],
|
||||
install: 'ionic plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=myreversedclientid'
|
||||
name: 'GooglePlus',
|
||||
plugin: 'cordova-plugin-googleplus',
|
||||
pluginRef: 'window.plugins.googleplus',
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-googleplus',
|
||||
platforms: ['Web', 'Android', 'iOS'],
|
||||
install: 'ionic plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=myreversedclientid'
|
||||
})
|
||||
export class GooglePlus {
|
||||
|
||||
|
||||
@@ -13,8 +13,9 @@ declare var window;
|
||||
* - (Android) Google Play Services SDK installed via [Android SDK Manager](https://developer.android.com/sdk/installing/adding-packages.html)
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'GoogleAnalytics',
|
||||
plugin: 'cordova-plugin-google-analytics',
|
||||
pluginRef: 'analytics',
|
||||
pluginRef: 'ga',
|
||||
repo: 'https://github.com/danwilson/google-analytics-plugin',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@@ -23,45 +24,128 @@ export class GoogleAnalytics {
|
||||
* In your 'deviceready' handler, set up your Analytics tracker.
|
||||
* https://developers.google.com/analytics/devguides/collection/analyticsjs/
|
||||
* @param {string} id Your Google Analytics Mobile App property
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static startTrackerWithId(id: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more
|
||||
* @param allow {boolean}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static setAllowIDFACollection(allow: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set a UserId
|
||||
* https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id
|
||||
* @param {string} id User ID
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static setUserId(id: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set a anonymize Ip address
|
||||
* @param anonymize {boolean} Set to true to anonymize the IP Address
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static setAnonymizeIp(anonymize: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Sets the app version
|
||||
* @param appVersion {string} App version
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static setAppVersion(appVersion: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set OptOut
|
||||
* @param optout {boolean}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static setOptOut(optout: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Enable verbose logging
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static debugMode(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Track custom metric
|
||||
* @param key {string}
|
||||
* @param value {any}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 2,
|
||||
errorIndex: 3
|
||||
})
|
||||
static trackMetric(key: string, value?: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Track a screen
|
||||
* https://developers.google.com/analytics/devguides/collection/analyticsjs/screens
|
||||
*
|
||||
* @param {string} title Screen title
|
||||
* @param {string} campaignUrl Campaign url for measuring referrals
|
||||
* @param title {string} Screen title
|
||||
* @param campaignUrl {string} Campaign url for measuring referrals
|
||||
* @param newSession {boolean} Set to true to create a new session
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 3,
|
||||
errorIndex: 4
|
||||
})
|
||||
static trackView(title: string, campaignUrl?: string, newSession?: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Add a Custom Dimension
|
||||
* https://developers.google.com/analytics/devguides/platform/customdimsmets
|
||||
* @param key {string}
|
||||
* @param value {string}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static trackView(title: string, campaignUrl?: string): Promise<any> { return; }
|
||||
static addCustomDimension(key: number, value: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Track an event
|
||||
* https://developers.google.com/analytics/devguides/collection/analyticsjs/events
|
||||
* @param {string} category
|
||||
* @param {string} action
|
||||
* @param {string} label
|
||||
* @param {number} value
|
||||
* @param category {string}
|
||||
* @param action {string}
|
||||
* @param label {string}
|
||||
* @param value {number}
|
||||
* @param newSession {boolean} Set to true to create a new session
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static trackEvent(category: string, action: string, label?: string, value?: number): Promise<any> { return; }
|
||||
@Cordova({
|
||||
successIndex: 5,
|
||||
errorIndex: 6
|
||||
})
|
||||
static trackEvent(category: string, action: string, label?: string, value?: number, newSession?: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Track an exception
|
||||
* @param {string} description
|
||||
* @param {boolean} fatal
|
||||
* @param description {string}
|
||||
* @param fatal {boolean}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static trackException(description: string, fatal: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Track User Timing (App Speed)
|
||||
* @param {string} category
|
||||
* @param {number} intervalInMilliseconds
|
||||
* @param {string} variable
|
||||
* @param {string} label
|
||||
* @param category {string}
|
||||
* @param intervalInMilliseconds {number}
|
||||
* @param variable {string}
|
||||
* @param label {string}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static trackTiming(category: string, intervalInMilliseconds: number, variable: string, label: string): Promise<any> { return; }
|
||||
@@ -69,12 +153,13 @@ export class GoogleAnalytics {
|
||||
/**
|
||||
* Add a Transaction (Ecommerce)
|
||||
* https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#addTrans
|
||||
* @param {string} id
|
||||
* @param {string} affiliation
|
||||
* @param {number} revenue
|
||||
* @param {number} tax
|
||||
* @param {number} shipping
|
||||
* @param {string} currencyCode
|
||||
* @param id {string}
|
||||
* @param affiliation {string}
|
||||
* @param revenue {number}
|
||||
* @param tax {number}
|
||||
* @param shipping {number}
|
||||
* @param currencyCode {string}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static addTransaction(id: string, affiliation: string, revenue: number, tax: number, shipping: number, currencyCode: string): Promise<any> { return; }
|
||||
@@ -89,57 +174,15 @@ export class GoogleAnalytics {
|
||||
* @param {number} price
|
||||
* @param {number} quantity
|
||||
* @param {string} currencyCode
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static addTransactionItem(id: string, name: string, sku: string, category: string, price: number, quantity: number, currencyCode: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Add a Custom Dimension
|
||||
* https://developers.google.com/analytics/devguides/platform/customdimsmets
|
||||
* @param {string} key
|
||||
* @param {string} value
|
||||
*/
|
||||
@Cordova()
|
||||
static addCustomDimension(key: number, value: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set a UserId
|
||||
* https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id
|
||||
* @param {string} id
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static setUserId(id: string): void { }
|
||||
|
||||
/**
|
||||
* Sets the app version
|
||||
* @param appVersion
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static setAppVersion(appVersion: string): void { }
|
||||
|
||||
/**
|
||||
* Set a anonymize Ip address
|
||||
* @param anonymize
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static setAnonymizeIp(anonymize: boolean): void { }
|
||||
|
||||
/**
|
||||
* Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more
|
||||
* @param allow
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static setAllowIDFACollection(allow: boolean): void { }
|
||||
|
||||
/**
|
||||
* Enable verbose logging
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static debugMode(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Enable/disable automatic reporting of uncaught exceptions
|
||||
* @param {boolean} shouldEnable
|
||||
* @param shouldEnable {boolean}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static enableUncaughtExceptionReporting(shouldEnable: boolean): Promise<any> { return; }
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import {Cordova, CordovaInstance, Plugin, InstanceProperty} from './plugin';
|
||||
import { Cordova, CordovaInstance, Plugin, InstanceProperty, getPlugin, pluginWarn } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Created by Ibrahim on 3/29/2016.
|
||||
*/
|
||||
declare var plugin: any;
|
||||
|
||||
/**
|
||||
@@ -89,6 +84,7 @@ export const GoogleMapsAnimation = {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'GoogleMap',
|
||||
pluginRef: 'plugin.google.maps.Map',
|
||||
plugin: 'cordova-plugin-googlemaps',
|
||||
repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps',
|
||||
@@ -106,8 +102,17 @@ export class GoogleMap {
|
||||
static isAvailable(): Promise<boolean> { return; }
|
||||
|
||||
constructor(element: string|HTMLElement, options?: any) {
|
||||
if (typeof element === 'string') element = document.getElementById(<string>element);
|
||||
this._objectInstance = plugin.google.maps.Map.getMap(element, options);
|
||||
if (!!getPlugin('plugin.google.maps.Map')) {
|
||||
if (typeof element === 'string') {
|
||||
element = document.getElementById(<string>element);
|
||||
}
|
||||
this._objectInstance = plugin.google.maps.Map.getMap(element, options);
|
||||
} else {
|
||||
pluginWarn({
|
||||
name: 'GoogleMap',
|
||||
plugin: 'plugin.google.maps.Map'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,6 +121,12 @@ export class GoogleMap {
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
on(event: any): Observable<any> {
|
||||
if (!this._objectInstance) {
|
||||
return new Observable((observer) => {
|
||||
observer.error({ error: 'plugin_not_installed' });
|
||||
});
|
||||
}
|
||||
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.on(event, observer.next.bind(observer));
|
||||
@@ -130,6 +141,9 @@ export class GoogleMap {
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
one(event: any): Promise<any> {
|
||||
if (!this._objectInstance) {
|
||||
return Promise.reject({ error: 'plugin_not_installed' });
|
||||
}
|
||||
return new Promise<any>(
|
||||
resolve => this._objectInstance.one(event, resolve)
|
||||
);
|
||||
@@ -207,7 +221,10 @@ export class GoogleMap {
|
||||
@CordovaInstance({ sync: true })
|
||||
setAllGesturesEnabled(enabled: boolean): void { }
|
||||
|
||||
addMarker(options: GoogleMapsMarkerOptions): Promise<GoogleMapsMarker> {
|
||||
addMarker(options: GoogleMapsMarkerOptions): Promise<GoogleMapsMarker | any> {
|
||||
if (!this._objectInstance) {
|
||||
return Promise.reject({ error: 'plugin_not_installed' });
|
||||
}
|
||||
return new Promise<GoogleMapsMarker>(
|
||||
(resolve, reject) => {
|
||||
this._objectInstance.addMarker(options, (marker: any) => {
|
||||
@@ -221,7 +238,10 @@ export class GoogleMap {
|
||||
);
|
||||
}
|
||||
|
||||
addCircle(options: GoogleMapsCircleOptions): Promise<GoogleMapsCircle> {
|
||||
addCircle(options: GoogleMapsCircleOptions): Promise<GoogleMapsCircle | any> {
|
||||
if (!this._objectInstance) {
|
||||
return Promise.reject({ error: 'plugin_not_installed' });
|
||||
}
|
||||
return new Promise<GoogleMapsCircle>(
|
||||
(resolve, reject) => {
|
||||
this._objectInstance.addCircle(options, (circle: any) => {
|
||||
@@ -235,7 +255,10 @@ export class GoogleMap {
|
||||
);
|
||||
}
|
||||
|
||||
addPolygon(options: GoogleMapsPolygonOptions): Promise<GoogleMapsPolygon> {
|
||||
addPolygon(options: GoogleMapsPolygonOptions): Promise<GoogleMapsPolygon | any> {
|
||||
if (!this._objectInstance) {
|
||||
return Promise.reject({ error: 'plugin_not_installed' });
|
||||
}
|
||||
return new Promise<GoogleMapsPolygon>(
|
||||
(resolve, reject) => {
|
||||
this._objectInstance.addPolygon(options, (polygon: any) => {
|
||||
@@ -249,7 +272,10 @@ export class GoogleMap {
|
||||
);
|
||||
}
|
||||
|
||||
addPolyline(options: GoogleMapsPolylineOptions): Promise<GoogleMapsPolyline> {
|
||||
addPolyline(options: GoogleMapsPolylineOptions): Promise<GoogleMapsPolyline | any> {
|
||||
if (!this._objectInstance) {
|
||||
return Promise.reject({ error: 'plugin_not_installed' });
|
||||
}
|
||||
return new Promise<GoogleMapsPolyline>(
|
||||
(resolve, reject) => {
|
||||
this._objectInstance.addPolyline(options, (polyline: any) => {
|
||||
@@ -263,7 +289,10 @@ export class GoogleMap {
|
||||
);
|
||||
}
|
||||
|
||||
addTileOverlay(options: GoogleMapsTileOverlayOptions): Promise<GoogleMapsTileOverlay> {
|
||||
addTileOverlay(options: GoogleMapsTileOverlayOptions): Promise<GoogleMapsTileOverlay | any> {
|
||||
if (!this._objectInstance) {
|
||||
return Promise.reject({ error: 'plugin_not_installed' });
|
||||
}
|
||||
return new Promise<GoogleMapsTileOverlay>(
|
||||
(resolve, reject) => {
|
||||
this._objectInstance.addTileOverlay(options, (tileOverlay: any) => {
|
||||
@@ -277,7 +306,10 @@ export class GoogleMap {
|
||||
);
|
||||
}
|
||||
|
||||
addGroundOverlay(options: GoogleMapsGroundOverlayOptions): Promise<GoogleMapsGroundOverlay> {
|
||||
addGroundOverlay(options: GoogleMapsGroundOverlayOptions): Promise<GoogleMapsGroundOverlay | any> {
|
||||
if (!this._objectInstance) {
|
||||
return Promise.reject({ error: 'plugin_not_installed' });
|
||||
}
|
||||
return new Promise<GoogleMapsGroundOverlay>(
|
||||
(resolve, reject) => {
|
||||
this._objectInstance.addGroundOverlay(options, (groundOverlay: any) => {
|
||||
@@ -291,7 +323,10 @@ export class GoogleMap {
|
||||
);
|
||||
}
|
||||
|
||||
addKmlOverlay(options: GoogleMapsKmlOverlayOptions): Promise<GoogleMapsKmlOverlay> {
|
||||
addKmlOverlay(options: GoogleMapsKmlOverlayOptions): Promise<GoogleMapsKmlOverlay | any> {
|
||||
if (!this._objectInstance) {
|
||||
return Promise.reject({ error: 'plugin_not_installed' });
|
||||
}
|
||||
return new Promise<GoogleMapsKmlOverlay>(
|
||||
(resolve, reject) => {
|
||||
this._objectInstance.addKmlOverlay(options, (kmlOverlay: any) => {
|
||||
@@ -853,6 +888,7 @@ export class GoogleMapsLatLngBounds {
|
||||
|
||||
@InstanceProperty get northeast(): GoogleMapsLatLng { return; }
|
||||
@InstanceProperty get southwest(): GoogleMapsLatLng { return; }
|
||||
@InstanceProperty get type(): string { return; }
|
||||
|
||||
constructor(southwestOrArrayOfLatLng: GoogleMapsLatLng | GoogleMapsLatLng[], northeast?: GoogleMapsLatLng) {
|
||||
let args = !!northeast ? [southwestOrArrayOfLatLng, northeast] : southwestOrArrayOfLatLng;
|
||||
@@ -879,21 +915,22 @@ export class GoogleMapsLatLngBounds {
|
||||
* @private
|
||||
*/
|
||||
export class GoogleMapsLatLng {
|
||||
private _objectInstance: any;
|
||||
|
||||
@InstanceProperty get lat(): number { return; }
|
||||
@InstanceProperty get lng(): number { return; }
|
||||
lat: number;
|
||||
lng: number;
|
||||
|
||||
constructor(lat: number, lng: number) {
|
||||
this._objectInstance = new plugin.google.maps.LatLng(lat, lng);
|
||||
this.lat = lat;
|
||||
this.lng = lng;
|
||||
}
|
||||
|
||||
equals(other: GoogleMapsLatLng): boolean {
|
||||
return this.lat === other.lat && this.lng === other.lng;
|
||||
}
|
||||
|
||||
@CordovaInstance({ sync: true })
|
||||
toString(): string { return; }
|
||||
toString(): string {
|
||||
return this.lat + ',' + this.lng;
|
||||
}
|
||||
|
||||
toUrlValue(precision?: number): string {
|
||||
precision = precision || 6;
|
||||
@@ -941,9 +978,13 @@ export class Geocoder {
|
||||
* @param {GeocoderRequest} request Request object with either an address or a position
|
||||
* @returns {Promise<GeocoderResult[]>}
|
||||
*/
|
||||
static geocode(request: GeocoderRequest): Promise<GeocoderResult[]> {
|
||||
static geocode(request: GeocoderRequest): Promise<GeocoderResult[] | any> {
|
||||
return new Promise<GeocoderResult[]>((resolve, reject) => {
|
||||
if (!plugin || !plugin.google || !plugin.google.maps || !plugin.google.maps.Geocoder) {
|
||||
pluginWarn({
|
||||
name: 'GoogleMap',
|
||||
plugin: 'plugin.google.maps.Map'
|
||||
});
|
||||
reject({ error: 'plugin_not_installed' });
|
||||
} else {
|
||||
plugin.google.maps.Geocoder.geocode(request, resolve);
|
||||
@@ -15,6 +15,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Hotspot',
|
||||
plugin: 'cordova-plugin-hotspot',
|
||||
pluginRef: 'cordova.plugins.hotspot',
|
||||
repo: 'https://github.com/hypery2k/cordova-hotspot-plugin',
|
||||
@@ -217,27 +218,27 @@ export class Hotspot {
|
||||
|
||||
export interface ConnectionInfo {
|
||||
/**
|
||||
* @property {string} SSID
|
||||
* SSID
|
||||
* The service set identifier (SSID) of the current 802.11 network.
|
||||
*/
|
||||
SSID: string;
|
||||
/**
|
||||
* @property {string} BSSID
|
||||
* BSSID
|
||||
* The basic service set identifier (BSSID) of the current access point.
|
||||
*/
|
||||
BSSID: string;
|
||||
/**
|
||||
* @property {string} linkSpeed
|
||||
* linkSpeed
|
||||
* The current link speed in Mbps
|
||||
*/
|
||||
linkSpeed: string;
|
||||
/**
|
||||
* @property {string} IPAddress
|
||||
* IPAddress
|
||||
* The IP Address
|
||||
*/
|
||||
IPAddress: string;
|
||||
/**
|
||||
* @property {string} networkID
|
||||
* networkID
|
||||
* Each configured network has a unique small integer ID, used to identify the network when performing operations on the supplicant.
|
||||
*/
|
||||
networkID: string;
|
||||
@@ -245,62 +246,62 @@ export interface ConnectionInfo {
|
||||
|
||||
export interface HotspotNetwork {
|
||||
/**
|
||||
* @property {string} SSID
|
||||
* SSID
|
||||
* Human readable network name
|
||||
*/
|
||||
SSID: string;
|
||||
/**
|
||||
* @property {string} BSSID
|
||||
* BSSID
|
||||
* MAC Address of the access point
|
||||
*/
|
||||
BSSID: string;
|
||||
/**
|
||||
* @property {number (int)} frequency
|
||||
* frequency
|
||||
* The primary 20 MHz frequency (in MHz) of the channel over which the client is communicating with the access point.
|
||||
*/
|
||||
frequency: number;
|
||||
/**
|
||||
* @property {number} level
|
||||
* level
|
||||
* The detected signal level in dBm, also known as the RSSI.
|
||||
*/
|
||||
level: number;
|
||||
/**
|
||||
* @property {number} timestamp
|
||||
* timestamp
|
||||
* Timestamp in microseconds (since boot) when this result was last seen.
|
||||
*/
|
||||
timestamp: number;
|
||||
/**
|
||||
* @property {string} capabilities
|
||||
* capabilities
|
||||
* Describes the authentication, key management, and encryption schemes supported by the access point.
|
||||
*/
|
||||
capabilities: string;
|
||||
}
|
||||
export interface HotspotNetworkConfig {
|
||||
/**
|
||||
* @property {string} deviceIPAddress - Device IP Address
|
||||
* deviceIPAddress - Device IP Address
|
||||
*/
|
||||
deviceIPAddress: string;
|
||||
/**
|
||||
* @property {string} deviceMacAddress - Device MAC Address
|
||||
* deviceMacAddress - Device MAC Address
|
||||
*/
|
||||
deviceMacAddress: string;
|
||||
/**
|
||||
* @property {string} gatewayIPAddress - Gateway IP Address
|
||||
* gatewayIPAddress - Gateway IP Address
|
||||
*/
|
||||
gatewayIPAddress: string;
|
||||
/**
|
||||
* @property {string} gatewayMacAddress - Gateway MAC Address
|
||||
* gatewayMacAddress - Gateway MAC Address
|
||||
*/
|
||||
gatewayMacAddress: string;
|
||||
}
|
||||
export interface HotspotDevice {
|
||||
/**
|
||||
* @property {string} ip
|
||||
* ip
|
||||
* Hotspot IP Address
|
||||
*/
|
||||
ip: string;
|
||||
/**
|
||||
* @property {string} mac
|
||||
* mac
|
||||
* Hotspot MAC Address
|
||||
*/
|
||||
mac: string;
|
||||
|
||||
158
src/plugins/http.ts
Normal file
158
src/plugins/http.ts
Normal file
@@ -0,0 +1,158 @@
|
||||
import { Plugin, Cordova } from './plugin';
|
||||
/**
|
||||
* @name HTTP
|
||||
* @description
|
||||
* Cordova / Phonegap plugin for communicating with HTTP servers. Supports iOS and Android.
|
||||
*
|
||||
* Advantages over Javascript requests:
|
||||
* - Background threading - all requests are done in a background thread
|
||||
* - SSL Pinning
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { HTTP } from 'ionic-native';
|
||||
*
|
||||
* HTTP.get('http://ionic.io', {}, {})
|
||||
* .then(data => {
|
||||
*
|
||||
* console.log(data.status);
|
||||
* console.log(data.data); // data received by server
|
||||
* console.log(data.headers);
|
||||
*
|
||||
* })
|
||||
* .catch(error => {
|
||||
*
|
||||
* console.log(error.status);
|
||||
* console.log(error.error); // error message as string
|
||||
* console.log(error.headers);
|
||||
*
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* HTTPResponse
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'HTTP',
|
||||
plugin: 'cordova-plugin-http',
|
||||
pluginRef: 'cordovaHTTP',
|
||||
repo: 'https://github.com/wymsee/cordova-HTTP',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
export class HTTP {
|
||||
|
||||
/**
|
||||
* This returns an object representing a basic HTTP Authorization header of the form.
|
||||
* @param username {string} Username
|
||||
* @param password {string} Password
|
||||
* @return {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64encodedusernameandpassword'}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static getBasicAuthHeader(username: string, password: string): { Authorization: string; } { return; }
|
||||
|
||||
/**
|
||||
* This sets up all future requests to use Basic HTTP authentication with the given username and password.
|
||||
* @param username {string} Username
|
||||
* @param password {string} Password
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static useBasicAuth(username: string, password: string): void { }
|
||||
|
||||
/**
|
||||
* Set a header for all future requests. Takes a header and a value.
|
||||
* @param header {string} The name of the header
|
||||
* @param value {string} The value of the header
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static setHeader(header: string, value: string): void { }
|
||||
|
||||
/**
|
||||
* Enable or disable SSL Pinning. This defaults to false.
|
||||
*
|
||||
* To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this stackoverflow answer. You want to convert it to a DER encoded certificate with a .cer extension.
|
||||
*
|
||||
* As an alternative, you can store your .cer files in the www/certificates folder.
|
||||
* @param enable {boolean} Set to true to enable
|
||||
* @return {Promise<any>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
static enableSSLPinning(enable: boolean): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false.
|
||||
* @param accept {boolean} Set to true to accept
|
||||
* @return {Promise<any>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
static acceptAllCerts(accept: boolean): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Whether or not to validate the domain name in the certificate. This defaults to true.
|
||||
* @param validate {boolean} Set to true to validate
|
||||
* @return {Promise<any>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
static validateDomainName(validate: boolean): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Make a POST request
|
||||
* @param url {string} The url to send the request to
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @return {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
static post(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
* @param parameters {Object} Parameters to send with the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @return {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
static get(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param filePath {string} The local path of the file to upload
|
||||
* @param name {string} The name of the parameter to pass the file along as
|
||||
* @return {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
static uploadFile(url: string, body: any, headers: any, filePath: string, name: string): Promise<HTTPResponse> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} The url to send the request to
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param filePath {string} The path to donwload the file to, including the file name.
|
||||
* @return {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
static downloadFile(url: string, body: any, headers: any, filePath: string): Promise<HTTPResponse> { return; }
|
||||
}
|
||||
|
||||
export interface HTTPResponse {
|
||||
/**
|
||||
* The status number of the response
|
||||
*/
|
||||
status: number;
|
||||
/**
|
||||
* The data that is in the response. This property usually exists when a promise returned by a request method resolves.
|
||||
*/
|
||||
data?: any;
|
||||
/**
|
||||
* The headers of the response
|
||||
*/
|
||||
headers: any;
|
||||
/**
|
||||
* Error response from the server. This property usually exists when a promise returned by a request method rejects.
|
||||
*/
|
||||
error?: string;
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Httpd',
|
||||
plugin: 'https://github.com/floatinghotpot/cordova-httpd.git',
|
||||
pluginRef: 'cordova.plugins.CorHttpd',
|
||||
repo: 'https://github.com/floatinghotpot/cordova-httpd',
|
||||
|
||||
@@ -268,6 +268,7 @@ export interface Delegate {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'IBeacon',
|
||||
plugin: 'cordova-plugin-ibeacon',
|
||||
pluginRef: 'cordova.plugins.locationManager',
|
||||
repo: 'https://github.com/petermetz/cordova-plugin-ibeacon',
|
||||
|
||||
@@ -2,19 +2,23 @@ import { Cordova, Plugin } from './plugin';
|
||||
|
||||
|
||||
export interface ImagePickerOptions {
|
||||
// max images to be selected, defaults to 15. If this is set to 1, upon
|
||||
// selection of a single image, the plugin will return it.
|
||||
/**
|
||||
* max images to be selected, defaults to 15. If this is set to 1, upon selection of a single image, the plugin will return it.
|
||||
*/
|
||||
maximumImagesCount?: number;
|
||||
|
||||
// max width and height to allow the images to be. Will keep aspect
|
||||
// ratio no matter what. So if both are 800, the returned image
|
||||
// will be at most 800 pixels wide and 800 pixels tall. If the width is
|
||||
// 800 and height 0 the image will be 800 pixels wide if the source
|
||||
// is at least that wide.
|
||||
/**
|
||||
* Max width to allow images to be
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* Max height to allow images to be
|
||||
*/
|
||||
height?: number;
|
||||
|
||||
// quality of resized image, defaults to 100
|
||||
/**
|
||||
* Quality of images, defaults to 100
|
||||
*/
|
||||
quality?: number;
|
||||
}
|
||||
|
||||
@@ -38,8 +42,11 @@ export interface ImagePickerOptions {
|
||||
* }
|
||||
* }, (err) => { });
|
||||
* ```
|
||||
* @interfaces
|
||||
* ImagePickerOptions
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'ImagePicker',
|
||||
plugin: 'cordova-plugin-image-picker',
|
||||
pluginRef: 'window.imagePicker',
|
||||
repo: 'https://github.com/wymsee/cordova-imagePicker'
|
||||
@@ -56,4 +63,22 @@ export class ImagePicker {
|
||||
})
|
||||
static getPictures(options: ImagePickerOptions): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Check if we have permission to read images
|
||||
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean that indicates whether we have permission
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static hasReadPermission(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Request permission to read images
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static requestReadPermission(): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ export interface ImageResizerOptions {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'ImageResizer',
|
||||
plugin: 'https://github.com/protonet/cordova-plugin-image-resizer.git',
|
||||
pluginRef: 'ImageResizer',
|
||||
repo: 'https://github.com/protonet/cordova-plugin-image-resizer'
|
||||
|
||||
@@ -31,6 +31,7 @@ export interface InAppBrowserEvent extends Event {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'InAppBrowser',
|
||||
plugin: 'cordova-plugin-inappbrowser',
|
||||
pluginRef: 'cordova.InAppBrowser',
|
||||
repo: 'https://github.com/apache/cordova-plugin-inappbrowser'
|
||||
|
||||
@@ -51,6 +51,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'InAppPurchase',
|
||||
plugin: 'cordova-plugin-inapppurchase',
|
||||
pluginRef: 'inAppPurchase',
|
||||
platforms: ['Android', 'iOS'],
|
||||
|
||||
@@ -26,6 +26,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Insomnia',
|
||||
plugin: 'https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git',
|
||||
pluginRef: 'plugins.insomnia',
|
||||
repo: 'https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin',
|
||||
|
||||
@@ -15,6 +15,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Instagram',
|
||||
plugin: 'cordova-instagram-plugin',
|
||||
pluginRef: 'Instagram',
|
||||
repo: 'https://github.com/vstirbu/InstagramPlugin'
|
||||
|
||||
@@ -17,6 +17,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'IsDebug',
|
||||
plugin: 'cordova-plugin-is-debug',
|
||||
pluginRef: 'cordova.plugins.IsDebug',
|
||||
repo: 'https://github.com/mattlewis92/cordova-plugin-is-debug'
|
||||
|
||||
@@ -14,6 +14,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Keyboard',
|
||||
plugin: 'ionic-plugin-keyboard',
|
||||
pluginRef: 'cordova.plugins.Keyboard',
|
||||
repo: 'https://github.com/driftyco/ionic-plugin-keyboard'
|
||||
|
||||
@@ -82,6 +82,7 @@ export interface LaunchNavigatorOptions {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'LaunchNavigator',
|
||||
plugin: 'uk.co.workingedge.phonegap.plugin.launchnavigator',
|
||||
pluginRef: 'launchnavigator',
|
||||
repo: 'https://github.com/dpa99c/phonegap-launch-navigator.git'
|
||||
|
||||
@@ -45,6 +45,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'LocalNotifications',
|
||||
plugin: 'de.appplant.cordova.plugin.local-notification',
|
||||
pluginRef: 'cordova.plugins.notification.local',
|
||||
repo: 'https://github.com/katzer/cordova-plugin-local-notifications'
|
||||
|
||||
@@ -23,6 +23,7 @@ import {Plugin, Cordova} from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'LocationAccuracy',
|
||||
plugin: 'cordova-plugin-request-location-accuracy',
|
||||
pluginRef: 'cordova.plugins.locationAccuracy',
|
||||
repo: 'https://github.com/dpa99c/cordova-plugin-request-location-accuracy'
|
||||
@@ -44,10 +45,11 @@ export class LocationAccuracy {
|
||||
|
||||
/**
|
||||
* Requests accurate location
|
||||
* @param accuracy {number} Accuracy, from 0 to 4. You can use the static properties of this class that start with REQUEST_PRIORITY_
|
||||
* @returns {Promise<any>} Returns a promise that resolves on success and rejects if an error occurred
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
static request(accuracy: string): Promise<any> { return; }
|
||||
static request(accuracy: number): Promise<any> { return; }
|
||||
|
||||
static REQUEST_PRIORITY_NO_POWER = 0;
|
||||
static REQUEST_PRIORITY_LOW_POWER = 1;
|
||||
|
||||
@@ -13,6 +13,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Market',
|
||||
plugin: 'cordova-plugin-market',
|
||||
pluginRef: 'plugins.market',
|
||||
repo: 'https://github.com/xmartlabs/cordova-plugin-market'
|
||||
|
||||
@@ -22,6 +22,7 @@ declare var navigator: any;
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'MediaCapture',
|
||||
plugin: 'cordova-plugin-media-capture',
|
||||
pluginRef: 'navigator.device.capture',
|
||||
repo: 'https://github.com/apache/cordova-plugin-media-capture'
|
||||
|
||||
@@ -67,12 +67,12 @@ export interface MediaError {
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
let pluginMeta = {
|
||||
@Plugin({
|
||||
name: 'MediaPlugin',
|
||||
repo: 'https://github.com/apache/cordova-plugin-media',
|
||||
plugin: 'cordova-plugin-media',
|
||||
pluginRef: 'Media'
|
||||
};
|
||||
@Plugin(pluginMeta)
|
||||
})
|
||||
export class MediaPlugin {
|
||||
|
||||
// Constants
|
||||
@@ -131,7 +131,10 @@ export class MediaPlugin {
|
||||
this._objectInstance = new Media(src, resolve, reject, onStatusUpdate);
|
||||
});
|
||||
} else {
|
||||
pluginWarn(pluginMeta);
|
||||
pluginWarn({
|
||||
name: 'MediaPlugin',
|
||||
plugin: 'cordova-plugin-media'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
declare var mixpanel: any;
|
||||
|
||||
|
||||
/**
|
||||
* @name Mixpanel
|
||||
* @description
|
||||
@@ -19,6 +18,7 @@ declare var mixpanel: any;
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Mixpanel',
|
||||
plugin: 'cordova-plugin-mixpanel',
|
||||
pluginRef: 'mixpanel',
|
||||
repo: 'https://github.com/samzilverberg/cordova-mixpanel-plugin'
|
||||
@@ -96,17 +96,61 @@ export class Mixpanel {
|
||||
*
|
||||
* @returns {MixpanelPeople}
|
||||
*/
|
||||
@CordovaProperty
|
||||
static get people(): MixpanelPeople { return mixpanel.people; };
|
||||
static get people(): typeof MixpanelPeople {
|
||||
return MixpanelPeople;
|
||||
};
|
||||
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare class MixpanelPeople {
|
||||
static identify(distinctId: string, onSuccess?: Function, onFail?: Function): void;
|
||||
static increment(peopleProperties: any, onSuccess?: Function, onFail?: Function): void;
|
||||
static setPushId(pushId: string, onSuccess?: Function, onFail?: Function): void;
|
||||
static set(peopleProperties: any, onSuccess?: Function, onFail?: Function): void;
|
||||
static setOnce(peopleProperties: any, onSuccess?: Function, onFail?: Function): void;
|
||||
export class MixpanelPeople {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
static plugin: string = 'cordova-plugin-mixpanel';
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
static pluginRef: string = 'mixpanel.people';
|
||||
|
||||
/**
|
||||
*
|
||||
* @param distinctId {string}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static identify(distinctId: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param peopleProperties {string}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static increment(peopleProperties: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pushId
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static setPushId(pushId: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param peopleProperties
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static set(peopleProperties: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param peopleProperties
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static setOnce(peopleProperties: any): Promise<any> { return; }
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'MusicControls',
|
||||
plugin: 'cordova-plugin-music-controls',
|
||||
pluginRef: 'MusicControls',
|
||||
repo: 'https://github.com/homerours/cordova-music-controls-plugin'
|
||||
|
||||
@@ -21,6 +21,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'NativeAudio',
|
||||
plugin: 'cordova-plugin-nativeaudio',
|
||||
pluginRef: 'plugins.NativeAudio',
|
||||
repo: 'https://github.com/floatinghotpot/cordova-plugin-nativeaudio'
|
||||
|
||||
@@ -27,6 +27,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'NativePageTransitions',
|
||||
plugin: 'com.telerik.plugins.nativepagetransitions',
|
||||
pluginRef: 'plugins.nativepagetransitions',
|
||||
repo: 'https://github.com/Telerik-Verified-Plugins/NativePageTransitions',
|
||||
@@ -81,6 +82,9 @@ export interface TransitionOptions {
|
||||
iosdelay?: number;
|
||||
androiddelay?: number;
|
||||
winphonedelay?: number;
|
||||
fixedPixelsTops?: number;
|
||||
fixedPixelsTop?: number;
|
||||
fixedPixelsBottom?: number;
|
||||
action?: string;
|
||||
origin?: string;
|
||||
href?: string;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'NativeStorage',
|
||||
plugin: 'cordova-plugin-nativestorage',
|
||||
pluginRef: 'NativeStorage',
|
||||
repo: 'https://github.com/TheCocoaProject/cordova-plugin-nativestorage'
|
||||
|
||||
@@ -43,6 +43,7 @@ declare var navigator: any;
|
||||
* The `connection` property will return one of the following connection types: `unknown`, `ethernet`, `wifi`, `2g`, `3g`, `4g`, `cellular`, `none`
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Network',
|
||||
plugin: 'cordova-plugin-network-information',
|
||||
repo: 'https://github.com/apache/cordova-plugin-network-information',
|
||||
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser'],
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Plugin, Cordova } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
declare let window: any;
|
||||
/**
|
||||
* @name NFC
|
||||
* @description
|
||||
@@ -23,6 +24,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'NFC',
|
||||
plugin: 'phonegap-nfc',
|
||||
pluginRef: 'nfc',
|
||||
repo: 'https://github.com/chariotsolutions/phonegap-nfc'
|
||||
@@ -155,9 +157,29 @@ export class NFC {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare class Ndef {
|
||||
static uriRecord(uri: string): any;
|
||||
static textRecord(text: string): any;
|
||||
static mimeMediaRecord(mimeType: string, payload: string): any;
|
||||
static androidApplicationRecord(packageName: string): any;
|
||||
export class Ndef {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
static name = 'NFC';
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
static plugin = 'phonegap-nfc';
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
static pluginRef = 'ndef';
|
||||
|
||||
@Cordova({ sync: true })
|
||||
static uriRecord(uri: string): any { return; }
|
||||
|
||||
@Cordova({ sync: true })
|
||||
static textRecord(text: string): any { return; }
|
||||
|
||||
@Cordova({ sync: true })
|
||||
static mimeMediaRecord(mimeType: string, payload: string): any { return; }
|
||||
|
||||
@Cordova({ sync: true })
|
||||
static androidApplicationRecord(packageName: string): any { return; }
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
/**
|
||||
* @name OneSignal
|
||||
* @description
|
||||
@@ -14,17 +13,24 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```typescript
|
||||
* import { OneSignal } from 'ionic-native';
|
||||
*
|
||||
* OneSignal.init('b2f7f966-d8cc-11e4-bed1-df8f05be55ba',
|
||||
* {googleProjectNumber: '703322744261'})
|
||||
* .subscribe(jsonData => {
|
||||
* console.log('didReceiveRemoteNotificationCallBack: ' + JSON.stringify(jsonData));
|
||||
* });
|
||||
* OneSignal.startInit('b2f7f966-d8cc-11e4-bed1-df8f05be55ba', '703322744261');
|
||||
*
|
||||
* OneSignal.enableInAppAlertNotification(true);
|
||||
* OneSignal.inFocusDisplaying(OneSignal.OSInFocusDisplayOption.InAppAlert);
|
||||
*
|
||||
* OneSignal.handleNotificationReceived().subscribe(() => {
|
||||
* // do something when notification is received
|
||||
* });
|
||||
*
|
||||
* OneSignal.handleNotificationOpened().subscribe(() => {
|
||||
* // do something when a notification is opened
|
||||
* });
|
||||
*
|
||||
* OneSignal.endInit();
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'OneSignal',
|
||||
plugin: 'onesignal-cordova-plugin',
|
||||
pluginRef: 'plugins.OneSignal',
|
||||
repo: 'https://github.com/OneSignal/OneSignal-Cordova-SDK'
|
||||
@@ -32,26 +38,71 @@ import { Observable } from 'rxjs/Observable';
|
||||
export class OneSignal {
|
||||
|
||||
/**
|
||||
* Only required method you need to call to setup OneSignal to receive push notifications. Call this from the `deviceready` event.
|
||||
*
|
||||
* @param {string} Your AppId from your OneSignal app
|
||||
* @param {options} The Google Project Number (which you can get from the Google Developer Potal) and the autoRegister option.
|
||||
* @returns {Observable} when a notification is received. Handle your notification action here.
|
||||
* constants to use in inFocusDisplaying()
|
||||
*/
|
||||
@Cordova({ observable: true })
|
||||
static init(appId: string,
|
||||
options: {
|
||||
googleProjectNumber: string,
|
||||
autoRegister: boolean
|
||||
}): Observable<any> { return; }
|
||||
|
||||
static OSInFocusDisplayOption = {
|
||||
None: 0,
|
||||
InAppAlert : 1,
|
||||
Notification : 2
|
||||
};
|
||||
|
||||
/**
|
||||
* Call this when you would like to prompt an iOS user to accept push notifications with the default system prompt.
|
||||
* Only use if you passed false to autoRegister when calling init.
|
||||
* Start the initialization process. Once you are done configuring OneSignal, call the endInit function.
|
||||
*
|
||||
* @param {string} appId Your AppId from your OneSignal app
|
||||
* @param {string} googleProjectNumber The Google Project Number (which you can get from the Google Developer Portal) and the autoRegister option.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static registerForPushNotifications(): void { }
|
||||
static startInit(appId: string, googleProjectNumber: string): any { return; }
|
||||
|
||||
/**
|
||||
* Callback to run when a notification is received
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
static handleNotificationReceived(): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Callback to run when a notification is opened
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
static handleNotificationOpened(): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param settings
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static iOSSettings(settings: {
|
||||
kOSSettingsKeyInAppLaunchURL: boolean;
|
||||
kOSSettingsKeyAutoPrompt: boolean;
|
||||
}): any { return; }
|
||||
|
||||
@Cordova({ sync: true })
|
||||
static endInit(): any { return; }
|
||||
|
||||
/**
|
||||
* Retrieve a list of tags that have been set on the user from the OneSignal server.
|
||||
*
|
||||
* @returns {Promise} Returns a Promise that resolves when tags are recieved.
|
||||
*/
|
||||
@Cordova()
|
||||
static getTags(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Lets you retrieve the OneSignal user id and device token.
|
||||
* Your handler is called after the device is successfully registered with OneSignal.
|
||||
*
|
||||
* @returns {Promise} Returns a Promise that reolves if the device was successfully registered.
|
||||
* It returns a JSON with `userId`and `pushToken`.
|
||||
*/
|
||||
@Cordova()
|
||||
static getIds(): Promise<any> { return; }
|
||||
|
||||
|
||||
/**
|
||||
@@ -65,47 +116,36 @@ export class OneSignal {
|
||||
static sendTag(key: string, value: string): void { }
|
||||
|
||||
/**
|
||||
* Tag a user based on an app event of your choosing so later you can create segments on [onesignal.com](https://onesignal.com/) to target these users.
|
||||
* Recommend using sendTags over sendTag if you need to set more than one tag on a user at a time.
|
||||
*
|
||||
* @param {string} Pass a json object with key/value pairs like: {key: "value", key2: "value2"}
|
||||
*/
|
||||
* Tag a user based on an app event of your choosing so later you can create segments on [onesignal.com](https://onesignal.com/) to target these users.
|
||||
* Recommend using sendTags over sendTag if you need to set more than one tag on a user at a time.
|
||||
*
|
||||
* @param {string} Pass a json object with key/value pairs like: {key: "value", key2: "value2"}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static sendTags(json: any): void { }
|
||||
|
||||
/**
|
||||
* Retrieve a list of tags that have been set on the user from the OneSignal server.
|
||||
*
|
||||
* @returns {Promise} Returns a Promise that resolves when tags are recieved.
|
||||
*/
|
||||
@Cordova()
|
||||
static getTags(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Deletes a tag that was previously set on a user with `sendTag` or `sendTags`. Use `deleteTags` if you need to delete more than one.
|
||||
*
|
||||
* @param {string} Key to remove.
|
||||
*/
|
||||
* Deletes a tag that was previously set on a user with `sendTag` or `sendTags`. Use `deleteTags` if you need to delete more than one.
|
||||
*
|
||||
* @param {string} Key to remove.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static deleteTag(key: string): void { }
|
||||
|
||||
/**
|
||||
* Deletes tags that were previously set on a user with `sendTag` or `sendTags`.
|
||||
*
|
||||
* @param {Array<string>} Keys to remove.
|
||||
*/
|
||||
* Deletes tags that were previously set on a user with `sendTag` or `sendTags`.
|
||||
*
|
||||
* @param {Array<string>} Keys to remove.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static deleteTags(keys: string[]): void { }
|
||||
|
||||
/**
|
||||
* Lets you retrieve the OneSignal user id and device token.
|
||||
* Your handler is called after the device is successfully registered with OneSignal.
|
||||
*
|
||||
* @returns {Promise} Returns a Promise that reolves if the device was successfully registered.
|
||||
* It returns a JSON with `userId`and `pushToken`.
|
||||
*/
|
||||
@Cordova()
|
||||
static getIds(): Promise<any> { return; }
|
||||
* Call this when you would like to prompt an iOS user to accept push notifications with the default system prompt.
|
||||
* Only use if you passed false to autoRegister when calling init.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static registerForPushNotifications(): void { }
|
||||
|
||||
/**
|
||||
* Warning:
|
||||
@@ -132,26 +172,13 @@ export class OneSignal {
|
||||
static enableSound(enable: boolean): void { }
|
||||
|
||||
/**
|
||||
* Warning:
|
||||
* Only applies to Android and Amazon devices.
|
||||
*
|
||||
* By default this is false and notifications will not be shown when the user is in your app, instead the notificationOpenedCallback is fired.
|
||||
* If set to true notifications will always show in the notification area and notificationOpenedCallback will not fire until the user taps on the notification.
|
||||
* Setting to control how OneSignal notifications will be shown when one is received while your app is in focus. By default this is set to inAppAlert, which can be helpful during development.
|
||||
*
|
||||
* @param {boolean} enable
|
||||
* @param {number} displayOption Options are 0 = None, 1 = InAppAlert, and 2 = Notification.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static enableNotificationsWhenActive(enable: boolean): void { }
|
||||
|
||||
/**
|
||||
* By default this is false and notifications will not be shown when the user is in your app, instead the notificationOpenedCallback is fired.
|
||||
* If set to true notifications will be shown as native alert boxes if a notification is received when the user is in your app.
|
||||
* The notificationOpenedCallback is then fired after the alert box is closed.
|
||||
*
|
||||
* @param {boolean} enable
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static enableInAppAlertNotification(enable: boolean): void { }
|
||||
static inFocusDisplaying(displayOption: number): void { }
|
||||
|
||||
/**
|
||||
* You can call this method with false to opt users out of receiving all notifications through OneSignal.
|
||||
@@ -168,68 +195,7 @@ export class OneSignal {
|
||||
* @returns {Promise} Returns a Promise that resolves if the notification was send successfully.
|
||||
*/
|
||||
@Cordova()
|
||||
static postNotification(notificationObj: {
|
||||
app_id: string,
|
||||
contents: any,
|
||||
headings?: any,
|
||||
isIos?: boolean,
|
||||
isAndroid?: boolean,
|
||||
isWP?: boolean,
|
||||
isWP_WNS?: boolean,
|
||||
isAdm?: boolean,
|
||||
isChrome?: boolean,
|
||||
isChromeWeb?: boolean,
|
||||
isSafari?: boolean,
|
||||
isAnyWeb?: boolean,
|
||||
included_segments?: string[],
|
||||
excluded_segments?: string[],
|
||||
include_player_ids?: string[],
|
||||
include_ios_tokens?: string[],
|
||||
include_android_reg_ids?: string[],
|
||||
include_wp_uris?: string[],
|
||||
include_wp_wns_uris?: string[],
|
||||
include_amazon_reg_ids?: string[],
|
||||
include_chrome_reg_ids?: string[],
|
||||
include_chrome_web_reg_ids?: string[],
|
||||
app_ids?: string[];
|
||||
tags?: any[],
|
||||
ios_badgeType?: string,
|
||||
ios_badgeCount?: number,
|
||||
ios_sound?: string,
|
||||
android_sound?: string,
|
||||
adm_sound?: string,
|
||||
wp_sound?: string,
|
||||
wp_wns_sound?: string,
|
||||
data?: any,
|
||||
buttons?: any,
|
||||
small_icon?: string,
|
||||
large_icon?: string,
|
||||
big_picture?: string,
|
||||
adm_small_icon?: string,
|
||||
adm_large_icon?: string,
|
||||
adm_big_picture?: string,
|
||||
chrome_icon?: string,
|
||||
chrome_big_picture?: string,
|
||||
chrome_web_icon?: string,
|
||||
firefox_icon?: string,
|
||||
url?: string,
|
||||
send_after?: string,
|
||||
delayed_option?: string,
|
||||
delivery_time_of_day?: string,
|
||||
android_led_color?: string,
|
||||
android_accent_color?: string,
|
||||
android_visibility?: number,
|
||||
content_available?: boolean,
|
||||
amazon_background_data?: boolean,
|
||||
template_id?: string,
|
||||
android_group?: string,
|
||||
android_group_message?: any,
|
||||
adm_group?: string,
|
||||
adm_group_message?: any,
|
||||
ttl?: number,
|
||||
priority?: number,
|
||||
ios_category?: string
|
||||
}): Promise<any> { return; }
|
||||
static postNotification(notificationObj: OneSignalNotification): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Prompts the user for location permission to allow geotagging based on the "Location radius" filter on the OneSignal dashboard.
|
||||
@@ -237,6 +203,13 @@ export class OneSignal {
|
||||
@Cordova({ sync: true })
|
||||
static promptLocation(): void { }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param email {string}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
static syncHashedEmail(email: string): void { }
|
||||
|
||||
/**
|
||||
* Enable logging to help debug if you run into an issue setting up OneSignal.
|
||||
* The logging levels are as follows: 0 = None, 1= Fatal, 2 = Errors, 3 = Warnings, 4 = Info, 5 = Debug, 6 = Verbose
|
||||
@@ -252,3 +225,66 @@ export class OneSignal {
|
||||
}): void { }
|
||||
|
||||
}
|
||||
|
||||
export interface OneSignalNotification {
|
||||
app_id: string;
|
||||
contents: any;
|
||||
headings?: any;
|
||||
isIos?: boolean;
|
||||
isAndroid?: boolean;
|
||||
isWP?: boolean;
|
||||
isWP_WNS?: boolean;
|
||||
isAdm?: boolean;
|
||||
isChrome?: boolean;
|
||||
isChromeWeb?: boolean;
|
||||
isSafari?: boolean;
|
||||
isAnyWeb?: boolean;
|
||||
included_segments?: string[];
|
||||
excluded_segments?: string[];
|
||||
include_player_ids?: string[];
|
||||
include_ios_tokens?: string[];
|
||||
include_android_reg_ids?: string[];
|
||||
include_wp_uris?: string[];
|
||||
include_wp_wns_uris?: string[];
|
||||
include_amazon_reg_ids?: string[];
|
||||
include_chrome_reg_ids?: string[];
|
||||
include_chrome_web_reg_ids?: string[];
|
||||
app_ids?: string[];
|
||||
tags?: any[];
|
||||
ios_badgeType?: string;
|
||||
ios_badgeCount?: number;
|
||||
ios_sound?: string;
|
||||
android_sound?: string;
|
||||
adm_sound?: string;
|
||||
wp_sound?: string;
|
||||
wp_wns_sound?: string;
|
||||
data?: any;
|
||||
buttons?: any;
|
||||
small_icon?: string;
|
||||
large_icon?: string;
|
||||
big_picture?: string;
|
||||
adm_small_icon?: string;
|
||||
adm_large_icon?: string;
|
||||
adm_big_picture?: string;
|
||||
chrome_icon?: string;
|
||||
chrome_big_picture?: string;
|
||||
chrome_web_icon?: string;
|
||||
firefox_icon?: string;
|
||||
url?: string;
|
||||
send_after?: string;
|
||||
delayed_option?: string;
|
||||
delivery_time_of_day?: string;
|
||||
android_led_color?: string;
|
||||
android_accent_color?: string;
|
||||
android_visibility?: number;
|
||||
content_available?: boolean;
|
||||
amazon_background_data?: boolean;
|
||||
template_id?: string;
|
||||
android_group?: string;
|
||||
android_group_message?: any;
|
||||
adm_group?: string;
|
||||
adm_group_message?: any;
|
||||
ttl?: number;
|
||||
priority?: number;
|
||||
ios_category?: string;
|
||||
}
|
||||
|
||||
@@ -6,47 +6,91 @@ import { Plugin, Cordova } from './plugin';
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import {PayPal} from 'ionic-native';
|
||||
* import {PayPal, PayPalPayment, PayPalConfiguration} from "ionic-native";
|
||||
*
|
||||
* PayPal.init({
|
||||
* "PayPalEnvironmentProduction": "YOUR_PRODUCTION_CLIENT_ID",
|
||||
"PayPalEnvironmentSandbox": "YOUR_SANDBOX_CLIENT_ID"
|
||||
})
|
||||
* .then(onSuccess)
|
||||
* .catch(onError);
|
||||
* "PayPalEnvironmentProduction": "YOUR_PRODUCTION_CLIENT_ID",
|
||||
* "PayPalEnvironmentSandbox": "YOUR_SANDBOX_CLIENT_ID"
|
||||
* }).then(() => {
|
||||
* // Environments: PayPalEnvironmentNoNetwork, PayPalEnvironmentSandbox, PayPalEnvironmentProduction
|
||||
* PayPal.prepareToRender('PayPalEnvironmentSandbox', new PayPalConfiguration({
|
||||
* // Only needed if you get an "Internal Service Error" after PayPal login!
|
||||
* //payPalShippingAddressOption: 2 // PayPalShippingAddressOptionPayPal
|
||||
* })).then(() => {
|
||||
* let payment = new PayPalPayment('3.33', 'USD', 'Description', 'sale');
|
||||
* PayPal.renderSinglePaymentUI(payment).then(() => {
|
||||
* // Successfully paid
|
||||
*
|
||||
* // Example sandbox response
|
||||
* //
|
||||
* // {
|
||||
* // "client": {
|
||||
* // "environment": "sandbox",
|
||||
* // "product_name": "PayPal iOS SDK",
|
||||
* // "paypal_sdk_version": "2.16.0",
|
||||
* // "platform": "iOS"
|
||||
* // },
|
||||
* // "response_type": "payment",
|
||||
* // "response": {
|
||||
* // "id": "PAY-1AB23456CD789012EF34GHIJ",
|
||||
* // "state": "approved",
|
||||
* // "create_time": "2016-10-03T13:33:33Z",
|
||||
* // "intent": "sale"
|
||||
* // }
|
||||
* // }
|
||||
* }, () => {
|
||||
* // Error or render dialog closed without being successful
|
||||
* });
|
||||
* }, () => {
|
||||
* // Error in configuration
|
||||
* });
|
||||
* }, () => {
|
||||
* // Error in initialization, maybe PayPal isn't supported or something else
|
||||
* });
|
||||
* ```
|
||||
* @interfaces
|
||||
* PayPalEnvironment
|
||||
* PayPalConfigurationOptions
|
||||
* @classes
|
||||
* PayPalPayment
|
||||
* PayPalItem
|
||||
* PayPalPaymentDetails
|
||||
* PayPalConfigurationOptions
|
||||
* PayPalShippingAddress
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'PayPal',
|
||||
plugin: 'com.paypal.cordova.mobilesdk',
|
||||
pluginRef: 'PayPalMobile',
|
||||
repo: 'https://github.com/paypal/PayPal-Cordova-Plugin'
|
||||
})
|
||||
export class PayPal {
|
||||
/**
|
||||
* Retrieve the version of the PayPal iOS SDK library. Useful when contacting support.
|
||||
*/
|
||||
@Cordova()
|
||||
static version(): Promise<string> {return; }
|
||||
|
||||
/**
|
||||
* You must preconnect to PayPal to prepare the device for processing payments.
|
||||
* This improves the user experience, by making the presentation of the
|
||||
* UI faster. The preconnect is valid for a limited time, so
|
||||
* the recommended time to preconnect is on page load.
|
||||
*
|
||||
* @param {String} environment available options are "PayPalEnvironmentNoNetwork", "PayPalEnvironmentProduction" and "PayPalEnvironmentSandbox"
|
||||
* @param {PayPalConfiguration} configuration For Future Payments merchantName, merchantPrivacyPolicyURL and merchantUserAgreementURL must be set be set
|
||||
* @param {PayPalEnvironment} clientIdsForEnvironments: set of client ids for environments
|
||||
*/
|
||||
@Cordova()
|
||||
static init(environment: PayPalEnvironment, configuration?: PayPalConfiguration): Promise<any> {return; }
|
||||
static init(clientIdsForEnvironments: PayPalEnvironment): Promise<any> {return; }
|
||||
|
||||
/**
|
||||
* Retreive the version of PayPal iOS SDK Library.
|
||||
*/
|
||||
* You must preconnect to PayPal to prepare the device for processing payments.
|
||||
* This improves the user experience, by making the presentation of the UI faster.
|
||||
* The preconnect is valid for a limited time, so the recommended time to preconnect is on page load.
|
||||
*
|
||||
* @param {String} environment: available options are "PayPalEnvironmentNoNetwork", "PayPalEnvironmentProduction" and "PayPalEnvironmentSandbox"
|
||||
* @param {PayPalConfiguration} configuration: PayPalConfiguration object, for Future Payments merchantName, merchantPrivacyPolicyURL and merchantUserAgreementURL must be set be set
|
||||
**/
|
||||
@Cordova()
|
||||
static version(): Promise<string> {return; }
|
||||
static prepareToRender(environment: string, configuration: PayPalConfiguration): Promise<any> {return; }
|
||||
|
||||
/**
|
||||
* Start PayPal UI to collect payment from the user.
|
||||
@@ -84,28 +128,25 @@ export class PayPal {
|
||||
**/
|
||||
@Cordova()
|
||||
static renderProfileSharingUI(scopes: string[]): Promise<any> {return; }
|
||||
|
||||
}
|
||||
|
||||
export interface PayPalEnvironment {
|
||||
PayPalEnvironmentProduction: string;
|
||||
PayPalEnvironmentSandbox: string;
|
||||
}
|
||||
export declare var PayPalPayment: {
|
||||
/**
|
||||
* Convenience constructor.
|
||||
* Returns a PayPalPayment with the specified amount, currency code, and short description.
|
||||
* @param {String} amount: The amount of the payment.
|
||||
* @param {String} currencyCode: The ISO 4217 currency for the payment.
|
||||
* @param {String} shortDescription: A short description of the payment.
|
||||
* @param {String} intent: "Sale" for an immediate payment.
|
||||
*/
|
||||
new(amount: string, currencyCode: string, shortDescription: string, intent: string): PayPalPayment;
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export interface PayPalPayment {
|
||||
export class PayPalPayment {
|
||||
constructor(amount: string, currency: string, shortDescription: string, intent: string, details?: PayPalPaymentDetails) {
|
||||
this.amount = amount;
|
||||
this.currency = currency;
|
||||
this.shortDescription = shortDescription;
|
||||
this.intent = intent;
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
/**
|
||||
* The amount of the payment.
|
||||
*/
|
||||
@@ -113,7 +154,7 @@ export interface PayPalPayment {
|
||||
/**
|
||||
* The ISO 4217 currency for the payment.
|
||||
*/
|
||||
currencyCode: string;
|
||||
currency: string;
|
||||
/**
|
||||
* A short description of the payment.
|
||||
*/
|
||||
@@ -126,7 +167,7 @@ export interface PayPalPayment {
|
||||
* Optional Build Notation code ("BN code"), obtained from partnerprogram@paypal.com,
|
||||
* for your tracking purposes.
|
||||
*/
|
||||
bnCode: string;
|
||||
bnCode: string = 'PhoneGap_SP';
|
||||
/**
|
||||
* Optional invoice number, for your tracking purposes. (up to 256 characters)
|
||||
*/
|
||||
@@ -151,9 +192,34 @@ export interface PayPalPayment {
|
||||
* Optional customer shipping address, if your app wishes to provide this to the SDK.
|
||||
*/
|
||||
shippingAddress: string;
|
||||
|
||||
/**
|
||||
* Optional PayPalPaymentDetails object
|
||||
*/
|
||||
details: PayPalPaymentDetails;
|
||||
}
|
||||
|
||||
export interface PayPalItem {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class PayPalItem {
|
||||
/**
|
||||
* The PayPalItem class defines an optional itemization for a payment.
|
||||
* @see https://developer.paypal.com/docs/api/#item-object for more details.
|
||||
* @param {String} name: Name of the item. 127 characters max
|
||||
* @param {Number} quantity: Number of units. 10 characters max.
|
||||
* @param {String} price: Unit price for this item 10 characters max.
|
||||
* May be negative for "coupon" etc
|
||||
* @param {String} currency: ISO standard currency code.
|
||||
* @param {String} sku: The stock keeping unit for this item. 50 characters max (optional)
|
||||
*/
|
||||
constructor(name: string, quantity: number, price: string, currency: string, sku: string) {
|
||||
this.name = name;
|
||||
this.quantity = quantity;
|
||||
this.price = price;
|
||||
this.currency = currency;
|
||||
this.sku = sku;
|
||||
}
|
||||
/**
|
||||
* Name of the item. 127 characters max
|
||||
*/
|
||||
@@ -176,21 +242,21 @@ export interface PayPalItem {
|
||||
sku: string;
|
||||
}
|
||||
|
||||
export declare var PayPalItem: {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class PayPalPaymentDetails {
|
||||
/**
|
||||
* The PayPalItem class defines an optional itemization for a payment.
|
||||
* @see https://developer.paypal.com/docs/api/#item-object for more details.
|
||||
* @param {String} name: Name of the item. 127 characters max
|
||||
* @param {Number} quantity: Number of units. 10 characters max.
|
||||
* @param {String} price: Unit price for this item 10 characters max.
|
||||
* May be negative for "coupon" etc
|
||||
* @param {String} currency: ISO standard currency code.
|
||||
* @param {String} sku: The stock keeping unit for this item. 50 characters max (optional)
|
||||
* The PayPalPaymentDetails class defines optional amount details.
|
||||
* @param {String} subtotal: Sub-total (amount) of items being paid for. 10 characters max with support for 2 decimal places.
|
||||
* @param {String} shipping: Amount charged for shipping. 10 characters max with support for 2 decimal places.
|
||||
* @param {String} tax: Amount charged for tax. 10 characters max with support for 2 decimal places.
|
||||
*/
|
||||
new(name: string, quantity: number, price: string, currency: string, sku: string): PayPalItem;
|
||||
};
|
||||
|
||||
export interface PayPalPaymentDetails {
|
||||
constructor(subtotal: string, shipping: string, tax: string) {
|
||||
this.subtotal = subtotal;
|
||||
this.shipping = shipping;
|
||||
this.tax = tax;
|
||||
}
|
||||
/**
|
||||
* Sub-total (amount) of items being paid for. 10 characters max with support for 2 decimal places.
|
||||
*/
|
||||
@@ -205,16 +271,6 @@ export interface PayPalPaymentDetails {
|
||||
tax: string;
|
||||
}
|
||||
|
||||
export declare var PayPalPaymentDetails: {
|
||||
/**
|
||||
* The PayPalPaymentDetails class defines optional amount details.
|
||||
* @param {String} subtotal: Sub-total (amount) of items being paid for. 10 characters max with support for 2 decimal places.
|
||||
* @param {String} shipping: Amount charged for shipping. 10 characters max with support for 2 decimal places.
|
||||
* @param {String} tax: Amount charged for tax. 10 characters max with support for 2 decimal places.
|
||||
*/
|
||||
new(subtotal: string, shipping: string, tax: string): PayPalPaymentDetails;
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
@@ -238,11 +294,11 @@ export interface PayPalConfigurationOptions {
|
||||
/**
|
||||
* URL of your company's privacy policy, which will be offered to the user when requesting consent via a PayPalFuturePaymentViewController.
|
||||
*/
|
||||
merchantPrivacyPolicyUrl?: string;
|
||||
merchantPrivacyPolicyURL?: string;
|
||||
/**
|
||||
* URL of your company's user agreement, which will be offered to the user when requesting consent via a PayPalFuturePaymentViewController.
|
||||
*/
|
||||
merchantUserAgreementUrl?: string;
|
||||
merchantUserAgreementURL?: string;
|
||||
/**
|
||||
* If set to NO, the SDK will only support paying with PayPal, not with credit cards.
|
||||
* This applies only to single payments (via PayPalPaymentViewController).
|
||||
@@ -316,35 +372,47 @@ export interface PayPalConfigurationOptions {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare var PayPalConfiguration: {
|
||||
export class PayPalConfiguration implements PayPalConfigurationOptions {
|
||||
/**
|
||||
* You use a PayPalConfiguration object to configure many aspects of how the SDK behaves.
|
||||
* see defaults for options available
|
||||
*/
|
||||
new(options: PayPalConfigurationOptions): PayPalConfiguration;
|
||||
};
|
||||
constructor(options?: PayPalConfigurationOptions) {
|
||||
|
||||
export interface PayPalConfiguration {
|
||||
defaultUserEmail: string;
|
||||
defaultUserPhoneCountryCode: string;
|
||||
defaultUserPhoneNumber: string;
|
||||
merchantName: string;
|
||||
merchantPrivacyPolicyUrl: string;
|
||||
merchantUserAgreementUrl: string;
|
||||
acceptCreditCards: boolean;
|
||||
payPalShippingAddressOption: number;
|
||||
rememberUser: boolean;
|
||||
languageOrLocale: string;
|
||||
disableBlurWhenBackgrounding: boolean;
|
||||
presentingInPopover: boolean;
|
||||
forceDefaultsInSandbox: boolean;
|
||||
sandboxUserPassword: string;
|
||||
sandboxUserPin: string;
|
||||
let defaults: PayPalConfigurationOptions = {
|
||||
defaultUserEmail: null,
|
||||
defaultUserPhoneCountryCode: null,
|
||||
defaultUserPhoneNumber: null,
|
||||
merchantName: null,
|
||||
merchantPrivacyPolicyURL: null,
|
||||
merchantUserAgreementURL: null,
|
||||
acceptCreditCards: true,
|
||||
payPalShippingAddressOption: 0,
|
||||
rememberUser: true,
|
||||
languageOrLocale: null,
|
||||
disableBlurWhenBackgrounding: false,
|
||||
presentingInPopover: false,
|
||||
forceDefaultsInSandbox: false,
|
||||
sandboxUserPassword: null,
|
||||
sandboxUserPin: null
|
||||
};
|
||||
|
||||
if (options && typeof options === 'object') {
|
||||
for (var i in options) {
|
||||
if (defaults.hasOwnProperty(i)) {
|
||||
defaults[i] = options[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return defaults;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare var PayPalShippingAddress: {
|
||||
export class PayPalShippingAddress {
|
||||
/**
|
||||
* See the documentation of the individual properties for more detail.
|
||||
* @param {String} recipientName: Name of the recipient at this address. 50 characters max.
|
||||
@@ -355,10 +423,15 @@ export declare var PayPalShippingAddress: {
|
||||
* @param {String} postalCode: ZIP code or equivalent is usually required for countries that have them. 20 characters max. Required in certain countries.
|
||||
* @param {String} countryCode: 2-letter country code. 2 characters max.
|
||||
*/
|
||||
new(recipientName: string, line1: string, line2: string, city: string, state: string, postalCode: string, countryCode: string): PayPalShippingAddress;
|
||||
};
|
||||
|
||||
export interface PayPalShippingAddress {
|
||||
constructor(recipientName: string, line1: string, line2: string, city: string, state: string, postalCode: string, countryCode: string) {
|
||||
this.recipientName = recipientName;
|
||||
this.line1 = line1;
|
||||
this.line2 = line2;
|
||||
this.city = city;
|
||||
this.state = state;
|
||||
this.postalCode = postalCode;
|
||||
this.countryCode = countryCode;
|
||||
}
|
||||
/**
|
||||
* Name of the recipient at this address. 50 characters max.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'PhotoViewer',
|
||||
plugin: 'com-sarriaroman-photoviewer',
|
||||
pluginRef: 'PhotoViewer',
|
||||
repo: 'https://github.com/sarriaroman/photoviewer'
|
||||
|
||||
@@ -20,6 +20,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'PinDialog',
|
||||
plugin: 'cordova-plugin-pin-dialog',
|
||||
pluginRef: 'plugins.pinDialog',
|
||||
repo: 'https://github.com/Paldom/PinDialog'
|
||||
|
||||
@@ -41,6 +41,11 @@ export const cordovaWarn = function(pluginName: string, method: string) {
|
||||
}
|
||||
};
|
||||
function setIndex(args: any[], opts: any = {}, resolve?: Function, reject?: Function): any {
|
||||
// ignore resolve and reject in case sync
|
||||
if (opts.sync) {
|
||||
return args;
|
||||
}
|
||||
|
||||
// If the plugin method expects myMethod(success, err, options)
|
||||
if (opts.callbackOrder === 'reverse') {
|
||||
// Get those arguments in the order [resolve, reject, ...restOfArgs]
|
||||
@@ -60,15 +65,33 @@ function setIndex(args: any[], opts: any = {}, resolve?: Function, reject?: Func
|
||||
obj[opts.errorName] = reject;
|
||||
args.push(obj);
|
||||
} else if (typeof opts.successIndex !== 'undefined' || typeof opts.errorIndex !== 'undefined') {
|
||||
// If we've specified a success/error index
|
||||
args.splice(opts.successIndex, 0, resolve);
|
||||
const setSuccessIndex = () => {
|
||||
// If we've specified a success/error index
|
||||
if (opts.successIndex > args.length) {
|
||||
args[opts.successIndex] = resolve;
|
||||
} else {
|
||||
args.splice(opts.successIndex, 0, resolve);
|
||||
}
|
||||
};
|
||||
|
||||
// We don't want that the reject cb gets spliced into the position of an optional argument that has not been defined and thus causing non expected behaviour.
|
||||
if (opts.errorIndex > args.length) {
|
||||
args[opts.errorIndex] = reject; // insert the reject fn at the correct specific index
|
||||
const setErrorIndex = () => {
|
||||
// We don't want that the reject cb gets spliced into the position of an optional argument that has not been defined and thus causing non expected behaviour.
|
||||
if (opts.errorIndex > args.length) {
|
||||
args[opts.errorIndex] = reject; // insert the reject fn at the correct specific index
|
||||
} else {
|
||||
args.splice(opts.errorIndex, 0, reject); // otherwise just splice it into the array
|
||||
}
|
||||
};
|
||||
|
||||
if (opts.successIndex > opts.errorIndex) {
|
||||
setErrorIndex();
|
||||
setSuccessIndex();
|
||||
} else {
|
||||
args.splice(opts.errorIndex, 0, reject); // otherwise just splice it into the array
|
||||
setSuccessIndex();
|
||||
setErrorIndex();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
// Otherwise, let's tack them on to the end of the argument list
|
||||
// which is 90% of cases
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'PowerManagement',
|
||||
plugin: 'cordova-plugin-powermanagement-orig',
|
||||
pluginRef: 'powerManagement',
|
||||
repo: 'https://github.com/Viras-/cordova-plugin-powermanagement'
|
||||
|
||||
@@ -61,6 +61,7 @@ export interface PrintOptions {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Printer',
|
||||
plugin: 'de.appplant.cordova.plugin.printer',
|
||||
pluginRef: 'cordova.plugins.printer',
|
||||
repo: 'https://github.com/katzer/cordova-plugin-printer.git',
|
||||
|
||||
@@ -286,6 +286,7 @@ declare var PushNotification: {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Push',
|
||||
plugin: 'phonegap-plugin-push',
|
||||
pluginRef: 'PushNotification',
|
||||
repo: 'https://github.com/phonegap/phonegap-plugin-push'
|
||||
|
||||
@@ -39,6 +39,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'SafariViewController',
|
||||
plugin: 'cordova-plugin-safariviewcontroller',
|
||||
pluginRef: 'SafariViewController',
|
||||
platforms: ['iOS', 'Android'],
|
||||
|
||||
@@ -23,9 +23,9 @@ declare var window;
|
||||
* ```
|
||||
*
|
||||
* @advanced
|
||||
*
|
||||
*
|
||||
* Accepted orientation values:
|
||||
*
|
||||
*
|
||||
* | Value | Description |
|
||||
* |-------------------------------|------------------------------------------------------------------------------|
|
||||
* | portrait-primary | The orientation is in the primary portrait mode. |
|
||||
@@ -34,9 +34,10 @@ declare var window;
|
||||
* | landscape-secondary | The orientation is in the secondary landscape mode. |
|
||||
* | portrait | The orientation is either portrait-primary or portrait-secondary (sensor). |
|
||||
* | landscape | The orientation is either landscape-primary or landscape-secondary (sensor). |
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'ScreenOrientation',
|
||||
plugin: 'cordova-plugin-screen-orientation',
|
||||
pluginRef: 'window.screen',
|
||||
repo: 'https://github.com/apache/cordova-plugin-screen-orientation',
|
||||
|
||||
@@ -17,6 +17,7 @@ declare var navigator: any;
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Screenshot',
|
||||
plugin: 'https://github.com/gitawego/cordova-screenshot.git',
|
||||
pluginRef: 'navigator.screenshot',
|
||||
repo: 'https://github.com/gitawego/cordova-screenshot.git'
|
||||
|
||||
@@ -40,6 +40,7 @@ declare var cordova: any;
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'SecureStorage',
|
||||
plugin: 'cordova-plugin-secure-storage',
|
||||
pluginRef: 'plugins.securestorage',
|
||||
repo: 'https://github.com/Crypho/cordova-plugin-secure-storage',
|
||||
|
||||
@@ -15,6 +15,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Shake',
|
||||
plugin: 'cordova-plugin-shake',
|
||||
pluginRef: 'shake',
|
||||
repo: 'https://github.com/leecrossley/cordova-plugin-shake'
|
||||
|
||||
@@ -20,6 +20,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Sim',
|
||||
plugin: 'cordova-plugin-sim',
|
||||
pluginRef: 'plugins.sim',
|
||||
repo: 'https://github.com/pbakondy/cordova-plugin-sim',
|
||||
|
||||
@@ -40,6 +40,7 @@ export interface SmsOptionsAndroid {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'SMS',
|
||||
plugin: 'cordova-sms-plugin',
|
||||
pluginRef: 'sms',
|
||||
repo: 'https://github.com/cordova-sms/cordova-sms-plugin',
|
||||
@@ -59,6 +60,15 @@ export class SMS {
|
||||
phoneNumber: string | string[],
|
||||
message: string,
|
||||
options?: SmsOptions
|
||||
): Promise<any> { return; }
|
||||
): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* This function lets you know if the app has permission to send SMS
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if we have permission
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static hasPermission(): Promise<boolean> { return; }
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'SocialSharing',
|
||||
plugin: 'cordova-plugin-x-socialsharing',
|
||||
pluginRef: 'plugins.socialsharing',
|
||||
repo: 'https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin',
|
||||
|
||||
@@ -15,6 +15,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'SpinnerDialog',
|
||||
plugin: 'cordova-plugin-spinner-dialog',
|
||||
pluginRef: 'window.plugins.spinnerDialog',
|
||||
repo: 'https://github.com/Paldom/SpinnerDialog',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user