@agile-team/mach-report 2.17.0 → 2.18.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.
Files changed (168) hide show
  1. package/README.md +18 -9
  2. package/dist/{ExcelBindingWizard-Bq6FYME6.cjs → ExcelBindingWizard-Czn3C2yE.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-Co1svTsw.js → ExcelBindingWizard-DMGZj6I6.js} +3 -3
  4. package/dist/ParamEditor-KzDQvbHY.js +732 -0
  5. package/dist/ParamEditor-oDfD8LgE.cjs +1 -0
  6. package/dist/{ReportBatchPanel-uQh06usx.js → ReportBatchPanel-BJK7PvZ4.js} +39 -39
  7. package/dist/ReportBatchPanel-DnmNRssu.cjs +1 -0
  8. package/dist/ReportParamPanel-mQkeN70Q.js +1020 -0
  9. package/dist/ReportParamPanel-sOANVRz-.cjs +1 -0
  10. package/dist/ReportPreview-BxWWTUL5.js +5583 -0
  11. package/dist/ReportPreview-Yf99omi3.cjs +6 -0
  12. package/dist/{ReportTemplateLibrary-TIL_Oj2l.js → ReportTemplateLibrary-BFjB08Wu.js} +1 -1
  13. package/dist/{ReportTemplateLibrary-CnP7_1pH.cjs → ReportTemplateLibrary-BO42QnWd.cjs} +1 -1
  14. package/dist/RuleEditor-CqxT1a-W.js +2337 -0
  15. package/dist/RuleEditor-D7YWigD9.cjs +1 -0
  16. package/dist/{TemplateOutlinePanel-BlLxRrfu.cjs → TemplateOutlinePanel-B0XX350V.cjs} +1 -1
  17. package/dist/{TemplateOutlinePanel-BouxsuqQ.js → TemplateOutlinePanel-zG0DrsIB.js} +2 -2
  18. package/dist/{TemplateReusePanel-yxsHSO40.cjs → TemplateReusePanel-BD0HSKp_.cjs} +1 -1
  19. package/dist/{TemplateReusePanel-BEACLPaN.js → TemplateReusePanel-Czwe5GbC.js} +2 -2
  20. package/dist/{TemplateReviewPanel-D9Cx0m2N.cjs → TemplateReviewPanel-CA5sdffM.cjs} +1 -1
  21. package/dist/{TemplateReviewPanel-B1OGRY2i.js → TemplateReviewPanel-NhmQI65C.js} +2 -2
  22. package/dist/analytics.cjs +1 -1
  23. package/dist/analytics.d.cts +100 -41
  24. package/dist/analytics.d.ts +100 -41
  25. package/dist/analytics.js +76 -141
  26. package/dist/artifact-integrity.json +108 -102
  27. package/dist/assets-2eC3mOcV.js +232 -0
  28. package/dist/assets-B0Hxn4l6.cjs +1 -0
  29. package/dist/{auto-DDHflI9v.cjs → auto-B0EZFIK1.cjs} +1 -1
  30. package/dist/{auto-BIOmtVhk.js → auto-BlchZ1b8.js} +19 -19
  31. package/dist/{batch-WzDIXJAt.js → batch-DGCt44XM.js} +1 -1
  32. package/dist/{batch-z6Aw5GEY.cjs → batch-DYcokH4v.cjs} +1 -1
  33. package/dist/charts-Dlv8j2AG.js +141 -0
  34. package/dist/charts-aCtoswXq.cjs +1 -0
  35. package/dist/codes.cjs +9 -9
  36. package/dist/codes.d.cts +54 -0
  37. package/dist/codes.d.ts +54 -0
  38. package/dist/codes.js +12097 -13668
  39. package/dist/column-visual-BpgQVWwT.js +238 -0
  40. package/dist/column-visual-CtYxnBCP.cjs +1 -0
  41. package/dist/component-tree-6TV7W6Yj.cjs +1 -0
  42. package/dist/component-tree-CvW4lzpv.js +67 -0
  43. package/dist/computed-4TnxzgIh.cjs +1 -0
  44. package/dist/computed-C8NRZQss.js +739 -0
  45. package/dist/data-bar-Ce38juRZ.cjs +1 -0
  46. package/dist/data-bar-PtjXhMgN.js +9 -0
  47. package/dist/designer--TKECSEc.cjs +2 -0
  48. package/dist/designer-d6hJS41w.js +5683 -0
  49. package/dist/designer.cjs +1 -1
  50. package/dist/designer.d.cts +710 -42
  51. package/dist/designer.d.ts +710 -42
  52. package/dist/designer.js +23 -20
  53. package/dist/{encoding-BFMFIc4r.cjs → encoding-B--eZpp1.cjs} +1 -1
  54. package/dist/{encoding-DP_Eaf0A.js → encoding-mctOLocI.js} +2 -2
  55. package/dist/{font-loader-7FWVlykp.cjs → font-loader-DBBJ5KE9.cjs} +1 -1
  56. package/dist/{font-loader-CQZowp0I.js → font-loader-DW8tIaNp.js} +1 -1
  57. package/dist/index-CPh6tqge.js +1575 -0
  58. package/dist/index-CUNw7dL9.cjs +1 -0
  59. package/dist/index.cjs +7 -7
  60. package/dist/index.d.cts +361 -15
  61. package/dist/index.d.ts +361 -15
  62. package/dist/index.js +876 -835
  63. package/dist/json-snapshot-By4ZVVUt.js +1967 -0
  64. package/dist/json-snapshot-jiXff4lc.cjs +2 -0
  65. package/dist/matrix-0hywp0-F.cjs +1 -0
  66. package/dist/matrix-Dy-tyY7E.js +381 -0
  67. package/dist/param-validation-C-8sRJLq.cjs +1 -0
  68. package/dist/param-validation-CnDEd2l-.js +333 -0
  69. package/dist/{pdf-l3ea86di.js → pdf-CKROKygt.js} +1851 -1849
  70. package/dist/{pdf-B8JouyYv.cjs → pdf-DqyxJ96U.cjs} +46 -46
  71. package/dist/pdf.cjs +1 -1
  72. package/dist/pdf.d.cts +54 -0
  73. package/dist/pdf.d.ts +54 -0
  74. package/dist/pdf.js +2 -2
  75. package/dist/{plugin-BBp74CQZ.js → plugin-ByjF2kiV.js} +5 -5
  76. package/dist/{plugin-CtFX9PFG.cjs → plugin-DM1M2wlI.cjs} +1 -1
  77. package/dist/prefill-B8H9qwE4.js +371 -0
  78. package/dist/prefill-D7EswyTI.cjs +1 -0
  79. package/dist/{prepared-CARicKYh.js → prepared-BE-4jfX5.js} +2 -2
  80. package/dist/{prepared-Ch1x_Gog.cjs → prepared-CGVphji3.cjs} +1 -1
  81. package/dist/{protocol-B5A2uom4.cjs → protocol-ByRVzzQG.cjs} +1 -1
  82. package/dist/{protocol-BaiWjq5w.js → protocol-Cr81vFSQ.js} +3 -3
  83. package/dist/{record-bindings-D4TuMzHs.js → record-bindings-DEJtmo3p.js} +67 -107
  84. package/dist/record-bindings-ehjnCDHt.cjs +1 -0
  85. package/dist/{region-binding-workflow-BNasF5kz.js → region-binding-workflow-CBg0l_tj.js} +1 -1
  86. package/dist/{region-binding-workflow-O2Cni3mF.cjs → region-binding-workflow-D05tOYn3.cjs} +1 -1
  87. package/dist/report-encoding-worker.cjs +1 -1
  88. package/dist/report-encoding-worker.js +1 -1
  89. package/dist/{report-params-B1RzkhJj.js → report-params-D9tBuM9B.js} +1 -1
  90. package/dist/{report-params-WDGrA4oP.cjs → report-params-VTg8MoCp.cjs} +1 -1
  91. package/dist/runtime-CDA6d263.cjs +1 -0
  92. package/dist/runtime-CEMvybO7.js +170 -0
  93. package/dist/sbom.cdx.json +1 -1
  94. package/dist/server/node.d.cts +75 -7
  95. package/dist/server/node.d.ts +75 -7
  96. package/dist/server-node.cjs +4 -4
  97. package/dist/server-node.js +2692 -1990
  98. package/dist/server.cjs +1 -1
  99. package/dist/server.d.cts +243 -28
  100. package/dist/server.d.ts +243 -28
  101. package/dist/server.js +28 -28
  102. package/dist/sha256-BDQ1Qk7A.js +158 -0
  103. package/dist/sha256-DgZAKXqI.cjs +1 -0
  104. package/dist/style.css +1 -1
  105. package/dist/template-bindings-Cg5oBLFT.cjs +1 -0
  106. package/dist/template-bindings-TKnXM7ll.js +62 -0
  107. package/dist/{template-catalog-wT1fNeAP.js → template-catalog-CmbWOJqy.js} +16 -16
  108. package/dist/{template-catalog-Dua8h9ZA.cjs → template-catalog-Utu4GP09.cjs} +1 -1
  109. package/dist/{template-fragments-BajTajb4.cjs → template-fragments-C_zSHJAa.cjs} +1 -1
  110. package/dist/{template-fragments-DmX5XK4N.js → template-fragments-DWgo9tlZ.js} +2 -2
  111. package/dist/{template-outline-BwRV_eRo.cjs → template-outline-DWkzZXVC.cjs} +1 -1
  112. package/dist/{template-outline-cnWfT_LK.js → template-outline-DiADphlq.js} +1 -1
  113. package/dist/{template-registry-u11fPd8D.js → template-registry-BIhIHOab.js} +319 -314
  114. package/dist/template-registry-DzWswQI5.cjs +1 -0
  115. package/dist/vue/async.d.cts +528 -33
  116. package/dist/vue/async.d.ts +528 -33
  117. package/dist/vue/index.d.cts +616 -64
  118. package/dist/vue/index.d.ts +616 -64
  119. package/dist/vue-async.cjs +1 -1
  120. package/dist/vue-async.js +3 -3
  121. package/dist/vue.cjs +1 -1
  122. package/dist/vue.js +94 -89
  123. package/dist/{workbook-session-DN5LSA5C.cjs → workbook-session-B94EwVa_.cjs} +1 -1
  124. package/dist/{workbook-session-B8pNW24X.js → workbook-session-BoScoOg-.js} +2 -2
  125. package/dist/worker.cjs +1 -1
  126. package/dist/worker.d.cts +75 -7
  127. package/dist/worker.d.ts +75 -7
  128. package/dist/worker.js +4 -4
  129. package/dist/xlsx.cjs +4 -4
  130. package/dist/xlsx.d.cts +120 -13
  131. package/dist/xlsx.d.ts +120 -13
  132. package/dist/xlsx.js +313 -279
  133. package/package.json +1 -1
  134. package/dist/ParamEditor-B5UZRgxv.cjs +0 -1
  135. package/dist/ParamEditor-DNNARyeB.js +0 -594
  136. package/dist/ReportBatchPanel-Ctvs2t_9.cjs +0 -1
  137. package/dist/ReportPreview-BdQawRh0.js +0 -4879
  138. package/dist/ReportPreview-CJC_-j2I.cjs +0 -6
  139. package/dist/RuleEditor-DkRjOLlr.js +0 -2141
  140. package/dist/RuleEditor-h5anGsDB.cjs +0 -1
  141. package/dist/assets-BIMVwjQe.js +0 -231
  142. package/dist/assets-Dfs2ElxI.cjs +0 -1
  143. package/dist/component-tree-Ca6YYfHq.js +0 -61
  144. package/dist/component-tree-DkGLEfZC.cjs +0 -1
  145. package/dist/computed-BW5a8QFk.js +0 -612
  146. package/dist/computed-C2GD3XcE.cjs +0 -1
  147. package/dist/config-Dg_o8e7m.cjs +0 -1
  148. package/dist/config-XQ4qrQ7Q.js +0 -844
  149. package/dist/designer-D9XAxqSc.js +0 -5178
  150. package/dist/designer-uCDo5XSK.cjs +0 -2
  151. package/dist/drill-ByN8COs_.cjs +0 -1
  152. package/dist/drill-CKW3Xtfa.js +0 -145
  153. package/dist/json-snapshot-D7PE1NsU.cjs +0 -2
  154. package/dist/json-snapshot-DYmEe3sO.js +0 -1779
  155. package/dist/matrix-JLAXlux-.js +0 -302
  156. package/dist/matrix-gTHpDTGm.cjs +0 -1
  157. package/dist/param-validation-C3HlcLLO.cjs +0 -1
  158. package/dist/param-validation-Do7Eg8Zv.js +0 -181
  159. package/dist/record-bindings-B86Sur_y.cjs +0 -1
  160. package/dist/runtime-DakRXui3.js +0 -170
  161. package/dist/runtime-dL5ygIfa.cjs +0 -1
  162. package/dist/sha256-BshdOkCC.cjs +0 -1
  163. package/dist/sha256-DTG-Gq8i.js +0 -157
  164. package/dist/template-bindings-C2SpvsMU.js +0 -58
  165. package/dist/template-bindings-CEtWyiLX.cjs +0 -1
  166. package/dist/template-registry-CpysHAxy.cjs +0 -1
  167. package/dist/tree-CLpxYbKa.cjs +0 -1
  168. package/dist/tree-DNJorJUf.js +0 -172
