@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
package/dist/server.d.cts
CHANGED
|
@@ -8,8 +8,20 @@ declare interface AggregateDefinition {
|
|
|
8
8
|
digits?: number;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
declare interface AggregateDefinition_2 {
|
|
12
|
+
/** Output column; valueField defaults to this field. */
|
|
13
|
+
field: string;
|
|
14
|
+
op: AggregateOperation_2;
|
|
15
|
+
valueField?: string;
|
|
16
|
+
weightField?: string;
|
|
17
|
+
numeric?: "number" | "decimal";
|
|
18
|
+
digits?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
declare type AggregateOperation = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
|
|
12
22
|
|
|
23
|
+
declare type AggregateOperation_2 = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
|
|
24
|
+
|
|
13
25
|
declare interface AssetRenderBudget {
|
|
14
26
|
/** Maximum newly rendered assets, default 1000. Existing imageData is kept unchanged. */
|
|
15
27
|
maxAssets?: number;
|
|
@@ -21,7 +33,7 @@ declare interface AssetRenderBudget {
|
|
|
21
33
|
maxDurationMs?: number;
|
|
22
34
|
}
|
|
23
35
|
|
|
24
|
-
declare interface AssetRenderOptions extends OutputDiagnosticOptions {
|
|
36
|
+
declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMediaOptions {
|
|
25
37
|
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
26
38
|
assetBudget?: AssetRenderBudget;
|
|
27
39
|
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
@@ -47,6 +59,18 @@ declare interface CodeOptions {
|
|
|
47
59
|
showText?: boolean;
|
|
48
60
|
}
|
|
49
61
|
|
|
62
|
+
/** Serializable symbol settings. Encoders remain in the optional /codes entry. */
|
|
63
|
+
declare interface CodeOptions_2 {
|
|
64
|
+
/** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
|
|
65
|
+
value?: string;
|
|
66
|
+
symbology?: "code128" | "code39" | "ean13" | "ean8";
|
|
67
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
68
|
+
/** White modules around a symbol: QR >=4, linear >=10, EAN >=11. */
|
|
69
|
+
quietZoneModules?: number;
|
|
70
|
+
/** Human-readable content below a linear barcode. */
|
|
71
|
+
showText?: boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
50
74
|
/**
|
|
51
75
|
* 列值格式化(声明式、JSON 可序列化)。
|
|
52
76
|
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
@@ -70,6 +94,29 @@ declare type ColumnFormat = {
|
|
|
70
94
|
pattern?: string;
|
|
71
95
|
};
|
|
72
96
|
|
|
97
|
+
/**
|
|
98
|
+
* 列值格式化(声明式、JSON 可序列化)。
|
|
99
|
+
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
100
|
+
* 三后端(DOM/Canvas/PDF)零改动。
|
|
101
|
+
*
|
|
102
|
+
* 语义约定(v0.9 固化):
|
|
103
|
+
* - number.digits 显式给出 → 精确保留(12.5 + digits:2 → "12.50")
|
|
104
|
+
* - number.thousands 默认 false(千分位显式开启)
|
|
105
|
+
* - date 字符串按"本地时区的日历日"解析(YYYY-MM-DD / YYYY/MM/DD 直取年月日,
|
|
106
|
+
* 不经 Date 字符串构造——后者按 UTC 零点,负时区环境会少一天)
|
|
107
|
+
*/
|
|
108
|
+
declare type ColumnFormat_2 = {
|
|
109
|
+
kind: "number";
|
|
110
|
+
thousands?: boolean;
|
|
111
|
+
digits?: number;
|
|
112
|
+
} | {
|
|
113
|
+
kind: "percent";
|
|
114
|
+
digits?: number;
|
|
115
|
+
} | {
|
|
116
|
+
kind: "date";
|
|
117
|
+
pattern?: string;
|
|
118
|
+
};
|
|
119
|
+
|
|
73
120
|
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
74
121
|
declare interface ComponentBinding {
|
|
75
122
|
field: string;
|
|
@@ -79,6 +126,15 @@ declare interface ComponentBinding {
|
|
|
79
126
|
emptyText?: string;
|
|
80
127
|
}
|
|
81
128
|
|
|
129
|
+
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
130
|
+
declare interface ComponentBinding_2 {
|
|
131
|
+
field: string;
|
|
132
|
+
format?: ValueFormat_2;
|
|
133
|
+
prefix?: string;
|
|
134
|
+
suffix?: string;
|
|
135
|
+
emptyText?: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
82
138
|
declare interface ComponentImageContext {
|
|
83
139
|
readonly component: Readonly<PlanComponent>;
|
|
84
140
|
readonly pageIndex: number;
|
|
@@ -91,6 +147,8 @@ declare type ComponentImageRenderer = (context: ComponentImageContext) => string
|
|
|
91
147
|
|
|
92
148
|
declare type ComponentKind = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
93
149
|
|
|
150
|
+
declare type ComponentKind_2 = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
151
|
+
|
|
94
152
|
declare interface ComponentStyle {
|
|
95
153
|
fontSizePx?: number;
|
|
96
154
|
fontSize?: number;
|
|
@@ -115,6 +173,30 @@ declare interface ComponentStyle {
|
|
|
115
173
|
rotateDeg?: number;
|
|
116
174
|
}
|
|
117
175
|
|
|
176
|
+
declare interface ComponentStyle_2 {
|
|
177
|
+
fontSizePx?: number;
|
|
178
|
+
fontSize?: number;
|
|
179
|
+
fontFamily?: string;
|
|
180
|
+
bold?: boolean;
|
|
181
|
+
italic?: boolean;
|
|
182
|
+
underline?: boolean;
|
|
183
|
+
color?: string;
|
|
184
|
+
backgroundColor?: string;
|
|
185
|
+
align?: "left" | "center" | "right" | "justify";
|
|
186
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
187
|
+
lineColor?: string;
|
|
188
|
+
borderColor?: string;
|
|
189
|
+
lineWidthPt?: number;
|
|
190
|
+
borderTop?: boolean;
|
|
191
|
+
borderRight?: boolean;
|
|
192
|
+
borderBottom?: boolean;
|
|
193
|
+
borderLeft?: boolean;
|
|
194
|
+
lineHeight?: number;
|
|
195
|
+
letterSpacing?: number;
|
|
196
|
+
opacity?: number;
|
|
197
|
+
rotateDeg?: number;
|
|
198
|
+
}
|
|
199
|
+
|
|
118
200
|
declare interface ComputedField extends ExpressionOptions {
|
|
119
201
|
field: string;
|
|
120
202
|
expression: ReportExpression | string;
|
|
@@ -125,6 +207,23 @@ declare interface ComputedField extends ExpressionOptions {
|
|
|
125
207
|
dependsOn?: readonly string[];
|
|
126
208
|
}
|
|
127
209
|
|
|
210
|
+
declare interface ComputedField_2 extends ExpressionOptions_2 {
|
|
211
|
+
field: string;
|
|
212
|
+
expression: ReportExpression_2 | string;
|
|
213
|
+
/** Scope controls aggregate inputs; row expressions may reference the current row in any scope. */
|
|
214
|
+
scope?: "row" | "group" | "dataset";
|
|
215
|
+
groupBy?: readonly string[];
|
|
216
|
+
/** String adapter expressions cannot be inspected; declare dependencies explicitly. */
|
|
217
|
+
dependsOn?: readonly string[];
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export declare function createManagerTemplateCatalog(manager: ReportTemplateManager, metadata?: (document: ReportTemplateDocument) => Pick<LocalTemplateCatalogItem, "category" | "tags">): ReportTemplateCatalogProvider;
|
|
221
|
+
|
|
222
|
+
/** Session-local intents; durable hosts should supply their own authorized stable IDs. */
|
|
223
|
+
export declare function createMemoryReportInstanceIds(maximum?: number): {
|
|
224
|
+
forCase(templateId: string, caseId: string): string;
|
|
225
|
+
};
|
|
226
|
+
|
|
128
227
|
/** Bounded reference store for tests/local sessions. Production hosts implement durable transactional CAS. */
|
|
129
228
|
export declare function createMemoryReportInstanceStore(options?: MemoryReportInstanceStoreOptions): ReportInstanceStore;
|
|
130
229
|
|
|
@@ -180,6 +279,31 @@ export declare function createReportTaskQueue(options?: {
|
|
|
180
279
|
maxQueued?: number;
|
|
181
280
|
}): ReportTaskQueue;
|
|
182
281
|
|
|
282
|
+
/** Export explicitly selected metadata/samples; external resource bytes stay in host-managed storage. */
|
|
283
|
+
export declare function createReportTemplatePackage(input: Omit<ReportTemplatePackage, "schemaVersion" | "resources" | "minimumVersion"> & {
|
|
284
|
+
resources?: ReportPackageResource[];
|
|
285
|
+
minimumVersion?: string;
|
|
286
|
+
}, options?: ReportTemplatePackageOptions): ReportTemplatePackage;
|
|
287
|
+
|
|
288
|
+
/** Optional package-owned catalog → draft publication → immutable batch/instance wiring. */
|
|
289
|
+
export declare function createReportWorkflow(options: ReportWorkflowOptions): {
|
|
290
|
+
catalog: ReportTemplateCatalogProvider;
|
|
291
|
+
publish: (input: ReportWorkflowPublishInput) => Promise<ReportTemplateRecord_2>;
|
|
292
|
+
/** Resolve only a manager-owned publication, then keep that exact revision for this batch. */
|
|
293
|
+
batch(id: string, request?: {
|
|
294
|
+
expectedRevision?: string;
|
|
295
|
+
signal?: AbortSignal;
|
|
296
|
+
}): Promise<{
|
|
297
|
+
document: ReportTemplateDocument;
|
|
298
|
+
execute(item: ReportBatchCase, { signal }: {
|
|
299
|
+
signal?: AbortSignal;
|
|
300
|
+
}): Promise<{
|
|
301
|
+
instanceId: string;
|
|
302
|
+
label: string;
|
|
303
|
+
}>;
|
|
304
|
+
}>;
|
|
305
|
+
};
|
|
306
|
+
|
|
183
307
|
declare interface DatasetContract {
|
|
184
308
|
fields: readonly ReportFieldContract[];
|
|
185
309
|
rowKey?: string;
|
|
@@ -201,6 +325,13 @@ declare interface ExpressionOptions {
|
|
|
201
325
|
divisionByZero?: "null" | "error";
|
|
202
326
|
}
|
|
203
327
|
|
|
328
|
+
declare interface ExpressionOptions_2 {
|
|
329
|
+
numeric?: "number" | "decimal";
|
|
330
|
+
digits?: number;
|
|
331
|
+
nulls?: "propagate" | "error";
|
|
332
|
+
divisionByZero?: "null" | "error";
|
|
333
|
+
}
|
|
334
|
+
|
|
204
335
|
declare interface FormulaAdapter {
|
|
205
336
|
/** Explicit trusted engine; core never evaluates source code/macros/external workbook references. */
|
|
206
337
|
evaluate(expression: string, context: {
|
|
@@ -234,8 +365,45 @@ declare interface GridCell {
|
|
|
234
365
|
style?: ComponentStyle;
|
|
235
366
|
}
|
|
236
367
|
|
|
368
|
+
declare interface GridCell_2 {
|
|
369
|
+
text?: string;
|
|
370
|
+
rawText?: string;
|
|
371
|
+
/** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
|
|
372
|
+
value?: string | number | boolean | null;
|
|
373
|
+
/** Excel 数字格式(例如 #,##0.00 / 0.00%),不改变 text。 */
|
|
374
|
+
numberFormat?: string;
|
|
375
|
+
/** Physical left inset for hierarchical labels; raw value stays unchanged. */
|
|
376
|
+
indentMm?: number;
|
|
377
|
+
/** 编辑输入类型;省略时只按原始值推断,数字字符串不会被转换为数值。 */
|
|
378
|
+
valueType?: "text" | "number" | "boolean";
|
|
379
|
+
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
380
|
+
editable?: boolean;
|
|
381
|
+
source?: ReportCellSource_2;
|
|
382
|
+
/** SDK 派生结果不映射业务来源,始终只读(包括覆盖同名源字段的计算)。 */
|
|
383
|
+
derived?: boolean;
|
|
384
|
+
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
385
|
+
formula?: string;
|
|
386
|
+
children?: PlanComponent_2[];
|
|
387
|
+
colSpan?: number;
|
|
388
|
+
rowSpan?: number;
|
|
389
|
+
style?: ComponentStyle_2;
|
|
390
|
+
}
|
|
391
|
+
|
|
237
392
|
declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
238
393
|
|
|
394
|
+
/** Bounded binary image inspection shared by PDF, Excel and template import. No decoder is loaded. */
|
|
395
|
+
declare interface ImageMediaOptions {
|
|
396
|
+
maxImageBytes?: number;
|
|
397
|
+
maxTotalImageBytes?: number;
|
|
398
|
+
maxImages?: number;
|
|
399
|
+
/** Decoded pixels per unique image, default 16 million. */
|
|
400
|
+
maxImagePixels?: number;
|
|
401
|
+
/** Total decoded pixels for unique media, default 64 million. */
|
|
402
|
+
maxTotalImagePixels?: number;
|
|
403
|
+
/** Maximum source dimension, default 16384 pixels. */
|
|
404
|
+
maxImageDimension?: number;
|
|
405
|
+
}
|
|
406
|
+
|
|
239
407
|
export declare interface LabelStreamContext {
|
|
240
408
|
index: number;
|
|
241
409
|
rowOffset: number;
|
|
@@ -282,6 +450,9 @@ export declare interface LabelStreamReceipt {
|
|
|
282
450
|
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
283
451
|
declare type ListAlignment = NonNullable<ComponentStyle["align"]> | "auto";
|
|
284
452
|
|
|
453
|
+
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
454
|
+
declare type ListAlignment_2 = NonNullable<ComponentStyle_2["align"]> | "auto";
|
|
455
|
+
|
|
285
456
|
declare interface ListColumn {
|
|
286
457
|
header: string;
|
|
287
458
|
field: string;
|
|
@@ -308,6 +479,32 @@ declare interface ListColumn {
|
|
|
308
479
|
visibleWhen?: StyleRule["when"];
|
|
309
480
|
}
|
|
310
481
|
|
|
482
|
+
declare interface ListColumn_2 {
|
|
483
|
+
header: string;
|
|
484
|
+
field: string;
|
|
485
|
+
widthMm: number;
|
|
486
|
+
style?: ComponentStyle_2;
|
|
487
|
+
/** 内容对齐,优先于 style.align;数值字符串不会自动判为数字。 */
|
|
488
|
+
align?: ListAlignment_2;
|
|
489
|
+
/** 独立的表头对齐,不改变内容对齐。 */
|
|
490
|
+
headerAlign?: ComponentStyle_2["align"];
|
|
491
|
+
/** 独立的表头样式,优先于列表级表头样式。 */
|
|
492
|
+
headerStyle?: ComponentStyle_2;
|
|
493
|
+
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
494
|
+
format?: ColumnFormat_2;
|
|
495
|
+
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
496
|
+
rules?: StyleRule_2[];
|
|
497
|
+
/** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
|
|
498
|
+
editable?: boolean;
|
|
499
|
+
/** 空值列或特殊数据类型可显式声明编辑输入类型。 */
|
|
500
|
+
valueType?: GridCell_2["valueType"];
|
|
501
|
+
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
502
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
503
|
+
hidden?: boolean;
|
|
504
|
+
/** Condition hides cell content, preserving its physical layout in preview and exports. */
|
|
505
|
+
visibleWhen?: StyleRule_2["when"];
|
|
506
|
+
}
|
|
507
|
+
|
|
311
508
|
declare interface ListComponent {
|
|
312
509
|
kind: "list";
|
|
313
510
|
/** Opaque serializable layout annotations; interpreted only by explicit optional adapters. */
|
|
@@ -361,6 +558,59 @@ declare interface ListComponent {
|
|
|
361
558
|
grandTotal?: ListGrandTotal;
|
|
362
559
|
}
|
|
363
560
|
|
|
561
|
+
declare interface ListComponent_2 {
|
|
562
|
+
kind: "list";
|
|
563
|
+
/** Opaque serializable layout annotations; interpreted only by explicit optional adapters. */
|
|
564
|
+
meta?: Record<string, unknown>;
|
|
565
|
+
id?: string;
|
|
566
|
+
/** 宽表标记用于连续 Excel;不改变低层列表的列宽和分页算法。 */
|
|
567
|
+
layout?: "page" | "wide";
|
|
568
|
+
/** 逻辑表名称,供 Excel Sheet 命名;不额外生成标题组件。 */
|
|
569
|
+
title?: string;
|
|
570
|
+
leftMm: number;
|
|
571
|
+
topMm: number;
|
|
572
|
+
widthMm: number;
|
|
573
|
+
dataset: string;
|
|
574
|
+
/** Headerless record/region bindings do not allocate a synthetic list header. */
|
|
575
|
+
header?: boolean;
|
|
576
|
+
/** A fixed record region rejects multiple rows instead of dropping source data. */
|
|
577
|
+
cardinality?: "record";
|
|
578
|
+
/** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
|
|
579
|
+
rowKey?: string;
|
|
580
|
+
revisionField?: string;
|
|
581
|
+
sourceTokenField?: string;
|
|
582
|
+
columns: ListColumn_2[];
|
|
583
|
+
fontSizePt?: number;
|
|
584
|
+
headerBold?: boolean;
|
|
585
|
+
rowHeightMm?: number;
|
|
586
|
+
paddingMm?: number;
|
|
587
|
+
headerEveryPage?: boolean;
|
|
588
|
+
headerBackgroundColor?: string;
|
|
589
|
+
/** 内容默认对齐,列配置可覆盖;低层模板缺省仍为 left。 */
|
|
590
|
+
align?: ListAlignment_2;
|
|
591
|
+
/** 表头默认对齐,列配置可覆盖。 */
|
|
592
|
+
headerAlign?: ComponentStyle_2["align"];
|
|
593
|
+
headerStyle?: ComponentStyle_2;
|
|
594
|
+
/** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
|
|
595
|
+
headerGrid?: PlanGrid_2;
|
|
596
|
+
border?: boolean;
|
|
597
|
+
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
598
|
+
groupBy?: ListGroupBy_2;
|
|
599
|
+
/** Ordered outer-to-inner grouping; groupBy remains the single-level shorthand. */
|
|
600
|
+
groups?: ListGroupBy_2[];
|
|
601
|
+
computed?: ComputedField_2[];
|
|
602
|
+
/** Dynamic pivot of the current source dataset, with read-only derived identities. */
|
|
603
|
+
matrix?: MatrixTableOptions_2;
|
|
604
|
+
/** Full ordered hierarchy; source parent values and descendant-leaf rollups are explicit. */
|
|
605
|
+
tree?: TreeTableOptions_2;
|
|
606
|
+
/** Explicit row visibility; hidden rows do not participate in summaries. */
|
|
607
|
+
rowVisibleWhen?: StyleRule_2["when"];
|
|
608
|
+
/** Master/detail relation is keyed by business identity, never by display row index. */
|
|
609
|
+
detail?: ListDetail_2;
|
|
610
|
+
/** 末尾总合计行(依赖 groupBy.subtotal 或显式 fields) */
|
|
611
|
+
grandTotal?: ListGrandTotal_2;
|
|
612
|
+
}
|
|
613
|
+
|
|
364
614
|
declare interface ListDetail {
|
|
365
615
|
dataset: string;
|
|
366
616
|
parentKey: string;
|
|
@@ -377,6 +627,22 @@ declare interface ListDetail {
|
|
|
377
627
|
unmatched?: "error" | "ignore";
|
|
378
628
|
}
|
|
379
629
|
|
|
630
|
+
declare interface ListDetail_2 {
|
|
631
|
+
dataset: string;
|
|
632
|
+
parentKey: string;
|
|
633
|
+
foreignKey: string;
|
|
634
|
+
rowKey?: string;
|
|
635
|
+
/** 子表独立的并发契约;省略时不继承主表字段。 */
|
|
636
|
+
revisionField?: string;
|
|
637
|
+
sourceTokenField?: string;
|
|
638
|
+
columns: ListColumn_2[];
|
|
639
|
+
rowHeightMm?: number;
|
|
640
|
+
header?: boolean;
|
|
641
|
+
label?: string;
|
|
642
|
+
/** Unmatched children fail by default; opt-in ignore is explicit. */
|
|
643
|
+
unmatched?: "error" | "ignore";
|
|
644
|
+
}
|
|
645
|
+
|
|
380
646
|
declare type ListGrandTotal = boolean | {
|
|
381
647
|
label?: string;
|
|
382
648
|
style?: ComponentStyle;
|
|
@@ -385,6 +651,14 @@ declare type ListGrandTotal = boolean | {
|
|
|
385
651
|
aggregates?: AggregateDefinition[];
|
|
386
652
|
};
|
|
387
653
|
|
|
654
|
+
declare type ListGrandTotal_2 = boolean | {
|
|
655
|
+
label?: string;
|
|
656
|
+
style?: ComponentStyle_2;
|
|
657
|
+
/** 合计列(缺省沿用 groupBy.subtotal) */
|
|
658
|
+
fields?: string[];
|
|
659
|
+
aggregates?: AggregateDefinition_2[];
|
|
660
|
+
};
|
|
661
|
+
|
|
388
662
|
/** 分组小计配置(声明式,见 ListComponent.groupBy) */
|
|
389
663
|
declare interface ListGroupBy {
|
|
390
664
|
/** 分组字段(值变化即切组) */
|
|
@@ -403,6 +677,34 @@ declare interface ListGroupBy {
|
|
|
403
677
|
repeatHeader?: boolean;
|
|
404
678
|
}
|
|
405
679
|
|
|
680
|
+
/** 分组小计配置(声明式,见 ListComponent.groupBy) */
|
|
681
|
+
declare interface ListGroupBy_2 {
|
|
682
|
+
/** 分组字段(值变化即切组) */
|
|
683
|
+
field: string;
|
|
684
|
+
/** 组头文案模板,{value} 占位(默认 "{value}") */
|
|
685
|
+
headerTemplate?: string;
|
|
686
|
+
headerStyle?: ComponentStyle_2;
|
|
687
|
+
/** 需要小计的列字段(组尾输出合计行;数值列求和,其余输出首值/留空) */
|
|
688
|
+
subtotal?: string[];
|
|
689
|
+
subtotalStyle?: ComponentStyle_2;
|
|
690
|
+
subtotalLabel?: string;
|
|
691
|
+
/** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
|
|
692
|
+
keepWithNext?: boolean;
|
|
693
|
+
aggregates?: AggregateDefinition_2[];
|
|
694
|
+
/** Repeat this group heading after page breaks within the group. */
|
|
695
|
+
repeatHeader?: boolean;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
declare interface LocalTemplateCatalogItem {
|
|
699
|
+
/** Editable document: prefer the latest draft; otherwise use the published document. */
|
|
700
|
+
document: ReportTemplateDocument;
|
|
701
|
+
published?: ReportTemplateDocument;
|
|
702
|
+
draftRevision?: string;
|
|
703
|
+
publishedRevision?: string;
|
|
704
|
+
category?: string;
|
|
705
|
+
tags?: string[];
|
|
706
|
+
}
|
|
707
|
+
|
|
406
708
|
declare interface MatrixTableOptions {
|
|
407
709
|
rowFields: readonly string[];
|
|
408
710
|
columnFields: readonly string[];
|
|
@@ -419,6 +721,22 @@ declare interface MatrixTableOptions {
|
|
|
419
721
|
maxCells?: number;
|
|
420
722
|
}
|
|
421
723
|
|
|
724
|
+
declare interface MatrixTableOptions_2 {
|
|
725
|
+
rowFields: readonly string[];
|
|
726
|
+
columnFields: readonly string[];
|
|
727
|
+
measures: readonly (AggregateDefinition_2 & {
|
|
728
|
+
label?: string;
|
|
729
|
+
})[];
|
|
730
|
+
totals?: boolean;
|
|
731
|
+
rowHeader?: string;
|
|
732
|
+
columnWidthMm?: number;
|
|
733
|
+
rowWidthMm?: number;
|
|
734
|
+
maxRows?: number;
|
|
735
|
+
maxColumns?: number;
|
|
736
|
+
maxInputRows?: number;
|
|
737
|
+
maxCells?: number;
|
|
738
|
+
}
|
|
739
|
+
|
|
422
740
|
export declare interface MemoryReportInstanceStoreOptions {
|
|
423
741
|
maxInstances?: number;
|
|
424
742
|
maxRevisions?: number;
|
|
@@ -427,7 +745,7 @@ export declare interface MemoryReportInstanceStoreOptions {
|
|
|
427
745
|
}
|
|
428
746
|
|
|
429
747
|
declare interface OutputDiagnostic {
|
|
430
|
-
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";
|
|
748
|
+
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";
|
|
431
749
|
severity: "warning";
|
|
432
750
|
format: OutputFormat;
|
|
433
751
|
pageIndex: number;
|
|
@@ -471,6 +789,9 @@ declare interface PaginateOptions {
|
|
|
471
789
|
formula?: FormulaAdapter;
|
|
472
790
|
}
|
|
473
791
|
|
|
792
|
+
/** Parse a bounded manifest without network access, code execution, registration or publication. */
|
|
793
|
+
export declare function parseReportTemplatePackage(input: unknown, options?: ReportTemplatePackageOptions): ReportTemplatePackage;
|
|
794
|
+
|
|
474
795
|
declare interface PlanComponent {
|
|
475
796
|
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
476
797
|
code?: CodeOptions;
|
|
@@ -500,6 +821,35 @@ declare interface PlanComponent {
|
|
|
500
821
|
fallbackText?: string;
|
|
501
822
|
}
|
|
502
823
|
|
|
824
|
+
declare interface PlanComponent_2 {
|
|
825
|
+
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
826
|
+
code?: CodeOptions_2;
|
|
827
|
+
/** Template-only binding; resolved and removed before constructing the output plan. */
|
|
828
|
+
binding?: ComponentBinding_2;
|
|
829
|
+
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
830
|
+
pageAnchor?: "header" | "footer";
|
|
831
|
+
kind: ComponentKind_2;
|
|
832
|
+
leftMm: number;
|
|
833
|
+
topMm: number;
|
|
834
|
+
widthMm: number;
|
|
835
|
+
heightMm: number;
|
|
836
|
+
nid?: string;
|
|
837
|
+
rkey?: string;
|
|
838
|
+
text?: string;
|
|
839
|
+
rawText?: string;
|
|
840
|
+
lines?: string[];
|
|
841
|
+
richParagraphs?: RichParagraph_2[];
|
|
842
|
+
imageData?: string;
|
|
843
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
844
|
+
lineDirection?: "down" | "up";
|
|
845
|
+
grid?: PlanGrid_2;
|
|
846
|
+
table?: PlanTableFragment_2;
|
|
847
|
+
style?: ComponentStyle_2;
|
|
848
|
+
meta?: Record<string, unknown>;
|
|
849
|
+
/** MachReport 扩展字段:未知 kind 的兜底渲染标记 */
|
|
850
|
+
fallbackText?: string;
|
|
851
|
+
}
|
|
852
|
+
|
|
503
853
|
declare interface PlanGrid {
|
|
504
854
|
/** 行内允许 null 空位;渲染器按空单元格处理 */
|
|
505
855
|
cells: (GridCell | null)[][];
|
|
@@ -510,6 +860,16 @@ declare interface PlanGrid {
|
|
|
510
860
|
paddingMm?: number;
|
|
511
861
|
}
|
|
512
862
|
|
|
863
|
+
declare interface PlanGrid_2 {
|
|
864
|
+
/** 行内允许 null 空位;渲染器按空单元格处理 */
|
|
865
|
+
cells: (GridCell_2 | null)[][];
|
|
866
|
+
colWidthsMm?: number[];
|
|
867
|
+
rowHeightsMm?: number[];
|
|
868
|
+
gapMm?: number;
|
|
869
|
+
/** 单元格四边内距;旧静态网格默认 0.5mm,分页列表使用其真实测量内距。 */
|
|
870
|
+
paddingMm?: number;
|
|
871
|
+
}
|
|
872
|
+
|
|
513
873
|
declare interface PlanPage {
|
|
514
874
|
meta?: Record<string, unknown>;
|
|
515
875
|
/** wide 表示完整自然列宽;页面仅为预览的垂直窗口分段。 */
|
|
@@ -540,6 +900,23 @@ declare interface PlanTableFragment {
|
|
|
540
900
|
};
|
|
541
901
|
}
|
|
542
902
|
|
|
903
|
+
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
904
|
+
declare interface PlanTableFragment_2 {
|
|
905
|
+
/** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
|
|
906
|
+
id: string;
|
|
907
|
+
/** 表头固定 -1;其余行(包括组头/小计/总计)从 0 连续递增。 */
|
|
908
|
+
rowIndex: number;
|
|
909
|
+
role: "header" | "body" | "group-header" | "subtotal" | "grand-total";
|
|
910
|
+
/** 按物理列顺序保存字段身份;不以表头显示文本判断列结构。 */
|
|
911
|
+
columnKeys: string[];
|
|
912
|
+
layout?: "page" | "wide";
|
|
913
|
+
title?: string;
|
|
914
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
915
|
+
source?: Omit<ReportCellSource_2, "field" | "rowKey"> & {
|
|
916
|
+
rowKey?: string | number;
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
|
|
543
920
|
export declare interface PreparedReport {
|
|
544
921
|
plan: RenderPlan;
|
|
545
922
|
diagnostics: ReportDiagnostic[];
|
|
@@ -548,6 +925,8 @@ export declare interface PreparedReport {
|
|
|
548
925
|
revision?: string;
|
|
549
926
|
sourceToken?: string;
|
|
550
927
|
}>;
|
|
928
|
+
/** Ordered occurrences; legacy revisions remains last-value-by-ID for compatibility. */
|
|
929
|
+
sources?: ReportRuntimeSource[];
|
|
551
930
|
/** Captured metrics identity; absence on old saved instances remains supported with diagnostics. */
|
|
552
931
|
layout?: {
|
|
553
932
|
textMetrics: "heuristic" | "provided" | "font-bytes";
|
|
@@ -621,6 +1000,19 @@ declare interface ReportCellEdit {
|
|
|
621
1000
|
|
|
622
1001
|
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
623
1002
|
declare interface ReportCellSource {
|
|
1003
|
+
/** Source identity across report occurrences; sharing must be explicitly declared. */
|
|
1004
|
+
sourceScope?: string;
|
|
1005
|
+
datasetId: string;
|
|
1006
|
+
rowKey: string | number;
|
|
1007
|
+
field: string;
|
|
1008
|
+
revision?: string | number;
|
|
1009
|
+
sourceToken?: string;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1013
|
+
declare interface ReportCellSource_2 {
|
|
1014
|
+
/** Source identity across report occurrences; sharing must be explicitly declared. */
|
|
1015
|
+
sourceScope?: string;
|
|
624
1016
|
datasetId: string;
|
|
625
1017
|
rowKey: string | number;
|
|
626
1018
|
field: string;
|
|
@@ -644,9 +1036,13 @@ declare interface ReportDataTarget {
|
|
|
644
1036
|
rowKey?: string | number;
|
|
645
1037
|
/** Use table identity when the same dataset appears in several tables. */
|
|
646
1038
|
tableId?: string;
|
|
1039
|
+
/** Assigned by the source/runtime when several reports share dataset names. */
|
|
1040
|
+
reportScope?: string;
|
|
647
1041
|
}
|
|
648
1042
|
|
|
649
1043
|
declare interface ReportDefinition {
|
|
1044
|
+
/** Explicitly shared editable data identity. Omit to isolate each report occurrence. */
|
|
1045
|
+
sourceScope?: string;
|
|
650
1046
|
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
651
1047
|
template: ReportTemplate | ReportTemplateLoader;
|
|
652
1048
|
/** 静态数据;load 存在时优先使用 load 的结果。 */
|
|
@@ -698,6 +1094,19 @@ declare type ReportExpression = {
|
|
|
698
1094
|
args: readonly ReportExpression[];
|
|
699
1095
|
};
|
|
700
1096
|
|
|
1097
|
+
declare type ReportExpression_2 = {
|
|
1098
|
+
field: string;
|
|
1099
|
+
} | {
|
|
1100
|
+
value: string | number | boolean | null;
|
|
1101
|
+
} | {
|
|
1102
|
+
aggregate: AggregateOperation_2;
|
|
1103
|
+
field?: string;
|
|
1104
|
+
weightField?: string;
|
|
1105
|
+
} | {
|
|
1106
|
+
op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
|
|
1107
|
+
args: readonly ReportExpression_2[];
|
|
1108
|
+
};
|
|
1109
|
+
|
|
701
1110
|
declare interface ReportFieldContract {
|
|
702
1111
|
field: string;
|
|
703
1112
|
label?: string;
|
|
@@ -721,6 +1130,14 @@ declare interface ReportFlowBand {
|
|
|
721
1130
|
heightMm: number;
|
|
722
1131
|
}
|
|
723
1132
|
|
|
1133
|
+
declare interface ReportFlowBand_2 {
|
|
1134
|
+
/** Exact stable component IDs. Static components use nid, lists use id. */
|
|
1135
|
+
componentIds: string[];
|
|
1136
|
+
/** Source-template coordinates; following bands keep their original gap. */
|
|
1137
|
+
topMm: number;
|
|
1138
|
+
heightMm: number;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
724
1141
|
export declare interface ReportGenerationInput {
|
|
725
1142
|
scope: string;
|
|
726
1143
|
id: string;
|
|
@@ -771,7 +1188,9 @@ export declare interface ReportInstanceSnapshot {
|
|
|
771
1188
|
sourceRevisions: Record<string, string>;
|
|
772
1189
|
plan: RenderPlan;
|
|
773
1190
|
/** Exact generation diagnostics, row statistics and font metrics; optional for legacy instances. */
|
|
774
|
-
output?: Omit<PreparedReport, "plan" | "revisions"
|
|
1191
|
+
output?: Omit<PreparedReport, "plan" | "revisions" | "sources"> & {
|
|
1192
|
+
sources?: Array<Omit<ReportRuntimeSource, "sourceToken">>;
|
|
1193
|
+
};
|
|
775
1194
|
/** Private storage keys; signed download URLs must be generated by the host after authorization. */
|
|
776
1195
|
artifacts?: ReportInstanceArtifact[];
|
|
777
1196
|
}
|
|
@@ -795,6 +1214,10 @@ export declare class ReportJobError extends Error {
|
|
|
795
1214
|
export declare interface ReportJobExecutionContext {
|
|
796
1215
|
scope: string;
|
|
797
1216
|
taskId: string;
|
|
1217
|
+
/** Immutable claim generation; compare atomically at the host artifact commit boundary. */
|
|
1218
|
+
readonly attempt: number;
|
|
1219
|
+
/** Opaque tuple identity, scoped to this claim; never a credential. */
|
|
1220
|
+
readonly executionToken: string;
|
|
798
1221
|
signal: AbortSignal;
|
|
799
1222
|
reportProgress(completed: number, total?: number): Promise<void>;
|
|
800
1223
|
}
|
|
@@ -917,10 +1340,53 @@ declare interface ReportLoadContext {
|
|
|
917
1340
|
signal?: AbortSignal;
|
|
918
1341
|
}
|
|
919
1342
|
|
|
1343
|
+
export declare interface ReportPackageFixture {
|
|
1344
|
+
name: string;
|
|
1345
|
+
/** Explicit host confirmation; the SDK does not infer that business values are anonymous. */
|
|
1346
|
+
deidentified: true;
|
|
1347
|
+
datasets: DatasetRows;
|
|
1348
|
+
params?: Record<string, string>;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
export declare interface ReportPackageImageTarget {
|
|
1352
|
+
pageIndex: number;
|
|
1353
|
+
/** Top component index, then optional repeated grid-row / cell / child triplets. */
|
|
1354
|
+
componentPath: number[];
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
export declare interface ReportPackageResource {
|
|
1358
|
+
id: string;
|
|
1359
|
+
kind: "font" | "image";
|
|
1360
|
+
mediaType: "font/ttf" | "font/otf" | "image/png" | "image/jpeg";
|
|
1361
|
+
bytes: number;
|
|
1362
|
+
sha256: string;
|
|
1363
|
+
license?: string;
|
|
1364
|
+
font?: {
|
|
1365
|
+
family: string;
|
|
1366
|
+
face: "regular" | "bold" | "italic" | "boldItalic";
|
|
1367
|
+
};
|
|
1368
|
+
targets?: ReportPackageImageTarget[];
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
export declare interface ReportPackageResourceBytes {
|
|
1372
|
+
bytes: Uint8Array;
|
|
1373
|
+
mediaType: ReportPackageResource["mediaType"];
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
export declare function reportPackageResourceDigest(bytes: Uint8Array): string;
|
|
1377
|
+
|
|
1378
|
+
export declare type ReportPackageResourceResolver = (resource: Readonly<ReportPackageResource>, context: {
|
|
1379
|
+
signal: AbortSignal;
|
|
1380
|
+
}) => ReportPackageResourceBytes | Promise<ReportPackageResourceBytes>;
|
|
1381
|
+
|
|
920
1382
|
declare interface ReportPageFlow {
|
|
921
1383
|
bands: ReportFlowBand[];
|
|
922
1384
|
}
|
|
923
1385
|
|
|
1386
|
+
declare interface ReportPageFlow_2 {
|
|
1387
|
+
bands: ReportFlowBand_2[];
|
|
1388
|
+
}
|
|
1389
|
+
|
|
924
1390
|
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
925
1391
|
declare interface ReportParamDef {
|
|
926
1392
|
/** 参数名(传入 params,与数据集 SQL #{field} 绑定对应) */
|
|
@@ -933,6 +1399,36 @@ declare interface ReportParamDef {
|
|
|
933
1399
|
label: string;
|
|
934
1400
|
value: string;
|
|
935
1401
|
}>;
|
|
1402
|
+
/** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
|
|
1403
|
+
optionsSource?: string;
|
|
1404
|
+
/** Select dependencies must be declared parameters; changing a parent clears descendants. */
|
|
1405
|
+
dependsOn?: string[];
|
|
1406
|
+
defaultValue?: string;
|
|
1407
|
+
required?: boolean;
|
|
1408
|
+
placeholder?: string;
|
|
1409
|
+
/** 数字上下界;日期/月/年使用对应规范字符串;dateRange 对两端使用 YYYY-MM-DD 边界(含边界)。 */
|
|
1410
|
+
min?: number | string;
|
|
1411
|
+
max?: number | string;
|
|
1412
|
+
minLength?: number;
|
|
1413
|
+
maxLength?: number;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
1417
|
+
declare interface ReportParamDef_2 {
|
|
1418
|
+
/** 参数名(传入 params,与数据集 SQL #{field} 绑定对应) */
|
|
1419
|
+
field: string;
|
|
1420
|
+
/** 显示名(缺省用 field) */
|
|
1421
|
+
label?: string;
|
|
1422
|
+
type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select";
|
|
1423
|
+
/** select 选项 */
|
|
1424
|
+
options?: Array<{
|
|
1425
|
+
label: string;
|
|
1426
|
+
value: string;
|
|
1427
|
+
}>;
|
|
1428
|
+
/** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
|
|
1429
|
+
optionsSource?: string;
|
|
1430
|
+
/** Select dependencies must be declared parameters; changing a parent clears descendants. */
|
|
1431
|
+
dependsOn?: string[];
|
|
936
1432
|
defaultValue?: string;
|
|
937
1433
|
required?: boolean;
|
|
938
1434
|
placeholder?: string;
|
|
@@ -950,7 +1446,7 @@ declare interface ReportParamIssue {
|
|
|
950
1446
|
message: string;
|
|
951
1447
|
}
|
|
952
1448
|
|
|
953
|
-
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
1449
|
+
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "dependency" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
954
1450
|
|
|
955
1451
|
declare interface ReportParamValidation {
|
|
956
1452
|
ok: boolean;
|
|
@@ -1105,6 +1601,15 @@ export declare interface ReportRuntimePreparedExportInput extends ReportTaskMoni
|
|
|
1105
1601
|
signal?: AbortSignal;
|
|
1106
1602
|
}
|
|
1107
1603
|
|
|
1604
|
+
/** One query occurrence; repeated report IDs retain independent provenance. */
|
|
1605
|
+
export declare interface ReportRuntimeSource {
|
|
1606
|
+
reportId: string;
|
|
1607
|
+
reportIndex: number;
|
|
1608
|
+
reportScope: string;
|
|
1609
|
+
revision?: string;
|
|
1610
|
+
sourceToken?: string;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1108
1613
|
export declare interface ReportRuntimeStats {
|
|
1109
1614
|
rows: number;
|
|
1110
1615
|
pages: number;
|
|
@@ -1195,6 +1700,55 @@ declare interface ReportTemplate {
|
|
|
1195
1700
|
pages: TemplatePage[];
|
|
1196
1701
|
}
|
|
1197
1702
|
|
|
1703
|
+
declare interface ReportTemplate_2 {
|
|
1704
|
+
schemaVersion?: string;
|
|
1705
|
+
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
1706
|
+
params?: ReportParamDef_2[];
|
|
1707
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
1708
|
+
repeat?: ReportTemplateRepeat_2;
|
|
1709
|
+
pages: TemplatePage_2[];
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
declare interface ReportTemplateCatalogEntry extends ReportTemplateSummary {
|
|
1713
|
+
category?: string;
|
|
1714
|
+
tags?: string[];
|
|
1715
|
+
updatedAt?: string;
|
|
1716
|
+
/** Optional lifecycle metadata. revision continues to identify the editable document. */
|
|
1717
|
+
draftRevision?: string;
|
|
1718
|
+
publishedRevision?: string;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
declare interface ReportTemplateCatalogOpenContext {
|
|
1722
|
+
mode: "edit" | "published";
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
declare interface ReportTemplateCatalogPage {
|
|
1726
|
+
items: ReportTemplateCatalogEntry[];
|
|
1727
|
+
next?: string;
|
|
1728
|
+
categories?: Array<{
|
|
1729
|
+
id: string;
|
|
1730
|
+
label: string;
|
|
1731
|
+
count?: number;
|
|
1732
|
+
}>;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
/** Discovery metadata is separate from executable templates and from enterprise account authorization. */
|
|
1736
|
+
declare interface ReportTemplateCatalogProvider {
|
|
1737
|
+
search(request: ReportTemplateCatalogQuery): Promise<ReportTemplateCatalogPage>;
|
|
1738
|
+
get(id: string, context: {
|
|
1739
|
+
signal?: AbortSignal;
|
|
1740
|
+
mode?: ReportTemplateCatalogOpenContext["mode"];
|
|
1741
|
+
}): Promise<ReportTemplateDocument | undefined>;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
declare interface ReportTemplateCatalogQuery {
|
|
1745
|
+
query?: string;
|
|
1746
|
+
category?: string;
|
|
1747
|
+
cursor?: string;
|
|
1748
|
+
limit?: number;
|
|
1749
|
+
signal?: AbortSignal;
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1198
1752
|
declare interface ReportTemplateChange {
|
|
1199
1753
|
kind: "added" | "removed" | "modified" | "moved";
|
|
1200
1754
|
category: "metadata" | "structure" | "binding" | "calculation" | "format";
|
|
@@ -1222,6 +1776,17 @@ declare interface ReportTemplateDocument {
|
|
|
1222
1776
|
template: ReportTemplate;
|
|
1223
1777
|
}
|
|
1224
1778
|
|
|
1779
|
+
/** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
|
|
1780
|
+
declare interface ReportTemplateDocument_2 {
|
|
1781
|
+
schemaVersion: "1.0";
|
|
1782
|
+
id: string;
|
|
1783
|
+
name: string;
|
|
1784
|
+
/** 宿主的发布版本/乐观锁标识,不由引擎自动递增。 */
|
|
1785
|
+
revision?: string;
|
|
1786
|
+
description?: string;
|
|
1787
|
+
template: ReportTemplate_2;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1225
1790
|
declare interface ReportTemplateFixture {
|
|
1226
1791
|
name: string;
|
|
1227
1792
|
datasets: DatasetRows;
|
|
@@ -1230,6 +1795,35 @@ declare interface ReportTemplateFixture {
|
|
|
1230
1795
|
|
|
1231
1796
|
declare type ReportTemplateLoader = (context: ReportLoadContext) => ReportTemplate | Promise<ReportTemplate>;
|
|
1232
1797
|
|
|
1798
|
+
declare interface ReportTemplateManager {
|
|
1799
|
+
list(signal?: AbortSignal): ReturnType<ReportTemplateStore["list"]>;
|
|
1800
|
+
get(id: string, options?: {
|
|
1801
|
+
draft?: boolean;
|
|
1802
|
+
signal?: AbortSignal;
|
|
1803
|
+
}): Promise<ReportTemplateDocument | undefined>;
|
|
1804
|
+
history(id: string, signal?: AbortSignal): Promise<readonly ReportTemplateVersion[]>;
|
|
1805
|
+
saveDraft(input: unknown, options: TemplateMutationOptions): Promise<ReportTemplateRecord>;
|
|
1806
|
+
publish(id: string, options: TemplateMutationOptions): Promise<ReportTemplateRecord>;
|
|
1807
|
+
rollback(id: string, revision: string, options: TemplateMutationOptions): Promise<ReportTemplateRecord>;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
export declare interface ReportTemplatePackage {
|
|
1811
|
+
schemaVersion: "1.0";
|
|
1812
|
+
minimumVersion: string;
|
|
1813
|
+
document: ReportTemplateDocument;
|
|
1814
|
+
contracts?: Record<string, DatasetContract>;
|
|
1815
|
+
resources: ReportPackageResource[];
|
|
1816
|
+
fixtures?: ReportPackageFixture[];
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
export declare interface ReportTemplatePackageOptions {
|
|
1820
|
+
/** Installed SDK version, compared before any resolver or persistence is called. */
|
|
1821
|
+
runtimeVersion?: string;
|
|
1822
|
+
maxBytes?: number;
|
|
1823
|
+
maxResourceBytes?: number;
|
|
1824
|
+
signal?: AbortSignal;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1233
1827
|
declare interface ReportTemplateProvider {
|
|
1234
1828
|
list(context: {
|
|
1235
1829
|
signal?: AbortSignal;
|
|
@@ -1239,6 +1833,22 @@ declare interface ReportTemplateProvider {
|
|
|
1239
1833
|
}): Promise<ReportTemplateDocument | undefined>;
|
|
1240
1834
|
}
|
|
1241
1835
|
|
|
1836
|
+
declare interface ReportTemplateRecord {
|
|
1837
|
+
id: string;
|
|
1838
|
+
revision: string;
|
|
1839
|
+
draft?: ReportTemplateDocument;
|
|
1840
|
+
publishedRevision?: string;
|
|
1841
|
+
published?: ReportTemplateDocument;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
declare interface ReportTemplateRecord_2 {
|
|
1845
|
+
id: string;
|
|
1846
|
+
revision: string;
|
|
1847
|
+
draft?: ReportTemplateDocument_2;
|
|
1848
|
+
publishedRevision?: string;
|
|
1849
|
+
published?: ReportTemplateDocument_2;
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1242
1852
|
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
1243
1853
|
declare interface ReportTemplateRepeat {
|
|
1244
1854
|
dataset: string;
|
|
@@ -1249,6 +1859,16 @@ declare interface ReportTemplateRepeat {
|
|
|
1249
1859
|
};
|
|
1250
1860
|
}
|
|
1251
1861
|
|
|
1862
|
+
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
1863
|
+
declare interface ReportTemplateRepeat_2 {
|
|
1864
|
+
dataset: string;
|
|
1865
|
+
rowKey?: string;
|
|
1866
|
+
/** Whole copies per record, 1..1000. The field value must be a number, never a numeric string. */
|
|
1867
|
+
copies?: number | {
|
|
1868
|
+
field: string;
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1252
1872
|
declare interface ReportTemplateReview {
|
|
1253
1873
|
ok: boolean;
|
|
1254
1874
|
changes?: ReportTemplateDiff;
|
|
@@ -1286,11 +1906,78 @@ declare interface ReportTemplateReviewOptions {
|
|
|
1286
1906
|
strictOutputs?: boolean;
|
|
1287
1907
|
}
|
|
1288
1908
|
|
|
1909
|
+
/** compareAndSwap 必须由宿主数据库/文件适配器保证原子性,不能用先读再无条件写替代。 */
|
|
1910
|
+
declare interface ReportTemplateStore {
|
|
1911
|
+
read(id: string, signal?: AbortSignal): Promise<ReportTemplateRecord | undefined>;
|
|
1912
|
+
list(signal?: AbortSignal): Promise<Array<{
|
|
1913
|
+
id: string;
|
|
1914
|
+
revision: string;
|
|
1915
|
+
publishedRevision?: string;
|
|
1916
|
+
}>>;
|
|
1917
|
+
history(id: string, signal?: AbortSignal): Promise<ReportTemplateVersion[]>;
|
|
1918
|
+
getVersion(id: string, revision: string, signal?: AbortSignal): Promise<ReportTemplateVersion | undefined>;
|
|
1919
|
+
/** 状态更新和 publication 的不可变追加必须处于同一原子事务;草稿写入不读取历史。 */
|
|
1920
|
+
compareAndSwap(id: string, expectedRevision: string | null, next: ReportTemplateRecord, options: TemplateStoreWriteOptions): Promise<boolean>;
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1289
1923
|
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
1290
1924
|
|
|
1925
|
+
declare interface ReportTemplateVersion {
|
|
1926
|
+
revision: string;
|
|
1927
|
+
publishedAt: string;
|
|
1928
|
+
document: ReportTemplateDocument;
|
|
1929
|
+
restoredFrom?: string;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1291
1932
|
/** Optional business explanations never replace raw data or schema validation. */
|
|
1292
1933
|
declare type ReportValueState = "missing-source" | "not-applicable" | "not-calculable";
|
|
1293
1934
|
|
|
1935
|
+
/** Structural bridge: no Vue/designer dependency is loaded by the workflow. */
|
|
1936
|
+
export declare interface ReportWorkflowEditor {
|
|
1937
|
+
readonly saving?: boolean;
|
|
1938
|
+
readonly blocked?: boolean;
|
|
1939
|
+
readonly pendingLocalChanges: boolean;
|
|
1940
|
+
save(): void | Promise<void>;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
export declare interface ReportWorkflowOptions {
|
|
1944
|
+
templates: ReportTemplateManager;
|
|
1945
|
+
instances: ReportInstanceStore;
|
|
1946
|
+
scope: string;
|
|
1947
|
+
data: Omit<ReportDefinition, "template"> | ((document: ReportTemplateDocument) => Omit<ReportDefinition, "template">);
|
|
1948
|
+
runtime?: Omit<ReportRuntimeOptions, "reports">;
|
|
1949
|
+
pdf?: ReportPdfFontOptions;
|
|
1950
|
+
instanceId?(templateId: string, caseId: string): string;
|
|
1951
|
+
title?(document: ReportTemplateDocument, item: ReportBatchCase, params: Record<string, string>): string;
|
|
1952
|
+
catalog?: ReportTemplateCatalogProvider;
|
|
1953
|
+
catalogMetadata?(document: ReportTemplateDocument): Pick<LocalTemplateCatalogItem, "category" | "tags">;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
export declare interface ReportWorkflowPublishInput {
|
|
1957
|
+
editor: ReportWorkflowEditor;
|
|
1958
|
+
document(): ReportTemplateDocument;
|
|
1959
|
+
successfulSaves(): number;
|
|
1960
|
+
afterSave(): Promise<unknown>;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
export declare interface ResolvedReportPackageFont {
|
|
1964
|
+
id: string;
|
|
1965
|
+
family: string;
|
|
1966
|
+
face: NonNullable<ReportPackageResource["font"]>["face"];
|
|
1967
|
+
bytes: Uint8Array;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
/** Verify all host-resolved bytes before returning a hydrated independent document. No implicit save. */
|
|
1971
|
+
export declare function resolveReportTemplatePackage(input: unknown, options: ReportTemplatePackageOptions & {
|
|
1972
|
+
resolve: ReportPackageResourceResolver;
|
|
1973
|
+
maxDurationMs?: number;
|
|
1974
|
+
}): Promise<{
|
|
1975
|
+
document: ReportTemplateDocument;
|
|
1976
|
+
fonts: ResolvedReportPackageFont[];
|
|
1977
|
+
contracts: Record<string, DatasetContract> | undefined;
|
|
1978
|
+
fixtures: ReportPackageFixture[];
|
|
1979
|
+
}>;
|
|
1980
|
+
|
|
1294
1981
|
/** Publication gate with actual sequential PDF/XLSX encoding, no business query or implicit save. */
|
|
1295
1982
|
export declare function reviewReportPublication(input: unknown, options?: ReportPublicationOptions): Promise<ReportPublicationReview>;
|
|
1296
1983
|
|
|
@@ -1303,6 +1990,15 @@ declare interface RichParagraph {
|
|
|
1303
1990
|
indentMm?: number;
|
|
1304
1991
|
}
|
|
1305
1992
|
|
|
1993
|
+
declare interface RichParagraph_2 {
|
|
1994
|
+
segments: RichSegment_2[];
|
|
1995
|
+
align?: ComponentStyle_2["align"];
|
|
1996
|
+
lineHeight?: number;
|
|
1997
|
+
spaceBeforeMm?: number;
|
|
1998
|
+
spaceAfterMm?: number;
|
|
1999
|
+
indentMm?: number;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
1306
2002
|
declare interface RichSegment {
|
|
1307
2003
|
kind?: "text" | "field";
|
|
1308
2004
|
text?: string;
|
|
@@ -1310,6 +2006,13 @@ declare interface RichSegment {
|
|
|
1310
2006
|
style?: ComponentStyle;
|
|
1311
2007
|
}
|
|
1312
2008
|
|
|
2009
|
+
declare interface RichSegment_2 {
|
|
2010
|
+
kind?: "text" | "field";
|
|
2011
|
+
text?: string;
|
|
2012
|
+
field?: string;
|
|
2013
|
+
style?: ComponentStyle_2;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
1313
2016
|
/** Bounded fixed-label consumption, not cross-chunk aggregation or a new durable task queue.
|
|
1314
2017
|
* The next source chunk is pulled only after execute + onReceipt complete. Earlier receipts
|
|
1315
2018
|
* remain committed if a later chunk fails; use onReceipt for a durable incremental manifest.
|
|
@@ -1324,6 +2027,8 @@ export declare function runReportBatch<T>(input: readonly ReportBatchCase[], exe
|
|
|
1324
2027
|
signal: AbortSignal;
|
|
1325
2028
|
}) => Promise<T>, options?: ReportBatchOptions): Promise<ReportBatchOutcome<T>[]>;
|
|
1326
2029
|
|
|
2030
|
+
export declare function saveAndPublishReportTemplate(manager: ReportTemplateManager, options: ReportWorkflowPublishInput): Promise<ReportTemplateRecord_2>;
|
|
2031
|
+
|
|
1327
2032
|
/** Canonical plain JSON rejects getters/scripts and gives stable idempotency without coercion. */
|
|
1328
2033
|
export declare function serializeJobJson(value: unknown, budget?: {
|
|
1329
2034
|
maxNodes?: number;
|
|
@@ -1347,8 +2052,28 @@ declare interface StyleRule {
|
|
|
1347
2052
|
style: Record<string, unknown>;
|
|
1348
2053
|
}
|
|
1349
2054
|
|
|
2055
|
+
/** 条件格式规则求值(声明式,见 ListColumn.rules) */
|
|
2056
|
+
declare interface StyleRule_2 {
|
|
2057
|
+
when: {
|
|
2058
|
+
field: string;
|
|
2059
|
+
op: ">" | ">=" | "<" | "<=" | "==" | "!=";
|
|
2060
|
+
value: number | string;
|
|
2061
|
+
/** Explicit decimal comparisons retain decimal thresholds as text. */
|
|
2062
|
+
numeric?: "number" | "decimal";
|
|
2063
|
+
};
|
|
2064
|
+
/** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
|
|
2065
|
+
style: Record<string, unknown>;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
1350
2068
|
declare type TemplateComponent = PlanComponent | ListComponent;
|
|
1351
2069
|
|
|
2070
|
+
declare type TemplateComponent_2 = PlanComponent_2 | ListComponent_2;
|
|
2071
|
+
|
|
2072
|
+
declare interface TemplateMutationOptions {
|
|
2073
|
+
expectedRevision: string | null;
|
|
2074
|
+
signal?: AbortSignal;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
1352
2077
|
declare interface TemplatePage {
|
|
1353
2078
|
widthMm: number;
|
|
1354
2079
|
heightMm: number;
|
|
@@ -1364,6 +2089,26 @@ declare interface TemplatePage {
|
|
|
1364
2089
|
meta?: Record<string, unknown>;
|
|
1365
2090
|
}
|
|
1366
2091
|
|
|
2092
|
+
declare interface TemplatePage_2 {
|
|
2093
|
+
widthMm: number;
|
|
2094
|
+
heightMm: number;
|
|
2095
|
+
/** 宽表保持全列自然宽度,页高只控制内部纵向分段。 */
|
|
2096
|
+
layout?: "page" | "wide";
|
|
2097
|
+
marginTopMm?: number;
|
|
2098
|
+
marginBottomMm?: number;
|
|
2099
|
+
marginLeftMm?: number;
|
|
2100
|
+
marginRightMm?: number;
|
|
2101
|
+
components: TemplateComponent_2[];
|
|
2102
|
+
/** Explicit vertical bands preserve source gaps as dynamic regions expand. */
|
|
2103
|
+
flow?: ReportPageFlow_2;
|
|
2104
|
+
meta?: Record<string, unknown>;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
declare interface TemplateStoreWriteOptions {
|
|
2108
|
+
publication?: ReportTemplateVersion;
|
|
2109
|
+
signal?: AbortSignal;
|
|
2110
|
+
}
|
|
2111
|
+
|
|
1367
2112
|
/**
|
|
1368
2113
|
* 文本测量与折行(分页/Canvas/PDF 共用的唯一折行真相源)。
|
|
1369
2114
|
*
|
|
@@ -1404,6 +2149,26 @@ declare interface TreeTableOptions {
|
|
|
1404
2149
|
maxAggregationVisits?: number;
|
|
1405
2150
|
}
|
|
1406
2151
|
|
|
2152
|
+
/** A serialized tree contract. Sibling and root order follow input order. */
|
|
2153
|
+
declare interface TreeTableOptions_2 {
|
|
2154
|
+
input: "flat" | "nested";
|
|
2155
|
+
idField: string;
|
|
2156
|
+
/** Flat roots have null/undefined parent values. */
|
|
2157
|
+
parentField?: string;
|
|
2158
|
+
/** Nested child arrays, defaults to children. Every node still needs an ID. */
|
|
2159
|
+
childrenField?: string;
|
|
2160
|
+
labelField: string;
|
|
2161
|
+
indentMm?: number;
|
|
2162
|
+
orphan?: "error" | "root";
|
|
2163
|
+
/** Source preserves parent values; leaf-aggregate derives only parents from descendant leaves. */
|
|
2164
|
+
parentValues?: "source" | "leaf-aggregate";
|
|
2165
|
+
aggregates?: AggregateDefinition_2[];
|
|
2166
|
+
maxRows?: number;
|
|
2167
|
+
maxDepth?: number;
|
|
2168
|
+
/** Bounded leaf-to-ancestor aggregate work; default one million. */
|
|
2169
|
+
maxAggregationVisits?: number;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
1407
2172
|
export declare function validateJobRecord(record: ReportJobRecord, scope: string, id: string, expectedRevision: number | null): void;
|
|
1408
2173
|
|
|
1409
2174
|
export declare function validateJobTransition(previous: ReportJobRecord | undefined, next: ReportJobRecord): void;
|
|
@@ -1411,4 +2176,7 @@ export declare function validateJobTransition(previous: ReportJobRecord | undefi
|
|
|
1411
2176
|
/** The same declarative formatting used by list columns, before any output backend. */
|
|
1412
2177
|
declare type ValueFormat = ColumnFormat;
|
|
1413
2178
|
|
|
2179
|
+
/** The same declarative formatting used by list columns, before any output backend. */
|
|
2180
|
+
declare type ValueFormat_2 = ColumnFormat_2;
|
|
2181
|
+
|
|
1414
2182
|
export { }
|