updating to 0.12.7

This commit is contained in:
SheetJS 2018-03-29 00:33:39 -04:00
parent 0c54be4ec4
commit ba24ed7893
4 changed files with 40 additions and 32 deletions

@ -33,6 +33,10 @@ a { text-decoration: none }
- When available, modern browsers use `URL.createObjectURL`.
<b>Multiple Download Caveat</b>
Some browsers warn or block attempts to download multiple files. Chrome content
settings support whitelisting domains for automatic multiple downloads.
</pre>
<script src="shim.js"></script>
<script src="xlsx.full.min.js"></script>

26
xlsx.core.min.js vendored

File diff suppressed because one or more lines are too long

32
xlsx.full.min.js vendored

File diff suppressed because one or more lines are too long

10
xlsx.js

@ -4,7 +4,7 @@
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
var XLSX = {};
(function make_xlsx(XLSX){
XLSX.version = '0.12.6';
XLSX.version = '0.12.7';
var current_codepage = 1200, current_ansi = 1252;
/*global cptable:true */
if(typeof module !== "undefined" && typeof require !== 'undefined') {
@ -1843,7 +1843,7 @@ function blobify(data) {
}
/* write or download file */
function write_dl(fname, payload, enc) {
/*global IE_SaveFile, Blob, navigator, saveAs, URL, document, File */
/*global IE_SaveFile, Blob, navigator, saveAs, URL, document, File, chrome */
if(typeof _fs !== 'undefined' && _fs.writeFileSync) return enc ? _fs.writeFileSync(fname, payload, enc) : _fs.writeFileSync(fname, payload);
var data = (enc == "utf8") ? utf8write(payload) : payload;
if(typeof IE_SaveFile !== 'undefined') return IE_SaveFile(data, fname);
@ -1852,9 +1852,13 @@ if(typeof IE_SaveFile !== 'undefined') return IE_SaveFile(data, fname);
if(typeof navigator !== 'undefined' && navigator.msSaveBlob) return navigator.msSaveBlob(blob, fname);
if(typeof saveAs !== 'undefined') return saveAs(blob, fname);
if(typeof URL !== 'undefined' && typeof document !== 'undefined' && document.createElement && URL.createObjectURL) {
var url = URL.createObjectURL(blob);
if(typeof chrome === 'object' && typeof (chrome.downloads||{}).download == "function") {
if(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);
return chrome.downloads.download({ url: url, filename: fname, saveAs: true});
}
var a = document.createElement("a");
if(a.download != null) {
var url = URL.createObjectURL(blob);
a.download = fname; a.href = url; document.body.appendChild(a); a.click();
document.body.removeChild(a);
if(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);