schummar-table 0.46.9 → 0.47.2
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/chunk-CTAAG5j7.js +13 -0
- package/dist/chunk-pbleEpgJ.cjs +44 -0
- package/dist/csvExporter-BGoiph1b.cjs +41 -0
- package/dist/csvExporter-BGoiph1b.cjs.map +1 -0
- package/dist/csvExporter-DRm4V8We.js +35 -0
- package/dist/csvExporter-DRm4V8We.js.map +1 -0
- package/dist/csvExporter.cjs +2 -78
- package/dist/csvExporter.d.cts +15 -13
- package/dist/csvExporter.d.ts +15 -13
- package/dist/csvExporter.js +3 -8
- package/dist/excelExporter.cjs +18 -38
- package/dist/excelExporter.cjs.map +1 -1
- package/dist/excelExporter.d.cts +7 -6
- package/dist/excelExporter.d.ts +7 -5
- package/dist/excelExporter.js +16 -19
- package/dist/excelExporter.js.map +1 -1
- package/dist/exporter-BxgFAyWA.d.ts +24 -0
- package/dist/exporter-ztSF5GbY.d.cts +24 -0
- package/dist/index.cjs +3422 -5328
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +207 -168
- package/dist/index.d.ts +205 -168
- package/dist/index.js +3378 -4413
- package/dist/index.js.map +1 -1
- package/dist/mui4Theme.cjs +62 -905
- package/dist/mui4Theme.cjs.map +1 -1
- package/dist/mui4Theme.d.cts +14 -10
- package/dist/mui4Theme.d.ts +14 -10
- package/dist/mui4Theme.js +54 -77
- package/dist/mui4Theme.js.map +1 -1
- package/dist/mui5Theme.cjs +62 -901
- package/dist/mui5Theme.cjs.map +1 -1
- package/dist/mui5Theme.d.cts +14 -10
- package/dist/mui5Theme.d.ts +14 -10
- package/dist/mui5Theme.js +57 -76
- package/dist/mui5Theme.js.map +1 -1
- package/dist/tableSettings-BxCzVAiu.cjs +740 -0
- package/dist/tableSettings-BxCzVAiu.cjs.map +1 -0
- package/dist/tableSettings-C5bAcuVw.js +675 -0
- package/dist/tableSettings-C5bAcuVw.js.map +1 -0
- package/dist/types-CemO-cBr.d.ts +433 -0
- package/dist/types-lBtXAU-l.d.cts +433 -0
- package/package.json +30 -70
- package/dist/chunk-EEBUKP6F.js +0 -64
- package/dist/chunk-EEBUKP6F.js.map +0 -1
- package/dist/chunk-NTYYITKA.js +0 -803
- package/dist/chunk-NTYYITKA.js.map +0 -1
- package/dist/chunk-WFCJ3D3G.js +0 -47
- package/dist/chunk-WFCJ3D3G.js.map +0 -1
- package/dist/csvExporter.cjs.map +0 -1
- package/dist/csvExporter.js.map +0 -1
- package/dist/exporter-u6SatTo6.d.cts +0 -22
- package/dist/exporter-u6SatTo6.d.ts +0 -22
- package/dist/types-CADdapzE.d.cts +0 -437
- package/dist/types-DNdXIGcn.d.ts +0 -437
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __export = (all) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
return target;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __export };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (all) => {
|
|
9
|
+
let target = {};
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
18
|
+
key = keys[i];
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
20
|
+
get: ((k) => from[k]).bind(null, key),
|
|
21
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
value: mod,
|
|
28
|
+
enumerable: true
|
|
29
|
+
}) : target, mod));
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
|
|
33
|
+
Object.defineProperty(exports, '__export', {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () {
|
|
36
|
+
return __export;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, '__toESM', {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () {
|
|
42
|
+
return __toESM;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/exporters/csvExporter.ts
|
|
3
|
+
var CsvExporter = class {
|
|
4
|
+
constructor(options = {}) {
|
|
5
|
+
this.options = options;
|
|
6
|
+
this.type = "csv";
|
|
7
|
+
this.fileEnding = "csv";
|
|
8
|
+
}
|
|
9
|
+
exportToString(columns, rows, options = this.options) {
|
|
10
|
+
const { sepPrefix, separator = " ", quote = "\"", eol = "\n" } = options;
|
|
11
|
+
const cells = [columns, ...rows].map((line) => line.map((value) => {
|
|
12
|
+
let stringValue;
|
|
13
|
+
if (typeof value === "number") stringValue = String(value);
|
|
14
|
+
else if (value instanceof Date) stringValue = value.toISOString();
|
|
15
|
+
else stringValue = value;
|
|
16
|
+
if (![
|
|
17
|
+
separator,
|
|
18
|
+
quote,
|
|
19
|
+
eol
|
|
20
|
+
].some((c) => stringValue.includes(c))) return value;
|
|
21
|
+
return `${quote}${stringValue.replace(new RegExp(quote, "g"), `${quote}${quote}`)}${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
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
Object.defineProperty(exports, 'CsvExporter', {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () {
|
|
38
|
+
return CsvExporter;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=csvExporter-BGoiph1b.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csvExporter-BGoiph1b.cjs","names":["options: CsvExporterOptions","stringValue: string"],"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 value;\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,AAAgBA,UAA8B,EAAE,EAAE;EAAlC;cAHZ;oBACM;;CAItB,eACE,SACA,MACA,UAAU,KAAK,SACP;EACR,MAAM,EAAE,WAAW,YAAY,KAAM,QAAQ,MAAK,MAAM,SAAS;EAEjE,MAAM,QAAQ,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK,SACpC,KAAK,KAAK,UAAU;GAClB,IAAIC;AACJ,OAAI,OAAO,UAAU,SACnB,eAAc,OAAO,MAAM;YAClB,iBAAiB,KAC1B,eAAc,MAAM,aAAa;OAEjC,eAAc;AAGhB,OAAI,CAAC;IAAC;IAAW;IAAO;IAAI,CAAC,MAAM,MAAM,YAAY,SAAS,EAAE,CAAC,CAC/D,QAAO;AAIT,UAAO,GAAG,QADI,YAAY,QAAQ,IAAI,OAAO,OAAO,IAAI,EAAE,GAAG,QAAQ,QAAQ,GACnD;IAC1B,CACH;AAED,UACG,YAAY,OAAO,UAAU,MAAM,MAAM,MAAM,KAAK,SAAS,KAAK,KAAK,UAAU,CAAC,CAAC,KAAK,IAAI;;CAIjG,aAAa,SAAqC,MAA0C;EAC1F,MAAM,OAAO,KAAK,eAAe,SAAS,MAAM;GAC9C,GAAG,KAAK;GACR,WAAW,KAAK,QAAQ,aAAa;GACtC,CAAC;AACF,SAAO,IAAI,KAAK,CAAC,KAAK,EAAE,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 value;
|
|
20
|
+
return `${quote}${stringValue.replace(new RegExp(quote, "g"), `${quote}${quote}`)}${quote}`;
|
|
21
|
+
}));
|
|
22
|
+
return (sepPrefix ? `SEP=${separator}\n` : "") + cells.map((line) => line.join(separator)).join(eol);
|
|
23
|
+
}
|
|
24
|
+
exportToBlob(columns, rows) {
|
|
25
|
+
const data = this.exportToString(columns, rows, {
|
|
26
|
+
...this.options,
|
|
27
|
+
sepPrefix: this.options.sepPrefix ?? true
|
|
28
|
+
});
|
|
29
|
+
return new Blob([data], { type: "text/csv" });
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { CsvExporter };
|
|
35
|
+
//# sourceMappingURL=csvExporter-DRm4V8We.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csvExporter-DRm4V8We.js","names":["options: CsvExporterOptions","stringValue: string"],"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 value;\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,AAAgBA,UAA8B,EAAE,EAAE;EAAlC;cAHZ;oBACM;;CAItB,eACE,SACA,MACA,UAAU,KAAK,SACP;EACR,MAAM,EAAE,WAAW,YAAY,KAAM,QAAQ,MAAK,MAAM,SAAS;EAEjE,MAAM,QAAQ,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK,SACpC,KAAK,KAAK,UAAU;GAClB,IAAIC;AACJ,OAAI,OAAO,UAAU,SACnB,eAAc,OAAO,MAAM;YAClB,iBAAiB,KAC1B,eAAc,MAAM,aAAa;OAEjC,eAAc;AAGhB,OAAI,CAAC;IAAC;IAAW;IAAO;IAAI,CAAC,MAAM,MAAM,YAAY,SAAS,EAAE,CAAC,CAC/D,QAAO;AAIT,UAAO,GAAG,QADI,YAAY,QAAQ,IAAI,OAAO,OAAO,IAAI,EAAE,GAAG,QAAQ,QAAQ,GACnD;IAC1B,CACH;AAED,UACG,YAAY,OAAO,UAAU,MAAM,MAAM,MAAM,KAAK,SAAS,KAAK,KAAK,UAAU,CAAC,CAAC,KAAK,IAAI;;CAIjG,aAAa,SAAqC,MAA0C;EAC1F,MAAM,OAAO,KAAK,eAAe,SAAS,MAAM;GAC9C,GAAG,KAAK;GACR,WAAW,KAAK,QAAQ,aAAa;GACtC,CAAC;AACF,SAAO,IAAI,KAAK,CAAC,KAAK,EAAE,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/csvExporter.cjs
CHANGED
|
@@ -1,79 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
-
var __export = (target, all) => {
|
|
24
|
-
for (var name in all)
|
|
25
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
-
};
|
|
27
|
-
var __copyProps = (to, from, except, desc) => {
|
|
28
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
-
for (let key of __getOwnPropNames(from))
|
|
30
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
-
}
|
|
33
|
-
return to;
|
|
34
|
-
};
|
|
35
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
const require_csvExporter = require('./csvExporter-BGoiph1b.cjs');
|
|
36
2
|
|
|
37
|
-
|
|
38
|
-
var csvExporter_exports = {};
|
|
39
|
-
__export(csvExporter_exports, {
|
|
40
|
-
default: () => CsvExporter
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(csvExporter_exports);
|
|
43
|
-
var CsvExporter = class {
|
|
44
|
-
constructor(options = {}) {
|
|
45
|
-
this.options = options;
|
|
46
|
-
this.type = "csv";
|
|
47
|
-
this.fileEnding = "csv";
|
|
48
|
-
}
|
|
49
|
-
exportToString(columns, rows, options = this.options) {
|
|
50
|
-
const { sepPrefix, separator = " ", quote = '"', eol = "\n" } = options;
|
|
51
|
-
const cells = [columns, ...rows].map(
|
|
52
|
-
(line) => line.map((value) => {
|
|
53
|
-
let stringValue;
|
|
54
|
-
if (typeof value === "number") {
|
|
55
|
-
stringValue = String(value);
|
|
56
|
-
} else if (value instanceof Date) {
|
|
57
|
-
stringValue = value.toISOString();
|
|
58
|
-
} else {
|
|
59
|
-
stringValue = value;
|
|
60
|
-
}
|
|
61
|
-
if (![separator, quote, eol].some((c) => stringValue.includes(c))) {
|
|
62
|
-
return value;
|
|
63
|
-
}
|
|
64
|
-
const clean = stringValue.replace(new RegExp(quote, "g"), `${quote}${quote}`);
|
|
65
|
-
return `${quote}${clean}${quote}`;
|
|
66
|
-
})
|
|
67
|
-
);
|
|
68
|
-
return (sepPrefix ? `SEP=${separator}
|
|
69
|
-
` : "") + cells.map((line) => line.join(separator)).join(eol);
|
|
70
|
-
}
|
|
71
|
-
exportToBlob(columns, rows) {
|
|
72
|
-
var _a;
|
|
73
|
-
const data = this.exportToString(columns, rows, __spreadProps(__spreadValues({}, this.options), {
|
|
74
|
-
sepPrefix: (_a = this.options.sepPrefix) != null ? _a : true
|
|
75
|
-
}));
|
|
76
|
-
return new Blob([data], { type: "text/csv" });
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=csvExporter.cjs.map
|
|
3
|
+
module.exports = require_csvExporter.CsvExporter;
|
package/dist/csvExporter.d.cts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlobExporter, StringExporter } from "./exporter-ztSF5GbY.cjs";
|
|
2
2
|
|
|
3
|
+
//#region src/exporters/csvExporter.d.ts
|
|
3
4
|
interface CsvExporterOptions {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
sepPrefix?: boolean;
|
|
6
|
+
separator?: string;
|
|
7
|
+
quote?: string;
|
|
8
|
+
eol?: string;
|
|
8
9
|
}
|
|
9
10
|
declare class CsvExporter implements StringExporter, BlobExporter {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
readonly options: CsvExporterOptions;
|
|
12
|
+
readonly type = "csv";
|
|
13
|
+
readonly fileEnding = "csv";
|
|
14
|
+
constructor(options?: CsvExporterOptions);
|
|
15
|
+
exportToString(columns: (string | number | Date)[], rows: (string | number | Date)[][], options?: CsvExporterOptions): string;
|
|
16
|
+
exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
18
|
+
//#endregion
|
|
19
|
+
export { CsvExporterOptions, CsvExporter as default };
|
|
20
|
+
//# sourceMappingURL=csvExporter.d.cts.map
|
package/dist/csvExporter.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlobExporter, StringExporter } from "./exporter-BxgFAyWA.js";
|
|
2
2
|
|
|
3
|
+
//#region src/exporters/csvExporter.d.ts
|
|
3
4
|
interface CsvExporterOptions {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
sepPrefix?: boolean;
|
|
6
|
+
separator?: string;
|
|
7
|
+
quote?: string;
|
|
8
|
+
eol?: string;
|
|
8
9
|
}
|
|
9
10
|
declare class CsvExporter implements StringExporter, BlobExporter {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
readonly options: CsvExporterOptions;
|
|
12
|
+
readonly type = "csv";
|
|
13
|
+
readonly fileEnding = "csv";
|
|
14
|
+
constructor(options?: CsvExporterOptions);
|
|
15
|
+
exportToString(columns: (string | number | Date)[], rows: (string | number | Date)[][], options?: CsvExporterOptions): string;
|
|
16
|
+
exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
18
|
+
//#endregion
|
|
19
|
+
export { CsvExporterOptions, CsvExporter as default };
|
|
20
|
+
//# sourceMappingURL=csvExporter.d.ts.map
|
package/dist/csvExporter.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import "./chunk-EEBUKP6F.js";
|
|
5
|
-
export {
|
|
6
|
-
CsvExporter as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=csvExporter.js.map
|
|
1
|
+
import { CsvExporter } from "./csvExporter-DRm4V8We.js";
|
|
2
|
+
|
|
3
|
+
export { CsvExporter as default };
|
package/dist/excelExporter.cjs
CHANGED
|
@@ -1,42 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
const require_chunk = require('./chunk-pbleEpgJ.cjs');
|
|
2
|
+
let xlsx = require("xlsx");
|
|
3
|
+
xlsx = require_chunk.__toESM(xlsx);
|
|
19
4
|
|
|
20
|
-
|
|
21
|
-
var excelExporter_exports = {};
|
|
22
|
-
__export(excelExporter_exports, {
|
|
23
|
-
default: () => ExcelExporter
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(excelExporter_exports);
|
|
26
|
-
var import_xlsx = require("xlsx");
|
|
5
|
+
//#region src/exporters/excelExporter.ts
|
|
27
6
|
var ExcelExporter = class {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
});
|
|
40
|
-
}
|
|
7
|
+
constructor() {
|
|
8
|
+
this.type = "xlsx";
|
|
9
|
+
this.fileEnding = "xlsx";
|
|
10
|
+
}
|
|
11
|
+
exportToBlob(columns, rows) {
|
|
12
|
+
const worksheet = xlsx.utils.aoa_to_sheet([columns, ...rows]);
|
|
13
|
+
const workbook = xlsx.utils.book_new();
|
|
14
|
+
xlsx.utils.book_append_sheet(workbook, worksheet, "Sheet1");
|
|
15
|
+
const data = (0, xlsx.write)(workbook, { type: "buffer" });
|
|
16
|
+
return new Blob([data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" });
|
|
17
|
+
}
|
|
41
18
|
};
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
module.exports = ExcelExporter;
|
|
42
22
|
//# sourceMappingURL=excelExporter.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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"],"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;;cACzC;oBACM;;CAEtB,aAAa,SAAqC,MAA0C;EAC1F,MAAM,YAAYA,WAAM,aAAa,CAAC,SAAS,GAAG,KAAK,CAAC;EACxD,MAAM,WAAWA,WAAM,UAAU;AACjC,aAAM,kBAAkB,UAAU,WAAW,SAAS;EAEtD,MAAM,uBAAa,UAAU,EAAE,MAAM,UAAU,CAAC;AAChD,SAAO,IAAI,KAAK,CAAC,KAAK,EAAE,EACtB,MAAM,qEACP,CAAC"}
|
package/dist/excelExporter.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlobExporter } from "./exporter-ztSF5GbY.cjs";
|
|
2
2
|
|
|
3
|
+
//#region src/exporters/excelExporter.d.ts
|
|
3
4
|
declare class ExcelExporter implements BlobExporter {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
readonly type = "xlsx";
|
|
6
|
+
readonly fileEnding = "xlsx";
|
|
7
|
+
exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
export = ExcelExporter;
|
|
10
|
+
//# sourceMappingURL=excelExporter.d.cts.map
|
package/dist/excelExporter.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlobExporter } from "./exporter-BxgFAyWA.js";
|
|
2
2
|
|
|
3
|
+
//#region src/exporters/excelExporter.d.ts
|
|
3
4
|
declare class ExcelExporter implements BlobExporter {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
readonly type = "xlsx";
|
|
6
|
+
readonly fileEnding = "xlsx";
|
|
7
|
+
exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
//#endregion
|
|
9
10
|
export { ExcelExporter as default };
|
|
11
|
+
//# sourceMappingURL=excelExporter.d.ts.map
|
package/dist/excelExporter.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import "./chunk-EEBUKP6F.js";
|
|
2
|
-
|
|
3
|
-
// src/exporters/excelExporter.ts
|
|
4
1
|
import { utils, write } from "xlsx";
|
|
2
|
+
|
|
3
|
+
//#region src/exporters/excelExporter.ts
|
|
5
4
|
var ExcelExporter = class {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
ExcelExporter as default
|
|
5
|
+
constructor() {
|
|
6
|
+
this.type = "xlsx";
|
|
7
|
+
this.fileEnding = "xlsx";
|
|
8
|
+
}
|
|
9
|
+
exportToBlob(columns, rows) {
|
|
10
|
+
const worksheet = utils.aoa_to_sheet([columns, ...rows]);
|
|
11
|
+
const workbook = utils.book_new();
|
|
12
|
+
utils.book_append_sheet(workbook, worksheet, "Sheet1");
|
|
13
|
+
const data = write(workbook, { type: "buffer" });
|
|
14
|
+
return new Blob([data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" });
|
|
15
|
+
}
|
|
22
16
|
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ExcelExporter as default };
|
|
23
20
|
//# sourceMappingURL=excelExporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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;;cACzC;oBACM;;CAEtB,aAAa,SAAqC,MAA0C;EAC1F,MAAM,YAAY,MAAM,aAAa,CAAC,SAAS,GAAG,KAAK,CAAC;EACxD,MAAM,WAAW,MAAM,UAAU;AACjC,QAAM,kBAAkB,UAAU,WAAW,SAAS;EAEtD,MAAM,OAAO,MAAM,UAAU,EAAE,MAAM,UAAU,CAAC;AAChD,SAAO,IAAI,KAAK,CAAC,KAAK,EAAE,EACtB,MAAM,qEACP,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/exporters/exporter.d.ts
|
|
2
|
+
interface StringExporter {
|
|
3
|
+
type: string;
|
|
4
|
+
exportToString(columns: (string | number | Date)[], rows: (string | number | Date)[][]): string;
|
|
5
|
+
}
|
|
6
|
+
interface BlobExporter {
|
|
7
|
+
type: string;
|
|
8
|
+
fileEnding: string;
|
|
9
|
+
exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob;
|
|
10
|
+
}
|
|
11
|
+
type ExporterEntry = {
|
|
12
|
+
action: 'copy';
|
|
13
|
+
exporter: StringExporter;
|
|
14
|
+
} | {
|
|
15
|
+
action: 'download';
|
|
16
|
+
exporter: BlobExporter;
|
|
17
|
+
};
|
|
18
|
+
interface ExportOptions {
|
|
19
|
+
exporters: ExporterEntry[];
|
|
20
|
+
all?: boolean;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { BlobExporter, ExportOptions, ExporterEntry, StringExporter };
|
|
24
|
+
//# sourceMappingURL=exporter-BxgFAyWA.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/exporters/exporter.d.ts
|
|
2
|
+
interface StringExporter {
|
|
3
|
+
type: string;
|
|
4
|
+
exportToString(columns: (string | number | Date)[], rows: (string | number | Date)[][]): string;
|
|
5
|
+
}
|
|
6
|
+
interface BlobExporter {
|
|
7
|
+
type: string;
|
|
8
|
+
fileEnding: string;
|
|
9
|
+
exportToBlob(columns: (string | number | Date)[], rows: (string | number | Date)[][]): Blob;
|
|
10
|
+
}
|
|
11
|
+
type ExporterEntry = {
|
|
12
|
+
action: 'copy';
|
|
13
|
+
exporter: StringExporter;
|
|
14
|
+
} | {
|
|
15
|
+
action: 'download';
|
|
16
|
+
exporter: BlobExporter;
|
|
17
|
+
};
|
|
18
|
+
interface ExportOptions {
|
|
19
|
+
exporters: ExporterEntry[];
|
|
20
|
+
all?: boolean;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { BlobExporter, ExportOptions, ExporterEntry, StringExporter };
|
|
24
|
+
//# sourceMappingURL=exporter-ztSF5GbY.d.cts.map
|