@agile-team/mach-report 2.13.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 +20 -7
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/ExcelBindingWizard-BKH1nGNS.js +1485 -0
- package/dist/ExcelBindingWizard-Bs43BGNp.cjs +1 -0
- package/dist/ParamEditor-Da4akw6V.cjs +1 -0
- package/dist/ParamEditor-DoAhzJsm.js +594 -0
- package/dist/{ReportBatchPanel-CW2HV9I8.js → ReportBatchPanel-BMf6boMA.js} +39 -39
- package/dist/ReportBatchPanel-wP9m9Pj1.cjs +1 -0
- package/dist/ReportPreview-ChV19HBp.js +4619 -0
- package/dist/ReportPreview-DbLvvOUT.cjs +6 -0
- package/dist/{ReportTemplateLibrary-BZB-XWjj.js → ReportTemplateLibrary-C9wutIiT.js} +1 -1
- package/dist/ReportTemplateLibrary-Sxr3eD0J.cjs +1 -0
- package/dist/RuleEditor-C_Clasvd.js +2037 -0
- package/dist/RuleEditor-XhGHK8DE.cjs +1 -0
- package/dist/TemplateOutlinePanel-D6Bkny59.js +96 -0
- package/dist/TemplateOutlinePanel-JTSR53vJ.cjs +1 -0
- package/dist/TemplateReusePanel-Kx35S0Ql.cjs +1 -0
- package/dist/TemplateReusePanel-rVuK1kTz.js +388 -0
- package/dist/TemplateReviewPanel-B0ar9_zf.js +592 -0
- package/dist/TemplateReviewPanel-Dn6X9UmY.cjs +1 -0
- 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 -2
- package/dist/designer.d.cts +432 -17
- package/dist/designer.d.ts +432 -17
- package/dist/designer.js +21 -4312
- package/dist/drill-ByJviLXS.js +145 -0
- package/dist/drill-DYTxuL3A.cjs +1 -0
- package/dist/font-loader-B_UkxpzC.cjs +1 -0
- package/dist/font-loader-Q3bQjmrI.js +297 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +239 -5
- package/dist/index.d.ts +239 -5
- package/dist/index.js +939 -893
- 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-BwNyeGpt.js +36352 -0
- package/dist/pdf-CvvrjPQg.cjs +103 -0
- package/dist/pdf.cjs +1 -101
- package/dist/pdf.d.cts +18 -3
- package/dist/pdf.d.ts +18 -3
- package/dist/pdf.js +9 -36579
- package/dist/plugin-Ca_XZG3l.js +22 -0
- package/dist/{plugin-DzS6pxTA.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-D-5jQlTj.js → record-bindings-Do_b3h4V.js} +1 -1
- package/dist/{region-binding-workflow-CcUq8W2Q.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 +66 -12
- package/dist/server/node.d.ts +66 -12
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +405 -381
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +878 -15
- package/dist/server.d.ts +878 -15
- package/dist/server.js +1034 -534
- 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-BGbQLGlV.js +187 -0
- package/dist/template-fragments-DcKeiylI.cjs +1 -0
- package/dist/template-outline-BwRV_eRo.cjs +1 -0
- package/dist/template-outline-cnWfT_LK.js +88 -0
- package/dist/{template-registry-BjE1VS6g.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/{useLocalDraft-C07SYRnC.js → useLocalDraft-BnhcxXk_.js} +1 -1
- package/dist/{useLocalDraft-Yiw1wFgI.cjs → useLocalDraft-CioIfDb6.cjs} +1 -1
- package/dist/vue/async.d.cts +190 -15
- package/dist/vue/async.d.ts +190 -15
- package/dist/vue/index.d.cts +274 -24
- package/dist/vue/index.d.ts +274 -24
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +5 -5
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +90 -81
- package/dist/{workbook-session-DNa2RHNG.cjs → workbook-session-Bjv1YCRK.cjs} +18 -18
- package/dist/{workbook-session-BPb3TMnT.js → workbook-session-BvToI-Fd.js} +5440 -5288
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +66 -12
- package/dist/worker.d.ts +66 -12
- package/dist/worker.js +61 -56
- 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/ExcelBindingWizard-CeAf4QSE.js +0 -1465
- package/dist/ExcelBindingWizard-y0mT-AHR.cjs +0 -1
- package/dist/ParamEditor-BLaE5q5W.js +0 -522
- package/dist/ParamEditor-MBBC7lUE.cjs +0 -1
- package/dist/ReportBatchPanel-Fp1ePFag.cjs +0 -1
- package/dist/ReportPreview-BN6fk7Wz.cjs +0 -6
- package/dist/ReportPreview-D2Jkyh1U.js +0 -4243
- package/dist/ReportTemplateLibrary-5fk5CQBO.cjs +0 -1
- package/dist/RuleEditor-ChRzNQuF.cjs +0 -1
- package/dist/RuleEditor-DzAmW5YH.js +0 -2024
- package/dist/TemplateReviewPanel-BKofGrV9.js +0 -222
- package/dist/TemplateReviewPanel-DwtOcLue.cjs +0 -1
- package/dist/assets-C2U-e-Sz.cjs +0 -4
- package/dist/assets-Q0wUwNrV.js +0 -217
- package/dist/batch-Bt3Fd27Z.cjs +0 -1
- package/dist/batch-mRqhhhjt.js +0 -364
- package/dist/capabilities-CK_7hizc.js +0 -63
- package/dist/capabilities-CsZ-pNHR.cjs +0 -1
- package/dist/config-Bb7RiIO5.cjs +0 -1
- package/dist/config-XVwG87IA.js +0 -529
- 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/plugin-D4wizDXB.js +0 -22
- 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-registry-D3SjENi6.cjs +0 -1
- package/dist/template-review-DGwWOoCv.cjs +0 -2
- package/dist/template-review-PgEe_Wr9.js +0 -1742
- package/dist/validate-BJ5HIWY8.cjs +0 -1
- package/dist/validate-DbgEM1Hh.js +0 -163
package/dist/server.d.ts
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
|
|
|
@@ -136,12 +235,19 @@ export declare function createReportGenerationService(options: {
|
|
|
136
235
|
runtime: ReportRuntime;
|
|
137
236
|
instances: ReportInstanceStore;
|
|
138
237
|
templateRevisions: Record<string, string>;
|
|
238
|
+
pdf?: ReportPdfFontOptions;
|
|
139
239
|
maxSnapshotBytes?: number;
|
|
140
240
|
now?: () => Date;
|
|
141
241
|
}): {
|
|
142
242
|
generate(input: ReportGenerationInput): Promise<ReportInstanceSnapshot>;
|
|
143
243
|
read: (scope: string, id: string, revision?: number, signal?: AbortSignal) => Promise<ReportInstanceSnapshot | undefined>;
|
|
144
244
|
list: (scope: string, options?: ReportInstanceListOptions) => Promise<ReportInstancePage>;
|
|
245
|
+
/** Read an immutable saved revision and encode its plan, never re-query the business source. */
|
|
246
|
+
exportInstance(input: {
|
|
247
|
+
scope: string;
|
|
248
|
+
id: string;
|
|
249
|
+
revision?: number;
|
|
250
|
+
} & Omit<ReportRuntimePreparedExportInput, "prepared">): Promise<ReportRuntimeExportResult>;
|
|
145
251
|
/** Instance edits are explicit snapshots; source business persistence remains the Provider.save responsibility. */
|
|
146
252
|
save: (input: Omit<ReportInstanceSnapshot, "revision">, options: {
|
|
147
253
|
expectedRevision: number | null;
|
|
@@ -173,6 +279,31 @@ export declare function createReportTaskQueue(options?: {
|
|
|
173
279
|
maxQueued?: number;
|
|
174
280
|
}): ReportTaskQueue;
|
|
175
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
|
+
|
|
176
307
|
declare interface DatasetContract {
|
|
177
308
|
fields: readonly ReportFieldContract[];
|
|
178
309
|
rowKey?: string;
|
|
@@ -194,6 +325,13 @@ declare interface ExpressionOptions {
|
|
|
194
325
|
divisionByZero?: "null" | "error";
|
|
195
326
|
}
|
|
196
327
|
|
|
328
|
+
declare interface ExpressionOptions_2 {
|
|
329
|
+
numeric?: "number" | "decimal";
|
|
330
|
+
digits?: number;
|
|
331
|
+
nulls?: "propagate" | "error";
|
|
332
|
+
divisionByZero?: "null" | "error";
|
|
333
|
+
}
|
|
334
|
+
|
|
197
335
|
declare interface FormulaAdapter {
|
|
198
336
|
/** Explicit trusted engine; core never evaluates source code/macros/external workbook references. */
|
|
199
337
|
evaluate(expression: string, context: {
|
|
@@ -227,11 +365,94 @@ declare interface GridCell {
|
|
|
227
365
|
style?: ComponentStyle;
|
|
228
366
|
}
|
|
229
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
|
+
|
|
230
392
|
declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
231
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
|
+
|
|
407
|
+
export declare interface LabelStreamContext {
|
|
408
|
+
index: number;
|
|
409
|
+
rowOffset: number;
|
|
410
|
+
rowCount: number;
|
|
411
|
+
signal: AbortSignal;
|
|
412
|
+
/** Encode this chunk with the same runtime, resources, fonts, signal and budgets. */
|
|
413
|
+
export(input: Omit<ReportRuntimePreparedExportInput, "prepared" | "signal">): Promise<ReportRuntimeExportResult>;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export declare interface LabelStreamManifest {
|
|
417
|
+
rows: number;
|
|
418
|
+
chunks: Array<LabelStreamReceipt & {
|
|
419
|
+
index: number;
|
|
420
|
+
rowOffset: number;
|
|
421
|
+
rowCount: number;
|
|
422
|
+
}>;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export declare interface LabelStreamOptions {
|
|
426
|
+
template: ReportTemplate;
|
|
427
|
+
batchSize?: number;
|
|
428
|
+
maxRows?: number;
|
|
429
|
+
maxChunks?: number;
|
|
430
|
+
/** Conservative retained scalar/key size (UTF-16 + field overhead), default 16 MB. */
|
|
431
|
+
maxRetainedBytes?: number;
|
|
432
|
+
signal?: AbortSignal;
|
|
433
|
+
/** Shared existing runtime budgets/assets; callbacks never cross a Worker boundary. */
|
|
434
|
+
runtime?: Omit<ReportRuntimeOptions, "reports" | "executor">;
|
|
435
|
+
pdf?: ReportPdfFontOptions;
|
|
436
|
+
/** Persist each artifact here; retain only its small receipt in the manifest. */
|
|
437
|
+
execute(prepared: PreparedReport, context: LabelStreamContext): Promise<LabelStreamReceipt>;
|
|
438
|
+
/** Awaited after commit and before pulling more source rows. A failure stops consumption. */
|
|
439
|
+
onReceipt?(receipt: LabelStreamReceipt, context: LabelStreamContext): void | Promise<void>;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export declare interface LabelStreamReceipt {
|
|
443
|
+
/** Private artifact storage key, not a credential-bearing URL. */
|
|
444
|
+
key: string;
|
|
445
|
+
format: "pdf" | "xlsx";
|
|
446
|
+
bytes: number;
|
|
447
|
+
sha256?: string;
|
|
448
|
+
}
|
|
449
|
+
|
|
232
450
|
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
233
451
|
declare type ListAlignment = NonNullable<ComponentStyle["align"]> | "auto";
|
|
234
452
|
|
|
453
|
+
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
454
|
+
declare type ListAlignment_2 = NonNullable<ComponentStyle_2["align"]> | "auto";
|
|
455
|
+
|
|
235
456
|
declare interface ListColumn {
|
|
236
457
|
header: string;
|
|
237
458
|
field: string;
|
|
@@ -258,6 +479,32 @@ declare interface ListColumn {
|
|
|
258
479
|
visibleWhen?: StyleRule["when"];
|
|
259
480
|
}
|
|
260
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
|
+
|
|
261
508
|
declare interface ListComponent {
|
|
262
509
|
kind: "list";
|
|
263
510
|
/** Opaque serializable layout annotations; interpreted only by explicit optional adapters. */
|
|
@@ -311,6 +558,59 @@ declare interface ListComponent {
|
|
|
311
558
|
grandTotal?: ListGrandTotal;
|
|
312
559
|
}
|
|
313
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
|
+
|
|
314
614
|
declare interface ListDetail {
|
|
315
615
|
dataset: string;
|
|
316
616
|
parentKey: string;
|
|
@@ -327,6 +627,22 @@ declare interface ListDetail {
|
|
|
327
627
|
unmatched?: "error" | "ignore";
|
|
328
628
|
}
|
|
329
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
|
+
|
|
330
646
|
declare type ListGrandTotal = boolean | {
|
|
331
647
|
label?: string;
|
|
332
648
|
style?: ComponentStyle;
|
|
@@ -335,6 +651,14 @@ declare type ListGrandTotal = boolean | {
|
|
|
335
651
|
aggregates?: AggregateDefinition[];
|
|
336
652
|
};
|
|
337
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
|
+
|
|
338
662
|
/** 分组小计配置(声明式,见 ListComponent.groupBy) */
|
|
339
663
|
declare interface ListGroupBy {
|
|
340
664
|
/** 分组字段(值变化即切组) */
|
|
@@ -353,6 +677,34 @@ declare interface ListGroupBy {
|
|
|
353
677
|
repeatHeader?: boolean;
|
|
354
678
|
}
|
|
355
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
|
+
|
|
356
708
|
declare interface MatrixTableOptions {
|
|
357
709
|
rowFields: readonly string[];
|
|
358
710
|
columnFields: readonly string[];
|
|
@@ -369,6 +721,22 @@ declare interface MatrixTableOptions {
|
|
|
369
721
|
maxCells?: number;
|
|
370
722
|
}
|
|
371
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
|
+
|
|
372
740
|
export declare interface MemoryReportInstanceStoreOptions {
|
|
373
741
|
maxInstances?: number;
|
|
374
742
|
maxRevisions?: number;
|
|
@@ -377,7 +745,7 @@ export declare interface MemoryReportInstanceStoreOptions {
|
|
|
377
745
|
}
|
|
378
746
|
|
|
379
747
|
declare interface OutputDiagnostic {
|
|
380
|
-
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";
|
|
381
749
|
severity: "warning";
|
|
382
750
|
format: OutputFormat;
|
|
383
751
|
pageIndex: number;
|
|
@@ -421,6 +789,9 @@ declare interface PaginateOptions {
|
|
|
421
789
|
formula?: FormulaAdapter;
|
|
422
790
|
}
|
|
423
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
|
+
|
|
424
795
|
declare interface PlanComponent {
|
|
425
796
|
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
426
797
|
code?: CodeOptions;
|
|
@@ -450,6 +821,35 @@ declare interface PlanComponent {
|
|
|
450
821
|
fallbackText?: string;
|
|
451
822
|
}
|
|
452
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
|
+
|
|
453
853
|
declare interface PlanGrid {
|
|
454
854
|
/** 行内允许 null 空位;渲染器按空单元格处理 */
|
|
455
855
|
cells: (GridCell | null)[][];
|
|
@@ -460,6 +860,16 @@ declare interface PlanGrid {
|
|
|
460
860
|
paddingMm?: number;
|
|
461
861
|
}
|
|
462
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
|
+
|
|
463
873
|
declare interface PlanPage {
|
|
464
874
|
meta?: Record<string, unknown>;
|
|
465
875
|
/** wide 表示完整自然列宽;页面仅为预览的垂直窗口分段。 */
|
|
@@ -490,6 +900,23 @@ declare interface PlanTableFragment {
|
|
|
490
900
|
};
|
|
491
901
|
}
|
|
492
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
|
+
|
|
493
920
|
export declare interface PreparedReport {
|
|
494
921
|
plan: RenderPlan;
|
|
495
922
|
diagnostics: ReportDiagnostic[];
|
|
@@ -498,6 +925,13 @@ export declare interface PreparedReport {
|
|
|
498
925
|
revision?: string;
|
|
499
926
|
sourceToken?: string;
|
|
500
927
|
}>;
|
|
928
|
+
/** Ordered occurrences; legacy revisions remains last-value-by-ID for compatibility. */
|
|
929
|
+
sources?: ReportRuntimeSource[];
|
|
930
|
+
/** Captured metrics identity; absence on old saved instances remains supported with diagnostics. */
|
|
931
|
+
layout?: {
|
|
932
|
+
textMetrics: "heuristic" | "provided" | "font-bytes";
|
|
933
|
+
fontFingerprint?: string;
|
|
934
|
+
};
|
|
501
935
|
}
|
|
502
936
|
|
|
503
937
|
declare type PublicationAssets = Omit<AssetRenderOptions, "signal">;
|
|
@@ -566,6 +1000,19 @@ declare interface ReportCellEdit {
|
|
|
566
1000
|
|
|
567
1001
|
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
568
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;
|
|
569
1016
|
datasetId: string;
|
|
570
1017
|
rowKey: string | number;
|
|
571
1018
|
field: string;
|
|
@@ -583,7 +1030,19 @@ declare interface ReportCellTableIdentity {
|
|
|
583
1030
|
|
|
584
1031
|
declare type ReportCellValue = string | number | boolean | null;
|
|
585
1032
|
|
|
1033
|
+
declare interface ReportDataTarget {
|
|
1034
|
+
datasetId: string;
|
|
1035
|
+
field: string;
|
|
1036
|
+
rowKey?: string | number;
|
|
1037
|
+
/** Use table identity when the same dataset appears in several tables. */
|
|
1038
|
+
tableId?: string;
|
|
1039
|
+
/** Assigned by the source/runtime when several reports share dataset names. */
|
|
1040
|
+
reportScope?: string;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
586
1043
|
declare interface ReportDefinition {
|
|
1044
|
+
/** Explicitly shared editable data identity. Omit to isolate each report occurrence. */
|
|
1045
|
+
sourceScope?: string;
|
|
587
1046
|
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
588
1047
|
template: ReportTemplate | ReportTemplateLoader;
|
|
589
1048
|
/** 静态数据;load 存在时优先使用 load 的结果。 */
|
|
@@ -617,6 +1076,9 @@ declare interface ReportDiagnostic {
|
|
|
617
1076
|
message: string;
|
|
618
1077
|
path?: string;
|
|
619
1078
|
severity: "warning" | "error" | "info";
|
|
1079
|
+
/** Optional explanation supplied by the business source, not inferred from blank cells. */
|
|
1080
|
+
valueState?: ReportValueState;
|
|
1081
|
+
target?: ReportDataTarget;
|
|
620
1082
|
}
|
|
621
1083
|
|
|
622
1084
|
declare type ReportExpression = {
|
|
@@ -632,6 +1094,19 @@ declare type ReportExpression = {
|
|
|
632
1094
|
args: readonly ReportExpression[];
|
|
633
1095
|
};
|
|
634
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
|
+
|
|
635
1110
|
declare interface ReportFieldContract {
|
|
636
1111
|
field: string;
|
|
637
1112
|
label?: string;
|
|
@@ -655,6 +1130,14 @@ declare interface ReportFlowBand {
|
|
|
655
1130
|
heightMm: number;
|
|
656
1131
|
}
|
|
657
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
|
+
|
|
658
1141
|
export declare interface ReportGenerationInput {
|
|
659
1142
|
scope: string;
|
|
660
1143
|
id: string;
|
|
@@ -704,6 +1187,10 @@ export declare interface ReportInstanceSnapshot {
|
|
|
704
1187
|
templateRevisions: Record<string, string>;
|
|
705
1188
|
sourceRevisions: Record<string, string>;
|
|
706
1189
|
plan: RenderPlan;
|
|
1190
|
+
/** Exact generation diagnostics, row statistics and font metrics; optional for legacy instances. */
|
|
1191
|
+
output?: Omit<PreparedReport, "plan" | "revisions" | "sources"> & {
|
|
1192
|
+
sources?: Array<Omit<ReportRuntimeSource, "sourceToken">>;
|
|
1193
|
+
};
|
|
707
1194
|
/** Private storage keys; signed download URLs must be generated by the host after authorization. */
|
|
708
1195
|
artifacts?: ReportInstanceArtifact[];
|
|
709
1196
|
}
|
|
@@ -715,7 +1202,7 @@ export declare interface ReportInstanceStore {
|
|
|
715
1202
|
compareAndSwap(scope: string, id: string, expectedRevision: number | null, next: ReportInstanceSnapshot, signal?: AbortSignal): Promise<boolean>;
|
|
716
1203
|
}
|
|
717
1204
|
|
|
718
|
-
export declare type ReportInstanceSummary = Omit<ReportInstanceSnapshot, "plan" | "artifacts">;
|
|
1205
|
+
export declare type ReportInstanceSummary = Omit<ReportInstanceSnapshot, "plan" | "artifacts" | "output">;
|
|
719
1206
|
|
|
720
1207
|
export declare function reportInstanceSummary(snapshot: ReportInstanceSnapshot): ReportInstanceSummary;
|
|
721
1208
|
|
|
@@ -727,6 +1214,10 @@ export declare class ReportJobError extends Error {
|
|
|
727
1214
|
export declare interface ReportJobExecutionContext {
|
|
728
1215
|
scope: string;
|
|
729
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;
|
|
730
1221
|
signal: AbortSignal;
|
|
731
1222
|
reportProgress(completed: number, total?: number): Promise<void>;
|
|
732
1223
|
}
|
|
@@ -849,10 +1340,53 @@ declare interface ReportLoadContext {
|
|
|
849
1340
|
signal?: AbortSignal;
|
|
850
1341
|
}
|
|
851
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
|
+
|
|
852
1382
|
declare interface ReportPageFlow {
|
|
853
1383
|
bands: ReportFlowBand[];
|
|
854
1384
|
}
|
|
855
1385
|
|
|
1386
|
+
declare interface ReportPageFlow_2 {
|
|
1387
|
+
bands: ReportFlowBand_2[];
|
|
1388
|
+
}
|
|
1389
|
+
|
|
856
1390
|
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
857
1391
|
declare interface ReportParamDef {
|
|
858
1392
|
/** 参数名(传入 params,与数据集 SQL #{field} 绑定对应) */
|
|
@@ -865,6 +1399,36 @@ declare interface ReportParamDef {
|
|
|
865
1399
|
label: string;
|
|
866
1400
|
value: string;
|
|
867
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[];
|
|
868
1432
|
defaultValue?: string;
|
|
869
1433
|
required?: boolean;
|
|
870
1434
|
placeholder?: string;
|
|
@@ -882,7 +1446,7 @@ declare interface ReportParamIssue {
|
|
|
882
1446
|
message: string;
|
|
883
1447
|
}
|
|
884
1448
|
|
|
885
|
-
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
1449
|
+
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "dependency" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
886
1450
|
|
|
887
1451
|
declare interface ReportParamValidation {
|
|
888
1452
|
ok: boolean;
|
|
@@ -893,6 +1457,18 @@ declare interface ReportParamValidation {
|
|
|
893
1457
|
issues: ReportParamIssue[];
|
|
894
1458
|
}
|
|
895
1459
|
|
|
1460
|
+
/** Licensed local font bytes; never downloaded implicitly by the runtime. */
|
|
1461
|
+
export declare interface ReportPdfFontOptions {
|
|
1462
|
+
customFontBytes?: Uint8Array | ArrayBuffer;
|
|
1463
|
+
customFontName?: string;
|
|
1464
|
+
customFontFaces?: {
|
|
1465
|
+
regular: Uint8Array | ArrayBuffer;
|
|
1466
|
+
bold?: Uint8Array | ArrayBuffer;
|
|
1467
|
+
italic?: Uint8Array | ArrayBuffer;
|
|
1468
|
+
boldItalic?: Uint8Array | ArrayBuffer;
|
|
1469
|
+
};
|
|
1470
|
+
}
|
|
1471
|
+
|
|
896
1472
|
/** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
|
|
897
1473
|
declare interface ReportProvider {
|
|
898
1474
|
query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
|
|
@@ -953,6 +1529,7 @@ export declare interface ReportRuntime {
|
|
|
953
1529
|
validate(input: Omit<ReportRuntimeInput, "signal">): ReportParamValidation;
|
|
954
1530
|
prepare(input: ReportRuntimeInput): Promise<PreparedReport>;
|
|
955
1531
|
export(input: ReportRuntimeExportInput): Promise<ReportRuntimeExportResult>;
|
|
1532
|
+
exportPrepared(input: ReportRuntimePreparedExportInput): Promise<ReportRuntimeExportResult>;
|
|
956
1533
|
}
|
|
957
1534
|
|
|
958
1535
|
export declare interface ReportRuntimeBudget {
|
|
@@ -960,6 +1537,8 @@ export declare interface ReportRuntimeBudget {
|
|
|
960
1537
|
maxPages?: number;
|
|
961
1538
|
maxCells?: number;
|
|
962
1539
|
maxOutputBytes?: number;
|
|
1540
|
+
/** Bound the plain JSON snapshot accepted by exportPrepared (default 64 MB). */
|
|
1541
|
+
maxPreparedBytes?: number;
|
|
963
1542
|
maxDurationMs?: number;
|
|
964
1543
|
}
|
|
965
1544
|
|
|
@@ -971,6 +1550,8 @@ export declare class ReportRuntimeError extends Error {
|
|
|
971
1550
|
|
|
972
1551
|
/** 可用 worker_threads/进程/RPC 实现;接收可序列化请求,signal 由桥接层映射为取消消息。 */
|
|
973
1552
|
export declare interface ReportRuntimeExecutor {
|
|
1553
|
+
/** Old custom executors may omit this; the runtime explicitly rejects unsupported prepared output. */
|
|
1554
|
+
exportPrepared?(input: Omit<ReportRuntimePreparedExportInput, "signal" | "onEvent">, signal?: AbortSignal, onEvent?: ReportTaskObserver): Promise<ReportRuntimeExportResult>;
|
|
974
1555
|
prepare(input: Omit<ReportRuntimeInput, "signal" | "onEvent">, signal?: AbortSignal, onEvent?: ReportTaskObserver): Promise<PreparedReport>;
|
|
975
1556
|
export(input: Omit<ReportRuntimeExportInput, "signal" | "onEvent">, signal?: AbortSignal, onEvent?: ReportTaskObserver): Promise<ReportRuntimeExportResult>;
|
|
976
1557
|
}
|
|
@@ -979,17 +1560,6 @@ export declare interface ReportRuntimeExportInput extends ReportRuntimeInput {
|
|
|
979
1560
|
format: "pdf" | "xlsx";
|
|
980
1561
|
/** strict 在编码前拒绝已识别的输出降级;默认保留诊断并继续。 */
|
|
981
1562
|
fidelity?: "warn" | "strict";
|
|
982
|
-
/** PDF 中文需宿主显式提供有授权的字体;不隐式下载字体或资源。 */
|
|
983
|
-
pdf?: {
|
|
984
|
-
customFontBytes?: Uint8Array | ArrayBuffer;
|
|
985
|
-
customFontName?: string;
|
|
986
|
-
customFontFaces?: {
|
|
987
|
-
regular: Uint8Array | ArrayBuffer;
|
|
988
|
-
bold?: Uint8Array | ArrayBuffer;
|
|
989
|
-
italic?: Uint8Array | ArrayBuffer;
|
|
990
|
-
boldItalic?: Uint8Array | ArrayBuffer;
|
|
991
|
-
};
|
|
992
|
-
};
|
|
993
1563
|
xlsx?: {
|
|
994
1564
|
sheetMode?: "auto" | "pages" | "continuous";
|
|
995
1565
|
valueMode?: "text" | "raw";
|
|
@@ -1007,6 +1577,8 @@ export declare interface ReportRuntimeInput extends ReportTaskMonitoring {
|
|
|
1007
1577
|
reportIds: string[];
|
|
1008
1578
|
params?: Record<string, string>;
|
|
1009
1579
|
signal?: AbortSignal;
|
|
1580
|
+
/** Prepare using the same licensed font bytes later supplied to PDF output. */
|
|
1581
|
+
pdf?: ReportPdfFontOptions;
|
|
1010
1582
|
}
|
|
1011
1583
|
|
|
1012
1584
|
export declare interface ReportRuntimeOptions {
|
|
@@ -1019,6 +1591,25 @@ export declare interface ReportRuntimeOptions {
|
|
|
1019
1591
|
executor?: ReportRuntimeExecutor;
|
|
1020
1592
|
}
|
|
1021
1593
|
|
|
1594
|
+
/** Encode an existing plan without querying providers or repaginating. */
|
|
1595
|
+
export declare interface ReportRuntimePreparedExportInput extends ReportTaskMonitoring {
|
|
1596
|
+
prepared: PreparedReport;
|
|
1597
|
+
format: ReportRuntimeExportInput["format"];
|
|
1598
|
+
fidelity?: ReportRuntimeExportInput["fidelity"];
|
|
1599
|
+
pdf?: ReportPdfFontOptions;
|
|
1600
|
+
xlsx?: ReportRuntimeExportInput["xlsx"];
|
|
1601
|
+
signal?: AbortSignal;
|
|
1602
|
+
}
|
|
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
|
+
|
|
1022
1613
|
export declare interface ReportRuntimeStats {
|
|
1023
1614
|
rows: number;
|
|
1024
1615
|
pages: number;
|
|
@@ -1109,6 +1700,55 @@ declare interface ReportTemplate {
|
|
|
1109
1700
|
pages: TemplatePage[];
|
|
1110
1701
|
}
|
|
1111
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
|
+
|
|
1112
1752
|
declare interface ReportTemplateChange {
|
|
1113
1753
|
kind: "added" | "removed" | "modified" | "moved";
|
|
1114
1754
|
category: "metadata" | "structure" | "binding" | "calculation" | "format";
|
|
@@ -1136,6 +1776,17 @@ declare interface ReportTemplateDocument {
|
|
|
1136
1776
|
template: ReportTemplate;
|
|
1137
1777
|
}
|
|
1138
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
|
+
|
|
1139
1790
|
declare interface ReportTemplateFixture {
|
|
1140
1791
|
name: string;
|
|
1141
1792
|
datasets: DatasetRows;
|
|
@@ -1144,6 +1795,35 @@ declare interface ReportTemplateFixture {
|
|
|
1144
1795
|
|
|
1145
1796
|
declare type ReportTemplateLoader = (context: ReportLoadContext) => ReportTemplate | Promise<ReportTemplate>;
|
|
1146
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
|
+
|
|
1147
1827
|
declare interface ReportTemplateProvider {
|
|
1148
1828
|
list(context: {
|
|
1149
1829
|
signal?: AbortSignal;
|
|
@@ -1153,6 +1833,22 @@ declare interface ReportTemplateProvider {
|
|
|
1153
1833
|
}): Promise<ReportTemplateDocument | undefined>;
|
|
1154
1834
|
}
|
|
1155
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
|
+
|
|
1156
1852
|
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
1157
1853
|
declare interface ReportTemplateRepeat {
|
|
1158
1854
|
dataset: string;
|
|
@@ -1163,6 +1859,16 @@ declare interface ReportTemplateRepeat {
|
|
|
1163
1859
|
};
|
|
1164
1860
|
}
|
|
1165
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
|
+
|
|
1166
1872
|
declare interface ReportTemplateReview {
|
|
1167
1873
|
ok: boolean;
|
|
1168
1874
|
changes?: ReportTemplateDiff;
|
|
@@ -1200,8 +1906,78 @@ declare interface ReportTemplateReviewOptions {
|
|
|
1200
1906
|
strictOutputs?: boolean;
|
|
1201
1907
|
}
|
|
1202
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
|
+
|
|
1203
1923
|
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
1204
1924
|
|
|
1925
|
+
declare interface ReportTemplateVersion {
|
|
1926
|
+
revision: string;
|
|
1927
|
+
publishedAt: string;
|
|
1928
|
+
document: ReportTemplateDocument;
|
|
1929
|
+
restoredFrom?: string;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
/** Optional business explanations never replace raw data or schema validation. */
|
|
1933
|
+
declare type ReportValueState = "missing-source" | "not-applicable" | "not-calculable";
|
|
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
|
+
|
|
1205
1981
|
/** Publication gate with actual sequential PDF/XLSX encoding, no business query or implicit save. */
|
|
1206
1982
|
export declare function reviewReportPublication(input: unknown, options?: ReportPublicationOptions): Promise<ReportPublicationReview>;
|
|
1207
1983
|
|
|
@@ -1214,6 +1990,15 @@ declare interface RichParagraph {
|
|
|
1214
1990
|
indentMm?: number;
|
|
1215
1991
|
}
|
|
1216
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
|
+
|
|
1217
2002
|
declare interface RichSegment {
|
|
1218
2003
|
kind?: "text" | "field";
|
|
1219
2004
|
text?: string;
|
|
@@ -1221,6 +2006,19 @@ declare interface RichSegment {
|
|
|
1221
2006
|
style?: ComponentStyle;
|
|
1222
2007
|
}
|
|
1223
2008
|
|
|
2009
|
+
declare interface RichSegment_2 {
|
|
2010
|
+
kind?: "text" | "field";
|
|
2011
|
+
text?: string;
|
|
2012
|
+
field?: string;
|
|
2013
|
+
style?: ComponentStyle_2;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
/** Bounded fixed-label consumption, not cross-chunk aggregation or a new durable task queue.
|
|
2017
|
+
* The next source chunk is pulled only after execute + onReceipt complete. Earlier receipts
|
|
2018
|
+
* remain committed if a later chunk fails; use onReceipt for a durable incremental manifest.
|
|
2019
|
+
*/
|
|
2020
|
+
export declare function runLabelStream(source: AsyncIterable<object>, options: LabelStreamOptions): Promise<LabelStreamManifest>;
|
|
2021
|
+
|
|
1224
2022
|
export declare function runnableJob(record: ReportJobRecord, now: number): boolean;
|
|
1225
2023
|
|
|
1226
2024
|
/** Browser/Node shared bounded runner. Return small receipts; persist/export large artifacts inside execute. */
|
|
@@ -1229,6 +2027,8 @@ export declare function runReportBatch<T>(input: readonly ReportBatchCase[], exe
|
|
|
1229
2027
|
signal: AbortSignal;
|
|
1230
2028
|
}) => Promise<T>, options?: ReportBatchOptions): Promise<ReportBatchOutcome<T>[]>;
|
|
1231
2029
|
|
|
2030
|
+
export declare function saveAndPublishReportTemplate(manager: ReportTemplateManager, options: ReportWorkflowPublishInput): Promise<ReportTemplateRecord_2>;
|
|
2031
|
+
|
|
1232
2032
|
/** Canonical plain JSON rejects getters/scripts and gives stable idempotency without coercion. */
|
|
1233
2033
|
export declare function serializeJobJson(value: unknown, budget?: {
|
|
1234
2034
|
maxNodes?: number;
|
|
@@ -1252,8 +2052,28 @@ declare interface StyleRule {
|
|
|
1252
2052
|
style: Record<string, unknown>;
|
|
1253
2053
|
}
|
|
1254
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
|
+
|
|
1255
2068
|
declare type TemplateComponent = PlanComponent | ListComponent;
|
|
1256
2069
|
|
|
2070
|
+
declare type TemplateComponent_2 = PlanComponent_2 | ListComponent_2;
|
|
2071
|
+
|
|
2072
|
+
declare interface TemplateMutationOptions {
|
|
2073
|
+
expectedRevision: string | null;
|
|
2074
|
+
signal?: AbortSignal;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
1257
2077
|
declare interface TemplatePage {
|
|
1258
2078
|
widthMm: number;
|
|
1259
2079
|
heightMm: number;
|
|
@@ -1269,6 +2089,26 @@ declare interface TemplatePage {
|
|
|
1269
2089
|
meta?: Record<string, unknown>;
|
|
1270
2090
|
}
|
|
1271
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
|
+
|
|
1272
2112
|
/**
|
|
1273
2113
|
* 文本测量与折行(分页/Canvas/PDF 共用的唯一折行真相源)。
|
|
1274
2114
|
*
|
|
@@ -1309,6 +2149,26 @@ declare interface TreeTableOptions {
|
|
|
1309
2149
|
maxAggregationVisits?: number;
|
|
1310
2150
|
}
|
|
1311
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
|
+
|
|
1312
2172
|
export declare function validateJobRecord(record: ReportJobRecord, scope: string, id: string, expectedRevision: number | null): void;
|
|
1313
2173
|
|
|
1314
2174
|
export declare function validateJobTransition(previous: ReportJobRecord | undefined, next: ReportJobRecord): void;
|
|
@@ -1316,4 +2176,7 @@ export declare function validateJobTransition(previous: ReportJobRecord | undefi
|
|
|
1316
2176
|
/** The same declarative formatting used by list columns, before any output backend. */
|
|
1317
2177
|
declare type ValueFormat = ColumnFormat;
|
|
1318
2178
|
|
|
2179
|
+
/** The same declarative formatting used by list columns, before any output backend. */
|
|
2180
|
+
declare type ValueFormat_2 = ColumnFormat_2;
|
|
2181
|
+
|
|
1319
2182
|
export { }
|