@vdhewei/xlsx-template-lib 1.6.11 → 1.6.12
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 +63 -52
- package/README.zh-CN.md +69 -57
- package/dist/bin.js.map +1 -1
- package/dist/bin.mjs +1 -1
- package/dist/{chunk-NSFBG6PV.mjs → chunk-BPKRWKLJ.mjs} +20 -1
- package/dist/{chunk-NSFBG6PV.mjs.map → chunk-BPKRWKLJ.mjs.map} +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -4003,6 +4003,24 @@ var generateCommandsXlsxTemplateWithCompile = async function(data, values, compi
|
|
|
4003
4003
|
await w.substituteAll(values);
|
|
4004
4004
|
return w.generate(options);
|
|
4005
4005
|
};
|
|
4006
|
+
var compileCommandsXlsxTemplate = async function(data, values, compileOptions, options) {
|
|
4007
|
+
if (compileOptions.sheetName === void 0 || compileOptions.sheetName === "") {
|
|
4008
|
+
compileOptions.sheetName = compileRuleSheetName;
|
|
4009
|
+
}
|
|
4010
|
+
const result = await ExprResolver.compile(data, compileOptions.sheetName, compileOptions);
|
|
4011
|
+
if (result.errs !== void 0 && result.errs.length > 0) {
|
|
4012
|
+
throw result.errs[0];
|
|
4013
|
+
}
|
|
4014
|
+
values = autoRegisterAlias(values, result.configure);
|
|
4015
|
+
result.workbook = ExprResolver.removeUnExportSheets(result.workbook, compileOptions);
|
|
4016
|
+
const wb = await ExprResolver.toBuffer(result.workbook);
|
|
4017
|
+
await saveCompile(compileOptions, wb);
|
|
4018
|
+
const w = await Workbook.parse(wb, options);
|
|
4019
|
+
w.setQueryFunctionHandler(commandExtendQuery);
|
|
4020
|
+
await w.substituteAll(values);
|
|
4021
|
+
await w.generate(options);
|
|
4022
|
+
return wb;
|
|
4023
|
+
};
|
|
4006
4024
|
var compileAll = async (buf, compileOpts, renderData) => {
|
|
4007
4025
|
if (compileOpts === void 0 || compileOpts.sheetName === "") {
|
|
4008
4026
|
return buf;
|
|
@@ -4213,8 +4231,9 @@ export {
|
|
|
4213
4231
|
mergeMap,
|
|
4214
4232
|
autoRegisterAlias,
|
|
4215
4233
|
generateCommandsXlsxTemplateWithCompile,
|
|
4234
|
+
compileCommandsXlsxTemplate,
|
|
4216
4235
|
compileAll,
|
|
4217
4236
|
XlsxRender,
|
|
4218
4237
|
ZipXlsxTemplateApp
|
|
4219
4238
|
};
|
|
4220
|
-
//# sourceMappingURL=chunk-
|
|
4239
|
+
//# sourceMappingURL=chunk-BPKRWKLJ.mjs.map
|