@cj-tech-master/excelts 9.4.0 → 9.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.browser.d.ts +1 -0
- package/dist/browser/index.browser.js +1 -0
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.js +1 -0
- package/dist/browser/modules/excel/cell.d.ts +1 -0
- package/dist/browser/modules/excel/note.d.ts +3 -23
- package/dist/browser/modules/excel/note.js +8 -2
- package/dist/browser/modules/excel/utils/ooxml-paths.d.ts +17 -5
- package/dist/browser/modules/excel/utils/ooxml-paths.js +46 -19
- package/dist/browser/modules/excel/xlsx/xform/comment/comment-xform.js +3 -2
- package/dist/browser/modules/excel/xlsx/xform/comment/comments-xform.d.ts +8 -0
- package/dist/browser/modules/excel/xlsx/xform/comment/comments-xform.js +52 -5
- package/dist/browser/modules/excel/xlsx/xform/comment/vml-client-data-xform.d.ts +6 -0
- package/dist/browser/modules/excel/xlsx/xform/comment/vml-client-data-xform.js +27 -1
- package/dist/browser/modules/excel/xlsx/xform/comment/vml-shape-xform.js +4 -0
- package/dist/browser/modules/excel/xlsx/xform/sheet/worksheet-xform.js +54 -14
- package/dist/browser/modules/excel/xlsx/xlsx.browser.d.ts +3 -3
- package/dist/browser/modules/excel/xlsx/xlsx.browser.js +16 -15
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/modules/excel/note.js +8 -2
- package/dist/cjs/modules/excel/utils/ooxml-paths.js +49 -24
- package/dist/cjs/modules/excel/xlsx/xform/comment/comment-xform.js +3 -2
- package/dist/cjs/modules/excel/xlsx/xform/comment/comments-xform.js +52 -5
- package/dist/cjs/modules/excel/xlsx/xform/comment/vml-client-data-xform.js +27 -1
- package/dist/cjs/modules/excel/xlsx/xform/comment/vml-shape-xform.js +4 -0
- package/dist/cjs/modules/excel/xlsx/xform/sheet/worksheet-xform.js +53 -13
- package/dist/cjs/modules/excel/xlsx/xlsx.browser.js +15 -14
- package/dist/esm/index.browser.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/modules/excel/note.js +8 -2
- package/dist/esm/modules/excel/utils/ooxml-paths.js +46 -19
- package/dist/esm/modules/excel/xlsx/xform/comment/comment-xform.js +3 -2
- package/dist/esm/modules/excel/xlsx/xform/comment/comments-xform.js +52 -5
- package/dist/esm/modules/excel/xlsx/xform/comment/vml-client-data-xform.js +27 -1
- package/dist/esm/modules/excel/xlsx/xform/comment/vml-shape-xform.js +4 -0
- package/dist/esm/modules/excel/xlsx/xform/sheet/worksheet-xform.js +54 -14
- package/dist/esm/modules/excel/xlsx/xlsx.browser.js +16 -15
- package/dist/iife/excelts.iife.js +149 -56
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +30 -30
- package/dist/types/index.browser.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/modules/excel/cell.d.ts +1 -0
- package/dist/types/modules/excel/note.d.ts +3 -23
- package/dist/types/modules/excel/utils/ooxml-paths.d.ts +17 -5
- package/dist/types/modules/excel/xlsx/xform/comment/comments-xform.d.ts +8 -0
- package/dist/types/modules/excel/xlsx/xform/comment/vml-client-data-xform.d.ts +6 -0
- package/dist/types/modules/excel/xlsx/xlsx.browser.d.ts +3 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @cj-tech-master/excelts v9.4.
|
|
2
|
+
* @cj-tech-master/excelts v9.4.1
|
|
3
3
|
* Zero-dependency TypeScript toolkit — Excel (XLSX), PDF, CSV, Markdown, XML, ZIP/TAR, and streaming.
|
|
4
4
|
* (c) 2026 cjnoname
|
|
5
5
|
* Released under the MIT License
|
|
@@ -17434,8 +17434,9 @@ onmessage = async (ev) => {
|
|
|
17434
17434
|
type: "note"
|
|
17435
17435
|
};
|
|
17436
17436
|
}
|
|
17437
|
-
constructor(note) {
|
|
17437
|
+
constructor(note, author) {
|
|
17438
17438
|
this.note = note;
|
|
17439
|
+
this.author = author;
|
|
17439
17440
|
}
|
|
17440
17441
|
get model() {
|
|
17441
17442
|
let value;
|
|
@@ -17453,13 +17454,16 @@ onmessage = async (ev) => {
|
|
|
17453
17454
|
};
|
|
17454
17455
|
break;
|
|
17455
17456
|
}
|
|
17456
|
-
|
|
17457
|
+
const result = deepMerge({}, Note.DEFAULT_CONFIGS, value);
|
|
17458
|
+
if (this.author !== void 0) result.author = this.author;
|
|
17459
|
+
return result;
|
|
17457
17460
|
}
|
|
17458
17461
|
set model(value) {
|
|
17459
17462
|
const { note } = value;
|
|
17460
17463
|
const { texts } = note;
|
|
17461
17464
|
if (texts && texts.length === 1 && Object.keys(texts[0]).length === 1) this.note = texts[0].text;
|
|
17462
17465
|
else this.note = note;
|
|
17466
|
+
this.author = value.author;
|
|
17463
17467
|
}
|
|
17464
17468
|
static fromModel(model) {
|
|
17465
17469
|
const note = new Note();
|
|
@@ -20232,7 +20236,7 @@ onmessage = async (ev) => {
|
|
|
20232
20236
|
const drawingRelsXmlRegex = /^xl\/drawings\/_rels\/(drawing\d+)[.]xml[.]rels$/;
|
|
20233
20237
|
const vmlDrawingRegex = /^xl\/drawings\/(vmlDrawing\d+)[.]vml$/;
|
|
20234
20238
|
const vmlDrawingHFRegex = /^xl\/drawings\/(vmlDrawingHF\d+)[.]vml$/;
|
|
20235
|
-
const commentsXmlRegex = /^xl\/comments(\d+)[.]xml$/;
|
|
20239
|
+
const commentsXmlRegex = /^xl\/(?:comments(\d+)|comments\/comment(\d+))[.]xml$/;
|
|
20236
20240
|
const tableXmlRegex = /^xl\/tables\/(table\d+)[.]xml$/;
|
|
20237
20241
|
const pivotTableXmlRegex = /^xl\/pivotTables\/(pivotTable\d+)[.]xml$/;
|
|
20238
20242
|
const pivotTableRelsXmlRegex = /^xl\/pivotTables\/_rels\/(pivotTable\d+)[.]xml[.]rels$/;
|
|
@@ -20287,9 +20291,12 @@ onmessage = async (ev) => {
|
|
|
20287
20291
|
const match = vmlDrawingHFRegex.exec(path);
|
|
20288
20292
|
return match ? match[1] : void 0;
|
|
20289
20293
|
}
|
|
20290
|
-
|
|
20291
|
-
|
|
20292
|
-
|
|
20294
|
+
/**
|
|
20295
|
+
* Check if a zip entry path is a comments XML file.
|
|
20296
|
+
* Works for both `xl/comments1.xml` and `xl/comments/comment1.xml`.
|
|
20297
|
+
*/
|
|
20298
|
+
function isCommentsPath(path) {
|
|
20299
|
+
return commentsXmlRegex.test(path);
|
|
20293
20300
|
}
|
|
20294
20301
|
function getTableNameFromPath(path) {
|
|
20295
20302
|
const match = tableXmlRegex.exec(path);
|
|
@@ -20388,6 +20395,9 @@ onmessage = async (ev) => {
|
|
|
20388
20395
|
function pivotTablePath(n) {
|
|
20389
20396
|
return `xl/pivotTables/pivotTable${n}.xml`;
|
|
20390
20397
|
}
|
|
20398
|
+
function pivotTablePathFromName(name) {
|
|
20399
|
+
return `xl/pivotTables/${name}.xml`;
|
|
20400
|
+
}
|
|
20391
20401
|
function pivotTableRelsPath(n) {
|
|
20392
20402
|
return `xl/pivotTables/_rels/pivotTable${n}.xml.rels`;
|
|
20393
20403
|
}
|
|
@@ -20429,24 +20439,12 @@ onmessage = async (ev) => {
|
|
|
20429
20439
|
function drawingRelTargetFromWorksheet(drawingName) {
|
|
20430
20440
|
return `../drawings/${drawingName}.xml`;
|
|
20431
20441
|
}
|
|
20432
|
-
function vmlDrawingRelTargetFromWorksheetName(vmlName) {
|
|
20433
|
-
return `../drawings/${vmlName}.vml`;
|
|
20434
|
-
}
|
|
20435
|
-
function commentsRelTargetFromWorksheetName(commentName) {
|
|
20436
|
-
return `../${commentName}.xml`;
|
|
20437
|
-
}
|
|
20438
20442
|
function pivotTableRelTargetFromWorksheet(n) {
|
|
20439
20443
|
return `../pivotTables/pivotTable${n}.xml`;
|
|
20440
20444
|
}
|
|
20441
|
-
function pivotTableRelTargetFromWorksheetName(pivotName) {
|
|
20442
|
-
return `../pivotTables/${pivotName}.xml`;
|
|
20443
|
-
}
|
|
20444
20445
|
function tableRelTargetFromWorksheet(target) {
|
|
20445
20446
|
return `../tables/${target}`;
|
|
20446
20447
|
}
|
|
20447
|
-
function tableRelTargetFromWorksheetName(name) {
|
|
20448
|
-
return `../tables/${name}.xml`;
|
|
20449
|
-
}
|
|
20450
20448
|
function mediaRelTargetFromRels(filename) {
|
|
20451
20449
|
return `../media/${filename}`;
|
|
20452
20450
|
}
|
|
@@ -20456,6 +20454,25 @@ onmessage = async (ev) => {
|
|
|
20456
20454
|
function ctrlPropRelTargetFromWorksheet(id) {
|
|
20457
20455
|
return `../ctrlProps/ctrlProp${id}.xml`;
|
|
20458
20456
|
}
|
|
20457
|
+
/**
|
|
20458
|
+
* Resolve a relationship Target (relative or absolute) to a normalized zip path.
|
|
20459
|
+
*
|
|
20460
|
+
* OOXML relationship targets may be:
|
|
20461
|
+
* - Relative: `../comments1.xml` (resolved against `baseDir`)
|
|
20462
|
+
* - Absolute: `/xl/comments/comment1.xml` (leading slash stripped)
|
|
20463
|
+
*
|
|
20464
|
+
* @param baseDir The directory containing the source part (e.g. `xl/worksheets/`)
|
|
20465
|
+
* @param target The raw Target value from the .rels file
|
|
20466
|
+
*/
|
|
20467
|
+
function resolveRelTarget(baseDir, target) {
|
|
20468
|
+
if (target.startsWith("/")) return target.slice(1);
|
|
20469
|
+
const parts = ((baseDir.endsWith("/") ? baseDir : baseDir + "/") + target).split("/");
|
|
20470
|
+
const resolved = [];
|
|
20471
|
+
for (const part of parts) if (part === "." || part === "") continue;
|
|
20472
|
+
else if (part === "..") resolved.pop();
|
|
20473
|
+
else resolved.push(part);
|
|
20474
|
+
return resolved.join("/");
|
|
20475
|
+
}
|
|
20459
20476
|
//#endregion
|
|
20460
20477
|
//#region src/modules/xml/writer.ts
|
|
20461
20478
|
/**
|
|
@@ -26705,7 +26722,7 @@ self.onmessage = async function(event) {
|
|
|
26705
26722
|
const renderModel = model || this.model;
|
|
26706
26723
|
xmlStream.openNode("comment", {
|
|
26707
26724
|
ref: renderModel.ref,
|
|
26708
|
-
authorId: 0
|
|
26725
|
+
authorId: renderModel.authorId ?? 0
|
|
26709
26726
|
});
|
|
26710
26727
|
xmlStream.openNode("text");
|
|
26711
26728
|
if (renderModel && renderModel.note && renderModel.note.texts) renderModel.note.texts.forEach((text) => {
|
|
@@ -26724,7 +26741,8 @@ self.onmessage = async function(event) {
|
|
|
26724
26741
|
this.model = {
|
|
26725
26742
|
type: "note",
|
|
26726
26743
|
note: { texts: [] },
|
|
26727
|
-
|
|
26744
|
+
ref: node.attributes.ref,
|
|
26745
|
+
authorId: node.attributes.authorId != null ? Number(node.attributes.authorId) : void 0
|
|
26728
26746
|
};
|
|
26729
26747
|
return true;
|
|
26730
26748
|
case "r":
|
|
@@ -26881,6 +26899,7 @@ self.onmessage = async function(event) {
|
|
|
26881
26899
|
var VmlClientDataXform = class extends BaseXform {
|
|
26882
26900
|
constructor() {
|
|
26883
26901
|
super();
|
|
26902
|
+
this._leafText = "";
|
|
26884
26903
|
this.map = {
|
|
26885
26904
|
"x:Anchor": new VmlAnchorXform(),
|
|
26886
26905
|
"x:Locked": new VmlProtectionXform({ tag: "x:Locked" }),
|
|
@@ -26920,6 +26939,11 @@ self.onmessage = async function(event) {
|
|
|
26920
26939
|
editAs: ""
|
|
26921
26940
|
};
|
|
26922
26941
|
break;
|
|
26942
|
+
case "x:Row":
|
|
26943
|
+
case "x:Column":
|
|
26944
|
+
this._leafName = node.name;
|
|
26945
|
+
this._leafText = "";
|
|
26946
|
+
break;
|
|
26923
26947
|
default:
|
|
26924
26948
|
this.parser = this.map[node.name];
|
|
26925
26949
|
if (this.parser) this.parser.parseOpen(node);
|
|
@@ -26928,9 +26952,20 @@ self.onmessage = async function(event) {
|
|
|
26928
26952
|
return true;
|
|
26929
26953
|
}
|
|
26930
26954
|
parseText(text) {
|
|
26931
|
-
if (this.
|
|
26955
|
+
if (this._leafName) this._leafText += text;
|
|
26956
|
+
else if (this.parser) this.parser.parseText(text);
|
|
26932
26957
|
}
|
|
26933
26958
|
parseClose(name) {
|
|
26959
|
+
if (this._leafName) {
|
|
26960
|
+
if (name === this._leafName) {
|
|
26961
|
+
const value = parseInt(this._leafText, 10);
|
|
26962
|
+
if (name === "x:Row") this.model.row = value + 1;
|
|
26963
|
+
else if (name === "x:Column") this.model.col = value + 1;
|
|
26964
|
+
this._leafName = void 0;
|
|
26965
|
+
this._leafText = "";
|
|
26966
|
+
}
|
|
26967
|
+
return true;
|
|
26968
|
+
}
|
|
26934
26969
|
if (this.parser) {
|
|
26935
26970
|
if (!this.parser.parseClose(name)) this.parser = void 0;
|
|
26936
26971
|
return true;
|
|
@@ -27059,6 +27094,10 @@ self.onmessage = async function(event) {
|
|
|
27059
27094
|
this.model.protection = this.map["x:ClientData"].model && this.map["x:ClientData"].model.protection;
|
|
27060
27095
|
this.model.anchor = this.map["x:ClientData"].model && this.map["x:ClientData"].model.anchor;
|
|
27061
27096
|
this.model.editAs = this.map["x:ClientData"].model && this.map["x:ClientData"].model.editAs;
|
|
27097
|
+
if (this.map["x:ClientData"].model) {
|
|
27098
|
+
this.model.row = this.map["x:ClientData"].model.row;
|
|
27099
|
+
this.model.col = this.map["x:ClientData"].model.col;
|
|
27100
|
+
}
|
|
27062
27101
|
return false;
|
|
27063
27102
|
default: return true;
|
|
27064
27103
|
}
|
|
@@ -41298,9 +41337,14 @@ self.onmessage = async function(event) {
|
|
|
41298
41337
|
}
|
|
41299
41338
|
//#endregion
|
|
41300
41339
|
//#region src/modules/excel/xlsx/xform/comment/comments-xform.ts
|
|
41340
|
+
const DEFAULT_AUTHOR = "Author";
|
|
41301
41341
|
var CommentsXform = class CommentsXform extends BaseXform {
|
|
41302
41342
|
constructor() {
|
|
41303
41343
|
super();
|
|
41344
|
+
this._authors = [];
|
|
41345
|
+
this._inAuthors = false;
|
|
41346
|
+
this._inAuthor = false;
|
|
41347
|
+
this._currentAuthor = "";
|
|
41304
41348
|
this.map = { comment: new CommentXform() };
|
|
41305
41349
|
this.model = { comments: [] };
|
|
41306
41350
|
}
|
|
@@ -41308,12 +41352,19 @@ self.onmessage = async function(event) {
|
|
|
41308
41352
|
const renderModel = model || this.model;
|
|
41309
41353
|
xmlStream.openXml(StdDocAttributes);
|
|
41310
41354
|
xmlStream.openNode("comments", CommentsXform.COMMENTS_ATTRIBUTES);
|
|
41355
|
+
const authorSet = /* @__PURE__ */ new Set();
|
|
41356
|
+
for (const comment of renderModel.comments) authorSet.add(comment.author ?? DEFAULT_AUTHOR);
|
|
41357
|
+
const authors = [...authorSet];
|
|
41311
41358
|
xmlStream.openNode("authors");
|
|
41312
|
-
xmlStream.leafNode("author", null,
|
|
41359
|
+
for (const author of authors) xmlStream.leafNode("author", null, author);
|
|
41313
41360
|
xmlStream.closeNode();
|
|
41314
41361
|
xmlStream.openNode("commentList");
|
|
41315
41362
|
renderModel.comments.forEach((comment) => {
|
|
41316
|
-
|
|
41363
|
+
const authorId = authors.indexOf(comment.author ?? DEFAULT_AUTHOR);
|
|
41364
|
+
this.map.comment.render(xmlStream, {
|
|
41365
|
+
...comment,
|
|
41366
|
+
authorId: authorId >= 0 ? authorId : 0
|
|
41367
|
+
});
|
|
41317
41368
|
});
|
|
41318
41369
|
xmlStream.closeNode();
|
|
41319
41370
|
xmlStream.closeNode();
|
|
@@ -41324,6 +41375,16 @@ self.onmessage = async function(event) {
|
|
|
41324
41375
|
return true;
|
|
41325
41376
|
}
|
|
41326
41377
|
switch (node.name) {
|
|
41378
|
+
case "authors":
|
|
41379
|
+
this._inAuthors = true;
|
|
41380
|
+
this._authors = [];
|
|
41381
|
+
return true;
|
|
41382
|
+
case "author":
|
|
41383
|
+
if (this._inAuthors) {
|
|
41384
|
+
this._inAuthor = true;
|
|
41385
|
+
this._currentAuthor = "";
|
|
41386
|
+
}
|
|
41387
|
+
return true;
|
|
41327
41388
|
case "commentList":
|
|
41328
41389
|
this.model = { comments: [] };
|
|
41329
41390
|
return true;
|
|
@@ -41335,11 +41396,27 @@ self.onmessage = async function(event) {
|
|
|
41335
41396
|
}
|
|
41336
41397
|
}
|
|
41337
41398
|
parseText(text) {
|
|
41338
|
-
if (this.
|
|
41399
|
+
if (this._inAuthor) this._currentAuthor += text;
|
|
41400
|
+
else if (this.parser) this.parser.parseText(text);
|
|
41339
41401
|
}
|
|
41340
41402
|
parseClose(name) {
|
|
41341
41403
|
switch (name) {
|
|
41342
|
-
case "
|
|
41404
|
+
case "authors":
|
|
41405
|
+
this._inAuthors = false;
|
|
41406
|
+
return true;
|
|
41407
|
+
case "author":
|
|
41408
|
+
if (this._inAuthors) {
|
|
41409
|
+
this._authors.push(this._currentAuthor);
|
|
41410
|
+
this._inAuthor = false;
|
|
41411
|
+
this._currentAuthor = "";
|
|
41412
|
+
}
|
|
41413
|
+
return true;
|
|
41414
|
+
case "commentList":
|
|
41415
|
+
for (const comment of this.model.comments) {
|
|
41416
|
+
const { authorId } = comment;
|
|
41417
|
+
if (authorId != null && authorId >= 0 && authorId < this._authors.length) comment.author = this._authors[authorId];
|
|
41418
|
+
}
|
|
41419
|
+
return false;
|
|
41343
41420
|
case "comment":
|
|
41344
41421
|
this.model.comments.push(this.parser.model);
|
|
41345
41422
|
this.parser = void 0;
|
|
@@ -44034,23 +44111,39 @@ self.onmessage = async function(event) {
|
|
|
44034
44111
|
}
|
|
44035
44112
|
}
|
|
44036
44113
|
reconcile(model, options) {
|
|
44037
|
-
const
|
|
44114
|
+
const relList = model.relationships ?? [];
|
|
44115
|
+
const rels = relList.reduce((h, rel) => {
|
|
44038
44116
|
h[rel.Id] = rel;
|
|
44039
|
-
|
|
44040
|
-
|
|
44041
|
-
|
|
44042
|
-
|
|
44043
|
-
|
|
44044
|
-
|
|
44117
|
+
return h;
|
|
44118
|
+
}, {});
|
|
44119
|
+
for (const rel of relList) if (rel.Type === RelType.Comments) {
|
|
44120
|
+
const resolvedPath = resolveRelTarget("xl/worksheets/", rel.Target);
|
|
44121
|
+
const commentEntry = options.comments?.[resolvedPath];
|
|
44122
|
+
if (commentEntry) model.comments = commentEntry.comments;
|
|
44123
|
+
}
|
|
44124
|
+
if (model.comments && model.comments.length) {
|
|
44125
|
+
for (const rel of relList) if (rel.Type === RelType.VmlDrawing) {
|
|
44126
|
+
const resolvedVmlPath = resolveRelTarget("xl/worksheets/", rel.Target);
|
|
44127
|
+
const vmlEntry = options.vmlDrawings?.[resolvedVmlPath];
|
|
44045
44128
|
if (vmlEntry) {
|
|
44046
|
-
const
|
|
44047
|
-
|
|
44048
|
-
|
|
44129
|
+
const vmlComments = vmlEntry.comments;
|
|
44130
|
+
const vmlByRef = {};
|
|
44131
|
+
let hasRefInfo = false;
|
|
44132
|
+
for (const vc of vmlComments) if (vc.row != null && vc.col != null) {
|
|
44133
|
+
const ref = colCache.encodeAddress(vc.row, vc.col);
|
|
44134
|
+
vmlByRef[ref] = vc;
|
|
44135
|
+
hasRefInfo = true;
|
|
44136
|
+
}
|
|
44137
|
+
if (hasRefInfo) for (const comment of model.comments) {
|
|
44138
|
+
const vml = vmlByRef[comment.ref];
|
|
44139
|
+
if (vml) comment.note = Object.assign({}, comment.note, vml);
|
|
44140
|
+
}
|
|
44141
|
+
else model.comments.forEach((comment, index) => {
|
|
44142
|
+
if (index < vmlComments.length) comment.note = Object.assign({}, comment.note, vmlComments[index]);
|
|
44049
44143
|
});
|
|
44050
44144
|
}
|
|
44051
44145
|
}
|
|
44052
|
-
|
|
44053
|
-
}, {});
|
|
44146
|
+
}
|
|
44054
44147
|
options.commentsMap = (model.comments ?? []).reduce((h, comment) => {
|
|
44055
44148
|
if (comment.ref) h[comment.ref] = comment;
|
|
44056
44149
|
return h;
|
|
@@ -44116,7 +44209,8 @@ self.onmessage = async function(event) {
|
|
|
44116
44209
|
model.tables = (model.tables ?? []).reduce((acc, tablePart) => {
|
|
44117
44210
|
const rel = rels[tablePart.rId];
|
|
44118
44211
|
if (rel) {
|
|
44119
|
-
const
|
|
44212
|
+
const resolvedPath = resolveRelTarget("xl/worksheets/", rel.Target);
|
|
44213
|
+
const table = options.tables[resolvedPath];
|
|
44120
44214
|
if (table) acc.push(table);
|
|
44121
44215
|
}
|
|
44122
44216
|
return acc;
|
|
@@ -44124,7 +44218,8 @@ self.onmessage = async function(event) {
|
|
|
44124
44218
|
model.pivotTables = [];
|
|
44125
44219
|
(model.relationships ?? []).forEach((rel) => {
|
|
44126
44220
|
if (rel.Type === RelType.PivotTable && options.pivotTables) {
|
|
44127
|
-
const
|
|
44221
|
+
const resolvedPath = resolveRelTarget("xl/worksheets/", rel.Target);
|
|
44222
|
+
const pivotTable = options.pivotTables[resolvedPath];
|
|
44128
44223
|
if (pivotTable) model.pivotTables.push(pivotTable);
|
|
44129
44224
|
}
|
|
44130
44225
|
});
|
|
@@ -45454,7 +45549,7 @@ self.onmessage = async function(event) {
|
|
|
45454
45549
|
applyWidthHeightFormats: pt.applyWidthHeightFormats === "1" ? "1" : "0"
|
|
45455
45550
|
};
|
|
45456
45551
|
loadedPivotTables.push(completePivotTable);
|
|
45457
|
-
pivotTablesIndexed[
|
|
45552
|
+
pivotTablesIndexed[pivotTablePathFromName(pivotName)] = completePivotTable;
|
|
45458
45553
|
});
|
|
45459
45554
|
loadedPivotTables.sort((a, b) => a.tableNumber - b.tableNumber);
|
|
45460
45555
|
model.pivotTables = loadedPivotTables;
|
|
@@ -45498,13 +45593,13 @@ self.onmessage = async function(event) {
|
|
|
45498
45593
|
model.worksheetHash[path] = worksheet;
|
|
45499
45594
|
model.worksheets.push(worksheet);
|
|
45500
45595
|
}
|
|
45501
|
-
async _processCommentEntry(stream, model,
|
|
45596
|
+
async _processCommentEntry(stream, model, zipPath) {
|
|
45502
45597
|
const comments = await new CommentsXform().parseStream(stream);
|
|
45503
|
-
model.comments[
|
|
45598
|
+
model.comments[zipPath] = comments;
|
|
45504
45599
|
}
|
|
45505
|
-
async _processTableEntry(stream, model,
|
|
45600
|
+
async _processTableEntry(stream, model, zipPath) {
|
|
45506
45601
|
const table = await new TableXform().parseStream(stream);
|
|
45507
|
-
model.tables[
|
|
45602
|
+
model.tables[zipPath] = table;
|
|
45508
45603
|
}
|
|
45509
45604
|
async _processWorksheetRelsEntry(stream, model, sheetNo) {
|
|
45510
45605
|
const relationships = await new RelationshipsXform().parseStream(stream);
|
|
@@ -45566,9 +45661,9 @@ self.onmessage = async function(event) {
|
|
|
45566
45661
|
const relationships = await new RelationshipsXform().parseStream(entry);
|
|
45567
45662
|
model.drawingRels[name] = relationships;
|
|
45568
45663
|
}
|
|
45569
|
-
async _processVmlDrawingEntry(entry, model,
|
|
45664
|
+
async _processVmlDrawingEntry(entry, model, zipPath) {
|
|
45570
45665
|
const vmlDrawing = await new VmlDrawingXform().parseStream(entry);
|
|
45571
|
-
model.vmlDrawings[
|
|
45666
|
+
model.vmlDrawings[zipPath] = vmlDrawing;
|
|
45572
45667
|
}
|
|
45573
45668
|
async _processVmlDrawingHFEntry(entry, model, _name) {
|
|
45574
45669
|
const vmlDrawing = await new VmlDrawingXform().parseStream(entry);
|
|
@@ -45678,9 +45773,8 @@ self.onmessage = async function(event) {
|
|
|
45678
45773
|
await this._processDrawingRelsEntry(stream, model, drawingRelsName);
|
|
45679
45774
|
return true;
|
|
45680
45775
|
}
|
|
45681
|
-
|
|
45682
|
-
|
|
45683
|
-
await this._processVmlDrawingEntry(stream, model, vmlDrawingName);
|
|
45776
|
+
if (getVmlDrawingNameFromPath(entryName)) {
|
|
45777
|
+
await this._processVmlDrawingEntry(stream, model, entryName);
|
|
45684
45778
|
return true;
|
|
45685
45779
|
}
|
|
45686
45780
|
const vmlHFName = getVmlDrawingHFNameFromPath(entryName);
|
|
@@ -45688,14 +45782,12 @@ self.onmessage = async function(event) {
|
|
|
45688
45782
|
await this._processVmlDrawingHFEntry(stream, model, vmlHFName);
|
|
45689
45783
|
return true;
|
|
45690
45784
|
}
|
|
45691
|
-
|
|
45692
|
-
|
|
45693
|
-
await this._processCommentEntry(stream, model, `comments${commentsIndex}`);
|
|
45785
|
+
if (isCommentsPath(entryName)) {
|
|
45786
|
+
await this._processCommentEntry(stream, model, entryName);
|
|
45694
45787
|
return true;
|
|
45695
45788
|
}
|
|
45696
|
-
|
|
45697
|
-
|
|
45698
|
-
await this._processTableEntry(stream, model, tableName);
|
|
45789
|
+
if (getTableNameFromPath(entryName)) {
|
|
45790
|
+
await this._processTableEntry(stream, model, entryName);
|
|
45699
45791
|
return true;
|
|
45700
45792
|
}
|
|
45701
45793
|
const themeName = getThemeNameFromPath(entryName);
|
|
@@ -54833,6 +54925,7 @@ self.onmessage = async function(event) {
|
|
|
54833
54925
|
exports.MarkdownParseError = MarkdownParseError;
|
|
54834
54926
|
exports.MaxItemsExceededError = MaxItemsExceededError;
|
|
54835
54927
|
exports.MergeConflictError = MergeConflictError;
|
|
54928
|
+
exports.Note = Note;
|
|
54836
54929
|
exports.PageSizes = PageSizes;
|
|
54837
54930
|
exports.PaperSize = PaperSize;
|
|
54838
54931
|
exports.PdfError = PdfError;
|