cordova-plugin-file-opener2
Advanced tools
Comparing version 3.0.5 to 4.0.0
@@ -0,0 +0,0 @@ --- |
{ | ||
"name": "cordova-plugin-file-opener2", | ||
"version": "3.0.5", | ||
"version": "4.0.0", | ||
"description": "A File Opener Plugin for Cordova. (The Original Version)", | ||
@@ -26,3 +26,13 @@ "cordova": { | ||
"engines": { | ||
"cordova": ">=6.0.0" | ||
"cordovaDependencies": { | ||
"2.0.0": { | ||
"cordova": ">=6.0.0" | ||
}, | ||
"3.0.0": { | ||
"cordova": ">=7.0.0" | ||
}, | ||
"4.0.0": { | ||
"cordova-android": ">=10.0.0" | ||
} | ||
} | ||
}, | ||
@@ -29,0 +39,0 @@ "author": { |
@@ -24,12 +24,2 @@ # A File Opener Plugin for Cordova | ||
### Optional variables | ||
This plugin requires the Android support library v4. From release `2.1.0` the version of this can be set at installation. The minimum version is `24.1.0`. Default value is `27.+`. [Check out the latest version](https://developer.android.com/topic/libraries/support-library/revisions.html). | ||
```shell | ||
$ cordova plugin add cordova-plugin-file-opener2 --variable ANDROID_SUPPORT_V4_VERSION="27.+" | ||
``` | ||
If you are using the `cordova-android-support-gradle-release` plugin it should match the value you have set there. | ||
## Requirements | ||
@@ -39,3 +29,3 @@ | ||
- Android 4.4+ / iOS 9+ / Windows / Electron | ||
- Android 5.1+ / iOS 9+ / Windows / Electron | ||
- Cordova CLI 7.0 or higher | ||
@@ -45,14 +35,2 @@ | ||
### AndroidX Support | ||
Currently if your project requires AndroidX support, you need to add the following two plugins to your project: | ||
- [cordova-plugin-androidx](https://github.com/dpa99c/cordova-plugin-androidx/) and [cordova-plugin-androidx-adapter](https://github.com/dpa99c/cordova-plugin-androidx-adapter/) | ||
```shell | ||
$ cordova plugin add cordova-plugin-androidx | ||
$ cordova plugin add cordova-plugin-androidx-adapter | ||
``` | ||
Just adding these plugins should be enough and no further changes are necessary. | ||
## fileOpener2.open(filePath, mimeType, options) | ||
@@ -64,3 +42,3 @@ | ||
- Android 4.4+ | ||
- Android 5.1+ | ||
- iOS 9+ | ||
@@ -118,3 +96,3 @@ - Windows | ||
- Android 4.4+ | ||
- Android 5.1+ | ||
- iOS 9+ | ||
@@ -149,3 +127,3 @@ | ||
- Android 4.4+ | ||
- Android 5.1+ | ||
@@ -170,3 +148,3 @@ ### Quick Example | ||
- Android 4.4+ | ||
- Android 5.1+ | ||
@@ -173,0 +151,0 @@ ### Quick Example |
(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(b,c,d){var e=new XMLHttpRequest;e.open("GET",b),e.responseType="blob",e.onload=function(){a(e.response,c,d)},e.onerror=function(){console.error("could not download file")},e.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(a,b,d,e){if(e=e||open("","_blank"),e&&(e.document.title=e.document.body.innerText="downloading..."),"string"==typeof a)return c(a,b,d);var g="application/octet-stream"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||g&&h)&&"undefined"!=typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),e?e.location.href=a:location=a,e=null},j.readAsDataURL(a)}else{var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l)},4E4)}});f.saveAs=a.saveAs=a,"undefined"!=typeof module&&(module.exports=a)}); | ||
//# sourceMappingURL=FileSaver.min.js.map |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /*jslint browser: true, devel: true, node: true, sloppy: true, plusplus: true*/ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
44777
192