fix(document-viewer): fix params

This commit is contained in:
Ibby Hadeed 2017-05-09 18:18:35 -04:00
parent 6855fe8f7d
commit 1379f6389a

View File

@ -27,7 +27,7 @@ export interface DocumentViewerOptions {
autoClose: { autoClose: {
onPause: boolean; onPause: boolean;
}; };
}; }
/** /**
* @name Document Viewer * @name Document Viewer
@ -56,7 +56,7 @@ export interface DocumentViewerOptions {
pluginName: 'Document Viewer', pluginName: 'Document Viewer',
plugin: 'cordova-plugin-document-viewer', plugin: 'cordova-plugin-document-viewer',
pluginRef: 'SitewaertsDocumentViewer', pluginRef: 'SitewaertsDocumentViewer',
repo: 'DocumentViewer', repo: 'https://github.com/sitewaerts/cordova-plugin-document-viewer',
platforms: ['Android', 'iOS', 'Windows'] platforms: ['Android', 'iOS', 'Windows']
}) })
@Injectable() @Injectable()
@ -76,9 +76,13 @@ export class DocumentViewer extends IonicNativePlugin {
* @param url {string} Url to the file * @param url {string} Url to the file
* @param contentType {string} Content type of the file * @param contentType {string} Content type of the file
* @param options {Array<DocumentViewerOptions>} options * @param options {Array<DocumentViewerOptions>} options
* @param [onPossible] {Function}
* @param [onMissingApp] {Function}
* @param [onImpossible] {Function}
* @param [onError] {Function}
*/ */
@Cordova({ sync: true }) @Cordova({ sync: true })
canViewDocument(url: string, contentType: string, options: Array<DocumentViewerOptions>): void { } canViewDocument(url: string, contentType: string, options: Array<DocumentViewerOptions>, onPossible?: Function, onMissingApp?: Function, onImpossible?: Function, onError?: Function): void { }
/** /**
* Opens the file * Opens the file
@ -86,8 +90,12 @@ export class DocumentViewer extends IonicNativePlugin {
* @param url {string} Url to the file * @param url {string} Url to the file
* @param contentType {string} Content type of the file * @param contentType {string} Content type of the file
* @param options {Array<DocumentViewerOptions>} options * @param options {Array<DocumentViewerOptions>} options
* @param [onShow] {Function}
* @param [onClose] {Function}
* @param [onMissingApp] {Function}
* @param [onError] {Function}
*/ */
@Cordova({ sync: true }) @Cordova({ sync: true })
viewDocument(url: string, contentType: string, options: Array<DocumentViewerOptions>): void { } viewDocument(url: string, contentType: string, options: Array<DocumentViewerOptions>, onShow?: Function, onClose?: Function, onMissingApp?: Function, onError?: Function): void { }
} }