@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/server.d.ts CHANGED
@@ -22,6 +22,22 @@ declare type AggregateOperation = "sum" | "count" | "avg" | "min" | "max" | "wei
22
22
 
23
23
  declare type AggregateOperation_2 = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
24
24
 
25
+ declare interface AggregateRequest {
26
+ op: AggregateOperation;
27
+ field?: string;
28
+ weightField?: string;
29
+ numeric?: "number" | "decimal";
30
+ digits?: number;
31
+ }
32
+
33
+ declare interface AggregateRequest_2 {
34
+ op: AggregateOperation_2;
35
+ field?: string;
36
+ weightField?: string;
37
+ numeric?: "number" | "decimal";
38
+ digits?: number;
39
+ }
40
+
25
41
  declare interface AssetRenderBudget {
26
42
  /** Maximum newly rendered assets, default 1000. Existing imageData is kept unchanged. */
27
43
  maxAssets?: number;
@@ -119,6 +135,40 @@ declare type ColumnFormat_2 = {
119
135
  pattern?: string;
120
136
  };
121
137
 
138
+ declare type ColumnVisual = {
139
+ /** Defaults to the column field; never changes the cell's raw value or business identity. */
140
+ field?: string;
141
+ /** Numeric text requires explicit opt-in; formatting an identifier does not turn it into a measure. */
142
+ numeric?: "number" | "decimal";
143
+ min?: number;
144
+ max?: number;
145
+ } & ({
146
+ kind: "colorScale";
147
+ lowColor?: string;
148
+ highColor?: string;
149
+ } | {
150
+ kind: "dataBar";
151
+ color?: string;
152
+ negativeColor?: string;
153
+ });
154
+
155
+ declare type ColumnVisual_2 = {
156
+ /** Defaults to the column field; never changes the cell's raw value or business identity. */
157
+ field?: string;
158
+ /** Numeric text requires explicit opt-in; formatting an identifier does not turn it into a measure. */
159
+ numeric?: "number" | "decimal";
160
+ min?: number;
161
+ max?: number;
162
+ } & ({
163
+ kind: "colorScale";
164
+ lowColor?: string;
165
+ highColor?: string;
166
+ } | {
167
+ kind: "dataBar";
168
+ color?: string;
169
+ negativeColor?: string;
170
+ });
171
+
122
172
  declare interface ComponentAssetRegistry {
123
173
  rendererFor(component: Readonly<PlanComponent>): ComponentImageRenderer | undefined;
124
174
  hasExtension(id: string, version: string, kind: string): boolean;
@@ -359,6 +409,12 @@ declare interface FormulaAdapter {
359
409
  }
360
410
 
361
411
  declare interface GridCell {
412
+ /** Resolved visual only. Original value, text, editability and source are unchanged. */
413
+ dataBar?: {
414
+ start: number;
415
+ end: number;
416
+ color: string;
417
+ };
362
418
  /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
363
419
  richParagraphs?: RichParagraph[];
364
420
  text?: string;
@@ -385,6 +441,12 @@ declare interface GridCell {
385
441
  }
386
442
 
387
443
  declare interface GridCell_2 {
444
+ /** Resolved visual only. Original value, text, editability and source are unchanged. */
445
+ dataBar?: {
446
+ start: number;
447
+ end: number;
448
+ color: string;
449
+ };
388
450
  /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
389
451
  richParagraphs?: RichParagraph_2[];
390
452
  text?: string;
@@ -489,6 +551,8 @@ declare interface ListColumn {
489
551
  format?: ColumnFormat;
490
552
  /** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
491
553
  rules?: StyleRule[];
554
+ /** Optional resolved color scale or value-preserving data bar. */
555
+ visual?: ColumnVisual;
492
556
  /** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
493
557
  editable?: boolean;
494
558
  /** 空值列或特殊数据类型可显式声明编辑输入类型。 */
@@ -515,6 +579,8 @@ declare interface ListColumn_2 {
515
579
  format?: ColumnFormat_2;
516
580
  /** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
517
581
  rules?: StyleRule_2[];
582
+ /** Optional resolved color scale or value-preserving data bar. */
583
+ visual?: ColumnVisual_2;
518
584
  /** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
519
585
  editable?: boolean;
520
586
  /** 空值列或特殊数据类型可显式声明编辑输入类型。 */
@@ -855,6 +921,8 @@ declare interface PaginateOptions {
855
921
  maxPages?: number;
856
922
  /** Actual grid cells, including repeated furniture and nested children; checked before each page is appended. */
857
923
  maxCells?: number;
924
+ /** Shared bound-chart primitive budget, checked before expansion; default 50000, range 1..1000000. */
925
+ maxChartComponents?: number;
858
926
  signal?: AbortSignal;
859
927
  /** Streaming total-page anchors can skip the bounded counting pass when known. */
860
928
  knownTotalPages?: number;
@@ -867,6 +935,8 @@ declare interface PaginateOptions {
867
935
  export declare function parseReportTemplatePackage(input: unknown, options?: ReportTemplatePackageOptions): ReportTemplatePackage;
868
936
 
869
937
  declare interface PlanComponent {
938
+ /** Template-only aggregate binding, expanded into shared primitives during layout. */
939
+ chartBinding?: ReportChartBinding;
870
940
  /** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
871
941
  code?: CodeOptions;
872
942
  /** Template-only binding; resolved and removed before constructing the output plan. */
@@ -896,6 +966,8 @@ declare interface PlanComponent {
896
966
  }
897
967
 
898
968
  declare interface PlanComponent_2 {
969
+ /** Template-only aggregate binding, expanded into shared primitives during layout. */
970
+ chartBinding?: ReportChartBinding_2;
899
971
  /** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
900
972
  code?: CodeOptions_2;
901
973
  /** Template-only binding; resolved and removed before constructing the output plan. */
@@ -1121,6 +1193,100 @@ declare interface ReportCellTableIdentity {
1121
1193
 
1122
1194
  declare type ReportCellValue = string | number | boolean | null;
1123
1195
 
1196
+ /** Serializable binding; data and authorization continue to come from the existing report source. */
1197
+ declare interface ReportChartBinding {
1198
+ dataset: string;
1199
+ categoryField: string;
1200
+ measures: readonly ReportChartMeasure[];
1201
+ type: ReportChartOptions["type"];
1202
+ sort?: "asc" | "desc";
1203
+ title?: string;
1204
+ showValues?: boolean;
1205
+ maxRows?: number;
1206
+ maxCategories?: number;
1207
+ }
1208
+
1209
+ /** Serializable binding; data and authorization continue to come from the existing report source. */
1210
+ declare interface ReportChartBinding_2 {
1211
+ dataset: string;
1212
+ categoryField: string;
1213
+ measures: readonly ReportChartMeasure_2[];
1214
+ type: ReportChartOptions_2["type"];
1215
+ sort?: "asc" | "desc";
1216
+ title?: string;
1217
+ showValues?: boolean;
1218
+ maxRows?: number;
1219
+ maxCategories?: number;
1220
+ }
1221
+
1222
+ declare interface ReportChartMeasure extends AggregateRequest {
1223
+ label?: string;
1224
+ color?: string;
1225
+ }
1226
+
1227
+ declare interface ReportChartMeasure_2 extends AggregateRequest_2 {
1228
+ label?: string;
1229
+ color?: string;
1230
+ }
1231
+
1232
+ declare interface ReportChartOptions {
1233
+ type: "bar" | "line" | "stackedBar" | "percentBar";
1234
+ categories: readonly string[];
1235
+ series: readonly ReportChartSeries[];
1236
+ leftMm: number;
1237
+ topMm: number;
1238
+ widthMm: number;
1239
+ heightMm: number;
1240
+ title?: string;
1241
+ showValues?: boolean;
1242
+ }
1243
+
1244
+ declare interface ReportChartOptions_2 {
1245
+ type: "bar" | "line" | "stackedBar" | "percentBar";
1246
+ categories: readonly string[];
1247
+ series: readonly ReportChartSeries_2[];
1248
+ leftMm: number;
1249
+ topMm: number;
1250
+ widthMm: number;
1251
+ heightMm: number;
1252
+ title?: string;
1253
+ showValues?: boolean;
1254
+ }
1255
+
1256
+ declare interface ReportChartSeries {
1257
+ name: string;
1258
+ values: readonly (number | null)[];
1259
+ color?: string;
1260
+ }
1261
+
1262
+ declare interface ReportChartSeries_2 {
1263
+ name: string;
1264
+ values: readonly (number | null)[];
1265
+ color?: string;
1266
+ }
1267
+
1268
+ declare interface ReportComparison {
1269
+ field: string;
1270
+ op: ">" | ">=" | "<" | "<=" | "==" | "!=" | "between" | "contains" | "isNull" | "isNotNull";
1271
+ /** Legacy scalar thresholds remain supported. Use right for field-to-field comparisons. */
1272
+ value?: ReportPredicateScalar;
1273
+ right?: ReportPredicateOperand;
1274
+ values?: readonly [ReportPredicateScalar, ReportPredicateScalar];
1275
+ numeric?: "number" | "decimal";
1276
+ valueType?: "number" | "decimal" | "text" | "date" | "boolean";
1277
+ }
1278
+
1279
+ declare interface ReportComparison_2 {
1280
+ field: string;
1281
+ op: ">" | ">=" | "<" | "<=" | "==" | "!=" | "between" | "contains" | "isNull" | "isNotNull";
1282
+ /** Legacy scalar thresholds remain supported. Use right for field-to-field comparisons. */
1283
+ value?: ReportPredicateScalar_2;
1284
+ right?: ReportPredicateOperand_2;
1285
+ values?: readonly [ReportPredicateScalar_2, ReportPredicateScalar_2];
1286
+ numeric?: "number" | "decimal";
1287
+ valueType?: "number" | "decimal" | "text" | "date" | "boolean";
1288
+ }
1289
+
1124
1290
  declare interface ReportDataTarget {
1125
1291
  datasetId: string;
1126
1292
  field: string;
@@ -1221,7 +1387,9 @@ declare type ReportExpression = {
1221
1387
  field?: string;
1222
1388
  weightField?: string;
1223
1389
  } | {
1224
- op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
1390
+ op: ReportExpressionOperation;
1391
+ /** Required for if; args are [then, else], and only the selected branch is evaluated. */
1392
+ condition?: ReportPredicate;
1225
1393
  args: readonly ReportExpression[];
1226
1394
  };
1227
1395
 
@@ -1234,10 +1402,16 @@ declare type ReportExpression_2 = {
1234
1402
  field?: string;
1235
1403
  weightField?: string;
1236
1404
  } | {
1237
- op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
1405
+ op: ReportExpressionOperation_2;
1406
+ /** Required for if; args are [then, else], and only the selected branch is evaluated. */
1407
+ condition?: ReportPredicate_2;
1238
1408
  args: readonly ReportExpression_2[];
1239
1409
  };
1240
1410
 
1411
+ declare type ReportExpressionOperation = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
1412
+
1413
+ declare type ReportExpressionOperation_2 = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
1414
+
1241
1415
  declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
1242
1416
 
1243
1417
  declare interface ReportFieldCalculation {
@@ -1506,6 +1680,8 @@ declare interface ReportLoadContext {
1506
1680
  signal?: AbortSignal;
1507
1681
  }
1508
1682
 
1683
+ declare type ReportNumberRange = readonly [number, number];
1684
+
1509
1685
  export declare interface ReportPackageFixture {
1510
1686
  name: string;
1511
1687
  /** Explicit host confirmation; the SDK does not infer that business values are anonymous. */
@@ -1559,12 +1735,9 @@ declare interface ReportParamDef {
1559
1735
  field: string;
1560
1736
  /** 显示名(缺省用 field) */
1561
1737
  label?: string;
1562
- type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select";
1738
+ type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select" | "multiSelect" | "cascader" | "numberRange";
1563
1739
  /** select 选项 */
1564
- options?: Array<{
1565
- label: string;
1566
- value: string;
1567
- }>;
1740
+ options?: ReportParamTreeOption[];
1568
1741
  /** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
1569
1742
  optionsSource?: string;
1570
1743
  /** Select dependencies must be declared parameters; changing a parent clears descendants. */
@@ -1577,6 +1750,9 @@ declare interface ReportParamDef {
1577
1750
  max?: number | string;
1578
1751
  minLength?: number;
1579
1752
  maxLength?: number;
1753
+ /** multiSelect item count (maximum 100). Cascader paths are bounded to 16 levels. */
1754
+ minItems?: number;
1755
+ maxItems?: number;
1580
1756
  }
1581
1757
 
1582
1758
  /** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
@@ -1585,12 +1761,9 @@ declare interface ReportParamDef_2 {
1585
1761
  field: string;
1586
1762
  /** 显示名(缺省用 field) */
1587
1763
  label?: string;
1588
- type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select";
1764
+ type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select" | "multiSelect" | "cascader" | "numberRange";
1589
1765
  /** select 选项 */
1590
- options?: Array<{
1591
- label: string;
1592
- value: string;
1593
- }>;
1766
+ options?: ReportParamTreeOption_2[];
1594
1767
  /** Opaque host-resolved source key. No URL, credentials or executable code is stored. */
1595
1768
  optionsSource?: string;
1596
1769
  /** Select dependencies must be declared parameters; changing a parent clears descendants. */
@@ -1603,6 +1776,9 @@ declare interface ReportParamDef_2 {
1603
1776
  max?: number | string;
1604
1777
  minLength?: number;
1605
1778
  maxLength?: number;
1779
+ /** multiSelect item count (maximum 100). Cascader paths are bounded to 16 levels. */
1780
+ minItems?: number;
1781
+ maxItems?: number;
1606
1782
  }
1607
1783
 
1608
1784
  declare interface ReportParamIssue {
@@ -1612,14 +1788,30 @@ declare interface ReportParamIssue {
1612
1788
  message: string;
1613
1789
  }
1614
1790
 
1615
- declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "dependency" | "minimum" | "maximum" | "minLength" | "maxLength";
1791
+ declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "dependency" | "minimum" | "maximum" | "minLength" | "maxLength" | "minItems" | "maxItems";
1792
+
1793
+ /** Cascader values are unique within each sibling list. */
1794
+ declare interface ReportParamTreeOption {
1795
+ label: string;
1796
+ value: string;
1797
+ children?: ReportParamTreeOption[];
1798
+ }
1799
+
1800
+ /** Cascader values are unique within each sibling list. */
1801
+ declare interface ReportParamTreeOption_2 {
1802
+ label: string;
1803
+ value: string;
1804
+ children?: ReportParamTreeOption_2[];
1805
+ }
1806
+
1807
+ declare type ReportParamTypedValue = string | number | string[] | ReportNumberRange;
1616
1808
 
1617
1809
  declare interface ReportParamValidation {
1618
1810
  ok: boolean;
1619
1811
  /** 保留历史取数契约的字符串形式;未知参数保留,不能代替接口权限白名单。 */
1620
1812
  values: Record<string, string>;
1621
1813
  /** JSON Schema 对应的规范值:number 参数转换为有限数字。 */
1622
- typedValues: Record<string, string | number>;
1814
+ typedValues: Record<string, ReportParamTypedValue>;
1623
1815
  issues: ReportParamIssue[];
1624
1816
  }
1625
1817
 
@@ -1635,6 +1827,38 @@ export declare interface ReportPdfFontOptions {
1635
1827
  };
1636
1828
  }
1637
1829
 
1830
+ declare type ReportPredicate = ReportComparison | {
1831
+ all: readonly ReportPredicate[];
1832
+ } | {
1833
+ any: readonly ReportPredicate[];
1834
+ } | {
1835
+ not: ReportPredicate;
1836
+ };
1837
+
1838
+ declare type ReportPredicate_2 = ReportComparison_2 | {
1839
+ all: readonly ReportPredicate_2[];
1840
+ } | {
1841
+ any: readonly ReportPredicate_2[];
1842
+ } | {
1843
+ not: ReportPredicate_2;
1844
+ };
1845
+
1846
+ declare type ReportPredicateOperand = {
1847
+ field: string;
1848
+ } | {
1849
+ value: ReportPredicateScalar;
1850
+ };
1851
+
1852
+ declare type ReportPredicateOperand_2 = {
1853
+ field: string;
1854
+ } | {
1855
+ value: ReportPredicateScalar_2;
1856
+ };
1857
+
1858
+ declare type ReportPredicateScalar = string | number | boolean | null;
1859
+
1860
+ declare type ReportPredicateScalar_2 = string | number | boolean | null;
1861
+
1638
1862
  /** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
1639
1863
  declare interface ReportProvider {
1640
1864
  query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
@@ -1702,6 +1926,8 @@ export declare interface ReportRuntimeBudget {
1702
1926
  maxRows?: number;
1703
1927
  maxPages?: number;
1704
1928
  maxCells?: number;
1929
+ /** Aggregate bound-chart primitives per prepare, before expansion; default 50000, hard maximum 1000000. */
1930
+ maxChartComponents?: number;
1705
1931
  maxOutputBytes?: number;
1706
1932
  /** Bound the plain JSON snapshot accepted by exportPrepared (default 64 MB). */
1707
1933
  maxPreparedBytes?: number;
@@ -1730,6 +1956,7 @@ export declare interface ReportRuntimeExportInput extends ReportRuntimeInput {
1730
1956
  sheetMode?: "auto" | "pages" | "continuous";
1731
1957
  valueMode?: "text" | "raw";
1732
1958
  paperSize?: "auto" | "a3" | "a4" | "a5";
1959
+ maxDataBars?: number;
1733
1960
  sheetName?: (sheetIndex: number) => string;
1734
1961
  };
1735
1962
  }
@@ -2210,26 +2437,14 @@ export declare function snapshotReportInstance(value: ReportInstanceSnapshot, ma
2210
2437
 
2211
2438
  /** 条件格式规则求值(声明式,见 ListColumn.rules) */
2212
2439
  declare interface StyleRule {
2213
- when: {
2214
- field: string;
2215
- op: ">" | ">=" | "<" | "<=" | "==" | "!=";
2216
- value: number | string;
2217
- /** Explicit decimal comparisons retain decimal thresholds as text. */
2218
- numeric?: "number" | "decimal";
2219
- };
2440
+ when: ReportPredicate;
2220
2441
  /** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
2221
2442
  style: Record<string, unknown>;
2222
2443
  }
2223
2444
 
2224
2445
  /** 条件格式规则求值(声明式,见 ListColumn.rules) */
2225
2446
  declare interface StyleRule_2 {
2226
- when: {
2227
- field: string;
2228
- op: ">" | ">=" | "<" | "<=" | "==" | "!=";
2229
- value: number | string;
2230
- /** Explicit decimal comparisons retain decimal thresholds as text. */
2231
- numeric?: "number" | "decimal";
2232
- };
2447
+ when: ReportPredicate_2;
2233
2448
  /** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
2234
2449
  style: Record<string, unknown>;
2235
2450
  }
package/dist/server.js CHANGED
@@ -1,16 +1,16 @@
1
- import { c as W } from "./runtime-DakRXui3.js";
2
- import { R as A, t as h, c as T, p as Re } from "./sha256-DTG-Gq8i.js";
3
- import { F as Se, s as Y, G as Ie } from "./json-snapshot-DYmEe3sO.js";
4
- import { R, c as X, s as P, a as H, j as Ee, b as ke, r as Oe } from "./batch-WzDIXJAt.js";
5
- import { d as rr, e as nr, f as sr, v as ar, g as or } from "./batch-WzDIXJAt.js";
6
- import { r as Ae, a as Pe } from "./template-catalog-wT1fNeAP.js";
7
- import { p as $, b as le, v as je } from "./template-registry-u11fPd8D.js";
8
- import { v as pe, s as ee, a as Te } from "./prepared-CARicKYh.js";
9
- import { R as Ne, d as Be } from "./param-validation-Do7Eg8Zv.js";
10
- import { g as we } from "./record-bindings-D4TuMzHs.js";
1
+ import { c as W } from "./runtime-CEMvybO7.js";
2
+ import { R as A, t as h, c as T, p as Re } from "./sha256-BDQ1Qk7A.js";
3
+ import { J as Se, s as Y, K as Ie } from "./json-snapshot-By4ZVVUt.js";
4
+ import { R, c as X, s as P, a as H, j as Ee, b as ke, r as Oe } from "./batch-DGCt44XM.js";
5
+ import { d as rr, e as nr, f as sr, v as ar, g as or } from "./batch-DGCt44XM.js";
6
+ import { r as Ae, a as Pe } from "./template-catalog-CmbWOJqy.js";
7
+ import { p as $, b as le, v as je } from "./template-registry-BIhIHOab.js";
8
+ import { v as pe, s as ee, a as Te } from "./prepared-BE-4jfX5.js";
9
+ import { R as Ne, l as Be } from "./param-validation-CnDEd2l-.js";
10
+ import { g as we } from "./record-bindings-DEJtmo3p.js";
11
11
  import { v as ye } from "./dataset-DL83majE.js";
12
12
  import { c as me } from "./media-Y90dHK9z.js";
13
- import { R as $e } from "./component-tree-Ca6YYfHq.js";
13
+ import { R as $e } from "./component-tree-CvW4lzpv.js";
14
14
  function zt(e = {}) {
15
15
  const t = e.concurrency ?? 1, r = e.maxQueued ?? 20;
16
16
  if (!Number.isSafeInteger(t) || t < 1 || !Number.isSafeInteger(r) || r < 0) throw new A("budget", "队列并发应为正整数,排队上限应为非负整数");
@@ -50,14 +50,14 @@ function zt(e = {}) {
50
50
  const z = n.indexOf(I);
51
51
  z >= 0 && n.splice(z, 1), M(), f();
52
52
  }
53
- }, C = () => E(d.signal?.reason), Z = (S, k) => {
53
+ }, C = () => E(d.signal?.reason), K = (S, k) => {
54
54
  w === "running" && (!Number.isFinite(S) || S < 0 || k !== void 0 && (!Number.isFinite(k) || k < S) || (g = { completed: S, ...k === void 0 ? {} : { total: k } }));
55
55
  }, B = (S) => {
56
- w !== "running" || p.signal.aborted || (y = { ...S, taskId: l }, S.completed !== void 0 && Z(S.completed, S.total), Se(d.onEvent, y, p.signal));
56
+ w !== "running" || p.signal.aborted || (y = { ...S, taskId: l }, S.completed !== void 0 && K(S.completed, S.total), Se(d.onEvent, y, p.signal));
57
57
  }, I = {
58
58
  cancel: E,
59
59
  start: () => {
60
- w === "queued" && (w = "running", s.add(I), Promise.resolve().then(() => (h(p.signal), i({ taskId: l, signal: p.signal, reportProgress: Z, onEvent: B }))).then(
60
+ w === "queued" && (w = "running", s.add(I), Promise.resolve().then(() => (h(p.signal), i({ taskId: l, signal: p.signal, reportProgress: K, onEvent: B }))).then(
61
61
  (S) => {
62
62
  w === "running" && (w = "completed", m(S));
63
63
  },
@@ -531,17 +531,17 @@ function Ue(e) {
531
531
  t.add(r.key);
532
532
  }
533
533
  }
534
- function Ze(e) {
534
+ function Ke(e) {
535
535
  const { scope: t, id: r, revision: n, title: s, generatedAt: a, reportIds: o, params: u, templateRevisions: f, sourceRevisions: c } = e;
536
536
  return JSON.parse(JSON.stringify({ scope: t, id: r, revision: n, title: s, generatedAt: a, reportIds: o, params: u, templateRevisions: f, sourceRevisions: c }));
537
537
  }
538
- function Ke(e) {
538
+ function Ze(e) {
539
539
  const t = { maxInstances: 100, maxRevisions: 20, maxBytes: 64e6, maxSnapshotBytes: 8e6, ...e };
540
540
  if (Object.values(t).some((r) => !Number.isSafeInteger(r) || r < 1)) throw new b("input", "实例存储预算应为正安全整数");
541
541
  return t;
542
542
  }
543
543
  function Ft(e = {}) {
544
- const t = Ke(e), r = /* @__PURE__ */ new Map();
544
+ const t = Ze(e), r = /* @__PURE__ */ new Map();
545
545
  let n = 0;
546
546
  return {
547
547
  read: async (s, a, o, u) => {
@@ -554,7 +554,7 @@ function Ft(e = {}) {
554
554
  const o = a.limit ?? 25;
555
555
  if (!Number.isSafeInteger(o) || o < 1 || o > 100) throw new b("input", "实例每页数量应为 1–100");
556
556
  const u = Array.from(r.values(), (f) => f.get(f.size)).filter((f) => f.scope === s && (!a.after || f.id > a.after) && (!a.reportId || f.reportIds.includes(a.reportId))).sort((f, c) => f.id < c.id ? -1 : 1).slice(0, o + 1);
557
- return { items: u.slice(0, o).map(Ze), ...u.length > o ? { next: u[o - 1].id } : {} };
557
+ return { items: u.slice(0, o).map(Ke), ...u.length > o ? { next: u[o - 1].id } : {} };
558
558
  },
559
559
  compareAndSwap: async (s, a, o, u, f) => {
560
560
  h(f), J(s, a);
@@ -916,7 +916,7 @@ function Ut(e) {
916
916
  }
917
917
  };
918
918
  }
919
- const be = "2.17.0";
919
+ const be = "2.19.0";
920
920
  function U(e, t) {
921
921
  const r = t?.componentPath;
922
922
  if (!Number.isSafeInteger(t?.pageIndex) || t.pageIndex < 0 || !Array.isArray(r) || r.length < 1 || r.length > 31 || r.length % 3 !== 1 || r.some((s) => !Number.isSafeInteger(s) || s < 0)) throw new TypeError("模板包图片位置无效");
@@ -1071,12 +1071,12 @@ function xe(e, t = {}) {
1071
1071
  if (!n || typeof n != "object" || Array.isArray(n) || n.schemaVersion !== "1.0" || Object.keys(n).some((s) => !["schemaVersion", "minimumVersion", "document", "contracts", "resources", "fixtures"].includes(s))) throw new TypeError("模板包结构或版本无效");
1072
1072
  return gt(n.minimumVersion, t.runtimeVersion ?? be), n.document = $(n.document), ht(n), xt(n), Rt(n, Q(t.maxResourceBytes, 32e6, 64e6)), n;
1073
1073
  }
1074
- function Zt(e, t = {}) {
1074
+ function Kt(e, t = {}) {
1075
1075
  const r = Y(e, { maxBytes: Q(t.maxBytes, 8e6, 32e6), check: () => h(t.signal), error: (s, a) => new TypeError(a) }), n = xe({ schemaVersion: "1.0", ...r, minimumVersion: r.minimumVersion ?? be, resources: r.resources ?? [] }, t);
1076
1076
  for (const s of n.resources) for (const a of s.targets ?? []) delete U(n.document, a).imageData;
1077
1077
  return n;
1078
1078
  }
1079
- async function Kt(e, t) {
1079
+ async function Zt(e, t) {
1080
1080
  const { resolve: r, signal: n, maxDurationMs: s } = t, a = xe(e, t), o = await mt(a.document, a.resources, r, n, s);
1081
1081
  return { document: a.document, fonts: o, contracts: a.contracts, fixtures: a.fixtures ?? [] };
1082
1082
  }
@@ -1272,7 +1272,7 @@ function Wt(e, t) {
1272
1272
  ...a ? { issues: a } : {}
1273
1273
  } } };
1274
1274
  }
1275
- function K(e, t, r) {
1275
+ function Z(e, t, r) {
1276
1276
  return { description: r, headers: { "X-Request-Id": { schema: { type: "string" }, description: "Request correlation identity" } }, content: { [e]: { schema: t } } };
1277
1277
  }
1278
1278
  function Ot(e) {
@@ -1288,14 +1288,14 @@ function Yt(e, t = {}) {
1288
1288
  const r = t.basePath ?? "/reports";
1289
1289
  if (!/^\/[A-Za-z0-9/_-]*[A-Za-z0-9_-]$/.test(r)) throw new Error("OpenAPI basePath 应为不含查询串、参数和尾斜线的绝对路径");
1290
1290
  const n = {
1291
- [r]: { get: { operationId: "describeReports", responses: { 200: K("application/json", { type: "array", items: { type: "object" } }, "Authorized report descriptions") } } }
1291
+ [r]: { get: { operationId: "describeReports", responses: { 200: Z("application/json", { type: "array", items: { type: "object" } }, "Authorized report descriptions") } } }
1292
1292
  }, s = /* @__PURE__ */ new Set();
1293
1293
  for (const a of e) {
1294
1294
  if (!a.id.trim() || s.has(a.id) || [".", ".."].includes(a.id)) throw new Error("OpenAPI 报表 ID 应非空、唯一且不是路径跳转段");
1295
1295
  s.add(a.id);
1296
1296
  for (const o of ["prepare", "pdf", "xlsx"]) {
1297
- const u = o === "prepare" ? "prepare" : `export/${o}`, f = o !== "prepare", c = { 200: K(f ? o === "pdf" ? "application/pdf" : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : "application/json", f ? { type: "string", format: "binary" } : { type: "object", required: ["plan", "stats", "diagnostics", "revisions"] }, f ? "Report file" : "Prepared report snapshot") };
1298
- for (const i of [400, 413, 422, 429, 499, 500, 502, 503, 504]) c[String(i)] = K("application/json", { $ref: "#/components/schemas/ReportError" }, "Structured report error");
1297
+ const u = o === "prepare" ? "prepare" : `export/${o}`, f = o !== "prepare", c = { 200: Z(f ? o === "pdf" ? "application/pdf" : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : "application/json", f ? { type: "string", format: "binary" } : { type: "object", required: ["plan", "stats", "diagnostics", "revisions"] }, f ? "Report file" : "Prepared report snapshot") };
1298
+ for (const i of [400, 413, 422, 429, 499, 500, 502, 503, 504]) c[String(i)] = Z("application/json", { $ref: "#/components/schemas/ReportError" }, "Structured report error");
1299
1299
  n[`${r}/${encodeURIComponent(a.id)}/${u}`] = { post: {
1300
1300
  operationId: `report_${s.size}_${o}`,
1301
1301
  parameters: [{ in: "header", name: "X-Request-Id", schema: { type: "string", pattern: "^[A-Za-z0-9._-]{1,80}$" } }],
@@ -1332,15 +1332,15 @@ export {
1332
1332
  Yt as createReportOpenApi,
1333
1333
  W as createReportRuntime,
1334
1334
  zt as createReportTaskQueue,
1335
- Zt as createReportTemplatePackage,
1335
+ Kt as createReportTemplatePackage,
1336
1336
  Ut as createReportWorkflow,
1337
1337
  xe as parseReportTemplatePackage,
1338
1338
  Gt as readReportDocumentPages,
1339
1339
  Wt as reportHttpError,
1340
1340
  Vt as reportInstanceParameterKey,
1341
- Ze as reportInstanceSummary,
1341
+ Ke as reportInstanceSummary,
1342
1342
  wt as reportPackageResourceDigest,
1343
- Kt as resolveReportTemplatePackage,
1343
+ Zt as resolveReportTemplatePackage,
1344
1344
  Lt as reviewReportPublication,
1345
1345
  Ht as runLabelStream,
1346
1346
  Oe as runReportBatch,