Skip to content

Commit

Permalink
version bump 0.18.4
Browse files Browse the repository at this point in the history
  • Loading branch information
SheetJSDev committed Mar 16, 2022
1 parent 2cbc28d commit 61b17a8
Show file tree
Hide file tree
Showing 63 changed files with 7,655 additions and 7,240 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ fullint: lint mdlint ## Run all checks (removed: old-lint, tslint, flow)

.PHONY: lint
lint: $(TARGET) $(AUXTARGETS) ## Run eslint checks
@./node_modules/.bin/eslint --ext .js,.njs,.json,.html,.htm $(TARGET) $(AUXTARGETS) $(CMDS) $(HTMLLINT) package.json bower.json
@./node_modules/.bin/eslint --ext .js,.njs,.json,.html,.htm $(FLOWTARGET) $(AUXTARGETS) $(CMDS) $(HTMLLINT) package.json bower.json
@if [ -x "$(CLOSURE)" ]; then java -jar $(CLOSURE) $(REQS) $(FLOWTARGET) --jscomp_warning=reportUnknownTypes >/dev/null; fi

.PHONY: old-lint
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ The [`demos` directory](demos/) includes sample projects for:
- [`canvas-datagrid`](demos/datagrid/)
- [`x-spreadsheet`](demos/xspreadsheet/)
- [`react-data-grid`](demos/react/modify/)
- [`vue3-table-light`](demos/vue/modify/)
- [`Swift JSC and other engines`](demos/altjs/)
- [`"serverless" functions`](demos/function/)
- [`internet explorer`](demos/oldie/)
Expand Down Expand Up @@ -1831,6 +1832,14 @@ export default function App() {

</details>

<details>
<summary><b>Previewing data in a VueJS data grid</b> (click to show)</summary>

[`vue3-table-lite`](https://github.com/linmasahiro/vue3-table-lite) is a simple
VueJS 3 data table. It is featured [in the VueJS demo](/demos/vue/modify/).

</details>

<details>
<summary><b>Populating a database (SQL or no-SQL)</b> (click to show)</summary>

Expand Down
2 changes: 1 addition & 1 deletion bits/00_header.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* vim: set ts=2: */
/*exported XLSX */
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false, Deno:false */
/*global exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false, DataView:false, Deno:false */
var XLSX = {};
function make_xlsx_lib(XLSX){
2 changes: 1 addition & 1 deletion bits/01_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
XLSX.version = '0.18.3';
XLSX.version = '0.18.4';
2 changes: 1 addition & 1 deletion bits/18_cfb.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ declare var Buffer_from:any;
/* vim: set ts=2: */
/*jshint eqnull:true */
/*exported CFB */
/*global module, require:false, process:false, Buffer:false, Uint8Array:false, Uint16Array:false */
/*global Uint8Array:false, Uint16Array:false */

/*::
type SectorEntry = {
Expand Down
3 changes: 1 addition & 2 deletions bits/20_jsutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ function fill(c/*:string*/,l/*:number*/)/*:string*/ { var o = ""; while(o.length
/* TODO: stress test */
function fuzzynum(s/*:string*/)/*:number*/ {
var v/*:number*/ = Number(s);
if(isFinite(v)) return v;
if(!isNaN(v)) return NaN;
if(!isNaN(v)) return isFinite(v) ? v : NaN;
if(!/\d/.test(s)) return v;
var wt = 1;
var ss = s.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g, function() { wt *= 100; return "";});
Expand Down
2 changes: 1 addition & 1 deletion bits/22_xmlutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var xlml_fixstr/*:StringConv*/ = /*#__PURE__*/(function() {
function entrepl($$/*:string*/,$1/*:string*/)/*:string*/ { return String.fromCharCode(parseInt($1,10)); }
return function xlml_fixstr(str/*:string*/)/*:string*/ { return str.replace(entregex,entrepl); };
})();
function xlml_unfixstr(str/*:string*/)/*:string*/ { return str.replace(/(\r\n|[\r\n])/g,"\&#10;"); };
function xlml_unfixstr(str/*:string*/)/*:string*/ { return str.replace(/(\r\n|[\r\n])/g,"\&#10;"); }

function parsexmlbool(value/*:any*/)/*:boolean*/ {
switch(value) {
Expand Down
4 changes: 0 additions & 4 deletions bits/30_ctype.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ var ct2type/*{[string]:string}*/ = ({
"application/vnd.ms-excel.externalLink": "links",
"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links",

/* Metadata */
"application/vnd.ms-excel.sheetMetadata": "metadata",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml": "metadata",

/* PivotCache */
"application/vnd.ms-excel.pivotCacheDefinition": "TODO",
"application/vnd.ms-excel.pivotCacheRecords": "TODO",
Expand Down
2 changes: 1 addition & 1 deletion bits/31_rels.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var RELS = ({
STY: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
THEME: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
CHART: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
CHARTEX: "http://schemas.microsoft.com/office/2014/relationships/chartEx",
CHARTEX: "http://schemas.microsoft.com/office/2014/relationships/chartEx",
CS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",
WS: [
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
Expand Down
14 changes: 7 additions & 7 deletions bits/41_lotus.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,10 @@ var WK_ = /*#__PURE__*/(function() {
V = (rel ? B : 0) + ((V >= 0x2000) ? V - 0x4000 : V);
return (rel ? "" : "$") + (col ? encode_col(V) : encode_row(V));
}
var oprec = [
/* var oprec = [
8, 8, 8, 8, 8, 8, 8, 8, 6, 4, 4, 5, 5, 7, 3, 3,
3, 3, 3, 3, 1, 1, 2, 6, 8, 8, 8, 8, 8, 8, 8, 8
];
]; */
/* TODO: flesh out */
var FuncTab = {
0x33: ["FALSE", 0],
Expand All @@ -390,10 +390,10 @@ var WK_ = /*#__PURE__*/(function() {
0x6F: ["T", 1]
};
var BinOpTab = [
"", "", "", "", "", "", "", "",
"", "+", "-", "*", "/", "^", "=", "<>",
"<=", ">=", "<", ">", "", "", "", "",
"&", "", "", "", "", "", "", ""
"", "", "", "", "", "", "", "", // eslint-disable-line no-mixed-spaces-and-tabs
"", "+", "-", "*", "/", "^", "=", "<>", // eslint-disable-line no-mixed-spaces-and-tabs
"<=", ">=", "<", ">", "", "", "", "", // eslint-disable-line no-mixed-spaces-and-tabs
"&", "", "", "", "", "", "", "" // eslint-disable-line no-mixed-spaces-and-tabs
];

function wk1_fmla_to_csf(blob, o) {
Expand Down Expand Up @@ -592,7 +592,7 @@ var WK_ = /*#__PURE__*/(function() {
if(!opts.qpro || length < 21) return;
var id = blob.read_shift(1);
blob.l += 17;
var len = blob.read_shift(1);
blob.l += 1; //var len = blob.read_shift(1);
blob.l += 2;
var nm = blob.read_shift(length - 21, 'cstr');
return [id, nm];
Expand Down
2 changes: 1 addition & 1 deletion bits/48_stybin.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var XLSBFillPTNames = [
"gray125",
"gray0625"
];
var rev_XLSBFillPTNames/*:EvertNumType*/
var rev_XLSBFillPTNames/*:EvertNumType*/;
/* TODO: gradient fill representation */
var parse_BrtFill = parsenoop;
function write_BrtFill(fill, o) {
Expand Down
16 changes: 11 additions & 5 deletions bits/51_xlsbmeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function write_BrtMdtinfo(data) {
write_XLWideString(data.name, o);
return o.slice(0, o.l);
}
function parse_BrtMdb(data, length) {
function parse_BrtMdb(data) {
var out = [];
var cnt = data.read_shift(4);
while (cnt-- > 0)
Expand All @@ -34,7 +34,7 @@ function write_BrtBeginEsfmd(cnt, name) {
write_XLWideString(name, o);
return o.slice(0, o.l);
}
function parse_BrtBeginEsmdb(data, length) {
function parse_BrtBeginEsmdb(data) {
data.l += 4;
return data.read_shift(4) != 0;
}
Expand All @@ -49,19 +49,25 @@ function parse_xlmeta_bin(data, name, _opts) {
var opts = _opts || {};
var state = [];
var pass = false;
var esmdb = 0;
var metatype = 2;
recordhopper(data, function(val, R, RT) {
switch (RT) {
case 335:
out.Types.push({ name: val.name });
break;
case 51:
val.forEach(function(r) {
(esmdb == 1 ? out.Cell : out.Value).push({ type: out.Types[r[0] - 1].name, index: r[1] });
if (metatype == 1)
out.Cell.push({ type: out.Types[r[0] - 1].name, index: r[1] });
else if (metatype == 0)
out.Value.push({ type: out.Types[r[0] - 1].name, index: r[1] });
});
break;
case 337:
esmdb = val ? 1 : 0;
metatype = val ? 1 : 0;
break;
case 338:
metatype = 2;
break;
case 35:
state.push(RT);
Expand Down
16 changes: 8 additions & 8 deletions bits/51_xlsxmeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ function parse_xlmeta_xml(data, name, opts) {
if (!data)
return out;
var pass = false;
var metatype = "";
data.replace(tagregex, function(x, idx) {
var metatype = 2;
data.replace(tagregex, function(x) {
var y = parsexmltag(x);
switch (strip_ns(y[0])) {
case "<?xml":
Expand All @@ -29,24 +29,24 @@ function parse_xlmeta_xml(data, name, opts) {
case "</bk>":
break;
case "<rc":
if (metatype == "cell")
if (metatype == 1)
out.Cell.push({ type: out.Types[y.t - 1].name, index: +y.v });
else if (metatype == "value")
else if (metatype == 0)
out.Value.push({ type: out.Types[y.t - 1].name, index: +y.v });
break;
case "</rc>":
break;
case "<cellMetadata":
metatype = "cell";
metatype = 1;
break;
case "</cellMetadata>":
metatype = "";
metatype = 2;
break;
case "<valueMetadata":
metatype = "value";
metatype = 0;
break;
case "</valueMetadata>":
metatype = "";
metatype = 2;
break;
case "<extLst":
case "<extLst>":
Expand Down
2 changes: 1 addition & 1 deletion bits/56_cmntcommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function sheet_insert_comments(sheet, comments/*:Array<RawComment>*/, threaded/*
if(!threaded && cell.c[i].T) return;
if(threaded && !cell.c[i].T) cell.c.splice(i, 1);
}
if(threaded && people) for(var i = 0; i < people.length; ++i) {
if(threaded && people) for(i = 0; i < people.length; ++i) {
if(o.a == people[i].id) { o.a = people[i].name || o.a; break; }
}
cell.c.push(o);
Expand Down
6 changes: 3 additions & 3 deletions bits/57_cmntxml.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ function write_tcmnt_xml(comments, people, opts) {
/* [MS-XLSX] 2.1.18 */
function parse_people_xml(data/*:string*/, opts) {
var out = [];
var pass = false, tidx = 0;
data.replace(tagregex, function xml_tcmnt(x, idx) {
var pass = false;
data.replace(tagregex, function xml_tcmnt(x) {
var y/*:any*/ = parsexmltag(x);
switch(strip_ns(y[0])) {
case '<?xml': break;
Expand All @@ -161,7 +161,7 @@ function parse_people_xml(data/*:string*/, opts) {
});
return out;
}
function write_people_xml(people, opts) {
function write_people_xml(people/*, opts*/) {
var o = [XML_HEADER, writextag('personList', null, {
'xmlns': XMLNS.TCMNT,
'xmlns:x': XMLNS_main[0]
Expand Down
2 changes: 1 addition & 1 deletion bits/67_wsxml.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function parse_ws_xml_sheetpr(sheetPr/*:string*/, s, wb/*:WBWBProps*/, idx/*:num
if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
if(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));
}
function parse_ws_xml_sheetpr2(sheetPr/*:string*/, body/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/, styles, themes) {
function parse_ws_xml_sheetpr2(sheetPr/*:string*/, body/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/) {
parse_ws_xml_sheetpr(sheetPr.slice(0, sheetPr.indexOf(">")), s, wb, idx);
}
function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
Expand Down
3 changes: 1 addition & 2 deletions bits/75_xlml.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function parse_xlml_xml(d, _opts)/*:Workbook*/ {
var state = [], tmp;
if(DENSE != null && opts.dense == null) opts.dense = DENSE;
var sheets = {}, sheetnames/*:Array<string>*/ = [], cursheet/*:Worksheet*/ = (opts.dense ? [] : {}), sheetname = "";
var table = {}, cell = ({}/*:any*/), row = {};// eslint-disable-line no-unused-vars
var cell = ({}/*:any*/), row = {};// eslint-disable-line no-unused-vars
var dtag = xlml_parsexmltag('<Data ss:Type="String">'), didx = 0;
var c = 0, r = 0;
var refguess/*:Range*/ = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };
Expand Down Expand Up @@ -305,7 +305,6 @@ function parse_xlml_xml(d, _opts)/*:Workbook*/ {
if(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error("Bad state: "+tmp.join("|"));}
else if(Rn[0].slice(-2) == "/>") break;
else {
table = xlml_parsexmltag(Rn[0]);
state.push([Rn[3], false]);
cstys = []; seencol = false;
}
Expand Down
Loading

0 comments on commit 61b17a8

Please sign in to comment.