@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
|
@@ -11,6 +11,7 @@ export { Range } from "./modules/excel/range.js";
|
|
|
11
11
|
export { Image } from "./modules/excel/image.js";
|
|
12
12
|
export * from "./modules/excel/anchor.js";
|
|
13
13
|
export { Table } from "./modules/excel/table.js";
|
|
14
|
+
export { Note } from "./modules/excel/note.js";
|
|
14
15
|
export { DataValidations } from "./modules/excel/data-validations.js";
|
|
15
16
|
export { FormCheckbox } from "./modules/excel/form-control.js";
|
|
16
17
|
export * from "./modules/excel/enums.js";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { Range } from "./modules/excel/range.js";
|
|
|
7
7
|
export { Image } from "./modules/excel/image.js";
|
|
8
8
|
export * from "./modules/excel/anchor.js";
|
|
9
9
|
export { Table } from "./modules/excel/table.js";
|
|
10
|
+
export { Note } from "./modules/excel/note.js";
|
|
10
11
|
export { DataValidations } from "./modules/excel/data-validations.js";
|
|
11
12
|
export { FormCheckbox } from "./modules/excel/form-control.js";
|
|
12
13
|
export { WorkbookWriter } from "./modules/excel/stream/workbook-writer.js";
|
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
interface NoteText {
|
|
3
|
-
text: string;
|
|
4
|
-
font?: Partial<Font>;
|
|
5
|
-
}
|
|
6
|
-
interface NoteConfig {
|
|
7
|
-
margins?: {
|
|
8
|
-
insetmode?: string;
|
|
9
|
-
inset?: number[];
|
|
10
|
-
};
|
|
11
|
-
protection?: {
|
|
12
|
-
locked?: string;
|
|
13
|
-
lockText?: string;
|
|
14
|
-
};
|
|
15
|
-
editAs?: string;
|
|
16
|
-
texts?: NoteText[];
|
|
17
|
-
anchor?: string;
|
|
18
|
-
}
|
|
19
|
-
interface NoteModel {
|
|
20
|
-
type: string;
|
|
21
|
-
note: NoteConfig;
|
|
22
|
-
}
|
|
1
|
+
import type { NoteConfig, NoteModel } from "./cell.js";
|
|
23
2
|
declare class Note {
|
|
24
3
|
note: string | NoteConfig | undefined;
|
|
4
|
+
author: string | undefined;
|
|
25
5
|
static readonly DEFAULT_CONFIGS: NoteModel;
|
|
26
|
-
constructor(note?: string | NoteConfig);
|
|
6
|
+
constructor(note?: string | NoteConfig, author?: string);
|
|
27
7
|
get model(): NoteModel;
|
|
28
8
|
set model(value: NoteModel);
|
|
29
9
|
static fromModel(model: NoteModel): Note;
|
|
@@ -23,7 +23,11 @@ export declare function getDrawingNameFromPath(path: string): string | undefined
|
|
|
23
23
|
export declare function getDrawingNameFromRelsPath(path: string): string | undefined;
|
|
24
24
|
export declare function getVmlDrawingNameFromPath(path: string): string | undefined;
|
|
25
25
|
export declare function getVmlDrawingHFNameFromPath(path: string): string | undefined;
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Check if a zip entry path is a comments XML file.
|
|
28
|
+
* Works for both `xl/comments1.xml` and `xl/comments/comment1.xml`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isCommentsPath(path: string): boolean;
|
|
27
31
|
export declare function getTableNameFromPath(path: string): string | undefined;
|
|
28
32
|
export declare function getPivotTableNameFromPath(path: string): string | undefined;
|
|
29
33
|
export declare function getPivotTableNameFromRelsPath(path: string): string | undefined;
|
|
@@ -59,6 +63,7 @@ export declare function pivotCacheDefinitionRelsPath(n: number | string): string
|
|
|
59
63
|
export declare function pivotCacheRecordsPath(n: number | string): string;
|
|
60
64
|
export declare function pivotCacheRecordsRelTarget(n: number | string): string;
|
|
61
65
|
export declare function pivotTablePath(n: number | string): string;
|
|
66
|
+
export declare function pivotTablePathFromName(name: string): string;
|
|
62
67
|
export declare function pivotTableRelsPath(n: number | string): string;
|
|
63
68
|
export declare function externalLinkPath(n: number | string): string;
|
|
64
69
|
export declare function externalLinkRelsPath(n: number | string): string;
|
|
@@ -80,12 +85,19 @@ export declare function commentsRelTargetFromWorksheet(sheetId: number | string)
|
|
|
80
85
|
export declare function vmlDrawingRelTargetFromWorksheet(sheetId: number | string): string;
|
|
81
86
|
export declare function vmlDrawingHFRelTargetFromWorksheet(sheetId: number | string): string;
|
|
82
87
|
export declare function drawingRelTargetFromWorksheet(drawingName: string): string;
|
|
83
|
-
export declare function vmlDrawingRelTargetFromWorksheetName(vmlName: string): string;
|
|
84
|
-
export declare function commentsRelTargetFromWorksheetName(commentName: string): string;
|
|
85
88
|
export declare function pivotTableRelTargetFromWorksheet(n: number | string): string;
|
|
86
|
-
export declare function pivotTableRelTargetFromWorksheetName(pivotName: string): string;
|
|
87
89
|
export declare function tableRelTargetFromWorksheet(target: string): string;
|
|
88
|
-
export declare function tableRelTargetFromWorksheetName(name: string): string;
|
|
89
90
|
export declare function mediaRelTargetFromRels(filename: string): string;
|
|
90
91
|
export declare function ctrlPropPath(id: number | string): string;
|
|
91
92
|
export declare function ctrlPropRelTargetFromWorksheet(id: number | string): string;
|
|
93
|
+
/**
|
|
94
|
+
* Resolve a relationship Target (relative or absolute) to a normalized zip path.
|
|
95
|
+
*
|
|
96
|
+
* OOXML relationship targets may be:
|
|
97
|
+
* - Relative: `../comments1.xml` (resolved against `baseDir`)
|
|
98
|
+
* - Absolute: `/xl/comments/comment1.xml` (leading slash stripped)
|
|
99
|
+
*
|
|
100
|
+
* @param baseDir The directory containing the source part (e.g. `xl/worksheets/`)
|
|
101
|
+
* @param target The raw Target value from the .rels file
|
|
102
|
+
*/
|
|
103
|
+
export declare function resolveRelTarget(baseDir: string, target: string): string;
|
|
@@ -8,6 +8,14 @@ declare class CommentsXform extends BaseXform<CommentsModel> {
|
|
|
8
8
|
[key: string]: CommentXform;
|
|
9
9
|
};
|
|
10
10
|
parser: any;
|
|
11
|
+
/** Authors collected while parsing the <authors> element. */
|
|
12
|
+
private _authors;
|
|
13
|
+
/** Whether we are currently inside the <authors> element. */
|
|
14
|
+
private _inAuthors;
|
|
15
|
+
/** Whether we are currently inside an <author> element (collecting text). */
|
|
16
|
+
private _inAuthor;
|
|
17
|
+
/** Accumulator for the current <author> text content. */
|
|
18
|
+
private _currentAuthor;
|
|
11
19
|
constructor();
|
|
12
20
|
render(xmlStream: any, model?: CommentsModel): void;
|
|
13
21
|
parseOpen(node: any): boolean;
|
|
@@ -7,6 +7,8 @@ interface ClientDataModel {
|
|
|
7
7
|
anchor: any;
|
|
8
8
|
protection: Protection;
|
|
9
9
|
editAs: string;
|
|
10
|
+
row?: number;
|
|
11
|
+
col?: number;
|
|
10
12
|
}
|
|
11
13
|
interface RenderModel {
|
|
12
14
|
note: {
|
|
@@ -23,6 +25,10 @@ declare class VmlClientDataXform extends BaseXform<ClientDataModel> {
|
|
|
23
25
|
[key: string]: any;
|
|
24
26
|
};
|
|
25
27
|
parser: any;
|
|
28
|
+
/** Name of the current simple leaf element being parsed (e.g. "x:Row"). */
|
|
29
|
+
private _leafName;
|
|
30
|
+
/** Accumulated text for the current leaf element. */
|
|
31
|
+
private _leafText;
|
|
26
32
|
constructor();
|
|
27
33
|
get tag(): string;
|
|
28
34
|
render(xmlStream: any, model: RenderModel): void;
|
|
@@ -338,8 +338,8 @@ declare class XLSX {
|
|
|
338
338
|
subtotal?: string;
|
|
339
339
|
}>, defaultMetric: PivotTableSubtotal): PivotTableSubtotal[];
|
|
340
340
|
_processWorksheetEntry(stream: IParseStream, model: any, sheetNo: number, options: XlsxOptions | undefined, path: string): Promise<void>;
|
|
341
|
-
_processCommentEntry(stream: IParseStream, model: any,
|
|
342
|
-
_processTableEntry(stream: IParseStream, model: any,
|
|
341
|
+
_processCommentEntry(stream: IParseStream, model: any, zipPath: string): Promise<void>;
|
|
342
|
+
_processTableEntry(stream: IParseStream, model: any, zipPath: string): Promise<void>;
|
|
343
343
|
_processWorksheetRelsEntry(stream: IParseStream, model: any, sheetNo: number): Promise<void>;
|
|
344
344
|
_processMediaEntry(stream: IParseStream, model: any, filename: string): Promise<void>;
|
|
345
345
|
/**
|
|
@@ -352,7 +352,7 @@ declare class XLSX {
|
|
|
352
352
|
*/
|
|
353
353
|
_processDrawingEntry(stream: IParseStream, model: any, name: string, rawData?: Uint8Array): Promise<void>;
|
|
354
354
|
_processDrawingRelsEntry(entry: any, model: any, name: string): Promise<void>;
|
|
355
|
-
_processVmlDrawingEntry(entry: any, model: any,
|
|
355
|
+
_processVmlDrawingEntry(entry: any, model: any, zipPath: string): Promise<void>;
|
|
356
356
|
_processVmlDrawingHFEntry(entry: any, model: any, _name: string): Promise<void>;
|
|
357
357
|
_processThemeEntry(stream: IParseStream, model: any, name: string): Promise<void>;
|
|
358
358
|
_processPivotTableEntry(stream: IParseStream, model: any, name: string): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cj-tech-master/excelts",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.1",
|
|
4
4
|
"description": "Zero-dependency TypeScript toolkit — Excel (XLSX), PDF, CSV, Markdown, XML, ZIP/TAR, and streaming.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"archive",
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
"devDependencies": {
|
|
201
201
|
"@rspack/core": "^1.7.11",
|
|
202
202
|
"@types/node": "^25.6.0",
|
|
203
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
203
|
+
"@typescript/native-preview": "^7.0.0-dev.20260420.1",
|
|
204
204
|
"@vitest/browser": "^4.1.4",
|
|
205
205
|
"@vitest/browser-playwright": "^4.1.4",
|
|
206
206
|
"@vitest/ui": "^4.1.4",
|
|
@@ -209,8 +209,8 @@
|
|
|
209
209
|
"esbuild": "^0.28.0",
|
|
210
210
|
"fast-xml-parser": "^5.7.1",
|
|
211
211
|
"husky": "^9.1.7",
|
|
212
|
-
"oxfmt": "^0.
|
|
213
|
-
"oxlint": "^1.
|
|
212
|
+
"oxfmt": "^0.46.0",
|
|
213
|
+
"oxlint": "^1.61.0",
|
|
214
214
|
"oxlint-tsgolint": "latest",
|
|
215
215
|
"playwright": "^1.59.1",
|
|
216
216
|
"rimraf": "^6.1.3",
|