@agile-team/mach-report 0.7.0 → 0.9.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/LICENSE +107 -0
- package/dist/ReportPreview-BFTfls8h.js +923 -0
- package/dist/ReportPreview-D6VHDUvR.cjs +6 -0
- package/dist/format.d.ts +48 -0
- package/dist/grid-geometry-BXpOxznT.cjs +1 -0
- package/dist/grid-geometry-Bs8QXz1X.js +65 -0
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +858 -660
- package/dist/layout/paginate.d.ts +30 -2
- package/dist/pdf.cjs +46 -46
- package/dist/pdf.js +8 -7
- package/dist/{plugin-Cl-IqCqx.cjs → plugin-9eBK7khj.cjs} +1 -1
- package/dist/{plugin-Dp3kKWiQ.js → plugin-vi2GjP43.js} +3 -3
- package/dist/style-6ihHKVCM.js +192 -0
- package/dist/style-Xq08-IsV.cjs +3 -0
- package/dist/style.css +1 -1
- package/dist/vue/ReportPreview.d.ts +13 -0
- package/dist/vue/ReportToolbar.d.ts +20 -3
- package/dist/vue/async.d.cts +16 -0
- package/dist/vue/async.d.ts +16 -0
- package/dist/vue/composables/useHighlight.d.ts +8 -0
- package/dist/vue/composables/usePageWindow.d.ts +0 -3
- package/dist/vue/composables/usePrintExport.d.ts +8 -0
- package/dist/vue/composables/useReportSearch.d.ts +72 -0
- package/dist/vue/config.d.ts +17 -1
- package/dist/vue/plugin.d.ts +16 -0
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +35 -33
- package/dist/xlsx/render-xlsx.d.ts +20 -0
- package/dist/xlsx.cjs +30 -0
- package/dist/xlsx.d.cts +5 -0
- package/dist/xlsx.d.ts +5 -0
- package/dist/xlsx.js +22648 -0
- package/package.json +15 -2
- package/dist/ReportPreview-CrVeTKu1.cjs +0 -6
- package/dist/ReportPreview-DgsOdO4y.js +0 -559
- package/dist/style-B3vxGDZd.cjs +0 -3
- package/dist/style-B7Xfo5I-.js +0 -255
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
import { ComponentStyle, PlanComponent, RenderPlan } from '../schema/render-plan';
|
|
2
|
-
import {
|
|
2
|
+
import { TextMeasurer } from './textwrap';
|
|
3
|
+
import { ColumnFormat, StyleRule } from '../format';
|
|
3
4
|
export interface ListColumn {
|
|
4
5
|
header: string;
|
|
5
6
|
field: string;
|
|
6
7
|
widthMm: number;
|
|
7
8
|
style?: ComponentStyle;
|
|
9
|
+
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
10
|
+
format?: ColumnFormat;
|
|
11
|
+
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
12
|
+
rules?: StyleRule[];
|
|
8
13
|
}
|
|
14
|
+
/** 分组小计配置(声明式,见 ListComponent.groupBy) */
|
|
15
|
+
export interface ListGroupBy {
|
|
16
|
+
/** 分组字段(值变化即切组) */
|
|
17
|
+
field: string;
|
|
18
|
+
/** 组头文案模板,{value} 占位(默认 "{value}") */
|
|
19
|
+
headerTemplate?: string;
|
|
20
|
+
headerStyle?: ComponentStyle;
|
|
21
|
+
/** 需要小计的列字段(组尾输出合计行;数值列求和,其余输出首值/留空) */
|
|
22
|
+
subtotal?: string[];
|
|
23
|
+
subtotalStyle?: ComponentStyle;
|
|
24
|
+
subtotalLabel?: string;
|
|
25
|
+
/** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
|
|
26
|
+
keepWithNext?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export type ListGrandTotal = boolean | {
|
|
29
|
+
label?: string;
|
|
30
|
+
style?: ComponentStyle;
|
|
31
|
+
/** 合计列(缺省沿用 groupBy.subtotal) */
|
|
32
|
+
fields?: string[];
|
|
33
|
+
};
|
|
9
34
|
export interface ListComponent {
|
|
10
35
|
kind: "list";
|
|
11
36
|
id?: string;
|
|
@@ -21,6 +46,10 @@ export interface ListComponent {
|
|
|
21
46
|
headerEveryPage?: boolean;
|
|
22
47
|
headerBackgroundColor?: string;
|
|
23
48
|
border?: boolean;
|
|
49
|
+
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
50
|
+
groupBy?: ListGroupBy;
|
|
51
|
+
/** 末尾总合计行(依赖 groupBy.subtotal 或显式 fields) */
|
|
52
|
+
grandTotal?: ListGrandTotal;
|
|
24
53
|
}
|
|
25
54
|
export type TemplateComponent = PlanComponent | ListComponent;
|
|
26
55
|
export interface TemplatePage {
|
|
@@ -48,4 +77,3 @@ export interface PaginateResult {
|
|
|
48
77
|
warnings: string[];
|
|
49
78
|
}
|
|
50
79
|
export declare function paginateTemplate(template: ReportTemplate, datasets: DatasetRows, optionsOrMmPerRow?: number | PaginateOptions): PaginateResult;
|
|
51
|
-
export { measureTextMm, wrapText };
|