@agile-team/mach-report 2.17.0 → 2.19.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 (170) hide show
  1. package/README.md +19 -9
  2. package/dist/{ExcelBindingWizard-Bq6FYME6.cjs → ExcelBindingWizard-UHSApSG9.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-Co1svTsw.js → ExcelBindingWizard-xJIYmnZ_.js} +3 -3
  4. package/dist/ParamEditor-BZb-okUd.cjs +1 -0
  5. package/dist/ParamEditor-D1wWemaf.js +732 -0
  6. package/dist/{ReportBatchPanel-uQh06usx.js → ReportBatchPanel-B88R-fME.js} +39 -39
  7. package/dist/ReportBatchPanel-BkJFqeEW.cjs +1 -0
  8. package/dist/ReportLabelStudio-B4WZ2XNN.js +239 -0
  9. package/dist/ReportLabelStudio-BN-fYNCr.cjs +1 -0
  10. package/dist/ReportParamPanel-mQkeN70Q.js +1020 -0
  11. package/dist/ReportParamPanel-sOANVRz-.cjs +1 -0
  12. package/dist/ReportPreview-BUr8GQUW.js +5618 -0
  13. package/dist/ReportPreview-D7PvKzs3.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-TIL_Oj2l.js → ReportTemplateLibrary-BGELmgd3.js} +1 -1
  15. package/dist/{ReportTemplateLibrary-CnP7_1pH.cjs → ReportTemplateLibrary-BOh2MgjQ.cjs} +1 -1
  16. package/dist/RuleEditor-CoLqgehG.js +2337 -0
  17. package/dist/RuleEditor-XaLcCdTb.cjs +1 -0
  18. package/dist/{TemplateOutlinePanel-BouxsuqQ.js → TemplateOutlinePanel-DU95loB-.js} +2 -2
  19. package/dist/{TemplateOutlinePanel-BlLxRrfu.cjs → TemplateOutlinePanel-DiG8tRRe.cjs} +1 -1
  20. package/dist/{TemplateReusePanel-BEACLPaN.js → TemplateReusePanel-DE1KSD6c.js} +2 -2
  21. package/dist/{TemplateReusePanel-yxsHSO40.cjs → TemplateReusePanel-G-Y299wc.cjs} +1 -1
  22. package/dist/{TemplateReviewPanel-D9Cx0m2N.cjs → TemplateReviewPanel-KQx9ts0D.cjs} +1 -1
  23. package/dist/{TemplateReviewPanel-B1OGRY2i.js → TemplateReviewPanel-vqFJ_Y9o.js} +2 -2
  24. package/dist/analytics.cjs +1 -1
  25. package/dist/analytics.d.cts +100 -41
  26. package/dist/analytics.d.ts +100 -41
  27. package/dist/analytics.js +76 -141
  28. package/dist/artifact-integrity.json +110 -102
  29. package/dist/assets-2eC3mOcV.js +232 -0
  30. package/dist/assets-B0Hxn4l6.cjs +1 -0
  31. package/dist/{auto-DDHflI9v.cjs → auto-B0EZFIK1.cjs} +1 -1
  32. package/dist/{auto-BIOmtVhk.js → auto-BlchZ1b8.js} +19 -19
  33. package/dist/{batch-WzDIXJAt.js → batch-DGCt44XM.js} +1 -1
  34. package/dist/{batch-z6Aw5GEY.cjs → batch-DYcokH4v.cjs} +1 -1
  35. package/dist/charts-Dlv8j2AG.js +141 -0
  36. package/dist/charts-aCtoswXq.cjs +1 -0
  37. package/dist/codes.cjs +9 -9
  38. package/dist/codes.d.cts +54 -0
  39. package/dist/codes.d.ts +54 -0
  40. package/dist/codes.js +12097 -13668
  41. package/dist/column-visual-BpgQVWwT.js +238 -0
  42. package/dist/column-visual-CtYxnBCP.cjs +1 -0
  43. package/dist/component-tree-6TV7W6Yj.cjs +1 -0
  44. package/dist/component-tree-CvW4lzpv.js +67 -0
  45. package/dist/computed-4TnxzgIh.cjs +1 -0
  46. package/dist/computed-C8NRZQss.js +739 -0
  47. package/dist/data-bar-Ce38juRZ.cjs +1 -0
  48. package/dist/data-bar-PtjXhMgN.js +9 -0
  49. package/dist/designer-CyKXBhQg.cjs +2 -0
  50. package/dist/designer-fVvpYg8H.js +5824 -0
  51. package/dist/designer.cjs +1 -1
  52. package/dist/designer.d.cts +803 -43
  53. package/dist/designer.d.ts +803 -43
  54. package/dist/designer.js +26 -20
  55. package/dist/{encoding-BFMFIc4r.cjs → encoding-B--eZpp1.cjs} +1 -1
  56. package/dist/{encoding-DP_Eaf0A.js → encoding-mctOLocI.js} +2 -2
  57. package/dist/{font-loader-7FWVlykp.cjs → font-loader-DBBJ5KE9.cjs} +1 -1
  58. package/dist/{font-loader-CQZowp0I.js → font-loader-DW8tIaNp.js} +1 -1
  59. package/dist/index-CPh6tqge.js +1575 -0
  60. package/dist/index-CUNw7dL9.cjs +1 -0
  61. package/dist/index.cjs +7 -7
  62. package/dist/index.d.cts +361 -15
  63. package/dist/index.d.ts +361 -15
  64. package/dist/index.js +876 -835
  65. package/dist/json-snapshot-By4ZVVUt.js +1967 -0
  66. package/dist/json-snapshot-jiXff4lc.cjs +2 -0
  67. package/dist/matrix-0hywp0-F.cjs +1 -0
  68. package/dist/matrix-Dy-tyY7E.js +381 -0
  69. package/dist/param-validation-C-8sRJLq.cjs +1 -0
  70. package/dist/param-validation-CnDEd2l-.js +333 -0
  71. package/dist/{pdf-l3ea86di.js → pdf-CKROKygt.js} +1851 -1849
  72. package/dist/{pdf-B8JouyYv.cjs → pdf-DqyxJ96U.cjs} +46 -46
  73. package/dist/pdf.cjs +1 -1
  74. package/dist/pdf.d.cts +54 -0
  75. package/dist/pdf.d.ts +54 -0
  76. package/dist/pdf.js +2 -2
  77. package/dist/{plugin-CtFX9PFG.cjs → plugin-4VuL38Nc.cjs} +1 -1
  78. package/dist/{plugin-BBp74CQZ.js → plugin-YWHcI3t4.js} +5 -5
  79. package/dist/prefill-B8H9qwE4.js +371 -0
  80. package/dist/prefill-D7EswyTI.cjs +1 -0
  81. package/dist/{prepared-CARicKYh.js → prepared-BE-4jfX5.js} +2 -2
  82. package/dist/{prepared-Ch1x_Gog.cjs → prepared-CGVphji3.cjs} +1 -1
  83. package/dist/{protocol-B5A2uom4.cjs → protocol-ByRVzzQG.cjs} +1 -1
  84. package/dist/{protocol-BaiWjq5w.js → protocol-Cr81vFSQ.js} +3 -3
  85. package/dist/{record-bindings-D4TuMzHs.js → record-bindings-DEJtmo3p.js} +67 -107
  86. package/dist/record-bindings-ehjnCDHt.cjs +1 -0
  87. package/dist/{region-binding-workflow-BNasF5kz.js → region-binding-workflow-CBg0l_tj.js} +1 -1
  88. package/dist/{region-binding-workflow-O2Cni3mF.cjs → region-binding-workflow-D05tOYn3.cjs} +1 -1
  89. package/dist/report-encoding-worker.cjs +1 -1
  90. package/dist/report-encoding-worker.js +1 -1
  91. package/dist/{report-params-B1RzkhJj.js → report-params-D9tBuM9B.js} +1 -1
  92. package/dist/{report-params-WDGrA4oP.cjs → report-params-VTg8MoCp.cjs} +1 -1
  93. package/dist/runtime-CDA6d263.cjs +1 -0
  94. package/dist/runtime-CEMvybO7.js +170 -0
  95. package/dist/sbom.cdx.json +1 -1
  96. package/dist/server/node.d.cts +75 -7
  97. package/dist/server/node.d.ts +75 -7
  98. package/dist/server-node.cjs +4 -4
  99. package/dist/server-node.js +2692 -1990
  100. package/dist/server.cjs +1 -1
  101. package/dist/server.d.cts +243 -28
  102. package/dist/server.d.ts +243 -28
  103. package/dist/server.js +28 -28
  104. package/dist/sha256-BDQ1Qk7A.js +158 -0
  105. package/dist/sha256-DgZAKXqI.cjs +1 -0
  106. package/dist/style.css +1 -1
  107. package/dist/template-bindings-Cg5oBLFT.cjs +1 -0
  108. package/dist/template-bindings-TKnXM7ll.js +62 -0
  109. package/dist/{template-catalog-wT1fNeAP.js → template-catalog-CmbWOJqy.js} +16 -16
  110. package/dist/{template-catalog-Dua8h9ZA.cjs → template-catalog-Utu4GP09.cjs} +1 -1
  111. package/dist/{template-fragments-BajTajb4.cjs → template-fragments-C_zSHJAa.cjs} +1 -1
  112. package/dist/{template-fragments-DmX5XK4N.js → template-fragments-DWgo9tlZ.js} +2 -2
  113. package/dist/{template-outline-BwRV_eRo.cjs → template-outline-DWkzZXVC.cjs} +1 -1
  114. package/dist/{template-outline-cnWfT_LK.js → template-outline-DiADphlq.js} +1 -1
  115. package/dist/{template-registry-u11fPd8D.js → template-registry-BIhIHOab.js} +319 -314
  116. package/dist/template-registry-DzWswQI5.cjs +1 -0
  117. package/dist/vue/async.d.cts +528 -33
  118. package/dist/vue/async.d.ts +528 -33
  119. package/dist/vue/index.d.cts +616 -64
  120. package/dist/vue/index.d.ts +616 -64
  121. package/dist/vue-async.cjs +1 -1
  122. package/dist/vue-async.js +3 -3
  123. package/dist/vue.cjs +1 -1
  124. package/dist/vue.js +94 -89
  125. package/dist/{workbook-session-DN5LSA5C.cjs → workbook-session-B94EwVa_.cjs} +1 -1
  126. package/dist/{workbook-session-B8pNW24X.js → workbook-session-BoScoOg-.js} +2 -2
  127. package/dist/worker.cjs +1 -1
  128. package/dist/worker.d.cts +75 -7
  129. package/dist/worker.d.ts +75 -7
  130. package/dist/worker.js +4 -4
  131. package/dist/xlsx.cjs +4 -4
  132. package/dist/xlsx.d.cts +120 -13
  133. package/dist/xlsx.d.ts +120 -13
  134. package/dist/xlsx.js +313 -279
  135. package/package.json +1 -1
  136. package/dist/ParamEditor-B5UZRgxv.cjs +0 -1
  137. package/dist/ParamEditor-DNNARyeB.js +0 -594
  138. package/dist/ReportBatchPanel-Ctvs2t_9.cjs +0 -1
  139. package/dist/ReportPreview-BdQawRh0.js +0 -4879
  140. package/dist/ReportPreview-CJC_-j2I.cjs +0 -6
  141. package/dist/RuleEditor-DkRjOLlr.js +0 -2141
  142. package/dist/RuleEditor-h5anGsDB.cjs +0 -1
  143. package/dist/assets-BIMVwjQe.js +0 -231
  144. package/dist/assets-Dfs2ElxI.cjs +0 -1
  145. package/dist/component-tree-Ca6YYfHq.js +0 -61
  146. package/dist/component-tree-DkGLEfZC.cjs +0 -1
  147. package/dist/computed-BW5a8QFk.js +0 -612
  148. package/dist/computed-C2GD3XcE.cjs +0 -1
  149. package/dist/config-Dg_o8e7m.cjs +0 -1
  150. package/dist/config-XQ4qrQ7Q.js +0 -844
  151. package/dist/designer-D9XAxqSc.js +0 -5178
  152. package/dist/designer-uCDo5XSK.cjs +0 -2
  153. package/dist/drill-ByN8COs_.cjs +0 -1
  154. package/dist/drill-CKW3Xtfa.js +0 -145
  155. package/dist/json-snapshot-D7PE1NsU.cjs +0 -2
  156. package/dist/json-snapshot-DYmEe3sO.js +0 -1779
  157. package/dist/matrix-JLAXlux-.js +0 -302
  158. package/dist/matrix-gTHpDTGm.cjs +0 -1
  159. package/dist/param-validation-C3HlcLLO.cjs +0 -1
  160. package/dist/param-validation-Do7Eg8Zv.js +0 -181
  161. package/dist/record-bindings-B86Sur_y.cjs +0 -1
  162. package/dist/runtime-DakRXui3.js +0 -170
  163. package/dist/runtime-dL5ygIfa.cjs +0 -1
  164. package/dist/sha256-BshdOkCC.cjs +0 -1
  165. package/dist/sha256-DTG-Gq8i.js +0 -157
  166. package/dist/template-bindings-C2SpvsMU.js +0 -58
  167. package/dist/template-bindings-CEtWyiLX.cjs +0 -1
  168. package/dist/template-registry-CpysHAxy.cjs +0 -1
  169. package/dist/tree-CLpxYbKa.cjs +0 -1
  170. package/dist/tree-DNJorJUf.js +0 -172
