@ionic-native/file-opener
Advanced tools
Comparing version 4.4.2 to 5.0.0-alpha.3
@@ -21,3 +21,3 @@ import { IonicNativePlugin } from '@ionic-native/core'; | ||
*/ | ||
export declare class FileOpener extends IonicNativePlugin { | ||
export declare class FileOpenerOriginal extends IonicNativePlugin { | ||
/** | ||
@@ -43,1 +43,3 @@ * Open an file | ||
} | ||
export declare const FileOpener: FileOpenerOriginal; |
111
index.js
@@ -11,103 +11,20 @@ var __extends = (this && this.__extends) || (function () { | ||
})(); | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
import { Injectable } from '@angular/core'; | ||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; | ||
/** | ||
* @name File Opener | ||
* @description | ||
* This plugin will open a file on your device file system with its default application. | ||
* | ||
* @usage | ||
* ```typescript | ||
* import { FileOpener } from '@ionic-native/file-opener'; | ||
* | ||
* constructor(private fileOpener: FileOpener) { } | ||
* | ||
* ... | ||
* | ||
* this.fileOpener.open('path/to/file.pdf', 'application/pdf') | ||
* .then(() => console.log('File is opened')) | ||
* .catch(e => console.log('Error openening file', e)); | ||
* | ||
* ``` | ||
*/ | ||
var FileOpener = (function (_super) { | ||
import { IonicNativePlugin, cordova, injectable } from '@ionic-native/core'; | ||
var FileOpenerOriginal = /** @class */ (function (_super) { | ||
__extends(FileOpener, _super); | ||
function FileOpener() { | ||
function FileOpenerOriginal() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
/** | ||
* Open an file | ||
* @param filePath {string} File Path | ||
* @param fileMIMEType {string} File MIME Type | ||
* @returns {Promise<any>} | ||
*/ | ||
FileOpener.prototype.open = function (filePath, fileMIMEType) { return; }; | ||
/** | ||
* Uninstalls a package | ||
* @param packageId {string} Package ID | ||
* @returns {Promise<any>} | ||
*/ | ||
FileOpener.prototype.uninstall = function (packageId) { return; }; | ||
/** | ||
* Check if an app is already installed | ||
* @param packageId {string} Package ID | ||
* @returns {Promise<any>} | ||
*/ | ||
FileOpener.prototype.appIsInstalled = function (packageId) { return; }; | ||
FileOpener.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
FileOpener.ctorParameters = function () { return []; }; | ||
__decorate([ | ||
Cordova({ | ||
callbackStyle: 'object', | ||
successName: 'success', | ||
errorName: 'error' | ||
}), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [String, String]), | ||
__metadata("design:returntype", Promise) | ||
], FileOpener.prototype, "open", null); | ||
__decorate([ | ||
Cordova({ | ||
callbackStyle: 'object', | ||
successName: 'success', | ||
errorName: 'error' | ||
}), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [String]), | ||
__metadata("design:returntype", Promise) | ||
], FileOpener.prototype, "uninstall", null); | ||
__decorate([ | ||
Cordova({ | ||
callbackStyle: 'object', | ||
successName: 'success', | ||
errorName: 'error' | ||
}), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [String]), | ||
__metadata("design:returntype", Promise) | ||
], FileOpener.prototype, "appIsInstalled", null); | ||
FileOpener = __decorate([ | ||
Plugin({ | ||
pluginName: 'FileOpener', | ||
plugin: 'cordova-plugin-file-opener2', | ||
pluginRef: 'cordova.plugins.fileOpener2', | ||
repo: 'https://github.com/pwlin/cordova-plugin-file-opener2', | ||
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8'] | ||
}) | ||
], FileOpener); | ||
return FileOpener; | ||
FileOpenerOriginal.prototype.open = function (filePath, fileMIMEType) { return cordova(this, "open", { "callbackStyle": "object", "successName": "success", "errorName": "error" }, arguments); }; | ||
FileOpenerOriginal.prototype.uninstall = function (packageId) { return cordova(this, "uninstall", { "callbackStyle": "object", "successName": "success", "errorName": "error" }, arguments); }; | ||
FileOpenerOriginal.prototype.appIsInstalled = function (packageId) { return cordova(this, "appIsInstalled", { "callbackStyle": "object", "successName": "success", "errorName": "error" }, arguments); }; | ||
FileOpenerOriginal.pluginName = "FileOpener"; | ||
FileOpenerOriginal.plugin = "cordova-plugin-file-opener2"; | ||
FileOpenerOriginal.pluginRef = "cordova.plugins.fileOpener2"; | ||
FileOpenerOriginal.repo = "https://github.com/pwlin/cordova-plugin-file-opener2"; | ||
FileOpenerOriginal.platforms = ["Android", "iOS", "Windows", "Windows Phone 8"]; | ||
return FileOpenerOriginal; | ||
}(IonicNativePlugin)); | ||
var FileOpener = new FileOpenerOriginal(); | ||
export { FileOpener }; | ||
//# sourceMappingURL=index.js.map | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcGx1Z2lucy9maWxlLW9wZW5lci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQ0EsT0FBTywwQ0FBc0MsTUFBTSxvQkFBb0IsQ0FBQzs7SUE2QnhDLDhCQUFpQjs7OztJQWEvQyx5QkFBSSxhQUFDLFFBQWdCLEVBQUUsWUFBb0I7SUFZM0MsOEJBQVMsYUFBQyxTQUFpQjtJQVkzQixtQ0FBYyxhQUFDLFNBQWlCOzs7Ozs7cUJBbkVsQztFQThCZ0MsaUJBQWlCO1NBQXBDLFVBQVUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGF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0dXJucyB7UHJvbWlzZTxhbnk+fVxuICAgKi9cbiAgQENvcmRvdmEoe1xuICAgIGNhbGxiYWNrU3R5bGU6ICdvYmplY3QnLFxuICAgIHN1Y2Nlc3NOYW1lOiAnc3VjY2VzcycsXG4gICAgZXJyb3JOYW1lOiAnZXJyb3InXG4gIH0pXG4gIGFwcElzSW5zdGFsbGVkKHBhY2thZ2VJZDogc3RyaW5nKTogUHJvbWlzZTxhbnk+IHsgcmV0dXJuOyB9XG5cbn1cbiJdfQ== |
@@ -1,18 +0,1 @@ | ||
{ | ||
"name": "@ionic-native/file-opener", | ||
"version": "4.4.2", | ||
"description": "Ionic Native - Native plugins for ionic apps", | ||
"module": "index.js", | ||
"typings": "index.d.ts", | ||
"author": "ionic", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@ionic-native/core": "^4.2.0", | ||
"@angular/core": "*", | ||
"rxjs": "^5.0.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ionic-team/ionic-native.git" | ||
} | ||
} | ||
{"description":"Ionic Native - Native plugins for ionic apps","module":"index.js","typings":"index.d.ts","author":"ionic","license":"MIT","repository":{"type":"git","url":"https://github.com/ionic-team/ionic-native.git"},"name":"@ionic-native/file-opener","peerDependencies":{"rxjs":"^5.0.1","@ionic-native/core":"5.0.0-alpha.3"},"version":"5.0.0-alpha.3"} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
12357
5
108
2
1
0