@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/index.d.ts
CHANGED
|
@@ -16,9 +16,15 @@ export declare function applyReportCellEdit(plan: RenderPlan, edit: ReportCellEd
|
|
|
16
16
|
/** Transactional from the caller's perspective: a later conflict never exposes earlier writes. */
|
|
17
17
|
export declare function applyReportCellEditBatch(plan: RenderPlan, batch: Pick<ReportEditBatch, "edits">): RenderPlan;
|
|
18
18
|
|
|
19
|
+
/** Styles affect report content only, never the surrounding designer/preview theme. */
|
|
20
|
+
export declare function applyReportDocumentStyle(input: ReportTemplateDocument, pageIndex: number, indices: readonly number[], role: ReportDocumentStyle): ReportTemplateDocument;
|
|
21
|
+
|
|
19
22
|
/** Refresh concurrency metadata without changing values, layout, or the host's source objects. */
|
|
20
23
|
export declare function applyReportEditResult(plan: RenderPlan, batch: ReportEditBatch, result: void | ReportEditResult): RenderPlan;
|
|
21
24
|
|
|
25
|
+
/** Session-owned receipts survive reflow even when host rows have no concurrency fields. */
|
|
26
|
+
export declare function applyReportSourceMetadata(plan: RenderPlan, metadata: ReadonlyMap<string, ReportEditResult>): RenderPlan;
|
|
27
|
+
|
|
22
28
|
export declare function assertRenderPlan(input: unknown): PlanPage[];
|
|
23
29
|
|
|
24
30
|
export declare function assertReportParams(defs: readonly ReportParamDef[], input?: Record<string, unknown>): Record<string, string>;
|
|
@@ -34,7 +40,7 @@ export declare interface AssetRenderBudget {
|
|
|
34
40
|
maxDurationMs?: number;
|
|
35
41
|
}
|
|
36
42
|
|
|
37
|
-
export declare interface AssetRenderOptions extends OutputDiagnosticOptions {
|
|
43
|
+
export declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMediaOptions {
|
|
38
44
|
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
39
45
|
assetBudget?: AssetRenderBudget;
|
|
40
46
|
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
@@ -102,6 +108,8 @@ export declare interface CanvasRenderResult {
|
|
|
102
108
|
diagnostics: OutputDiagnostic[];
|
|
103
109
|
}
|
|
104
110
|
|
|
111
|
+
export declare function captureTemplateFragment(document: ReportTemplateDocument, pageIndex: number, indices: readonly number[], identity: Pick<ReportTemplateFragment, "id" | "name" | "revision">): ReportTemplateFragment;
|
|
112
|
+
|
|
105
113
|
export declare function charWidthEm(ch: string): number;
|
|
106
114
|
|
|
107
115
|
export declare type ClassKey = "root" | "page" | "comp" | "text" | "lines" | "line" | "rich" | "paragraph" | "segment" | "image" | "shape" | "grid" | "row" | "cell" | "unknown";
|
|
@@ -125,6 +133,9 @@ export declare interface CodeOptions {
|
|
|
125
133
|
showText?: boolean;
|
|
126
134
|
}
|
|
127
135
|
|
|
136
|
+
/** A flat, indexed outline allows the UI to render a bounded search window. */
|
|
137
|
+
export declare function collectTemplateOutline(template: ReportTemplate): TemplateOutlineEntry[];
|
|
138
|
+
|
|
128
139
|
/**
|
|
129
140
|
* 列值格式化(声明式、JSON 可序列化)。
|
|
130
141
|
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
@@ -267,6 +278,9 @@ export declare function createReportCellEditBatch(plan: RenderPlan, inputs: read
|
|
|
267
278
|
/** Operation-scoped index: avoids repeated geometry work without caching mutable plans globally. */
|
|
268
279
|
export declare function createReportCellResolver(plan: RenderPlan): (address: ReportCellAddress) => ReportCellContext | null;
|
|
269
280
|
|
|
281
|
+
/** Revalidates the current cell on activation; returns only bounded scalar values and explicit return state. */
|
|
282
|
+
export declare function createReportDrillRequest(plan: RenderPlan, address: ReportCellAddress, action: ReportDrillAction, params?: Readonly<Record<string, string>>): ReportDrillRequest;
|
|
283
|
+
|
|
270
284
|
/** Optional standalone entry; normal createReportSource/createLocalFetcher already register it. */
|
|
271
285
|
export declare function createReportEditSession(options: {
|
|
272
286
|
template: ReportTemplate;
|
|
@@ -490,11 +504,29 @@ export declare interface GridLayout {
|
|
|
490
504
|
edges: GridEdge[];
|
|
491
505
|
}
|
|
492
506
|
|
|
507
|
+
export declare function hasValidDataExplanation(value: {
|
|
508
|
+
target?: unknown;
|
|
509
|
+
valueState?: unknown;
|
|
510
|
+
}): boolean;
|
|
511
|
+
|
|
493
512
|
/** 启发式测量器:无 Canvas 时的默认宽度估算 */
|
|
494
513
|
export declare const heuristicMeasurer: TextMeasurer;
|
|
495
514
|
|
|
496
515
|
export declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
497
516
|
|
|
517
|
+
/** Bounded binary image inspection shared by PDF, Excel and template import. No decoder is loaded. */
|
|
518
|
+
declare interface ImageMediaOptions {
|
|
519
|
+
maxImageBytes?: number;
|
|
520
|
+
maxTotalImageBytes?: number;
|
|
521
|
+
maxImages?: number;
|
|
522
|
+
/** Decoded pixels per unique image, default 16 million. */
|
|
523
|
+
maxImagePixels?: number;
|
|
524
|
+
/** Total decoded pixels for unique media, default 64 million. */
|
|
525
|
+
maxTotalImagePixels?: number;
|
|
526
|
+
/** Maximum source dimension, default 16384 pixels. */
|
|
527
|
+
maxImageDimension?: number;
|
|
528
|
+
}
|
|
529
|
+
|
|
498
530
|
export declare interface ImageRenderOptions extends AsyncCanvasRenderOptions {
|
|
499
531
|
/** 图片格式(默认 png;jpeg 体积更小但无透明) */
|
|
500
532
|
format?: "png" | "jpeg";
|
|
@@ -507,14 +539,32 @@ export declare interface ImageRenderResult {
|
|
|
507
539
|
diagnostics: OutputDiagnostic[];
|
|
508
540
|
}
|
|
509
541
|
|
|
542
|
+
/** Row-major physical imposition. Record → copy → face order is preserved; no duplex reordering. */
|
|
543
|
+
export declare function imposeLabelSheets(plan: RenderPlan, options: LabelSheetOptions): RenderPlan;
|
|
544
|
+
|
|
545
|
+
/** Explicit replacement is atomic and preserves surrounding components and the document CAS revision. */
|
|
546
|
+
export declare function insertTemplateFragment(input: ReportTemplateDocument, fragment: ReportTemplateFragment, options: TemplateFragmentInsertOptions): TemplateFragmentResult;
|
|
547
|
+
|
|
510
548
|
export declare function inspectOutputCapabilities(plan: RenderPlan, format: OutputFormat): OutputDiagnostic[];
|
|
511
549
|
|
|
550
|
+
/** Includes rule, aggregate, relation and formula references; never evaluates expressions. */
|
|
551
|
+
export declare function inspectTemplateFieldUsage(template: ReportTemplate, dataset: string, field: string): TemplateFieldUsage[];
|
|
552
|
+
|
|
553
|
+
export declare function inspectTemplateFragmentBindings(fragment: ReportTemplateFragment): {
|
|
554
|
+
dataset: string;
|
|
555
|
+
fields: string[];
|
|
556
|
+
}[];
|
|
557
|
+
|
|
512
558
|
export declare function isImageBackedComponent(comp: PlanComponent): boolean;
|
|
513
559
|
|
|
560
|
+
export declare function isReportDataTarget(value: unknown): value is ReportDataTarget;
|
|
561
|
+
|
|
514
562
|
export declare function isReportDate(value: string): boolean;
|
|
515
563
|
|
|
516
564
|
export declare function isReportMonth(value: string): boolean;
|
|
517
565
|
|
|
566
|
+
export declare function isReportValueState(value: unknown): value is ReportValueState;
|
|
567
|
+
|
|
518
568
|
export declare function isReportYear(value: string): boolean;
|
|
519
569
|
|
|
520
570
|
export declare function isRichText(comp: PlanComponent): boolean;
|
|
@@ -537,6 +587,44 @@ export declare type LabelReportDefinitionOptions = LabelReportDefinitionBase & (
|
|
|
537
587
|
/** Named business row interfaces and readonly arrays need no index signature or conversion. */
|
|
538
588
|
export declare type LabelReportRows = readonly object[];
|
|
539
589
|
|
|
590
|
+
export declare class LabelSheetError extends Error {
|
|
591
|
+
readonly path: string;
|
|
592
|
+
readonly code = "label-sheet";
|
|
593
|
+
constructor(message: string, path: string);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
export declare interface LabelSheetOptions {
|
|
597
|
+
/** A4 defaults to 210 × 297 mm; custom sizes are explicit physical millimetres. */
|
|
598
|
+
paper?: "a4" | {
|
|
599
|
+
widthMm: number;
|
|
600
|
+
heightMm: number;
|
|
601
|
+
};
|
|
602
|
+
columns: number;
|
|
603
|
+
rows: number;
|
|
604
|
+
marginMm?: number | {
|
|
605
|
+
top: number;
|
|
606
|
+
left: number;
|
|
607
|
+
bottom: number;
|
|
608
|
+
right: number;
|
|
609
|
+
};
|
|
610
|
+
gapMm?: number | {
|
|
611
|
+
horizontal: number;
|
|
612
|
+
vertical: number;
|
|
613
|
+
};
|
|
614
|
+
/** Empty slots on the first sheet only (zero based, row-major). */
|
|
615
|
+
startSlot?: number;
|
|
616
|
+
/** Printer calibration; geometry outside the physical sheet is rejected. */
|
|
617
|
+
offsetMm?: {
|
|
618
|
+
x: number;
|
|
619
|
+
y: number;
|
|
620
|
+
};
|
|
621
|
+
maxSheets?: number;
|
|
622
|
+
maxComponents?: number;
|
|
623
|
+
/** Independent plain JSON snapshot budget, default 64 MB. */
|
|
624
|
+
maxSnapshotBytes?: number;
|
|
625
|
+
signal?: AbortSignal;
|
|
626
|
+
}
|
|
627
|
+
|
|
540
628
|
export declare interface LabelTemplateOptions extends ReportTemplateRepeat {
|
|
541
629
|
widthMm?: number;
|
|
542
630
|
heightMm?: number;
|
|
@@ -686,6 +774,9 @@ export declare interface LocalTemplateCatalogItem {
|
|
|
686
774
|
tags?: string[];
|
|
687
775
|
}
|
|
688
776
|
|
|
777
|
+
/** O(action count), no row scans or listeners per cell; invoke for the focused cell only. */
|
|
778
|
+
export declare function matchReportDrillActions(plan: RenderPlan, address: ReportCellAddress, actions: readonly ReportDrillAction[]): ReportDrillAction[];
|
|
779
|
+
|
|
689
780
|
declare interface MatrixTableOptions {
|
|
690
781
|
rowFields: readonly string[];
|
|
691
782
|
columnFields: readonly string[];
|
|
@@ -725,7 +816,7 @@ export declare class OutputAssetError extends Error {
|
|
|
725
816
|
}
|
|
726
817
|
|
|
727
818
|
export declare interface OutputDiagnostic {
|
|
728
|
-
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";
|
|
819
|
+
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";
|
|
729
820
|
severity: "warning";
|
|
730
821
|
format: OutputFormat;
|
|
731
822
|
pageIndex: number;
|
|
@@ -948,7 +1039,7 @@ export declare function ptToPx(pt: number, dpi?: number): number;
|
|
|
948
1039
|
|
|
949
1040
|
export declare function pxToMm(value: number, dpi?: number): number;
|
|
950
1041
|
|
|
951
|
-
/** Registers
|
|
1042
|
+
/** Registers a bounded descriptor guard. Immutable strings are retained, never rescanned character by character. */
|
|
952
1043
|
export declare function registerReportEditSession(initial: RenderPlan, registration: ReportEditSessionRegistration): ReportEditSession;
|
|
953
1044
|
|
|
954
1045
|
/** Reflow changes coordinates; history targets are resolved by business source every time. */
|
|
@@ -1111,6 +1202,8 @@ export declare type ReportCellReadOnlyReason = "cell" | "formula" | "complex" |
|
|
|
1111
1202
|
|
|
1112
1203
|
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1113
1204
|
export declare interface ReportCellSource {
|
|
1205
|
+
/** Source identity across report occurrences; sharing must be explicitly declared. */
|
|
1206
|
+
sourceScope?: string;
|
|
1114
1207
|
datasetId: string;
|
|
1115
1208
|
rowKey: string | number;
|
|
1116
1209
|
field: string;
|
|
@@ -1130,6 +1223,16 @@ export declare type ReportCellValue = string | number | boolean | null;
|
|
|
1130
1223
|
|
|
1131
1224
|
export declare type ReportCellValueType = NonNullable<GridCell["valueType"]>;
|
|
1132
1225
|
|
|
1226
|
+
export declare interface ReportDataTarget {
|
|
1227
|
+
datasetId: string;
|
|
1228
|
+
field: string;
|
|
1229
|
+
rowKey?: string | number;
|
|
1230
|
+
/** Use table identity when the same dataset appears in several tables. */
|
|
1231
|
+
tableId?: string;
|
|
1232
|
+
/** Assigned by the source/runtime when several reports share dataset names. */
|
|
1233
|
+
reportScope?: string;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1133
1236
|
/** Wire values deliberately remain strings in browsers, Workers and backend runtimes. */
|
|
1134
1237
|
export declare interface ReportDateRange {
|
|
1135
1238
|
start: string;
|
|
@@ -1137,6 +1240,8 @@ export declare interface ReportDateRange {
|
|
|
1137
1240
|
}
|
|
1138
1241
|
|
|
1139
1242
|
export declare interface ReportDefinition {
|
|
1243
|
+
/** Explicitly shared editable data identity. Omit to isolate each report occurrence. */
|
|
1244
|
+
sourceScope?: string;
|
|
1140
1245
|
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
1141
1246
|
template: ReportTemplate | ReportTemplateLoader;
|
|
1142
1247
|
/** 静态数据;load 存在时优先使用 load 的结果。 */
|
|
@@ -1162,6 +1267,56 @@ export declare interface ReportDiagnostic {
|
|
|
1162
1267
|
message: string;
|
|
1163
1268
|
path?: string;
|
|
1164
1269
|
severity: "warning" | "error" | "info";
|
|
1270
|
+
/** Optional explanation supplied by the business source, not inferred from blank cells. */
|
|
1271
|
+
valueState?: ReportValueState;
|
|
1272
|
+
target?: ReportDataTarget;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
export declare interface ReportDocumentStyle {
|
|
1276
|
+
id: string;
|
|
1277
|
+
name: string;
|
|
1278
|
+
style: ComponentStyle;
|
|
1279
|
+
target?: "content" | "header";
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
/** Serializable action metadata. URLs, scripts and automatic navigation are deliberately absent. */
|
|
1283
|
+
export declare interface ReportDrillAction {
|
|
1284
|
+
id: string;
|
|
1285
|
+
label: string;
|
|
1286
|
+
target: {
|
|
1287
|
+
field: string;
|
|
1288
|
+
datasetId?: string;
|
|
1289
|
+
reportScope?: string;
|
|
1290
|
+
roles?: readonly string[];
|
|
1291
|
+
};
|
|
1292
|
+
params?: Readonly<Record<string, ReportDrillBinding>>;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
export declare type ReportDrillBinding = {
|
|
1296
|
+
value: string | number | boolean;
|
|
1297
|
+
} | {
|
|
1298
|
+
from: "value" | "rowKey";
|
|
1299
|
+
} | {
|
|
1300
|
+
from: "query" | "field";
|
|
1301
|
+
field: string;
|
|
1302
|
+
};
|
|
1303
|
+
|
|
1304
|
+
export declare class ReportDrillError extends Error {
|
|
1305
|
+
readonly code: "config" | "missing-value" | "target";
|
|
1306
|
+
constructor(code: "config" | "missing-value" | "target");
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
export declare interface ReportDrillRequest {
|
|
1310
|
+
actionId: string;
|
|
1311
|
+
params: Readonly<Record<string, string>>;
|
|
1312
|
+
returnState: Readonly<ReportDrillReturnState>;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
export declare interface ReportDrillReturnState {
|
|
1316
|
+
params: Readonly<Record<string, string>>;
|
|
1317
|
+
address: Readonly<ReportCellAddress>;
|
|
1318
|
+
reportScope?: string;
|
|
1319
|
+
source?: Readonly<Pick<ReportCellSource, "sourceScope" | "datasetId" | "rowKey" | "field">>;
|
|
1165
1320
|
}
|
|
1166
1321
|
|
|
1167
1322
|
export declare interface ReportEditBatch {
|
|
@@ -1199,6 +1354,7 @@ export declare interface ReportEditSession {
|
|
|
1199
1354
|
declare interface ReportEditSessionPart {
|
|
1200
1355
|
template: ReportTemplate;
|
|
1201
1356
|
datasets: DatasetRows;
|
|
1357
|
+
sourceScope?: string;
|
|
1202
1358
|
}
|
|
1203
1359
|
|
|
1204
1360
|
export declare interface ReportEditSessionRegistration {
|
|
@@ -1231,7 +1387,8 @@ export declare interface ReportFetchInput extends ReportTaskMonitoring {
|
|
|
1231
1387
|
signal?: AbortSignal;
|
|
1232
1388
|
/** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
|
|
1233
1389
|
onWarning?: (message: string) => void;
|
|
1234
|
-
|
|
1390
|
+
/** Index scopes diagnostics when reports share datasets or a report ID is repeated. */
|
|
1391
|
+
onQueryResult?: (reportId: string, result: ReportQueryResult, reportIndex?: number) => void;
|
|
1235
1392
|
}
|
|
1236
1393
|
|
|
1237
1394
|
export declare interface ReportFieldContract {
|
|
@@ -1288,6 +1445,10 @@ export declare interface ReportParamDef {
|
|
|
1288
1445
|
label: string;
|
|
1289
1446
|
value: string;
|
|
1290
1447
|
}>;
|
|
1448
|
+
/** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
|
|
1449
|
+
optionsSource?: string;
|
|
1450
|
+
/** Select dependencies must be declared parameters; changing a parent clears descendants. */
|
|
1451
|
+
dependsOn?: string[];
|
|
1291
1452
|
defaultValue?: string;
|
|
1292
1453
|
required?: boolean;
|
|
1293
1454
|
placeholder?: string;
|
|
@@ -1305,7 +1466,7 @@ export declare interface ReportParamIssue {
|
|
|
1305
1466
|
message: string;
|
|
1306
1467
|
}
|
|
1307
1468
|
|
|
1308
|
-
export declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
1469
|
+
export declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "dependency" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
1309
1470
|
|
|
1310
1471
|
/** 描述 typedValues 的 Draft 2020-12 Schema;日期区间额外保留 x-report-* 扩展。 */
|
|
1311
1472
|
export declare function reportParamsJsonSchema(defs: readonly ReportParamDef[]): Record<string, unknown>;
|
|
@@ -1517,6 +1678,15 @@ export declare interface ReportTemplateFixture {
|
|
|
1517
1678
|
params?: Record<string, string>;
|
|
1518
1679
|
}
|
|
1519
1680
|
|
|
1681
|
+
/** Plain JSON, versioned by the host; inserting never links mutable library objects. */
|
|
1682
|
+
export declare interface ReportTemplateFragment {
|
|
1683
|
+
id: string;
|
|
1684
|
+
name: string;
|
|
1685
|
+
revision: string;
|
|
1686
|
+
components: TemplateComponent[];
|
|
1687
|
+
repeatDataset?: string;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1520
1690
|
export declare type ReportTemplateLoader = (context: ReportLoadContext) => ReportTemplate | Promise<ReportTemplate>;
|
|
1521
1691
|
|
|
1522
1692
|
export declare interface ReportTemplateManager {
|
|
@@ -1581,6 +1751,11 @@ export declare interface ReportTemplateReview {
|
|
|
1581
1751
|
}>;
|
|
1582
1752
|
}
|
|
1583
1753
|
|
|
1754
|
+
export declare interface ReportTemplateReviewAsyncOptions extends ReportTemplateReviewOptions {
|
|
1755
|
+
signal?: AbortSignal;
|
|
1756
|
+
onProgress?: (progress: ReportTemplateReviewProgress) => void;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1584
1759
|
export declare interface ReportTemplateReviewIssue {
|
|
1585
1760
|
code: "template" | "compatibility" | "dataset" | "field" | "sample" | "layout" | "output" | "params";
|
|
1586
1761
|
severity: "error" | "warning";
|
|
@@ -1606,6 +1781,13 @@ export declare interface ReportTemplateReviewOptions {
|
|
|
1606
1781
|
strictOutputs?: boolean;
|
|
1607
1782
|
}
|
|
1608
1783
|
|
|
1784
|
+
export declare interface ReportTemplateReviewProgress {
|
|
1785
|
+
completed: number;
|
|
1786
|
+
total: number;
|
|
1787
|
+
stage: "template" | "baseline" | "bindings" | "fixture";
|
|
1788
|
+
fixture?: string;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1609
1791
|
/** compareAndSwap 必须由宿主数据库/文件适配器保证原子性,不能用先读再无条件写替代。 */
|
|
1610
1792
|
export declare interface ReportTemplateStore {
|
|
1611
1793
|
read(id: string, signal?: AbortSignal): Promise<ReportTemplateRecord | undefined>;
|
|
@@ -1634,6 +1816,9 @@ export declare interface ReportTemplateVersion {
|
|
|
1634
1816
|
restoredFrom?: string;
|
|
1635
1817
|
}
|
|
1636
1818
|
|
|
1819
|
+
/** Optional business explanations never replace raw data or schema validation. */
|
|
1820
|
+
export declare type ReportValueState = "missing-source" | "not-applicable" | "not-calculable";
|
|
1821
|
+
|
|
1637
1822
|
/**
|
|
1638
1823
|
* 边框开关解析:
|
|
1639
1824
|
* - 未声明(undefined)→ 四边全开(与既有 rect 总有边框的行为兼容)
|
|
@@ -1690,6 +1875,9 @@ export declare interface ResolvePlanAssetsOptions extends AssetRenderOptions {
|
|
|
1690
1875
|
end?: number;
|
|
1691
1876
|
}
|
|
1692
1877
|
|
|
1878
|
+
/** Resolve a stable business cell after requery/reordering; missing rows never fall back to another row. */
|
|
1879
|
+
export declare function resolveReportDrillReturn(plan: RenderPlan, state: ReportDrillReturnState): ReportCellAddress | null;
|
|
1880
|
+
|
|
1693
1881
|
/** 描边解析:颜色 + 线宽(pt) */
|
|
1694
1882
|
export declare function resolveStroke(style: Pick<ComponentStyle, "borderColor" | "lineColor" | "lineWidthPt"> | undefined, fallbackColor?: string): {
|
|
1695
1883
|
color: string;
|
|
@@ -1702,6 +1890,9 @@ export declare function resolveTextColor(style: Pick<ComponentStyle, "color"> |
|
|
|
1702
1890
|
/** Pure preflight uses explicit samples only; it never fetches business data or publishes a draft. */
|
|
1703
1891
|
export declare function reviewReportTemplate(input: unknown, options?: ReportTemplateReviewOptions): ReportTemplateReview;
|
|
1704
1892
|
|
|
1893
|
+
/** Yields between structural/baseline checks and every bounded fixture; no fetching or persistence. */
|
|
1894
|
+
export declare function reviewReportTemplateAsync(input: unknown, options?: ReportTemplateReviewAsyncOptions): Promise<ReportTemplateReview>;
|
|
1895
|
+
|
|
1705
1896
|
export declare interface RichParagraph {
|
|
1706
1897
|
segments: RichSegment[];
|
|
1707
1898
|
align?: ComponentStyle["align"];
|
|
@@ -1812,11 +2003,50 @@ export declare class TemplateBuilder {
|
|
|
1812
2003
|
|
|
1813
2004
|
export declare type TemplateComponent = PlanComponent | ListComponent;
|
|
1814
2005
|
|
|
2006
|
+
export declare interface TemplateFieldUsage extends TemplateOutlineLocation {
|
|
2007
|
+
dataset: string;
|
|
2008
|
+
field: string;
|
|
2009
|
+
kind: "display" | "calculation" | "binding";
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
export declare interface TemplateFragmentBindings {
|
|
2013
|
+
datasets?: Record<string, string>;
|
|
2014
|
+
fields?: Record<string, Record<string, string>>;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
export declare interface TemplateFragmentInsertOptions {
|
|
2018
|
+
pageIndex: number;
|
|
2019
|
+
leftMm?: number;
|
|
2020
|
+
topMm?: number;
|
|
2021
|
+
bindings?: TemplateFragmentBindings;
|
|
2022
|
+
replaceInstance?: string;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
export declare interface TemplateFragmentResult {
|
|
2026
|
+
document: ReportTemplateDocument;
|
|
2027
|
+
componentIndices: number[];
|
|
2028
|
+
instance: string;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
1815
2031
|
export declare interface TemplateMutationOptions {
|
|
1816
2032
|
expectedRevision: string | null;
|
|
1817
2033
|
signal?: AbortSignal;
|
|
1818
2034
|
}
|
|
1819
2035
|
|
|
2036
|
+
export declare interface TemplateOutlineEntry extends TemplateOutlineLocation {
|
|
2037
|
+
kind: "page" | "component" | "field" | "calculation" | "binding";
|
|
2038
|
+
title: string;
|
|
2039
|
+
dataset?: string;
|
|
2040
|
+
depth: number;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
export declare interface TemplateOutlineLocation {
|
|
2044
|
+
path: string;
|
|
2045
|
+
pageIndex?: number;
|
|
2046
|
+
componentIndex?: number;
|
|
2047
|
+
field?: string;
|
|
2048
|
+
}
|
|
2049
|
+
|
|
1820
2050
|
export declare interface TemplatePage {
|
|
1821
2051
|
widthMm: number;
|
|
1822
2052
|
heightMm: number;
|
|
@@ -1832,6 +2062,8 @@ export declare interface TemplatePage {
|
|
|
1832
2062
|
meta?: Record<string, unknown>;
|
|
1833
2063
|
}
|
|
1834
2064
|
|
|
2065
|
+
export declare function templatePathLocation(path: string): Pick<TemplateOutlineLocation, "pageIndex" | "componentIndex">;
|
|
2066
|
+
|
|
1835
2067
|
export declare interface TemplateStoreWriteOptions {
|
|
1836
2068
|
publication?: ReportTemplateVersion;
|
|
1837
2069
|
signal?: AbortSignal;
|
|
@@ -1917,6 +2149,8 @@ export declare function validateRenderPlan(input: unknown): ValidationResult;
|
|
|
1917
2149
|
/** Check configuration before opening an input, including JSON/JavaScript callers. */
|
|
1918
2150
|
export declare function validateReportCellFieldDefinition(context: ReportCellContext, field: ReportCellFieldOptions): void;
|
|
1919
2151
|
|
|
2152
|
+
export declare function validateReportDrillActions(actions: readonly ReportDrillAction[]): void;
|
|
2153
|
+
|
|
1920
2154
|
/** 模板参数配置错误也统一返回结构化问题,不让无效默认值或边界静默进入后端。 */
|
|
1921
2155
|
export declare function validateReportParamDefinitions(defs: readonly ReportParamDef[]): ReportParamIssue[];
|
|
1922
2156
|
|