@agile-team/mach-report 2.2.0 → 2.3.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.
package/dist/xlsx.d.cts CHANGED
@@ -1093,6 +1093,7 @@ declare interface PlanComponent {
1093
1093
  richParagraphs?: RichParagraph[];
1094
1094
  imageData?: string;
1095
1095
  grid?: PlanGrid;
1096
+ table?: PlanTableFragment;
1096
1097
  style?: ComponentStyle;
1097
1098
  meta?: Record<string, unknown>;
1098
1099
  /** MachReport 扩展字段:未知 kind 的兜底渲染标记 */
@@ -1108,6 +1109,8 @@ declare interface PlanGrid {
1108
1109
  }
1109
1110
 
1110
1111
  declare interface PlanPage {
1112
+ /** wide 表示完整自然列宽;页面仅为预览的垂直窗口分段。 */
1113
+ layout?: "page" | "wide";
1111
1114
  pageWidthMm: number;
1112
1115
  pageHeightMm: number;
1113
1116
  marginTopMm?: number;
@@ -1117,6 +1120,19 @@ declare interface PlanPage {
1117
1120
  components: PlanComponent[];
1118
1121
  }
1119
1122
 
1123
+ /** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
1124
+ declare interface PlanTableFragment {
1125
+ /** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
1126
+ id: string;
1127
+ /** 表头固定 -1;其余行(包括组头/小计/总计)从 0 连续递增。 */
1128
+ rowIndex: number;
1129
+ role: "header" | "body" | "group-header" | "subtotal" | "grand-total";
1130
+ /** 按物理列顺序保存字段身份;不以表头显示文本判断列结构。 */
1131
+ columnKeys: string[];
1132
+ layout?: "page" | "wide";
1133
+ title?: string;
1134
+ }
1135
+
1120
1136
  declare interface Protection {
1121
1137
  locked: boolean;
1122
1138
  hidden: boolean;
@@ -2276,11 +2292,13 @@ declare interface XlsxReadOptions {
2276
2292
  * - 未支持组件、富文本专有内容与单元格嵌套组件跳过并计入 warnings
2277
2293
  */
2278
2294
  export declare interface XlsxRenderOptions {
2279
- /** 工作表命名(默认 "Sheet1" 起序) */
2280
- sheetName?: (pageIndex: number) => string;
2281
- /** 默认 text 保留显示文本;raw 使用列表自动保留的原始数值、布尔、文本与空值。 */
2295
+ /** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
2296
+ sheetName?: (sheetIndex: number) => string;
2297
+ /** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
2298
+ sheetMode?: "auto" | "pages" | "continuous";
2299
+ /** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
2282
2300
  valueMode?: "text" | "raw";
2283
- /** 默认 auto 按计划识别 A3/A4/A5;自定义尺寸回退 A4 并返回告警。 */
2301
+ /** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
2284
2302
  paperSize?: "auto" | "a3" | "a4" | "a5";
2285
2303
  }
2286
2304
 
package/dist/xlsx.d.ts CHANGED
@@ -1093,6 +1093,7 @@ declare interface PlanComponent {
1093
1093
  richParagraphs?: RichParagraph[];
1094
1094
  imageData?: string;
1095
1095
  grid?: PlanGrid;
1096
+ table?: PlanTableFragment;
1096
1097
  style?: ComponentStyle;
1097
1098
  meta?: Record<string, unknown>;
1098
1099
  /** MachReport 扩展字段:未知 kind 的兜底渲染标记 */
@@ -1108,6 +1109,8 @@ declare interface PlanGrid {
1108
1109
  }
1109
1110
 
1110
1111
  declare interface PlanPage {
1112
+ /** wide 表示完整自然列宽;页面仅为预览的垂直窗口分段。 */
1113
+ layout?: "page" | "wide";
1111
1114
  pageWidthMm: number;
1112
1115
  pageHeightMm: number;
1113
1116
  marginTopMm?: number;
@@ -1117,6 +1120,19 @@ declare interface PlanPage {
1117
1120
  components: PlanComponent[];
1118
1121
  }
1119
1122
 
1123
+ /** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
1124
+ declare interface PlanTableFragment {
1125
+ /** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
1126
+ id: string;
1127
+ /** 表头固定 -1;其余行(包括组头/小计/总计)从 0 连续递增。 */
1128
+ rowIndex: number;
1129
+ role: "header" | "body" | "group-header" | "subtotal" | "grand-total";
1130
+ /** 按物理列顺序保存字段身份;不以表头显示文本判断列结构。 */
1131
+ columnKeys: string[];
1132
+ layout?: "page" | "wide";
1133
+ title?: string;
1134
+ }
1135
+
1120
1136
  declare interface Protection {
1121
1137
  locked: boolean;
1122
1138
  hidden: boolean;
@@ -2276,11 +2292,13 @@ declare interface XlsxReadOptions {
2276
2292
  * - 未支持组件、富文本专有内容与单元格嵌套组件跳过并计入 warnings
2277
2293
  */
2278
2294
  export declare interface XlsxRenderOptions {
2279
- /** 工作表命名(默认 "Sheet1" 起序) */
2280
- sheetName?: (pageIndex: number) => string;
2281
- /** 默认 text 保留显示文本;raw 使用列表自动保留的原始数值、布尔、文本与空值。 */
2295
+ /** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
2296
+ sheetName?: (sheetIndex: number) => string;
2297
+ /** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
2298
+ sheetMode?: "auto" | "pages" | "continuous";
2299
+ /** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
2282
2300
  valueMode?: "text" | "raw";
2283
- /** 默认 auto 按计划识别 A3/A4/A5;自定义尺寸回退 A4 并返回告警。 */
2301
+ /** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
2284
2302
  paperSize?: "auto" | "a3" | "a4" | "a5";
2285
2303
  }
2286
2304