@agile-team/mach-report 2.21.1 → 2.22.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 (110) hide show
  1. package/README.md +16 -2
  2. package/dist/{ExcelBindingWizard-Bu0LUlzl.cjs → ExcelBindingWizard-CW79I6Gl.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-mnAO2qOX.js → ExcelBindingWizard-CZyppD7I.js} +3 -3
  4. package/dist/{ParamEditor-38ZfNrPU.cjs → ParamEditor-CiYCJI0b.cjs} +1 -1
  5. package/dist/{ParamEditor-C8l0EC8m.js → ParamEditor-DQit-Gdf.js} +2 -2
  6. package/dist/{ReportBatchPanel-CfUVhvkO.js → ReportBatchPanel-DKTpV7MU.js} +2 -2
  7. package/dist/{ReportBatchPanel-nCC06Nfp.cjs → ReportBatchPanel-Db6TAfG5.cjs} +1 -1
  8. package/dist/ReportLabelStudio-B0i9ohQj.cjs +1 -0
  9. package/dist/ReportLabelStudio-BYnRqmje.js +780 -0
  10. package/dist/{ReportParamPanel-peB-KEmm.js → ReportParamPanel-BHSKVL8k.js} +231 -224
  11. package/dist/ReportParamPanel-lngONOEz.cjs +1 -0
  12. package/dist/ReportPreview-BDgKssYR.js +5887 -0
  13. package/dist/ReportPreview-Dw-4icG6.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-B5t_EcIs.js → ReportTemplateLibrary-BZuKn0YK.js} +1 -1
  15. package/dist/{ReportTemplateLibrary-DVlsf72p.cjs → ReportTemplateLibrary-DEXH07ND.cjs} +1 -1
  16. package/dist/{RuleEditor-kT1JsZ9f.js → RuleEditor-CIQn547x.js} +3 -3
  17. package/dist/{RuleEditor-xFkCVlii.cjs → RuleEditor-zSUmPjKa.cjs} +1 -1
  18. package/dist/{TemplateOutlinePanel-CDI6mfWx.cjs → TemplateOutlinePanel-B5SfGYVN.cjs} +1 -1
  19. package/dist/{TemplateOutlinePanel-BesgGR1P.js → TemplateOutlinePanel-D0PgOSQE.js} +2 -2
  20. package/dist/{TemplateReusePanel-BNFU6V-W.js → TemplateReusePanel-BKlAEF8-.js} +2 -2
  21. package/dist/{TemplateReusePanel-BG9Or5-P.cjs → TemplateReusePanel-DAy_Hwqz.cjs} +1 -1
  22. package/dist/TemplateReviewPanel-CowmHaQQ.cjs +1 -0
  23. package/dist/{TemplateReviewPanel-CwvwyCSs.js → TemplateReviewPanel-div-EH_m.js} +2 -2
  24. package/dist/artifact-integrity.json +76 -76
  25. package/dist/{auto-Tq7ReIC1.cjs → auto-DcUHlKob.cjs} +1 -1
  26. package/dist/{auto-BkdGiNtr.js → auto-moShblh1.js} +4 -4
  27. package/dist/{designer-HQi-03R6.js → designer-B7jJeAeG.js} +1500 -1455
  28. package/dist/{designer-DU3yDWgs.cjs → designer-BWQVpJeN.cjs} +2 -2
  29. package/dist/designer.cjs +1 -1
  30. package/dist/designer.d.cts +149 -2
  31. package/dist/designer.d.ts +149 -2
  32. package/dist/designer.js +13 -12
  33. package/dist/{encoding-BSeUwrN7.js → encoding-DbnhbwI8.js} +2 -2
  34. package/dist/{encoding-B79hW4zq.cjs → encoding-ncQAvyOv.cjs} +1 -1
  35. package/dist/index.cjs +5 -5
  36. package/dist/index.d.cts +38 -0
  37. package/dist/index.d.ts +38 -0
  38. package/dist/index.js +299 -279
  39. package/dist/{json-snapshot-Kgn459Oj.js → json-snapshot-DvQbZlD7.js} +2 -2
  40. package/dist/{json-snapshot-I5VI84Vp.cjs → json-snapshot-nyV63AbB.cjs} +1 -1
  41. package/dist/{plugin-BaRUGORD.cjs → plugin-AcAQ2m9X.cjs} +1 -1
  42. package/dist/{plugin-D4kAxfLG.js → plugin-w5Nyt08U.js} +1 -1
  43. package/dist/{prefill-CJSazcVY.js → prefill-BXBxx5We.js} +1 -1
  44. package/dist/{prefill-Bpyn58AZ.cjs → prefill-DUvejVt1.cjs} +1 -1
  45. package/dist/prepared-YXy-fVLw.cjs +1 -0
  46. package/dist/{prepared-BwjwEzFz.js → prepared-rXCKqdHY.js} +35 -34
  47. package/dist/{protocol-C8VWF9An.cjs → protocol-C9ZaylID.cjs} +1 -1
  48. package/dist/{protocol-Bs9-ohHN.js → protocol-fjaeKkjf.js} +3 -3
  49. package/dist/{region-binding-workflow-JNowHd0A.cjs → region-binding-workflow-BiJQ7NU6.cjs} +1 -1
  50. package/dist/{region-binding-workflow-Cy4GIOUo.js → region-binding-workflow-aA8nxmkZ.js} +1 -1
  51. package/dist/report-encoding-worker.cjs +1 -1
  52. package/dist/report-encoding-worker.js +1 -1
  53. package/dist/{runtime-BDf5x1i1.js → runtime-BTtpjF3D.js} +4 -4
  54. package/dist/{runtime-DsJt1PIf.cjs → runtime-Dq0LUsyS.cjs} +1 -1
  55. package/dist/sbom.cdx.json +1 -1
  56. package/dist/server/node.d.cts +9 -0
  57. package/dist/server/node.d.ts +9 -0
  58. package/dist/server-node.cjs +5 -4
  59. package/dist/server-node.js +1838 -1760
  60. package/dist/server.cjs +1 -1
  61. package/dist/server.d.cts +81 -0
  62. package/dist/server.d.ts +81 -0
  63. package/dist/server.js +6 -6
  64. package/dist/style.css +1 -1
  65. package/dist/template-catalog-CLAM4w7H.cjs +1 -0
  66. package/dist/{template-catalog-DFwIS9aN.js → template-catalog-JSxSqk5y.js} +3 -3
  67. package/dist/template-fragments-Ca25Jt7e.cjs +1 -0
  68. package/dist/{template-fragments-Dng-AlHk.js → template-fragments-D2JFj7Du.js} +18 -18
  69. package/dist/{template-outline-DiADphlq.js → template-outline-CDWXptuj.js} +1 -1
  70. package/dist/template-outline-K4jGhATu.cjs +1 -0
  71. package/dist/template-registry-CWnuGqyP.cjs +1 -0
  72. package/dist/{template-registry-DhBqoD7W.js → template-registry-Do1Uav2Z.js} +333 -261
  73. package/dist/template-serialization-CU4n_Miu.js +307 -0
  74. package/dist/template-serialization-CgqBo6s-.cjs +1 -0
  75. package/dist/vue/async.d.cts +97 -2
  76. package/dist/vue/async.d.ts +97 -2
  77. package/dist/vue/index.d.cts +197 -4
  78. package/dist/vue/index.d.ts +197 -4
  79. package/dist/vue-async.cjs +1 -1
  80. package/dist/vue-async.js +3 -3
  81. package/dist/vue.cjs +1 -1
  82. package/dist/vue.js +75 -70
  83. package/dist/{workbook-session-NYv01LHe.cjs → workbook-session-BvEBRRMz.cjs} +1 -1
  84. package/dist/{workbook-session-oinxX3qo.js → workbook-session-f0wVlzst.js} +1 -1
  85. package/dist/workbook-sheets-CaPAulQ6.cjs +2 -0
  86. package/dist/workbook-sheets-D4M7XXBh.js +44 -0
  87. package/dist/worker.cjs +1 -1
  88. package/dist/worker.d.cts +9 -0
  89. package/dist/worker.d.ts +9 -0
  90. package/dist/worker.js +4 -4
  91. package/dist/xlsx.cjs +4 -4
  92. package/dist/xlsx.d.cts +39 -2
  93. package/dist/xlsx.d.ts +39 -2
  94. package/dist/xlsx.js +290 -270
  95. package/package.json +1 -1
  96. package/dist/ReportLabelStudio-CaEvYuSK.cjs +0 -1
  97. package/dist/ReportLabelStudio-DQPBmh4v.js +0 -765
  98. package/dist/ReportParamPanel-CVpK8mFc.cjs +0 -1
  99. package/dist/ReportPreview-BBJNlu2U.js +0 -5740
  100. package/dist/ReportPreview-nf4Dk1Jc.cjs +0 -6
  101. package/dist/TemplateReviewPanel-BmBrjt6P.cjs +0 -1
  102. package/dist/prepared-BiSz_9vN.cjs +0 -1
  103. package/dist/template-bindings-Cg5oBLFT.cjs +0 -1
  104. package/dist/template-bindings-TKnXM7ll.js +0 -62
  105. package/dist/template-catalog-D_2jdnkL.cjs +0 -1
  106. package/dist/template-fragments-DZVUBhuB.cjs +0 -1
  107. package/dist/template-outline-DWkzZXVC.cjs +0 -1
  108. package/dist/template-registry-DpLUSLwF.cjs +0 -1
  109. package/dist/template-serialization-Cc3h-miv.js +0 -247
  110. package/dist/template-serialization-D1R5oAqh.cjs +0 -1
