@agile-team/mach-report 2.16.0 → 2.17.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 (128) hide show
  1. package/README.md +10 -6
  2. package/dist/{ExcelBindingWizard-CP6h2x1f.cjs → ExcelBindingWizard-Bq6FYME6.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-HhB3hAJE.js → ExcelBindingWizard-Co1svTsw.js} +3 -3
  4. package/dist/{ParamEditor-CUQLgoxa.cjs → ParamEditor-B5UZRgxv.cjs} +1 -1
  5. package/dist/{ParamEditor-OKesP_nO.js → ParamEditor-DNNARyeB.js} +1 -1
  6. package/dist/{ReportBatchPanel-cZCAMAwH.cjs → ReportBatchPanel-Ctvs2t_9.cjs} +1 -1
  7. package/dist/{ReportBatchPanel-ruxcbfY6.js → ReportBatchPanel-uQh06usx.js} +1 -1
  8. package/dist/ReportPreview-BdQawRh0.js +4879 -0
  9. package/dist/ReportPreview-CJC_-j2I.cjs +6 -0
  10. package/dist/{ReportTemplateLibrary-BDlNT8JN.cjs → ReportTemplateLibrary-CnP7_1pH.cjs} +1 -1
  11. package/dist/{ReportTemplateLibrary-DcwrH-63.js → ReportTemplateLibrary-TIL_Oj2l.js} +1 -1
  12. package/dist/RuleEditor-DkRjOLlr.js +2141 -0
  13. package/dist/RuleEditor-h5anGsDB.cjs +1 -0
  14. package/dist/{TemplateOutlinePanel-CGrT5DFN.cjs → TemplateOutlinePanel-BlLxRrfu.cjs} +1 -1
  15. package/dist/{TemplateOutlinePanel-SXCjaPKR.js → TemplateOutlinePanel-BouxsuqQ.js} +1 -1
  16. package/dist/{TemplateReusePanel-lHLOS9Wn.js → TemplateReusePanel-BEACLPaN.js} +2 -2
  17. package/dist/{TemplateReusePanel-6Z3wRFz8.cjs → TemplateReusePanel-yxsHSO40.cjs} +1 -1
  18. package/dist/{TemplateReviewPanel-CJ9PLc48.js → TemplateReviewPanel-B1OGRY2i.js} +1 -1
  19. package/dist/{TemplateReviewPanel-Dpk7sLcF.cjs → TemplateReviewPanel-D9Cx0m2N.cjs} +1 -1
  20. package/dist/analytics.cjs +1 -1
  21. package/dist/analytics.d.cts +63 -1
  22. package/dist/analytics.d.ts +63 -1
  23. package/dist/analytics.js +4 -4
  24. package/dist/artifact-integrity.json +86 -90
  25. package/dist/assets-BIMVwjQe.js +231 -0
  26. package/dist/assets-Dfs2ElxI.cjs +1 -0
  27. package/dist/{auto-YR7a4BtF.js → auto-BIOmtVhk.js} +14 -14
  28. package/dist/{auto-uVBjX1j5.cjs → auto-DDHflI9v.cjs} +1 -1
  29. package/dist/computed-BW5a8QFk.js +612 -0
  30. package/dist/computed-C2GD3XcE.cjs +1 -0
  31. package/dist/dataset-DL83majE.js +161 -0
  32. package/dist/dataset-IrlXbUvh.cjs +1 -0
  33. package/dist/{designer-BfQSahxq.js → designer-D9XAxqSc.js} +1194 -1179
  34. package/dist/designer-uCDo5XSK.cjs +2 -0
  35. package/dist/designer.cjs +1 -1
  36. package/dist/designer.d.cts +125 -3
  37. package/dist/designer.d.ts +125 -3
  38. package/dist/designer.js +1 -1
  39. package/dist/{drill-CsdjgkRM.cjs → drill-ByN8COs_.cjs} +1 -1
  40. package/dist/{drill-DIGsZfyB.js → drill-CKW3Xtfa.js} +11 -11
  41. package/dist/{encoding-BYF9ZTl9.cjs → encoding-BFMFIc4r.cjs} +1 -1
  42. package/dist/{encoding-BOGq4qYL.js → encoding-DP_Eaf0A.js} +2 -2
  43. package/dist/{font-loader-EKLzOJxf.cjs → font-loader-7FWVlykp.cjs} +1 -1
  44. package/dist/{font-loader-CzI1GuBc.js → font-loader-CQZowp0I.js} +1 -1
  45. package/dist/index.cjs +8 -8
  46. package/dist/index.d.cts +173 -1
  47. package/dist/index.d.ts +173 -1
  48. package/dist/index.js +1205 -808
  49. package/dist/json-snapshot-D7PE1NsU.cjs +2 -0
  50. package/dist/{json-snapshot-D6ioHth9.js → json-snapshot-DYmEe3sO.js} +769 -692
  51. package/dist/matrix-JLAXlux-.js +302 -0
  52. package/dist/matrix-gTHpDTGm.cjs +1 -0
  53. package/dist/{pdf-ByVCb1i6.cjs → pdf-B8JouyYv.cjs} +47 -47
  54. package/dist/{pdf-DJ5S6ukC.js → pdf-l3ea86di.js} +13 -15
  55. package/dist/pdf.cjs +1 -1
  56. package/dist/pdf.d.cts +12 -0
  57. package/dist/pdf.d.ts +12 -0
  58. package/dist/pdf.js +2 -2
  59. package/dist/{plugin-C2j5_mhx.js → plugin-BBp74CQZ.js} +1 -1
  60. package/dist/{plugin-Dr39GBRG.cjs → plugin-CtFX9PFG.cjs} +1 -1
  61. package/dist/{prepared-DqtpvRTn.js → prepared-CARicKYh.js} +1 -1
  62. package/dist/{prepared-DdrjLC7L.cjs → prepared-Ch1x_Gog.cjs} +1 -1
  63. package/dist/{protocol-BzwMP4Vw.cjs → protocol-B5A2uom4.cjs} +1 -1
  64. package/dist/{protocol-kt4Iy6-3.js → protocol-BaiWjq5w.js} +3 -3
  65. package/dist/{record-bindings-DUX1VMlR.cjs → record-bindings-B86Sur_y.cjs} +1 -1
  66. package/dist/{record-bindings-CZWBJ1fU.js → record-bindings-D4TuMzHs.js} +1 -1
  67. package/dist/{region-binding-workflow-CWNvIjkV.js → region-binding-workflow-BNasF5kz.js} +2 -2
  68. package/dist/{region-binding-workflow-CqSMxQ4p.cjs → region-binding-workflow-O2Cni3mF.cjs} +1 -1
  69. package/dist/report-encoding-worker.cjs +1 -1
  70. package/dist/report-encoding-worker.js +1 -1
  71. package/dist/runtime-DakRXui3.js +170 -0
  72. package/dist/runtime-dL5ygIfa.cjs +1 -0
  73. package/dist/sbom.cdx.json +1 -1
  74. package/dist/server/node.d.cts +46 -0
  75. package/dist/server/node.d.ts +46 -0
  76. package/dist/server-node.cjs +4 -4
  77. package/dist/server-node.js +2540 -1911
  78. package/dist/server.cjs +1 -1
  79. package/dist/server.d.cts +174 -1
  80. package/dist/server.d.ts +174 -1
  81. package/dist/server.js +787 -544
  82. package/dist/style.css +1 -1
  83. package/dist/template-catalog-Dua8h9ZA.cjs +1 -0
  84. package/dist/{template-catalog-BtR2JmCL.js → template-catalog-wT1fNeAP.js} +4 -4
  85. package/dist/{template-fragments-BVsbxs4a.cjs → template-fragments-BajTajb4.cjs} +1 -1
  86. package/dist/{template-fragments-By0aZC1D.js → template-fragments-DmX5XK4N.js} +1 -1
  87. package/dist/{template-registry-C62vpv4a.cjs → template-registry-CpysHAxy.cjs} +1 -1
  88. package/dist/{template-registry-Cw3vRTX2.js → template-registry-u11fPd8D.js} +5 -5
  89. package/dist/{tree-BX380Rr7.cjs → tree-CLpxYbKa.cjs} +1 -1
  90. package/dist/{tree-CjVZLRw7.js → tree-DNJorJUf.js} +1 -1
  91. package/dist/vue/async.d.cts +108 -2
  92. package/dist/vue/async.d.ts +108 -2
  93. package/dist/vue/index.d.cts +130 -3
  94. package/dist/vue/index.d.ts +130 -3
  95. package/dist/vue-async.cjs +1 -1
  96. package/dist/vue-async.js +3 -3
  97. package/dist/vue.cjs +1 -1
  98. package/dist/vue.js +4 -4
  99. package/dist/{workbook-session-BeSO8PFB.js → workbook-session-B8pNW24X.js} +1 -1
  100. package/dist/{workbook-session-Cbts-22R.cjs → workbook-session-DN5LSA5C.cjs} +1 -1
  101. package/dist/worker.cjs +1 -1
  102. package/dist/worker.js +4 -4
  103. package/dist/xlsx.cjs +4 -4
  104. package/dist/xlsx.d.cts +88 -2
  105. package/dist/xlsx.d.ts +88 -2
  106. package/dist/xlsx.js +232 -230
  107. package/package.json +1 -1
  108. package/dist/ReportPreview-BcDKCLiK.js +0 -4834
  109. package/dist/ReportPreview-Bk9nLfO9.cjs +0 -6
  110. package/dist/RuleEditor-BX5S8RSF.cjs +0 -1
  111. package/dist/RuleEditor-CGl9XY2s.js +0 -2037
  112. package/dist/assets-CqIbfbTr.js +0 -126
  113. package/dist/assets-e4YSke8n.cjs +0 -1
  114. package/dist/capabilities-DDwXr_cA.js +0 -103
  115. package/dist/capabilities-DNLyZdNw.cjs +0 -1
  116. package/dist/computed-C-4C2S5h.js +0 -521
  117. package/dist/computed-CGV2a809.cjs +0 -1
  118. package/dist/dataset-BkRmwgeJ.cjs +0 -1
  119. package/dist/dataset-H5pFuQGU.js +0 -121
  120. package/dist/designer-CPPdeM5_.cjs +0 -2
  121. package/dist/diagnostic-notification-B9K9We3h.cjs +0 -1
  122. package/dist/diagnostic-notification-qGAYZdkB.js +0 -7
  123. package/dist/json-snapshot-DknkjvxP.cjs +0 -2
  124. package/dist/matrix-CGRGkn5s.js +0 -112
  125. package/dist/matrix-gEO7ZM_u.cjs +0 -1
  126. package/dist/runtime-BjKBI530.js +0 -168
  127. package/dist/runtime-CBFEPKEs.cjs +0 -1
  128. package/dist/template-catalog-C2NLdrwB.cjs +0 -1
