javascript-excel 2.4.0 → 2.6.0
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/README.md +4 -2
- package/dist/{address-DUn7-5OS.js → address-BGH42dEg.js} +1 -1
- package/dist/{address-DZBHchLv.cjs → address-DKd_3EGf.cjs} +1 -1
- package/dist/{csv-Dn4MIESx.js → csv-5jVhfM5l.js} +180 -33
- package/dist/{csv-DZ241Y5F.cjs → csv-BkVmMYQq.cjs} +180 -33
- package/dist/csv.cjs +1 -1
- package/dist/csv.d.cts +42 -3
- package/dist/csv.d.ts +42 -3
- package/dist/csv.js +1 -1
- package/dist/{dataset-CbZnEWXu.cjs → dataset-B4-SEdCn.cjs} +4 -4
- package/dist/{dataset-CyEHVht4.js → dataset-Dh598YSG.js} +4 -4
- package/dist/{dates-BXcSWf9_.js → dates-CIL1z9EY.js} +1 -1
- package/dist/{dates-CA1dCizp.cjs → dates-DcdgnJto.cjs} +1 -1
- package/dist/dom.cjs +2 -2
- package/dist/dom.d.cts +1 -1
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +2 -2
- package/dist/{dos-time-BsH7f0ef.js → dos-time-BEAyK3U8.js} +1 -1
- package/dist/{dos-time-CxEs--rI.cjs → dos-time-BUWyklco.cjs} +1 -1
- package/dist/{errors-CvGlfw0E.js → errors-BQE62PFo.js} +1 -1
- package/dist/{errors-DOPrrGS4.cjs → errors-CKYdpCoB.cjs} +1 -1
- package/dist/format.cjs +1 -1
- package/dist/format.js +1 -1
- package/dist/import.cjs +1 -1
- package/dist/import.d.cts +2 -2
- package/dist/import.d.ts +2 -2
- package/dist/import.js +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -7
- package/dist/{infer-BniOucP6.cjs → infer-B950M3-F.cjs} +27 -0
- package/dist/{infer-DcUyZ1T-.js → infer-DuSahY5i.js} +16 -1
- package/dist/{pipeline-C8F9lecW.js → pipeline-BRzRd5v3.js} +12 -7
- package/dist/{pipeline-BegSPu8X.d.ts → pipeline-BY-SiQWW.d.ts} +7 -3
- package/dist/{pipeline-BwkRpV5Z.cjs → pipeline-C13EIWHJ.cjs} +12 -7
- package/dist/{pipeline-4U7Xnuc1.d.cts → pipeline-C7R86kQg.d.cts} +7 -3
- package/dist/{read-cvxu6O-H.js → read-CrI550TK.js} +2269 -784
- package/dist/{read-DmUPztqh.cjs → read-X1KxggZ7.cjs} +2284 -793
- package/dist/read.cjs +2 -1
- package/dist/read.d.cts +49 -2
- package/dist/read.d.ts +49 -2
- package/dist/read.js +2 -2
- package/dist/render.cjs +2 -2
- package/dist/render.js +2 -2
- package/dist/{sheet-names-DDY64-dt.cjs → sheet-names-D8sYcjSd.cjs} +2 -2
- package/dist/{sheet-names-BLrwcn33.js → sheet-names-RoFkpk_R.js} +2 -2
- package/dist/{warnings-DhonqJ7A.d.ts → warnings-Bphby2c7.d.cts} +28 -2
- package/dist/{warnings-DhonqJ7A.d.cts → warnings-Bphby2c7.d.ts} +28 -2
- package/dist/worker.cjs +5 -5
- package/dist/worker.d.cts +4 -4
- package/dist/worker.d.ts +4 -4
- package/dist/worker.js +5 -5
- package/dist/{write-Izl2NG0Y.d.cts → write-BbV7BlbS.d.cts} +1 -1
- package/dist/{write-DKXhuvKR.cjs → write-Bgl_QfA8.cjs} +5 -5
- package/dist/{write-BVXB2_2C.js → write-DFz-h8gz.js} +5 -5
- package/dist/{write-BaMv1Z7W.d.ts → write-DryxCc2Q.d.ts} +1 -1
- package/package.json +1 -1
package/dist/read.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_warnings = require("./warnings-CJPiDqei.cjs");
|
|
3
|
-
const require_read = require("./read-
|
|
3
|
+
const require_read = require("./read-X1KxggZ7.cjs");
|
|
4
4
|
exports.DEFAULT_READ_LIMITS = require_read.DEFAULT_READ_LIMITS;
|
|
5
5
|
exports.detectFormat = require_read.detectFormat;
|
|
6
|
+
exports.inspect = require_read.inspect;
|
|
6
7
|
exports.isDataLossWarning = require_warnings.isDataLossWarning;
|
|
7
8
|
exports.read = require_read.read;
|
|
8
9
|
exports.readSheetNames = require_read.readSheetNames;
|
package/dist/read.d.cts
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module javascript-excel/read
|
|
12
12
|
*/
|
|
13
|
-
import { a as isDataLossWarning, c as BlobType, i as ExcelWarningCode, n as ExcelPartKind, o as BinaryInput, r as ExcelWarning, s as BlobLike, t as DroppedWarnings } from "./warnings-
|
|
13
|
+
import { a as isDataLossWarning, c as BlobType, i as ExcelWarningCode, n as ExcelPartKind, o as BinaryInput, r as ExcelWarning, s as BlobLike, t as DroppedWarnings } from "./warnings-Bphby2c7.cjs";
|
|
14
14
|
import { A as Theme, C as PrintSetup, D as Sheet, E as RowProps, O as SheetView, S as PatternType, T as RichTextRun, _ as Font, a as Cell, b as NumFmt, c as CellType, d as ColumnProps, f as ColumnWidth, g as Fill, h as ErrorCode, i as BorderStyle, j as Workbook, k as Style, l as CellValue, m as DocProperties, n as Border, o as CellErrorValue, p as DefinedName, r as BorderSide, s as CellInput, t as Alignment, u as Color, v as GradientFill, w as RichText, x as PatternFill, y as Hyperlink } from "./model-BUNp7B0Z.cjs";
|
|
15
15
|
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.cjs";
|
|
16
|
-
import { t as Progress } from "./write-
|
|
16
|
+
import { t as Progress } from "./write-BbV7BlbS.cjs";
|
|
17
17
|
/** Result of `read`. */
|
|
18
18
|
export interface ReadResult {
|
|
19
19
|
workbook: Workbook<Cell>;
|
|
@@ -189,4 +189,51 @@ export declare function readSheetNames(input: BinaryInput, options?: {
|
|
|
189
189
|
}): Promise<SheetInfo[]>;
|
|
190
190
|
/** Reads an .xlsx, .xlsm, .xltx or .xltm file into the model. */
|
|
191
191
|
export declare function read(input: BinaryInput, options?: ReadOptions): Promise<ReadResult>;
|
|
192
|
+
/** Options for `inspect`: the limits and the signal, as for `read`. */
|
|
193
|
+
export interface InspectOptions {
|
|
194
|
+
limits?: Partial<ReadLimits> | undefined;
|
|
195
|
+
/** Rejects with `signal.reason` when aborted. */
|
|
196
|
+
signal?: AbortSignalLike | undefined;
|
|
197
|
+
}
|
|
198
|
+
/** The formats `inspect` (like `read`) accepts. */
|
|
199
|
+
export type InspectFormat = "xlsx" | "xlsm" | "xltx" | "xltm";
|
|
200
|
+
/** A worksheet as `inspect` found it. */
|
|
201
|
+
export interface InspectedSheet {
|
|
202
|
+
name: string;
|
|
203
|
+
/** Position among the worksheets, as in `readSheetNames` and `read`'s `workbook.sheets`. */
|
|
204
|
+
index: number;
|
|
205
|
+
state: "visible" | "hidden" | "veryHidden";
|
|
206
|
+
/** The sheet's part; left out when the part is missing (`read` gives an empty sheet). */
|
|
207
|
+
part?: string;
|
|
208
|
+
/** Cells as `maxCells` counts them: each `<c>` kept with a value, formula or style (a cell written twice counts twice; hyperlink-only cells are not counted). */
|
|
209
|
+
cells: number;
|
|
210
|
+
/** The used range of those cells, as `read` sets `sheet.dimension`; left out for a sheet without cells. */
|
|
211
|
+
dimension?: string;
|
|
212
|
+
}
|
|
213
|
+
/** Result of `inspect`. */
|
|
214
|
+
export interface InspectResult {
|
|
215
|
+
format: InspectFormat;
|
|
216
|
+
/** The worksheets in book order (chart, dialog and macro sheets are part kinds, not worksheets). */
|
|
217
|
+
sheets: InspectedSheet[];
|
|
218
|
+
/** The kinds of the `warnings`, each once, in the order found. */
|
|
219
|
+
partKinds: ExcelPartKind[];
|
|
220
|
+
/** The `UNSUPPORTED_PART` warnings `read` gives for this file, the same objects (no other warnings, and not capped by `maxWarnings`). */
|
|
221
|
+
warnings: ExcelWarning[];
|
|
222
|
+
/** Parts in the package (zip entries that are not folders). */
|
|
223
|
+
parts: number;
|
|
224
|
+
/** Bytes inflated, counted as `maxTotalBytes` counts them (a part read twice counts twice). */
|
|
225
|
+
inflatedBytes: number;
|
|
226
|
+
/** Cells of all worksheets together, as `maxCells` counts them (the sum of `sheets[].cells`). */
|
|
227
|
+
cells: number;
|
|
228
|
+
/** Items in the shared strings table. */
|
|
229
|
+
sharedStrings: number;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Checks an .xlsx, .xlsm, .xltx or .xltm file part by part without building
|
|
233
|
+
* its cells: every part `read` parses is parsed with the same checks and
|
|
234
|
+
* limits (every sheet to its end), every other part is inflated and its
|
|
235
|
+
* bytes searched for a DOCTYPE, and XML parts must be UTF-8 or UTF-16. Throws what `read` throws for any file
|
|
236
|
+
* `read` refuses under the same limits (docs/api.md §5.2.1).
|
|
237
|
+
*/
|
|
238
|
+
export declare function inspect(input: BinaryInput, options?: InspectOptions): Promise<InspectResult>;
|
|
192
239
|
export { type AbortSignalLike, type Alignment, type BinaryInput, type BlobLike, type BlobType, type Border, type BorderSide, type BorderStyle, type Cell, type CellErrorValue, type CellInput, type CellType, type CellValue, type Color, type ColumnProps, type ColumnWidth, type DefinedName, type DocProperties, type DroppedWarnings, type ErrorCode, type ExcelPartKind, type ExcelWarning, type ExcelWarningCode, type Fill, type Font, type GradientFill, type Hyperlink, type NumFmt, type PatternFill, type PatternType, type PrintSetup, type Progress, type RichText, type RichTextRun, type RowProps, type Sheet, type SheetView, type Style, type Theme, type Workbook, isDataLossWarning };
|
package/dist/read.d.ts
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module javascript-excel/read
|
|
12
12
|
*/
|
|
13
|
-
import { a as isDataLossWarning, c as BlobType, i as ExcelWarningCode, n as ExcelPartKind, o as BinaryInput, r as ExcelWarning, s as BlobLike, t as DroppedWarnings } from "./warnings-
|
|
13
|
+
import { a as isDataLossWarning, c as BlobType, i as ExcelWarningCode, n as ExcelPartKind, o as BinaryInput, r as ExcelWarning, s as BlobLike, t as DroppedWarnings } from "./warnings-Bphby2c7.js";
|
|
14
14
|
import { A as Theme, C as PrintSetup, D as Sheet, E as RowProps, O as SheetView, S as PatternType, T as RichTextRun, _ as Font, a as Cell, b as NumFmt, c as CellType, d as ColumnProps, f as ColumnWidth, g as Fill, h as ErrorCode, i as BorderStyle, j as Workbook, k as Style, l as CellValue, m as DocProperties, n as Border, o as CellErrorValue, p as DefinedName, r as BorderSide, s as CellInput, t as Alignment, u as Color, v as GradientFill, w as RichText, x as PatternFill, y as Hyperlink } from "./model-BUNp7B0Z.js";
|
|
15
15
|
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.js";
|
|
16
|
-
import { t as Progress } from "./write-
|
|
16
|
+
import { t as Progress } from "./write-DryxCc2Q.js";
|
|
17
17
|
/** Result of `read`. */
|
|
18
18
|
export interface ReadResult {
|
|
19
19
|
workbook: Workbook<Cell>;
|
|
@@ -189,4 +189,51 @@ export declare function readSheetNames(input: BinaryInput, options?: {
|
|
|
189
189
|
}): Promise<SheetInfo[]>;
|
|
190
190
|
/** Reads an .xlsx, .xlsm, .xltx or .xltm file into the model. */
|
|
191
191
|
export declare function read(input: BinaryInput, options?: ReadOptions): Promise<ReadResult>;
|
|
192
|
+
/** Options for `inspect`: the limits and the signal, as for `read`. */
|
|
193
|
+
export interface InspectOptions {
|
|
194
|
+
limits?: Partial<ReadLimits> | undefined;
|
|
195
|
+
/** Rejects with `signal.reason` when aborted. */
|
|
196
|
+
signal?: AbortSignalLike | undefined;
|
|
197
|
+
}
|
|
198
|
+
/** The formats `inspect` (like `read`) accepts. */
|
|
199
|
+
export type InspectFormat = "xlsx" | "xlsm" | "xltx" | "xltm";
|
|
200
|
+
/** A worksheet as `inspect` found it. */
|
|
201
|
+
export interface InspectedSheet {
|
|
202
|
+
name: string;
|
|
203
|
+
/** Position among the worksheets, as in `readSheetNames` and `read`'s `workbook.sheets`. */
|
|
204
|
+
index: number;
|
|
205
|
+
state: "visible" | "hidden" | "veryHidden";
|
|
206
|
+
/** The sheet's part; left out when the part is missing (`read` gives an empty sheet). */
|
|
207
|
+
part?: string;
|
|
208
|
+
/** Cells as `maxCells` counts them: each `<c>` kept with a value, formula or style (a cell written twice counts twice; hyperlink-only cells are not counted). */
|
|
209
|
+
cells: number;
|
|
210
|
+
/** The used range of those cells, as `read` sets `sheet.dimension`; left out for a sheet without cells. */
|
|
211
|
+
dimension?: string;
|
|
212
|
+
}
|
|
213
|
+
/** Result of `inspect`. */
|
|
214
|
+
export interface InspectResult {
|
|
215
|
+
format: InspectFormat;
|
|
216
|
+
/** The worksheets in book order (chart, dialog and macro sheets are part kinds, not worksheets). */
|
|
217
|
+
sheets: InspectedSheet[];
|
|
218
|
+
/** The kinds of the `warnings`, each once, in the order found. */
|
|
219
|
+
partKinds: ExcelPartKind[];
|
|
220
|
+
/** The `UNSUPPORTED_PART` warnings `read` gives for this file, the same objects (no other warnings, and not capped by `maxWarnings`). */
|
|
221
|
+
warnings: ExcelWarning[];
|
|
222
|
+
/** Parts in the package (zip entries that are not folders). */
|
|
223
|
+
parts: number;
|
|
224
|
+
/** Bytes inflated, counted as `maxTotalBytes` counts them (a part read twice counts twice). */
|
|
225
|
+
inflatedBytes: number;
|
|
226
|
+
/** Cells of all worksheets together, as `maxCells` counts them (the sum of `sheets[].cells`). */
|
|
227
|
+
cells: number;
|
|
228
|
+
/** Items in the shared strings table. */
|
|
229
|
+
sharedStrings: number;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Checks an .xlsx, .xlsm, .xltx or .xltm file part by part without building
|
|
233
|
+
* its cells: every part `read` parses is parsed with the same checks and
|
|
234
|
+
* limits (every sheet to its end), every other part is inflated and its
|
|
235
|
+
* bytes searched for a DOCTYPE, and XML parts must be UTF-8 or UTF-16. Throws what `read` throws for any file
|
|
236
|
+
* `read` refuses under the same limits (docs/api.md §5.2.1).
|
|
237
|
+
*/
|
|
238
|
+
export declare function inspect(input: BinaryInput, options?: InspectOptions): Promise<InspectResult>;
|
|
192
239
|
export { type AbortSignalLike, type Alignment, type BinaryInput, type BlobLike, type BlobType, type Border, type BorderSide, type BorderStyle, type Cell, type CellErrorValue, type CellInput, type CellType, type CellValue, type Color, type ColumnProps, type ColumnWidth, type DefinedName, type DocProperties, type DroppedWarnings, type ErrorCode, type ExcelPartKind, type ExcelWarning, type ExcelWarningCode, type Fill, type Font, type GradientFill, type Hyperlink, type NumFmt, type PatternFill, type PatternType, type PrintSetup, type Progress, type RichText, type RichTextRun, type RowProps, type Sheet, type SheetView, type Style, type Theme, type Workbook, isDataLossWarning };
|
package/dist/read.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as isDataLossWarning } from "./warnings-BPz1Ia3s.js";
|
|
2
|
-
import {
|
|
3
|
-
export { DEFAULT_READ_LIMITS, detectFormat, isDataLossWarning, read, readSheetNames };
|
|
2
|
+
import { a as readSheetNames, i as read, n as detectFormat, r as inspect, t as DEFAULT_READ_LIMITS } from "./read-CrI550TK.js";
|
|
3
|
+
export { DEFAULT_READ_LIMITS, detectFormat, inspect, isDataLossWarning, read, readSheetNames };
|
package/dist/render.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_address = require("./address-
|
|
2
|
+
const require_address = require("./address-DKd_3EGf.cjs");
|
|
3
3
|
const require_cells = require("./cells-CPXU722t.cjs");
|
|
4
4
|
const require_colors = require("./colors-oBpjx97l.cjs");
|
|
5
|
-
const require_dates = require("./dates-
|
|
5
|
+
const require_dates = require("./dates-DcdgnJto.cjs");
|
|
6
6
|
// src/render.ts
|
|
7
7
|
const states = /* @__PURE__ */ new WeakMap();
|
|
8
8
|
const BUCKET = 64;
|
package/dist/render.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as decodeRange, n as MAX_ROWS, r as decodeCell, t as MAX_COLS } from "./address-
|
|
1
|
+
import { a as decodeRange, n as MAX_ROWS, r as decodeCell, t as MAX_COLS } from "./address-BGH42dEg.js";
|
|
2
2
|
import { t as cellText } from "./cells-CrMF8h_t.js";
|
|
3
3
|
import { t as resolveColor } from "./colors-B8Nf_xTx.js";
|
|
4
|
-
import { t as dateToSerial } from "./dates-
|
|
4
|
+
import { t as dateToSerial } from "./dates-CIL1z9EY.js";
|
|
5
5
|
// src/render.ts
|
|
6
6
|
const states = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
const BUCKET = 64;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
2
|
-
const require_address = require("./address-
|
|
1
|
+
const require_errors = require("./errors-CKYdpCoB.cjs");
|
|
2
|
+
const require_address = require("./address-DKd_3EGf.cjs");
|
|
3
3
|
// src/internal/xml.ts
|
|
4
4
|
/**
|
|
5
5
|
* XML text helpers for the writer.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as ValidationError } from "./errors-
|
|
2
|
-
import { a as decodeRange, i as decodeCol, n as MAX_ROWS, o as encodeCell, r as decodeCell, s as encodeCol, t as MAX_COLS } from "./address-
|
|
1
|
+
import { o as ValidationError } from "./errors-BQE62PFo.js";
|
|
2
|
+
import { a as decodeRange, i as decodeCol, n as MAX_ROWS, o as encodeCell, r as decodeCell, s as encodeCol, t as MAX_COLS } from "./address-BGH42dEg.js";
|
|
3
3
|
// src/internal/xml.ts
|
|
4
4
|
/**
|
|
5
5
|
* XML text helpers for the writer.
|
|
@@ -32,10 +32,19 @@ type ExcelWarningCode = "UNSUPPORTED_PART" | "INVALID_STYLE_INDEX" | "INVALID_SH
|
|
|
32
32
|
* The kind of package part a `MISSING_PART`, `BROKEN_OPTIONAL_PART` or
|
|
33
33
|
* `UNSUPPORTED_PART` warning is about. The names are the last segment of the
|
|
34
34
|
* OOXML relationship type (`.../relationships/worksheet` is `'worksheet'`),
|
|
35
|
-
* in camelCase for the document-property parts.
|
|
35
|
+
* in camelCase for the document-property parts. The kinds the package scan
|
|
36
|
+
* adds are named for what they are: `'activeX'` (ActiveX controls),
|
|
37
|
+
* `'embeddedPackage'` (embedded files), `'customUI'` (ribbon customisation),
|
|
38
|
+
* `'webExtension'` (Office web add-ins), `'invalidPartName'` (a part name,
|
|
39
|
+
* relationship target, Override PartName or relationship OPC forbids) and `'unreferencedPart'` (a part no relationship reaches).
|
|
40
|
+
* `'externalTarget'` (since 2.6) is any relationship that is not a hyperlink
|
|
41
|
+
* and is external, or may be read as external (an odd or duplicate
|
|
42
|
+
* TargetMode, an internal target with a URI scheme, `//` or a backslash),
|
|
43
|
+
* whatever its kind, such as a linked picture Excel fetches when the file
|
|
44
|
+
* is opened. Kinds may be added in a minor
|
|
36
45
|
* release, so a `switch` over it needs a `default` branch.
|
|
37
46
|
*/
|
|
38
|
-
type ExcelPartKind = "worksheet" | "sharedStrings" | "styles" | "theme" | "coreProperties" | "extendedProperties" | "customProperties" | "drawing" | "vmlDrawing" | "comments" | "threadedComment" | "pivotTable" | "pivotCacheDefinition" | "table" | "oleObject" | "ctrlProp" | "image" | "vbaProject" | "externalLink" | "connections" | "queryTable" | "slicer" | "slicerCache" | "timeline" | "chartsheet" | "dialogsheet" | "macrosheet";
|
|
47
|
+
type ExcelPartKind = "worksheet" | "sharedStrings" | "styles" | "theme" | "coreProperties" | "extendedProperties" | "customProperties" | "drawing" | "vmlDrawing" | "comments" | "threadedComment" | "pivotTable" | "pivotCacheDefinition" | "table" | "oleObject" | "ctrlProp" | "image" | "vbaProject" | "externalLink" | "connections" | "queryTable" | "slicer" | "slicerCache" | "timeline" | "chartsheet" | "dialogsheet" | "macrosheet" | "activeX" | "embeddedPackage" | "customUI" | "webExtension" | "invalidPartName" | "unreferencedPart" | "externalTarget";
|
|
39
48
|
/** What the warning cap left out; on `WARNINGS_TRUNCATED` only. */
|
|
40
49
|
interface DroppedWarnings {
|
|
41
50
|
/** Warnings not recorded, in total. */
|
|
@@ -60,6 +69,23 @@ interface ExcelWarning {
|
|
|
60
69
|
ref?: string | undefined;
|
|
61
70
|
/** On `MISSING_PART`, `BROKEN_OPTIONAL_PART` and `UNSUPPORTED_PART`: the kind of part. */
|
|
62
71
|
partKind?: ExcelPartKind | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* On `UNSUPPORTED_PART` with `partKind` `'unreferencedPart'` or
|
|
74
|
+
* `'invalidPartName'` (since 2.5): every such name, in the order found
|
|
75
|
+
* (`part` is the first). With `'externalTarget'` (since 2.6): every
|
|
76
|
+
* relationships part that holds such a relationship, in the order the
|
|
77
|
+
* package scan reads them. Each is a zip entry name, at most once, so the
|
|
78
|
+
* list is bounded by `maxEntries`.
|
|
79
|
+
*/
|
|
80
|
+
parts?: string[] | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* On `UNSUPPORTED_PART` with `partKind` `'externalTarget'` (since 2.6): the
|
|
83
|
+
* relationship types of those relationships, the first 16 distinct ones
|
|
84
|
+
* (compared without regard to case), each as written when it is at most
|
|
85
|
+
* 128 characters, else its first 64, `…` and its length. Targets are never
|
|
86
|
+
* included.
|
|
87
|
+
*/
|
|
88
|
+
relationshipTypes?: string[] | undefined;
|
|
63
89
|
/**
|
|
64
90
|
* On `WARNINGS_TRUNCATED`: counts of the warnings that were not recorded. The
|
|
65
91
|
* counts are final in the returned `warnings` only. `read` calls `onWarning`
|
|
@@ -32,10 +32,19 @@ type ExcelWarningCode = "UNSUPPORTED_PART" | "INVALID_STYLE_INDEX" | "INVALID_SH
|
|
|
32
32
|
* The kind of package part a `MISSING_PART`, `BROKEN_OPTIONAL_PART` or
|
|
33
33
|
* `UNSUPPORTED_PART` warning is about. The names are the last segment of the
|
|
34
34
|
* OOXML relationship type (`.../relationships/worksheet` is `'worksheet'`),
|
|
35
|
-
* in camelCase for the document-property parts.
|
|
35
|
+
* in camelCase for the document-property parts. The kinds the package scan
|
|
36
|
+
* adds are named for what they are: `'activeX'` (ActiveX controls),
|
|
37
|
+
* `'embeddedPackage'` (embedded files), `'customUI'` (ribbon customisation),
|
|
38
|
+
* `'webExtension'` (Office web add-ins), `'invalidPartName'` (a part name,
|
|
39
|
+
* relationship target, Override PartName or relationship OPC forbids) and `'unreferencedPart'` (a part no relationship reaches).
|
|
40
|
+
* `'externalTarget'` (since 2.6) is any relationship that is not a hyperlink
|
|
41
|
+
* and is external, or may be read as external (an odd or duplicate
|
|
42
|
+
* TargetMode, an internal target with a URI scheme, `//` or a backslash),
|
|
43
|
+
* whatever its kind, such as a linked picture Excel fetches when the file
|
|
44
|
+
* is opened. Kinds may be added in a minor
|
|
36
45
|
* release, so a `switch` over it needs a `default` branch.
|
|
37
46
|
*/
|
|
38
|
-
type ExcelPartKind = "worksheet" | "sharedStrings" | "styles" | "theme" | "coreProperties" | "extendedProperties" | "customProperties" | "drawing" | "vmlDrawing" | "comments" | "threadedComment" | "pivotTable" | "pivotCacheDefinition" | "table" | "oleObject" | "ctrlProp" | "image" | "vbaProject" | "externalLink" | "connections" | "queryTable" | "slicer" | "slicerCache" | "timeline" | "chartsheet" | "dialogsheet" | "macrosheet";
|
|
47
|
+
type ExcelPartKind = "worksheet" | "sharedStrings" | "styles" | "theme" | "coreProperties" | "extendedProperties" | "customProperties" | "drawing" | "vmlDrawing" | "comments" | "threadedComment" | "pivotTable" | "pivotCacheDefinition" | "table" | "oleObject" | "ctrlProp" | "image" | "vbaProject" | "externalLink" | "connections" | "queryTable" | "slicer" | "slicerCache" | "timeline" | "chartsheet" | "dialogsheet" | "macrosheet" | "activeX" | "embeddedPackage" | "customUI" | "webExtension" | "invalidPartName" | "unreferencedPart" | "externalTarget";
|
|
39
48
|
/** What the warning cap left out; on `WARNINGS_TRUNCATED` only. */
|
|
40
49
|
interface DroppedWarnings {
|
|
41
50
|
/** Warnings not recorded, in total. */
|
|
@@ -60,6 +69,23 @@ interface ExcelWarning {
|
|
|
60
69
|
ref?: string | undefined;
|
|
61
70
|
/** On `MISSING_PART`, `BROKEN_OPTIONAL_PART` and `UNSUPPORTED_PART`: the kind of part. */
|
|
62
71
|
partKind?: ExcelPartKind | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* On `UNSUPPORTED_PART` with `partKind` `'unreferencedPart'` or
|
|
74
|
+
* `'invalidPartName'` (since 2.5): every such name, in the order found
|
|
75
|
+
* (`part` is the first). With `'externalTarget'` (since 2.6): every
|
|
76
|
+
* relationships part that holds such a relationship, in the order the
|
|
77
|
+
* package scan reads them. Each is a zip entry name, at most once, so the
|
|
78
|
+
* list is bounded by `maxEntries`.
|
|
79
|
+
*/
|
|
80
|
+
parts?: string[] | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* On `UNSUPPORTED_PART` with `partKind` `'externalTarget'` (since 2.6): the
|
|
83
|
+
* relationship types of those relationships, the first 16 distinct ones
|
|
84
|
+
* (compared without regard to case), each as written when it is at most
|
|
85
|
+
* 128 characters, else its first 64, `…` and its length. Targets are never
|
|
86
|
+
* included.
|
|
87
|
+
*/
|
|
88
|
+
relationshipTypes?: string[] | undefined;
|
|
63
89
|
/**
|
|
64
90
|
* On `WARNINGS_TRUNCATED`: counts of the warnings that were not recorded. The
|
|
65
91
|
* counts are final in the returned `warnings` only. `read` calls `onWarning`
|
package/dist/worker.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_csv = require("./csv-
|
|
3
|
-
const require_errors = require("./errors-
|
|
4
|
-
const require_read = require("./read-
|
|
5
|
-
const require_pipeline = require("./pipeline-
|
|
6
|
-
const require_write = require("./write-
|
|
2
|
+
const require_csv = require("./csv-BkVmMYQq.cjs");
|
|
3
|
+
const require_errors = require("./errors-CKYdpCoB.cjs");
|
|
4
|
+
const require_read = require("./read-X1KxggZ7.cjs");
|
|
5
|
+
const require_pipeline = require("./pipeline-C13EIWHJ.cjs");
|
|
6
|
+
const require_write = require("./write-Bgl_QfA8.cjs");
|
|
7
7
|
// src/worker.ts
|
|
8
8
|
/** Marks the library's messages, so an app can use the same worker for its own messages too. */
|
|
9
9
|
const TAG = "javascript-excel/worker@1";
|
package/dist/worker.d.cts
CHANGED
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
*
|
|
22
22
|
* @module javascript-excel/worker
|
|
23
23
|
*/
|
|
24
|
-
import { o as BinaryInput } from "./warnings-
|
|
24
|
+
import { o as BinaryInput } from "./warnings-Bphby2c7.cjs";
|
|
25
25
|
import { CsvParseOptions, CsvParseResult, CsvReadOptions, CsvWriteOptions } from "./csv.cjs";
|
|
26
26
|
import { D as Sheet, j as Workbook, s as CellInput } from "./model-BUNp7B0Z.cjs";
|
|
27
27
|
import { ReadOptions, ReadResult } from "./read.cjs";
|
|
28
|
-
import { n as ImportDatasetOptions, r as ImportDatasetResult } from "./pipeline-
|
|
29
|
-
import { n as WriteOptions, t as Progress } from "./write-
|
|
28
|
+
import { n as ImportDatasetOptions, r as ImportDatasetResult } from "./pipeline-C7R86kQg.cjs";
|
|
29
|
+
import { n as WriteOptions, t as Progress } from "./write-BbV7BlbS.cjs";
|
|
30
30
|
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.cjs";
|
|
31
31
|
/** The side of a message channel the library uses: a `Worker`, the worker's `self`, or a `MessagePort`. */
|
|
32
32
|
export interface MessageEndpoint {
|
|
@@ -55,7 +55,7 @@ export interface WorkerClient {
|
|
|
55
55
|
write(wb: Workbook, options?: WriteOptions & TransferOption): Promise<Uint8Array>;
|
|
56
56
|
read(input: BinaryInput, options?: ReadOptions & TransferOption): Promise<ReadResult>;
|
|
57
57
|
toCsv(source: Sheet | CellInput[][], options?: CsvWriteOptions): Promise<string>;
|
|
58
|
-
parseCsv(input: string | BinaryInput, options?: (CsvParseOptions & Pick<CsvReadOptions, "encoding" | "signal">) & TransferOption): Promise<CsvParseResult>;
|
|
58
|
+
parseCsv(input: string | BinaryInput, options?: (CsvParseOptions & Pick<CsvReadOptions, "encoding" | "signal" | "rejectBinary" | "maxInputBytes">) & TransferOption): Promise<CsvParseResult>;
|
|
59
59
|
/** Runs javascript-excel/import's `importDataset` in the worker (docs/api.md §5.6). */
|
|
60
60
|
importDataset(input: string | BinaryInput, options?: ImportDatasetOptions & TransferOption): Promise<ImportDatasetResult>;
|
|
61
61
|
/** Terminates the worker. Calls still in flight reject with an `AbortError`. */
|
package/dist/worker.d.ts
CHANGED
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
*
|
|
22
22
|
* @module javascript-excel/worker
|
|
23
23
|
*/
|
|
24
|
-
import { o as BinaryInput } from "./warnings-
|
|
24
|
+
import { o as BinaryInput } from "./warnings-Bphby2c7.js";
|
|
25
25
|
import { CsvParseOptions, CsvParseResult, CsvReadOptions, CsvWriteOptions } from "./csv.js";
|
|
26
26
|
import { D as Sheet, j as Workbook, s as CellInput } from "./model-BUNp7B0Z.js";
|
|
27
27
|
import { ReadOptions, ReadResult } from "./read.js";
|
|
28
|
-
import { n as ImportDatasetOptions, r as ImportDatasetResult } from "./pipeline-
|
|
29
|
-
import { n as WriteOptions, t as Progress } from "./write-
|
|
28
|
+
import { n as ImportDatasetOptions, r as ImportDatasetResult } from "./pipeline-BY-SiQWW.js";
|
|
29
|
+
import { n as WriteOptions, t as Progress } from "./write-DryxCc2Q.js";
|
|
30
30
|
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.js";
|
|
31
31
|
/** The side of a message channel the library uses: a `Worker`, the worker's `self`, or a `MessagePort`. */
|
|
32
32
|
export interface MessageEndpoint {
|
|
@@ -55,7 +55,7 @@ export interface WorkerClient {
|
|
|
55
55
|
write(wb: Workbook, options?: WriteOptions & TransferOption): Promise<Uint8Array>;
|
|
56
56
|
read(input: BinaryInput, options?: ReadOptions & TransferOption): Promise<ReadResult>;
|
|
57
57
|
toCsv(source: Sheet | CellInput[][], options?: CsvWriteOptions): Promise<string>;
|
|
58
|
-
parseCsv(input: string | BinaryInput, options?: (CsvParseOptions & Pick<CsvReadOptions, "encoding" | "signal">) & TransferOption): Promise<CsvParseResult>;
|
|
58
|
+
parseCsv(input: string | BinaryInput, options?: (CsvParseOptions & Pick<CsvReadOptions, "encoding" | "signal" | "rejectBinary" | "maxInputBytes">) & TransferOption): Promise<CsvParseResult>;
|
|
59
59
|
/** Runs javascript-excel/import's `importDataset` in the worker (docs/api.md §5.6). */
|
|
60
60
|
importDataset(input: string | BinaryInput, options?: ImportDatasetOptions & TransferOption): Promise<ImportDatasetResult>;
|
|
61
61
|
/** Terminates the worker. Calls still in flight reject with an `AbortError`. */
|
package/dist/worker.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as toCsv, r as readCsv } from "./csv-
|
|
2
|
-
import { a as LimitError, i as FormatError, n as EnvironmentError, o as ValidationError, r as ExcelError, s as isExcelError, t as CsvError } from "./errors-
|
|
3
|
-
import {
|
|
4
|
-
import { t as importDataset } from "./pipeline-
|
|
5
|
-
import { r as toUint8Array } from "./write-
|
|
1
|
+
import { i as toCsv, r as readCsv } from "./csv-5jVhfM5l.js";
|
|
2
|
+
import { a as LimitError, i as FormatError, n as EnvironmentError, o as ValidationError, r as ExcelError, s as isExcelError, t as CsvError } from "./errors-BQE62PFo.js";
|
|
3
|
+
import { i as read } from "./read-CrI550TK.js";
|
|
4
|
+
import { t as importDataset } from "./pipeline-BRzRd5v3.js";
|
|
5
|
+
import { r as toUint8Array } from "./write-DFz-h8gz.js";
|
|
6
6
|
// src/worker.ts
|
|
7
7
|
/** Marks the library's messages, so an app can use the same worker for its own messages too. */
|
|
8
8
|
const TAG = "javascript-excel/worker@1";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as BlobType } from "./warnings-
|
|
1
|
+
import { c as BlobType } from "./warnings-Bphby2c7.cjs";
|
|
2
2
|
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.cjs";
|
|
3
3
|
import { j as Workbook } from "./model-BUNp7B0Z.cjs";
|
|
4
4
|
/** MIME type of an .xlsx file. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
2
|
-
const require_dos_time = require("./dos-time-
|
|
3
|
-
const require_sheet_names = require("./sheet-names-
|
|
4
|
-
const require_address = require("./address-
|
|
5
|
-
const require_dates = require("./dates-
|
|
1
|
+
const require_errors = require("./errors-CKYdpCoB.cjs");
|
|
2
|
+
const require_dos_time = require("./dos-time-BUWyklco.cjs");
|
|
3
|
+
const require_sheet_names = require("./sheet-names-D8sYcjSd.cjs");
|
|
4
|
+
const require_address = require("./address-DKd_3EGf.cjs");
|
|
5
|
+
const require_dates = require("./dates-DcdgnJto.cjs");
|
|
6
6
|
const require_cells = require("./cells-CPXU722t.cjs");
|
|
7
7
|
const SIG_LOCAL = 67324752;
|
|
8
8
|
const SIG_CENTRAL = 33639248;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as EnvironmentError, o as ValidationError } from "./errors-
|
|
2
|
-
import { c as throttleProgress, d as throwIfAborted, i as nativeCodec, l as ByteWriter, n as toDosDateTime, o as encodeUtf8, r as crc32, s as createYielder, u as concatBytes } from "./dos-time-
|
|
3
|
-
import { _ as num, a as SheetFeatures, b as xstring, c as hyperlinkSchemes, d as PackageParts, f as REL_TYPE, g as needsPreserve, h as XML_DECL, m as mergeStyles, n as validateSheetName, o as SheetLinks, p as Rels, s as hyperlinkOf, u as CONTENT_TYPE, v as xmlAttr, y as xmlText } from "./sheet-names-
|
|
4
|
-
import { a as decodeRange, n as MAX_ROWS, s as encodeCol } from "./address-
|
|
5
|
-
import { t as dateToSerial } from "./dates-
|
|
1
|
+
import { n as EnvironmentError, o as ValidationError } from "./errors-BQE62PFo.js";
|
|
2
|
+
import { c as throttleProgress, d as throwIfAborted, i as nativeCodec, l as ByteWriter, n as toDosDateTime, o as encodeUtf8, r as crc32, s as createYielder, u as concatBytes } from "./dos-time-BEAyK3U8.js";
|
|
3
|
+
import { _ as num, a as SheetFeatures, b as xstring, c as hyperlinkSchemes, d as PackageParts, f as REL_TYPE, g as needsPreserve, h as XML_DECL, m as mergeStyles, n as validateSheetName, o as SheetLinks, p as Rels, s as hyperlinkOf, u as CONTENT_TYPE, v as xmlAttr, y as xmlText } from "./sheet-names-RoFkpk_R.js";
|
|
4
|
+
import { a as decodeRange, n as MAX_ROWS, s as encodeCol } from "./address-BGH42dEg.js";
|
|
5
|
+
import { t as dateToSerial } from "./dates-CIL1z9EY.js";
|
|
6
6
|
import { t as cellText } from "./cells-CrMF8h_t.js";
|
|
7
7
|
const SIG_LOCAL = 67324752;
|
|
8
8
|
const SIG_CENTRAL = 33639248;
|
package/package.json
CHANGED