@agile-team/mach-report 2.10.0 → 2.11.1

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 (111) hide show
  1. package/README.md +6 -2
  2. package/dist/ExcelBindingWizard-LWX6G1A2.js +1465 -0
  3. package/dist/ExcelBindingWizard-a4kslPHF.cjs +1 -0
  4. package/dist/ParamEditor-BLaE5q5W.js +522 -0
  5. package/dist/ParamEditor-MBBC7lUE.cjs +1 -0
  6. package/dist/ReportBatchPanel-B5ClP9tm.js +350 -0
  7. package/dist/ReportBatchPanel-Dc-SDkYA.cjs +1 -0
  8. package/dist/ReportPreview-DWXROHBP.cjs +6 -0
  9. package/dist/ReportPreview-DiNXhQI0.js +4138 -0
  10. package/dist/ReportTemplateLibrary-5fk5CQBO.cjs +1 -0
  11. package/dist/ReportTemplateLibrary-BZB-XWjj.js +311 -0
  12. package/dist/RuleEditor-C2QsOHOs.cjs +1 -0
  13. package/dist/RuleEditor-D9wQHrkf.js +2024 -0
  14. package/dist/TemplateReviewPanel-BKofGrV9.js +222 -0
  15. package/dist/TemplateReviewPanel-DwtOcLue.cjs +1 -0
  16. package/dist/analytics.cjs +1 -1
  17. package/dist/analytics.d.cts +2 -0
  18. package/dist/analytics.d.ts +2 -0
  19. package/dist/analytics.js +29 -29
  20. package/dist/batch-Bt3Fd27Z.cjs +1 -0
  21. package/dist/batch-mRqhhhjt.js +364 -0
  22. package/dist/computed-Bvk0W15F.js +521 -0
  23. package/dist/computed-CGV2a809.cjs +1 -0
  24. package/dist/config-B612mw0x.js +525 -0
  25. package/dist/config-BRoLo2oj.cjs +1 -0
  26. package/dist/designer.cjs +2 -2
  27. package/dist/designer.d.cts +730 -9
  28. package/dist/designer.d.ts +730 -9
  29. package/dist/designer.js +2093 -1785
  30. package/dist/index.cjs +8 -8
  31. package/dist/index.d.cts +161 -3
  32. package/dist/index.d.ts +161 -3
  33. package/dist/index.js +486 -431
  34. package/dist/injection-keys-Db_DyLkm.cjs +1 -0
  35. package/dist/injection-keys-e85udZCp.js +7 -0
  36. package/dist/list-cell-BuYn4tGF.cjs +1 -0
  37. package/dist/{list-cell-Dxyi7DOw.js → list-cell-ClFra1zS.js} +54 -40
  38. package/dist/matrix-DVyWiYsd.cjs +1 -0
  39. package/dist/matrix-yZsGnldA.js +227 -0
  40. package/dist/param-validation-BlHHXs6u.js +153 -0
  41. package/dist/param-validation-DCK039V1.cjs +1 -0
  42. package/dist/pdf.cjs +25 -25
  43. package/dist/pdf.d.cts +3 -0
  44. package/dist/pdf.d.ts +3 -0
  45. package/dist/pdf.js +677 -677
  46. package/dist/plugin-BDTU4D94.cjs +1 -0
  47. package/dist/plugin-Cd5G2QQn.js +22 -0
  48. package/dist/region-binding-workflow-CXDmt9Bs.js +977 -0
  49. package/dist/region-binding-workflow-DhQvu1co.cjs +3 -0
  50. package/dist/{report-params-B_VCihAh.js → report-params-B44imUd4.js} +1 -1
  51. package/dist/{report-params-CjWrjPl6.cjs → report-params-SJfhKgaX.cjs} +1 -1
  52. package/dist/server/node.d.cts +5 -2
  53. package/dist/server/node.d.ts +5 -2
  54. package/dist/server-node.cjs +1 -1
  55. package/dist/server-node.js +87 -87
  56. package/dist/server.cjs +1 -1
  57. package/dist/server.d.cts +201 -2
  58. package/dist/server.d.ts +201 -2
  59. package/dist/server.js +557 -658
  60. package/dist/style.css +1 -1
  61. package/dist/template-registry-WNXdkiET.js +506 -0
  62. package/dist/template-registry-ukBGlm8N.cjs +1 -0
  63. package/dist/template-review-BXp2oyqg.cjs +1 -0
  64. package/dist/template-review-BdcXSYbx.js +1616 -0
  65. package/dist/tree-BX380Rr7.cjs +1 -0
  66. package/dist/tree-CqcQ99NM.js +172 -0
  67. package/dist/{validate-UUy9yP4K.js → validate-7s0yn6ii.js} +44 -44
  68. package/dist/validate-DsRiNw8h.cjs +1 -0
  69. package/dist/vue/async.d.cts +93 -4
  70. package/dist/vue/async.d.ts +93 -4
  71. package/dist/vue/index.d.cts +145 -7
  72. package/dist/vue/index.d.ts +145 -7
  73. package/dist/vue-async.cjs +1 -1
  74. package/dist/vue-async.js +5 -5
  75. package/dist/vue.cjs +1 -1
  76. package/dist/vue.js +116 -113
  77. package/dist/{workbook-session-B-bW5_yR.js → workbook-session-BKOTwcoq.js} +1 -1
  78. package/dist/{workbook-session-D7RtdNo0.cjs → workbook-session-CLYLhZWu.cjs} +1 -1
  79. package/dist/worker.cjs +1 -1
  80. package/dist/worker.d.cts +5 -2
  81. package/dist/worker.d.ts +5 -2
  82. package/dist/worker.js +1 -1
  83. package/dist/xlsx.cjs +3 -3
  84. package/dist/xlsx.d.cts +129 -2
  85. package/dist/xlsx.d.ts +129 -2
  86. package/dist/xlsx.js +336 -242
  87. package/package.json +1 -1
  88. package/dist/ExcelBindingWizard-CF7RplWm.cjs +0 -1
  89. package/dist/ExcelBindingWizard-qhwEderR.js +0 -842
  90. package/dist/ReportPreview-BE1tCHqE.js +0 -4604
  91. package/dist/ReportPreview-QKRKQOe3.cjs +0 -6
  92. package/dist/RuleEditor-BA36yIV6.js +0 -1723
  93. package/dist/RuleEditor-CczJ6mJm.cjs +0 -1
  94. package/dist/TemplateReviewPanel-CHi4Alqa.cjs +0 -1
  95. package/dist/TemplateReviewPanel-Dz0G5o83.js +0 -217
  96. package/dist/binding-preview-BWsdf_z2.cjs +0 -2
  97. package/dist/binding-preview-DILq0-0f.js +0 -649
  98. package/dist/decimal-CI1OAczk.js +0 -87
  99. package/dist/decimal-CQA0xJex.cjs +0 -1
  100. package/dist/list-cell-CyM1ZlRN.cjs +0 -1
  101. package/dist/matrix-BbXarwyk.js +0 -661
  102. package/dist/matrix-Cm65WLLP.cjs +0 -1
  103. package/dist/param-validation-BWNjLcN0.js +0 -116
  104. package/dist/param-validation-CiTxFeZ8.cjs +0 -1
  105. package/dist/plugin-CThk42vJ.cjs +0 -1
  106. package/dist/plugin-tGn7-5oF.js +0 -25
  107. package/dist/template-registry-CGWTLtIA.cjs +0 -1
  108. package/dist/template-registry-DzlQs3OF.js +0 -434
  109. package/dist/template-review-D1RoNCPw.cjs +0 -1
  110. package/dist/template-review-fnteXRng.js +0 -1473
  111. package/dist/validate-Bf6ccFr2.cjs +0 -1
