mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
35 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 |
@@ -22,6 +22,7 @@ module.exports = config => {
|
||||
},
|
||||
|
||||
browserify: {
|
||||
debug: true,
|
||||
plugin: [ 'tsify' ],
|
||||
extensions: ['.js', '.ts']
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "2.2.4",
|
||||
"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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -44,13 +44,14 @@ 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';
|
||||
@@ -153,13 +154,14 @@ 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';
|
||||
@@ -262,6 +264,7 @@ window['IonicNative'] = {
|
||||
File,
|
||||
FileChooser,
|
||||
FileOpener,
|
||||
FilePath,
|
||||
Flashlight,
|
||||
Geofence,
|
||||
Geolocation,
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'CallNumber',
|
||||
plugin: 'call-number',
|
||||
pluginRef: 'plugins.CallNumber',
|
||||
repo: 'https://github.com/Rohfosho/CordovaCallNumberPlugin',
|
||||
|
||||
@@ -69,6 +69,7 @@ export interface CameraPreviewSize {
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'CameraPreview',
|
||||
plugin: 'cordova-plugin-camera-preview',
|
||||
pluginRef: 'cordova.plugins.camerapreview',
|
||||
repo: 'https://github.com/westonganger/cordova-plugin-camera-preview',
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -128,6 +128,7 @@ export interface DatePickerOptions {
|
||||
* DatePickerOptions
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'DatePicker',
|
||||
plugin: 'cordova-plugin-datepicker',
|
||||
pluginRef: 'datePicker',
|
||||
repo: 'https://github.com/VitaliiBlagodir/cordova-plugin-datepicker'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Plugin, Cordova } from './plugin';
|
||||
/**
|
||||
* @name DeviceFeedback
|
||||
* @description
|
||||
@@ -25,6 +25,7 @@ import {Plugin, Cordova} from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'DeviceFeedback',
|
||||
plugin: 'cordova-plugin-velda-devicefeedback',
|
||||
pluginRef: 'plugins.deviceFeedback',
|
||||
repo: 'https://github.com/VVelda/device-feedback',
|
||||
|
||||
@@ -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'
|
||||
@@ -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'
|
||||
|
||||
@@ -337,11 +337,6 @@ declare var FileError: {
|
||||
PATH_EXISTS_ERR: number;
|
||||
};
|
||||
|
||||
let pluginMeta = {
|
||||
plugin: 'cordova-plugin-file',
|
||||
pluginRef: 'cordova.file',
|
||||
repo: 'https://github.com/apache/cordova-plugin-file'
|
||||
};
|
||||
|
||||
/**
|
||||
* @name File
|
||||
@@ -364,7 +359,12 @@ let pluginMeta = {
|
||||
* Although most of the plugin code was written when an earlier spec was current: http://www.w3.org/TR/2011/WD-file-system-api-20110419/
|
||||
* It also implements the FileWriter spec : http://dev.w3.org/2009/dap/file-system/file-writer.html
|
||||
*/
|
||||
@Plugin(pluginMeta)
|
||||
@Plugin({
|
||||
name: 'File',
|
||||
plugin: 'cordova-plugin-file',
|
||||
pluginRef: 'cordova.file',
|
||||
repo: 'https://github.com/apache/cordova-plugin-file'
|
||||
})
|
||||
export class File {
|
||||
static cordovaFileError: {} = {
|
||||
1: 'NOT_FOUND_ERR',
|
||||
@@ -390,7 +390,10 @@ export class File {
|
||||
static getFreeDiskSpace(): Promise<number> {
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
if (!cordova || !cordova.exec) {
|
||||
pluginWarn(pluginMeta);
|
||||
pluginWarn({
|
||||
name: 'File',
|
||||
plugin: 'cordova-plugin-file'
|
||||
});
|
||||
reject({ error: 'plugin_not_installed' });
|
||||
} else {
|
||||
cordova.exec(resolve, reject, 'File', 'getFreeDiskSpace', []);
|
||||
|
||||
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,6 +13,7 @@ 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: 'ga',
|
||||
repo: 'https://github.com/danwilson/google-analytics-plugin',
|
||||
|
||||
@@ -83,13 +83,13 @@ export const GoogleMapsAnimation = {
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
let pluginMap = {
|
||||
@Plugin({
|
||||
name: 'GoogleMap',
|
||||
pluginRef: 'plugin.google.maps.Map',
|
||||
plugin: 'cordova-plugin-googlemaps',
|
||||
repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps',
|
||||
install: 'ionic plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"'
|
||||
};
|
||||
@Plugin(pluginMap)
|
||||
})
|
||||
export class GoogleMap {
|
||||
_objectInstance: any;
|
||||
|
||||
@@ -108,7 +108,10 @@ export class GoogleMap {
|
||||
}
|
||||
this._objectInstance = plugin.google.maps.Map.getMap(element, options);
|
||||
} else {
|
||||
pluginWarn(pluginMap);
|
||||
pluginWarn({
|
||||
name: 'GoogleMap',
|
||||
plugin: 'plugin.google.maps.Map'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -978,7 +981,10 @@ export class Geocoder {
|
||||
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(pluginMap);
|
||||
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',
|
||||
|
||||
@@ -33,6 +33,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* HTTPResponse
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'HTTP',
|
||||
plugin: 'cordova-plugin-http',
|
||||
pluginRef: 'cordovaHTTP',
|
||||
repo: 'https://github.com/wymsee/cordova-HTTP',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -46,6 +46,7 @@ export interface ImagePickerOptions {
|
||||
* ImagePickerOptions
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'ImagePicker',
|
||||
plugin: 'cordova-plugin-image-picker',
|
||||
pluginRef: 'window.imagePicker',
|
||||
repo: 'https://github.com/wymsee/cordova-imagePicker'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,15 +2,6 @@ import { Cordova, Plugin } from './plugin';
|
||||
|
||||
declare var mixpanel: any;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export const pluginMeta = {
|
||||
plugin: 'cordova-plugin-mixpanel',
|
||||
pluginRef: 'mixpanel',
|
||||
repo: 'https://github.com/samzilverberg/cordova-mixpanel-plugin'
|
||||
};
|
||||
|
||||
/**
|
||||
* @name Mixpanel
|
||||
* @description
|
||||
@@ -26,7 +17,12 @@ export const pluginMeta = {
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin(pluginMeta)
|
||||
@Plugin({
|
||||
name: 'Mixpanel',
|
||||
plugin: 'cordova-plugin-mixpanel',
|
||||
pluginRef: 'mixpanel',
|
||||
repo: 'https://github.com/samzilverberg/cordova-mixpanel-plugin'
|
||||
})
|
||||
export class Mixpanel {
|
||||
/**
|
||||
*
|
||||
@@ -112,11 +108,11 @@ export class MixpanelPeople {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
static plugin: string = pluginMeta.plugin;
|
||||
static plugin: string = 'cordova-plugin-mixpanel';
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
static pluginRef: string = pluginMeta.pluginRef + '.people';
|
||||
static pluginRef: string = 'mixpanel.people';
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'OneSignal',
|
||||
plugin: 'onesignal-cordova-plugin',
|
||||
pluginRef: 'plugins.OneSignal',
|
||||
repo: 'https://github.com/OneSignal/OneSignal-Cordova-SDK'
|
||||
|
||||
@@ -58,6 +58,7 @@ import { Plugin, Cordova } from './plugin';
|
||||
* PayPalShippingAddress
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'PayPal',
|
||||
plugin: 'com.paypal.cordova.mobilesdk',
|
||||
pluginRef: 'PayPalMobile',
|
||||
repo: 'https://github.com/paypal/PayPal-Cordova-Plugin'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -65,20 +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
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
if (opts.successIndex > args.length) {
|
||||
args[opts.successIndex] = resolve;
|
||||
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.successIndex, 0, resolve);
|
||||
setSuccessIndex();
|
||||
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
|
||||
}
|
||||
|
||||
} 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',
|
||||
|
||||
@@ -15,6 +15,7 @@ import { Cordova, Plugin } from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Splashscreen',
|
||||
plugin: 'cordova-plugin-splashscreen',
|
||||
pluginRef: 'navigator.splashscreen',
|
||||
repo: 'https://github.com/apache/cordova-plugin-splashscreen'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cordova, CordovaInstance, Plugin } from './plugin';
|
||||
import {Cordova, CordovaInstance, Plugin, pluginWarn} from './plugin';
|
||||
|
||||
|
||||
declare var sqlitePlugin;
|
||||
@@ -31,9 +31,10 @@ declare var sqlitePlugin;
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
pluginRef: 'sqlitePlugin',
|
||||
plugin: 'cordova-sqlite-storage',
|
||||
repo: 'https://github.com/litehelpers/Cordova-sqlite-storage'
|
||||
name: 'SQLite',
|
||||
pluginRef: 'sqlitePlugin',
|
||||
plugin: 'cordova-sqlite-storage',
|
||||
repo: 'https://github.com/litehelpers/Cordova-sqlite-storage'
|
||||
})
|
||||
export class SQLite {
|
||||
|
||||
@@ -72,13 +73,20 @@ export class SQLite {
|
||||
*/
|
||||
openDatabase(config: any): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
sqlitePlugin.openDatabase(config, db => {
|
||||
this._objectInstance = db;
|
||||
resolve(db);
|
||||
}, error => {
|
||||
console.warn(error);
|
||||
reject(error);
|
||||
});
|
||||
if (typeof sqlitePlugin !== 'undefined') {
|
||||
sqlitePlugin.openDatabase(config, db => {
|
||||
this._objectInstance = db;
|
||||
resolve(db);
|
||||
}, error => {
|
||||
console.warn(error);
|
||||
reject(error);
|
||||
});
|
||||
} else {
|
||||
pluginWarn({
|
||||
name: 'SQLite',
|
||||
plugin: 'cordova-sqlite-storage'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ declare var window;
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'StatusBar',
|
||||
plugin: 'cordova-plugin-statusbar',
|
||||
pluginRef: 'StatusBar',
|
||||
repo: 'https://github.com/apache/cordova-plugin-statusbar',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user