js.documents 2.3.1 → 2.3.3
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/convert/convert.cjs +12 -2
- package/dist/convert/convert.js +12 -2
- package/package.json +2 -2
package/dist/convert/convert.cjs
CHANGED
|
@@ -306,14 +306,24 @@ function odbToXlsx(bytes, options) {
|
|
|
306
306
|
const tables = require_odb_read.readOdbTables(pkg, { timeZone: options?.timeZone });
|
|
307
307
|
require_ports_abort.throwIfAborted(options?.signal);
|
|
308
308
|
const content = require_odb_spreadsheet.odbTablesToSpreadsheetDocument(tables);
|
|
309
|
-
|
|
309
|
+
const out = (0, ooxml_js.encodePackage)((0, ooxml_js.buildXlsxPackage)(content));
|
|
310
|
+
options?.onDocument?.({
|
|
311
|
+
formatVersion: document_schema_js.DOCUMENT_PACKAGE_FORMAT_VERSION,
|
|
312
|
+
content
|
|
313
|
+
});
|
|
314
|
+
return out;
|
|
310
315
|
}
|
|
311
316
|
function odbToCsv(bytes, options) {
|
|
312
317
|
require_ports_abort.throwIfAborted(options?.signal);
|
|
313
318
|
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
314
319
|
const tables = require_odb_read.readOdbTables(pkg, { timeZone: options?.timeZone });
|
|
315
320
|
require_ports_abort.throwIfAborted(options?.signal);
|
|
316
|
-
|
|
321
|
+
const csv = require_odb_csv.buildOdbTableCsv(tables, options?.table);
|
|
322
|
+
if (options?.onDocument !== void 0) options.onDocument({
|
|
323
|
+
formatVersion: document_schema_js.DOCUMENT_PACKAGE_FORMAT_VERSION,
|
|
324
|
+
content: require_odb_spreadsheet.odbTablesToSpreadsheetDocument(tables)
|
|
325
|
+
});
|
|
326
|
+
return csv;
|
|
317
327
|
}
|
|
318
328
|
function odbReportToDocx(content, options) {
|
|
319
329
|
require_ports_abort.throwIfAborted(options?.signal);
|
package/dist/convert/convert.js
CHANGED
|
@@ -305,14 +305,24 @@ function odbToXlsx(bytes, options) {
|
|
|
305
305
|
const tables = readOdbTables(pkg, { timeZone: options?.timeZone });
|
|
306
306
|
throwIfAborted(options?.signal);
|
|
307
307
|
const content = odbTablesToSpreadsheetDocument(tables);
|
|
308
|
-
|
|
308
|
+
const out = encodePackage(buildXlsxPackage(content));
|
|
309
|
+
options?.onDocument?.({
|
|
310
|
+
formatVersion: DOCUMENT_PACKAGE_FORMAT_VERSION,
|
|
311
|
+
content
|
|
312
|
+
});
|
|
313
|
+
return out;
|
|
309
314
|
}
|
|
310
315
|
function odbToCsv(bytes, options) {
|
|
311
316
|
throwIfAborted(options?.signal);
|
|
312
317
|
const pkg = decodePackage$1(bytes);
|
|
313
318
|
const tables = readOdbTables(pkg, { timeZone: options?.timeZone });
|
|
314
319
|
throwIfAborted(options?.signal);
|
|
315
|
-
|
|
320
|
+
const csv = buildOdbTableCsv(tables, options?.table);
|
|
321
|
+
if (options?.onDocument !== void 0) options.onDocument({
|
|
322
|
+
formatVersion: DOCUMENT_PACKAGE_FORMAT_VERSION,
|
|
323
|
+
content: odbTablesToSpreadsheetDocument(tables)
|
|
324
|
+
});
|
|
325
|
+
return csv;
|
|
316
326
|
}
|
|
317
327
|
function odbReportToDocx(content, options) {
|
|
318
328
|
throwIfAborted(options?.signal);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js.documents",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"markdown-codec": "^2.0.0",
|
|
68
68
|
"odf.js": "^3.0.1",
|
|
69
69
|
"ooxml.js": "^2.16.0",
|
|
70
|
-
"pdf-codec": "^
|
|
70
|
+
"pdf-codec": "^3.0.0",
|
|
71
71
|
"temml": "0.13.4",
|
|
72
72
|
"zod": "^4.4.3"
|
|
73
73
|
},
|