package/dist/xlsx.d.ts CHANGED
@@ -60,6 +60,10 @@ declare class Anchor implements IAnchor {
60
60
  constructor(model?: IAnchor | object);
61
61
  }
62
62
 
63
+ export declare type AnyExcelBindingDocumentResult = ExcelBindingDocumentResult | ExcelRegionBindingDocumentResult;
64
+
65
+ export declare type AnyExcelBindingSession = ExcelBindingSession | ExcelRegionBindingSession;
66
+
63
67
  declare type AutoFilter = string | {
64
68
  from: string | { row: number; column: number };
65
69
  to: string | { row: number; column: number };
@@ -471,6 +475,17 @@ export declare function createExcelBindingSession(imported: ExcelImportResult, r
471
475
  name: string;
472
476
  }): ExcelBindingSession;
473
477
 
478
+ export declare function createExcelRegionBindingDocument(imported: ExcelImportResult, recipe: ExcelRegionBindingRecipe, datasets: readonly ExcelBindingDataset[], identity: {
479
+ id: string;
480
+ name: string;
481
+ }): ExcelRegionBindingDocumentResult;
482
+
483
+ /** Draft sessions preserve exact incomplete mappings; applying still runs geometry and contract checks. */
484
+ export declare function createExcelRegionBindingSession(source: ExcelImportResult, recipe: ExcelRegionBindingRecipe, identity: {
485
+ id: string;
486
+ name: string;
487
+ }): ExcelRegionBindingSession;
488
+
474
489
  declare interface Csv {
475
490
  /**
476
491
  * read from a file
@@ -600,6 +615,15 @@ declare enum ErrorValue {
600
615
  Num = '#NUM!',
601
616
  }
602
617
 
618
+ /** Convert graphical two-dimensional selection into exact, source-bounded coordinates. */
619
+ export declare function excelBindingCellRange(imported: ExcelImportResult, sheetName: string, from: {
620
+ row: number;
621
+ column: number;
622
+ }, to?: {
623
+ row: number;
624
+ column: number;
625
+ }): string;
626
+
603
627
  export declare type ExcelBindingColumn = string | (Omit<ListColumn, "widthMm" | "header"> & {
604
628
  header?: string;
605
629
  });
@@ -845,6 +869,54 @@ declare namespace ExcelJS {
845
869
  }
846
870
  }