package/dist/index.d.ts CHANGED
@@ -65,6 +65,9 @@ export declare interface AsyncCanvasRenderOptions extends CanvasRenderOptions, A
65
65
  imageLoader?: CanvasImageLoader;
66
66
  }
67
67
 
68
+ /** Resolve host-owned text context by a stable meta.contextKey, preserving editable geometry. */
69
+ export declare function bindReportTemplateContext(template: ReportTemplate, context: Readonly<Record<string, string>>): ReportTemplate;
70
+
68
71
  /** 盒子边框语义:四边开关 + 内部网格线(四边全关则内线不画) */
69
72
  export declare interface BoxBorders {
70
73
  top: boolean;
@@ -633,6 +636,9 @@ export declare function insertTemplateFragment(input: ReportTemplateDocument, fr
633
636
 
634
637
  export declare function inspectOutputCapabilities(plan: RenderPlan, format: OutputFormat): OutputDiagnostic[];
635
638
 
639
+ /** Check before applying a stored template to a new host dataset. Missing provenance is explicit. */
640
+ export declare function inspectReportTemplateCompatibility(template: ReportTemplate, target: ReportTemplateDataContract): ReportTemplateCompatibilityResult;
641
+
636
642
  /** Includes rule, aggregate, relation and formula references; never evaluates expressions. */
637
643
  export declare function inspectTemplateFieldUsage(template: ReportTemplate, dataset: string, field: string): TemplateFieldUsage[];
638
644
 
@@ -2056,6 +2062,8 @@ export declare type ReportTaskObserver = (event: ReportTaskEvent) => void;
2056
2062
 
2057
2063
  export declare interface ReportTemplate {
2058
2064
  schemaVersion?: string;
2065
+ /** Optional source identity and stable field meanings for safe stored-template reuse. */
2066
+ dataContract?: ReportTemplateDataContract;
2059
2067
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
2060
2068
  params?: ReportParamDef[];
2061
2069
  /** Fixed label pages repeat in record → copy → template-page order. */
@@ -2112,6 +2120,27 @@ export declare interface ReportTemplateChange {
2112
2120
  breaking: boolean;
2113
2121
  }
2114
2122
 
2123
+ export declare interface ReportTemplateCompatibilityIssue {
2124
+ code: "contract" | "source" | "dataset" | "field" | "semantic" | "type" | "unit";
2125
+ path: string;
2126
+ message: string;
2127
+ dataset?: string;
2128
+ field?: string;
2129
+ }
2130
+
2131
+ export declare interface ReportTemplateCompatibilityResult {
2132
+ ok: boolean;
2133
+ issues: ReportTemplateCompatibilityIssue[];
2134
+ }
2135
+
2136
+ export declare interface ReportTemplateDataContract {
2137
+ /** Host-owned report/domain identity, without a query date or tenant credentials. */
2138
+ source?: string;
2139
+ datasets: Readonly<Record<string, {
2140
+ fields: readonly ReportTemplateFieldBinding[];
2141
+ }>>;
2142
+ }
2143
+
2115
2144
  export declare interface ReportTemplateDiff {
2116
2145
  changes: ReportTemplateChange[];
2117
2146
  totalChanges: number;
@@ -2135,6 +2164,15 @@ export declare class ReportTemplateError extends Error {
2135
2164
  constructor(errors: readonly ValidationError[]);
2136
2165
  }
2137
2166
 
2167
+ /** Stable business meaning is independent of a column's position and editable caption. */
2168
+ export declare interface ReportTemplateFieldBinding {
2169
+ field: string;
2170
+ label?: string;
2171
+ semanticKey?: string;
2172
+ type?: ReportFieldContract["type"];
2173
+ unit?: string;
2174
+ }
2175
+
2138
2176
  export declare interface ReportTemplateFixture {
2139
2177
  name: string;
2140
2178
  datasets: DatasetRows;