@agile-team/mach-report 2.8.3 → 2.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/README.md +28 -10
- package/dist/ExcelBindingWizard-DiaxvWpQ.cjs +1 -0
- package/dist/ExcelBindingWizard-RLJIXKKG.js +816 -0
- package/dist/{ReportPreview-DRBAUkxj.js → ReportPreview-B5ZNEasW.js} +23 -22
- package/dist/ReportPreview-DRtVPUYo.cjs +6 -0
- package/dist/RuleEditor-N4qnMZ-Z.cjs +1 -0
- package/dist/RuleEditor-ynnUEK0s.js +1575 -0
- package/dist/TemplateReviewPanel-C_Lmzis6.cjs +1 -0
- package/dist/TemplateReviewPanel-Cn32OY4_.js +173 -0
- package/dist/{_plugin-vue_export-helper-DPbiz14D.js → _plugin-vue_export-helper-8SL1F89S.js} +2 -2
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +188 -5
- package/dist/analytics.d.ts +188 -5
- package/dist/analytics.js +68 -202
- package/dist/{assets-B9qJku3V.js → assets-DDsfEi8R.js} +3 -3
- package/dist/{assets-RZan7EyL.cjs → assets-ahTRUXRk.cjs} +1 -1
- package/dist/binding-preview-B5834rml.cjs +2 -0
- package/dist/binding-preview-ChXjN5L5.js +649 -0
- package/dist/{capabilities-joSutDF8.js → capabilities-Cm9hZ3uV.js} +5 -5
- package/dist/{capabilities-xGTpnPjJ.cjs → capabilities-DYzWL7KS.cjs} +1 -1
- package/dist/dataset-BkRmwgeJ.cjs +1 -0
- package/dist/dataset-H5pFuQGU.js +121 -0
- package/dist/defaults-DXhiM1ZD.js +10 -0
- package/dist/defaults-xhmcLLrf.cjs +1 -0
- package/dist/designer.cjs +2 -1
- package/dist/designer.d.cts +1391 -6
- package/dist/designer.d.ts +1391 -6
- package/dist/designer.js +2636 -673
- package/dist/grid-geometry-BNptEcMm.js +65 -0
- package/dist/grid-geometry-CZ_cYB6O.cjs +1 -0
- package/dist/import-template-CNMLJSQw.js +23030 -0
- package/dist/import-template-CpxunKVp.cjs +29 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +202 -3
- package/dist/index.d.ts +202 -3
- package/dist/index.js +554 -535
- package/dist/matrix-CNPDJxED.js +745 -0
- package/dist/matrix-Div9Ilh3.cjs +1 -0
- package/dist/pdf.cjs +46 -46
- package/dist/pdf.d.cts +2 -0
- package/dist/pdf.d.ts +2 -0
- package/dist/pdf.js +17 -16
- package/dist/{plugin-BurDDMcd.js → plugin-BWwIgZXV.js} +1 -1
- package/dist/{plugin-DSFu51Ua.cjs → plugin-Dg-J1Rbm.cjs} +1 -1
- package/dist/progress-7OSZbFok.js +39 -0
- package/dist/progress-BnLiS5eH.cjs +1 -0
- package/dist/render-plan-7xpGrCEl.cjs +1 -0
- package/dist/render-plan-Ck6koX9L.js +13 -0
- package/dist/server/node.d.cts +62 -0
- package/dist/server/node.d.ts +62 -0
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +373 -145
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +311 -0
- package/dist/server.d.ts +311 -0
- package/dist/server.js +590 -186
- package/dist/{style-Dv5o_x6b.js → style-CQ1PK8ZB.js} +5 -5
- package/dist/style-UgIJSA1F.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/template-registry-CHMYZ7SD.cjs +1 -0
- package/dist/template-registry-R61AMCr0.js +433 -0
- package/dist/template-review-hvWWQFsi.js +1027 -0
- package/dist/template-review-jEcOfmGr.cjs +1 -0
- package/dist/textwrap-CWHyzkBH.cjs +4 -0
- package/dist/{textwrap-DOl04hCQ.js → textwrap-DE1kgcJB.js} +1 -1
- package/dist/{validate-DfHPD8wX.cjs → validate-BDiMqkJC.cjs} +1 -1
- package/dist/{validate-S6CgIm5d.js → validate-DWPF7icl.js} +13 -13
- package/dist/vue/async.d.cts +186 -0
- package/dist/vue/async.d.ts +186 -0
- package/dist/vue/index.d.cts +271 -3
- package/dist/vue/index.d.ts +271 -3
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +4 -4
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +2 -0
- package/dist/worker.d.ts +2 -0
- package/dist/worker.js +1 -1
- package/dist/xlsx.cjs +2 -30
- package/dist/xlsx.d.cts +268 -0
- package/dist/xlsx.d.ts +268 -0
- package/dist/xlsx.js +220 -23440
- package/package.json +1 -1
- package/dist/ReportPreview-DjGeWHY-.cjs +0 -6
- package/dist/progress-DD964VAB.js +0 -102
- package/dist/progress-KvhwXZ1Q.cjs +0 -1
- package/dist/render-plan-CckPEQyf.cjs +0 -1
- package/dist/render-plan-uzZYYSy1.js +0 -19
- package/dist/report-source-BXHNy_AD.js +0 -755
- package/dist/report-source-CCAvFE3t.cjs +0 -1
- package/dist/style-CpwiOPyB.cjs +0 -1
- package/dist/template-registry-DWExx0gU.cjs +0 -1
- package/dist/template-registry-NpOakidD.js +0 -354
- package/dist/textwrap-CnGsEum6.cjs +0 -4
package/dist/vue/index.d.cts
CHANGED
|
@@ -155,11 +155,11 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
155
155
|
copySelection?(): string;
|
|
156
156
|
pasteSelection?(text: string): Promise<boolean>;
|
|
157
157
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
158
|
-
warning: (message: string) => any;
|
|
159
158
|
error: (message: string, detail?: {
|
|
160
159
|
code: string;
|
|
161
160
|
cause?: unknown;
|
|
162
161
|
} | undefined) => any;
|
|
162
|
+
warning: (message: string) => any;
|
|
163
163
|
task: (task: Readonly<ReportPreviewTask>) => any;
|
|
164
164
|
diagnostic: (diagnostic: Readonly<ReportPreviewDiagnostic>) => any;
|
|
165
165
|
loaded: (pageCount: number) => any;
|
|
@@ -276,11 +276,11 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
276
276
|
default: null;
|
|
277
277
|
};
|
|
278
278
|
}>> & Readonly<{
|
|
279
|
-
onWarning?: ((message: string) => any) | undefined;
|
|
280
279
|
onError?: ((message: string, detail?: {
|
|
281
280
|
code: string;
|
|
282
281
|
cause?: unknown;
|
|
283
282
|
} | undefined) => any) | undefined;
|
|
283
|
+
onWarning?: ((message: string) => any) | undefined;
|
|
284
284
|
onTask?: ((task: Readonly<ReportPreviewTask>) => any) | undefined;
|
|
285
285
|
onDiagnostic?: ((diagnostic: Readonly<ReportPreviewDiagnostic>) => any) | undefined;
|
|
286
286
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
@@ -289,10 +289,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
289
289
|
"onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
|
|
290
290
|
}>, {
|
|
291
291
|
editable: boolean | ReportEditingOptions;
|
|
292
|
+
params: Record<string, string>;
|
|
292
293
|
output: ReportOutputOptions;
|
|
293
294
|
height: string;
|
|
294
295
|
gapPx: number;
|
|
295
|
-
params: Record<string, string>;
|
|
296
296
|
reportId: string | string[] | null;
|
|
297
297
|
assets: AssetRenderOptions;
|
|
298
298
|
debug: boolean;
|
|
@@ -417,6 +417,36 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
|
417
417
|
$slots: S;
|
|
418
418
|
};
|
|
419
419
|
};
|
|
420
|
+
declare interface AggregateDefinition {
|
|
421
|
+
/** Output column; valueField defaults to this field. */
|
|
422
|
+
field: string;
|
|
423
|
+
op: AggregateOperation;
|
|
424
|
+
valueField?: string;
|
|
425
|
+
weightField?: string;
|
|
426
|
+
numeric?: "number" | "decimal";
|
|
427
|
+
digits?: number;
|
|
428
|
+
}
|
|
429
|
+
declare interface AggregateDefinition_2 {
|
|
430
|
+
/** Output column; valueField defaults to this field. */
|
|
431
|
+
field: string;
|
|
432
|
+
op: AggregateOperation_2;
|
|
433
|
+
valueField?: string;
|
|
434
|
+
weightField?: string;
|
|
435
|
+
numeric?: "number" | "decimal";
|
|
436
|
+
digits?: number;
|
|
437
|
+
}
|
|
438
|
+
declare interface AggregateDefinition_3 {
|
|
439
|
+
/** Output column; valueField defaults to this field. */
|
|
440
|
+
field: string;
|
|
441
|
+
op: AggregateOperation_3;
|
|
442
|
+
valueField?: string;
|
|
443
|
+
weightField?: string;
|
|
444
|
+
numeric?: "number" | "decimal";
|
|
445
|
+
digits?: number;
|
|
446
|
+
}
|
|
447
|
+
declare type AggregateOperation = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
|
|
448
|
+
declare type AggregateOperation_2 = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
|
|
449
|
+
declare type AggregateOperation_3 = "sum" | "count" | "avg" | "min" | "max" | "weightedAvg";
|
|
420
450
|
declare interface AssetRenderBudget {
|
|
421
451
|
/** Maximum newly rendered assets, default 1000. Existing imageData is kept unchanged. */
|
|
422
452
|
maxAssets?: number;
|
|
@@ -586,6 +616,33 @@ declare interface ComponentStyle_3 {
|
|
|
586
616
|
opacity?: number;
|
|
587
617
|
rotateDeg?: number;
|
|
588
618
|
}
|
|
619
|
+
declare interface ComputedField extends ExpressionOptions {
|
|
620
|
+
field: string;
|
|
621
|
+
expression: ReportExpression | string;
|
|
622
|
+
/** Scope controls aggregate inputs; row expressions may reference the current row in any scope. */
|
|
623
|
+
scope?: "row" | "group" | "dataset";
|
|
624
|
+
groupBy?: readonly string[];
|
|
625
|
+
/** String adapter expressions cannot be inspected; declare dependencies explicitly. */
|
|
626
|
+
dependsOn?: readonly string[];
|
|
627
|
+
}
|
|
628
|
+
declare interface ComputedField_2 extends ExpressionOptions_2 {
|
|
629
|
+
field: string;
|
|
630
|
+
expression: ReportExpression_2 | string;
|
|
631
|
+
/** Scope controls aggregate inputs; row expressions may reference the current row in any scope. */
|
|
632
|
+
scope?: "row" | "group" | "dataset";
|
|
633
|
+
groupBy?: readonly string[];
|
|
634
|
+
/** String adapter expressions cannot be inspected; declare dependencies explicitly. */
|
|
635
|
+
dependsOn?: readonly string[];
|
|
636
|
+
}
|
|
637
|
+
declare interface ComputedField_3 extends ExpressionOptions_3 {
|
|
638
|
+
field: string;
|
|
639
|
+
expression: ReportExpression_3 | string;
|
|
640
|
+
/** Scope controls aggregate inputs; row expressions may reference the current row in any scope. */
|
|
641
|
+
scope?: "row" | "group" | "dataset";
|
|
642
|
+
groupBy?: readonly string[];
|
|
643
|
+
/** String adapter expressions cannot be inspected; declare dependencies explicitly. */
|
|
644
|
+
dependsOn?: readonly string[];
|
|
645
|
+
}
|
|
589
646
|
declare type ConfigRef = ComputedRef<MachReportConfig | null>;
|
|
590
647
|
/**
|
|
591
648
|
* 默认 PDF 导出器:
|
|
@@ -721,6 +778,24 @@ declare interface ExcelImportResult_2 {
|
|
|
721
778
|
warnings: string[];
|
|
722
779
|
sheets: ExcelImportedSheet_2[];
|
|
723
780
|
}
|
|
781
|
+
declare interface ExpressionOptions {
|
|
782
|
+
numeric?: "number" | "decimal";
|
|
783
|
+
digits?: number;
|
|
784
|
+
nulls?: "propagate" | "error";
|
|
785
|
+
divisionByZero?: "null" | "error";
|
|
786
|
+
}
|
|
787
|
+
declare interface ExpressionOptions_2 {
|
|
788
|
+
numeric?: "number" | "decimal";
|
|
789
|
+
digits?: number;
|
|
790
|
+
nulls?: "propagate" | "error";
|
|
791
|
+
divisionByZero?: "null" | "error";
|
|
792
|
+
}
|
|
793
|
+
declare interface ExpressionOptions_3 {
|
|
794
|
+
numeric?: "number" | "decimal";
|
|
795
|
+
digits?: number;
|
|
796
|
+
nulls?: "propagate" | "error";
|
|
797
|
+
divisionByZero?: "null" | "error";
|
|
798
|
+
}
|
|
724
799
|
export declare interface FetchRequestOptions {
|
|
725
800
|
/** 网关前缀(默认空 = 同源) */
|
|
726
801
|
baseUrl?: string;
|
|
@@ -731,6 +806,14 @@ export declare interface FetchRequestOptions {
|
|
|
731
806
|
timeoutMs?: number;
|
|
732
807
|
}
|
|
733
808
|
declare function focusInvalid(): void;
|
|
809
|
+
declare interface FormulaAdapter {
|
|
810
|
+
/** Explicit trusted engine; core never evaluates source code/macros/external workbook references. */
|
|
811
|
+
evaluate(expression: string, context: {
|
|
812
|
+
row: Readonly<Record<string, unknown>>;
|
|
813
|
+
rowIndex: number;
|
|
814
|
+
rows: readonly Record<string, unknown>[];
|
|
815
|
+
}): unknown;
|
|
816
|
+
}
|
|
734
817
|
declare interface GridCell {
|
|
735
818
|
text?: string;
|
|
736
819
|
rawText?: string;
|
|
@@ -825,6 +908,9 @@ declare interface ListColumn {
|
|
|
825
908
|
valueType?: GridCell_2["valueType"];
|
|
826
909
|
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
827
910
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
911
|
+
hidden?: boolean;
|
|
912
|
+
/** Condition hides cell content, preserving its physical layout in preview and exports. */
|
|
913
|
+
visibleWhen?: StyleRule["when"];
|
|
828
914
|
}
|
|
829
915
|
declare interface ListColumn_2 {
|
|
830
916
|
header: string;
|
|
@@ -847,6 +933,9 @@ declare interface ListColumn_2 {
|
|
|
847
933
|
valueType?: GridCell["valueType"];
|
|
848
934
|
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
849
935
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
936
|
+
hidden?: boolean;
|
|
937
|
+
/** Condition hides cell content, preserving its physical layout in preview and exports. */
|
|
938
|
+
visibleWhen?: StyleRule_2["when"];
|
|
850
939
|
}
|
|
851
940
|
declare interface ListColumn_3 {
|
|
852
941
|
header: string;
|
|
@@ -869,6 +958,9 @@ declare interface ListColumn_3 {
|
|
|
869
958
|
valueType?: GridCell_3["valueType"];
|
|
870
959
|
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
871
960
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
961
|
+
hidden?: boolean;
|
|
962
|
+
/** Condition hides cell content, preserving its physical layout in preview and exports. */
|
|
963
|
+
visibleWhen?: StyleRule_3["when"];
|
|
872
964
|
}
|
|
873
965
|
declare interface ListComponent {
|
|
874
966
|
kind: "list";
|
|
@@ -902,6 +994,15 @@ declare interface ListComponent {
|
|
|
902
994
|
border?: boolean;
|
|
903
995
|
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
904
996
|
groupBy?: ListGroupBy;
|
|
997
|
+
/** Ordered outer-to-inner grouping; groupBy remains the single-level shorthand. */
|
|
998
|
+
groups?: ListGroupBy[];
|
|
999
|
+
computed?: ComputedField[];
|
|
1000
|
+
/** Dynamic pivot of the current source dataset, with read-only derived identities. */
|
|
1001
|
+
matrix?: MatrixTableOptions;
|
|
1002
|
+
/** Explicit row visibility; hidden rows do not participate in summaries. */
|
|
1003
|
+
rowVisibleWhen?: StyleRule["when"];
|
|
1004
|
+
/** Master/detail relation is keyed by business identity, never by display row index. */
|
|
1005
|
+
detail?: ListDetail;
|
|
905
1006
|
/** 末尾总合计行(依赖 groupBy.subtotal 或显式 fields) */
|
|
906
1007
|
grandTotal?: ListGrandTotal;
|
|
907
1008
|
}
|
|
@@ -937,6 +1038,15 @@ declare interface ListComponent_2 {
|
|
|
937
1038
|
border?: boolean;
|
|
938
1039
|
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
939
1040
|
groupBy?: ListGroupBy_2;
|
|
1041
|
+
/** Ordered outer-to-inner grouping; groupBy remains the single-level shorthand. */
|
|
1042
|
+
groups?: ListGroupBy_2[];
|
|
1043
|
+
computed?: ComputedField_2[];
|
|
1044
|
+
/** Dynamic pivot of the current source dataset, with read-only derived identities. */
|
|
1045
|
+
matrix?: MatrixTableOptions_2;
|
|
1046
|
+
/** Explicit row visibility; hidden rows do not participate in summaries. */
|
|
1047
|
+
rowVisibleWhen?: StyleRule_2["when"];
|
|
1048
|
+
/** Master/detail relation is keyed by business identity, never by display row index. */
|
|
1049
|
+
detail?: ListDetail_2;
|
|
940
1050
|
/** 末尾总合计行(依赖 groupBy.subtotal 或显式 fields) */
|
|
941
1051
|
grandTotal?: ListGrandTotal_2;
|
|
942
1052
|
}
|
|
@@ -972,26 +1082,74 @@ declare interface ListComponent_3 {
|
|
|
972
1082
|
border?: boolean;
|
|
973
1083
|
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
974
1084
|
groupBy?: ListGroupBy_3;
|
|
1085
|
+
/** Ordered outer-to-inner grouping; groupBy remains the single-level shorthand. */
|
|
1086
|
+
groups?: ListGroupBy_3[];
|
|
1087
|
+
computed?: ComputedField_3[];
|
|
1088
|
+
/** Dynamic pivot of the current source dataset, with read-only derived identities. */
|
|
1089
|
+
matrix?: MatrixTableOptions_3;
|
|
1090
|
+
/** Explicit row visibility; hidden rows do not participate in summaries. */
|
|
1091
|
+
rowVisibleWhen?: StyleRule_3["when"];
|
|
1092
|
+
/** Master/detail relation is keyed by business identity, never by display row index. */
|
|
1093
|
+
detail?: ListDetail_3;
|
|
975
1094
|
/** 末尾总合计行(依赖 groupBy.subtotal 或显式 fields) */
|
|
976
1095
|
grandTotal?: ListGrandTotal_3;
|
|
977
1096
|
}
|
|
1097
|
+
declare interface ListDetail {
|
|
1098
|
+
dataset: string;
|
|
1099
|
+
parentKey: string;
|
|
1100
|
+
foreignKey: string;
|
|
1101
|
+
rowKey?: string;
|
|
1102
|
+
columns: ListColumn[];
|
|
1103
|
+
rowHeightMm?: number;
|
|
1104
|
+
header?: boolean;
|
|
1105
|
+
label?: string;
|
|
1106
|
+
/** Unmatched children fail by default; opt-in ignore is explicit. */
|
|
1107
|
+
unmatched?: "error" | "ignore";
|
|
1108
|
+
}
|
|
1109
|
+
declare interface ListDetail_2 {
|
|
1110
|
+
dataset: string;
|
|
1111
|
+
parentKey: string;
|
|
1112
|
+
foreignKey: string;
|
|
1113
|
+
rowKey?: string;
|
|
1114
|
+
columns: ListColumn_2[];
|
|
1115
|
+
rowHeightMm?: number;
|
|
1116
|
+
header?: boolean;
|
|
1117
|
+
label?: string;
|
|
1118
|
+
/** Unmatched children fail by default; opt-in ignore is explicit. */
|
|
1119
|
+
unmatched?: "error" | "ignore";
|
|
1120
|
+
}
|
|
1121
|
+
declare interface ListDetail_3 {
|
|
1122
|
+
dataset: string;
|
|
1123
|
+
parentKey: string;
|
|
1124
|
+
foreignKey: string;
|
|
1125
|
+
rowKey?: string;
|
|
1126
|
+
columns: ListColumn_3[];
|
|
1127
|
+
rowHeightMm?: number;
|
|
1128
|
+
header?: boolean;
|
|
1129
|
+
label?: string;
|
|
1130
|
+
/** Unmatched children fail by default; opt-in ignore is explicit. */
|
|
1131
|
+
unmatched?: "error" | "ignore";
|
|
1132
|
+
}
|
|
978
1133
|
declare type ListGrandTotal = boolean | {
|
|
979
1134
|
label?: string;
|
|
980
1135
|
style?: ComponentStyle_2;
|
|
981
1136
|
/** 合计列(缺省沿用 groupBy.subtotal) */
|
|
982
1137
|
fields?: string[];
|
|
1138
|
+
aggregates?: AggregateDefinition[];
|
|
983
1139
|
};
|
|
984
1140
|
declare type ListGrandTotal_2 = boolean | {
|
|
985
1141
|
label?: string;
|
|
986
1142
|
style?: ComponentStyle;
|
|
987
1143
|
/** 合计列(缺省沿用 groupBy.subtotal) */
|
|
988
1144
|
fields?: string[];
|
|
1145
|
+
aggregates?: AggregateDefinition_2[];
|
|
989
1146
|
};
|
|
990
1147
|
declare type ListGrandTotal_3 = boolean | {
|
|
991
1148
|
label?: string;
|
|
992
1149
|
style?: ComponentStyle_3;
|
|
993
1150
|
/** 合计列(缺省沿用 groupBy.subtotal) */
|
|
994
1151
|
fields?: string[];
|
|
1152
|
+
aggregates?: AggregateDefinition_3[];
|
|
995
1153
|
};
|
|
996
1154
|
/** 分组小计配置(声明式,见 ListComponent.groupBy) */
|
|
997
1155
|
declare interface ListGroupBy {
|
|
@@ -1006,6 +1164,9 @@ declare interface ListGroupBy {
|
|
|
1006
1164
|
subtotalLabel?: string;
|
|
1007
1165
|
/** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
|
|
1008
1166
|
keepWithNext?: boolean;
|
|
1167
|
+
aggregates?: AggregateDefinition[];
|
|
1168
|
+
/** Repeat this group heading after page breaks within the group. */
|
|
1169
|
+
repeatHeader?: boolean;
|
|
1009
1170
|
}
|
|
1010
1171
|
/** 分组小计配置(声明式,见 ListComponent.groupBy) */
|
|
1011
1172
|
declare interface ListGroupBy_2 {
|
|
@@ -1020,6 +1181,9 @@ declare interface ListGroupBy_2 {
|
|
|
1020
1181
|
subtotalLabel?: string;
|
|
1021
1182
|
/** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
|
|
1022
1183
|
keepWithNext?: boolean;
|
|
1184
|
+
aggregates?: AggregateDefinition_2[];
|
|
1185
|
+
/** Repeat this group heading after page breaks within the group. */
|
|
1186
|
+
repeatHeader?: boolean;
|
|
1023
1187
|
}
|
|
1024
1188
|
/** 分组小计配置(声明式,见 ListComponent.groupBy) */
|
|
1025
1189
|
declare interface ListGroupBy_3 {
|
|
@@ -1034,6 +1198,9 @@ declare interface ListGroupBy_3 {
|
|
|
1034
1198
|
subtotalLabel?: string;
|
|
1035
1199
|
/** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
|
|
1036
1200
|
keepWithNext?: boolean;
|
|
1201
|
+
aggregates?: AggregateDefinition_3[];
|
|
1202
|
+
/** Repeat this group heading after page breaks within the group. */
|
|
1203
|
+
repeatHeader?: boolean;
|
|
1037
1204
|
}
|
|
1038
1205
|
export declare interface LocalTemplateEntry {
|
|
1039
1206
|
template: ReportTemplate_2;
|
|
@@ -1429,6 +1596,51 @@ export declare interface MachReportToolbarOptions {
|
|
|
1429
1596
|
/** 未传时显示全部已有出口;空数组表示不提供导出工具。 */
|
|
1430
1597
|
exportFormats?: ReportExportFormat[];
|
|
1431
1598
|
}
|
|
1599
|
+
declare interface MatrixTableOptions {
|
|
1600
|
+
rowFields: readonly string[];
|
|
1601
|
+
columnFields: readonly string[];
|
|
1602
|
+
measures: readonly (AggregateDefinition & {
|
|
1603
|
+
label?: string;
|
|
1604
|
+
})[];
|
|
1605
|
+
totals?: boolean;
|
|
1606
|
+
rowHeader?: string;
|
|
1607
|
+
columnWidthMm?: number;
|
|
1608
|
+
rowWidthMm?: number;
|
|
1609
|
+
maxRows?: number;
|
|
1610
|
+
maxColumns?: number;
|
|
1611
|
+
maxInputRows?: number;
|
|
1612
|
+
maxCells?: number;
|
|
1613
|
+
}
|
|
1614
|
+
declare interface MatrixTableOptions_2 {
|
|
1615
|
+
rowFields: readonly string[];
|
|
1616
|
+
columnFields: readonly string[];
|
|
1617
|
+
measures: readonly (AggregateDefinition_2 & {
|
|
1618
|
+
label?: string;
|
|
1619
|
+
})[];
|
|
1620
|
+
totals?: boolean;
|
|
1621
|
+
rowHeader?: string;
|
|
1622
|
+
columnWidthMm?: number;
|
|
1623
|
+
rowWidthMm?: number;
|
|
1624
|
+
maxRows?: number;
|
|
1625
|
+
maxColumns?: number;
|
|
1626
|
+
maxInputRows?: number;
|
|
1627
|
+
maxCells?: number;
|
|
1628
|
+
}
|
|
1629
|
+
declare interface MatrixTableOptions_3 {
|
|
1630
|
+
rowFields: readonly string[];
|
|
1631
|
+
columnFields: readonly string[];
|
|
1632
|
+
measures: readonly (AggregateDefinition_3 & {
|
|
1633
|
+
label?: string;
|
|
1634
|
+
})[];
|
|
1635
|
+
totals?: boolean;
|
|
1636
|
+
rowHeader?: string;
|
|
1637
|
+
columnWidthMm?: number;
|
|
1638
|
+
rowWidthMm?: number;
|
|
1639
|
+
maxRows?: number;
|
|
1640
|
+
maxColumns?: number;
|
|
1641
|
+
maxInputRows?: number;
|
|
1642
|
+
maxCells?: number;
|
|
1643
|
+
}
|
|
1432
1644
|
export declare function normalizeReportIds(reportId: ReportIdInput): string[];
|
|
1433
1645
|
/** Workers preserve stable error codes, not JavaScript class identity. Only known codes cross the UI boundary. */
|
|
1434
1646
|
export declare function normalizeReportLoadError(error: unknown): MachReportError;
|
|
@@ -1498,6 +1710,14 @@ declare interface PaginateOptions {
|
|
|
1498
1710
|
measurer?: TextMeasurer;
|
|
1499
1711
|
/** 可选页数上限;在追加超限页前终止,避免先分配全部页面再检查。 */
|
|
1500
1712
|
maxPages?: number;
|
|
1713
|
+
/** Actual grid cells, including repeated furniture and nested children; checked before each page is appended. */
|
|
1714
|
+
maxCells?: number;
|
|
1715
|
+
signal?: AbortSignal;
|
|
1716
|
+
/** Streaming total-page anchors can skip the bounded counting pass when known. */
|
|
1717
|
+
knownTotalPages?: number;
|
|
1718
|
+
onWarning?: (warning: string) => void;
|
|
1719
|
+
/** Trusted formula adapter is passed at execution time; it is never serialized in templates. */
|
|
1720
|
+
formula?: FormulaAdapter;
|
|
1501
1721
|
}
|
|
1502
1722
|
/** PDF 导出器:RenderPlan → PDF 字节;第二参数可上报非致命保真告警。 */
|
|
1503
1723
|
export declare interface PdfExporter {
|
|
@@ -1516,6 +1736,8 @@ export declare interface PdfFontCheckResult {
|
|
|
1516
1736
|
/** available 仅表示字体资源可达;实际导出仍会校验文字能否编码。 */
|
|
1517
1737
|
export declare type PdfFontStatus = "unchecked" | "checking" | "available" | "disabled" | "unverified" | "error";
|
|
1518
1738
|
declare interface PlanComponent {
|
|
1739
|
+
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
1740
|
+
pageAnchor?: "header" | "footer";
|
|
1519
1741
|
kind: ComponentKind;
|
|
1520
1742
|
leftMm: number;
|
|
1521
1743
|
topMm: number;
|
|
@@ -1538,6 +1760,8 @@ declare interface PlanComponent {
|
|
|
1538
1760
|
fallbackText?: string;
|
|
1539
1761
|
}
|
|
1540
1762
|
declare interface PlanComponent_2 {
|
|
1763
|
+
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
1764
|
+
pageAnchor?: "header" | "footer";
|
|
1541
1765
|
kind: ComponentKind_2;
|
|
1542
1766
|
leftMm: number;
|
|
1543
1767
|
topMm: number;
|
|
@@ -1560,6 +1784,8 @@ declare interface PlanComponent_2 {
|
|
|
1560
1784
|
fallbackText?: string;
|
|
1561
1785
|
}
|
|
1562
1786
|
declare interface PlanComponent_3 {
|
|
1787
|
+
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
1788
|
+
pageAnchor?: "header" | "footer";
|
|
1563
1789
|
kind: ComponentKind_3;
|
|
1564
1790
|
leftMm: number;
|
|
1565
1791
|
topMm: number;
|
|
@@ -1942,6 +2168,42 @@ export declare interface ReportEmptyState {
|
|
|
1942
2168
|
}
|
|
1943
2169
|
/** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
|
|
1944
2170
|
export declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
|
|
2171
|
+
declare type ReportExpression = {
|
|
2172
|
+
field: string;
|
|
2173
|
+
} | {
|
|
2174
|
+
value: string | number | boolean | null;
|
|
2175
|
+
} | {
|
|
2176
|
+
aggregate: AggregateOperation;
|
|
2177
|
+
field?: string;
|
|
2178
|
+
weightField?: string;
|
|
2179
|
+
} | {
|
|
2180
|
+
op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
|
|
2181
|
+
args: readonly ReportExpression[];
|
|
2182
|
+
};
|
|
2183
|
+
declare type ReportExpression_2 = {
|
|
2184
|
+
field: string;
|
|
2185
|
+
} | {
|
|
2186
|
+
value: string | number | boolean | null;
|
|
2187
|
+
} | {
|
|
2188
|
+
aggregate: AggregateOperation_2;
|
|
2189
|
+
field?: string;
|
|
2190
|
+
weightField?: string;
|
|
2191
|
+
} | {
|
|
2192
|
+
op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
|
|
2193
|
+
args: readonly ReportExpression_2[];
|
|
2194
|
+
};
|
|
2195
|
+
declare type ReportExpression_3 = {
|
|
2196
|
+
field: string;
|
|
2197
|
+
} | {
|
|
2198
|
+
value: string | number | boolean | null;
|
|
2199
|
+
} | {
|
|
2200
|
+
aggregate: AggregateOperation_3;
|
|
2201
|
+
field?: string;
|
|
2202
|
+
weightField?: string;
|
|
2203
|
+
} | {
|
|
2204
|
+
op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
|
|
2205
|
+
args: readonly ReportExpression_3[];
|
|
2206
|
+
};
|
|
1945
2207
|
/** 保持 Promise<RenderPlan> 契约;元数据为可选,旧业务 fetcher 无需改造。 */
|
|
1946
2208
|
declare interface ReportFetcher {
|
|
1947
2209
|
(input: ReportFetchInput): Promise<RenderPlan>;
|
|
@@ -2284,6 +2546,8 @@ declare interface StyleRule {
|
|
|
2284
2546
|
field: string;
|
|
2285
2547
|
op: ">" | ">=" | "<" | "<=" | "==" | "!=";
|
|
2286
2548
|
value: number | string;
|
|
2549
|
+
/** Explicit decimal comparisons retain decimal thresholds as text. */
|
|
2550
|
+
numeric?: "number" | "decimal";
|
|
2287
2551
|
};
|
|
2288
2552
|
/** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
|
|
2289
2553
|
style: Record<string, unknown>;
|
|
@@ -2294,6 +2558,8 @@ declare interface StyleRule_2 {
|
|
|
2294
2558
|
field: string;
|
|
2295
2559
|
op: ">" | ">=" | "<" | "<=" | "==" | "!=";
|
|
2296
2560
|
value: number | string;
|
|
2561
|
+
/** Explicit decimal comparisons retain decimal thresholds as text. */
|
|
2562
|
+
numeric?: "number" | "decimal";
|
|
2297
2563
|
};
|
|
2298
2564
|
/** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
|
|
2299
2565
|
style: Record<string, unknown>;
|
|
@@ -2304,6 +2570,8 @@ declare interface StyleRule_3 {
|
|
|
2304
2570
|
field: string;
|
|
2305
2571
|
op: ">" | ">=" | "<" | "<=" | "==" | "!=";
|
|
2306
2572
|
value: number | string;
|
|
2573
|
+
/** Explicit decimal comparisons retain decimal thresholds as text. */
|
|
2574
|
+
numeric?: "number" | "decimal";
|
|
2307
2575
|
};
|
|
2308
2576
|
/** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
|
|
2309
2577
|
style: Record<string, unknown>;
|