@agile-team/mach-report 2.21.1 → 2.23.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/README.md +20 -5
- package/dist/{ExcelBindingWizard-mnAO2qOX.js → ExcelBindingWizard-D4FLind-.js} +3 -3
- package/dist/{ExcelBindingWizard-Bu0LUlzl.cjs → ExcelBindingWizard-D4RS5Bpg.cjs} +1 -1
- package/dist/{ParamEditor-38ZfNrPU.cjs → ParamEditor-C-6C9rd2.cjs} +1 -1
- package/dist/{ParamEditor-C8l0EC8m.js → ParamEditor-CASZt-Ma.js} +2 -2
- package/dist/{ReportBatchPanel-CfUVhvkO.js → ReportBatchPanel-Bq7t8a5r.js} +2 -2
- package/dist/{ReportBatchPanel-nCC06Nfp.cjs → ReportBatchPanel-YVj5IO5y.cjs} +1 -1
- package/dist/ReportLabelStudio-Cqhita1b.cjs +1 -0
- package/dist/ReportLabelStudio-Dj7GXhuv.js +783 -0
- package/dist/ReportParamPanel-DZbFVmDL.cjs +1 -0
- package/dist/{ReportParamPanel-peB-KEmm.js → ReportParamPanel-Dgmqro1Y.js} +265 -244
- package/dist/ReportPreview-DeWzG8jQ.js +6257 -0
- package/dist/ReportPreview-FFIryrIr.cjs +6 -0
- package/dist/{ReportTemplateLibrary-DVlsf72p.cjs → ReportTemplateLibrary-BaWodmpm.cjs} +1 -1
- package/dist/{ReportTemplateLibrary-B5t_EcIs.js → ReportTemplateLibrary-DdAAAD2I.js} +1 -1
- package/dist/{RuleEditor-kT1JsZ9f.js → RuleEditor-D2UwQGF6.js} +59 -59
- package/dist/{RuleEditor-xFkCVlii.cjs → RuleEditor-DcT9xI1v.cjs} +1 -1
- package/dist/TemplateOutlinePanel-CUHFFiNM.cjs +1 -0
- package/dist/{TemplateOutlinePanel-BesgGR1P.js → TemplateOutlinePanel-DrT7XN0m.js} +2 -2
- package/dist/{TemplateReusePanel-BNFU6V-W.js → TemplateReusePanel-4eejkNqi.js} +2 -2
- package/dist/{TemplateReusePanel-BG9Or5-P.cjs → TemplateReusePanel-DZMyiX5I.cjs} +1 -1
- package/dist/{TemplateReviewPanel-CwvwyCSs.js → TemplateReviewPanel-BIhNLeNw.js} +2 -2
- package/dist/TemplateReviewPanel-DnYImiXu.cjs +1 -0
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.js +26 -26
- package/dist/artifact-integrity.json +108 -106
- package/dist/assets-D2gHc4Mz.cjs +1 -0
- package/dist/assets-T_gDeFaz.js +132 -0
- package/dist/auto-4pK9HePf.cjs +1 -0
- package/dist/auto-CTIJ6PnR.js +257 -0
- package/dist/capabilities-DiBj4Qgl.cjs +1 -0
- package/dist/capabilities-pg7j7VLT.js +106 -0
- package/dist/charts-Cjw5AYkg.cjs +1 -0
- package/dist/{charts-Dlv8j2AG.js → charts-CxJZ0XaY.js} +1 -1
- package/dist/computed-DK6BruFz.cjs +1 -0
- package/dist/{computed-C8NRZQss.js → computed-f3pOqWLX.js} +381 -301
- package/dist/data-bar-CeZuFmYl.cjs +1 -0
- package/dist/{data-bar-8baGYEZ9.js → data-bar-IkI6VvMQ.js} +1 -1
- package/dist/designer-DhrE7jzw.js +7169 -0
- package/dist/designer-IAZu6kBX.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +246 -46
- package/dist/designer.d.ts +246 -46
- package/dist/designer.js +15 -14
- package/dist/dom-ChE5D-L-.cjs +1 -0
- package/dist/dom-JWrchIre.js +452 -0
- package/dist/dom-cell-address-DLD1mkTB.cjs +1 -0
- package/dist/dom-cell-address-Fn-8nk7D.js +11 -0
- package/dist/{encoding-B79hW4zq.cjs → encoding-BefcaHdp.cjs} +1 -1
- package/dist/{encoding-BSeUwrN7.js → encoding-CL6rXEkR.js} +2 -2
- package/dist/{font-loader-Di0lQKFf.js → font-loader-BT5baV-o.js} +1 -1
- package/dist/{font-loader-BB372_XN.cjs → font-loader-Ga51c2VC.cjs} +1 -1
- package/dist/grid-strokes-Be24LGuV.cjs +1 -0
- package/dist/grid-strokes-EoY66L2f.js +53 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +44 -1
- package/dist/index.d.ts +44 -1
- package/dist/index.js +961 -1256
- package/dist/json-snapshot-1tvQNzQE.cjs +2 -0
- package/dist/{json-snapshot-Kgn459Oj.js → json-snapshot-OqkPyUk5.js} +763 -776
- package/dist/matrix-B8QWbsGM.cjs +1 -0
- package/dist/matrix-C6e_r_vp.js +302 -0
- package/dist/{pdf-CARdBcuw.cjs → pdf-HiEeXe9H.cjs} +42 -42
- package/dist/{pdf-DmlnL5eB.js → pdf-aobetCsy.js} +20 -20
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BaRUGORD.cjs → plugin-BFANt-i8.cjs} +1 -1
- package/dist/{plugin-D4kAxfLG.js → plugin-DeYYAL6F.js} +1 -1
- package/dist/{prefill-CJSazcVY.js → prefill-Dk4C6S5R.js} +21 -21
- package/dist/prefill-DsUD5OoK.cjs +1 -0
- package/dist/prepared-DCIxhKFo.js +94 -0
- package/dist/prepared-Dv-XM3i1.cjs +1 -0
- package/dist/progress-ByiOxUD3.js +250 -0
- package/dist/progress-WomPRP3B.cjs +1 -0
- package/dist/{protocol-C8VWF9An.cjs → protocol-B9YgfQ_d.cjs} +1 -1
- package/dist/{protocol-Bs9-ohHN.js → protocol-DxeUKGYG.js} +3 -3
- package/dist/record-bindings-DatJZv_e.js +200 -0
- package/dist/record-bindings-MBxbeBsi.cjs +1 -0
- package/dist/{region-binding-workflow-Cy4GIOUo.js → region-binding-workflow-DjrXuR1q.js} +2 -2
- package/dist/{region-binding-workflow-JNowHd0A.cjs → region-binding-workflow-l7NGfagJ.cjs} +2 -2
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/rich-text-layout-Ciwa6D2o.js +52 -0
- package/dist/rich-text-layout-DK7A_a5r.cjs +3 -0
- package/dist/{runtime-BDf5x1i1.js → runtime-75Y5Oq5B.js} +52 -51
- package/dist/runtime-DKlGd_D4.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +9 -0
- package/dist/server/node.d.ts +9 -0
- package/dist/server-node.cjs +5 -4
- package/dist/server-node.js +2178 -2044
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +81 -0
- package/dist/server.d.ts +81 -0
- package/dist/server.js +24 -24
- package/dist/style.css +1 -1
- package/dist/{template-catalog-DFwIS9aN.js → template-catalog--cjxzgH7.js} +17 -17
- package/dist/template-catalog-CoT7jm_6.cjs +1 -0
- package/dist/{template-fragments-Dng-AlHk.js → template-fragments-CPpGpQoz.js} +24 -24
- package/dist/{template-fragments-DZVUBhuB.cjs → template-fragments-GVjpew_q.cjs} +1 -1
- package/dist/template-registry-DI59PXVK.cjs +1 -0
- package/dist/{template-registry-DhBqoD7W.js → template-registry-O0hNIOfB.js} +333 -261
- package/dist/template-serialization-CWmHq7lX.js +307 -0
- package/dist/template-serialization-CqQY4zDg.cjs +1 -0
- package/dist/{textwrap-CkGjRFT3.js → textwrap-BIjtEWmq.js} +1 -1
- package/dist/textwrap-Cy7o1hIR.cjs +4 -0
- package/dist/vue/async.d.cts +121 -2
- package/dist/vue/async.d.ts +121 -2
- package/dist/vue/index.d.cts +222 -5
- package/dist/vue/index.d.ts +222 -5
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +101 -91
- package/dist/{workbook-session-NYv01LHe.cjs → workbook-session-C6-SrnCT.cjs} +4 -4
- package/dist/{workbook-session-oinxX3qo.js → workbook-session-C9ZmCBwY.js} +15 -16
- package/dist/workbook-sheets-CaPAulQ6.cjs +2 -0
- package/dist/workbook-sheets-D4M7XXBh.js +44 -0
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +9 -0
- package/dist/worker.d.ts +9 -0
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +39 -2
- package/dist/xlsx.d.ts +39 -2
- package/dist/xlsx.js +300 -275
- package/package.json +1 -1
- package/dist/ReportLabelStudio-CaEvYuSK.cjs +0 -1
- package/dist/ReportLabelStudio-DQPBmh4v.js +0 -765
- package/dist/ReportParamPanel-CVpK8mFc.cjs +0 -1
- package/dist/ReportPreview-BBJNlu2U.js +0 -5740
- package/dist/ReportPreview-nf4Dk1Jc.cjs +0 -6
- package/dist/TemplateOutlinePanel-CDI6mfWx.cjs +0 -1
- package/dist/TemplateReviewPanel-BmBrjt6P.cjs +0 -1
- package/dist/assets-CxHunY_9.js +0 -232
- package/dist/assets-vbjAGgk8.cjs +0 -1
- package/dist/auto-BkdGiNtr.js +0 -240
- package/dist/auto-Tq7ReIC1.cjs +0 -1
- package/dist/charts-aCtoswXq.cjs +0 -1
- package/dist/component-tree-1_QCiQJX.js +0 -67
- package/dist/component-tree-BjZIp6w9.cjs +0 -1
- package/dist/computed-4TnxzgIh.cjs +0 -1
- package/dist/data-bar-YltqGTaC.cjs +0 -1
- package/dist/designer-DU3yDWgs.cjs +0 -2
- package/dist/designer-HQi-03R6.js +0 -6869
- package/dist/grid-geometry-D3SJgWFv.js +0 -136
- package/dist/grid-geometry-D8ReblRV.cjs +0 -1
- package/dist/json-snapshot-I5VI84Vp.cjs +0 -2
- package/dist/matrix-0hywp0-F.cjs +0 -1
- package/dist/matrix-Dy-tyY7E.js +0 -381
- package/dist/prefill-Bpyn58AZ.cjs +0 -1
- package/dist/prepared-BiSz_9vN.cjs +0 -1
- package/dist/prepared-BwjwEzFz.js +0 -87
- package/dist/progress-B0ctFpKf.cjs +0 -1
- package/dist/progress-Hc2vxoCs.js +0 -52
- package/dist/record-bindings-Ct1HkPrc.cjs +0 -1
- package/dist/record-bindings-VZGS-Qd8.js +0 -155
- package/dist/rich-text-layout-K48VHUoW.cjs +0 -3
- package/dist/rich-text-layout-wxBhnAS7.js +0 -102
- package/dist/runtime-DsJt1PIf.cjs +0 -1
- package/dist/template-bindings-Cg5oBLFT.cjs +0 -1
- package/dist/template-bindings-TKnXM7ll.js +0 -62
- package/dist/template-catalog-D_2jdnkL.cjs +0 -1
- package/dist/template-outline-DWkzZXVC.cjs +0 -1
- package/dist/template-outline-DiADphlq.js +0 -88
- package/dist/template-registry-DpLUSLwF.cjs +0 -1
- package/dist/template-serialization-Cc3h-miv.js +0 -247
- package/dist/template-serialization-D1R5oAqh.cjs +0 -1
- package/dist/textwrap-OTOUMr4f.cjs +0 -4
package/dist/designer.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
|
+
import { Ref } from 'vue';
|
|
5
|
+
import { ShallowRef } from 'vue';
|
|
4
6
|
declare type __VLS_Props = {
|
|
5
7
|
modelValue?: ColumnVisual_2;
|
|
6
8
|
fields?: ReadonlyArray<{
|
|
@@ -89,6 +91,48 @@ declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMedia
|
|
|
89
91
|
assetFailure?: "throw" | "placeholder";
|
|
90
92
|
signal?: AbortSignal;
|
|
91
93
|
}
|
|
94
|
+
declare const BASE_INSERT_MESSAGES: {
|
|
95
|
+
readonly add: "添加内容";
|
|
96
|
+
readonly title: "添加到当前版面";
|
|
97
|
+
readonly text: "说明文字";
|
|
98
|
+
readonly textHint: "添加标题、备注或说明";
|
|
99
|
+
readonly field: "业务字段";
|
|
100
|
+
readonly columnField: "添加表格字段";
|
|
101
|
+
readonly fieldHint: "选择字段后立即显示真实内容";
|
|
102
|
+
readonly image: "图片或 Logo";
|
|
103
|
+
readonly imageHint: "使用 PNG 或 JPEG 图片";
|
|
104
|
+
readonly qrcode: "二维码";
|
|
105
|
+
readonly barcode: "条形码";
|
|
106
|
+
readonly codeHint: "绑定记录编号或填写编码内容";
|
|
107
|
+
readonly list: "明细表";
|
|
108
|
+
readonly listHint: "从当前字段契约建立表格";
|
|
109
|
+
readonly chart: "图表";
|
|
110
|
+
readonly recordCount: "记录数";
|
|
111
|
+
readonly chartHint: "选择分类与数值字段";
|
|
112
|
+
readonly rect: "装饰色块";
|
|
113
|
+
readonly rectHint: "辅助分区与突出信息";
|
|
114
|
+
readonly search: "搜索业务字段";
|
|
115
|
+
readonly noFields: "没有匹配的字段";
|
|
116
|
+
readonly close: "关闭添加内容";
|
|
117
|
+
readonly back: "返回内容类型";
|
|
118
|
+
readonly duplicate: "复制组件";
|
|
119
|
+
readonly newPage: "当前版面空间不足或含动态明细,内容已放到新增版面,可撤销恢复。";
|
|
120
|
+
readonly newPageTitle: "需要新增一个版面";
|
|
121
|
+
readonly newPageDescription: "当前版面没有足够空间,将新增同规格的 {width} × {height} mm 版面放置内容。";
|
|
122
|
+
readonly reportPageImpact: "模板版面 {before} → {after}。最终输出页数由明细分页决定。";
|
|
123
|
+
readonly labelPageImpact: "每份标签 {before} → {after} 个版面。每条记录的输出都会增加一个版面。";
|
|
124
|
+
readonly labelCountImpact: "按当前设计样本,标签数 {before} → {after} 张。";
|
|
125
|
+
readonly newPageConfirm: "新增版面并添加";
|
|
126
|
+
readonly newPageCancel: "取消添加";
|
|
127
|
+
readonly newPagePending: "请先确认或取消新增版面,再预览或保存。";
|
|
128
|
+
readonly contentTooLarge: "内容尺寸大于当前纸张的可用区域,请先调整纸张或内容尺寸。内容没有被缩小或添加。";
|
|
129
|
+
readonly addColumn: "添加字段列";
|
|
130
|
+
readonly removeColumn: "删除当前列";
|
|
131
|
+
readonly removeLast: "至少保留一列";
|
|
132
|
+
readonly dependentColumn: "此字段仍被合计、规则或表头引用,请先调整相关配置。";
|
|
133
|
+
readonly assetPending: "请完成图片或编码内容配置,再预览或保存。";
|
|
134
|
+
readonly fieldsUnavailable: "当前模板尚无可绑定的数据字段。";
|
|
135
|
+
};
|
|
92
136
|
/** 可选设计器独立文案,不把其依赖和配置强加给预览消费者。 */
|
|
93
137
|
declare const BASE_TEMPLATE_EDITOR_MESSAGES: {
|
|
94
138
|
title: string;
|
|
@@ -124,6 +168,17 @@ declare const BASE_TEMPLATE_EDITOR_MESSAGES: {
|
|
|
124
168
|
note: string;
|
|
125
169
|
invalid: string;
|
|
126
170
|
};
|
|
171
|
+
declare const BATCH_INSERT_MESSAGES: {
|
|
172
|
+
readonly selectField: "选择字段";
|
|
173
|
+
readonly addSelected: "添加选中项";
|
|
174
|
+
readonly selectedCount: "已选 {count} 项";
|
|
175
|
+
readonly batchHint: "可一次选择最多 100 个字段,确认版面影响后统一添加。";
|
|
176
|
+
readonly batchTitle: "确认添加字段";
|
|
177
|
+
readonly batchDescription: "将按选择顺序添加 {count} 个字段,本次操作可一次撤销。";
|
|
178
|
+
readonly batchWidth: "表格宽度 {before} → {after} mm。";
|
|
179
|
+
readonly batchFixedWidth: "保持表格宽度 {width} mm,所有列按比例分配宽度。";
|
|
180
|
+
readonly batchConfirm: "确认添加";
|
|
181
|
+
};
|
|
127
182
|
declare interface BrowserReportWorker {
|
|
128
183
|
postMessage(value: unknown, transfer?: Transferable[]): void;
|
|
129
184
|
terminate(): void;
|
|
@@ -135,6 +190,8 @@ declare interface BrowserReportWorker {
|
|
|
135
190
|
declare interface CanvasSelection {
|
|
136
191
|
/** Ctrl/Command/Shift toggles the selection without changing the report schema. */
|
|
137
192
|
additive?: boolean;
|
|
193
|
+
/** Activate a member without collapsing the current multi-selection. */
|
|
194
|
+
preserve?: boolean;
|
|
138
195
|
pageIndex: number;
|
|
139
196
|
componentIndex: number;
|
|
140
197
|
}
|
|
@@ -483,54 +540,14 @@ export declare const DESIGNER_GUIDE_MESSAGES: {
|
|
|
483
540
|
readonly reviewHint: "校验字段依赖、样例结果与输出限制";
|
|
484
541
|
readonly result: "预览确认效果后保存模板;高级 JSON 保留给需要时使用。";
|
|
485
542
|
};
|
|
486
|
-
declare const DESIGNER_INSERT_MESSAGES: {
|
|
487
|
-
readonly add: "添加内容";
|
|
488
|
-
readonly title: "添加到当前版面";
|
|
489
|
-
readonly text: "说明文字";
|
|
490
|
-
readonly textHint: "添加标题、备注或说明";
|
|
491
|
-
readonly field: "业务字段";
|
|
492
|
-
readonly columnField: "添加表格字段";
|
|
493
|
-
readonly fieldHint: "选择字段后立即显示真实内容";
|
|
494
|
-
readonly image: "图片或 Logo";
|
|
495
|
-
readonly imageHint: "使用 PNG 或 JPEG 图片";
|
|
496
|
-
readonly qrcode: "二维码";
|
|
497
|
-
readonly barcode: "条形码";
|
|
498
|
-
readonly codeHint: "绑定记录编号或填写编码内容";
|
|
499
|
-
readonly list: "明细表";
|
|
500
|
-
readonly listHint: "从当前字段契约建立表格";
|
|
501
|
-
readonly chart: "图表";
|
|
502
|
-
readonly recordCount: "记录数";
|
|
503
|
-
readonly chartHint: "选择分类与数值字段";
|
|
504
|
-
readonly rect: "装饰色块";
|
|
505
|
-
readonly rectHint: "辅助分区与突出信息";
|
|
506
|
-
readonly search: "搜索业务字段";
|
|
507
|
-
readonly noFields: "没有匹配的字段";
|
|
508
|
-
readonly close: "关闭添加内容";
|
|
509
|
-
readonly back: "返回内容类型";
|
|
510
|
-
readonly duplicate: "复制组件";
|
|
511
|
-
readonly newPage: "当前版面空间不足或含动态明细,内容已放到新增版面,可撤销恢复。";
|
|
512
|
-
readonly newPageTitle: "需要新增一个版面";
|
|
513
|
-
readonly newPageDescription: "当前版面没有足够空间,将新增同规格的 {width} × {height} mm 版面放置内容。";
|
|
514
|
-
readonly reportPageImpact: "模板版面 {before} → {after}。最终输出页数由明细分页决定。";
|
|
515
|
-
readonly labelPageImpact: "每份标签 {before} → {after} 个版面。每条记录的输出都会增加一个版面。";
|
|
516
|
-
readonly labelCountImpact: "按当前设计样本,标签数 {before} → {after} 张。";
|
|
517
|
-
readonly newPageConfirm: "新增版面并添加";
|
|
518
|
-
readonly newPageCancel: "取消添加";
|
|
519
|
-
readonly newPagePending: "请先确认或取消新增版面,再预览或保存。";
|
|
520
|
-
readonly contentTooLarge: "内容尺寸大于当前纸张的可用区域,请先调整纸张或内容尺寸。内容没有被缩小或添加。";
|
|
521
|
-
readonly addColumn: "添加字段列";
|
|
522
|
-
readonly removeColumn: "删除当前列";
|
|
523
|
-
readonly removeLast: "至少保留一列";
|
|
524
|
-
readonly dependentColumn: "此字段仍被合计、规则或表头引用,请先调整相关配置。";
|
|
525
|
-
readonly assetPending: "请完成图片或编码内容配置,再预览或保存。";
|
|
526
|
-
readonly fieldsUnavailable: "当前模板尚无可绑定的数据字段。";
|
|
527
|
-
};
|
|
528
543
|
export declare type DesignerGuideMessages = {
|
|
529
544
|
[K in keyof typeof DESIGNER_GUIDE_MESSAGES]: string;
|
|
530
545
|
};
|
|
531
546
|
export declare type DesignerInsertMessages = {
|
|
532
|
-
[K in keyof typeof
|
|
533
|
-
}
|
|
547
|
+
[K in keyof typeof BASE_INSERT_MESSAGES]: string;
|
|
548
|
+
} & Partial<{
|
|
549
|
+
[K in keyof typeof BATCH_INSERT_MESSAGES]: string;
|
|
550
|
+
}>;
|
|
534
551
|
/** Optional wizard labels remain independent of the general designer configuration. */
|
|
535
552
|
export declare const EXCEL_BINDING_MESSAGES: {
|
|
536
553
|
recoveredMapping: string;
|
|
@@ -1040,6 +1057,10 @@ export declare interface LabelStudioBrand {
|
|
|
1040
1057
|
export declare interface LabelStudioController {
|
|
1041
1058
|
readonly busy?: boolean;
|
|
1042
1059
|
readonly pendingLocalChanges?: boolean;
|
|
1060
|
+
readonly mode: "preview" | "design";
|
|
1061
|
+
readonly canPrint: boolean;
|
|
1062
|
+
preview(): Promise<boolean>;
|
|
1063
|
+
print(): Promise<void>;
|
|
1043
1064
|
guardChanges(): Promise<boolean>;
|
|
1044
1065
|
prepare(): Promise<ReportTemplateDocument | undefined>;
|
|
1045
1066
|
}
|
|
@@ -1058,6 +1079,8 @@ export declare interface LabelStudioOptions extends LabelStudioLayout {
|
|
|
1058
1079
|
schema: DatasetContract;
|
|
1059
1080
|
title?: string;
|
|
1060
1081
|
identityField?: string;
|
|
1082
|
+
/** Optional business provenance retained by generated label templates for safe reuse. */
|
|
1083
|
+
dataContract?: ReportTemplate["dataContract"];
|
|
1061
1084
|
modelValue?: ReportTemplateDocument;
|
|
1062
1085
|
preview?: TemplateEditorOptions["preview"];
|
|
1063
1086
|
save?: TemplateEditorOptions["save"];
|
|
@@ -1440,6 +1463,7 @@ declare interface MachReportDefaults {
|
|
|
1440
1463
|
toolbar?: MachReportToolbarOptions;
|
|
1441
1464
|
interaction?: ReportInteractionOptions;
|
|
1442
1465
|
preferences?: ReportPreferencesOptions;
|
|
1466
|
+
refresh?: ReportRefreshOptions;
|
|
1443
1467
|
/** Protect local input and drafts before replacing a report. Default true. */
|
|
1444
1468
|
guardChanges?: boolean;
|
|
1445
1469
|
beforeDiscard?: ReportBeforeDiscard;
|
|
@@ -1478,6 +1502,7 @@ declare type MachReportLogger = Pick<Console, "warn" | "info">;
|
|
|
1478
1502
|
*/
|
|
1479
1503
|
/** 工具栏与状态文案(默认简体中文;出海场景覆写) */
|
|
1480
1504
|
declare interface MachReportMessages extends Partial<ReportCalculationMessages>, Partial<ReportDataReviewMessages>, ReportPrintMessages, ReportParamOptionsMessages {
|
|
1505
|
+
previousSnapshot?: string;
|
|
1481
1506
|
reviewTools?: string;
|
|
1482
1507
|
validationTitle?: string;
|
|
1483
1508
|
validationError?: string;
|
|
@@ -1570,6 +1595,20 @@ declare interface MachReportMessages extends Partial<ReportCalculationMessages>,
|
|
|
1570
1595
|
importing?: string;
|
|
1571
1596
|
editCell?: string;
|
|
1572
1597
|
editingHint?: string;
|
|
1598
|
+
editCellEditable?: string;
|
|
1599
|
+
editCellReadOnly?: string;
|
|
1600
|
+
editCellFormula?: string;
|
|
1601
|
+
editCellProtected?: string;
|
|
1602
|
+
editCellComplex?: string;
|
|
1603
|
+
editCellStructure?: string;
|
|
1604
|
+
editCellDerived?: string;
|
|
1605
|
+
editCellPermission?: string;
|
|
1606
|
+
editCellBusy?: string;
|
|
1607
|
+
editHistoryLimited?: string;
|
|
1608
|
+
changesSearch?: string;
|
|
1609
|
+
changesAllDatasets?: string;
|
|
1610
|
+
changesNoMatches?: string;
|
|
1611
|
+
changesRange?: string;
|
|
1573
1612
|
saving?: string;
|
|
1574
1613
|
editInvalidNumber?: string;
|
|
1575
1614
|
editInvalidBoolean?: string;
|
|
@@ -1664,6 +1703,7 @@ declare interface MachReportMessages extends Partial<ReportCalculationMessages>,
|
|
|
1664
1703
|
*/
|
|
1665
1704
|
/** 工具栏与状态文案(默认简体中文;出海场景覆写) */
|
|
1666
1705
|
declare interface MachReportMessages_2 extends Partial<ReportCalculationMessages_2>, Partial<ReportDataReviewMessages_2>, ReportPrintMessages_2, ReportParamOptionsMessages_2 {
|
|
1706
|
+
previousSnapshot?: string;
|
|
1667
1707
|
reviewTools?: string;
|
|
1668
1708
|
validationTitle?: string;
|
|
1669
1709
|
validationError?: string;
|
|
@@ -1756,6 +1796,20 @@ declare interface MachReportMessages_2 extends Partial<ReportCalculationMessages
|
|
|
1756
1796
|
importing?: string;
|
|
1757
1797
|
editCell?: string;
|
|
1758
1798
|
editingHint?: string;
|
|
1799
|
+
editCellEditable?: string;
|
|
1800
|
+
editCellReadOnly?: string;
|
|
1801
|
+
editCellFormula?: string;
|
|
1802
|
+
editCellProtected?: string;
|
|
1803
|
+
editCellComplex?: string;
|
|
1804
|
+
editCellStructure?: string;
|
|
1805
|
+
editCellDerived?: string;
|
|
1806
|
+
editCellPermission?: string;
|
|
1807
|
+
editCellBusy?: string;
|
|
1808
|
+
editHistoryLimited?: string;
|
|
1809
|
+
changesSearch?: string;
|
|
1810
|
+
changesAllDatasets?: string;
|
|
1811
|
+
changesNoMatches?: string;
|
|
1812
|
+
changesRange?: string;
|
|
1759
1813
|
saving?: string;
|
|
1760
1814
|
editInvalidNumber?: string;
|
|
1761
1815
|
editInvalidBoolean?: string;
|
|
@@ -1865,6 +1919,8 @@ declare interface MachReportTheme {
|
|
|
1865
1919
|
btnActiveBg: string;
|
|
1866
1920
|
}
|
|
1867
1921
|
declare interface MachReportToolbarOptions {
|
|
1922
|
+
/** Reasons explain host restrictions without granting capabilities. */
|
|
1923
|
+
unavailableReasons?: Partial<Record<ReportPreviewTool, string>>;
|
|
1868
1924
|
search?: boolean;
|
|
1869
1925
|
thumbnails?: boolean;
|
|
1870
1926
|
zoom?: boolean;
|
|
@@ -3104,11 +3160,21 @@ declare interface ReportEditConflict {
|
|
|
3104
3160
|
currentValue?: ReportCellValue;
|
|
3105
3161
|
revision?: string | number;
|
|
3106
3162
|
}
|
|
3163
|
+
declare interface ReportEditHistoryOptions {
|
|
3164
|
+
/** Retained undo/redo transactions. Default 100. Zero disables undo retention. */
|
|
3165
|
+
maxSteps?: number;
|
|
3166
|
+
/** Conservative retained transaction size in bytes. Default 8 MiB. */
|
|
3167
|
+
maxBytes?: number;
|
|
3168
|
+
}
|
|
3107
3169
|
/** Opt in with true for local drafts, or provide host validation and persistence. */
|
|
3108
3170
|
declare interface ReportEditingOptions {
|
|
3109
3171
|
/** Optional field controls, keyed by source.field / table.columnKey; a resolver supports dataset-specific rules. */
|
|
3110
3172
|
fields?: Readonly<Record<string, ReportCellFieldOptions>> | ((context: ReportCellContext) => ReportCellFieldOptions | undefined);
|
|
3111
3173
|
canEdit?(context: ReportCellContext): boolean;
|
|
3174
|
+
/** Optional explanation when canEdit rejects a cell. Does not grant editing access. */
|
|
3175
|
+
readOnlyReason?(context: ReportCellContext): string | undefined;
|
|
3176
|
+
/** Bounds undo/redo retention. Net differences and getChanges remain complete. */
|
|
3177
|
+
history?: ReportEditHistoryOptions;
|
|
3112
3178
|
/** Return an error message or throw to reject the edit. */
|
|
3113
3179
|
validate?(edit: Readonly<ReportCellEdit>, operation: ReportEditOperation): void | string | Promise<void | string>;
|
|
3114
3180
|
/** Same declarative rules can be run in Node via validateReportDataset. Requires a source-backed session. */
|
|
@@ -3212,6 +3278,7 @@ declare type ReportExpressionOperation_2 = "add" | "subtract" | "multiply" | "di
|
|
|
3212
3278
|
declare type ReportExpressionOperation_3 = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
|
|
3213
3279
|
declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
3214
3280
|
declare type ReportFieldAggregation_2 = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
3281
|
+
declare type ReportFieldAggregation_3 = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
3215
3282
|
declare interface ReportFieldCalculation {
|
|
3216
3283
|
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
3217
3284
|
description: string;
|
|
@@ -3222,6 +3289,11 @@ declare interface ReportFieldCalculation_2 {
|
|
|
3222
3289
|
description: string;
|
|
3223
3290
|
dependsOn: readonly string[];
|
|
3224
3291
|
}
|
|
3292
|
+
declare interface ReportFieldCalculation_3 {
|
|
3293
|
+
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
3294
|
+
description: string;
|
|
3295
|
+
dependsOn: readonly string[];
|
|
3296
|
+
}
|
|
3225
3297
|
declare interface ReportFieldContract extends ReportFieldSemantics {
|
|
3226
3298
|
field: string;
|
|
3227
3299
|
label?: string;
|
|
@@ -3250,6 +3322,20 @@ declare interface ReportFieldContract_2 extends ReportFieldSemantics_2 {
|
|
|
3250
3322
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
3251
3323
|
unit?: string;
|
|
3252
3324
|
}
|
|
3325
|
+
declare interface ReportFieldContract_3 extends ReportFieldSemantics_3 {
|
|
3326
|
+
field: string;
|
|
3327
|
+
label?: string;
|
|
3328
|
+
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
3329
|
+
required?: boolean;
|
|
3330
|
+
nullable?: boolean;
|
|
3331
|
+
enum?: readonly (string | number | boolean)[];
|
|
3332
|
+
min?: number;
|
|
3333
|
+
max?: number;
|
|
3334
|
+
minLength?: number;
|
|
3335
|
+
maxLength?: number;
|
|
3336
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
3337
|
+
unit?: string;
|
|
3338
|
+
}
|
|
3253
3339
|
declare interface ReportFieldSemantics {
|
|
3254
3340
|
description?: string;
|
|
3255
3341
|
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
@@ -3270,6 +3356,16 @@ declare interface ReportFieldSemantics_2 {
|
|
|
3270
3356
|
format?: ColumnFormat_2;
|
|
3271
3357
|
calculation?: ReportFieldCalculation_2;
|
|
3272
3358
|
}
|
|
3359
|
+
declare interface ReportFieldSemantics_3 {
|
|
3360
|
+
description?: string;
|
|
3361
|
+
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
3362
|
+
missingMeaning?: string;
|
|
3363
|
+
/** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
|
|
3364
|
+
aggregation?: ReportFieldAggregation_3;
|
|
3365
|
+
/** Shared presentation only; raw values and calculation precision remain unchanged. */
|
|
3366
|
+
format?: ColumnFormat_3;
|
|
3367
|
+
calculation?: ReportFieldCalculation_3;
|
|
3368
|
+
}
|
|
3273
3369
|
declare interface ReportFlowBand {
|
|
3274
3370
|
/** Exact stable component IDs. Static components use nid, lists use id. */
|
|
3275
3371
|
componentIds: string[];
|
|
@@ -3305,6 +3401,10 @@ declare interface ReportInteractionOptions {
|
|
|
3305
3401
|
export declare const ReportLabelStudio: DefineComponent<LabelStudioOptions, {
|
|
3306
3402
|
guardChanges: () => Promise<boolean>;
|
|
3307
3403
|
prepare: () => Promise<ReportTemplateDocument_3 | undefined>;
|
|
3404
|
+
preview: () => Promise<boolean>;
|
|
3405
|
+
print: () => Promise<void>;
|
|
3406
|
+
mode: "preview" | "design";
|
|
3407
|
+
canPrint: boolean;
|
|
3308
3408
|
busy: boolean;
|
|
3309
3409
|
pendingLocalChanges: boolean;
|
|
3310
3410
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
@@ -3512,8 +3612,8 @@ declare type ReportPredicateScalar = string | number | boolean | null;
|
|
|
3512
3612
|
declare type ReportPredicateScalar_2 = string | number | boolean | null;
|
|
3513
3613
|
declare type ReportPredicateScalar_3 = string | number | boolean | null;
|
|
3514
3614
|
declare interface ReportPreferencesAdapter {
|
|
3515
|
-
load(key: string):
|
|
3516
|
-
save(key: string, value: Readonly<
|
|
3615
|
+
load(key: string): ReportStoredPreferences | null | Promise<ReportStoredPreferences | null>;
|
|
3616
|
+
save(key: string, value: Readonly<ReportStoredPreferences>): void | Promise<void>;
|
|
3517
3617
|
remove?(key: string): void | Promise<void>;
|
|
3518
3618
|
}
|
|
3519
3619
|
declare interface ReportPreferencesOptions {
|
|
@@ -3573,6 +3673,17 @@ declare interface ReportPrintOptions {
|
|
|
3573
3673
|
/** Physical translation only; no scaling or mutation of the report data/plan. */
|
|
3574
3674
|
calibration?: ReportPrintCalibration;
|
|
3575
3675
|
}
|
|
3676
|
+
/** Explicit refresh policy. The key identifies template/layout revisions outside query parameters. */
|
|
3677
|
+
declare interface ReportRefreshOptions {
|
|
3678
|
+
retainPrevious?: boolean;
|
|
3679
|
+
key?: string;
|
|
3680
|
+
/** Host API request preceding the preview reload. Blocks edits and output without discarding drafts. */
|
|
3681
|
+
pending?: boolean;
|
|
3682
|
+
/** The host retained an earlier snapshot after its own query failed or was cancelled. */
|
|
3683
|
+
stale?: boolean;
|
|
3684
|
+
/** Retry the host HTTP query when it owns the stale snapshot. The host updates its own state. */
|
|
3685
|
+
retry?(): void | Promise<void>;
|
|
3686
|
+
}
|
|
3576
3687
|
declare interface ReportRuntimeBudget {
|
|
3577
3688
|
maxRows?: number;
|
|
3578
3689
|
maxPages?: number;
|
|
@@ -3584,8 +3695,14 @@ declare interface ReportRuntimeBudget {
|
|
|
3584
3695
|
maxPreparedBytes?: number;
|
|
3585
3696
|
maxDurationMs?: number;
|
|
3586
3697
|
}
|
|
3698
|
+
declare interface ReportStoredPreferences extends Partial<ReportPreviewPreferences> {
|
|
3699
|
+
zoomMode?: "fit" | number;
|
|
3700
|
+
wideZoomMode?: "fit" | number;
|
|
3701
|
+
}
|
|
3587
3702
|
declare interface ReportTemplate {
|
|
3588
3703
|
schemaVersion?: string;
|
|
3704
|
+
/** Optional source identity and stable field meanings for safe stored-template reuse. */
|
|
3705
|
+
dataContract?: ReportTemplateDataContract;
|
|
3589
3706
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
3590
3707
|
params?: ReportParamDef[];
|
|
3591
3708
|
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
@@ -3594,6 +3711,8 @@ declare interface ReportTemplate {
|
|
|
3594
3711
|
}
|
|
3595
3712
|
declare interface ReportTemplate_2 {
|
|
3596
3713
|
schemaVersion?: string;
|
|
3714
|
+
/** Optional source identity and stable field meanings for safe stored-template reuse. */
|
|
3715
|
+
dataContract?: ReportTemplateDataContract_2;
|
|
3597
3716
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
3598
3717
|
params?: ReportParamDef_2[];
|
|
3599
3718
|
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
@@ -3602,6 +3721,8 @@ declare interface ReportTemplate_2 {
|
|
|
3602
3721
|
}
|
|
3603
3722
|
declare interface ReportTemplate_3 {
|
|
3604
3723
|
schemaVersion?: string;
|
|
3724
|
+
/** Optional source identity and stable field meanings for safe stored-template reuse. */
|
|
3725
|
+
dataContract?: ReportTemplateDataContract_3;
|
|
3605
3726
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
3606
3727
|
params?: ReportParamDef_3[];
|
|
3607
3728
|
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
@@ -3646,6 +3767,27 @@ declare interface ReportTemplateCatalogQuery {
|
|
|
3646
3767
|
limit?: number;
|
|
3647
3768
|
signal?: AbortSignal;
|
|
3648
3769
|
}
|
|
3770
|
+
declare interface ReportTemplateDataContract {
|
|
3771
|
+
/** Host-owned report/domain identity, without a query date or tenant credentials. */
|
|
3772
|
+
source?: string;
|
|
3773
|
+
datasets: Readonly<Record<string, {
|
|
3774
|
+
fields: readonly ReportTemplateFieldBinding[];
|
|
3775
|
+
}>>;
|
|
3776
|
+
}
|
|
3777
|
+
declare interface ReportTemplateDataContract_2 {
|
|
3778
|
+
/** Host-owned report/domain identity, without a query date or tenant credentials. */
|
|
3779
|
+
source?: string;
|
|
3780
|
+
datasets: Readonly<Record<string, {
|
|
3781
|
+
fields: readonly ReportTemplateFieldBinding_2[];
|
|
3782
|
+
}>>;
|
|
3783
|
+
}
|
|
3784
|
+
declare interface ReportTemplateDataContract_3 {
|
|
3785
|
+
/** Host-owned report/domain identity, without a query date or tenant credentials. */
|
|
3786
|
+
source?: string;
|
|
3787
|
+
datasets: Readonly<Record<string, {
|
|
3788
|
+
fields: readonly ReportTemplateFieldBinding_3[];
|
|
3789
|
+
}>>;
|
|
3790
|
+
}
|
|
3649
3791
|
/** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
|
|
3650
3792
|
declare interface ReportTemplateDocument {
|
|
3651
3793
|
schemaVersion: "1.0";
|
|
@@ -3706,6 +3848,30 @@ export declare const ReportTemplateEditor: DefineComponent<TemplateEditorOptions
|
|
|
3706
3848
|
showSave: boolean;
|
|
3707
3849
|
showModeSwitch: boolean;
|
|
3708
3850
|
}>;
|
|
3851
|
+
/** Stable business meaning is independent of a column's position and editable caption. */
|
|
3852
|
+
declare interface ReportTemplateFieldBinding {
|
|
3853
|
+
field: string;
|
|
3854
|
+
label?: string;
|
|
3855
|
+
semanticKey?: string;
|
|
3856
|
+
type?: ReportFieldContract["type"];
|
|
3857
|
+
unit?: string;
|
|
3858
|
+
}
|
|
3859
|
+
/** Stable business meaning is independent of a column's position and editable caption. */
|
|
3860
|
+
declare interface ReportTemplateFieldBinding_2 {
|
|
3861
|
+
field: string;
|
|
3862
|
+
label?: string;
|
|
3863
|
+
semanticKey?: string;
|
|
3864
|
+
type?: ReportFieldContract_2["type"];
|
|
3865
|
+
unit?: string;
|
|
3866
|
+
}
|
|
3867
|
+
/** Stable business meaning is independent of a column's position and editable caption. */
|
|
3868
|
+
declare interface ReportTemplateFieldBinding_3 {
|
|
3869
|
+
field: string;
|
|
3870
|
+
label?: string;
|
|
3871
|
+
semanticKey?: string;
|
|
3872
|
+
type?: ReportFieldContract_3["type"];
|
|
3873
|
+
unit?: string;
|
|
3874
|
+
}
|
|
3709
3875
|
declare interface ReportTemplateFixture {
|
|
3710
3876
|
name: string;
|
|
3711
3877
|
datasets: DatasetRows;
|
|
@@ -4607,6 +4773,8 @@ export declare interface TemplateEditorOptions extends TemplateEditorConflictOpt
|
|
|
4607
4773
|
datasets?: DatasetRows;
|
|
4608
4774
|
dataSchemas?: Record<string, DatasetContract>;
|
|
4609
4775
|
bindingDatasets?: ExcelBindingDataset[];
|
|
4776
|
+
/** Adopt the host's declared field meaning only after an explicit Excel binding is accepted. */
|
|
4777
|
+
bindingDataContract?: ReportTemplateDocument["template"]["dataContract"];
|
|
4610
4778
|
/** Optional independently persisted Excel source and binding recipe. */
|
|
4611
4779
|
bindingSession?: AnyExcelBindingSession;
|
|
4612
4780
|
readonly?: boolean;
|
|
@@ -4740,6 +4908,18 @@ export declare interface TemplateToolDraft {
|
|
|
4740
4908
|
value: string;
|
|
4741
4909
|
}
|
|
4742
4910
|
export declare type TemplateTotalsMessages = typeof TOTALS_MESSAGES;
|
|
4911
|
+
export declare interface TemplateWorkbenchOptions {
|
|
4912
|
+
blocked?: () => boolean;
|
|
4913
|
+
/** Return guards in the visible-first order, including mounted hidden workspaces. */
|
|
4914
|
+
guards?: () => readonly (() => boolean | Promise<boolean>)[];
|
|
4915
|
+
prepare?: () => ReportTemplateDocument | undefined | Promise<ReportTemplateDocument | undefined>;
|
|
4916
|
+
apply?: (document: ReportTemplateDocument, context: TemplateWorkbenchTaskContext) => boolean | void | Promise<boolean | void>;
|
|
4917
|
+
applied?: (document: ReportTemplateDocument) => void | Promise<void>;
|
|
4918
|
+
onError?: (cause: unknown) => void;
|
|
4919
|
+
}
|
|
4920
|
+
export declare interface TemplateWorkbenchTaskContext {
|
|
4921
|
+
signal: AbortSignal;
|
|
4922
|
+
}
|
|
4743
4923
|
declare const TOTALS_MESSAGES: {
|
|
4744
4924
|
title: string;
|
|
4745
4925
|
field: string;
|
|
@@ -4820,12 +5000,28 @@ declare interface TreeTableOptions_3 {
|
|
|
4820
5000
|
/** Bounded leaf-to-ancestor aggregate work; default one million. */
|
|
4821
5001
|
maxAggregationVisits?: number;
|
|
4822
5002
|
}
|
|
5003
|
+
/** Optional task orchestration shared by workbench shells, using their existing editor and manager. */
|
|
5004
|
+
export declare function useTemplateWorkbench(options: TemplateWorkbenchOptions): {
|
|
5005
|
+
operating: Ref<boolean>;
|
|
5006
|
+
busy: ComputedRef<boolean>;
|
|
5007
|
+
error: ShallowRef<unknown>;
|
|
5008
|
+
run: <T>(action: (context: TemplateWorkbenchTaskContext) => T | Promise<T>) => Promise<T | undefined>;
|
|
5009
|
+
guardChanges: () => Promise<boolean>;
|
|
5010
|
+
apply: () => Promise<boolean>;
|
|
5011
|
+
dispose: () => void;
|
|
5012
|
+
};
|
|
4823
5013
|
/** The same declarative formatting used by list columns, before any output backend. */
|
|
4824
5014
|
declare type ValueFormat = ColumnFormat;
|
|
4825
5015
|
/** The same declarative formatting used by list columns, before any output backend. */
|
|
4826
5016
|
declare type ValueFormat_2 = ColumnFormat_2;
|
|
4827
5017
|
/** The same declarative formatting used by list columns, before any output backend. */
|
|
4828
5018
|
declare type ValueFormat_3 = ColumnFormat_3;
|
|
5019
|
+
/** 可序列化的附加工作表在编码前写入,浏览器与 Worker 共用同一声明。 */
|
|
5020
|
+
declare interface XlsxAdditionalSheet {
|
|
5021
|
+
name: string;
|
|
5022
|
+
rows: readonly (readonly (string | number | boolean | null)[])[];
|
|
5023
|
+
columnWidths?: readonly number[];
|
|
5024
|
+
}
|
|
4829
5025
|
declare type XlsxImageOptions = ImageMediaOptions;
|
|
4830
5026
|
/**
|
|
4831
5027
|
* RenderPlan → xlsx 导出(B 端第二出口,对齐家族 @agile-team/mach-table-xlsx 路线):
|
|
@@ -4838,6 +5034,8 @@ declare type XlsxImageOptions = ImageMediaOptions;
|
|
|
4838
5034
|
declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImageOptions {
|
|
4839
5035
|
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|
|
4840
5036
|
sheetName?: (sheetIndex: number) => string;
|
|
5037
|
+
/** 可序列化命名,用于 Worker;未提供的项沿用默认名称。 */
|
|
5038
|
+
sheetNames?: readonly string[];
|
|
4841
5039
|
/** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
|
|
4842
5040
|
sheetMode?: "auto" | "pages" | "continuous";
|
|
4843
5041
|
/** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
|
|
@@ -4846,6 +5044,8 @@ declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImageOptions
|
|
|
4846
5044
|
maxDataBars?: number;
|
|
4847
5045
|
/** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
|
|
4848
5046
|
paperSize?: "auto" | "a3" | "a4" | "a5";
|
|
5047
|
+
/** 在最终编码前追加说明、审计等标量工作表,可直接交给 Worker。 */
|
|
5048
|
+
additionalSheets?: readonly XlsxAdditionalSheet[];
|
|
4849
5049
|
}
|
|
4850
5050
|
export {};
|
|
4851
5051
|
|
package/dist/designer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "vue";
|
|
2
|
-
import { C as e,
|
|
2
|
+
import { C as e, e as s, f as t, g as T, E as _, h as A, L as r, P as R, i as M, R as l, D as o, j as i, k as p, l as G, m as L, n as P, o as n, a as m, b as I, p as D, T as O, q as d, r as C, s as u, t as B, v as U } from "./designer-DhrE7jzw.js";
|
|
3
3
|
export {
|
|
4
4
|
e as COLUMN_VISUAL_MESSAGES,
|
|
5
5
|
s as ChartBindingInspector,
|
|
@@ -7,23 +7,24 @@ export {
|
|
|
7
7
|
T as DESIGNER_GUIDE_MESSAGES,
|
|
8
8
|
_ as EXCEL_BINDING_MESSAGES,
|
|
9
9
|
A as ExcelBindingWizard,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
r as LABEL_STUDIO_MESSAGES,
|
|
11
|
+
R as PARAM_EDITOR_MESSAGES,
|
|
12
12
|
M as ParamEditor,
|
|
13
13
|
l as REPORT_BATCH_MESSAGES,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
o as RULE_EDITOR_MESSAGES,
|
|
15
|
+
i as ReportBatchPanel,
|
|
16
|
+
p as ReportLabelStudio,
|
|
17
|
+
G as ReportTemplateEditor,
|
|
18
|
+
L as ReportTemplateLibrary,
|
|
19
19
|
P as RuleEditor,
|
|
20
20
|
n as TEMPLATE_EDITOR_MESSAGES,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
m as TEMPLATE_LIBRARY_MESSAGES,
|
|
22
|
+
I as TEMPLATE_PRODUCT_MESSAGES,
|
|
23
23
|
D as TEMPLATE_RECOVERY_MESSAGES,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
O as TEMPLATE_REVIEW_MESSAGES,
|
|
25
|
+
d as TemplateOutlinePanel,
|
|
26
26
|
C as TemplateReusePanel,
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
u as TemplateReviewPanel,
|
|
28
|
+
B as createTemplateDraftStorage,
|
|
29
|
+
U as useTemplateWorkbench
|
|
29
30
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const z=require("./template-serialization-CqQY4zDg.cjs"),V=require("./data-bar-CeZuFmYl.cjs"),B=require("./dom-cell-address-DLD1mkTB.cjs"),f=require("./progress-WomPRP3B.cjs"),D=require("./grid-strokes-Be24LGuV.cjs"),R=require("./capabilities-DiBj4Qgl.cjs");function F(e){const t=/\.pages\[(\d+)\](?:\.components\[(\d+)\])?/.exec(e);return t?{pageIndex:Number(t[1]),...t[2]===void 0?{}:{componentIndex:Number(t[2])}}:{}}function q(e,t,r){return z.collectTemplateDatasetBindings(e).filter(n=>n.dataset===t).flatMap(n=>n.fields.filter(o=>o.field===r).map(o=>({...o,...F(o.path),dataset:t,kind:/\.computed\[/.test(o.path)?"calculation":/\.columns\[\d+\]\.field$/.test(o.path)?"display":"binding"})))}function j(e,t){const r=e.kind==="list"?e.title||e.dataset:e.binding?.field||e.text||e.nid;return`${e.kind} · ${(r||String(t+1)).replace(/\s+/g," ").slice(0,80)}`}function K(e){const t=z.collectTemplateDatasetBindings(e),r=new Map;for(const o of t)for(const l of o.fields){const a=/^\$\.template\.pages\[\d+\]\.components\[\d+\]/.exec(l.path)?.[0];if(!a)continue;const s=r.get(a)??[];s.push({...l,dataset:o.dataset}),r.set(a,s)}const n=[];return e.pages.forEach((o,l)=>{const a=`$.template.pages[${l}]`;n.push({path:a,pageIndex:l,kind:"page",depth:0,title:typeof o.meta?.title=="string"?o.meta.title:`${l+1} · ${o.widthMm} × ${o.heightMm} mm`}),o.components.forEach((s,i)=>{const d=`${a}.components[${i}]`,h={pageIndex:l,componentIndex:i};n.push({path:d,...h,depth:1,kind:"component",title:j(s,i)}),s.kind==="list"&&(s.columns.forEach((m,p)=>n.push({path:`${d}.columns[${p}].field`,...h,depth:2,kind:"field",title:`${m.header} · ${m.field}`,field:m.field,dataset:s.dataset})),s.computed?.forEach((m,p)=>n.push({path:`${d}.computed[${p}]`,...h,depth:2,kind:"calculation",title:m.field,field:m.field,dataset:s.dataset})));const c=new Set;for(const m of r.get(d)??[])/\.columns\[\d+\]\.field$/.test(m.path)||c.has(m.path)||(c.add(m.path),n.push({...m,...h,depth:2,kind:"binding",title:m.field}))})}),n}function M(e,t,r){let n=0,o=e.length;for(;n<o;){const l=n+o>>>1;r(e[l])<t?n=l+1:o=l}return n}function L(e){if(![e.leftMm,e.topMm,e.widthMm,e.heightMm].every(Number.isFinite)||e.widthMm<0||e.heightMm<0)throw new RangeError("Preview viewport must have finite coordinates and nonnegative dimensions.");return e}function U(e){const t=e.rows.map(()=>[]);for(const r of e.cells){const n=Math.min(t.length,r.ri+(r.cell.rowSpan??1));for(let o=r.ri;o<n;o++)t[o].push(r)}for(const r of t)r.sort((n,o)=>n.xMm-o.xMm);return{cells(r){L(r);const n=new Set,o=r.topMm+r.heightMm,l=r.leftMm+r.widthMm;let a=M(e.rows,r.topMm,s=>s.pos+s.size);for(;a<t.length&&e.rows[a].pos<=o;){const s=t[a++];let i=M(s,r.leftMm,d=>d.xMm+d.widthMm);for(;i<s.length&&s[i].xMm<=l;)n.add(s[i++])}return[...n].sort((s,i)=>s.ri-i.ri||s.ci-i.ci)}}}function _(e){const t=["h","v"].map(r=>e.filter(n=>n.kind===r).sort((n,o)=>n.pos-o.pos));return r=>{const n=[];return t.forEach((o,l)=>{const a=l===0?r.topMm:r.leftMm,s=a+(l===0?r.heightMm:r.widthMm),i=l===0?r.leftMm:r.topMm,d=i+(l===0?r.widthMm:r.heightMm);let h=M(o,a,c=>c.pos);for(;h<o.length&&o[h].pos<=s;){const c=o[h++];c.to>=i&&c.from<=d&&n.push(c)}}),n}}function W(){const e=[];return{mount(t){e.push(ee(t))},update(t,r,n,o){L(t);let l=!1;for(const a of e)l=a.update(t,a.component===r?n:void 0,o)||l;return l}}}function X(e,t){const r=Math.max(8,e.widthMm/4),n=Math.max(8,e.heightMm/4);return{leftMm:e.leftMm-t.leftMm-r,topMm:e.topMm-t.topMm-n,widthMm:e.widthMm+2*r,heightMm:e.heightMm+2*n}}function Y(e,t,r){let n=t.get(r);return n||(n=e.table.ownerDocument.createElement("tr"),n.className=e.rowClass,n.setAttribute("role","row"),n.setAttribute("aria-rowindex",String(r+1)),n.style.cssText="all:unset;display:contents;box-sizing:border-box",t.set(r,n)),n}function J(e,t,r,n){const o=new Set(t),l=new Set(t.map(i=>i.ri)),a=new Map;for(const[i,d]of r)if(!o.has(i)){d.remove(),r.delete(i);const h=e.reuseKey?.(i);if(h!==void 0){const c=a.get(h)??[];c.push(d),a.set(h,c)}}for(const[i,d]of n)l.has(i)||(d.remove(),n.delete(i));for(const i of t){let d=r.get(i);if(!d){const c=e.reuseKey?.(i),m=c===void 0?void 0:a.get(c)?.pop();d=m&&e.reuseCell?.(m,i)?m:e.drawCell(i),d.setAttribute("aria-colindex",String(i.ci+1)),r.set(i,d)}const h=Y(e,n,i.ri);d.parentElement!==h&&h.appendChild(d)}const s=new Map;for(const i of t){const d=s.get(i.ri)??[];d.push(r.get(i)),s.set(i.ri,d)}for(const[i,d]of s)A(n.get(i),d);A(e.body,[...l].sort((i,d)=>i-d).map(i=>n.get(i)))}function A(e,t){let r=e.firstElementChild;for(const n of t)n===r?r=r.nextElementSibling:e.insertBefore(n,r)}function Q(e,t){return e.table?.role==="header"?e.heightMm:t.rows[0]?.size??0}function Z(e,t,r,n){const o=[e],l=n.freezeHeaders&&(r.table?.role==="header"||!r.table),a=Q(r,t);l&&o.push({...e,topMm:0,heightMm:Math.max(0,a-1e-4)});const s=Math.max(0,Math.min(20,Math.floor(n.frozenColumns??0)))||0;if(!s||!t.columns.length)return o;const i=t.columns[Math.min(s,t.columns.length)-1],d={...e,leftMm:0,widthMm:Math.max(0,i.pos+i.size-1e-4)};return o.push(d),l&&o.push({...d,topMm:0,heightMm:Math.max(0,a-1e-4)}),o}function ee(e){const t=f.resolveGridLayout(e.grid,e.component.widthMm,e.component.heightMm),r=new Map(t.cells.map(h=>[`${h.ri}:${h.ci}`,h])),n=U(t),o=new Map,l=new Map,a=_(D.resolveGridStrokes(t,e.component));e.table.setAttribute("aria-rowcount",String(t.rows.length)),e.table.setAttribute("aria-colcount",String(t.columns.length));let s="",i="";function d(h,c){const m=new Set;for(const p of Z(h,t,e.component,c??{}))for(const w of n.cells(p))m.add(w);return[...m]}return{component:e.component,update(h,c,m){const p=X(h,e.component),w=d(p,m),y=c&&r.get(`${c.rowIndex}:${c.columnIndex}`);y&&!w.includes(y)&&w.push(y),w.sort((b,$)=>b.ri-$.ri||b.ci-$.ci);const C=w.map(b=>`${b.ri}:${b.ci}`).join(";"),S=a(p),v=S.map(b=>`${b.kind}:${b.pos}:${b.from}:${b.to}`).join(";"),E=C!==s,T=v!==i;return E&&(s=C,J(e,w,o,l)),T&&(i=v,e.edgeHost.replaceChildren(...e.drawEdges(S))),E||T}}}const G=new WeakMap,te={root:"mr-root",page:"mr-page",comp:"mr-comp",text:"mr-text",lines:"mr-lines",line:"mr-line",rich:"mr-rich",paragraph:"mr-paragraph",segment:"mr-segment",image:"mr-image",shape:"mr-shape",grid:"mr-grid",row:"mr-row",cell:"mr-cell",unknown:"mr-unknown"};function g(e,t){return t?.classNames?.[e]??te[e]}class ne{constructor(){this.props=[]}add(t,r){return r==null||r===!1||r===""?this:(this.props.push([t,String(r)]),this)}mm(t,r,n,o=2){return this.add(t,`${f.round(f.mmToPx(r,n),o)}px`)}toString(){let t="";for(const[r,n]of this.props)t+=`${r}:${n};`;return t}applyTo(t){const r=this.toString();r&&(t.style.cssText=r)}}function u(e,t="unset"){return new ne().add("all",t).add("display",e).add("box-sizing","border-box")}function H(e,t,r){e.add("color",t.color).add("font-family",t.fontFamily).add("font-weight",t.bold!=null?t.bold?"700":"400":void 0).add("font-style",t.italic!=null?t.italic?"italic":"normal":void 0).add("text-decoration",t.underline!=null?t.underline?"underline":"none":void 0).add("letter-spacing",t.letterSpacing!=null?`${t.letterSpacing}pt`:void 0).add("line-height",String(f.resolveLineHeight(t))).add("text-align",t.align);const n=f.resolveFontSize(t,r);e.add("font-size",`${f.round(n.fontSizePx,2)}px`)}function re(e,t,r){const n=t.style??{};H(e,n,r);const o=!t.grid&&(t.kind==="ellipse"||t.kind==="line");e.add("background-color",o?void 0:n.backgroundColor).add("opacity",n.opacity!=null?String(n.opacity):void 0).add("transform",n.rotateDeg?`rotate(${n.rotateDeg}deg)`:void 0)}function P(e,t,r,n,o,l){const a=e.cell,s=l.createElement("td");s.className=g("cell",o),B.setDomCellAddress(s,e.ri,e.ci),s.setAttribute("role",t.table?.role==="header"?"columnheader":"cell"),a.colSpan&&(s.colSpan=a.colSpan),a.rowSpan&&(s.rowSpan=a.rowSpan);const i=f.mergeComponentStyles(t.style,a.style),d=u("block").add("position","absolute").mm("left",e.xMm,n).mm("top",e.yMm,n).mm("width",e.widthMm,n).mm("height",e.heightMm,n).add("background-color",i.backgroundColor).add("vertical-align",i.verticalAlign??"middle");H(d,i,n),d.applyTo(s);const h=V.dataBarBox(a.dataBar,e.widthMm,e.heightMm,r);if(h){const m=l.createElement("div");m.className="mr-cell-data-bar",m.setAttribute("aria-hidden","true"),u("block").add("position","absolute").mm("left",h.x,n).mm("top",h.y,n).mm("width",h.width,n).mm("height",h.height,n).add("background-color",h.color).add("opacity","0.35").add("pointer-events","none").applyTo(m),s.appendChild(m)}const c=l.createElement("div");c.className="mr-cell-content",u("flex").add("position","absolute").mm("left",r+(a.indentMm??0),n).mm("right",r,n).mm("top",r,n).mm("bottom",r,n).add("flex-direction","column").add("justify-content",i.verticalAlign==="top"?"flex-start":i.verticalAlign==="bottom"?"flex-end":"center").add("overflow-wrap","anywhere").add("overflow","hidden").applyTo(c),a.richParagraphs?.length?c.appendChild(I({...t,kind:"text",richParagraphs:a.richParagraphs},n,o,l)):a.text!=null&&c.append(a.text);for(const m of a.children??[])c.appendChild(x(m,n,o,l));return s.insertBefore(c,s.firstChild),s}function oe(e,t,r,n){return O(D.resolveGridStrokes(e,t),r,n)}function ie(e){const t=e.cell;if(!(t.children?.length||t.richParagraphs?.length||t.dataBar||(t.colSpan??1)!==1||(t.rowSpan??1)!==1))return JSON.stringify([t.style,t.indentMm])}function le(e,t,r){if(e.style.position!=="absolute"||e.style.zIndex||e.style.transform||e.children.length!==1)return!1;const n=e.firstElementChild;return!(n instanceof HTMLElement)||n.className!=="mr-cell-content"?!1:(B.setDomCellAddress(e,t.ri,t.ci),e.style.left=`${f.round(f.mmToPx(t.xMm,r),2)}px`,e.style.top=`${f.round(f.mmToPx(t.yMm,r),2)}px`,e.style.width=`${f.round(f.mmToPx(t.widthMm,r),2)}px`,e.style.height=`${f.round(f.mmToPx(t.heightMm,r),2)}px`,n.textContent=t.cell.text??"",!0)}function O(e,t,r){return e.map(n=>{const o=`${f.round(n.widthPt*t/72,2)}px solid ${n.color}`,l=r.createElement("div");l.className="mr-grid-edge",l.setAttribute("aria-hidden","true");const a=n.kind==="h";return u("block").add("position","absolute").add("pointer-events","none").mm("left",a?n.from:n.pos,t).mm("top",a?n.pos:n.from,t).mm("width",a?n.to-n.from:0,t).mm("height",a?0:n.to-n.from,t).add(a?"border-top":"border-left",o).applyTo(l),l})}function ae(e,t,r,n,o){const l=o.createElement("table");l.className=g("grid",n),l.setAttribute("role","table"),u("block").add("position","relative").add("width","100%").add("height","100%").applyTo(l);const a=o.createElement("tbody");u("contents").applyTo(a),l.appendChild(a);const s=t.style?.rotateDeg?void 0:G.get(n);if(s){const c=o.createElement("div");u("block").add("position","relative").add("width","100%").add("height","100%").applyTo(c);const m=o.createElement("div");return u("contents").applyTo(m),m.setAttribute("aria-hidden","true"),s.mount({grid:e,component:t,table:l,rowClass:g("row",n),body:a,edgeHost:m,drawCell:p=>P(p,t,e.paddingMm??.5,r,{...n},o),reuseKey:ie,reuseCell:(p,w)=>le(p,w,r),drawEdges:p=>O(p,r,o)}),c.append(l,m),c}const i=f.resolveGridLayout(e,t.widthMm,t.heightMm),d=e.cells.map(()=>{const c=o.createElement("tr");return c.className=g("row",n),c.setAttribute("role","row"),u("contents").applyTo(c),a.appendChild(c),c});for(const c of i.cells)d[c.ri].appendChild(P(c,t,e.paddingMm??.5,r,n,o));const h=o.createElement("div");return u("block").add("position","relative").add("width","100%").add("height","100%").applyTo(h),h.append(l,...oe(i,t,r,o)),h}function se(e,t,r,n){const o=n.createElement("div");o.className=g("paragraph",r),u("block").add("text-align",e.align).add("line-height",e.lineHeight!=null?String(e.lineHeight):void 0).mm("margin-top",e.spaceBeforeMm??0,t).mm("margin-bottom",e.spaceAfterMm??0,t).mm("text-indent",e.indentMm??0,t).applyTo(o);for(const l of e.segments||[]){const a=n.createElement("span");a.className=g("segment",r),a.textContent=l.kind==="field"?l.field??"":l.text??"";const s=u("inline");if(l.style){const i=l.style;s.add("color",i.color).add("background-color",i.backgroundColor).add("font-family",i.fontFamily).add("line-height",i.lineHeight).add("letter-spacing",i.letterSpacing==null?void 0:`${i.letterSpacing*t/72}px`).add("font-weight",i.bold!=null?i.bold?"700":"400":void 0).add("font-style",i.italic!=null?i.italic?"italic":"normal":void 0).add("text-decoration",i.underline!=null?i.underline?"underline":"none":void 0),(i.fontSize!=null||i.fontSizePx!=null)&&s.add("font-size",`${f.round(f.resolveFontSize(i,t).fontSizePx,2)}px`)}s.applyTo(a),o.appendChild(a)}return o}function I(e,t,r,n){if(f.isRichText(e)){const o=n.createElement("div");o.className=g("rich",r),u("block").applyTo(o);for(const l of e.richParagraphs)o.appendChild(se(l,t,r,n));return o}if(Array.isArray(e.lines)&&e.lines.length>0){const o=n.createElement("div");o.className=g("lines",r),u("block").applyTo(o);for(const l of e.lines){const a=n.createElement("div");a.className=g("line",r),a.textContent=l,u("block").add("white-space","pre").add("min-height","1lh").applyTo(a),o.appendChild(a)}return o}return e.text??""}function de(e,t,r,n){const o=n.createElement("div");o.className=g("text",r);const l=e.style||{};return u("flex").add("width","100%").add("height","100%").add("flex-direction","column").add("justify-content",l.verticalAlign==="middle"?"center":l.verticalAlign==="bottom"?"flex-end":"flex-start").add("overflow-wrap","anywhere").add("overflow","hidden").applyTo(o),o.append(I(e,t,r,n)),o}function ce(e,t,r){const n=r.createElement("img");return n.className=g("image",t),n.src=e.imageData,u("block").add("width","100%").add("height","100%").add("object-fit","contain").applyTo(n),n.alt=e.kind,n}function N(e,t,r,n){const o=n.createElement("div");o.className=g("shape",r);const l=e.style||{},a=f.resolveStroke(l),s=f.resolveBoxBorders(l),i=`${f.round(a.widthPt*t/72,2)}px solid ${a.color}`,d=u("block");return e.grid?d.add("position","relative"):e.kind==="rect"?(s.top&&d.add("border-top",i),s.right&&d.add("border-right",i),s.bottom&&d.add("border-bottom",i),s.left&&d.add("border-left",i)):e.kind==="ellipse"?(d.add("border-radius","50%"),s.inner&&d.add("border",i),l.backgroundColor&&d.add("background-color",l.backgroundColor)):e.kind==="line"&&d.add("height","0").add("border-top",i),d.add("box-sizing","border-box").add("width","100%").add("height","100%"),d.applyTo(o),o}function he(e,t,r){const n=r.createElementNS("http://www.w3.org/2000/svg","svg"),o=f.mmToPx(e.widthMm,t),l=f.mmToPx(e.heightMm,t);n.setAttribute("width",String(Math.max(1,o))),n.setAttribute("height",String(Math.max(1,l))),n.setAttribute("aria-hidden","true"),n.style.overflow="visible",n.style.display="block";const a=r.createElementNS("http://www.w3.org/2000/svg","line");a.setAttribute("x1","0"),a.setAttribute("x2",String(o)),a.setAttribute("y1",e.lineDirection==="up"?String(l):"0"),a.setAttribute("y2",e.lineDirection==="up"?"0":String(l));const s=f.resolveStroke({...e.style,borderColor:e.style?.lineColor??e.style?.borderColor});return a.setAttribute("stroke",s.color),a.setAttribute("stroke-width",String(s.widthPt*t/72)),n.appendChild(a),n}function x(e,t,r,n){const o=n.createElement("div");o.className=`${g("comp",r)} mr-kind-${e.kind}`;const l=u("block").add("position","absolute").mm("left",e.leftMm,t).mm("top",e.topMm,t).mm("width",e.widthMm,t).mm("height",e.heightMm,t).add("box-sizing","border-box");if(re(l,e,t),l.applyTo(o),f.isImageBackedComponent(e))return o.appendChild(ce(e,r,n)),o;if(e.kind==="text")return o.appendChild(de(e,t,r,n)),o;if(e.grid){const s=N(e,t,r,n);return s.appendChild(ae(e.grid,e,t,r,n)),o.appendChild(s),o}if(e.kind==="line"&&e.lineDirection)return o.appendChild(he(e,t,n)),o;if(e.kind==="line"||e.kind==="rect"||e.kind==="ellipse")return o.appendChild(N(e,t,r,n)),o;const a=n.createElement("div");return a.className=g("unknown",r),u("block").applyTo(a),a.textContent=e.fallbackText??`[${e.kind}]`,a.dataset.mrUnsupported=e.kind,a.setAttribute("role","note"),o.appendChild(a),o}function k(e,t,r,n){const o=n.createElement("div");return o.className=g("page",r),u("block","initial").add("position","relative").add("font-family",f.DEFAULT_FONT_FAMILY).add("font-size",`${f.round(f.resolveFontSize(void 0,t).fontSizePx,2)}px`).add("line-height",String(f.resolveLineHeight(void 0))).add("white-space","pre-wrap").add("direction","ltr").mm("width",e.pageWidthMm,t).mm("height",e.pageHeightMm,t).add("background-color","#fff").add("color",f.DEFAULT_TEXT_COLOR).add("overflow","hidden").add("box-sizing","border-box").applyTo(o),e.components.forEach((l,a)=>{const s=x(l,t,r,n);s.dataset.mrComponentIndex=String(a),o.appendChild(s)}),o}function me(e,t,r={}){const n=r.dpi??96;R.reportOutputDiagnostics(e,"dom",r);const o=t.createElement("div");return o.className=g("root",r),u("block").applyTo(o),o.dataset.schemaVersion=e.schemaVersion,e.pages.forEach(l=>{o.appendChild(k(l,n,r,t))}),o}function fe(e,t,r,n){const o={...r},l=W();return G.set(o,l),{element:k(e,t,o,n),update(s,i,d){return l.update(s,i&&e.components[i.componentIndex],i,d)}}}exports.classOf=g;exports.collectTemplateOutline=K;exports.createPageViewportRenderer=fe;exports.inspectTemplateFieldUsage=q;exports.renderComponent=x;exports.renderPage=k;exports.renderPlan=me;exports.templatePathLocation=F;
|