From 439960092e8f9a86bf0dc760ae6727a0b24ca466 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 6 Apr 2018 22:38:59 +0200 Subject: [PATCH] fix(email-composer): add missing options #175 --- .../plugins/email-composer/index.ts | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/@ionic-native/plugins/email-composer/index.ts b/src/@ionic-native/plugins/email-composer/index.ts index ad148fd1..4f8c28c4 100644 --- a/src/@ionic-native/plugins/email-composer/index.ts +++ b/src/@ionic-native/plugins/email-composer/index.ts @@ -1,8 +1,12 @@ import { Injectable } from '@angular/core'; -import { Cordova, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core'; +import { + Cordova, + CordovaCheck, + IonicNativePlugin, + Plugin +} from '@ionic-native/core'; export interface EmailComposerOptions { - /** * App to send the email with */ @@ -43,9 +47,12 @@ export interface EmailComposerOptions { */ isHtml?: boolean; + /** + * Content type of the email (Android only) + */ + type?: string; } - /** * @name Email Composer * @description @@ -106,11 +113,10 @@ export interface EmailComposerOptions { plugin: 'cordova-plugin-email-composer', pluginRef: 'cordova.plugins.email', repo: 'https://github.com/katzer/cordova-plugin-email-composer', - platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows'] + platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows', 'macOS'] }) @Injectable() export class EmailComposer extends IonicNativePlugin { - /** * Verifies if sending emails is supported on the device. * @@ -148,7 +154,9 @@ export class EmailComposer extends IonicNativePlugin { successIndex: 0, errorIndex: 2 }) - requestPermission(): Promise { return; } + requestPermission(): Promise { + return; + } /** * Checks if the app has a permission to access email accounts information @@ -158,7 +166,9 @@ export class EmailComposer extends IonicNativePlugin { successIndex: 0, errorIndex: 2 }) - hasPermission(): Promise { return; } + hasPermission(): Promise { + return; + } /** * Adds a new mail app alias. @@ -167,7 +177,7 @@ export class EmailComposer extends IonicNativePlugin { * @param packageName {string} The package name */ @Cordova() - addAlias(alias: string, packageName: string): void { } + addAlias(alias: string, packageName: string): void {} /** * Displays the email composer pre-filled with data. @@ -180,6 +190,7 @@ export class EmailComposer extends IonicNativePlugin { successIndex: 1, errorIndex: 3 }) - open(options: EmailComposerOptions, scope?: any): Promise { return; } - + open(options: EmailComposerOptions, scope?: any): Promise { + return; + } }