@@ -17,8 +17,39 @@ declare interface AggregateDefinition_2 {
17
17
  numeric?: "number" | "decimal";
18
18
  digits?: number;
19
19
  }
20
+ declare interface AggregateDefinition_3 {
21
+ /** Output column; valueField defaults to this field. */
22
+ field: string;
23
+ op: AggregateOperation_3;
24
+ valueField?: string;
25
+ weightField?: string;
26
+ numeric?: "number" | "decimal";
27
+ digits?: number;
28
+ }
20
29
  declare type AggregateOperation = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
21
30
  declare type AggregateOperation_2 = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
31
+ declare type AggregateOperation_3 = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
32
+ declare interface AggregateRequest {
33
+ op: AggregateOperation;
34
+ field?: string;
35
+ weightField?: string;
36
+ numeric?: "number" | "decimal";
37
+ digits?: number;
38
+ }
39
+ declare interface AggregateRequest_2 {
40
+ op: AggregateOperation_2;
41
+ field?: string;
42
+ weightField?: string;
43
+ numeric?: "number" | "decimal";
44
+ digits?: number;
45
+ }
46
+ declare interface AggregateRequest_3 {
47
+ op: AggregateOperation_3;
48
+ field?: string;
49
+ weightField?: string;
50
+ numeric?: "number" | "decimal";
51
+ digits?: number;
52
+ }
22
53
  declare interface AssetRenderBudget {
23
54
  /** Maximum newly rendered assets, default 1000. Existing imageData is kept unchanged. */
24
55
  maxAssets?: number;
@@ -164,6 +195,38 @@ declare type ColumnFormat_3 = {
164
195
  kind: "date";
165
196
  pattern?: string;
166
197
  };
198
+ declare type ColumnVisual = {
199
+ /** Defaults to the column field; never changes the cell's raw value or business identity. */
200
+ field?: string;
201
+ /** Numeric text requires explicit opt-in; formatting an identifier does not turn it into a measure. */
202
+ numeric?: "number" | "decimal";
203
+ min?: number;
204
+ max?: number;
205
+ } & ({
206
+ kind: "colorScale";
207
+ lowColor?: string;
208
+ highColor?: string;
209
+ } | {
210
+ kind: "dataBar";
211
+ color?: string;
212
+ negativeColor?: string;
213
+ });
214
+ declare type ColumnVisual_2 = {
215
+ /** Defaults to the column field; never changes the cell's raw value or business identity. */
216
+ field?: string;
217
+ /** Numeric text requires explicit opt-in; formatting an identifier does not turn it into a measure. */
218
+ numeric?: "number" | "decimal";
219
+ min?: number;
220
+ max?: number;
221
+ } & ({
222
+ kind: "colorScale";
223
+ lowColor?: string;
224
+ highColor?: string;
225
+ } | {
226
+ kind: "dataBar";
227
+ color?: string;
228
+ negativeColor?: string;
229
+ });
167
230
  declare interface ComponentAssetRegistry {
168
231
  rendererFor(component: Readonly<PlanComponent>): ComponentImageRenderer | undefined;
169
232
  hasExtension(id: string, version: string, kind: string): boolean;
@@ -302,6 +365,15 @@ declare interface ComputedField_2 extends ExpressionOptions_2 {
302
365
  /** String adapter expressions cannot be inspected; declare dependencies explicitly. */
303
366
  dependsOn?: readonly string[];
304
367
  }
368
+ declare interface ComputedField_3 extends ExpressionOptions_3 {
369
+ field: string;
370
+ expression: ReportExpression_3 | string;
371
+ /** Scope controls aggregate inputs; row expressions may reference the current row in any scope. */
372
+ scope?: "row" | "group" | "dataset";
373
+ groupBy?: readonly string[];
374
+ /** String adapter expressions cannot be inspected; declare dependencies explicitly. */
375
+ dependsOn?: readonly string[];
376
+ }
305
377
  declare interface DatasetContract {
306
378
  fields: readonly ReportFieldContract[];
307
379
  rowKey?: string;
@@ -399,6 +471,12 @@ declare interface ExpressionOptions_2 {
399
471
  nulls?: "propagate" | "error";
400
472
  divisionByZero?: "null" | "error";
401
473
  }
474
+ declare interface ExpressionOptions_3 {
475
+ numeric?: "number" | "decimal";
476
+ digits?: number;
477
+ nulls?: "propagate" | "error";
478
+ divisionByZero?: "null" | "error";
479
+ }
402
480
  declare interface FormulaAdapter {
403
481
  /** Explicit trusted engine; core never evaluates source code/macros/external workbook references. */
404
482
  evaluate(expression: string, context: {
@@ -407,7 +485,21 @@ declare interface FormulaAdapter {
407
485
  rows: readonly Record<string, unknown>[];
408
486
  }): unknown;
409
487
  }
488
+ declare interface FormulaAdapter_2 {
489
+ /** Explicit trusted engine; core never evaluates source code/macros/external workbook references. */
490
+ evaluate(expression: string, context: {
491
+ row: Readonly<Record<string, unknown>>;
492
+ rowIndex: number;
493
+ rows: readonly Record<string, unknown>[];
494
+ }): unknown;
495
+ }
410
496
  declare interface GridCell {
497
+ /** Resolved visual only. Original value, text, editability and source are unchanged. */
498
+ dataBar?: {
499
+ start: number;
500
+ end: number;
501
+ color: string;
502
+ };
411
503
  /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
412
504
  richParagraphs?: RichParagraph[];
413
505
  text?: string;
@@ -433,6 +525,12 @@ declare interface GridCell {
433
525
  style?: ComponentStyle;
434
526
  }
435
527
  declare interface GridCell_2 {
528
+ /** Resolved visual only. Original value, text, editability and source are unchanged. */
529
+ dataBar?: {
530
+ start: number;
531
+ end: number;
532
+ color: string;
533
+ };
436
534
  /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
437
535
  richParagraphs?: RichParagraph_2[];
438
536
  text?: string;
@@ -458,6 +556,12 @@ declare interface GridCell_2 {
458
556
  style?: ComponentStyle_2;
459
557
  }
460
558
  declare interface GridCell_3 {
559
+ /** Resolved visual only. Original value, text, editability and source are unchanged. */
560
+ dataBar?: {
561
+ start: number;
562
+ end: number;
563
+ color: string;
564
+ };
461
565
  /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
462
566
  richParagraphs?: RichParagraph_3[];
463
567
  text?: string;
@@ -527,6 +631,8 @@ declare interface ListColumn {
527
631
  format?: ColumnFormat;
528
632
  /** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
529
633
  rules?: StyleRule[];
634
+ /** Optional resolved color scale or value-preserving data bar. */
635
+ visual?: ColumnVisual;
530
636
  /** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
531
637
  editable?: boolean;
532
638
  /** 空值列或特殊数据类型可显式声明编辑输入类型。 */
@@ -552,6 +658,8 @@ declare interface ListColumn_2 {
552
658
  format?: ColumnFormat_3;
553
659
  /** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
554
660
  rules?: StyleRule_2[];
661
+ /** Optional resolved color scale or value-preserving data bar. */
662
+ visual?: ColumnVisual_2;
555
663
  /** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
556
664
  editable?: boolean;
557
665
  /** 空值列或特殊数据类型可显式声明编辑输入类型。 */
@@ -654,11 +762,11 @@ declare interface ListComponent_2 {
654
762
  groupBy?: ListGroupBy_2;
655
763
  /** Ordered outer-to-inner grouping; groupBy remains the single-level shorthand. */
656
764
  groups?: ListGroupBy_2[];
657
- computed?: ComputedField_2[];
765
+ computed?: ComputedField_3[];
658
766
  /** Dynamic pivot of the current source dataset, with read-only derived identities. */
659
767
  matrix?: MatrixTableOptions_2;
660
768
  /** Full ordered hierarchy; source parent values and descendant-leaf rollups are explicit. */
661
- tree?: TreeTableOptions_2;
769
+ tree?: TreeTableOptions_3;
662
770
  /** Explicit row visibility; hidden rows do not participate in summaries. */
663
771
  rowVisibleWhen?: StyleRule_2["when"];
664
772
  /** Master/detail relation is keyed by business identity, never by display row index. */
@@ -708,7 +816,7 @@ declare type ListGrandTotal_2 = boolean | {
708
816
  style?: ComponentStyle_3;
709
817
  /** 合计列(缺省沿用 groupBy.subtotal) */
710
818
  fields?: string[];
711
- aggregates?: AggregateDefinition_2[];
819
+ aggregates?: AggregateDefinition_3[];
712
820
  };
713
821
  /** 分组小计配置(声明式,见 ListComponent.groupBy) */
714
822
  declare interface ListGroupBy {
@@ -740,7 +848,7 @@ declare interface ListGroupBy_2 {
740
848
  subtotalLabel?: string;
741
849
  /** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
742
850
  keepWithNext?: boolean;
743
- aggregates?: AggregateDefinition_2[];
851
+ aggregates?: AggregateDefinition_3[];
744
852
  /** Repeat this group heading after page breaks within the group. */
745
853
  repeatHeader?: boolean;
746
854
  }
@@ -791,6 +899,10 @@ declare interface MachReportDefaults {
791
899
  xlsx?: XlsxRenderOptions;
792
900
  /** 默认关闭;true 为本地草稿,对象可提供权限、校验和保存回调。 */
793
901
  editable?: boolean | ReportEditingOptions;
902
+ /** Optional reference-data loader; review and atomic editing are maintained inside the package. */
903
+ prefill?: ReportPrefillReviewOptions | false;
904
+ /** Compare a reference with the same query result rendered in the report. */
905
+ dataComparison?: ReportDataComparisonReviewOptions | false;
794
906
  /** 默认关闭;启用后提供导入按钮。ExcelJS 仅在导入时加载。 */
795
907
  excelImport?: boolean | ExcelImportOptions;
796
908
  }
@@ -808,7 +920,14 @@ declare type MachReportLogger = Pick<Console, "warn" | "info">;
808
920
  * - 优先级:组件 props > 路由级叠加 > preset > defaults(props 永远最高)
809
921
  */
810
922
  /** 工具栏与状态文案(默认简体中文;出海场景覆写) */
811
- declare interface MachReportMessages extends Partial<ReportCalculationMessages>, ReportPrintMessages, ReportParamOptionsMessages {
923
+ declare interface MachReportMessages extends Partial<ReportCalculationMessages>, Partial<ReportDataReviewMessages>, ReportPrintMessages, ReportParamOptionsMessages {
924
+ reviewTools?: string;
925
+ validationTitle?: string;
926
+ validationError?: string;
927
+ validationWarning?: string;
928
+ validationDataset?: string;
929
+ validationRow?: string;
930
+ validationMore?: string;
812
931
  drillActions?: string;
813
932
  drillOpening?: string;
814
933
  drillMissingValue?: string;
@@ -1122,7 +1241,7 @@ declare interface MatrixTableOptions {
1122
1241
  declare interface MatrixTableOptions_2 {
1123
1242
  rowFields: readonly string[];
1124
1243
  columnFields: readonly string[];
1125
- measures: readonly (AggregateDefinition_2 & {
1244
+ measures: readonly (AggregateDefinition_3 & {
1126
1245
  label?: string;
1127
1246
  })[];
1128
1247
  totals?: boolean;
@@ -1210,6 +1329,8 @@ declare interface PaginateOptions {
1210
1329
  maxPages?: number;
1211
1330
  /** Actual grid cells, including repeated furniture and nested children; checked before each page is appended. */
1212
1331
  maxCells?: number;
1332
+ /** Shared bound-chart primitive budget, checked before expansion; default 50000, range 1..1000000. */
1333
+ maxChartComponents?: number;
1213
1334
  signal?: AbortSignal;
1214
1335
  /** Streaming total-page anchors can skip the bounded counting pass when known. */
1215
1336
  knownTotalPages?: number;
@@ -1236,6 +1357,8 @@ declare interface PdfFontCheckResult {
1236
1357
  /** available 仅表示字体资源可达;实际导出仍会校验文字能否编码。 */
1237
1358
  declare type PdfFontStatus = "unchecked" | "checking" | "available" | "disabled" | "unverified" | "error";
1238
1359
  declare interface PlanComponent {
1360
+ /** Template-only aggregate binding, expanded into shared primitives during layout. */
1361
+ chartBinding?: ReportChartBinding;
1239
1362
  /** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
1240
1363
  code?: CodeOptions;
1241
1364
  /** Template-only binding; resolved and removed before constructing the output plan. */
@@ -1264,6 +1387,8 @@ declare interface PlanComponent {
1264
1387
  fallbackText?: string;
1265
1388
  }
1266
1389
  declare interface PlanComponent_2 {
1390
+ /** Template-only aggregate binding, expanded into shared primitives during layout. */
1391
+ chartBinding?: ReportChartBinding_2;
1267
1392
  /** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
1268
1393
  code?: CodeOptions_2;
1269
1394
  /** Template-only binding; resolved and removed before constructing the output plan. */
@@ -1292,6 +1417,8 @@ declare interface PlanComponent_2 {
1292
1417
  fallbackText?: string;
1293
1418
  }
1294
1419
  declare interface PlanComponent_3 {
1420
+ /** Template-only aggregate binding, expanded into shared primitives during layout. */
1421
+ chartBinding?: ReportChartBinding_3;
1295
1422
  /** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
1296
1423
  code?: CodeOptions_3;
1297
1424
  /** Template-only binding; resolved and removed before constructing the output plan. */
@@ -1362,6 +1489,18 @@ declare interface PlanPage {
1362
1489
  marginRightMm?: number;
1363
1490
  components: PlanComponent[];
1364
1491
  }
1492
+ declare interface PlanPage_2 {
1493
+ meta?: Record<string, unknown>;
1494
+ /** wide 表示完整自然列宽;页面仅为预览的垂直窗口分段。 */
1495
+ layout?: "page" | "wide";
1496
+ pageWidthMm: number;
1497
+ pageHeightMm: number;
1498
+ marginTopMm?: number;
1499
+ marginBottomMm?: number;
1500
+ marginLeftMm?: number;
1501
+ marginRightMm?: number;
1502
+ components: PlanComponent_2[];
1503
+ }
1365
1504
  /** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
1366
1505
  declare interface PlanTableFragment {
1367
1506
  /** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
@@ -1418,6 +1557,12 @@ declare interface RenderPlan {
1418
1557
  requiresRecalculation?: boolean;
1419
1558
  pages: PlanPage[];
1420
1559
  }
1560
+ declare interface RenderPlan_2 {
1561
+ schemaVersion: string;
1562
+ /** 编辑需要模板重算上下文;跨 Worker/JSON 保留要求,但不声明本地会话可用。 */
1563
+ requiresRecalculation?: boolean;
1564
+ pages: PlanPage_2[];
1565
+ }
1421
1566
  /** Return false to keep the current report. Without a hook the preview asks inline. */
1422
1567
  declare type ReportBeforeDiscard = (context: Readonly<ReportBeforeDiscardContext>) => boolean | Promise<boolean>;
1423
1568
  declare interface ReportBeforeDiscardContext {
@@ -1455,6 +1600,10 @@ declare interface ReportCalculationMessages {
1455
1600
  calculationErrorOverflow: string;
1456
1601
  calculationErrorPrecision: string;
1457
1602
  }
1603
+ declare interface ReportCandidateValidationOptions extends Pick<ReportDatasetValidationOptions, "rules" | "maxChecks" | "maxIssues"> {
1604
+ /** Warnings are visible and allowed by default; block explicitly when required by business policy. */
1605
+ warningPolicy?: "allow" | "block";
1606
+ }
1458
1607
  /** 预览中的物理坐标;合并单元格使用左上角坐标。 */
1459
1608
  declare interface ReportCellAddress {
1460
1609
  pageIndex: number;
@@ -1582,6 +1731,229 @@ declare interface ReportCellTableIdentity_2 {
1582
1731
  declare type ReportCellValue = string | number | boolean | null;
1583
1732
  declare type ReportCellValue_2 = string | number | boolean | null;
1584
1733
  declare type ReportCellValueType = NonNullable<GridCell_2["valueType"]>;
1734
+ /** Serializable binding; data and authorization continue to come from the existing report source. */
1735
+ declare interface ReportChartBinding {
1736
+ dataset: string;
1737
+ categoryField: string;
1738
+ measures: readonly ReportChartMeasure[];
1739
+ type: ReportChartOptions["type"];
1740
+ sort?: "asc" | "desc";
1741
+ title?: string;
1742
+ showValues?: boolean;
1743
+ maxRows?: number;
1744
+ maxCategories?: number;
1745
+ }
1746
+ /** Serializable binding; data and authorization continue to come from the existing report source. */
1747
+ declare interface ReportChartBinding_2 {
1748
+ dataset: string;
1749
+ categoryField: string;
1750
+ measures: readonly ReportChartMeasure_2[];
1751
+ type: ReportChartOptions_2["type"];
1752
+ sort?: "asc" | "desc";
1753
+ title?: string;
1754
+ showValues?: boolean;
1755
+ maxRows?: number;
1756
+ maxCategories?: number;
1757
+ }
1758
+ /** Serializable binding; data and authorization continue to come from the existing report source. */
1759
+ declare interface ReportChartBinding_3 {
1760
+ dataset: string;
1761
+ categoryField: string;
1762
+ measures: readonly ReportChartMeasure_3[];
1763
+ type: ReportChartOptions_3["type"];
1764
+ sort?: "asc" | "desc";
1765
+ title?: string;
1766
+ showValues?: boolean;
1767
+ maxRows?: number;
1768
+ maxCategories?: number;
1769
+ }
1770
+ declare interface ReportChartMeasure extends AggregateRequest {
1771
+ label?: string;
1772
+ color?: string;
1773
+ }
1774
+ declare interface ReportChartMeasure_2 extends AggregateRequest_2 {
1775
+ label?: string;
1776
+ color?: string;
1777
+ }
1778
+ declare interface ReportChartMeasure_3 extends AggregateRequest_3 {
1779
+ label?: string;
1780
+ color?: string;
1781
+ }
1782
+ declare interface ReportChartOptions {
1783
+ type: "bar" | "line" | "stackedBar" | "percentBar";
1784
+ categories: readonly string[];
1785
+ series: readonly ReportChartSeries[];
1786
+ leftMm: number;
1787
+ topMm: number;
1788
+ widthMm: number;
1789
+ heightMm: number;
1790
+ title?: string;
1791
+ showValues?: boolean;
1792
+ }
1793
+ declare interface ReportChartOptions_2 {
1794
+ type: "bar" | "line" | "stackedBar" | "percentBar";
1795
+ categories: readonly string[];
1796
+ series: readonly ReportChartSeries_2[];
1797
+ leftMm: number;
1798
+ topMm: number;
1799
+ widthMm: number;
1800
+ heightMm: number;
1801
+ title?: string;
1802
+ showValues?: boolean;
1803
+ }
1804
+ declare interface ReportChartOptions_3 {
1805
+ type: "bar" | "line" | "stackedBar" | "percentBar";
1806
+ categories: readonly string[];
1807
+ series: readonly ReportChartSeries_3[];
1808
+ leftMm: number;
1809
+ topMm: number;
1810
+ widthMm: number;
1811
+ heightMm: number;
1812
+ title?: string;
1813
+ showValues?: boolean;
1814
+ }
1815
+ declare interface ReportChartSeries {
1816
+ name: string;
1817
+ values: readonly (number | null)[];
1818
+ color?: string;
1819
+ }
1820
+ declare interface ReportChartSeries_2 {
1821
+ name: string;
1822
+ values: readonly (number | null)[];
1823
+ color?: string;
1824
+ }
1825
+ declare interface ReportChartSeries_3 {
1826
+ name: string;
1827
+ values: readonly (number | null)[];
1828
+ color?: string;
1829
+ }
1830
+ declare interface ReportComparison {
1831
+ field: string;
1832
+ op: ">" | ">=" | "<" | "<=" | "==" | "!=" | "between" | "contains" | "isNull" | "isNotNull";
1833
+ /** Legacy scalar thresholds remain supported. Use right for field-to-field comparisons. */
1834
+ value?: ReportPredicateScalar;
1835
+ right?: ReportPredicateOperand;
1836
+ values?: readonly [
1837
+ ReportPredicateScalar,
1838
+ ReportPredicateScalar
1839
+ ];
1840
+ numeric?: "number" | "decimal";
1841
+ valueType?: "number" | "decimal" | "text" | "date" | "boolean";
1842
+ }
1843
+ declare interface ReportComparison_2 {
1844
+ field: string;
1845
+ op: ">" | ">=" | "<" | "<=" | "==" | "!=" | "between" | "contains" | "isNull" | "isNotNull";
1846
+ /** Legacy scalar thresholds remain supported. Use right for field-to-field comparisons. */
1847
+ value?: ReportPredicateScalar_2;
1848
+ right?: ReportPredicateOperand_2;
1849
+ values?: readonly [
1850
+ ReportPredicateScalar_2,
1851
+ ReportPredicateScalar_2
1852
+ ];
1853
+ numeric?: "number" | "decimal";
1854
+ valueType?: "number" | "decimal" | "text" | "date" | "boolean";
1855
+ }
1856
+ declare interface ReportComparison_3 {
1857
+ field: string;
1858
+ op: ">" | ">=" | "<" | "<=" | "==" | "!=" | "between" | "contains" | "isNull" | "isNotNull";
1859
+ /** Legacy scalar thresholds remain supported. Use right for field-to-field comparisons. */
1860
+ value?: ReportPredicateScalar_3;
1861
+ right?: ReportPredicateOperand_3;
1862
+ values?: readonly [
1863
+ ReportPredicateScalar_3,
1864
+ ReportPredicateScalar_3
1865
+ ];
1866
+ numeric?: "number" | "decimal";
1867
+ valueType?: "number" | "decimal" | "text" | "date" | "boolean";
1868
+ }
1869
+ declare interface ReportDataComparisonField {
1870
+ field: string;
1871
+ label?: string;
1872
+ /** Numeric comparison is explicit; identifiers containing digits stay text. */
1873
+ type?: "value" | "decimal";
1874
+ /** Absolute decimal tolerance, inclusive. No binary floating-point subtraction. */
1875
+ tolerance?: string;
1876
+ /** Fractional ratio digits. changeRatio is (after - before) / before, not a percent. */
1877
+ ratioDigits?: number;
1878
+ zeroDenominator?: "omit" | "zero-if-equal";
1879
+ missing?: "distinct" | "empty-equivalent" | "zero";
1880
+ }
1881
+ declare interface ReportDataComparisonReviewOptions extends ReportDataReviewSource {
1882
+ fields: readonly ReportDataComparisonField[];
1883
+ maxDifferences?: number;
1884
+ }
1885
+ declare interface ReportDataLimits {
1886
+ maxRows?: number;
1887
+ maxFields?: number;
1888
+ maxCells?: number;
1889
+ }
1890
+ /** A business record, never a physical report row index. */
1891
+ declare interface ReportDataRecord {
1892
+ rowKey: string | number;
1893
+ values: Readonly<Record<string, ReportCellValue_2>>;
1894
+ }
1895
+ declare interface ReportDataReviewMessages {
1896
+ prefillTitle: string;
1897
+ prefillHint: string;
1898
+ prefillCurrent: string;
1899
+ prefillReference: string;
1900
+ prefillLoad: string;
1901
+ prefillApply: string;
1902
+ prefillMatched: string;
1903
+ prefillChanged: string;
1904
+ prefillSkipped: string;
1905
+ prefillConflict: string;
1906
+ prefillUnchanged: string;
1907
+ prefillReadonly: string;
1908
+ prefillOccupied: string;
1909
+ prefillMissingSource: string;
1910
+ prefillMissingTarget: string;
1911
+ prefillAmbiguous: string;
1912
+ prefillInvalid: string;
1913
+ comparisonTitle: string;
1914
+ comparisonHint: string;
1915
+ comparisonLoad: string;
1916
+ comparisonAdded: string;
1917
+ comparisonRemoved: string;
1918
+ comparisonChanged: string;
1919
+ comparisonUnchanged: string;
1920
+ reviewCancel: string;
1921
+ reviewClose: string;
1922
+ reviewBefore: string;
1923
+ reviewAfter: string;
1924
+ reviewField: string;
1925
+ reviewKey: string;
1926
+ reviewDelta: string;
1927
+ reviewRatio: string;
1928
+ reviewLocate: string;
1929
+ reviewEmpty: string;
1930
+ reviewPrevious: string;
1931
+ reviewNext: string;
1932
+ reviewPage: string;
1933
+ }
1934
+ declare interface ReportDataReviewSource extends ReportDataLimits {
1935
+ sourceScope?: string;
1936
+ datasetId: string;
1937
+ label?: string;
1938
+ /** The host chooses history/instances; this package never guesses an endpoint or period. */
1939
+ load(operation: {
1940
+ signal: AbortSignal;
1941
+ }): readonly ReportDataRecord[] | Promise<readonly ReportDataRecord[]>;
1942
+ /** Cancel loaders that do not finish; default 15 seconds, bounded at 120 seconds. */
1943
+ timeoutMs?: number;
1944
+ }
1945
+ declare interface ReportDatasetValidationOptions {
1946
+ rules: readonly ReportValidationRule[];
1947
+ rowKey?: string;
1948
+ computed?: readonly ComputedField_2[];
1949
+ /** Explicit trusted engine, shared with pagination; never read from a serialized template. */
1950
+ formula?: FormulaAdapter_2;
1951
+ /** Uses the same bounded tree preparation and descendant-leaf summaries as pagination. */
1952
+ tree?: TreeTableOptions_2;
1953
+ maxChecks?: number;
1954
+ maxIssues?: number;
1955
+ signal?: AbortSignal;
1956
+ }
1585
1957
  declare interface ReportDataTarget {
1586
1958
  datasetId: string;
1587
1959
  field: string;
@@ -1689,6 +2061,10 @@ declare interface ReportEditingOptions {
1689
2061
  canEdit?(context: ReportCellContext): boolean;
1690
2062
  /** Return an error message or throw to reject the edit. */
1691
2063
  validate?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | string | Promise<void | string>;
2064
+ /** Same declarative rules can be run in Node via validateReportDataset. Requires a source-backed session. */
2065
+ validation?: ReportCandidateValidationOptions;
2066
+ /** Optional host batch validation sees the fully recalculated candidate plan. */
2067
+ validateBatch?(batch: Readonly<ReportEditBatch>, candidate: RenderPlan_2, operation: ReportEditOperation): void | readonly ReportValidationIssue[] | Promise<void | readonly ReportValidationIssue[]>;
1692
2068
  /** Called before applying the change. A rejection leaves the current report untouched. */
1693
2069
  save?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
1694
2070
  /** Must commit all edits in one server transaction. Required for multi-cell persisted edits. */
@@ -1753,7 +2129,9 @@ declare type ReportExpression = {
1753
2129
  field?: string;
1754
2130
  weightField?: string;
1755
2131
  } | {
1756
- op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
2132
+ op: ReportExpressionOperation;
2133
+ /** Required for if; args are [then, else], and only the selected branch is evaluated. */
2134
+ condition?: ReportPredicate;
1757
2135
  args: readonly ReportExpression[];
1758
2136
  };
1759
2137
  declare type ReportExpression_2 = {
@@ -1765,9 +2143,28 @@ declare type ReportExpression_2 = {
1765
2143
  field?: string;
1766
2144
  weightField?: string;
1767
2145
  } | {
1768
- op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
2146
+ op: ReportExpressionOperation_2;
2147
+ /** Required for if; args are [then, else], and only the selected branch is evaluated. */
2148
+ condition?: ReportPredicate_2;
1769
2149
  args: readonly ReportExpression_2[];
1770
2150
  };
2151
+ declare type ReportExpression_3 = {
2152
+ field: string;
2153
+ } | {
2154
+ value: string | number | boolean | null;
2155
+ } | {
2156
+ aggregate: AggregateOperation_3;
2157
+ field?: string;
2158
+ weightField?: string;
2159
+ } | {
2160
+ op: ReportExpressionOperation_3;
2161
+ /** Required for if; args are [then, else], and only the selected branch is evaluated. */
2162
+ condition?: ReportPredicate_3;
2163
+ args: readonly ReportExpression_3[];
2164
+ };
2165
+ declare type ReportExpressionOperation = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
2166
+ declare type ReportExpressionOperation_2 = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
2167
+ declare type ReportExpressionOperation_3 = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
1771
2168
  /** 保持 Promise<RenderPlan> 契约;元数据为可选,旧业务 fetcher 无需改造。 */
1772
2169
  declare interface ReportFetcher {
1773
2170
  (input: ReportFetchInput): Promise<RenderPlan>;
@@ -1865,12 +2262,9 @@ declare interface ReportParamDef {
1865
2262
  field: string;
1866
2263
  /** 显示名(缺省用 field) */
1867
2264
  label?: string;
1868
- type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select";
2265
+ type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select" | "multiSelect" | "cascader" | "numberRange";
1869
2266
  /** select 选项 */
1870
- options?: Array<{
1871
- label: string;
1872
- value: string;
1873
- }>;
2267
+ options?: ReportParamTreeOption[];
1874
2268
  /** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
1875
2269
  optionsSource?: string;
1876
2270
  /** Select dependencies must be declared parameters; changing a parent clears descendants. */
@@ -1883,6 +2277,9 @@ declare interface ReportParamDef {
1883
2277
  max?: number | string;
1884
2278
  minLength?: number;
1885
2279
  maxLength?: number;
2280
+ /** multiSelect item count (maximum 100). Cascader paths are bounded to 16 levels. */
2281
+ minItems?: number;
2282
+ maxItems?: number;
1886
2283
  }
1887
2284
  /** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
1888
2285
  declare interface ReportParamDef_2 {
@@ -1890,12 +2287,9 @@ declare interface ReportParamDef_2 {
1890
2287
  field: string;
1891
2288
  /** 显示名(缺省用 field) */
1892
2289
  label?: string;
1893
- type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select";
2290
+ type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select" | "multiSelect" | "cascader" | "numberRange";
1894
2291
  /** select 选项 */
1895
- options?: Array<{
1896
- label: string;
1897
- value: string;
1898
- }>;
2292
+ options?: ReportParamTreeOption_2[];
1899
2293
  /** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
1900
2294
  optionsSource?: string;
1901
2295
  /** Select dependencies must be declared parameters; changing a parent clears descendants. */
@@ -1908,6 +2302,9 @@ declare interface ReportParamDef_2 {
1908
2302
  max?: number | string;
1909
2303
  minLength?: number;
1910
2304
  maxLength?: number;
2305
+ /** multiSelect item count (maximum 100). Cascader paths are bounded to 16 levels. */
2306
+ minItems?: number;
2307
+ maxItems?: number;
1911
2308
  }
1912
2309
  declare interface ReportParamIssue {
1913
2310
  code: ReportParamIssueCode;
@@ -1915,10 +2312,11 @@ declare interface ReportParamIssue {
1915
2312
  field: string;
1916
2313
  message: string;
1917
2314
  }
1918
- declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "dependency" | "minimum" | "maximum" | "minLength" | "maxLength";
2315
+ declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "dependency" | "minimum" | "maximum" | "minLength" | "maxLength" | "minItems" | "maxItems";
1919
2316
  declare interface ReportParamOption {
1920
2317
  readonly label: string;
1921
2318
  readonly value: string;
2319
+ readonly children?: readonly ReportParamOption[];
1922
2320
  }
1923
2321
  declare interface ReportParamOptionsInput {
1924
2322
  readonly source: string;
@@ -1938,6 +2336,20 @@ declare interface ReportParamOptionsMessages {
1938
2336
  paramOptionsMissingLoader?: string;
1939
2337
  paramOptionsDependencies?: string;
1940
2338
  paramOptionsClear?: string;
2339
+ paramNumberRangeStart?: string;
2340
+ paramNumberRangeEnd?: string;
2341
+ }
2342
+ /** Cascader values are unique within each sibling list. */
2343
+ declare interface ReportParamTreeOption {
2344
+ label: string;
2345
+ value: string;
2346
+ children?: ReportParamTreeOption[];
2347
+ }
2348
+ /** Cascader values are unique within each sibling list. */
2349
+ declare interface ReportParamTreeOption_2 {
2350
+ label: string;
2351
+ value: string;
2352
+ children?: ReportParamTreeOption_2[];
1941
2353
  }
1942
2354
  /** Licensed local font bytes; never downloaded implicitly by the runtime. */
1943
2355
  declare interface ReportPdfFontOptions {
@@ -1950,6 +2362,45 @@ declare interface ReportPdfFontOptions {
1950
2362
  boldItalic?: Uint8Array | ArrayBuffer;
1951
2363
  };
1952
2364
  }
2365
+ declare type ReportPredicate = ReportComparison | {
2366
+ all: readonly ReportPredicate[];
2367
+ } | {
2368
+ any: readonly ReportPredicate[];
2369
+ } | {
2370
+ not: ReportPredicate;
2371
+ };
2372
+ declare type ReportPredicate_2 = ReportComparison_2 | {
2373
+ all: readonly ReportPredicate_2[];
2374
+ } | {
2375
+ any: readonly ReportPredicate_2[];
2376
+ } | {
2377
+ not: ReportPredicate_2;
2378
+ };
2379
+ declare type ReportPredicate_3 = ReportComparison_3 | {
2380
+ all: readonly ReportPredicate_3[];
2381
+ } | {
2382
+ any: readonly ReportPredicate_3[];
2383
+ } | {
2384
+ not: ReportPredicate_3;
2385
+ };
2386
+ declare type ReportPredicateOperand = {
2387
+ field: string;
2388
+ } | {
2389
+ value: ReportPredicateScalar;
2390
+ };
2391
+ declare type ReportPredicateOperand_2 = {
2392
+ field: string;
2393
+ } | {
2394
+ value: ReportPredicateScalar_2;
2395
+ };
2396
+ declare type ReportPredicateOperand_3 = {
2397
+ field: string;
2398
+ } | {
2399
+ value: ReportPredicateScalar_3;
2400
+ };
2401
+ declare type ReportPredicateScalar = string | number | boolean | null;
2402
+ declare type ReportPredicateScalar_2 = string | number | boolean | null;
2403
+ declare type ReportPredicateScalar_3 = string | number | boolean | null;
1953
2404
  declare interface ReportPreferencesAdapter {
1954
2405
  load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
1955
2406
  save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
@@ -1960,6 +2411,16 @@ declare interface ReportPreferencesOptions {
1960
2411
  key: string;
1961
2412
  adapter: ReportPreferencesAdapter;
1962
2413
  }
2414
+ declare interface ReportPrefillField {
2415
+ field: string;
2416
+ sourceField?: string;
2417
+ label?: string;
2418
+ }
2419
+ declare interface ReportPrefillReviewOptions extends ReportDataReviewSource {
2420
+ fields: readonly ReportPrefillField[];
2421
+ mode?: "empty" | "replace";
2422
+ maxChanges?: number;
2423
+ }
1963
2424
  declare interface ReportPreviewDataTarget extends ReportDataTarget_2 {
1964
2425
  /** Added by the query adapter; isolates identical dataset/row/field identities across reports. */
1965
2426
  reportScope?: string;
@@ -2045,6 +2506,8 @@ declare interface ReportRuntimeBudget {
2045
2506
  maxRows?: number;
2046
2507
  maxPages?: number;
2047
2508
  maxCells?: number;
2509
+ /** Aggregate bound-chart primitives per prepare, before expansion; default 50000, hard maximum 1000000. */
2510
+ maxChartComponents?: number;
2048
2511
  maxOutputBytes?: number;
2049
2512
  /** Bound the plain JSON snapshot accepted by exportPrepared (default 64 MB). */
2050
2513
  maxPreparedBytes?: number;
@@ -2137,6 +2600,29 @@ declare interface ReportTemplateRepeat_2 {
2137
2600
  };
2138
2601
  }
2139
2602
  declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
2603
+ declare interface ReportValidationIssue {
2604
+ ruleId: string;
2605
+ rowKey?: string | number;
2606
+ rowIndex?: number;
2607
+ field?: string;
2608
+ dataset?: string;
2609
+ sourceScope?: string;
2610
+ severity: "error" | "warning";
2611
+ message: string;
2612
+ }
2613
+ declare interface ReportValidationRule {
2614
+ id: string;
2615
+ /** Optional target; omitted applies to each candidate dataset. */
2616
+ dataset?: string;
2617
+ assert: ReportPredicate_2;
2618
+ when?: ReportPredicate_2;
2619
+ field?: string;
2620
+ severity?: "error" | "warning";
2621
+ message: string;
2622
+ scope?: "row" | "dataset";
2623
+ /** Dataset-scope assertions read this explicit summary row, never an arbitrary detail row. */
2624
+ aggregates?: readonly AggregateDefinition_2[];
2625
+ }
2140
2626
  /** Optional business explanations never replace raw data or schema validation. */
2141
2627
  declare type ReportValueState = "missing-source" | "not-applicable" | "not-calculable";
2142
2628
  /** Optional business explanations never replace raw data or schema validation. */
@@ -2185,25 +2671,13 @@ declare interface RichSegment_3 {
2185
2671
  }
2186
2672
  /** 条件格式规则求值(声明式,见 ListColumn.rules) */
2187
2673
  declare interface StyleRule {
2188
- when: {
2189
- field: string;
2190
- op: ">" | ">=" | "<" | "<=" | "==" | "!=";
2191
- value: number | string;
2192
- /** Explicit decimal comparisons retain decimal thresholds as text. */
2193
- numeric?: "number" | "decimal";
2194
- };
2674
+ when: ReportPredicate;
2195
2675
  /** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
2196
2676
  style: Record<string, unknown>;
2197
2677
  }
2198
2678
  /** 条件格式规则求值(声明式,见 ListColumn.rules) */
2199
2679
  declare interface StyleRule_2 {
2200
- when: {
2201
- field: string;
2202
- op: ">" | ">=" | "<" | "<=" | "==" | "!=";
2203
- value: number | string;
2204
- /** Explicit decimal comparisons retain decimal thresholds as text. */
2205
- numeric?: "number" | "decimal";
2206
- };
2680
+ when: ReportPredicate_3;
2207
2681
  /** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
2208
2682
  style: Record<string, unknown>;
2209
2683
  }
@@ -2293,6 +2767,25 @@ declare interface TreeTableOptions_2 {
2293
2767
  /** Bounded leaf-to-ancestor aggregate work; default one million. */
2294
2768
  maxAggregationVisits?: number;
2295
2769
  }
2770
+ /** A serialized tree contract. Sibling and root order follow input order. */
2771
+ declare interface TreeTableOptions_3 {
2772
+ input: "flat" | "nested";
2773
+ idField: string;
2774
+ /** Flat roots have null/undefined parent values. */
2775
+ parentField?: string;
2776
+ /** Nested child arrays, defaults to children. Every node still needs an ID. */
2777
+ childrenField?: string;
2778
+ labelField: string;
2779
+ indentMm?: number;
2780
+ orphan?: "error" | "root";
2781
+ /** Source preserves parent values; leaf-aggregate derives only parents from descendant leaves. */
2782
+ parentValues?: "source" | "leaf-aggregate";
2783
+ aggregates?: AggregateDefinition_3[];
2784
+ maxRows?: number;
2785
+ maxDepth?: number;
2786
+ /** Bounded leaf-to-ancestor aggregate work; default one million. */
2787
+ maxAggregationVisits?: number;
2788
+ }
2296
2789
  /** The same declarative formatting used by list columns, before any output backend. */
2297
2790
  declare type ValueFormat = ColumnFormat;
2298
2791
  /** The same declarative formatting used by list columns, before any output backend. */
@@ -2315,6 +2808,8 @@ declare interface XlsxRenderOptions extends AssetRenderOptions_2, XlsxImageOptio
2315
2808
  sheetMode?: "auto" | "pages" | "continuous";
2316
2809
  /** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
2317
2810
  valueMode?: "text" | "raw";
2811
+ /** Static data-bar drawing budget; fail explicitly rather than omitting bars. Default 10,000. */
2812
+ maxDataBars?: number;
2318
2813
  /** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
2319
2814
  paperSize?: "auto" | "a3" | "a4" | "a5";
2320
2815
  }