@ai-matrx/records 0.81.3 → 0.82.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/CHANGELOG.md +23 -0
- package/dist/app-table/index.cjs +1 -1
- package/dist/app-table/index.cjs.map +1 -1
- package/dist/app-table/index.js +1 -1
- package/dist/app-table/index.js.map +1 -1
- package/dist/core/index.cjs +3 -3
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +3 -3
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +1 -1
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.js +1 -1
- package/dist/data/index.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/templates/index.cjs +542 -5
- package/dist/templates/index.cjs.map +1 -1
- package/dist/templates/index.js +542 -5
- package/dist/templates/index.js.map +1 -1
- package/package.json +4 -4
package/dist/core/index.cjs
CHANGED
|
@@ -1580,7 +1580,7 @@ function exportCellText(value) {
|
|
|
1580
1580
|
return JSON.stringify(value);
|
|
1581
1581
|
}
|
|
1582
1582
|
async function exportPageXlsx(page, labels = {}, sheetLabel = "Records") {
|
|
1583
|
-
const { writeWorkbookBytes } = await import("@ai-matrx/
|
|
1583
|
+
const { writeWorkbookBytes } = await import("@ai-matrx/print/xlsx");
|
|
1584
1584
|
const header = page.columns.map((c) => labels[c] ?? c);
|
|
1585
1585
|
const body = page.rows.map((row) => page.columns.map((c) => exportCellText(row[c])));
|
|
1586
1586
|
const name = sheetLabel.replace(/[\\/?*[\]:]/g, " ").trim().slice(0, 31) || "Records";
|
|
@@ -10241,7 +10241,7 @@ function toAoa(fields, rows2) {
|
|
|
10241
10241
|
return [fields.map(headerFor), ...rows2.map((row) => fields.map((f) => exportCellText2(f, row[f.key])))];
|
|
10242
10242
|
}
|
|
10243
10243
|
async function exportXlsx(fields, rows2, sheetLabel = "Records") {
|
|
10244
|
-
const { writeWorkbookBytes } = await import("@ai-matrx/
|
|
10244
|
+
const { writeWorkbookBytes } = await import("@ai-matrx/print/xlsx");
|
|
10245
10245
|
const name = sheetLabel.replace(/[\\/?*[\]:]/g, " ").trim().slice(0, 31) || "Data";
|
|
10246
10246
|
return writeWorkbookBytes({ sheets: [{ name, rows: toAoa(fields, rows2) }] });
|
|
10247
10247
|
}
|
|
@@ -10252,7 +10252,7 @@ function importCsv(text2) {
|
|
|
10252
10252
|
return fromMatrix(parseCsv(text2));
|
|
10253
10253
|
}
|
|
10254
10254
|
async function importXlsx(bytes) {
|
|
10255
|
-
const { readWorkbook } = await import("@ai-matrx/
|
|
10255
|
+
const { readWorkbookBytes: readWorkbook } = await import("@ai-matrx/print/xlsx");
|
|
10256
10256
|
const sheet = (await readWorkbook(bytes)).sheets[0];
|
|
10257
10257
|
if (!sheet) return { headers: [], rows: [] };
|
|
10258
10258
|
return fromMatrix(sheet.grid({ raw: false, defval: "" }));
|