package/dist/server.d.ts CHANGED
@@ -35,6 +35,8 @@ declare interface AssetRenderBudget {
35
35
 
36
36
  declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMediaOptions {
37
37
  assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
38
+ /** Explicit id/version registry; unbound components continue using assetRenderers by kind. */
39
+ assetRegistry?: ComponentAssetRegistry;
38
40
  assetBudget?: AssetRenderBudget;
39
41
  /** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
40
42
  assetFailure?: "throw" | "placeholder";
@@ -117,6 +119,11 @@ declare type ColumnFormat_2 = {
117
119
  pattern?: string;
118
120
  };
119
121
 
122
+ declare interface ComponentAssetRegistry {
123
+ rendererFor(component: Readonly<PlanComponent>): ComponentImageRenderer | undefined;
124
+ hasExtension(id: string, version: string, kind: string): boolean;
125
+ }
126
+
120
127
  /** A literal own field of the current label record; expressions and paths are not evaluated. */
121
128
  declare interface ComponentBinding {
122
129
  field: string;
@@ -219,6 +226,9 @@ declare interface ComputedField_2 extends ExpressionOptions_2 {
219
226
 
220
227
  export declare function createManagerTemplateCatalog(manager: ReportTemplateManager, metadata?: (document: ReportTemplateDocument) => Pick<LocalTemplateCatalogItem, "category" | "tags">): ReportTemplateCatalogProvider;
221
228
 
229
+ /** Bounded, single-process reference store. Scope is host-authorized identity, never a client permission. */
230
+ export declare function createMemoryReportDocumentStore(options?: ReportDocumentBudget): ReportDocumentStore;
231
+
222
232
  /** Session-local intents; durable hosts should supply their own authorized stable IDs. */
223
233
  export declare function createMemoryReportInstanceIds(maximum?: number): {
224
234
  forCase(templateId: string, caseId: string): string;
@@ -270,6 +280,13 @@ export declare function createReportInstanceManager(store: ReportInstanceStore,
270
280
  /** Durable at-least-once dispatch; export/artifact handlers must be idempotent by scope+taskId. */
271
281
  export declare function createReportJobService(options: ReportJobServiceOptions): ReportJobService;
272
282
 
283
+ /** OpenAPI 3.1 for the minimal Java/Node wire contract. Host registers routes and authorizes IDs before describe(). */
284
+ export declare function createReportOpenApi(descriptions: readonly ReportDescription[], options?: {
285
+ title?: string;
286
+ version?: string;
287
+ basePath?: string;
288
+ }): Record<string, unknown>;
289
+
273
290
  /** 无 Vue、无 HTTP 框架的可选服务端外观;PDF/Excel 仅在对应 export 调用时加载。 */
274
291
  export declare function createReportRuntime(options: ReportRuntimeOptions): ReportRuntime;
275
292
 
@@ -709,6 +726,46 @@ declare interface LocalTemplateCatalogItem {
709
726
  tags?: string[];
710
727
  }
711
728
 
729
+ declare interface MatrixAxisOptions {
730
+ /** Display names in the same outer-to-inner order as the dimension fields. */
731
+ labels?: readonly string[];
732
+ /** Per-level sibling order; omitted levels retain first-seen order. */
733
+ sort?: readonly MatrixDimensionOrder[];
734
+ /** One-based prefix depths. Leaf depths are not subtotals. */
735
+ subtotals?: readonly number[];
736
+ }
737
+
738
+ declare interface MatrixAxisOptions_2 {
739
+ /** Display names in the same outer-to-inner order as the dimension fields. */
740
+ labels?: readonly string[];
741
+ /** Per-level sibling order; omitted levels retain first-seen order. */
742
+ sort?: readonly MatrixDimensionOrder_2[];
743
+ /** One-based prefix depths. Leaf depths are not subtotals. */
744
+ subtotals?: readonly number[];
745
+ }
746
+
747
+ declare type MatrixDimensionOrder = "source" | "asc" | "desc";
748
+
749
+ declare type MatrixDimensionOrder_2 = "source" | "asc" | "desc";
750
+
751
+ declare interface MatrixHierarchyOptions {
752
+ row?: MatrixAxisOptions;
753
+ column?: MatrixAxisOptions;
754
+ /** Only null/missing values use this label; empty strings and zero stay distinct. */
755
+ emptyLabel?: string;
756
+ subtotalLabel?: string;
757
+ totalLabel?: string;
758
+ }
759
+
760
+ declare interface MatrixHierarchyOptions_2 {
761
+ row?: MatrixAxisOptions_2;
762
+ column?: MatrixAxisOptions_2;
763
+ /** Only null/missing values use this label; empty strings and zero stay distinct. */
764
+ emptyLabel?: string;
765
+ subtotalLabel?: string;
766
+ totalLabel?: string;
767
+ }
768
+
712
769
  declare interface MatrixTableOptions {
713
770
  rowFields: readonly string[];
714
771
  columnFields: readonly string[];
@@ -723,6 +780,10 @@ declare interface MatrixTableOptions {
723
780
  maxColumns?: number;
724
781
  maxInputRows?: number;
725
782
  maxCells?: number;
783
+ /** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
784
+ hierarchy?: MatrixHierarchyOptions;
785
+ /** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
786
+ maxAggregateUpdates?: number;
726
787
  }
727
788
 
728
789
  declare interface MatrixTableOptions_2 {
@@ -739,6 +800,10 @@ declare interface MatrixTableOptions_2 {
739
800
  maxColumns?: number;
740
801
  maxInputRows?: number;
741
802
  maxCells?: number;
803
+ /** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
804
+ hierarchy?: MatrixHierarchyOptions_2;
805
+ /** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
806
+ maxAggregateUpdates?: number;
742
807
  }
743
808
 
744
809
  export declare interface MemoryReportInstanceStoreOptions {
@@ -758,6 +823,11 @@ declare interface OutputDiagnostic {
758
823
  componentPath?: readonly number[];
759
824
  kind: string;
760
825
  nid?: string;
826
+ /** Declarative extension identity only; no property values or business binding data enter diagnostics. */
827
+ extension?: {
828
+ id: string;
829
+ version: string;
830
+ };
761
831
  message: string;
762
832
  }
763
833
 
@@ -940,6 +1010,21 @@ export declare interface PreparedReport {
940
1010
 
941
1011
  declare type PublicationAssets = Omit<AssetRenderOptions, "signal">;
942
1012
 
1013
+ /** Progressive consumption ends at the currently committed boundary; caller may resume with nextPage. */
1014
+ export declare function readReportDocumentPages(store: ReportDocumentStore, input: {
1015
+ scope: string;
1016
+ id: string;
1017
+ version: string;
1018
+ fromPage?: number;
1019
+ limit?: number;
1020
+ maxBytes?: number;
1021
+ signal?: AbortSignal;
1022
+ }): Promise<{
1023
+ manifest: ReportDocumentManifest;
1024
+ pages: PlanPage[];
1025
+ nextPage: number;
1026
+ }>;
1027
+
943
1028
  declare interface RenderPlan {
944
1029
  schemaVersion: string;
945
1030
  /** 编辑需要模板重算上下文;跨 Worker/JSON 保留要求,但不声明本地会话可用。 */
@@ -947,6 +1032,8 @@ declare interface RenderPlan {
947
1032
  pages: PlanPage[];
948
1033
  }
949
1034
 
1035
+ export declare const REPORT_HTTP_CONTRACT_VERSION = "1.0";
1036
+
950
1037
  export declare interface ReportBatchCase {
951
1038
  id: string;
952
1039
  params: Record<string, string>;
@@ -1085,6 +1172,46 @@ declare interface ReportDiagnostic {
1085
1172
  target?: ReportDataTarget;
1086
1173
  }
1087
1174
 
1175
+ export declare interface ReportDocumentBudget {
1176
+ maxDocuments?: number;
1177
+ maxBytes?: number;
1178
+ maxPages?: number;
1179
+ maxPageBytes?: number;
1180
+ maxManifestBytes?: number;
1181
+ }
1182
+
1183
+ export declare class ReportDocumentError extends Error {
1184
+ readonly code: "input" | "capacity" | "conflict" | "missing" | "closed";
1185
+ constructor(code: "input" | "capacity" | "conflict" | "missing" | "closed", message: string);
1186
+ }
1187
+
1188
+ export declare interface ReportDocumentManifest {
1189
+ scope: string;
1190
+ id: string;
1191
+ version: string;
1192
+ /** CAS token increases after each append and completion. */
1193
+ revision: number;
1194
+ state: "building" | "complete" | "failed";
1195
+ failure?: {
1196
+ code: "cancelled" | "generation";
1197
+ message: string;
1198
+ };
1199
+ pageCount: number;
1200
+ bytes: number;
1201
+ plan: Omit<RenderPlan, "pages">;
1202
+ metadata?: Omit<PreparedReport, "plan">;
1203
+ }
1204
+
1205
+ export declare interface ReportDocumentStore {
1206
+ create(input: Pick<ReportDocumentManifest, "scope" | "id" | "version" | "plan">, signal?: AbortSignal): Promise<ReportDocumentManifest>;
1207
+ append(scope: string, id: string, version: string, expectedRevision: number, page: PlanPage, signal?: AbortSignal): Promise<ReportDocumentManifest>;
1208
+ complete(scope: string, id: string, version: string, expectedRevision: number, metadata?: Omit<PreparedReport, "plan">, signal?: AbortSignal): Promise<ReportDocumentManifest>;
1209
+ fail(scope: string, id: string, version: string, expectedRevision: number, failure: NonNullable<ReportDocumentManifest["failure"]>): Promise<ReportDocumentManifest>;
1210
+ read(scope: string, id: string, signal?: AbortSignal): Promise<ReportDocumentManifest | undefined>;
1211
+ readPage(scope: string, id: string, version: string, index: number, signal?: AbortSignal): Promise<PlanPage | undefined>;
1212
+ remove(scope: string, id: string, version: string, signal?: AbortSignal): Promise<boolean>;
1213
+ }
1214
+
1088
1215
  declare type ReportExpression = {
1089
1216
  field: string;
1090
1217
  } | {
@@ -1111,7 +1238,15 @@ declare type ReportExpression_2 = {
1111
1238
  args: readonly ReportExpression_2[];
1112
1239
  };
1113
1240
 
1114
- declare interface ReportFieldContract {
1241
+ declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
1242
+
1243
+ declare interface ReportFieldCalculation {
1244
+ /** Business-owned explanation, never executable JavaScript or an inferred business formula. */
1245
+ description: string;
1246
+ dependsOn: readonly string[];
1247
+ }
1248
+
1249
+ declare interface ReportFieldContract extends ReportFieldSemantics {
1115
1250
  field: string;
1116
1251
  label?: string;
1117
1252
  type: "text" | "number" | "boolean" | "date" | "decimal";
@@ -1126,6 +1261,17 @@ declare interface ReportFieldContract {
1126
1261
  unit?: string;
1127
1262
  }
1128
1263
 
1264
+ declare interface ReportFieldSemantics {
1265
+ description?: string;
1266
+ /** Explicit meaning of null/missing; does not convert blanks into zero. */
1267
+ missingMeaning?: string;
1268
+ /** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
1269
+ aggregation?: ReportFieldAggregation;
1270
+ /** Shared presentation only; raw values and calculation precision remain unchanged. */
1271
+ format?: ColumnFormat;
1272
+ calculation?: ReportFieldCalculation;
1273
+ }
1274
+
1129
1275
  declare interface ReportFlowBand {
1130
1276
  /** Exact stable component IDs. Static components use nid, lists use id. */
1131
1277
  componentIds: string[];
@@ -1152,6 +1298,22 @@ export declare interface ReportGenerationInput {
1152
1298
  signal?: AbortSignal;
1153
1299
  }
1154
1300
 
1301
+ /** Stable transport mapping; unexpected errors never expose exception details or stacks. */
1302
+ export declare function reportHttpError(error: unknown, correlationId: string): {
1303
+ status: number;
1304
+ body: ReportHttpErrorBody;
1305
+ };
1306
+
1307
+ export declare interface ReportHttpErrorBody {
1308
+ error: {
1309
+ code: string;
1310
+ message: string;
1311
+ correlationId: string;
1312
+ path?: string;
1313
+ issues?: Record<string, string>[];
1314
+ };
1315
+ }
1316
+
1155
1317
  export declare interface ReportInstanceArtifact {
1156
1318
  key: string;
1157
1319
  format: "pdf" | "xlsx";
@@ -2186,4 +2348,15 @@ declare type ValueFormat = ColumnFormat;
2186
2348
  /** The same declarative formatting used by list columns, before any output backend. */
2187
2349
  declare type ValueFormat_2 = ColumnFormat_2;
2188
2350
 
2351
+ /** Accepts paginateTemplatePages/AsyncIterable without retaining all pages; partial documents stay inspectable on failure. */
2352
+ export declare function writeReportDocument(store: ReportDocumentStore, input: {
2353
+ scope: string;
2354
+ id: string;
2355
+ version: string;
2356
+ plan: Omit<RenderPlan, "pages">;
2357
+ pages: Iterable<PlanPage> | AsyncIterable<PlanPage>;
2358
+ metadata?: Omit<PreparedReport, "plan">;
2359
+ signal?: AbortSignal;
2360
+ }): Promise<ReportDocumentManifest>;
2361
+
2189
2362
  export { }