847
871
 
872
+ /** A row prototype is replaced, never copied into a generated business report. */
873
+ export declare interface ExcelRegionBinding {
874
+ id: string;
875
+ /** One physical source row, with any contiguous subset of the sheet columns. */
876
+ range: string;
877
+ dataset: string;
878
+ /** record accepts zero or one row; repeat expands vertically and shifts following bands. */
879
+ mode: "record" | "repeat";
880
+ fields: string[];
881
+ rowKey: string;
882
+ revisionField?: string;
883
+ sourceTokenField?: string;
884
+ /** Optional immediately preceding header, with the same physical columns. */
885
+ headerRange?: string;
886
+ }
887
+
888
+ export declare interface ExcelRegionBindingDocumentResult {
889
+ document: ReportTemplateDocument;
890
+ recipe: ExcelRegionBindingRecipe;
891
+ warnings: string[];
892
+ }
893
+
894
+ /** Version 2 describes several independent, vertically ordered data regions on one Sheet. */
895
+ export declare interface ExcelRegionBindingRecipe {
896
+ version: "2.0";
897
+ sheet: string;
898
+ regions: ExcelRegionBinding[];
899
+ /** Full-width source rows reserved on every page; excluded from flowing content. */
900
+ footerRange?: string;
901
+ }
902
+
903
+ export declare interface ExcelRegionBindingSession {
904
+ version: "2.0";
905
+ source: ExcelImportResult;
906
+ recipe: ExcelRegionBindingRecipe;
907
+ identity: {
908
+ id: string;
909
+ name: string;
910
+ };
911
+ }
912
+
913
+ export declare interface ExcelRegionBindingValidation {
914
+ ok: boolean;
915
+ issues: ExcelBindingIssue[];
916
+ mapped: number;
917
+ total: number;
918
+ }
919
+
848
920
  export declare interface ExcelSheetWindow {
849
921
  top: number;
850
922
  bottom: number;
@@ -1065,6 +1137,8 @@ declare interface GridCell {
1065
1137
  value?: string | number | boolean | null;
1066
1138
  /** Excel 数字格式(例如 #,##0.00 / 0.00%),不改变 text。 */
1067
1139
  numberFormat?: string;
1140
+ /** Physical left inset for hierarchical labels; raw value stays unchanged. */
1141
+ indentMm?: number;
1068
1142
  /** 编辑输入类型;省略时只按原始值推断,数字字符串不会被转换为数值。 */
1069
1143
  valueType?: "text" | "number" | "boolean";
1070
1144
  /** 单元格级编辑控制;预览仍需显式开启 editing。 */
@@ -1216,6 +1290,8 @@ declare interface ListColumn {
1216
1290
 
1217
1291
  declare interface ListComponent {
1218
1292
  kind: "list";
1293
+ /** Opaque serializable layout annotations; interpreted only by explicit optional adapters. */
1294
+ meta?: Record<string, unknown>;
1219
1295
  id?: string;
1220
1296
  /** 宽表标记用于连续 Excel;不改变低层列表的列宽和分页算法。 */
1221
1297
  layout?: "page" | "wide";
@@ -1225,6 +1301,10 @@ declare interface ListComponent {
1225
1301
  topMm: number;
1226
1302
  widthMm: number;
1227
1303
  dataset: string;
1304
+ /** Headerless record/region bindings do not allocate a synthetic list header. */
1305
+ header?: boolean;
1306
+ /** A fixed record region rejects multiple rows instead of dropping source data. */
1307
+ cardinality?: "record";
1228
1308
  /** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
1229
1309
  rowKey?: string;
1230
1310
  revisionField?: string;
@@ -1251,6 +1331,8 @@ declare interface ListComponent {
1251
1331
  computed?: ComputedField[];
1252
1332
  /** Dynamic pivot of the current source dataset, with read-only derived identities. */
1253
1333
  matrix?: MatrixTableOptions;
1334
+ /** Full ordered hierarchy; source parent values and descendant-leaf rollups are explicit. */
1335
+ tree?: TreeTableOptions;
1254
1336
  /** Explicit row visibility; hidden rows do not participate in summaries. */
1255
1337
  rowVisibleWhen?: StyleRule["when"];
1256
1338
  /** Master/detail relation is keyed by business identity, never by display row index. */
@@ -1537,6 +1619,8 @@ declare const enum PaperSize {
1537
1619
 
1538
1620
  export declare function parseExcelBindingSession(input: unknown): ExcelBindingSession;
1539
1621
 
1622
+ export declare function parseExcelRegionBindingSession(input: unknown): ExcelRegionBindingSession;
1623
+
1540
1624
  declare interface PlanComponent {
1541
1625
  /** Template page furniture repeats per page and reserves its vertical band. */
1542
1626
  pageAnchor?: "header" | "footer";
@@ -1573,6 +1657,7 @@ declare interface PlanGrid {
1573
1657
  }
1574
1658
 
1575
1659
  declare interface PlanPage {
1660
+ meta?: Record<string, unknown>;
1576
1661
  /** wide 表示完整自然列宽;页面仅为预览的垂直窗口分段。 */
1577
1662
  layout?: "page" | "wide";
1578
1663
  pageWidthMm: number;
@@ -1721,13 +1806,25 @@ declare interface ReportFieldContract {
1721
1806
  unit?: string;
1722
1807
  }
1723
1808
 
1809
+ declare interface ReportFlowBand {
1810
+ /** Exact stable component IDs. Static components use nid, lists use id. */
1811
+ componentIds: string[];
1812
+ /** Source-template coordinates; following bands keep their original gap. */
1813
+ topMm: number;
1814
+ heightMm: number;
1815
+ }
1816
+
1817
+ declare interface ReportPageFlow {
1818
+ bands: ReportFlowBand[];
1819
+ }
1820
+
1724
1821
  /** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
1725
1822
  declare interface ReportParamDef {
1726
1823
  /** 参数名(传入 params,与数据集 SQL #{field} 绑定对应) */
1727
1824
  field: string;
1728
1825
  /** 显示名(缺省用 field) */
1729
1826
  label?: string;
1730
- type?: "text" | "number" | "date" | "select";
1827
+ type?: "text" | "number" | "date" | "month" | "year" | "dateRange" | "select";
1731
1828
  /** select 选项 */
1732
1829
  options?: Array<{
1733
1830
  label: string;
@@ -1736,7 +1833,7 @@ declare interface ReportParamDef {
1736
1833
  defaultValue?: string;
1737
1834
  required?: boolean;
1738
1835
  placeholder?: string;
1739
- /** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
1836
+ /** 数字上下界;日期/月/年使用对应规范字符串;dateRange 对两端使用 YYYY-MM-DD 边界(含边界)。 */
1740
1837
  min?: number | string;
1741
1838
  max?: number | string;
1742
1839
  minLength?: number;
@@ -2183,6 +2280,9 @@ declare interface TemplatePage {
2183
2280
  marginLeftMm?: number;
2184
2281
  marginRightMm?: number;
2185
2282
  components: TemplateComponent[];
2283
+ /** Explicit vertical bands preserve source gaps as dynamic regions expand. */
2284
+ flow?: ReportPageFlow;
2285
+ meta?: Record<string, unknown>;
2186
2286
  }
2187
2287
 
2188
2288
  declare interface TimePeriodRuleType extends ConditionalFormattingBaseRule {
@@ -2200,6 +2300,26 @@ declare interface Top10RuleType extends ConditionalFormattingBaseRule {
2200
2300
  bottom: boolean;
2201
2301
  }
2202
2302
 
2303
+ /** A serialized tree contract. Sibling and root order follow input order. */
2304
+ declare interface TreeTableOptions {
2305
+ input: "flat" | "nested";
2306
+ idField: string;
2307
+ /** Flat roots have null/undefined parent values. */
2308
+ parentField?: string;
2309
+ /** Nested child arrays, defaults to children. Every node still needs an ID. */
2310
+ childrenField?: string;
2311
+ labelField: string;
2312
+ indentMm?: number;
2313
+ orphan?: "error" | "root";
2314
+ /** Source preserves parent values; leaf-aggregate derives only parents from descendant leaves. */
2315
+ parentValues?: "source" | "leaf-aggregate";
2316
+ aggregates?: AggregateDefinition[];
2317
+ maxRows?: number;
2318
+ maxDepth?: number;
2319
+ /** Bounded leaf-to-ancestor aggregate work; default one million. */
2320
+ maxAggregationVisits?: number;
2321
+ }
2322
+
2203
2323
  /** Contract and mapping validation does not traverse imported grids. */
2204
2324
  export declare function validateExcelBindingFields(imported: ExcelImportResult, recipe: ExcelBindingRecipe, datasets: readonly ExcelBindingDataset[]): ExcelBindingValidation;
2205
2325
 
@@ -2209,6 +2329,13 @@ export declare function validateExcelBindingRecipe(imported: ExcelImportResult,
2209
2329
  /** Region-only validation lets reactive consumers reuse the result while only mappings change. */
2210
2330
  export declare function validateExcelBindingRegions(imported: ExcelImportResult, recipe: ExcelBindingRecipe): ExcelBindingIssue[];
2211
2331
 
2332
+ export declare function validateExcelRegionBindings(imported: ExcelImportResult, recipe: ExcelRegionBindingRecipe, datasets: readonly ExcelBindingDataset[]): ExcelRegionBindingValidation;
2333
+
2334
+ export declare function validateExcelRegionFields(recipe: ExcelRegionBindingRecipe, datasets: readonly ExcelBindingDataset[]): ExcelRegionBindingValidation;
2335
+
2336
+ /** Geometry-only scan is separate so field-selection UI need not repeatedly traverse the source grid. */
2337
+ export declare function validateExcelRegionGeometry(imported: ExcelImportResult, recipe: ExcelRegionBindingRecipe): ExcelBindingIssue[];
2338
+
2212
2339
  declare enum ValueType {
2213
2340
  Null = 0,
2214
2341
  Merge = 1,