@agile-team/mach-report 2.15.0 → 2.17.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 +21 -12
- package/dist/{ExcelBindingWizard-Bs43BGNp.cjs → ExcelBindingWizard-Bq6FYME6.cjs} +1 -1
- package/dist/{ExcelBindingWizard-BKH1nGNS.js → ExcelBindingWizard-Co1svTsw.js} +3 -3
- package/dist/{ParamEditor-Da4akw6V.cjs → ParamEditor-B5UZRgxv.cjs} +1 -1
- package/dist/{ParamEditor-DoAhzJsm.js → ParamEditor-DNNARyeB.js} +1 -1
- package/dist/{ReportBatchPanel-wP9m9Pj1.cjs → ReportBatchPanel-Ctvs2t_9.cjs} +1 -1
- package/dist/{ReportBatchPanel-BMf6boMA.js → ReportBatchPanel-uQh06usx.js} +3 -3
- package/dist/ReportPreview-BdQawRh0.js +4879 -0
- package/dist/ReportPreview-CJC_-j2I.cjs +6 -0
- package/dist/{ReportTemplateLibrary-Sxr3eD0J.cjs → ReportTemplateLibrary-CnP7_1pH.cjs} +1 -1
- package/dist/{ReportTemplateLibrary-C9wutIiT.js → ReportTemplateLibrary-TIL_Oj2l.js} +1 -1
- package/dist/RuleEditor-DkRjOLlr.js +2141 -0
- package/dist/RuleEditor-h5anGsDB.cjs +1 -0
- package/dist/{TemplateOutlinePanel-JTSR53vJ.cjs → TemplateOutlinePanel-BlLxRrfu.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-D6Bkny59.js → TemplateOutlinePanel-BouxsuqQ.js} +1 -1
- package/dist/{TemplateReusePanel-rVuK1kTz.js → TemplateReusePanel-BEACLPaN.js} +2 -2
- package/dist/{TemplateReusePanel-Kx35S0Ql.cjs → TemplateReusePanel-yxsHSO40.cjs} +1 -1
- package/dist/{TemplateReviewPanel-B0ar9_zf.js → TemplateReviewPanel-B1OGRY2i.js} +1 -1
- package/dist/{TemplateReviewPanel-Dn6X9UmY.cjs → TemplateReviewPanel-D9Cx0m2N.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +65 -1
- package/dist/analytics.d.ts +65 -1
- package/dist/analytics.js +4 -4
- package/dist/artifact-integrity.json +105 -101
- package/dist/assets-BIMVwjQe.js +231 -0
- package/dist/assets-Dfs2ElxI.cjs +1 -0
- package/dist/auto-BIOmtVhk.js +240 -0
- package/dist/auto-DDHflI9v.cjs +1 -0
- package/dist/{batch-BfZHN1do.js → batch-WzDIXJAt.js} +1 -1
- package/dist/{batch-CLpELXBl.cjs → batch-z6Aw5GEY.cjs} +1 -1
- package/dist/codes.d.cts +2 -0
- package/dist/codes.d.ts +2 -0
- package/dist/component-tree-Ca6YYfHq.js +61 -0
- package/dist/component-tree-DkGLEfZC.cjs +1 -0
- package/dist/computed-BW5a8QFk.js +612 -0
- package/dist/computed-C2GD3XcE.cjs +1 -0
- package/dist/config-Dg_o8e7m.cjs +1 -0
- package/dist/{config-BVsJXSqS.js → config-XQ4qrQ7Q.js} +66 -64
- package/dist/dataset-DL83majE.js +161 -0
- package/dist/dataset-IrlXbUvh.cjs +1 -0
- package/dist/designer-D9XAxqSc.js +5178 -0
- package/dist/designer-uCDo5XSK.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +178 -3
- package/dist/designer.d.ts +178 -3
- package/dist/designer.js +1 -1
- package/dist/drill-ByN8COs_.cjs +1 -0
- package/dist/{drill-ByJviLXS.js → drill-CKW3Xtfa.js} +5 -5
- package/dist/encoding-BFMFIc4r.cjs +1 -0
- package/dist/encoding-DP_Eaf0A.js +21 -0
- package/dist/{font-loader-B_UkxpzC.cjs → font-loader-7FWVlykp.cjs} +1 -1
- package/dist/{font-loader-Q3bQjmrI.js → font-loader-CQZowp0I.js} +1 -1
- package/dist/index.cjs +8 -9
- package/dist/index.d.cts +175 -1
- package/dist/index.d.ts +175 -1
- package/dist/index.js +1343 -915
- package/dist/json-snapshot-D7PE1NsU.cjs +2 -0
- package/dist/json-snapshot-DYmEe3sO.js +1779 -0
- package/dist/matrix-JLAXlux-.js +302 -0
- package/dist/matrix-gTHpDTGm.cjs +1 -0
- package/dist/{pdf-CvvrjPQg.cjs → pdf-B8JouyYv.cjs} +48 -50
- package/dist/{pdf-BwNyeGpt.js → pdf-l3ea86di.js} +2734 -2748
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +14 -0
- package/dist/pdf.d.ts +14 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-Ca_XZG3l.js → plugin-BBp74CQZ.js} +1 -1
- package/dist/{plugin-DHO7X8z2.cjs → plugin-CtFX9PFG.cjs} +1 -1
- package/dist/prepared-CARicKYh.js +87 -0
- package/dist/prepared-Ch1x_Gog.cjs +1 -0
- package/dist/progress-BXzlVbIp.js +29 -0
- package/dist/progress-DJBd9Rb9.cjs +1 -0
- package/dist/{progress-D-OTpEav.js → progress-Hc2vxoCs.js} +2 -2
- package/dist/protocol-B5A2uom4.cjs +1 -0
- package/dist/protocol-BaiWjq5w.js +90 -0
- package/dist/record-bindings-B86Sur_y.cjs +1 -0
- package/dist/{record-bindings-Do_b3h4V.js → record-bindings-D4TuMzHs.js} +10 -11
- package/dist/{region-binding-workflow-BMhK_TjP.js → region-binding-workflow-BNasF5kz.js} +2 -2
- package/dist/{region-binding-workflow-DIYJdCUr.cjs → region-binding-workflow-O2Cni3mF.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -0
- package/dist/report-encoding-worker.d.ts +1 -0
- package/dist/report-encoding-worker.js +2 -0
- package/dist/rich-text-layout-ALlMoYOG.cjs +3 -0
- package/dist/rich-text-layout-Ct5WrY1g.js +102 -0
- package/dist/runtime-DakRXui3.js +170 -0
- package/dist/runtime-dL5ygIfa.cjs +1 -0
- package/dist/sbom.cdx.json +2 -2
- package/dist/server/node.d.cts +132 -1
- package/dist/server/node.d.ts +132 -1
- package/dist/server-node.cjs +5 -1
- package/dist/server-node.js +5177 -463
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +182 -2
- package/dist/server.d.ts +182 -2
- package/dist/server.js +918 -833
- package/dist/sha256-BshdOkCC.cjs +1 -0
- package/dist/sha256-DTG-Gq8i.js +157 -0
- package/dist/style-67OqfNed.js +73 -0
- package/dist/style-C22Pbv3T.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/template-catalog-Dua8h9ZA.cjs +1 -0
- package/dist/{template-catalog-j2B1MJlL.js → template-catalog-wT1fNeAP.js} +10 -10
- package/dist/{template-fragments-DcKeiylI.cjs → template-fragments-BajTajb4.cjs} +1 -1
- package/dist/{template-fragments-BGbQLGlV.js → template-fragments-DmX5XK4N.js} +2 -2
- package/dist/template-registry-CpysHAxy.cjs +1 -0
- package/dist/{template-registry-BtaKPELV.js → template-registry-u11fPd8D.js} +389 -321
- package/dist/{textwrap-DE1kgcJB.js → textwrap-BEIg2w8y.js} +1 -1
- package/dist/textwrap-BI-yJ6Wt.cjs +4 -0
- package/dist/{tree-BX380Rr7.cjs → tree-CLpxYbKa.cjs} +1 -1
- package/dist/{tree-CjVZLRw7.js → tree-DNJorJUf.js} +1 -1
- package/dist/vue/async.d.cts +174 -2
- package/dist/vue/async.d.ts +174 -2
- package/dist/vue/index.d.cts +218 -3
- package/dist/vue/index.d.ts +218 -3
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +7 -7
- package/dist/{workbook-session-BvToI-Fd.js → workbook-session-B8pNW24X.js} +153 -140
- package/dist/{workbook-session-Bjv1YCRK.cjs → workbook-session-DN5LSA5C.cjs} +12 -12
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +84 -1
- package/dist/worker.d.ts +84 -1
- package/dist/worker.js +12 -157
- package/dist/xlsx-node.cjs +33 -33
- package/dist/xlsx-node.js +1282 -1289
- package/dist/xlsx.cjs +4 -3
- package/dist/xlsx.d.cts +90 -2
- package/dist/xlsx.d.ts +90 -2
- package/dist/xlsx.js +279 -259
- package/package.json +6 -3
- package/dist/ReportPreview-ChV19HBp.js +0 -4619
- package/dist/ReportPreview-DbLvvOUT.cjs +0 -6
- package/dist/RuleEditor-C_Clasvd.js +0 -2037
- package/dist/RuleEditor-XhGHK8DE.cjs +0 -1
- package/dist/assets-B9ImAi6_.cjs +0 -1
- package/dist/assets-DEaz4qsp.js +0 -124
- package/dist/batch-BaP6pWDE.cjs +0 -1
- package/dist/batch-CGyt-b2W.js +0 -273
- package/dist/capabilities-CAh2Nrue.cjs +0 -1
- package/dist/capabilities-DskCHs3V.js +0 -69
- package/dist/computed-C-4C2S5h.js +0 -521
- package/dist/computed-CGV2a809.cjs +0 -1
- package/dist/config-D10us76d.cjs +0 -1
- package/dist/data-explanation-B8MZRYVS.js +0 -16
- package/dist/data-explanation-DE55G30w.cjs +0 -1
- package/dist/dataset-BkRmwgeJ.cjs +0 -1
- package/dist/dataset-H5pFuQGU.js +0 -121
- package/dist/defaults-DXhiM1ZD.js +0 -10
- package/dist/defaults-xhmcLLrf.cjs +0 -1
- package/dist/designer-2bDlcNXQ.js +0 -5136
- package/dist/designer-BT7XCdbW.cjs +0 -2
- package/dist/drill-DYTxuL3A.cjs +0 -1
- package/dist/grid-strokes-Cr7DwUux.cjs +0 -1
- package/dist/grid-strokes-DyyG1q_o.js +0 -53
- package/dist/json-snapshot-DFb2eWkf.js +0 -1416
- package/dist/json-snapshot-WWSGlaHG.cjs +0 -2
- package/dist/matrix-CGRGkn5s.js +0 -112
- package/dist/matrix-gEO7ZM_u.cjs +0 -1
- package/dist/prepared-CFy9B75C.cjs +0 -1
- package/dist/prepared-ajM-H-9B.js +0 -69
- package/dist/record-bindings-By_UKZ2g.cjs +0 -1
- package/dist/render-plan-7xpGrCEl.cjs +0 -1
- package/dist/render-plan-Ck6koX9L.js +0 -13
- package/dist/sha256-ArEYjaTI.cjs +0 -1
- package/dist/sha256-DPEuJ3nh.js +0 -155
- package/dist/style-CQ1PK8ZB.js +0 -67
- package/dist/style-UgIJSA1F.cjs +0 -1
- package/dist/template-catalog-FJE_c9Qe.cjs +0 -1
- package/dist/template-registry-Co1zPq5e.cjs +0 -1
- package/dist/textwrap-CWHyzkBH.cjs +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const w=require("./style-C22Pbv3T.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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./computed-
|
|
1
|
+
"use strict";const s=require("./computed-C2GD3XcE.cjs");class g extends Error{constructor(r){super(`树节点超出行数预算 ${r}`),this.limit=r,this.code="tree-row-limit",this.name="TreeRowLimitError"}}function u(e,r,i,t){const n=e??r;if(!Number.isInteger(n)||n<1||n>i)throw new Error(`${t}应为 1–${i} 的整数`);return n}function w(e){return{rows:u(e.maxRows,1e5,1e6,"树行数预算"),depth:u(e.maxDepth,64,256,"树深度预算"),visits:u(e.maxAggregationVisits,1e6,1e7,"树聚合访问预算")}}function m(e){return typeof e=="string"&&!!e.trim()}function c(e){return m(e)&&!["__proto__","prototype","constructor"].includes(e)}function E(e){if(m(e)||typeof e=="number"&&Number.isFinite(e))return e;throw new Error("树节点业务键应为非空字符串或有限数字")}function p(e){return JSON.stringify([typeof e,e])}function F(e){return[e.idField,...e.input==="flat"?[e.parentField??""]:[e.childrenField??"children"]]}function y(e,r){const i=F(e);if(r?.some(t=>t.scope&&t.scope!=="row"||i.includes(t.field)))throw new Error("树形布局仅支持不覆盖结构键的当前行计算")}function h(e){if(!e?.aborted)return;const r=new Error("树报表处理已取消");throw r.name="AbortError",r}function k(e){const r=e.aggregates??[];if(!Array.isArray(r)||r.length>32)throw new Error("树聚合最多 32 项");if(e.parentValues!=="leaf-aggregate"&&r.length)throw new Error("树聚合需显式选择 leaf-aggregate 父级取值策略");if(e.parentValues==="leaf-aggregate"&&!r.length)throw new Error("叶子聚合策略至少需要一个聚合字段");const i=new Set;for(const t of r){if(!t||!c(t.field)||i.has(t.field))throw new Error("树聚合输出字段应安全、非空且唯一");for(const n of[t.valueField,t.weightField])if(n!==void 0&&!c(n))throw new Error("树聚合来源字段应安全且非空");if([...F(e),e.labelField].includes(t.field))throw new Error("树聚合不能覆盖结构键或标签字段");i.add(t.field),s.createAggregateAccumulator({...t,field:t.valueField??t.field})}}function N(e){if(!c(e.idField)||!c(e.labelField))throw new Error("树需要安全的业务键和标签字段");if(e.input==="flat"&&(!c(e.parentField)||e.parentField===e.idField))throw new Error("扁平树需要独立的父键字段");if(e.childrenField!==void 0&&!c(e.childrenField))throw new Error("子节点字段应安全且非空");if(e.input==="nested"&&[e.idField,e.labelField].includes(e.childrenField??"children"))throw new Error("子节点字段不能覆盖业务键或标签字段")}function v(e){if(!e||typeof e!="object"||!["flat","nested"].includes(e.input))throw new Error("树输入应为 flat 或 nested");if(N(e),e.orphan!==void 0&&!["error","root"].includes(e.orphan))throw new Error("树孤儿策略应为 error 或 root");if(e.parentValues!==void 0&&!["source","leaf-aggregate"].includes(e.parentValues))throw new Error("未知树父级取值策略");if(e.indentMm!==void 0&&(!Number.isFinite(e.indentMm)||e.indentMm<0||e.indentMm>20))throw new Error("树每级缩进应为 0–20 mm");w(e),k(e)}function A(e,r,i,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("树节点应为对象");if(i.size>=t.rows)throw new g(t.rows);const n=E(e[r.idField]),l=p(n);if(i.has(l))throw new Error(`树节点业务键重复:${String(n)}`);const o={original:e,row:e,key:n,depth:0,children:[]};return i.set(l,o),o}function $(e,r,i,t,n){for(const o of e)h(n),A(o,r,i,t);const l=[];for(const o of i.values()){h(n);const a=o.row[r.parentField];if(a==null){l.push(o);continue}const d=i.get(p(E(a)));if(!d){if(r.orphan!=="root")throw new Error(`树节点 ${String(o.key)} 的父节点不存在`);l.push(o);continue}if(d===o)throw new Error("树节点不能以自身为父节点");o.parent=d,d.children.push(o)}return l}function M(e,r,i,t,n){const l=[],o=[{rows:e,next:0}];for(;o.length;){h(n);const a=o[o.length-1];if(a.next>=a.rows.length){o.pop();continue}const d=A(a.rows[a.next++],r,i,t);if(d.parent=a.parent,d.depth=o.length-1,o.length>t.depth)throw new Error(`树节点超出深度预算 ${t.depth}`);(a.parent?.children??l).push(d);const f=d.row[r.childrenField??"children"];if(f!=null){if(!Array.isArray(f))throw new Error("嵌套树 children 字段应为数组");f.length&&o.push({rows:f,next:0,parent:d})}}return l}function V(e,r,i,t){const n=[],l=[{nodes:e,next:0}];for(;l.length;){h(t);const o=l[l.length-1];if(o.next>=o.nodes.length){l.pop();continue}if(l.length>i.depth)throw new Error(`树节点超出深度预算 ${i.depth}`);const a=o.nodes[o.next++];a.depth=l.length-1,n.push(a),a.children.length&&l.push({nodes:a.children,next:0})}if(n.length!==r)throw new Error("树父子关系存在循环");return n}function S(e,r,i,t){if(r.parentValues!=="leaf-aggregate")return;const n=r.aggregates,l=new Map;for(const a of e)a.children.length&&l.set(a,n.map(d=>s.createAggregateAccumulator({...d,field:d.valueField??d.field})));let o=0;for(const a of e)if(!a.children.length)for(let d=a.parent;d;d=d.parent){if(h(t),o+=n.length,o>i.visits)throw new Error(`树聚合超出访问预算 ${i.visits}`);for(const f of l.get(d))f.add(a.row)}for(const[a,d]of l)a.row={...a.row},n.forEach((f,T)=>{a.row[f.field]=d[T].value()})}function b(e,r,i){if(v(r),h(i),!Array.isArray(e))throw new Error("树数据应为节点数组");const t=w(r),n=new Map,l=r.input==="flat"?$(e,r,n,t,i):M(e,r,n,t,i);return V(l,n.size,t,i)}function x(e,r,i){return b(e,r,i).map(t=>t.original)}function O(e,r,i={}){const t=b(e,r,i.signal);if(y(r,i.computed?.fields),i.computed?.fields.length){const n=s.computeDataset(t.map(l=>l.row),{...i.computed,signal:i.signal}).rows;t.forEach((l,o)=>{l.row=n[o]})}return S(t,r,w(r),i.signal),{rows:t.map(n=>n.row),entries:t.map(n=>({row:n.row,original:n.original,key:n.key,depth:n.depth,hasChildren:!!n.children.length})),leaves:t.filter(n=>!n.children.length).map(n=>n.row)}}exports.TreeRowLimitError=g;exports.createTreeTable=O;exports.flattenTreeInput=x;exports.validateTreeComputed=y;exports.validateTreeOptions=v;
|
package/dist/vue/async.d.cts
CHANGED
|
@@ -29,13 +29,42 @@ 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 AssetRenderBudget_2 {
|
|
33
|
+
/** Maximum newly rendered assets, default 1000. Existing imageData is kept unchanged. */
|
|
34
|
+
maxAssets?: number;
|
|
35
|
+
/** Maximum image payload bytes per new asset, default 32 MiB. */
|
|
36
|
+
maxImageBytes?: number;
|
|
37
|
+
/** Maximum total image payload bytes for new assets, default 128 MiB. */
|
|
38
|
+
maxTotalImageBytes?: number;
|
|
39
|
+
/** Wall-clock budget, including adapters that ignore AbortSignal. Default 30 seconds. */
|
|
40
|
+
maxDurationMs?: number;
|
|
41
|
+
}
|
|
32
42
|
declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMediaOptions {
|
|
33
43
|
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
44
|
+
/** Explicit id/version registry; unbound components continue using assetRenderers by kind. */
|
|
45
|
+
assetRegistry?: ComponentAssetRegistry;
|
|
34
46
|
assetBudget?: AssetRenderBudget;
|
|
35
47
|
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
36
48
|
assetFailure?: "throw" | "placeholder";
|
|
37
49
|
signal?: AbortSignal;
|
|
38
50
|
}
|
|
51
|
+
declare interface AssetRenderOptions_2 extends OutputDiagnosticOptions_2, ImageMediaOptions_2 {
|
|
52
|
+
assetRenderers?: Partial<Record<ImageComponentKind_2, ComponentImageRenderer_2>>;
|
|
53
|
+
/** Explicit id/version registry; unbound components continue using assetRenderers by kind. */
|
|
54
|
+
assetRegistry?: ComponentAssetRegistry_2;
|
|
55
|
+
assetBudget?: AssetRenderBudget_2;
|
|
56
|
+
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
57
|
+
assetFailure?: "throw" | "placeholder";
|
|
58
|
+
signal?: AbortSignal;
|
|
59
|
+
}
|
|
60
|
+
declare interface BrowserReportWorker {
|
|
61
|
+
postMessage(value: unknown, transfer?: Transferable[]): void;
|
|
62
|
+
terminate(): void;
|
|
63
|
+
addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
64
|
+
addEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
|
|
65
|
+
removeEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
66
|
+
removeEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
|
|
67
|
+
}
|
|
39
68
|
/** Serializable symbol settings. Encoders remain in the optional /codes entry. */
|
|
40
69
|
declare interface CodeOptions {
|
|
41
70
|
/** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
|
|
@@ -135,6 +164,14 @@ declare type ColumnFormat_3 = {
|
|
|
135
164
|
kind: "date";
|
|
136
165
|
pattern?: string;
|
|
137
166
|
};
|
|
167
|
+
declare interface ComponentAssetRegistry {
|
|
168
|
+
rendererFor(component: Readonly<PlanComponent>): ComponentImageRenderer | undefined;
|
|
169
|
+
hasExtension(id: string, version: string, kind: string): boolean;
|
|
170
|
+
}
|
|
171
|
+
declare interface ComponentAssetRegistry_2 {
|
|
172
|
+
rendererFor(component: Readonly<PlanComponent_2>): ComponentImageRenderer_2 | undefined;
|
|
173
|
+
hasExtension(id: string, version: string, kind: string): boolean;
|
|
174
|
+
}
|
|
138
175
|
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
139
176
|
declare interface ComponentBinding {
|
|
140
177
|
field: string;
|
|
@@ -166,7 +203,15 @@ declare interface ComponentImageContext {
|
|
|
166
203
|
readonly componentPath: readonly number[];
|
|
167
204
|
readonly signal: AbortSignal;
|
|
168
205
|
}
|
|
206
|
+
declare interface ComponentImageContext_2 {
|
|
207
|
+
readonly component: Readonly<PlanComponent_2>;
|
|
208
|
+
readonly pageIndex: number;
|
|
209
|
+
readonly componentIndex: number;
|
|
210
|
+
readonly componentPath: readonly number[];
|
|
211
|
+
readonly signal: AbortSignal;
|
|
212
|
+
}
|
|
169
213
|
declare type ComponentImageRenderer = (context: ComponentImageContext) => string | Promise<string>;
|
|
214
|
+
declare type ComponentImageRenderer_2 = (context: ComponentImageContext_2) => string | Promise<string>;
|
|
170
215
|
declare type ComponentKind = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
171
216
|
declare type ComponentKind_2 = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
172
217
|
declare type ComponentKind_3 = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
@@ -363,6 +408,8 @@ declare interface FormulaAdapter {
|
|
|
363
408
|
}): unknown;
|
|
364
409
|
}
|
|
365
410
|
declare interface GridCell {
|
|
411
|
+
/** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
|
|
412
|
+
richParagraphs?: RichParagraph[];
|
|
366
413
|
text?: string;
|
|
367
414
|
rawText?: string;
|
|
368
415
|
/** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
|
|
@@ -386,6 +433,8 @@ declare interface GridCell {
|
|
|
386
433
|
style?: ComponentStyle;
|
|
387
434
|
}
|
|
388
435
|
declare interface GridCell_2 {
|
|
436
|
+
/** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
|
|
437
|
+
richParagraphs?: RichParagraph_2[];
|
|
389
438
|
text?: string;
|
|
390
439
|
rawText?: string;
|
|
391
440
|
/** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
|
|
@@ -409,6 +458,8 @@ declare interface GridCell_2 {
|
|
|
409
458
|
style?: ComponentStyle_2;
|
|
410
459
|
}
|
|
411
460
|
declare interface GridCell_3 {
|
|
461
|
+
/** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
|
|
462
|
+
richParagraphs?: RichParagraph_3[];
|
|
412
463
|
text?: string;
|
|
413
464
|
rawText?: string;
|
|
414
465
|
/** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
|
|
@@ -432,6 +483,7 @@ declare interface GridCell_3 {
|
|
|
432
483
|
style?: ComponentStyle_3;
|
|
433
484
|
}
|
|
434
485
|
declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
486
|
+
declare type ImageComponentKind_2 = "image" | "chart" | "barcode" | "qrcode";
|
|
435
487
|
/** Bounded binary image inspection shared by PDF, Excel and template import. No decoder is loaded. */
|
|
436
488
|
declare interface ImageMediaOptions {
|
|
437
489
|
maxImageBytes?: number;
|
|
@@ -705,6 +757,8 @@ declare interface MachReportConfig {
|
|
|
705
757
|
}
|
|
706
758
|
/** defaults 层可配置项(全部可选,均有内置缺省) */
|
|
707
759
|
declare interface MachReportDefaults {
|
|
760
|
+
/** Small encodes stay local; optional Worker isolation uses the same prepared plan for large output. */
|
|
761
|
+
exportExecution?: ReportExportExecutionOptions;
|
|
708
762
|
drill?: ReportDrillOptions;
|
|
709
763
|
loadParamOptions?: ReportParamOptionsLoader;
|
|
710
764
|
printOptions?: ReportPrintOptions;
|
|
@@ -1012,6 +1066,40 @@ declare interface MachReportToolbarOptions {
|
|
|
1012
1066
|
/** 未传时显示全部已有出口;空数组表示不提供导出工具。 */
|
|
1013
1067
|
exportFormats?: ReportExportFormat[];
|
|
1014
1068
|
}
|
|
1069
|
+
declare interface MatrixAxisOptions {
|
|
1070
|
+
/** Display names in the same outer-to-inner order as the dimension fields. */
|
|
1071
|
+
labels?: readonly string[];
|
|
1072
|
+
/** Per-level sibling order; omitted levels retain first-seen order. */
|
|
1073
|
+
sort?: readonly MatrixDimensionOrder[];
|
|
1074
|
+
/** One-based prefix depths. Leaf depths are not subtotals. */
|
|
1075
|
+
subtotals?: readonly number[];
|
|
1076
|
+
}
|
|
1077
|
+
declare interface MatrixAxisOptions_2 {
|
|
1078
|
+
/** Display names in the same outer-to-inner order as the dimension fields. */
|
|
1079
|
+
labels?: readonly string[];
|
|
1080
|
+
/** Per-level sibling order; omitted levels retain first-seen order. */
|
|
1081
|
+
sort?: readonly MatrixDimensionOrder_2[];
|
|
1082
|
+
/** One-based prefix depths. Leaf depths are not subtotals. */
|
|
1083
|
+
subtotals?: readonly number[];
|
|
1084
|
+
}
|
|
1085
|
+
declare type MatrixDimensionOrder = "source" | "asc" | "desc";
|
|
1086
|
+
declare type MatrixDimensionOrder_2 = "source" | "asc" | "desc";
|
|
1087
|
+
declare interface MatrixHierarchyOptions {
|
|
1088
|
+
row?: MatrixAxisOptions;
|
|
1089
|
+
column?: MatrixAxisOptions;
|
|
1090
|
+
/** Only null/missing values use this label; empty strings and zero stay distinct. */
|
|
1091
|
+
emptyLabel?: string;
|
|
1092
|
+
subtotalLabel?: string;
|
|
1093
|
+
totalLabel?: string;
|
|
1094
|
+
}
|
|
1095
|
+
declare interface MatrixHierarchyOptions_2 {
|
|
1096
|
+
row?: MatrixAxisOptions_2;
|
|
1097
|
+
column?: MatrixAxisOptions_2;
|
|
1098
|
+
/** Only null/missing values use this label; empty strings and zero stay distinct. */
|
|
1099
|
+
emptyLabel?: string;
|
|
1100
|
+
subtotalLabel?: string;
|
|
1101
|
+
totalLabel?: string;
|
|
1102
|
+
}
|
|
1015
1103
|
declare interface MatrixTableOptions {
|
|
1016
1104
|
rowFields: readonly string[];
|
|
1017
1105
|
columnFields: readonly string[];
|
|
@@ -1026,6 +1114,10 @@ declare interface MatrixTableOptions {
|
|
|
1026
1114
|
maxColumns?: number;
|
|
1027
1115
|
maxInputRows?: number;
|
|
1028
1116
|
maxCells?: number;
|
|
1117
|
+
/** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
|
|
1118
|
+
hierarchy?: MatrixHierarchyOptions;
|
|
1119
|
+
/** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
|
|
1120
|
+
maxAggregateUpdates?: number;
|
|
1029
1121
|
}
|
|
1030
1122
|
declare interface MatrixTableOptions_2 {
|
|
1031
1123
|
rowFields: readonly string[];
|
|
@@ -1041,6 +1133,10 @@ declare interface MatrixTableOptions_2 {
|
|
|
1041
1133
|
maxColumns?: number;
|
|
1042
1134
|
maxInputRows?: number;
|
|
1043
1135
|
maxCells?: number;
|
|
1136
|
+
/** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
|
|
1137
|
+
hierarchy?: MatrixHierarchyOptions_2;
|
|
1138
|
+
/** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
|
|
1139
|
+
maxAggregateUpdates?: number;
|
|
1044
1140
|
}
|
|
1045
1141
|
declare interface OutputDiagnostic {
|
|
1046
1142
|
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";
|
|
@@ -1052,6 +1148,11 @@ declare interface OutputDiagnostic {
|
|
|
1052
1148
|
componentPath?: readonly number[];
|
|
1053
1149
|
kind: string;
|
|
1054
1150
|
nid?: string;
|
|
1151
|
+
/** Declarative extension identity only; no property values or business binding data enter diagnostics. */
|
|
1152
|
+
extension?: {
|
|
1153
|
+
id: string;
|
|
1154
|
+
version: string;
|
|
1155
|
+
};
|
|
1055
1156
|
message: string;
|
|
1056
1157
|
}
|
|
1057
1158
|
declare interface OutputDiagnostic_2 {
|
|
@@ -1064,6 +1165,11 @@ declare interface OutputDiagnostic_2 {
|
|
|
1064
1165
|
componentPath?: readonly number[];
|
|
1065
1166
|
kind: string;
|
|
1066
1167
|
nid?: string;
|
|
1168
|
+
/** Declarative extension identity only; no property values or business binding data enter diagnostics. */
|
|
1169
|
+
extension?: {
|
|
1170
|
+
id: string;
|
|
1171
|
+
version: string;
|
|
1172
|
+
};
|
|
1067
1173
|
message: string;
|
|
1068
1174
|
}
|
|
1069
1175
|
declare interface OutputDiagnosticOptions extends OutputTaskOptions {
|
|
@@ -1118,6 +1224,8 @@ declare interface PdfExporter {
|
|
|
1118
1224
|
}): Promise<Uint8Array>;
|
|
1119
1225
|
/** 可选轻量字体检查;旧版自定义导出函数无需实现。取消时拒绝 AbortError。 */
|
|
1120
1226
|
checkFont?: (signal?: AbortSignal) => Promise<PdfFontCheckResult>;
|
|
1227
|
+
/** Optional resource preparation for isolated encoding; custom exporters without it keep their own pipeline. */
|
|
1228
|
+
prepare?: (signal?: AbortSignal) => Promise<ReportPdfFontOptions>;
|
|
1121
1229
|
}
|
|
1122
1230
|
declare interface PdfFontCheckResult {
|
|
1123
1231
|
status: PdfFontStatus;
|
|
@@ -1606,8 +1714,36 @@ declare interface ReportEmptyState {
|
|
|
1606
1714
|
title?: string;
|
|
1607
1715
|
description?: string;
|
|
1608
1716
|
}
|
|
1717
|
+
declare interface ReportExportDecision {
|
|
1718
|
+
mode: "local" | "worker";
|
|
1719
|
+
reason: ReportExportDecisionReason;
|
|
1720
|
+
/** Lower bounds: traversal stops as soon as isolation is warranted. No font or image hashing. */
|
|
1721
|
+
estimate: {
|
|
1722
|
+
pages: number;
|
|
1723
|
+
cells: number;
|
|
1724
|
+
bytes: number;
|
|
1725
|
+
};
|
|
1726
|
+
hardCancellation: boolean;
|
|
1727
|
+
}
|
|
1728
|
+
declare type ReportExportDecisionReason = "small-task" | "threshold" | "scan-limit" | "explicit-local" | "explicit-worker" | "worker-unavailable" | "worker-start-failed" | "nonserializable-options";
|
|
1729
|
+
declare interface ReportExportExecutionOptions {
|
|
1730
|
+
mode?: "auto" | "worker" | "local";
|
|
1731
|
+
/** A fresh bundler-managed module Worker for every call; never a shared worker. */
|
|
1732
|
+
workerFactory?: () => BrowserReportWorker;
|
|
1733
|
+
thresholds?: ReportExportThresholds;
|
|
1734
|
+
/** Auto only. Startup unavailability may use local; encoding failures never retry. */
|
|
1735
|
+
fallback?: "local" | "error";
|
|
1736
|
+
timeoutMs?: number;
|
|
1737
|
+
budget?: ReportRuntimeBudget;
|
|
1738
|
+
onDecision?: (decision: ReportExportDecision) => void;
|
|
1739
|
+
}
|
|
1609
1740
|
/** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
|
|
1610
1741
|
declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
|
|
1742
|
+
declare interface ReportExportThresholds {
|
|
1743
|
+
cells?: number;
|
|
1744
|
+
pages?: number;
|
|
1745
|
+
bytes?: number;
|
|
1746
|
+
}
|
|
1611
1747
|
declare type ReportExpression = {
|
|
1612
1748
|
field: string;
|
|
1613
1749
|
} | {
|
|
@@ -1646,7 +1782,13 @@ declare interface ReportFetchInput extends ReportTaskMonitoring {
|
|
|
1646
1782
|
/** Index scopes diagnostics when reports share datasets or a report ID is repeated. */
|
|
1647
1783
|
onQueryResult?: (reportId: string, result: ReportQueryResult, reportIndex?: number) => void;
|
|
1648
1784
|
}
|
|
1649
|
-
declare
|
|
1785
|
+
declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
1786
|
+
declare interface ReportFieldCalculation {
|
|
1787
|
+
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
1788
|
+
description: string;
|
|
1789
|
+
dependsOn: readonly string[];
|
|
1790
|
+
}
|
|
1791
|
+
declare interface ReportFieldContract extends ReportFieldSemantics {
|
|
1650
1792
|
field: string;
|
|
1651
1793
|
label?: string;
|
|
1652
1794
|
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
@@ -1660,6 +1802,16 @@ declare interface ReportFieldContract {
|
|
|
1660
1802
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
1661
1803
|
unit?: string;
|
|
1662
1804
|
}
|
|
1805
|
+
declare interface ReportFieldSemantics {
|
|
1806
|
+
description?: string;
|
|
1807
|
+
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
1808
|
+
missingMeaning?: string;
|
|
1809
|
+
/** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
|
|
1810
|
+
aggregation?: ReportFieldAggregation;
|
|
1811
|
+
/** Shared presentation only; raw values and calculation precision remain unchanged. */
|
|
1812
|
+
format?: ColumnFormat;
|
|
1813
|
+
calculation?: ReportFieldCalculation;
|
|
1814
|
+
}
|
|
1663
1815
|
declare interface ReportFieldTarget {
|
|
1664
1816
|
field: string;
|
|
1665
1817
|
datasetId?: string;
|
|
@@ -1787,6 +1939,17 @@ declare interface ReportParamOptionsMessages {
|
|
|
1787
1939
|
paramOptionsDependencies?: string;
|
|
1788
1940
|
paramOptionsClear?: string;
|
|
1789
1941
|
}
|
|
1942
|
+
/** Licensed local font bytes; never downloaded implicitly by the runtime. */
|
|
1943
|
+
declare interface ReportPdfFontOptions {
|
|
1944
|
+
customFontBytes?: Uint8Array | ArrayBuffer;
|
|
1945
|
+
customFontName?: string;
|
|
1946
|
+
customFontFaces?: {
|
|
1947
|
+
regular: Uint8Array | ArrayBuffer;
|
|
1948
|
+
bold?: Uint8Array | ArrayBuffer;
|
|
1949
|
+
italic?: Uint8Array | ArrayBuffer;
|
|
1950
|
+
boldItalic?: Uint8Array | ArrayBuffer;
|
|
1951
|
+
};
|
|
1952
|
+
}
|
|
1790
1953
|
declare interface ReportPreferencesAdapter {
|
|
1791
1954
|
load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
|
|
1792
1955
|
save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
|
|
@@ -1878,6 +2041,15 @@ declare interface ReportQueryResult {
|
|
|
1878
2041
|
diagnostics?: ReportDiagnostic[];
|
|
1879
2042
|
}
|
|
1880
2043
|
declare type ReportRegistry = Record<string, ReportDefinition>;
|
|
2044
|
+
declare interface ReportRuntimeBudget {
|
|
2045
|
+
maxRows?: number;
|
|
2046
|
+
maxPages?: number;
|
|
2047
|
+
maxCells?: number;
|
|
2048
|
+
maxOutputBytes?: number;
|
|
2049
|
+
/** Bound the plain JSON snapshot accepted by exportPrepared (default 64 MB). */
|
|
2050
|
+
maxPreparedBytes?: number;
|
|
2051
|
+
maxDurationMs?: number;
|
|
2052
|
+
}
|
|
1881
2053
|
declare interface ReportSaveInput extends ReportLoadContext {
|
|
1882
2054
|
requestId: string;
|
|
1883
2055
|
expectedRevision?: string;
|
|
@@ -2136,7 +2308,7 @@ declare type XlsxImageOptions = ImageMediaOptions_2;
|
|
|
2136
2308
|
* 目标是"财务能直接用的对账表"而非复刻版面)
|
|
2137
2309
|
* - 原生 richText 保留基础字形;未支持组件、段落专有排版与单元格嵌套组件计入 diagnostics / warnings
|
|
2138
2310
|
*/
|
|
2139
|
-
declare interface XlsxRenderOptions extends
|
|
2311
|
+
declare interface XlsxRenderOptions extends AssetRenderOptions_2, XlsxImageOptions {
|
|
2140
2312
|
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|
|
2141
2313
|
sheetName?: (sheetIndex: number) => string;
|
|
2142
2314
|
/** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
|