Merge remote-tracking branch 'origin/master' into v5

This commit is contained in:
Daniel 2018-04-13 12:34:16 +02:00
commit f414e0e081
4 changed files with 48 additions and 39 deletions

View File

@ -153,11 +153,11 @@ export class Calendar extends IonicNativePlugin {
/** /**
* Create a calendar. (iOS only) * Create a calendar. (iOS only)
* *
* @param {string | CalendarOptions} nameOrOptions either a string name or a options object. If string, provide the calendar name. IF an object, provide a calendar name as a string and a calendar color in hex format as a string * @param {string | NameOrOptions} nameOrOptions either a string name or a options object. If string, provide the calendar name. IF an object, provide a calendar name as a string and a calendar color in hex format as a string
* @returns {Promise<any>} Returns a Promise * @returns {Promise<any>} Returns a Promise
*/ */
@Cordova() @Cordova()
createCalendar(nameOrOptions: string | CalendarOptions): Promise<any> { createCalendar(nameOrOptions: string | NameOrOptions): Promise<any> {
return; return;
} }

View File

@ -1,6 +1,13 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface IOSFilePickerPosition {
x: number;
y: number;
width: number;
height: number;
};
/** /**
* @name iOS File Picker * @name iOS File Picker
* @description * @description
@ -20,6 +27,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
* .catch(err => console.log('Error', err)); * .catch(err => console.log('Error', err));
* *
* ``` * ```
* @interfaces
* IOSFilePickerPosition
*/ */
@Plugin({ @Plugin({
pluginName: 'iOS File Picker', pluginName: 'iOS File Picker',
@ -32,10 +41,17 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export class IOSFilePicker extends IonicNativePlugin { export class IOSFilePicker extends IonicNativePlugin {
/** /**
* Open a file * Open a file
* @params {string | string[]} [utis]
* @params {IOSFilePickerPosition} [position] Set the position of the rectangle where the file picker should show up.
* @returns {Promise<string>} * @returns {Promise<string>}
*/ */
@Cordova() @Cordova({
pickFile(): Promise<string> { callbackOrder: 'reverse'
})
pickFile(
utis?: string | string[],
position?: IOSFilePickerPosition
): Promise<string> {
return; return;
} }
} }

View File

@ -505,9 +505,7 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the monitoring request. * native layer acknowledged the dispatch of the monitoring request.
*/ */
@Cordova({ otherPromise: true }) @Cordova({ otherPromise: true })
startMonitoringForRegion(region: BeaconRegion): Promise<string> { startMonitoringForRegion(region: Region): Promise<string> { return; }
return;
}
/** /**
* Stop monitoring the specified region. It is valid to call * Stop monitoring the specified region. It is valid to call
@ -524,9 +522,7 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop monitoring. * native layer acknowledged the dispatch of the request to stop monitoring.
*/ */
@Cordova({ otherPromise: true }) @Cordova({ otherPromise: true })
stopMonitoringForRegion(region: BeaconRegion): Promise<void> { stopMonitoringForRegion(region: Region): Promise<void> { return; }
return;
}
/** /**
* Request state the for specified region. When result is ready * Request state the for specified region. When result is ready
@ -561,9 +557,7 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the monitoring request. * native layer acknowledged the dispatch of the monitoring request.
*/ */
@Cordova({ otherPromise: true }) @Cordova({ otherPromise: true })
startRangingBeaconsInRegion(region: BeaconRegion): Promise<void> { startRangingBeaconsInRegion(region: Region): Promise<void> { return; }
return;
}
/** /**
* Stop ranging the specified region. It is valid to call * Stop ranging the specified region. It is valid to call
@ -580,9 +574,7 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop monitoring. * native layer acknowledged the dispatch of the request to stop monitoring.
*/ */
@Cordova({ otherPromise: true }) @Cordova({ otherPromise: true })
stopRangingBeaconsInRegion(region: BeaconRegion): Promise<void> { stopRangingBeaconsInRegion(region: Region): Promise<void> { return; }
return;
}
/** /**
* Queries the native layer to determine the current authorization in effect. * Queries the native layer to determine the current authorization in effect.

View File

@ -7,6 +7,20 @@ import {
} from '@ionic-native/core'; } from '@ionic-native/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
export interface IntentOptions {
requestCode?: number;
type?: string;
package?: string;
url?: string;
extras?: object;
action?: string;
component?: {
package: string;
class: string;
};
flags?: number[];
};
/** /**
* @name Web Intent * @name Web Intent
* @description * @description
@ -30,6 +44,8 @@ import { Observable } from 'rxjs';
* this.webIntent.startActivity(options).then(onSuccess, onError); * this.webIntent.startActivity(options).then(onSuccess, onError);
* *
* ``` * ```
* @interfaces
* IntentOptions
*/ */
@Plugin({ @Plugin({
pluginName: 'WebIntent', pluginName: 'WebIntent',
@ -103,30 +119,21 @@ export class WebIntent extends IonicNativePlugin {
/** /**
* Launches an Android intent * Launches an Android intent
* @param options {Object} { action: any, url: string, type?: string } * @param options {IntentOptions}
* @returns {Promise<any>} * @returns {Promise<any>}
*/ */
@Cordova() @Cordova()
startActivity(options: { startActivity(options: IntentOptions): Promise<any> {
action: any;
extras?: any;
url: string;
type?: string;
}): Promise<any> {
return; return;
} }
/** /**
* Starts a new activity and return the result to the application * Starts a new activity and return the result to the application
* @param options {Object} { action: any, url: string, type?: string } * @param options {IntentOptions}
* @returns {Promise<any>} * @returns {Promise<any>}
*/ */
@Cordova() @Cordova()
startActivityForResult(options: { startActivityForResult(options: IntentOptions): Promise<any> {
action: any;
url: string;
type?: string;
}): Promise<any> {
return; return;
} }
@ -172,27 +179,21 @@ export class WebIntent extends IonicNativePlugin {
/** /**
* Sends a custom intent passing optional extras * Sends a custom intent passing optional extras
* @param options {Object} { action: string, extras?: { option: boolean } } * @param options {IntentOptions}
* @returns {Promise<any>} * @returns {Promise<any>}
*/ */
@Cordova() @Cordova()
sendBroadcast(options: { sendBroadcast(options: IntentOptions): Promise<any> {
action: string;
extras?: { option: boolean };
}): Promise<any> {
return; return;
} }
/** /**
* Request that a given application service be started * Request that a given application service be started
* @param options {Object} { action: string, extras?: { option: boolean } } * @param options {IntentOptions}
* @returns {Promise<any>} * @returns {Promise<any>}
*/ */
@Cordova() @Cordova()
startService(options: { startService(options: IntentOptions): Promise<any> {
action: string;
extras?: { option: boolean };
}): Promise<any> {
return; return;
} }