package/dist/xlsx.d.cts CHANGED
@@ -35,6 +35,14 @@ declare interface AggregateDefinition {
35
35
 
36
36
  declare type AggregateOperation = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
37
37
 
38
+ declare interface AggregateRequest {
39
+ op: AggregateOperation;
40
+ field?: string;
41
+ weightField?: string;
42
+ numeric?: "number" | "decimal";
43
+ digits?: number;
44
+ }
45
+
38
46
  declare interface Alignment {
39
47
  horizontal: 'left' | 'center' | 'right' | 'fill' | 'justify' | 'centerContinuous' | 'distributed';
40
48
  vertical: 'top' | 'middle' | 'bottom' | 'distributed' | 'justify';
@@ -416,6 +424,23 @@ declare type ColumnFormat = {
416
424
  pattern?: string;
417
425
  };
418
426
 
427
+ declare type ColumnVisual = {
428
+ /** Defaults to the column field; never changes the cell's raw value or business identity. */
429
+ field?: string;
430
+ /** Numeric text requires explicit opt-in; formatting an identifier does not turn it into a measure. */
431
+ numeric?: "number" | "decimal";
432
+ min?: number;
433
+ max?: number;
434
+ } & ({
435
+ kind: "colorScale";
436
+ lowColor?: string;
437
+ highColor?: string;
438
+ } | {
439
+ kind: "dataBar";
440
+ color?: string;
441
+ negativeColor?: string;
442
+ });
443
+
419
444
  declare interface Comment_2 {
420
445
  texts?: RichText[];
421
446
  margins?: Partial<CommentMargins>;
@@ -1188,6 +1213,12 @@ declare interface GradientStop {
1188
1213
  }
1189
1214
 
1190
1215
  declare interface GridCell {
1216
+ /** Resolved visual only. Original value, text, editability and source are unchanged. */
1217
+ dataBar?: {
1218
+ start: number;
1219
+ end: number;
1220
+ color: string;
1221
+ };
1191
1222
  /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
1192
1223
  richParagraphs?: RichParagraph[];
1193
1224
  text?: string;
@@ -1351,6 +1382,8 @@ declare interface ListColumn {
1351
1382
  format?: ColumnFormat;
1352
1383
  /** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
1353
1384
  rules?: StyleRule[];
1385
+ /** Optional resolved color scale or value-preserving data bar. */
1386
+ visual?: ColumnVisual;
1354
1387
  /** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
1355
1388
  editable?: boolean;
1356
1389
  /** 空值列或特殊数据类型可显式声明编辑输入类型。 */
@@ -1725,6 +1758,8 @@ export declare function parseExcelBindingSession(input: unknown): ExcelBindingSe
1725
1758
  export declare function parseExcelRegionBindingSession(input: unknown): ExcelRegionBindingSession;
1726
1759
 
1727
1760
  declare interface PlanComponent {
1761
+ /** Template-only aggregate binding, expanded into shared primitives during layout. */
1762
+ chartBinding?: ReportChartBinding;
1728
1763
  /** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
1729
1764
  code?: CodeOptions;
1730
1765
  /** Template-only binding; resolved and removed before constructing the output plan. */
@@ -1887,6 +1922,53 @@ declare interface ReportCellSource {
1887
1922
  sourceToken?: string;
1888
1923
  }
1889
1924
 
1925
+ /** Serializable binding; data and authorization continue to come from the existing report source. */
1926
+ declare interface ReportChartBinding {
1927
+ dataset: string;
1928
+ categoryField: string;
1929
+ measures: readonly ReportChartMeasure[];
1930
+ type: ReportChartOptions["type"];
1931
+ sort?: "asc" | "desc";
1932
+ title?: string;
1933
+ showValues?: boolean;
1934
+ maxRows?: number;
1935
+ maxCategories?: number;
1936
+ }
1937
+
1938
+ declare interface ReportChartMeasure extends AggregateRequest {
1939
+ label?: string;
1940
+ color?: string;
1941
+ }
1942
+
1943
+ declare interface ReportChartOptions {
1944
+ type: "bar" | "line" | "stackedBar" | "percentBar";
1945
+ categories: readonly string[];
1946
+ series: readonly ReportChartSeries[];
1947
+ leftMm: number;
1948
+ topMm: number;
1949
+ widthMm: number;
1950
+ heightMm: number;
1951
+ title?: string;
1952
+ showValues?: boolean;
1953
+ }
1954
+
1955
+ declare interface ReportChartSeries {
1956
+ name: string;
1957
+ values: readonly (number | null)[];
1958
+ color?: string;
1959
+ }
1960
+
1961
+ declare interface ReportComparison {
1962
+ field: string;
1963
+ op: ">" | ">=" | "<" | "<=" | "==" | "!=" | "between" | "contains" | "isNull" | "isNotNull";
1964
+ /** Legacy scalar thresholds remain supported. Use right for field-to-field comparisons. */
1965
+ value?: ReportPredicateScalar;
1966
+ right?: ReportPredicateOperand;
1967
+ values?: readonly [ReportPredicateScalar, ReportPredicateScalar];
1968
+ numeric?: "number" | "decimal";
1969
+ valueType?: "number" | "decimal" | "text" | "date" | "boolean";
1970
+ }
1971
+
1890
1972
  declare type ReportExpression = {
1891
1973
  field: string;
1892
1974
  } | {
@@ -1896,10 +1978,14 @@ declare type ReportExpression = {
1896
1978
  field?: string;
1897
1979
  weightField?: string;
1898
1980
  } | {
1899
- op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
1981
+ op: ReportExpressionOperation;
1982
+ /** Required for if; args are [then, else], and only the selected branch is evaluated. */
1983
+ condition?: ReportPredicate;
1900
1984
  args: readonly ReportExpression[];
1901
1985
  };
1902
1986
 
1987
+ declare type ReportExpressionOperation = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
1988
+
1903
1989
  declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
1904
1990
 
1905
1991
  declare interface ReportFieldCalculation {
@@ -1952,12 +2038,9 @@ declare interface ReportParamDef {
1952
2038
  field: string;
1953
2039
  /** 显示名(缺省用 field) */
1954
2040
  label?: string;
1955
- type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select";
2041
+ type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select" | "multiSelect" | "cascader" | "numberRange";
1956
2042
  /** select 选项 */
1957
- options?: Array<{
1958
- label: string;
1959
- value: string;
1960
- }>;
2043
+ options?: ReportParamTreeOption[];
1961
2044
  /** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
1962
2045
  optionsSource?: string;
1963
2046
  /** Select dependencies must be declared parameters; changing a parent clears descendants. */
@@ -1970,8 +2053,34 @@ declare interface ReportParamDef {
1970
2053
  max?: number | string;
1971
2054
  minLength?: number;
1972
2055
  maxLength?: number;
2056
+ /** multiSelect item count (maximum 100). Cascader paths are bounded to 16 levels. */
2057
+ minItems?: number;
2058
+ maxItems?: number;
1973
2059
  }
1974
2060
 
2061
+ /** Cascader values are unique within each sibling list. */
2062
+ declare interface ReportParamTreeOption {
2063
+ label: string;
2064
+ value: string;
2065
+ children?: ReportParamTreeOption[];
2066
+ }
2067
+
2068
+ declare type ReportPredicate = ReportComparison | {
2069
+ all: readonly ReportPredicate[];
2070
+ } | {
2071
+ any: readonly ReportPredicate[];
2072
+ } | {
2073
+ not: ReportPredicate;
2074
+ };
2075
+
2076
+ declare type ReportPredicateOperand = {
2077
+ field: string;
2078
+ } | {
2079
+ value: ReportPredicateScalar;
2080
+ };
2081
+
2082
+ declare type ReportPredicateScalar = string | number | boolean | null;
2083
+
1975
2084
  declare interface ReportTemplate {
1976
2085
  schemaVersion?: string;
1977
2086
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
@@ -2279,13 +2388,7 @@ declare interface Style {
2279
2388
 
2280
2389
  /** 条件格式规则求值(声明式,见 ListColumn.rules) */
2281
2390
  declare interface StyleRule {
2282
- when: {
2283
- field: string;
2284
- op: ">" | ">=" | "<" | "<=" | "==" | "!=";
2285
- value: number | string;
2286
- /** Explicit decimal comparisons retain decimal thresholds as text. */
2287
- numeric?: "number" | "decimal";
2288
- };
2391
+ when: ReportPredicate;
2289
2392
  /** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
2290
2393
  style: Record<string, unknown>;
2291
2394
  }
@@ -3157,6 +3260,8 @@ export declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImage
3157
3260
  sheetMode?: "auto" | "pages" | "continuous";
3158
3261
  /** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
3159
3262
  valueMode?: "text" | "raw";
3263
+ /** Static data-bar drawing budget; fail explicitly rather than omitting bars. Default 10,000. */
3264
+ maxDataBars?: number;
3160
3265
  /** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
3161
3266
  paperSize?: "auto" | "a3" | "a4" | "a5";
3162
3267
  }
@@ -3166,6 +3271,8 @@ export declare interface XlsxRenderResult {
3166
3271
  buffer: ExcelJS.Buffer;
3167
3272
  warnings: string[];
3168
3273
  diagnostics?: OutputDiagnostic[];
3274
+ /** Informational output semantics; these do not indicate missing content. */
3275
+ notes?: string[];
3169
3276
  }
3170
3277
 
3171
3278
  declare interface XlsxWriteOptions extends stream.xlsx.WorkbookWriterOptions {
package/dist/xlsx.d.ts CHANGED
@@ -35,6 +35,14 @@ declare interface AggregateDefinition {
35
35
 
36
36
  declare type AggregateOperation = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
37
37
 
38
+ declare interface AggregateRequest {
39
+ op: AggregateOperation;
40
+ field?: string;
41
+ weightField?: string;
42
+ numeric?: "number" | "decimal";
43
+ digits?: number;
44
+ }
45
+
38
46
  declare interface Alignment {
39
47
  horizontal: 'left' | 'center' | 'right' | 'fill' | 'justify' | 'centerContinuous' | 'distributed';
40
48
  vertical: 'top' | 'middle' | 'bottom' | 'distributed' | 'justify';
@@ -416,6 +424,23 @@ declare type ColumnFormat = {
416
424
  pattern?: string;
417
425
  };
418
426
 
427
+ declare type ColumnVisual = {
428
+ /** Defaults to the column field; never changes the cell's raw value or business identity. */
429
+ field?: string;
430
+ /** Numeric text requires explicit opt-in; formatting an identifier does not turn it into a measure. */
431
+ numeric?: "number" | "decimal";
432
+ min?: number;
433
+ max?: number;
434
+ } & ({
435
+ kind: "colorScale";
436
+ lowColor?: string;
437
+ highColor?: string;
438
+ } | {
439
+ kind: "dataBar";
440
+ color?: string;
441
+ negativeColor?: string;
442
+ });
443
+
419
444
  declare interface Comment_2 {
420
445
  texts?: RichText[];
421
446
  margins?: Partial<CommentMargins>;
@@ -1188,6 +1213,12 @@ declare interface GradientStop {
1188
1213
  }
1189
1214
 
1190
1215
  declare interface GridCell {
1216
+ /** Resolved visual only. Original value, text, editability and source are unchanged. */
1217
+ dataBar?: {
1218
+ start: number;
1219
+ end: number;
1220
+ color: string;
1221
+ };
1191
1222
  /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
1192
1223
  richParagraphs?: RichParagraph[];
1193
1224
  text?: string;
@@ -1351,6 +1382,8 @@ declare interface ListColumn {
1351
1382
  format?: ColumnFormat;
1352
1383
  /** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
1353
1384
  rules?: StyleRule[];
1385
+ /** Optional resolved color scale or value-preserving data bar. */
1386
+ visual?: ColumnVisual;
1354
1387
  /** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
1355
1388
  editable?: boolean;
1356
1389
  /** 空值列或特殊数据类型可显式声明编辑输入类型。 */
@@ -1725,6 +1758,8 @@ export declare function parseExcelBindingSession(input: unknown): ExcelBindingSe
1725
1758
  export declare function parseExcelRegionBindingSession(input: unknown): ExcelRegionBindingSession;
1726
1759
 
1727
1760
  declare interface PlanComponent {
1761
+ /** Template-only aggregate binding, expanded into shared primitives during layout. */
1762
+ chartBinding?: ReportChartBinding;
1728
1763
  /** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
1729
1764
  code?: CodeOptions;
1730
1765
  /** Template-only binding; resolved and removed before constructing the output plan. */
@@ -1887,6 +1922,53 @@ declare interface ReportCellSource {
1887
1922
  sourceToken?: string;
1888
1923
  }
1889
1924
 
1925
+ /** Serializable binding; data and authorization continue to come from the existing report source. */
1926
+ declare interface ReportChartBinding {
1927
+ dataset: string;
1928
+ categoryField: string;
1929
+ measures: readonly ReportChartMeasure[];
1930
+ type: ReportChartOptions["type"];
1931
+ sort?: "asc" | "desc";
1932
+ title?: string;
1933
+ showValues?: boolean;
1934
+ maxRows?: number;
1935
+ maxCategories?: number;
1936
+ }
1937
+
1938
+ declare interface ReportChartMeasure extends AggregateRequest {
1939
+ label?: string;
1940
+ color?: string;
1941
+ }
1942
+
1943
+ declare interface ReportChartOptions {
1944
+ type: "bar" | "line" | "stackedBar" | "percentBar";
1945
+ categories: readonly string[];
1946
+ series: readonly ReportChartSeries[];
1947
+ leftMm: number;
1948
+ topMm: number;
1949
+ widthMm: number;
1950
+ heightMm: number;
1951
+ title?: string;
1952
+ showValues?: boolean;
1953
+ }
1954
+
1955
+ declare interface ReportChartSeries {
1956
+ name: string;
1957
+ values: readonly (number | null)[];
1958
+ color?: string;
1959
+ }
1960
+
1961
+ declare interface ReportComparison {
1962
+ field: string;
1963
+ op: ">" | ">=" | "<" | "<=" | "==" | "!=" | "between" | "contains" | "isNull" | "isNotNull";
1964
+ /** Legacy scalar thresholds remain supported. Use right for field-to-field comparisons. */
1965
+ value?: ReportPredicateScalar;
1966
+ right?: ReportPredicateOperand;
1967
+ values?: readonly [ReportPredicateScalar, ReportPredicateScalar];
1968
+ numeric?: "number" | "decimal";
1969
+ valueType?: "number" | "decimal" | "text" | "date" | "boolean";
1970
+ }
1971
+
1890
1972
  declare type ReportExpression = {
1891
1973
  field: string;
1892
1974
  } | {
@@ -1896,10 +1978,14 @@ declare type ReportExpression = {
1896
1978
  field?: string;
1897
1979
  weightField?: string;
1898
1980
  } | {
1899
- op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
1981
+ op: ReportExpressionOperation;
1982
+ /** Required for if; args are [then, else], and only the selected branch is evaluated. */
1983
+ condition?: ReportPredicate;
1900
1984
  args: readonly ReportExpression[];
1901
1985
  };
1902
1986
 
1987
+ declare type ReportExpressionOperation = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
1988
+
1903
1989
  declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
1904
1990
 
1905
1991
  declare interface ReportFieldCalculation {
@@ -1952,12 +2038,9 @@ declare interface ReportParamDef {
1952
2038
  field: string;
1953
2039
  /** 显示名(缺省用 field) */
1954
2040
  label?: string;
1955
- type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select";
2041
+ type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select" | "multiSelect" | "cascader" | "numberRange";
1956
2042
  /** select 选项 */
1957
- options?: Array<{
1958
- label: string;
1959
- value: string;
1960
- }>;
2043
+ options?: ReportParamTreeOption[];
1961
2044
  /** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
1962
2045
  optionsSource?: string;
1963
2046
  /** Select dependencies must be declared parameters; changing a parent clears descendants. */
@@ -1970,8 +2053,34 @@ declare interface ReportParamDef {
1970
2053
  max?: number | string;
1971
2054
  minLength?: number;
1972
2055
  maxLength?: number;
2056
+ /** multiSelect item count (maximum 100). Cascader paths are bounded to 16 levels. */
2057
+ minItems?: number;
2058
+ maxItems?: number;
1973
2059
  }
1974
2060
 
2061
+ /** Cascader values are unique within each sibling list. */
2062
+ declare interface ReportParamTreeOption {
2063
+ label: string;
2064
+ value: string;
2065
+ children?: ReportParamTreeOption[];
2066
+ }
2067
+
2068
+ declare type ReportPredicate = ReportComparison | {
2069
+ all: readonly ReportPredicate[];
2070
+ } | {
2071
+ any: readonly ReportPredicate[];
2072
+ } | {
2073
+ not: ReportPredicate;
2074
+ };
2075
+
2076
+ declare type ReportPredicateOperand = {
2077
+ field: string;
2078
+ } | {
2079
+ value: ReportPredicateScalar;
2080
+ };
2081
+
2082
+ declare type ReportPredicateScalar = string | number | boolean | null;
2083
+
1975
2084
  declare interface ReportTemplate {
1976
2085
  schemaVersion?: string;
1977
2086
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
@@ -2279,13 +2388,7 @@ declare interface Style {
2279
2388
 
2280
2389
  /** 条件格式规则求值(声明式,见 ListColumn.rules) */
2281
2390
  declare interface StyleRule {
2282
- when: {
2283
- field: string;
2284
- op: ">" | ">=" | "<" | "<=" | "==" | "!=";
2285
- value: number | string;
2286
- /** Explicit decimal comparisons retain decimal thresholds as text. */
2287
- numeric?: "number" | "decimal";
2288
- };
2391
+ when: ReportPredicate;
2289
2392
  /** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
2290
2393
  style: Record<string, unknown>;
2291
2394
  }
@@ -3157,6 +3260,8 @@ export declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImage
3157
3260
  sheetMode?: "auto" | "pages" | "continuous";
3158
3261
  /** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
3159
3262
  valueMode?: "text" | "raw";
3263
+ /** Static data-bar drawing budget; fail explicitly rather than omitting bars. Default 10,000. */
3264
+ maxDataBars?: number;
3160
3265
  /** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
3161
3266
  paperSize?: "auto" | "a3" | "a4" | "a5";
3162
3267
  }
@@ -3166,6 +3271,8 @@ export declare interface XlsxRenderResult {
3166
3271
  buffer: ExcelJS.Buffer;
3167
3272
  warnings: string[];
3168
3273
  diagnostics?: OutputDiagnostic[];
3274
+ /** Informational output semantics; these do not indicate missing content. */
3275
+ notes?: string[];
3169
3276
  }
3170
3277
 
3171
3278
  declare interface XlsxWriteOptions extends stream.xlsx.WorkbookWriterOptions {