schummar-table 0.51.7 → 1.0.0-beta.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/dist/csvExporter.cjs +35 -2
- package/dist/csvExporter.cjs.map +1 -0
- package/dist/csvExporter.d.cts +3 -5
- package/dist/csvExporter.d.ts +3 -5
- package/dist/csvExporter.js +35 -2
- package/dist/csvExporter.js.map +1 -0
- package/dist/excelExporter.cjs +1 -4
- package/dist/excelExporter.cjs.map +1 -1
- package/dist/excelExporter.d.cts +1 -2
- package/dist/excelExporter.d.ts +2 -4
- package/dist/excelExporter.js +1 -2
- package/dist/excelExporter.js.map +1 -1
- package/dist/{exporter-ZZesPOOU.d.cts → exporter-BT2ehIIU.d.cts} +1 -1
- package/dist/{exporter-zK7PhTrL.d.ts → exporter-BT2ehIIU.d.ts} +1 -1
- package/dist/index.cjs +2765 -2588
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +134 -147
- package/dist/index.d.ts +134 -146
- package/dist/index.js +2671 -2517
- package/dist/index.js.map +1 -1
- package/dist/mui4Theme.cjs +25 -29
- package/dist/mui4Theme.cjs.map +1 -1
- package/dist/mui4Theme.d.cts +4 -11
- package/dist/mui4Theme.d.ts +4 -11
- package/dist/mui4Theme.js +14 -15
- package/dist/mui4Theme.js.map +1 -1
- package/dist/mui5Theme.cjs +25 -29
- package/dist/mui5Theme.cjs.map +1 -1
- package/dist/mui5Theme.d.cts +4 -11
- package/dist/mui5Theme.d.ts +4 -11
- package/dist/mui5Theme.js +14 -15
- package/dist/mui5Theme.js.map +1 -1
- package/dist/{chunk-Bp6m_JJh.js → rolldown-runtime-D7D4PA-g.js} +4 -4
- package/dist/tableTheme-BTWZIwYS.js +270 -0
- package/dist/tableTheme-BTWZIwYS.js.map +1 -0
- package/dist/tableTheme-CSqMIpLB.cjs +299 -0
- package/dist/tableTheme-CSqMIpLB.cjs.map +1 -0
- package/dist/{types-1gz-mJJm.d.cts → types-Bl56VGEh.d.ts} +178 -97
- package/dist/{types-CJOB-Acy.d.ts → types-R0UPOoXw.d.cts} +178 -97
- package/package.json +54 -48
- package/skills/schummar-table-upgrade/SKILL.md +270 -0
- package/dist/chunk-pbleEpgJ.cjs +0 -44
- package/dist/csvExporter-BGoiph1b.cjs +0 -41
- package/dist/csvExporter-BGoiph1b.cjs.map +0 -1
- package/dist/csvExporter-CqTylAk9.js +0 -35
- package/dist/csvExporter-CqTylAk9.js.map +0 -1
- package/dist/tableSettings-CCjCl2iG.js +0 -686
- package/dist/tableSettings-CCjCl2iG.js.map +0 -1
- package/dist/tableSettings-D1MSPxbQ.cjs +0 -751
- package/dist/tableSettings-D1MSPxbQ.cjs.map +0 -1
package/dist/csvExporter.cjs
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/exporters/csvExporter.ts
|
|
2
|
+
var CsvExporter = class {
|
|
3
|
+
constructor(options = {}) {
|
|
4
|
+
this.options = options;
|
|
5
|
+
this.type = "csv";
|
|
6
|
+
this.fileEnding = "csv";
|
|
7
|
+
}
|
|
8
|
+
exportToString(columns, rows, options = this.options) {
|
|
9
|
+
const { sepPrefix, separator = " ", quote = "\"", eol = "\n" } = options;
|
|
10
|
+
const cells = [columns, ...rows].map((line) => line.map((value) => {
|
|
11
|
+
let stringValue;
|
|
12
|
+
if (typeof value === "number") stringValue = String(value);
|
|
13
|
+
else if (value instanceof Date) stringValue = value.toISOString();
|
|
14
|
+
else stringValue = value;
|
|
15
|
+
if (![
|
|
16
|
+
separator,
|
|
17
|
+
quote,
|
|
18
|
+
eol
|
|
19
|
+
].some((c) => stringValue.includes(c))) return stringValue;
|
|
20
|
+
const clean = stringValue.replace(new RegExp(quote, "g"), `${quote}${quote}`);
|
|
21
|
+
return `${quote}${clean}${quote}`;
|
|
22
|
+
}));
|
|
23
|
+
return (sepPrefix ? `SEP=${separator}\n` : "") + cells.map((line) => line.join(separator)).join(eol);
|
|
24
|
+
}
|
|
25
|
+
exportToBlob(columns, rows) {
|
|
26
|
+
const data = this.exportToString(columns, rows, {
|
|
27
|
+
...this.options,
|
|
28
|
+
sepPrefix: this.options.sepPrefix ?? true
|
|
29
|
+
});
|
|
30
|
+
return new Blob([data], { type: "text/csv" });
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
module.exports = CsvExporter;
|
|
2
35
|
|
|
3
|
-
|
|
36
|
+
//# sourceMappingURL=csvExporter.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csvExporter.cjs","names":[],"sources":["../src/exporters/csvExporter.ts"],"sourcesContent":["import { BlobExporter, StringExporter } from './exporter';\n\nexport interface CsvExporterOptions {\n sepPrefix?: boolean;\n separator?: string;\n quote?: string;\n eol?: string;\n}\n\nexport default class CsvExporter implements StringExporter, BlobExporter {\n readonly type = 'csv';\n readonly fileEnding = 'csv';\n\n constructor(public readonly options: CsvExporterOptions = {}) {}\n\n exportToString(\n columns: (string | number | Date)[],\n rows: (string | number | Date)[][],\n options = this.options,\n ): string {\n const { sepPrefix, separator = '\\t', quote = '\"', eol = '\\n' } = options;\n\n const cells = [columns, ...rows].map((line) =>\n line.map((value) => {\n let stringValue: string;\n if (typeof value === 'number') {\n stringValue = String(value);\n } else if (value instanceof Date) {\n stringValue = value.toISOString();\n } else {\n stringValue = value;\n }\n\n if (![separator, quote, eol].some((c) => stringValue.includes(c))) {\n return stringValue;\n }\n\n const clean = stringValue.replace(new RegExp(quote, 'g'), `${quote}${quote}`);\n return `${quote}${clean}${quote}`;\n }),\n );\n\n return (\n (sepPrefix ? `SEP=${separator}\\n` : '') + cells.map((line) => line.join(separator)).join(eol)\n );\n }\n\n exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob {\n const data = this.exportToString(columns, rows, {\n ...this.options,\n sepPrefix: this.options.sepPrefix ?? true,\n });\n return new Blob([data], { type: 'text/csv' });\n }\n}\n"],"mappings":";AASA,IAAqB,cAArB,MAAyE;CAIvE,YAAY,UAA8C,CAAC,GAAG;EAAlC,KAAA,UAAA;EAHZ,KAAA,OAAA;EACM,KAAA,aAAA;CAEyC;CAE/D,eACE,SACA,MACA,UAAU,KAAK,SACP;EACR,MAAM,EAAE,WAAW,YAAY,KAAM,QAAQ,MAAK,MAAM,SAAS;EAEjE,MAAM,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,KAAK,SACpC,KAAK,KAAK,UAAU;GAClB,IAAI;GACJ,IAAI,OAAO,UAAU,UACnB,cAAc,OAAO,KAAK;QACrB,IAAI,iBAAiB,MAC1B,cAAc,MAAM,YAAY;QAEhC,cAAc;GAGhB,IAAI,CAAC;IAAC;IAAW;IAAO;GAAG,CAAC,CAAC,MAAM,MAAM,YAAY,SAAS,CAAC,CAAC,GAC9D,OAAO;GAGT,MAAM,QAAQ,YAAY,QAAQ,IAAI,OAAO,OAAO,GAAG,GAAG,GAAG,QAAQ,OAAO;GAC5E,OAAO,GAAG,QAAQ,QAAQ;EAC5B,CAAC,CACH;EAEA,QACG,YAAY,OAAO,UAAU,MAAM,MAAM,MAAM,KAAK,SAAS,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG;CAEhG;CAEA,aAAa,SAAqC,MAA0C;EAC1F,MAAM,OAAO,KAAK,eAAe,SAAS,MAAM;GAC9C,GAAG,KAAK;GACR,WAAW,KAAK,QAAQ,aAAa;EACvC,CAAC;EACD,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,MAAM,WAAW,CAAC;CAC9C;AACF"}
|
package/dist/csvExporter.d.cts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { i as StringExporter, t as BlobExporter } from "./exporter-
|
|
2
|
-
|
|
1
|
+
import { i as StringExporter, t as BlobExporter } from "./exporter-BT2ehIIU.cjs";
|
|
3
2
|
//#region src/exporters/csvExporter.d.ts
|
|
4
|
-
interface CsvExporterOptions {
|
|
3
|
+
export interface CsvExporterOptions {
|
|
5
4
|
sepPrefix?: boolean;
|
|
6
5
|
separator?: string;
|
|
7
6
|
quote?: string;
|
|
8
7
|
eol?: string;
|
|
9
8
|
}
|
|
10
|
-
|
|
9
|
+
export default class CsvExporter implements StringExporter, BlobExporter {
|
|
11
10
|
readonly options: CsvExporterOptions;
|
|
12
11
|
readonly type = "csv";
|
|
13
12
|
readonly fileEnding = "csv";
|
|
@@ -16,5 +15,4 @@ declare class CsvExporter implements StringExporter, BlobExporter {
|
|
|
16
15
|
exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob;
|
|
17
16
|
}
|
|
18
17
|
//#endregion
|
|
19
|
-
export { CsvExporterOptions, CsvExporter as default };
|
|
20
18
|
//# sourceMappingURL=csvExporter.d.cts.map
|
package/dist/csvExporter.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { i as StringExporter, t as BlobExporter } from "./exporter-
|
|
2
|
-
|
|
1
|
+
import { i as StringExporter, t as BlobExporter } from "./exporter-BT2ehIIU.js";
|
|
3
2
|
//#region src/exporters/csvExporter.d.ts
|
|
4
|
-
interface CsvExporterOptions {
|
|
3
|
+
export interface CsvExporterOptions {
|
|
5
4
|
sepPrefix?: boolean;
|
|
6
5
|
separator?: string;
|
|
7
6
|
quote?: string;
|
|
8
7
|
eol?: string;
|
|
9
8
|
}
|
|
10
|
-
|
|
9
|
+
export default class CsvExporter implements StringExporter, BlobExporter {
|
|
11
10
|
readonly options: CsvExporterOptions;
|
|
12
11
|
readonly type = "csv";
|
|
13
12
|
readonly fileEnding = "csv";
|
|
@@ -16,5 +15,4 @@ declare class CsvExporter implements StringExporter, BlobExporter {
|
|
|
16
15
|
exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob;
|
|
17
16
|
}
|
|
18
17
|
//#endregion
|
|
19
|
-
export { CsvExporterOptions, CsvExporter as default };
|
|
20
18
|
//# sourceMappingURL=csvExporter.d.ts.map
|
package/dist/csvExporter.js
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/exporters/csvExporter.ts
|
|
2
|
+
var CsvExporter = class {
|
|
3
|
+
constructor(options = {}) {
|
|
4
|
+
this.options = options;
|
|
5
|
+
this.type = "csv";
|
|
6
|
+
this.fileEnding = "csv";
|
|
7
|
+
}
|
|
8
|
+
exportToString(columns, rows, options = this.options) {
|
|
9
|
+
const { sepPrefix, separator = " ", quote = "\"", eol = "\n" } = options;
|
|
10
|
+
const cells = [columns, ...rows].map((line) => line.map((value) => {
|
|
11
|
+
let stringValue;
|
|
12
|
+
if (typeof value === "number") stringValue = String(value);
|
|
13
|
+
else if (value instanceof Date) stringValue = value.toISOString();
|
|
14
|
+
else stringValue = value;
|
|
15
|
+
if (![
|
|
16
|
+
separator,
|
|
17
|
+
quote,
|
|
18
|
+
eol
|
|
19
|
+
].some((c) => stringValue.includes(c))) return stringValue;
|
|
20
|
+
const clean = stringValue.replace(new RegExp(quote, "g"), `${quote}${quote}`);
|
|
21
|
+
return `${quote}${clean}${quote}`;
|
|
22
|
+
}));
|
|
23
|
+
return (sepPrefix ? `SEP=${separator}\n` : "") + cells.map((line) => line.join(separator)).join(eol);
|
|
24
|
+
}
|
|
25
|
+
exportToBlob(columns, rows) {
|
|
26
|
+
const data = this.exportToString(columns, rows, {
|
|
27
|
+
...this.options,
|
|
28
|
+
sepPrefix: this.options.sepPrefix ?? true
|
|
29
|
+
});
|
|
30
|
+
return new Blob([data], { type: "text/csv" });
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { CsvExporter as default };
|
|
2
35
|
|
|
3
|
-
|
|
36
|
+
//# sourceMappingURL=csvExporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csvExporter.js","names":[],"sources":["../src/exporters/csvExporter.ts"],"sourcesContent":["import { BlobExporter, StringExporter } from './exporter';\n\nexport interface CsvExporterOptions {\n sepPrefix?: boolean;\n separator?: string;\n quote?: string;\n eol?: string;\n}\n\nexport default class CsvExporter implements StringExporter, BlobExporter {\n readonly type = 'csv';\n readonly fileEnding = 'csv';\n\n constructor(public readonly options: CsvExporterOptions = {}) {}\n\n exportToString(\n columns: (string | number | Date)[],\n rows: (string | number | Date)[][],\n options = this.options,\n ): string {\n const { sepPrefix, separator = '\\t', quote = '\"', eol = '\\n' } = options;\n\n const cells = [columns, ...rows].map((line) =>\n line.map((value) => {\n let stringValue: string;\n if (typeof value === 'number') {\n stringValue = String(value);\n } else if (value instanceof Date) {\n stringValue = value.toISOString();\n } else {\n stringValue = value;\n }\n\n if (![separator, quote, eol].some((c) => stringValue.includes(c))) {\n return stringValue;\n }\n\n const clean = stringValue.replace(new RegExp(quote, 'g'), `${quote}${quote}`);\n return `${quote}${clean}${quote}`;\n }),\n );\n\n return (\n (sepPrefix ? `SEP=${separator}\\n` : '') + cells.map((line) => line.join(separator)).join(eol)\n );\n }\n\n exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob {\n const data = this.exportToString(columns, rows, {\n ...this.options,\n sepPrefix: this.options.sepPrefix ?? true,\n });\n return new Blob([data], { type: 'text/csv' });\n }\n}\n"],"mappings":";AASA,IAAqB,cAArB,MAAyE;CAIvE,YAAY,UAA8C,CAAC,GAAG;EAAlC,KAAA,UAAA;EAHZ,KAAA,OAAA;EACM,KAAA,aAAA;CAEyC;CAE/D,eACE,SACA,MACA,UAAU,KAAK,SACP;EACR,MAAM,EAAE,WAAW,YAAY,KAAM,QAAQ,MAAK,MAAM,SAAS;EAEjE,MAAM,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,KAAK,SACpC,KAAK,KAAK,UAAU;GAClB,IAAI;GACJ,IAAI,OAAO,UAAU,UACnB,cAAc,OAAO,KAAK;QACrB,IAAI,iBAAiB,MAC1B,cAAc,MAAM,YAAY;QAEhC,cAAc;GAGhB,IAAI,CAAC;IAAC;IAAW;IAAO;GAAG,CAAC,CAAC,MAAM,MAAM,YAAY,SAAS,CAAC,CAAC,GAC9D,OAAO;GAGT,MAAM,QAAQ,YAAY,QAAQ,IAAI,OAAO,OAAO,GAAG,GAAG,GAAG,QAAQ,OAAO;GAC5E,OAAO,GAAG,QAAQ,QAAQ;EAC5B,CAAC,CACH;EAEA,QACG,YAAY,OAAO,UAAU,MAAM,MAAM,MAAM,KAAK,SAAS,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG;CAEhG;CAEA,aAAa,SAAqC,MAA0C;EAC1F,MAAM,OAAO,KAAK,eAAe,SAAS,MAAM;GAC9C,GAAG,KAAK;GACR,WAAW,KAAK,QAAQ,aAAa;EACvC,CAAC;EACD,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,MAAM,WAAW,CAAC;CAC9C;AACF"}
|
package/dist/excelExporter.cjs
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-pbleEpgJ.cjs');
|
|
2
1
|
let xlsx = require("xlsx");
|
|
3
|
-
xlsx = require_chunk.__toESM(xlsx);
|
|
4
|
-
|
|
5
2
|
//#region src/exporters/excelExporter.ts
|
|
6
3
|
var ExcelExporter = class {
|
|
7
4
|
constructor() {
|
|
@@ -16,7 +13,7 @@ var ExcelExporter = class {
|
|
|
16
13
|
return new Blob([data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" });
|
|
17
14
|
}
|
|
18
15
|
};
|
|
19
|
-
|
|
20
16
|
//#endregion
|
|
21
17
|
module.exports = ExcelExporter;
|
|
18
|
+
|
|
22
19
|
//# sourceMappingURL=excelExporter.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"excelExporter.cjs","names":["utils"],"sources":["../src/exporters/excelExporter.ts"],"sourcesContent":["import { utils, write } from 'xlsx';\nimport { BlobExporter } from './exporter';\n\nexport default class ExcelExporter implements BlobExporter {\n readonly type = 'xlsx';\n readonly fileEnding = 'xlsx';\n\n exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob {\n const worksheet = utils.aoa_to_sheet([columns, ...rows]);\n const workbook = utils.book_new();\n utils.book_append_sheet(workbook, worksheet, 'Sheet1');\n\n const data = write(workbook, { type: 'buffer' });\n return new Blob([data], {\n type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n });\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"excelExporter.cjs","names":["utils","write"],"sources":["../src/exporters/excelExporter.ts"],"sourcesContent":["import { utils, write } from 'xlsx';\nimport { BlobExporter } from './exporter';\n\nexport default class ExcelExporter implements BlobExporter {\n readonly type = 'xlsx';\n readonly fileEnding = 'xlsx';\n\n exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob {\n const worksheet = utils.aoa_to_sheet([columns, ...rows]);\n const workbook = utils.book_new();\n utils.book_append_sheet(workbook, worksheet, 'Sheet1');\n\n const data = write(workbook, { type: 'buffer' });\n return new Blob([data], {\n type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n });\n }\n}\n"],"mappings":";;AAGA,IAAqB,gBAArB,MAA2D;;EACzC,KAAA,OAAA;EACM,KAAA,aAAA;;CAEtB,aAAa,SAAqC,MAA0C;EAC1F,MAAM,YAAYA,KAAAA,MAAM,aAAa,CAAC,SAAS,GAAG,IAAI,CAAC;EACvD,MAAM,WAAWA,KAAAA,MAAM,SAAS;EAChC,KAAA,MAAM,kBAAkB,UAAU,WAAW,QAAQ;EAErD,MAAM,QAAA,GAAOC,KAAAA,MAAAA,CAAM,UAAU,EAAE,MAAM,SAAS,CAAC;EAC/C,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,EACtB,MAAM,oEACR,CAAC;CACH;AACF"}
|
package/dist/excelExporter.d.cts
CHANGED
package/dist/excelExporter.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { t as BlobExporter } from "./exporter-
|
|
2
|
-
|
|
1
|
+
import { t as BlobExporter } from "./exporter-BT2ehIIU.js";
|
|
3
2
|
//#region src/exporters/excelExporter.d.ts
|
|
4
|
-
|
|
3
|
+
export default class ExcelExporter implements BlobExporter {
|
|
5
4
|
readonly type = "xlsx";
|
|
6
5
|
readonly fileEnding = "xlsx";
|
|
7
6
|
exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob;
|
|
8
7
|
}
|
|
9
8
|
//#endregion
|
|
10
|
-
export { ExcelExporter as default };
|
|
11
9
|
//# sourceMappingURL=excelExporter.d.ts.map
|
package/dist/excelExporter.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { utils, write } from "xlsx";
|
|
2
|
-
|
|
3
2
|
//#region src/exporters/excelExporter.ts
|
|
4
3
|
var ExcelExporter = class {
|
|
5
4
|
constructor() {
|
|
@@ -14,7 +13,7 @@ var ExcelExporter = class {
|
|
|
14
13
|
return new Blob([data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" });
|
|
15
14
|
}
|
|
16
15
|
};
|
|
17
|
-
|
|
18
16
|
//#endregion
|
|
19
17
|
export { ExcelExporter as default };
|
|
18
|
+
|
|
20
19
|
//# sourceMappingURL=excelExporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"excelExporter.js","names":[],"sources":["../src/exporters/excelExporter.ts"],"sourcesContent":["import { utils, write } from 'xlsx';\nimport { BlobExporter } from './exporter';\n\nexport default class ExcelExporter implements BlobExporter {\n readonly type = 'xlsx';\n readonly fileEnding = 'xlsx';\n\n exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob {\n const worksheet = utils.aoa_to_sheet([columns, ...rows]);\n const workbook = utils.book_new();\n utils.book_append_sheet(workbook, worksheet, 'Sheet1');\n\n const data = write(workbook, { type: 'buffer' });\n return new Blob([data], {\n type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n });\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"excelExporter.js","names":[],"sources":["../src/exporters/excelExporter.ts"],"sourcesContent":["import { utils, write } from 'xlsx';\nimport { BlobExporter } from './exporter';\n\nexport default class ExcelExporter implements BlobExporter {\n readonly type = 'xlsx';\n readonly fileEnding = 'xlsx';\n\n exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob {\n const worksheet = utils.aoa_to_sheet([columns, ...rows]);\n const workbook = utils.book_new();\n utils.book_append_sheet(workbook, worksheet, 'Sheet1');\n\n const data = write(workbook, { type: 'buffer' });\n return new Blob([data], {\n type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n });\n }\n}\n"],"mappings":";;AAGA,IAAqB,gBAArB,MAA2D;;EACzC,KAAA,OAAA;EACM,KAAA,aAAA;;CAEtB,aAAa,SAAqC,MAA0C;EAC1F,MAAM,YAAY,MAAM,aAAa,CAAC,SAAS,GAAG,IAAI,CAAC;EACvD,MAAM,WAAW,MAAM,SAAS;EAChC,MAAM,kBAAkB,UAAU,WAAW,QAAQ;EAErD,MAAM,OAAO,MAAM,UAAU,EAAE,MAAM,SAAS,CAAC;EAC/C,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,EACtB,MAAM,oEACR,CAAC;CACH;AACF"}
|