@agile-team/mach-report 2.14.0 → 2.15.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 +16 -11
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/{ExcelBindingWizard-CvsWR8Ga.js → ExcelBindingWizard-BKH1nGNS.js} +3 -3
- package/dist/{ExcelBindingWizard-CLT2p7P3.cjs → ExcelBindingWizard-Bs43BGNp.cjs} +1 -1
- package/dist/ParamEditor-Da4akw6V.cjs +1 -0
- package/dist/ParamEditor-DoAhzJsm.js +594 -0
- package/dist/{ReportBatchPanel-LqVgiqp7.js → ReportBatchPanel-BMf6boMA.js} +39 -39
- package/dist/{ReportBatchPanel-DkxTzBkD.cjs → ReportBatchPanel-wP9m9Pj1.cjs} +1 -1
- package/dist/ReportPreview-ChV19HBp.js +4619 -0
- package/dist/ReportPreview-DbLvvOUT.cjs +6 -0
- package/dist/{ReportTemplateLibrary-MjWEtc7X.js → ReportTemplateLibrary-C9wutIiT.js} +1 -1
- package/dist/{ReportTemplateLibrary-cQ1sqNYo.cjs → ReportTemplateLibrary-Sxr3eD0J.cjs} +1 -1
- package/dist/{RuleEditor-ChuXMlei.js → RuleEditor-C_Clasvd.js} +5 -5
- package/dist/{RuleEditor-BaR6xUiI.cjs → RuleEditor-XhGHK8DE.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-Dci6aRn1.js → TemplateOutlinePanel-D6Bkny59.js} +2 -2
- package/dist/{TemplateOutlinePanel-BHKP89Xz.cjs → TemplateOutlinePanel-JTSR53vJ.cjs} +1 -1
- package/dist/{TemplateReusePanel-CY5eO2Sh.cjs → TemplateReusePanel-Kx35S0Ql.cjs} +1 -1
- package/dist/{TemplateReusePanel-B7Gmyc1z.js → TemplateReusePanel-rVuK1kTz.js} +2 -2
- package/dist/{TemplateReviewPanel-DjlX3xpt.js → TemplateReviewPanel-B0ar9_zf.js} +2 -2
- package/dist/{TemplateReviewPanel-JvZe9_4G.cjs → TemplateReviewPanel-Dn6X9UmY.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +3 -1
- package/dist/analytics.d.ts +3 -1
- package/dist/analytics.js +154 -60
- package/dist/artifact-integrity.json +135 -0
- package/dist/assets-B9ImAi6_.cjs +1 -0
- package/dist/assets-DEaz4qsp.js +124 -0
- package/dist/batch-BaP6pWDE.cjs +1 -0
- package/dist/batch-BfZHN1do.js +220 -0
- package/dist/batch-CGyt-b2W.js +273 -0
- package/dist/batch-CLpELXBl.cjs +1 -0
- package/dist/capabilities-CAh2Nrue.cjs +1 -0
- package/dist/capabilities-DskCHs3V.js +69 -0
- package/dist/codes.d.cts +2 -0
- package/dist/codes.d.ts +2 -0
- package/dist/{computed-Bvk0W15F.js → computed-C-4C2S5h.js} +3 -3
- package/dist/config-BVsJXSqS.js +842 -0
- package/dist/config-D10us76d.cjs +1 -0
- package/dist/data-explanation-B8MZRYVS.js +16 -0
- package/dist/data-explanation-DE55G30w.cjs +1 -0
- package/dist/designer-2bDlcNXQ.js +5136 -0
- package/dist/designer-BT7XCdbW.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +144 -16
- package/dist/designer.d.ts +144 -16
- package/dist/designer.js +1 -1
- package/dist/drill-ByJviLXS.js +145 -0
- package/dist/drill-DYTxuL3A.cjs +1 -0
- package/dist/{font-loader-vhCT8znW.cjs → font-loader-B_UkxpzC.cjs} +1 -1
- package/dist/{font-loader-DHto6Lra.js → font-loader-Q3bQjmrI.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +82 -4
- package/dist/index.d.ts +82 -4
- package/dist/index.js +785 -820
- package/dist/json-snapshot-DFb2eWkf.js +1416 -0
- package/dist/json-snapshot-WWSGlaHG.cjs +2 -0
- package/dist/licenses/_bwip-js_generic-4.11.4.txt +24 -0
- package/dist/licenses/_fast-csv_format-4.3.5.txt +22 -0
- package/dist/licenses/_fast-csv_parse-4.3.6.txt +22 -0
- package/dist/licenses/_pdf-lib_fontkit-1.1.1.txt +326 -0
- package/dist/licenses/_pdf-lib_standard-fonts-1.0.0.txt +22 -0
- package/dist/licenses/_pdf-lib_upng-1.0.1.txt +22 -0
- package/dist/licenses/_types_node-14.18.63.txt +22 -0
- package/dist/licenses/_types_pako-2.0.3.txt +22 -0
- package/dist/licenses/_types_pegjs-0.10.6.txt +22 -0
- package/dist/licenses/archiver-5.3.2.txt +23 -0
- package/dist/licenses/archiver-utils-2.1.0.txt +23 -0
- package/dist/licenses/archiver-utils-3.0.4.txt +23 -0
- package/dist/licenses/async-3.2.6.txt +20 -0
- package/dist/licenses/balanced-match-1.0.2.txt +22 -0
- package/dist/licenses/base64-js-1.5.1.txt +22 -0
- package/dist/licenses/big-integer-1.6.52.txt +25 -0
- package/dist/licenses/binary-0.3.0.txt +178 -0
- package/dist/licenses/bl-4.1.0.txt +14 -0
- package/dist/licenses/bluebird-3.4.7.txt +22 -0
- package/dist/licenses/brace-expansion-1.1.21.txt +22 -0
- package/dist/licenses/brace-expansion-2.1.7.txt +22 -0
- package/dist/licenses/buffer-5.7.1.txt +22 -0
- package/dist/licenses/buffer-crc32-0.2.13.txt +20 -0
- package/dist/licenses/buffer-indexof-polyfill-1.0.2.txt +23 -0
- package/dist/licenses/buffers-0.1.1.txt +140 -0
- package/dist/licenses/chainsaw-0.1.0.txt +184 -0
- package/dist/licenses/compress-commons-4.1.2.txt +23 -0
- package/dist/licenses/concat-map-0.0.1.txt +19 -0
- package/dist/licenses/core-util-is-1.0.3.txt +20 -0
- package/dist/licenses/crc-32-1.2.2.txt +202 -0
- package/dist/licenses/crc32-stream-4.0.3.txt +23 -0
- package/dist/licenses/dayjs-1.11.23.txt +22 -0
- package/dist/licenses/duplexer2-0.1.4.txt +27 -0
- package/dist/licenses/end-of-stream-1.4.5.txt +22 -0
- package/dist/licenses/exceljs-4.4.0.txt +23 -0
- package/dist/licenses/fast-csv-4.3.6.txt +22 -0
- package/dist/licenses/fast-png-6.4.0.txt +22 -0
- package/dist/licenses/fs-constants-1.0.0.txt +22 -0
- package/dist/licenses/fs.realpath-1.0.0.txt +44 -0
- package/dist/licenses/fstream-1.0.12.txt +16 -0
- package/dist/licenses/glob-7.2.3.txt +22 -0
- package/dist/licenses/graceful-fs-4.2.11.txt +16 -0
- package/dist/licenses/ieee754-1.2.1.txt +12 -0
- package/dist/licenses/immediate-3.0.6.txt +21 -0
- package/dist/licenses/inflight-1.0.6.txt +16 -0
- package/dist/licenses/inherits-2.0.4.txt +17 -0
- package/dist/licenses/iobuffer-5.4.0.txt +23 -0
- package/dist/licenses/isarray-1.0.0.txt +61 -0
- package/dist/licenses/jszip-3.10.2.txt +652 -0
- package/dist/licenses/lazystream-1.0.1.txt +24 -0
- package/dist/licenses/lie-3.3.0.txt +8 -0
- package/dist/licenses/listenercount-1.0.1.txt +6 -0
- package/dist/licenses/lodash.defaults-4.2.0.txt +48 -0
- package/dist/licenses/lodash.difference-4.5.0.txt +48 -0
- package/dist/licenses/lodash.escaperegexp-4.1.2.txt +48 -0
- package/dist/licenses/lodash.flatten-4.4.0.txt +48 -0
- package/dist/licenses/lodash.groupby-4.6.0.txt +48 -0
- package/dist/licenses/lodash.isboolean-3.0.3.txt +23 -0
- package/dist/licenses/lodash.isequal-4.5.0.txt +48 -0
- package/dist/licenses/lodash.isfunction-3.0.9.txt +48 -0
- package/dist/licenses/lodash.isnil-4.0.0.txt +23 -0
- package/dist/licenses/lodash.isplainobject-4.0.6.txt +48 -0
- package/dist/licenses/lodash.isundefined-3.0.1.txt +23 -0
- package/dist/licenses/lodash.union-4.6.0.txt +48 -0
- package/dist/licenses/lodash.uniq-4.5.0.txt +48 -0
- package/dist/licenses/minimatch-3.1.5.txt +16 -0
- package/dist/licenses/minimatch-5.1.9.txt +16 -0
- package/dist/licenses/minimist-1.2.8.txt +19 -0
- package/dist/licenses/mkdirp-0.5.6.txt +22 -0
- package/dist/licenses/node-sql-parser-5.4.0.txt +202 -0
- package/dist/licenses/normalize-path-3.0.0.txt +22 -0
- package/dist/licenses/once-1.4.0.txt +16 -0
- package/dist/licenses/pako-1.0.11.txt +22 -0
- package/dist/licenses/pako-2.2.0.txt +22 -0
- package/dist/licenses/path-is-absolute-1.0.1.txt +22 -0
- package/dist/licenses/pdf-lib-1.17.1.txt +22 -0
- package/dist/licenses/process-nextick-args-2.0.1.txt +20 -0
- package/dist/licenses/readable-stream-2.3.8.txt +48 -0
- package/dist/licenses/readable-stream-3.6.2.txt +48 -0
- package/dist/licenses/readdir-glob-1.1.3.txt +202 -0
- package/dist/licenses/rimraf-2.7.1.txt +16 -0
- package/dist/licenses/safe-buffer-5.1.2.txt +22 -0
- package/dist/licenses/safe-buffer-5.2.1.txt +22 -0
- package/dist/licenses/saxes-5.0.1.txt +397 -0
- package/dist/licenses/setimmediate-1.0.5.txt +21 -0
- package/dist/licenses/string_decoder-1.1.1.txt +49 -0
- package/dist/licenses/string_decoder-1.3.0.txt +49 -0
- package/dist/licenses/tar-stream-2.2.0.txt +22 -0
- package/dist/licenses/tmp-0.2.7.txt +22 -0
- package/dist/licenses/traverse-0.3.9.txt +25 -0
- package/dist/licenses/tslib-1.14.1.txt +13 -0
- package/dist/licenses/unzipper-0.10.14.txt +26 -0
- package/dist/licenses/util-deprecate-1.0.2.txt +25 -0
- package/dist/licenses/uuid-11.1.1.txt +10 -0
- package/dist/licenses/wrappy-1.0.2.txt +16 -0
- package/dist/licenses/xmlchars-2.2.0.txt +19 -0
- package/dist/licenses/zip-stream-4.1.1.txt +23 -0
- package/dist/matrix-CGRGkn5s.js +112 -0
- package/dist/matrix-gEO7ZM_u.cjs +1 -0
- package/dist/media-B7vnpD8k.cjs +1 -0
- package/dist/media-Y90dHK9z.js +70 -0
- package/dist/param-validation-C3HlcLLO.cjs +1 -0
- package/dist/param-validation-Do7Eg8Zv.js +181 -0
- package/dist/{pdf-8UPQebOE.js → pdf-BwNyeGpt.js} +4385 -4321
- package/dist/{pdf-AyJGb22z.cjs → pdf-CvvrjPQg.cjs} +51 -49
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -3
- package/dist/pdf.d.ts +18 -3
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BGKf-Tqg.js → plugin-Ca_XZG3l.js} +2 -2
- package/dist/{plugin-CktLH_Iy.cjs → plugin-DHO7X8z2.cjs} +1 -1
- package/dist/prepared-CFy9B75C.cjs +1 -0
- package/dist/prepared-ajM-H-9B.js +69 -0
- package/dist/progress-B0ctFpKf.cjs +1 -0
- package/dist/progress-D-OTpEav.js +52 -0
- package/dist/record-bindings-By_UKZ2g.cjs +1 -0
- package/dist/record-bindings-Do_b3h4V.js +196 -0
- package/dist/{region-binding-workflow-DEJbhpCv.js → region-binding-workflow-BMhK_TjP.js} +1 -1
- package/dist/{region-binding-workflow-BzfbxRiR.cjs → region-binding-workflow-DIYJdCUr.cjs} +1 -1
- package/dist/{report-params-B44imUd4.js → report-params-B1RzkhJj.js} +1 -1
- package/dist/{report-params-SJfhKgaX.cjs → report-params-WDGrA4oP.cjs} +1 -1
- package/dist/sbom.cdx.json +3982 -0
- package/dist/server/node.d.cts +20 -1
- package/dist/server/node.d.ts +20 -1
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +247 -237
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +772 -4
- package/dist/server.d.ts +772 -4
- package/dist/server.js +885 -645
- package/dist/sha256-ArEYjaTI.cjs +1 -0
- package/dist/sha256-DPEuJ3nh.js +155 -0
- package/dist/style.css +1 -1
- package/dist/template-bindings-C2SpvsMU.js +58 -0
- package/dist/template-bindings-CEtWyiLX.cjs +1 -0
- package/dist/template-catalog-FJE_c9Qe.cjs +1 -0
- package/dist/template-catalog-j2B1MJlL.js +414 -0
- package/dist/{template-fragments-CLkGo6To.js → template-fragments-BGbQLGlV.js} +21 -21
- package/dist/{template-fragments-DFUpq5QM.cjs → template-fragments-DcKeiylI.cjs} +1 -1
- package/dist/{template-outline-B3xVkzSv.cjs → template-outline-BwRV_eRo.cjs} +1 -1
- package/dist/{template-outline-CFenM1PV.js → template-outline-cnWfT_LK.js} +3 -3
- package/dist/{template-registry-COXDEJEM.js → template-registry-BtaKPELV.js} +364 -201
- package/dist/template-registry-Co1zPq5e.cjs +1 -0
- package/dist/textwrap-CWHyzkBH.cjs +4 -0
- package/dist/textwrap-DE1kgcJB.js +110 -0
- package/dist/{tree-CqcQ99NM.js → tree-CjVZLRw7.js} +1 -1
- package/dist/vue/async.d.cts +123 -14
- package/dist/vue/async.d.ts +123 -14
- package/dist/vue/index.d.cts +158 -22
- package/dist/vue/index.d.ts +158 -22
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +80 -78
- package/dist/{workbook-session-DNa2RHNG.cjs → workbook-session-Bjv1YCRK.cjs} +18 -18
- package/dist/{workbook-session-BfK1yHOO.js → workbook-session-BvToI-Fd.js} +5440 -5288
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +20 -1
- package/dist/worker.d.ts +20 -1
- package/dist/worker.js +33 -32
- package/dist/xlsx-node.cjs +34 -34
- package/dist/xlsx-node.js +878 -870
- package/dist/xlsx.cjs +3 -4
- package/dist/xlsx.d.cts +22 -10
- package/dist/xlsx.d.ts +22 -10
- package/dist/xlsx.js +261 -253
- package/package.json +2 -2
- package/dist/ParamEditor-CflQV3eQ.js +0 -526
- package/dist/ParamEditor-vIDzvpPV.cjs +0 -1
- package/dist/ReportPreview-CvbqLUzM.cjs +0 -6
- package/dist/ReportPreview-D_ywJ_-H.js +0 -4533
- package/dist/assets-C2U-e-Sz.cjs +0 -4
- package/dist/assets-Q0wUwNrV.js +0 -217
- package/dist/batch-DzaTNLWI.js +0 -371
- package/dist/batch-xMkqYiTr.cjs +0 -1
- package/dist/capabilities-CK_7hizc.js +0 -63
- package/dist/capabilities-CsZ-pNHR.cjs +0 -1
- package/dist/config-0UIohTS7.cjs +0 -1
- package/dist/config-Dt9NtCPl.js +0 -566
- package/dist/data-explanation-BktvER5B.cjs +0 -1
- package/dist/data-explanation-C_J6jYNi.js +0 -16
- package/dist/designer-Ci1LizA9.js +0 -5020
- package/dist/designer-rtmVIIdN.cjs +0 -2
- package/dist/json-snapshot-BeFT3Tso.js +0 -1952
- package/dist/json-snapshot-D1NTP2oI.cjs +0 -2
- package/dist/matrix-DVyWiYsd.cjs +0 -1
- package/dist/matrix-yZsGnldA.js +0 -227
- package/dist/page-window-index-CIuT4BAv.js +0 -43
- package/dist/page-window-index-DEjnM6IB.cjs +0 -1
- package/dist/param-validation-BlHHXs6u.js +0 -153
- package/dist/param-validation-DCK039V1.cjs +0 -1
- package/dist/progress-7OSZbFok.js +0 -39
- package/dist/progress-BnLiS5eH.cjs +0 -1
- package/dist/task-events-DQ276fn2.cjs +0 -1
- package/dist/task-events-Dpsvf_t2.js +0 -47
- package/dist/template-bindings-BJR4k7qZ.cjs +0 -1
- package/dist/template-bindings-Daui7hLF.js +0 -252
- package/dist/template-registry-D3SjENi6.cjs +0 -1
- package/dist/validate-BJ5HIWY8.cjs +0 -1
- package/dist/validate-CkQBWCeg.js +0 -163
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const Q=require("./matrix-gEO7ZM_u.cjs"),L=require("./computed-CGV2a809.cjs"),Z=require("./render-plan-7xpGrCEl.cjs"),ee=require("./code-options-BUTChiZZ.cjs"),C=require("./param-validation-C3HlcLLO.cjs"),_=require("./tree-BX380Rr7.cjs");function te(e,i,t){e!==void 0&&(typeof e!="string"||!e.trim()||e.length>4096)&&t.push({path:i,message:"来源范围应为不超过 4096 字符的非空字符串"})}function D(e,i,t){e.editable!==void 0&&typeof e.editable!="boolean"&&t.push({path:`${i}.editable`,message:"编辑控制应为布尔值"}),e.valueType!==void 0&&!["text","number","boolean"].includes(e.valueType)&&t.push({path:`${i}.valueType`,message:"编辑类型应为 text、number 或 boolean"})}function ie(e,i,t){D(e,i,t),e.indentMm!==void 0&&(typeof e.indentMm!="number"||!Number.isFinite(e.indentMm)||e.indentMm<0)&&t.push({path:`${i}.indentMm`,message:"单元格缩进应为有限非负数"}),e.derived!==void 0&&typeof e.derived!="boolean"&&t.push({path:`${i}.derived`,message:"派生结果标记应为布尔值"}),V(e.source,`${i}.source`,t,!0),e.formula!==void 0&&typeof e.formula!="string"&&t.push({path:`${i}.formula`,message:"单元格公式应为字符串"})}function V(e,i,t,s=!1){if(e===void 0)return;if(!e||typeof e!="object"||Array.isArray(e)){t.push({path:i,message:"业务来源应为对象"});return}const n=e;te(n.sourceScope,`${i}.sourceScope`,t);for(const a of["datasetId",...s?["field"]:[]])(typeof n[a]!="string"||!n[a].trim())&&t.push({path:`${i}.${a}`,message:"业务标识应为非空字符串"});for(const a of["rowKey","revision"]){const o=n[a];o===void 0&&!(s&&a==="rowKey")||typeof o!="string"&&!(typeof o=="number"&&Number.isFinite(o))&&t.push({path:`${i}.${a}`,message:"业务键及修订号应为字符串或有限数字"})}n.sourceToken!==void 0&&typeof n.sourceToken!="string"&&t.push({path:`${i}.sourceToken`,message:"来源令牌应为字符串"})}const se=new Set(["text","image","barcode","qrcode","chart","line","rect","ellipse"]);function p(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ne(e,i,t,s){const n=e[i];(typeof n!="number"||!Number.isFinite(n))&&s.push({path:`${t}.${i}`,message:`应为有限数字,实际 ${JSON.stringify(n)}`})}function ae(e,i,t){if(e!==void 0){const s=`${i}.table`;if(!p(e))t.push({path:s,message:"逻辑表来源应为对象"});else{V(e.source,`${s}.source`,t),(typeof e.id!="string"||!e.id.trim())&&t.push({path:`${s}.id`,message:"逻辑表 ID 应为非空字符串"});const n=e.role;["header","body","group-header","subtotal","grand-total"].includes(n)||t.push({path:`${s}.role`,message:"未知逻辑表行角色"});const a=e.rowIndex;(typeof a!="number"||!Number.isInteger(a)||(n==="header"?a!==-1:a<0))&&t.push({path:`${s}.rowIndex`,message:"表头索引应为 -1,内容行索引应为非负整数"}),(!Array.isArray(e.columnKeys)||e.columnKeys.some(o=>typeof o!="string"))&&t.push({path:`${s}.columnKeys`,message:"逻辑列字段应为字符串数组"}),e.layout!==void 0&&e.layout!=="page"&&e.layout!=="wide"&&t.push({path:`${s}.layout`,message:"布局应为 page 或 wide"}),e.title!==void 0&&typeof e.title!="string"&&t.push({path:`${s}.title`,message:"逻辑表名称应为字符串"})}}}function oe(e,i,t,s){if(e!==void 0)if(!p(e)||!Array.isArray(e.cells))t.push({path:`${i}.grid.cells`,message:"grid.cells 应为二维数组"});else{const n=e.paddingMm;n!==void 0&&(typeof n!="number"||!Number.isFinite(n)||n<0)&&t.push({path:`${i}.grid.paddingMm`,message:"单元格内距应为有限非负数"}),e.cells.forEach((a,o)=>{if(!Array.isArray(a)){t.push({path:`${i}.grid.cells.${o}`,message:"行应为数组"});return}a.forEach((f,r)=>{if(f==null)return;const d=`${i}.grid.cells.${o}.${r}`;if(!p(f)){t.push({path:d,message:"网格单元格应为对象或 null"});return}ie(f,d,t),Array.isArray(f.children)&&f.children.forEach((u,g)=>{v(u,`${i}.grid.cells.${o}.${r}.children.${g}`,t,s)})})})}}function fe(e,i,t){e!==void 0&&(Array.isArray(e)?e.forEach((s,n)=>{(!p(s)||!Array.isArray(s.segments))&&t.push({path:`${i}.richParagraphs.${n}`,message:"段落缺少 segments 数组"})}):t.push({path:`${i}.richParagraphs`,message:"richParagraphs 应为数组"}))}function v(e,i,t,s=[]){if(!p(e)){t.push({path:i,message:"组件应为对象"});return}const n=e.kind;typeof n!="string"?t.push({path:`${i}.kind`,message:"组件缺少 kind 字符串"}):se.has(n)||s.push({path:`${i}.kind`,message:`未知组件类型 ${JSON.stringify(n)},将以兜底方式渲染`});for(const a of["leftMm","topMm","widthMm","heightMm"])ne(e,a,i,t);typeof e.leftMm=="number"&&e.leftMm<-100&&t.push({path:`${i}.leftMm`,message:"几何数值异常(leftMm<-100)"});for(const a of["widthMm","heightMm"])typeof e[a]=="number"&&e[a]<0&&t.push({path:`${i}.${a}`,message:"组件尺寸不能为负数"});ae(e.table,i,t),re(e.code,n,i,t),e.pageAnchor!==void 0&&!["header","footer"].includes(e.pageAnchor)&&t.push({path:`${i}.pageAnchor`,message:"页面锚点应为 header 或 footer"}),e.lineDirection!==void 0&&!["down","up"].includes(e.lineDirection)&&t.push({path:`${i}.lineDirection`,message:"线段方向应为 down 或 up"}),oe(e.grid,i,t,s),fe(e.richParagraphs,i,t)}function re(e,i,t,s){if(e!==void 0)for(const n of ee.codeOptionIssues(e,i))s.push({path:`${t}.code${n.path?`.${n.path}`:""}`,message:n.message})}function J(e,i,t){if(!p(e))return;e.binding!==void 0&&t.push({path:`${i}.binding`,message:"渲染计划不允许未解析字段绑定"});const s=e.grid;!p(s)||!Array.isArray(s.cells)||s.cells.forEach((n,a)=>{Array.isArray(n)&&n.forEach((o,f)=>{!p(o)||!Array.isArray(o.children)||o.children.forEach((r,d)=>J(r,`${i}.grid.cells.${a}.${f}.children.${d}`,t))})})}function j(e,i,t,s=[]){if(!p(e)){t.push({path:i,message:"页应为对象"});return}const n=e.pageWidthMm,a=e.pageHeightMm;(typeof n!="number"||!Number.isFinite(n)||n<=0)&&t.push({path:`${i}.pageWidthMm`,message:`页宽非法: ${JSON.stringify(n)}`}),(typeof a!="number"||!(a>0&&a<5e3))&&t.push({path:`${i}.pageHeightMm`,message:`页高非法: ${JSON.stringify(a)}`}),e.layout!==void 0&&e.layout!=="page"&&e.layout!=="wide"&&t.push({path:`${i}.layout`,message:"布局应为 page 或 wide"});const o=e.components;Array.isArray(o)?Array.isArray(o)&&o.forEach((f,r)=>{v(f,`${i}.components.${r}`,t,s),J(f,`${i}.components.${r}`,t)}):t.push({path:`${i}.components`,message:"components 应为数组"})}function K(e){const i=[],t=[],s=p(e)?e.pages:void 0;if(p(e)&&e.requiresRecalculation!==void 0&&typeof e.requiresRecalculation!="boolean"&&i.push({path:"$.requiresRecalculation",message:"重算能力要求应为布尔值"}),!Array.isArray(s))i.push({path:"$.pages",message:e==null?"渲染计划为空":"渲染计划缺少 pages 数组"});else{s.forEach((a,o)=>j(a,`$.pages.${o}`,i,t)),s.length>2e3&&t.push({path:"$.pages",message:`页数异常大(${s.length} 页),渲染与打印耗时可能显著增加`});const n=s.reduce((a,o)=>a+(p(o)&&Array.isArray(o.components)?o.components.length:0),0);n>5e4&&t.push({path:"$.pages",message:`组件总数异常大(${n} 个),可能触发浏览器性能限制`})}return{ok:i.length===0,errors:i,warnings:t}}function de(e){const i=K(e);if(!i.ok){const t=i.errors.slice(0,3).map(s=>`${s.path}: ${s.message}`).join("; ");throw new Error(`渲染计划校验失败(${i.errors.length} 处): ${t}`)}return e.pages}function T(e){return e.kind==="list"?e.id:e.nid}function ue(e){return e.kind==="list"?!1:e.pageAnchor!==void 0||e.kind==="text"&&typeof e.text=="string"&&/\{(?:page|totalPages)\}/.test(e.text)}function he(e,i){const t=e.filter(n=>i.componentIds.includes(T(n)??""));if(t.filter(n=>n.kind==="list"&&n.cardinality!=="record").length&&t.length!==1)throw new Error("纵向重复区域必须独占流式分段,不能与静态或单记录区域并排");for(const n of t){const a=n.kind==="list"?n.topMm+(n.rowHeightMm??0):n.topMm+n.heightMm;if(n.topMm<i.topMm-.001||a>i.topMm+i.heightMm+.001)throw new Error("流式分段应完整包含其组件的原始纵向范围")}}function me(e,i){if(!i)return e.map(s=>({components:[s]}));const t=new Map(e.map(s=>[T(s),s]));return i.bands.map(s=>({band:s,components:s.componentIds.map(n=>{const a=t.get(n);if(!a)throw new Error(`流式区域引用不存在的组件:${n}`);return a})}))}function H(e,i){if(!i||!Array.isArray(i.bands)||!i.bands.length||i.bands.length>1e4)throw new Error("流式排版应包含 1–10000 个区域");const t=new Set,s=new Set;for(const n of e){if(ue(n))continue;const a=T(n);if(!a||t.has(a))throw new Error("流式排版组件应具有唯一标识");t.add(a)}if(ce(e,i,t,s),s.size!==t.size)throw new Error("流式排版必须显式包含每个非锚点组件")}function ce(e,i,t,s){let n=-1/0;for(const a of i.bands){if(!Number.isFinite(a.topMm)||!Number.isFinite(a.heightMm)||a.topMm<0||a.heightMm<=0||a.topMm<n-.001)throw new Error("流式区域应按原始位置排序,尺寸有效且不重叠");if(!Array.isArray(a.componentIds)||!a.componentIds.length)throw new Error("流式区域不能没有组件");for(const o of a.componentIds){if(!t.has(o)||s.has(o))throw new Error(`流式区域组件缺失、重复或包含页锚点:${o}`);s.add(o)}he(e,a),n=a.topMm+a.heightMm}}const ge=new Set(["__proto__","prototype","constructor"]);function l(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function N(e){return typeof e=="string"&&!!e.trim()&&!ge.has(e)}function k(e,i,t,s){for(const n of Object.keys(e))i.includes(n)||s.push({path:`${t}.${n}`,message:"存在未知配置字段"})}function pe(e,i,t){if(e!==void 0){if(!l(e)||!["number","percent","date"].includes(String(e.kind))){t.push({path:i,message:"绑定格式应为 number、percent 或 date"});return}k(e,e.kind==="date"?["kind","pattern"]:e.kind==="number"?["kind","digits","thousands"]:["kind","digits"],i,t),e.digits!==void 0&&(!Number.isInteger(e.digits)||Number(e.digits)<0||Number(e.digits)>100)&&t.push({path:`${i}.digits`,message:"精度应为 0..100 整数"}),e.thousands!==void 0&&typeof e.thousands!="boolean"&&t.push({path:`${i}.thousands`,message:"千分位开关应为布尔值"}),e.pattern!==void 0&&typeof e.pattern!="string"&&t.push({path:`${i}.pattern`,message:"日期格式应为字符串"})}}function ye(e,i,t){const s=e.binding;if(s===void 0)return;const n=`${i}.binding`;if(!l(s)){t.push({path:n,message:"字段绑定应为对象"});return}(!["text","image","barcode","qrcode"].includes(String(e.kind))||e.grid!==void 0)&&t.push({path:n,message:"绑定仅支持独立文本、图片、条码与二维码组件"}),k(s,["field","format","prefix","suffix","emptyText"],n,t),N(s.field)||t.push({path:`${n}.field`,message:"绑定字段应为安全的非空字段名(按字面读取自有字段)"});for(const a of["prefix","suffix","emptyText"])s[a]!==void 0&&typeof s[a]!="string"&&t.push({path:`${n}.${a}`,message:"应为字符串"});pe(s.format,`${n}.format`,t),e.kind==="image"&&["format","prefix","suffix"].some(a=>s[a]!==void 0)&&t.push({path:n,message:"图片绑定直接读取 PNG/JPEG data URL,不支持文本格式或前后缀"})}function le(e,i){if(!l(e)){i.push({path:"$.repeat",message:"逐记录配置应为对象"});return}k(e,["dataset","rowKey","copies"],"$.repeat",i),N(e.dataset)||i.push({path:"$.repeat.dataset",message:"数据集应为安全的非空名称"}),e.rowKey!==void 0&&!N(e.rowKey)&&i.push({path:"$.repeat.rowKey",message:"业务主键应为安全的非空字段名"});const t=e.copies;t!==void 0&&(l(t)?(k(t,["field"],"$.repeat.copies",i),N(t.field)||i.push({path:"$.repeat.copies.field",message:"复制数字段应为安全的非空字段名"})):(!Number.isSafeInteger(t)||Number(t)<1||Number(t)>1e3)&&i.push({path:"$.repeat.copies",message:"每条记录复制数应为 1..1000 整数"}))}function W(e,i,t,s){if(!l(e))return;ye(e,i,s),e.binding!==void 0&&!t&&s.push({path:`${i}.binding`,message:"字段绑定需要模板 repeat 数据集;普通报表请使用列表字段"}),t&&e.kind==="list"&&s.push({path:i,message:"逐记录标签使用固定组件;动态列表请使用普通报表模板"});const n=e.grid;l(n)&&Array.isArray(n.cells)&&n.cells.forEach((a,o)=>{Array.isArray(a)&&a.forEach((f,r)=>{l(f)&&Array.isArray(f.children)&&f.children.forEach((d,u)=>W(d,`${i}.grid.cells.${o}.${r}.children.${u}`,t,s))})})}function G(e,i){const t=e.repeat!==void 0;t&&le(e.repeat,i),Array.isArray(e.pages)&&e.pages.forEach((s,n)=>{if(!l(s))return;const a=`$.pages.${n}`;t&&(s.layout==="wide"||s.flow!==void 0)&&i.push({path:a,message:"逐记录标签仅支持固定尺寸页面,不支持宽表或流式分区"}),Array.isArray(s.components)&&s.components.forEach((o,f)=>{const r=`${a}.components.${f}`;if(W(o,r,t,i),!t||!l(o))return;const{leftMm:d,topMm:u,widthMm:g,heightMm:y}=o;[d,u,g,y,s.widthMm,s.heightMm].every(A=>typeof A=="number"&&Number.isFinite(A))&&(Number(d)<0||Number(u)<0||Number(d)+Number(g)>Number(s.widthMm)+.001||Number(u)+Number(y)>Number(s.heightMm)+.001)&&i.push({path:r,message:"标签组件超出纸张边界,请调整位置或尺寸"})})})}function U(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function R(e,i,t){if(e!==void 0){if(!U(e)){t.push({path:i,message:"条件应为对象"});return}(typeof e.field!="string"||!e.field.trim())&&t.push({path:`${i}.field`,message:"条件需要字段"}),e.numeric!==void 0&&e.numeric!=="number"&&e.numeric!=="decimal"&&t.push({path:`${i}.numeric`,message:"未知条件数值模式"}),[">",">=","<","<=","==","!="].includes(e.op)||t.push({path:`${i}.op`,message:"未知条件运算符"}),typeof e.value!="string"&&!(typeof e.value=="number"&&Number.isFinite(e.value))&&t.push({path:`${i}.value`,message:"条件值应为字符串或有限数字"})}}function q(e,i,t){if(e===void 0)return;if(!Array.isArray(e)||e.length>2048){t.push({path:i,message:"聚合应为数组且最多 2048 项"});return}const s=new Set;e.forEach((n,a)=>{const o=`${i}.${a}`;if(!U(n)){t.push({path:o,message:"聚合应为对象"});return}const f=n.field;typeof f!="string"||!f.trim()||s.has(f)?t.push({path:`${o}.field`,message:"聚合输出字段应非空且唯一"}):s.add(f),n.numeric!==void 0&&n.numeric!=="number"&&n.numeric!=="decimal"&&t.push({path:`${o}.numeric`,message:"数值模式应为 number 或 decimal"}),n.digits!==void 0&&(!Number.isInteger(n.digits)||Number(n.digits)<0||Number(n.digits)>100)&&t.push({path:`${o}.digits`,message:"小数位应为 0–100 的整数"});try{L.createAggregateAccumulator({...n,field:n.valueField??f})}catch(r){t.push({path:o,message:r instanceof Error?r.message:String(r)})}})}function $e(e,i,t){if(e===void 0)return;const s=L.validateComputedFields(e);for(const n of s.errors)t.push({path:i,message:n})}function be(e,i,t){if(e!==void 0)try{Q.validateMatrixOptions(e)}catch(s){t.push({path:i,message:s instanceof Error?s.message:String(s)})}}function Ae(e,i,t){if(e.tree===void 0)return;const s=`${i}.tree`;try{_.validateTreeOptions(e.tree);const n=e.tree;if(e.matrix||e.detail||e.groupBy||Array.isArray(e.groups)&&e.groups.length||e.rowVisibleWhen)throw new Error("树形布局不能同时配置普通分组、矩阵、主从或行可见条件");if(e.rowKey!==void 0&&e.rowKey!==n.idField)throw new Error("树形 rowKey 应与 idField 一致");if(!Array.isArray(e.columns)||!e.columns.some(a=>a&&a.field===n.labelField&&!a.hidden))throw new Error("树形布局需要可见的标签列");Array.isArray(e.computed)&&_.validateTreeComputed(n,e.computed)}catch(n){t.push({path:s,message:n instanceof Error?n.message:String(n)})}}const O="1.0";class w extends Error{constructor(i){super(`模板校验失败:${i.slice(0,3).map(t=>`${t.path}: ${t.message}`).join("; ")}`),this.errors=i,this.name="ReportTemplateError"}}const we=new Set(["__proto__","prototype","constructor"]),Me=new Set(["schemaVersion","id","name","revision","description","template"]),ve=new Set(["left","center","right","justify"]),E=2e5,Ne=64,P=1e7;function h(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Ee(e,i,t){const s=Object.getPrototypeOf(e),n=Array.isArray(e);if(n?s!==Array.prototype:s!==Object.prototype&&s!==null)return t.push({path:i,message:"模板对象必须使用普通 JSON 对象原型"}),!1;if(n){const a=Object.keys(e);if(a.length!==e.length||a.some(o=>!/^(0|[1-9]\d*)$/.test(o)||Number(o)>=e.length))return t.push({path:i,message:"模板数组不能包含空位或额外属性"}),!1}return Object.getOwnPropertySymbols(e).length>0?(t.push({path:i,message:"模板不能包含 Symbol 键"}),!1):!0}function ke(e,i,t,s){return we.has(e)?(s.push({path:t,message:"模板不能包含可能污染原型的键"}),!1):i.get||i.set||!i.enumerable?(s.push({path:t,message:"模板不能包含访问器或不可枚举字段"}),!1):!0}function Se(e){return e===null||typeof e=="boolean"||typeof e=="number"&&Number.isFinite(e)}function F(e,i){const t=new Set;let s=0,n=0,a=!1;const o=(f,r,d)=>{if(!a){if(++s>E){s===E+1&&i.push({path:r,message:"模板超过 JSON 节点安全上限"});return}if(d>Ne){i.push({path:r,message:"模板嵌套层级过深"});return}if(typeof f=="string"){n+=f.length,n>P&&(a=!0,i.push({path:r,message:"模板文本超过 1000 万字符的安全上限"}));return}if(!Se(f)){if(!f||typeof f!="object"){i.push({path:r,message:"模板只允许 JSON 值,不允许函数、undefined 或非有限数字"});return}if(t.has(f)){i.push({path:r,message:"模板不能包含循环引用"});return}if(Ee(f,r,i)){t.add(f);for(const[u,g]of Object.entries(Object.getOwnPropertyDescriptors(f))){if(Array.isArray(f)&&u==="length")continue;const y=`${r}.${u}`;if(ke(u,g,y,i)&&o(g.value,y,d+1),s>E||a)break}t.delete(f)}}}};o(e,"$",0)}function m(e,i,t,s,n=!1){const a=e[i];a===void 0&&!n||(typeof a!="string"||n&&!a.trim())&&s.push({path:`${t}.${i}`,message:n?"应为非空字符串":"应为字符串"})}function c(e,i,t,s,n=0,a=!1){const o=e[i];o===void 0&&!a||(typeof o!="number"||!Number.isFinite(o)||o<n)&&s.push({path:`${t}.${i}`,message:`应为大于等于 ${n} 的有限数字`})}function b(e,i,t,s){e[i]!==void 0&&typeof e[i]!="boolean"&&s.push({path:`${t}.${i}`,message:"应为布尔值"})}function M(e,i,t,s=!1){e!==void 0&&!ve.has(e)&&!(s&&e==="auto")&&t.push({path:i,message:`未知对齐方式${s?"(支持 auto)":""}`})}function $(e,i,t){if(e!==void 0){if(!h(e)){t.push({path:i,message:"样式应为对象"});return}M(e.align,`${i}.align`,t),e.verticalAlign!==void 0&&!["top","middle","bottom"].includes(e.verticalAlign)&&t.push({path:`${i}.verticalAlign`,message:"未知垂直对齐方式"});for(const s of["fontSize","fontSizePx","lineWidthPt","lineHeight"])c(e,s,i,t);for(const s of["letterSpacing","rotateDeg"])c(e,s,i,t,-1/0);c(e,"opacity",i,t),typeof e.opacity=="number"&&e.opacity>1&&t.push({path:`${i}.opacity`,message:"透明度不能大于 1"});for(const s of["bold","italic","underline","borderTop","borderRight","borderBottom","borderLeft"])b(e,s,i,t);for(const s of["fontFamily","color","backgroundColor","lineColor","borderColor"])m(e,s,i,t)}}function xe(e,i,t){if(e===void 0)return;if(!Array.isArray(e)){t.push({path:i,message:"参数定义应为数组"});return}const s=new Set,n=t.length;e.forEach((a,o)=>{const f=`${i}.${o}`;if(!h(a)){t.push({path:f,message:"参数定义应为对象"});return}m(a,"field",f,t,!0),typeof a.field=="string"&&(s.has(a.field)&&t.push({path:`${f}.field`,message:"参数名重复"}),s.add(a.field)),a.type!==void 0&&!["text","number","date","month","year","dateRange","select"].includes(a.type)&&t.push({path:`${f}.type`,message:"未知参数类型"});for(const r of["label","defaultValue","placeholder"])m(a,r,f,t);b(a,"required",f,t);for(const r of["minLength","maxLength"]){const d=a[r];d!==void 0&&(typeof d!="number"||!Number.isSafeInteger(d)||d<0)&&t.push({path:`${f}.${r}`,message:"长度边界应为非负整数"})}Re(a,f,t),a.options!==void 0&&(Array.isArray(a.options)?a.options.forEach((r,d)=>{const u=`${f}.options.${d}`;if(!h(r))t.push({path:u,message:"选项应为对象"});else for(const g of["label","value"])typeof r[g]!="string"&&t.push({path:`${u}.${g}`,message:"选项标签与值应为字符串(允许空白选项)"})}):t.push({path:`${f}.options`,message:"选项应为数组"}))}),t.length===n&&t.push(...C.validateReportParamDefinitions(e).map(a=>({path:a.path.replace("$.paramDefs",i),message:a.message})))}function Re(e,i,t){for(const a of["min","max"]){const o=e[a];if(o===void 0)continue;C.isReportTemporalBound(e.type,o)||e.type==="number"&&typeof o=="number"&&Number.isFinite(o)||t.push({path:`${i}.${a}`,message:"数字使用有限数字边界,日期/月/年使用对应规范字符串边界"})}const s=typeof e.min=="number"&&typeof e.max=="number"&&e.min>e.max,n=typeof e.min=="string"&&typeof e.max=="string"&&e.min>e.max;(s||n)&&t.push({path:i,message:"最小边界不能大于最大边界"}),typeof e.minLength=="number"&&typeof e.maxLength=="number"&&e.minLength>e.maxLength&&t.push({path:i,message:"最小长度不能大于最大长度"})}function B(e,i,t){if(!Array.isArray(e)||e.length===0){t.push({path:i,message:"列表至少需要一列"});return}e.every(s=>h(s)&&s.hidden===!0)&&t.push({path:i,message:"列表至少需要一列可见列"}),e.forEach((s,n)=>{const a=`${i}.${n}`;if(!h(s)){t.push({path:a,message:"列应为对象"});return}if(D(s,a,t),b(s,"hidden",a,t),R(s.visibleWhen,`${a}.visibleWhen`,t),typeof s.header!="string"&&t.push({path:`${a}.header`,message:"表头应为字符串(允许空白表头)"}),m(s,"field",a,t,!0),c(s,"widthMm",a,t,Number.MIN_VALUE,!0),$(s.style,`${a}.style`,t),$(s.headerStyle,`${a}.headerStyle`,t),M(s.align,`${a}.align`,t,!0),M(s.headerAlign,`${a}.headerAlign`,t),s.semanticRole!==void 0&&!["identifier","dimension","measure","date","text"].includes(s.semanticRole)&&t.push({path:`${a}.semanticRole`,message:"未知列语义"}),s.format!==void 0)if(!h(s.format)||!["number","percent","date"].includes(s.format.kind))t.push({path:`${a}.format`,message:"未知列格式"});else{const o=s.format.digits;o!==void 0&&(typeof o!="number"||!Number.isInteger(o)||o<0||o>100)&&t.push({path:`${a}.format.digits`,message:"小数位应为 0–100 的整数"}),b(s.format,"thousands",`${a}.format`,t),m(s.format,"pattern",`${a}.format`,t)}s.rules!==void 0&&(Array.isArray(s.rules)?s.rules.forEach((o,f)=>{const r=`${a}.rules.${f}`;if(!h(o)||!h(o.when)){t.push({path:r,message:"条件格式缺少 when 对象"});return}R(o.when,`${r}.when`,t),m(o.when,"field",`${r}.when`,t,!0),[">",">=","<","<=","==","!="].includes(o.when.op)||t.push({path:`${r}.when.op`,message:"未知条件运算符"}),typeof o.when.value!="number"&&typeof o.when.value!="string"&&t.push({path:`${r}.when.value`,message:"条件值应为数字或字符串"}),$(o.style,`${r}.style`,t)}):t.push({path:`${a}.rules`,message:"条件格式应为数组"}))})}function z(e,i,t){if(e!==void 0){if(!h(e)){t.push({path:i,message:"分组应为对象"});return}m(e,"field",i,t,!0);for(const s of["headerTemplate","subtotalLabel"])m(e,s,i,t);for(const s of["headerStyle","subtotalStyle"])$(e[s],`${i}.${s}`,t);b(e,"keepWithNext",i,t),b(e,"repeatHeader",i,t),q(e.aggregates,`${i}.aggregates`,t),e.subtotal!==void 0&&(!Array.isArray(e.subtotal)||e.subtotal.some(s=>typeof s!="string"))&&t.push({path:`${i}.subtotal`,message:"小计字段应为字符串数组"})}}function Te(e,i,t){if(!(e===void 0||typeof e=="boolean")){if(!h(e)){t.push({path:i,message:"合计应为布尔值或对象"});return}m(e,"label",i,t),q(e.aggregates,`${i}.aggregates`,t),$(e.style,`${i}.style`,t),e.fields!==void 0&&(!Array.isArray(e.fields)||e.fields.some(s=>typeof s!="string"))&&t.push({path:`${i}.fields`,message:"合计字段应为字符串数组"})}}function Oe(e,i,t,s){const n={kind:"rect",leftMm:0,topMm:0,widthMm:1,heightMm:1,grid:e};if(v(n,t,s,[]),I(n,t,s),!h(e)||!Array.isArray(e.cells))return;const a=e.cells,o=Array.isArray(i)?i.length:0;if(a.length*o>E){s.push({path:t,message:"表头逻辑网格超过 20 万格安全上限"});return}e.cells.length||s.push({path:`${t}.cells`,message:"表头至少需要一行"}),Array.isArray(e.colWidthsMm)&&e.colWidthsMm.length!==o&&s.push({path:`${t}.colWidthsMm`,message:"表头列宽数量应与列表列数一致"}),Array.isArray(e.rowHeightsMm)&&e.rowHeightsMm.length!==e.cells.length&&s.push({path:`${t}.rowHeightsMm`,message:"表头行高数量应与行数一致"}),Pe(a,o,t,s)}function Pe(e,i,t,s){const n=new Set;e.forEach((a,o)=>{if(!Array.isArray(a))return;let f=0;a.forEach((r,d)=>{for(;n.has(`${o}:${f}`);)f++;const u=h(r)&&typeof r.colSpan=="number"?r.colSpan:1,g=h(r)&&typeof r.rowSpan=="number"?r.rowSpan:1;(f+u>i||o+g>e.length)&&s.push({path:`${t}.cells.${o}.${d}`,message:"表头合并区域超出表头边界"});for(let y=o;y<Math.min(e.length,o+g);y++)for(let A=f;A<Math.min(i,f+u);A++)n.has(`${y}:${A}`)&&s.push({path:`${t}.cells.${o}.${d}`,message:"表头合并区域重叠"}),n.add(`${y}:${A}`);f+=u})})}function Fe(e,i,t){if(Ae(e,i,t),$e(e.computed,`${i}.computed`,t),be(e.matrix,`${i}.matrix`,t),e.matrix&&(e.detail||e.groupBy||Array.isArray(e.groups)&&e.groups.length||e.grandTotal)&&t.push({path:`${i}.matrix`,message:"矩阵请使用自身 totals 汇总,不能同时配置普通分组、总计或主从明细"}),R(e.rowVisibleWhen,`${i}.rowVisibleWhen`,t),e.groups!==void 0&&(!Array.isArray(e.groups)||e.groups.length>16?t.push({path:`${i}.groups`,message:"分组应为数组,最多 16 级"}):e.groups.forEach((a,o)=>z(a,`${i}.groups.${o}`,t))),e.detail===void 0)return;const s=e.detail,n=`${i}.detail`;if(!h(s)){t.push({path:n,message:"主从关联应为对象"});return}for(const a of["dataset","parentKey","foreignKey"])m(s,a,n,t,!0);for(const a of["rowKey","revisionField","sourceTokenField"])m(s,a,n,t,s[a]!==void 0);m(s,"label",n,t),b(s,"header",n,t),c(s,"rowHeightMm",n,t,Number.MIN_VALUE),B(s.columns,`${n}.columns`,t),s.unmatched!==void 0&&s.unmatched!=="error"&&s.unmatched!=="ignore"&&t.push({path:`${n}.unmatched`,message:"未关联明细策略应为 error 或 ignore"})}function Ie(e,i,t){for(const s of["leftMm","topMm"])c(e,s,i,t,-1/0,!0);c(e,"widthMm",i,t,Number.MIN_VALUE,!0),m(e,"dataset",i,t,!0),m(e,"title",i,t);for(const s of["rowKey","revisionField","sourceTokenField"])m(e,s,i,t,e[s]!==void 0);e.headerGrid!==void 0&&Oe(e.headerGrid,e.columns,`${i}.headerGrid`,t),e.layout!==void 0&&e.layout!=="page"&&e.layout!=="wide"&&t.push({path:`${i}.layout`,message:"布局应为 page 或 wide"}),B(e.columns,`${i}.columns`,t);for(const s of["fontSizePt","rowHeightMm"])c(e,s,i,t,Number.MIN_VALUE);c(e,"paddingMm",i,t);for(const s of["header","headerBold","headerEveryPage","border"])b(e,s,i,t);e.cardinality!==void 0&&e.cardinality!=="record"&&t.push({path:`${i}.cardinality`,message:"单记录区域类型应为 record"}),m(e,"headerBackgroundColor",i,t),M(e.align,`${i}.align`,t,!0),M(e.headerAlign,`${i}.headerAlign`,t),$(e.headerStyle,`${i}.headerStyle`,t),Fe(e,i,t),z(e.groupBy,`${i}.groupBy`,t),Te(e.grandTotal,`${i}.grandTotal`,t)}function I(e,i,t){$(e.style,`${i}.style`,t);for(const n of["text","rawText","imageData","fallbackText","nid","rkey"])m(e,n,i,t);if(e.lines!==void 0&&(!Array.isArray(e.lines)||e.lines.some(n=>typeof n!="string"))&&t.push({path:`${i}.lines`,message:"文本行应为字符串数组"}),Array.isArray(e.richParagraphs)&&e.richParagraphs.forEach((n,a)=>{if(!h(n))return;const o=`${i}.richParagraphs.${a}`;M(n.align,`${o}.align`,t);for(const f of["lineHeight","spaceBeforeMm","spaceAfterMm","indentMm"])c(n,f,o,t);Array.isArray(n.segments)&&n.segments.forEach((f,r)=>{const d=`${o}.segments.${r}`;if(!h(f)){t.push({path:d,message:"富文本片段应为对象"});return}f.kind!==void 0&&f.kind!=="text"&&f.kind!=="field"&&t.push({path:`${d}.kind`,message:"未知富文本片段类型"});for(const u of["text","field"])m(f,u,d,t);$(f.style,`${d}.style`,t)})}),!h(e.grid))return;const s=e.grid;c(s,"gapMm",`${i}.grid`,t),c(s,"paddingMm",`${i}.grid`,t);for(const n of["colWidthsMm","rowHeightsMm"]){const a=s[n];a!==void 0&&(!Array.isArray(a)||a.some(o=>typeof o!="number"||!Number.isFinite(o)||o<0))&&t.push({path:`${i}.grid.${n}`,message:"网格尺寸应为有限非负数字数组"})}Array.isArray(s.cells)&&s.cells.forEach((n,a)=>{Array.isArray(n)&&n.forEach((o,f)=>{const r=`${i}.grid.cells.${a}.${f}`;if(o!==null){if(!h(o)){t.push({path:r,message:"网格单元格应为对象或 null"});return}for(const d of["text","rawText","numberFormat"])m(o,d,r,t);for(const d of["colSpan","rowSpan"]){const u=o[d];u!==void 0&&(typeof u!="number"||!Number.isInteger(u)||u<=0)&&t.push({path:`${r}.${d}`,message:"跨度应为正整数"})}o.value!==void 0&&o.value!==null&&!["string","number","boolean"].includes(typeof o.value)&&t.push({path:`${r}.value`,message:"Excel 原始值应为字符串、数字、布尔值或 null"}),$(o.style,`${r}.style`,t),o.children!==void 0&&(Array.isArray(o.children)?o.children.forEach((d,u)=>{h(d)&&I(d,`${r}.children.${u}`,t)}):t.push({path:`${r}.children`,message:"嵌套组件应为数组"}))}})})}function _e(e,i,t){if(!(e.flow===void 0||!Array.isArray(e.components)))try{H(e.components,e.flow)}catch(s){t.push({path:`${i}.flow`,message:s instanceof Error?s.message:String(s)})}}function X(e){const i=[],t=[];return F(e,i),i.length?{ok:!1,errors:i,warnings:t}:(h(e)?(e.schemaVersion!==void 0&&e.schemaVersion!==Z.RENDER_PLAN_SCHEMA_VERSION&&i.push({path:"$.schemaVersion",message:"不支持的模板 schemaVersion"}),xe(e.params,"$.params",i),G(e,i),!Array.isArray(e.pages)||e.pages.length===0?i.push({path:"$.pages",message:"模板至少需要一页"}):e.pages.forEach((s,n)=>{const a=`$.pages.${n}`;if(!h(s)){i.push({path:a,message:"页应为对象"});return}c(s,"widthMm",a,i,Number.MIN_VALUE,!0),c(s,"heightMm",a,i,Number.MIN_VALUE,!0),s.layout!==void 0&&s.layout!=="page"&&s.layout!=="wide"&&i.push({path:`${a}.layout`,message:"布局应为 page 或 wide"}),typeof s.heightMm=="number"&&s.heightMm>=5e3&&i.push({path:`${a}.heightMm`,message:"页高应小于 5000mm"});for(const o of["marginTopMm","marginBottomMm","marginLeftMm","marginRightMm"])c(s,o,a,i);typeof s.widthMm=="number"&&Number(s.marginLeftMm??0)+Number(s.marginRightMm??0)>=s.widthMm&&i.push({path:a,message:"横向页边距占满页面"}),typeof s.heightMm=="number"&&Number(s.marginTopMm??0)+Number(s.marginBottomMm??0)>=s.heightMm&&i.push({path:a,message:"纵向页边距占满页面"}),Array.isArray(s.components)?s.components.forEach((o,f)=>{const r=`${a}.components.${f}`;h(o)&&o.kind==="list"?Ie(o,r,i):(v(o,r,i,t),h(o)&&I(o,r,i))}):i.push({path:`${a}.components`,message:"组件应为数组"}),_e(s,a,i)})):i.push({path:"$",message:"模板应为对象"}),{ok:i.length===0,errors:i,warnings:t})}function Y(e){const i=[],t=[];if(F(e,i),i.length)return{ok:!1,errors:i,warnings:t};if(!h(e))i.push({path:"$",message:"模板文档应为对象"});else{for(const n of Object.keys(e))Me.has(n)||i.push({path:`$.${n}`,message:"模板文档存在未知字段;只保存模板与描述,不保存取数或业务数据"});e.schemaVersion!==O&&i.push({path:"$.schemaVersion",message:"不支持的模板文档版本"});for(const n of["id","name"])m(e,n,"$",i,!0);for(const n of["revision","description"])m(e,n,"$",i);const s=X(e.template);i.push(...s.errors.map(n=>({...n,path:`$.template${n.path.slice(1)}`}))),t.push(...s.warnings.map(n=>({...n,path:`$.template${n.path.slice(1)}`})))}return{ok:i.length===0,errors:i,warnings:t}}function x(e){const i=Y(e);if(!i.ok)throw new w(i.errors)}function Le(e){const i=[];if(F(e,i),i.length)throw new w(i);const t={...e,schemaVersion:e.schemaVersion??O};return x(t),S(t)}function Ce(e){let i=e;if(typeof e=="string"){if(e.length>P)throw new w([{path:"$",message:"模板 JSON 超过 1000 万字符的导出/导入上限"}]);try{i=JSON.parse(e)}catch{throw new w([{path:"$",message:"模板 JSON 语法无效"}])}}return x(i),S(i)}function De(e){x(e);const i=JSON.stringify(e,null,2);if(i.length>P)throw new w([{path:"$",message:"模板 JSON 超过 1000 万字符的导出/导入上限"}]);return i}function S(e){return JSON.parse(JSON.stringify(e))}function Ve(e=[]){const i=new Map,t={get:s=>{const n=i.get(s);return n?S(n):void 0},list:()=>Array.from(i.values(),({template:s,...n})=>({...n})),register:(s,n={})=>{if(x(s),i.has(s.id)&&!n.replace)throw new w([{path:"$.id",message:`模板 ID ${s.id} 已注册;更新需显式 replace:true`}]);i.set(s.id,S(s))},remove:s=>i.delete(s)};for(const s of e)t.register(s);return t}exports.REPORT_TEMPLATE_DOCUMENT_VERSION=O;exports.ReportTemplateError=w;exports.assertRenderPlan=de;exports.createTemplateRegistry=Ve;exports.defineReportTemplate=Le;exports.parseReportTemplate=Ce;exports.reportFlowGroups=me;exports.serializeReportTemplate=De;exports.validateComponent=v;exports.validatePage=j;exports.validateRenderPlan=K;exports.validateReportPageFlow=H;exports.validateReportTemplate=X;exports.validateReportTemplateDocument=Y;exports.validateTemplateRepeat=G;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const w=require("./defaults-xhmcLLrf.cjs"),M=/[\u3000-\u9fff\uff00-\uffef]/,s=new Uint8Array(128);{for(const t of"iljtf.,:;'`|!()[]")s[t.charCodeAt(0)]=1;for(const t of"mwMW@")s[t.charCodeAt(0)]=2;for(let t=48;t<=57;t++)s[t]=3;for(let t=65;t<=90;t++)s[t]=4;s[32]=5}const g=[.54,.26,.95,.59,.67,.3];function d(t){const e=t.charCodeAt(0);return e<128?g[s[e]]:M.test(t)?1:/[A-Z]/.test(t)?.67:.54}const o={measureMm(t,e){const{fontSizePt:i,bold:c=!1,letterSpacingPt:u=0}=e,r=25.4/72;let n=0;for(const h of t)n+=d(h);return c&&(n*=1.04),(n*i+u*Math.max(0,Array.from(t).length-1))*r}};function p(){return o}function A(t,e){return o.measureMm(t,e)}function x(t){let e;return{measureMm(i,c){if(e===void 0&&(e=t()),!e)return o.measureMm(i,c);const u=c.fontSizePt*96/72;e.font=`${c.italic?"italic ":""}${c.bold?"bold ":""}${u}px ${c.fontFamily??w.DEFAULT_FONT_FAMILY}`,"letterSpacing"in e&&(e.letterSpacing="0px");const r=(c.letterSpacingPt??0)*Math.max(0,Array.from(i).length-1);return e.measureText(i).width*25.4/96+r*25.4/72}}}function T(t,e,i){const c=[];let u="";const r=()=>{u&&(c.push({text:u,widthMm:i.measureMm(u,e),cjk:!1}),u="")};for(const n of t){if(n===`
|
|
2
|
+
`){r(),c.push({text:`
|
|
3
|
+
`,widthMm:0,cjk:!1,br:!0});continue}if(n===" "){r(),c.push({text:n,widthMm:i.measureMm(n,e),cjk:!1,space:!0});continue}if(M.test(n)){r(),c.push({text:n,widthMm:i.measureMm(n,e),cjk:!0});continue}u+=n}return r(),c}function S(t,e,i,c=o){if(!t)return[""];t=t.replace(/\r\n?/g,`
|
|
4
|
+
`);const u=[];let r="",n=0;const h=(i.letterSpacingPt??0)*25.4/72,a=()=>{u.push(r),r="",n=0};for(const f of T(t,i,c)){if(f.br){a();continue}const m=r.length>0?h:0;if(n+m+f.widthMm<=e){r+=f.text,n+=m+f.widthMm;continue}if(f.space){a();continue}if(f.cjk){r.length>0&&a(),r=f.text,n=f.widthMm;continue}if(r.length>0&&a(),f.widthMm<=e){r=f.text,n=f.widthMm;continue}for(const l of f.text)c.measureMm(r+l,i)>e&&r.length>0&&a(),r+=l,n=c.measureMm(r,i)}return a(),u}exports.charWidthEm=d;exports.createCanvasMeasurer=x;exports.createHeuristicMeasurer=p;exports.heuristicMeasurer=o;exports.measureTextMm=A;exports.wrapText=S;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { D as M } from "./defaults-DXhiM1ZD.js";
|
|
2
|
+
const d = /[\u3000-\u9fff\uff00-\uffef]/, s = new Uint8Array(128);
|
|
3
|
+
{
|
|
4
|
+
for (const t of "iljtf.,:;'`|!()[]") s[t.charCodeAt(0)] = 1;
|
|
5
|
+
for (const t of "mwMW@") s[t.charCodeAt(0)] = 2;
|
|
6
|
+
for (let t = 48; t <= 57; t++) s[t] = 3;
|
|
7
|
+
for (let t = 65; t <= 90; t++) s[t] = 4;
|
|
8
|
+
s[32] = 5;
|
|
9
|
+
}
|
|
10
|
+
const w = [0.54, 0.26, 0.95, 0.59, 0.67, 0.3];
|
|
11
|
+
function g(t) {
|
|
12
|
+
const e = t.charCodeAt(0);
|
|
13
|
+
return e < 128 ? w[s[e]] : d.test(t) ? 1 : /[A-Z]/.test(t) ? 0.67 : 0.54;
|
|
14
|
+
}
|
|
15
|
+
const o = {
|
|
16
|
+
measureMm(t, e) {
|
|
17
|
+
const { fontSizePt: i, bold: c = !1, letterSpacingPt: f = 0 } = e, n = 25.4 / 72;
|
|
18
|
+
let r = 0;
|
|
19
|
+
for (const h of t)
|
|
20
|
+
r += g(h);
|
|
21
|
+
return c && (r *= 1.04), (r * i + f * Math.max(0, Array.from(t).length - 1)) * n;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function S() {
|
|
25
|
+
return o;
|
|
26
|
+
}
|
|
27
|
+
function T(t, e) {
|
|
28
|
+
return o.measureMm(t, e);
|
|
29
|
+
}
|
|
30
|
+
function b(t) {
|
|
31
|
+
let e;
|
|
32
|
+
return {
|
|
33
|
+
measureMm(i, c) {
|
|
34
|
+
if (e === void 0 && (e = t()), !e) return o.measureMm(i, c);
|
|
35
|
+
const f = c.fontSizePt * 96 / 72;
|
|
36
|
+
e.font = `${c.italic ? "italic " : ""}${c.bold ? "bold " : ""}${f}px ${c.fontFamily ?? M}`, "letterSpacing" in e && (e.letterSpacing = "0px");
|
|
37
|
+
const n = (c.letterSpacingPt ?? 0) * Math.max(0, Array.from(i).length - 1);
|
|
38
|
+
return e.measureText(i).width * 25.4 / 96 + n * 25.4 / 72;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function p(t, e, i) {
|
|
43
|
+
const c = [];
|
|
44
|
+
let f = "";
|
|
45
|
+
const n = () => {
|
|
46
|
+
f && (c.push({ text: f, widthMm: i.measureMm(f, e), cjk: !1 }), f = "");
|
|
47
|
+
};
|
|
48
|
+
for (const r of t) {
|
|
49
|
+
if (r === `
|
|
50
|
+
`) {
|
|
51
|
+
n(), c.push({ text: `
|
|
52
|
+
`, widthMm: 0, cjk: !1, br: !0 });
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (r === " ") {
|
|
56
|
+
n(), c.push({ text: r, widthMm: i.measureMm(r, e), cjk: !1, space: !0 });
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (d.test(r)) {
|
|
60
|
+
n(), c.push({ text: r, widthMm: i.measureMm(r, e), cjk: !0 });
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
f += r;
|
|
64
|
+
}
|
|
65
|
+
return n(), c;
|
|
66
|
+
}
|
|
67
|
+
function j(t, e, i, c = o) {
|
|
68
|
+
if (!t) return [""];
|
|
69
|
+
t = t.replace(/\r\n?/g, `
|
|
70
|
+
`);
|
|
71
|
+
const f = [];
|
|
72
|
+
let n = "", r = 0;
|
|
73
|
+
const h = (i.letterSpacingPt ?? 0) * 25.4 / 72, u = () => {
|
|
74
|
+
f.push(n), n = "", r = 0;
|
|
75
|
+
};
|
|
76
|
+
for (const a of p(t, i, c)) {
|
|
77
|
+
if (a.br) {
|
|
78
|
+
u();
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const m = n.length > 0 ? h : 0;
|
|
82
|
+
if (r + m + a.widthMm <= e) {
|
|
83
|
+
n += a.text, r += m + a.widthMm;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (a.space) {
|
|
87
|
+
u();
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (a.cjk) {
|
|
91
|
+
n.length > 0 && u(), n = a.text, r = a.widthMm;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (n.length > 0 && u(), a.widthMm <= e) {
|
|
95
|
+
n = a.text, r = a.widthMm;
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
for (const l of a.text)
|
|
99
|
+
c.measureMm(n + l, i) > e && n.length > 0 && u(), n += l, r = c.measureMm(n, i);
|
|
100
|
+
}
|
|
101
|
+
return u(), f;
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
b as a,
|
|
105
|
+
S as b,
|
|
106
|
+
g as c,
|
|
107
|
+
o as h,
|
|
108
|
+
T as m,
|
|
109
|
+
j as w
|
|
110
|
+
};
|
package/dist/vue/async.d.cts
CHANGED
|
@@ -29,7 +29,7 @@ declare interface AssetRenderBudget {
|
|
|
29
29
|
/** Wall-clock budget, including adapters that ignore AbortSignal. Default 30 seconds. */
|
|
30
30
|
maxDurationMs?: number;
|
|
31
31
|
}
|
|
32
|
-
declare interface AssetRenderOptions extends OutputDiagnosticOptions {
|
|
32
|
+
declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMediaOptions {
|
|
33
33
|
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
34
34
|
assetBudget?: AssetRenderBudget;
|
|
35
35
|
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
@@ -432,6 +432,30 @@ declare interface GridCell_3 {
|
|
|
432
432
|
style?: ComponentStyle_3;
|
|
433
433
|
}
|
|
434
434
|
declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
435
|
+
/** Bounded binary image inspection shared by PDF, Excel and template import. No decoder is loaded. */
|
|
436
|
+
declare interface ImageMediaOptions {
|
|
437
|
+
maxImageBytes?: number;
|
|
438
|
+
maxTotalImageBytes?: number;
|
|
439
|
+
maxImages?: number;
|
|
440
|
+
/** Decoded pixels per unique image, default 16 million. */
|
|
441
|
+
maxImagePixels?: number;
|
|
442
|
+
/** Total decoded pixels for unique media, default 64 million. */
|
|
443
|
+
maxTotalImagePixels?: number;
|
|
444
|
+
/** Maximum source dimension, default 16384 pixels. */
|
|
445
|
+
maxImageDimension?: number;
|
|
446
|
+
}
|
|
447
|
+
/** Bounded binary image inspection shared by PDF, Excel and template import. No decoder is loaded. */
|
|
448
|
+
declare interface ImageMediaOptions_2 {
|
|
449
|
+
maxImageBytes?: number;
|
|
450
|
+
maxTotalImageBytes?: number;
|
|
451
|
+
maxImages?: number;
|
|
452
|
+
/** Decoded pixels per unique image, default 16 million. */
|
|
453
|
+
maxImagePixels?: number;
|
|
454
|
+
/** Total decoded pixels for unique media, default 64 million. */
|
|
455
|
+
maxTotalImagePixels?: number;
|
|
456
|
+
/** Maximum source dimension, default 16384 pixels. */
|
|
457
|
+
maxImageDimension?: number;
|
|
458
|
+
}
|
|
435
459
|
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
436
460
|
declare type ListAlignment = NonNullable<ComponentStyle["align"]> | "auto";
|
|
437
461
|
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
@@ -681,6 +705,8 @@ declare interface MachReportConfig {
|
|
|
681
705
|
}
|
|
682
706
|
/** defaults 层可配置项(全部可选,均有内置缺省) */
|
|
683
707
|
declare interface MachReportDefaults {
|
|
708
|
+
drill?: ReportDrillOptions;
|
|
709
|
+
loadParamOptions?: ReportParamOptionsLoader;
|
|
684
710
|
printOptions?: ReportPrintOptions;
|
|
685
711
|
showExport?: boolean;
|
|
686
712
|
showPrint?: boolean;
|
|
@@ -728,7 +754,11 @@ declare type MachReportLogger = Pick<Console, "warn" | "info">;
|
|
|
728
754
|
* - 优先级:组件 props > 路由级叠加 > preset > defaults(props 永远最高)
|
|
729
755
|
*/
|
|
730
756
|
/** 工具栏与状态文案(默认简体中文;出海场景覆写) */
|
|
731
|
-
declare interface MachReportMessages extends Partial<ReportCalculationMessages>, ReportPrintMessages {
|
|
757
|
+
declare interface MachReportMessages extends Partial<ReportCalculationMessages>, ReportPrintMessages, ReportParamOptionsMessages {
|
|
758
|
+
drillActions?: string;
|
|
759
|
+
drillOpening?: string;
|
|
760
|
+
drillMissingValue?: string;
|
|
761
|
+
drillFailed?: string;
|
|
732
762
|
exportMenu?: string;
|
|
733
763
|
exportMenuDescription?: string;
|
|
734
764
|
clearSearch?: string;
|
|
@@ -1013,7 +1043,7 @@ declare interface MatrixTableOptions_2 {
|
|
|
1013
1043
|
maxCells?: number;
|
|
1014
1044
|
}
|
|
1015
1045
|
declare interface OutputDiagnostic {
|
|
1016
|
-
code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
1046
|
+
code: "invalid-image-data" | "image-budget-exceeded" | "component-render-failed" | "unsupported-text" | "output-degraded" | "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
1017
1047
|
severity: "warning";
|
|
1018
1048
|
format: OutputFormat;
|
|
1019
1049
|
pageIndex: number;
|
|
@@ -1025,7 +1055,7 @@ declare interface OutputDiagnostic {
|
|
|
1025
1055
|
message: string;
|
|
1026
1056
|
}
|
|
1027
1057
|
declare interface OutputDiagnostic_2 {
|
|
1028
|
-
code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
1058
|
+
code: "invalid-image-data" | "image-budget-exceeded" | "component-render-failed" | "unsupported-text" | "output-degraded" | "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
1029
1059
|
severity: "warning";
|
|
1030
1060
|
format: OutputFormat_2;
|
|
1031
1061
|
pageIndex: number;
|
|
@@ -1399,6 +1429,8 @@ declare interface ReportCellSelection {
|
|
|
1399
1429
|
}
|
|
1400
1430
|
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1401
1431
|
declare interface ReportCellSource {
|
|
1432
|
+
/** Source identity across report occurrences; sharing must be explicitly declared. */
|
|
1433
|
+
sourceScope?: string;
|
|
1402
1434
|
datasetId: string;
|
|
1403
1435
|
rowKey: string | number;
|
|
1404
1436
|
field: string;
|
|
@@ -1407,6 +1439,8 @@ declare interface ReportCellSource {
|
|
|
1407
1439
|
}
|
|
1408
1440
|
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1409
1441
|
declare interface ReportCellSource_2 {
|
|
1442
|
+
/** Source identity across report occurrences; sharing must be explicitly declared. */
|
|
1443
|
+
sourceScope?: string;
|
|
1410
1444
|
datasetId: string;
|
|
1411
1445
|
rowKey: string | number;
|
|
1412
1446
|
field: string;
|
|
@@ -1415,6 +1449,8 @@ declare interface ReportCellSource_2 {
|
|
|
1415
1449
|
}
|
|
1416
1450
|
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1417
1451
|
declare interface ReportCellSource_3 {
|
|
1452
|
+
/** Source identity across report occurrences; sharing must be explicitly declared. */
|
|
1453
|
+
sourceScope?: string;
|
|
1418
1454
|
datasetId: string;
|
|
1419
1455
|
rowKey: string | number;
|
|
1420
1456
|
field: string;
|
|
@@ -1444,6 +1480,8 @@ declare interface ReportDataTarget {
|
|
|
1444
1480
|
rowKey?: string | number;
|
|
1445
1481
|
/** Use table identity when the same dataset appears in several tables. */
|
|
1446
1482
|
tableId?: string;
|
|
1483
|
+
/** Assigned by the source/runtime when several reports share dataset names. */
|
|
1484
|
+
reportScope?: string;
|
|
1447
1485
|
}
|
|
1448
1486
|
declare interface ReportDataTarget_2 {
|
|
1449
1487
|
datasetId: string;
|
|
@@ -1451,8 +1489,12 @@ declare interface ReportDataTarget_2 {
|
|
|
1451
1489
|
rowKey?: string | number;
|
|
1452
1490
|
/** Use table identity when the same dataset appears in several tables. */
|
|
1453
1491
|
tableId?: string;
|
|
1492
|
+
/** Assigned by the source/runtime when several reports share dataset names. */
|
|
1493
|
+
reportScope?: string;
|
|
1454
1494
|
}
|
|
1455
1495
|
declare interface ReportDefinition {
|
|
1496
|
+
/** Explicitly shared editable data identity. Omit to isolate each report occurrence. */
|
|
1497
|
+
sourceScope?: string;
|
|
1456
1498
|
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
1457
1499
|
template: ReportTemplate | ReportTemplateLoader;
|
|
1458
1500
|
/** 静态数据;load 存在时优先使用 load 的结果。 */
|
|
@@ -1477,6 +1519,49 @@ declare interface ReportDiagnostic {
|
|
|
1477
1519
|
target?: ReportDataTarget;
|
|
1478
1520
|
}
|
|
1479
1521
|
declare type ReportDiscardReason = "reload" | "import" | "replace" | "leave";
|
|
1522
|
+
/** Serializable action metadata. URLs, scripts and automatic navigation are deliberately absent. */
|
|
1523
|
+
declare interface ReportDrillAction {
|
|
1524
|
+
id: string;
|
|
1525
|
+
label: string;
|
|
1526
|
+
target: {
|
|
1527
|
+
field: string;
|
|
1528
|
+
datasetId?: string;
|
|
1529
|
+
reportScope?: string;
|
|
1530
|
+
roles?: readonly string[];
|
|
1531
|
+
};
|
|
1532
|
+
params?: Readonly<Record<string, ReportDrillBinding>>;
|
|
1533
|
+
}
|
|
1534
|
+
declare type ReportDrillBinding = {
|
|
1535
|
+
value: string | number | boolean;
|
|
1536
|
+
} | {
|
|
1537
|
+
from: "value" | "rowKey";
|
|
1538
|
+
} | {
|
|
1539
|
+
from: "query" | "field";
|
|
1540
|
+
field: string;
|
|
1541
|
+
};
|
|
1542
|
+
/** Trusted host-owned allowlist. Matching serialized metadata alone never executes an action. */
|
|
1543
|
+
declare interface ReportDrillOptions {
|
|
1544
|
+
actions: readonly ReportDrillAction[];
|
|
1545
|
+
open(request: ReportDrillRequest & {
|
|
1546
|
+
signal: AbortSignal;
|
|
1547
|
+
view: Readonly<{
|
|
1548
|
+
zoom: number;
|
|
1549
|
+
scrollTop: number;
|
|
1550
|
+
scrollLeft: number;
|
|
1551
|
+
}>;
|
|
1552
|
+
}): void | Promise<void>;
|
|
1553
|
+
}
|
|
1554
|
+
declare interface ReportDrillRequest {
|
|
1555
|
+
actionId: string;
|
|
1556
|
+
params: Readonly<Record<string, string>>;
|
|
1557
|
+
returnState: Readonly<ReportDrillReturnState>;
|
|
1558
|
+
}
|
|
1559
|
+
declare interface ReportDrillReturnState {
|
|
1560
|
+
params: Readonly<Record<string, string>>;
|
|
1561
|
+
address: Readonly<ReportCellAddress_2>;
|
|
1562
|
+
reportScope?: string;
|
|
1563
|
+
source?: Readonly<Pick<ReportCellSource_2, "sourceScope" | "datasetId" | "rowKey" | "field">>;
|
|
1564
|
+
}
|
|
1480
1565
|
declare interface ReportEditBatch {
|
|
1481
1566
|
/** Idempotency identity; the server should bind it to the exact payload. */
|
|
1482
1567
|
requestId: string;
|
|
@@ -1634,6 +1719,10 @@ declare interface ReportParamDef {
|
|
|
1634
1719
|
label: string;
|
|
1635
1720
|
value: string;
|
|
1636
1721
|
}>;
|
|
1722
|
+
/** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
|
|
1723
|
+
optionsSource?: string;
|
|
1724
|
+
/** Select dependencies must be declared parameters; changing a parent clears descendants. */
|
|
1725
|
+
dependsOn?: string[];
|
|
1637
1726
|
defaultValue?: string;
|
|
1638
1727
|
required?: boolean;
|
|
1639
1728
|
placeholder?: string;
|
|
@@ -1655,6 +1744,10 @@ declare interface ReportParamDef_2 {
|
|
|
1655
1744
|
label: string;
|
|
1656
1745
|
value: string;
|
|
1657
1746
|
}>;
|
|
1747
|
+
/** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
|
|
1748
|
+
optionsSource?: string;
|
|
1749
|
+
/** Select dependencies must be declared parameters; changing a parent clears descendants. */
|
|
1750
|
+
dependsOn?: string[];
|
|
1658
1751
|
defaultValue?: string;
|
|
1659
1752
|
required?: boolean;
|
|
1660
1753
|
placeholder?: string;
|
|
@@ -1670,7 +1763,30 @@ declare interface ReportParamIssue {
|
|
|
1670
1763
|
field: string;
|
|
1671
1764
|
message: string;
|
|
1672
1765
|
}
|
|
1673
|
-
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
1766
|
+
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "dependency" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
1767
|
+
declare interface ReportParamOption {
|
|
1768
|
+
readonly label: string;
|
|
1769
|
+
readonly value: string;
|
|
1770
|
+
}
|
|
1771
|
+
declare interface ReportParamOptionsInput {
|
|
1772
|
+
readonly source: string;
|
|
1773
|
+
readonly field: string;
|
|
1774
|
+
readonly query: string;
|
|
1775
|
+
/** Only declared dependencies, captured at request start. Never the mutable form. */
|
|
1776
|
+
readonly params: Readonly<Record<string, string>>;
|
|
1777
|
+
readonly signal: AbortSignal;
|
|
1778
|
+
readonly limit: number;
|
|
1779
|
+
}
|
|
1780
|
+
/** Resolve a trusted source key through the host's existing API/authentication. */
|
|
1781
|
+
declare type ReportParamOptionsLoader = (input: ReportParamOptionsInput) => Promise<readonly ReportParamOption[]>;
|
|
1782
|
+
declare interface ReportParamOptionsMessages {
|
|
1783
|
+
paramOptionsLoading?: string;
|
|
1784
|
+
paramOptionsEmpty?: string;
|
|
1785
|
+
paramOptionsFailed?: string;
|
|
1786
|
+
paramOptionsMissingLoader?: string;
|
|
1787
|
+
paramOptionsDependencies?: string;
|
|
1788
|
+
paramOptionsClear?: string;
|
|
1789
|
+
}
|
|
1674
1790
|
declare interface ReportPreferencesAdapter {
|
|
1675
1791
|
load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
|
|
1676
1792
|
save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
|
|
@@ -2011,21 +2127,14 @@ declare type ValueFormat = ColumnFormat;
|
|
|
2011
2127
|
declare type ValueFormat_2 = ColumnFormat_2;
|
|
2012
2128
|
/** The same declarative formatting used by list columns, before any output backend. */
|
|
2013
2129
|
declare type ValueFormat_3 = ColumnFormat_3;
|
|
2014
|
-
declare
|
|
2015
|
-
/** Decoded bytes per unique embedded image; default 16 MiB. */
|
|
2016
|
-
maxImageBytes?: number;
|
|
2017
|
-
/** Total decoded bytes of unique images in this workbook; default 32 MiB. */
|
|
2018
|
-
maxTotalImageBytes?: number;
|
|
2019
|
-
/** Unique embedded media limit, default 1000; repeated placements reuse the same media. */
|
|
2020
|
-
maxImages?: number;
|
|
2021
|
-
}
|
|
2130
|
+
declare type XlsxImageOptions = ImageMediaOptions_2;
|
|
2022
2131
|
/**
|
|
2023
2132
|
* RenderPlan → xlsx 导出(B 端第二出口,对齐家族 @agile-team/mach-table-xlsx 路线):
|
|
2024
2133
|
* - 网格组件 → 真表格:列宽(mm→Excel 宽度)、行高(mm→pt)、colSpan/rowSpan 合并、
|
|
2025
2134
|
* 加粗/对齐/底色/字号直译(resolveGridLayout 复用单真相源几何)
|
|
2026
2135
|
* - 文本组件 → 合并标题行(顺序流式输出,保字号/加粗/对齐;非像素级定位,
|
|
2027
2136
|
* 目标是"财务能直接用的对账表"而非复刻版面)
|
|
2028
|
-
* -
|
|
2137
|
+
* - 原生 richText 保留基础字形;未支持组件、段落专有排版与单元格嵌套组件计入 diagnostics / warnings
|
|
2029
2138
|
*/
|
|
2030
2139
|
declare interface XlsxRenderOptions extends OutputDiagnosticOptions_2, XlsxImageOptions {
|
|
2031
2140
|
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|