@agile-team/mach-report 2.13.0 → 2.14.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 +10 -2
- package/dist/ExcelBindingWizard-CLT2p7P3.cjs +1 -0
- package/dist/ExcelBindingWizard-CvsWR8Ga.js +1485 -0
- package/dist/{ParamEditor-BLaE5q5W.js → ParamEditor-CflQV3eQ.js} +191 -187
- package/dist/ParamEditor-vIDzvpPV.cjs +1 -0
- package/dist/ReportBatchPanel-DkxTzBkD.cjs +1 -0
- package/dist/{ReportBatchPanel-CW2HV9I8.js → ReportBatchPanel-LqVgiqp7.js} +3 -3
- package/dist/ReportPreview-CvbqLUzM.cjs +6 -0
- package/dist/ReportPreview-D_ywJ_-H.js +4533 -0
- package/dist/{ReportTemplateLibrary-BZB-XWjj.js → ReportTemplateLibrary-MjWEtc7X.js} +1 -1
- package/dist/ReportTemplateLibrary-cQ1sqNYo.cjs +1 -0
- package/dist/RuleEditor-BaR6xUiI.cjs +1 -0
- package/dist/RuleEditor-ChuXMlei.js +2037 -0
- package/dist/TemplateOutlinePanel-BHKP89Xz.cjs +1 -0
- package/dist/TemplateOutlinePanel-Dci6aRn1.js +96 -0
- package/dist/TemplateReusePanel-B7Gmyc1z.js +388 -0
- package/dist/TemplateReusePanel-CY5eO2Sh.cjs +1 -0
- package/dist/TemplateReviewPanel-DjlX3xpt.js +592 -0
- package/dist/TemplateReviewPanel-JvZe9_4G.cjs +1 -0
- package/dist/{batch-mRqhhhjt.js → batch-DzaTNLWI.js} +23 -16
- package/dist/batch-xMkqYiTr.cjs +1 -0
- package/dist/config-0UIohTS7.cjs +1 -0
- package/dist/{config-XVwG87IA.js → config-Dt9NtCPl.js} +223 -186
- package/dist/data-explanation-BktvER5B.cjs +1 -0
- package/dist/data-explanation-C_J6jYNi.js +16 -0
- package/dist/designer-Ci1LizA9.js +5020 -0
- package/dist/designer-rtmVIIdN.cjs +2 -0
- package/dist/designer.cjs +1 -2
- package/dist/designer.d.cts +290 -3
- package/dist/designer.d.ts +290 -3
- package/dist/designer.js +21 -4312
- package/dist/font-loader-DHto6Lra.js +297 -0
- package/dist/font-loader-vhCT8znW.cjs +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +157 -1
- package/dist/index.d.ts +157 -1
- package/dist/index.js +720 -639
- package/dist/{template-review-PgEe_Wr9.js → json-snapshot-BeFT3Tso.js} +795 -585
- package/dist/json-snapshot-D1NTP2oI.cjs +2 -0
- package/dist/pdf-8UPQebOE.js +36288 -0
- package/dist/pdf-AyJGb22z.cjs +101 -0
- package/dist/pdf.cjs +1 -101
- package/dist/pdf.js +9 -36579
- package/dist/plugin-BGKf-Tqg.js +22 -0
- package/dist/{plugin-DzS6pxTA.cjs → plugin-CktLH_Iy.cjs} +1 -1
- package/dist/{region-binding-workflow-CcUq8W2Q.js → region-binding-workflow-DEJbhpCv.js} +1 -1
- package/dist/server/node.d.cts +46 -11
- package/dist/server/node.d.ts +46 -11
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +294 -280
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +107 -12
- package/dist/server.d.ts +107 -12
- package/dist/server.js +711 -451
- package/dist/style.css +1 -1
- package/dist/template-bindings-BJR4k7qZ.cjs +1 -0
- package/dist/template-bindings-Daui7hLF.js +252 -0
- package/dist/template-fragments-CLkGo6To.js +187 -0
- package/dist/template-fragments-DFUpq5QM.cjs +1 -0
- package/dist/template-outline-B3xVkzSv.cjs +1 -0
- package/dist/template-outline-CFenM1PV.js +88 -0
- package/dist/{template-registry-BjE1VS6g.js → template-registry-COXDEJEM.js} +1 -1
- package/dist/{useLocalDraft-C07SYRnC.js → useLocalDraft-BnhcxXk_.js} +1 -1
- package/dist/{useLocalDraft-Yiw1wFgI.cjs → useLocalDraft-CioIfDb6.cjs} +1 -1
- package/dist/{validate-DbgEM1Hh.js → validate-CkQBWCeg.js} +3 -3
- package/dist/vue/async.d.cts +68 -2
- package/dist/vue/async.d.ts +68 -2
- package/dist/vue/index.d.cts +117 -3
- package/dist/vue/index.d.ts +117 -3
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +5 -5
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +78 -71
- package/dist/{workbook-session-BPb3TMnT.js → workbook-session-BfK1yHOO.js} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +46 -11
- package/dist/worker.d.ts +46 -11
- package/dist/worker.js +59 -55
- package/dist/xlsx.js +3 -3
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-CeAf4QSE.js +0 -1465
- package/dist/ExcelBindingWizard-y0mT-AHR.cjs +0 -1
- package/dist/ParamEditor-MBBC7lUE.cjs +0 -1
- package/dist/ReportBatchPanel-Fp1ePFag.cjs +0 -1
- package/dist/ReportPreview-BN6fk7Wz.cjs +0 -6
- package/dist/ReportPreview-D2Jkyh1U.js +0 -4243
- package/dist/ReportTemplateLibrary-5fk5CQBO.cjs +0 -1
- package/dist/RuleEditor-ChRzNQuF.cjs +0 -1
- package/dist/RuleEditor-DzAmW5YH.js +0 -2024
- package/dist/TemplateReviewPanel-BKofGrV9.js +0 -222
- package/dist/TemplateReviewPanel-DwtOcLue.cjs +0 -1
- package/dist/batch-Bt3Fd27Z.cjs +0 -1
- package/dist/config-Bb7RiIO5.cjs +0 -1
- package/dist/plugin-D4wizDXB.js +0 -22
- package/dist/record-bindings-By_UKZ2g.cjs +0 -1
- package/dist/record-bindings-D-5jQlTj.js +0 -196
- package/dist/template-review-DGwWOoCv.cjs +0 -2
package/dist/vue/async.d.cts
CHANGED
|
@@ -681,6 +681,7 @@ declare interface MachReportConfig {
|
|
|
681
681
|
}
|
|
682
682
|
/** defaults 层可配置项(全部可选,均有内置缺省) */
|
|
683
683
|
declare interface MachReportDefaults {
|
|
684
|
+
printOptions?: ReportPrintOptions;
|
|
684
685
|
showExport?: boolean;
|
|
685
686
|
showPrint?: boolean;
|
|
686
687
|
showPdfWindow?: boolean;
|
|
@@ -727,7 +728,7 @@ declare type MachReportLogger = Pick<Console, "warn" | "info">;
|
|
|
727
728
|
* - 优先级:组件 props > 路由级叠加 > preset > defaults(props 永远最高)
|
|
728
729
|
*/
|
|
729
730
|
/** 工具栏与状态文案(默认简体中文;出海场景覆写) */
|
|
730
|
-
declare interface MachReportMessages extends Partial<ReportCalculationMessages
|
|
731
|
+
declare interface MachReportMessages extends Partial<ReportCalculationMessages>, ReportPrintMessages {
|
|
731
732
|
exportMenu?: string;
|
|
732
733
|
exportMenuDescription?: string;
|
|
733
734
|
clearSearch?: string;
|
|
@@ -738,6 +739,13 @@ declare interface MachReportMessages extends Partial<ReportCalculationMessages>
|
|
|
738
739
|
pageJumpHint?: string;
|
|
739
740
|
pagination?: string;
|
|
740
741
|
recordNavigation?: string;
|
|
742
|
+
dataExplanation?: string;
|
|
743
|
+
dataExplanationHint?: string;
|
|
744
|
+
dataExplanationSearch?: string;
|
|
745
|
+
dataExplanationEmpty?: string;
|
|
746
|
+
dataMissingSource?: string;
|
|
747
|
+
dataNotApplicable?: string;
|
|
748
|
+
dataNotCalculable?: string;
|
|
741
749
|
recordInfo?: string;
|
|
742
750
|
prevRecord?: string;
|
|
743
751
|
nextRecord?: string;
|
|
@@ -1430,6 +1438,20 @@ declare interface ReportCellTableIdentity_2 {
|
|
|
1430
1438
|
declare type ReportCellValue = string | number | boolean | null;
|
|
1431
1439
|
declare type ReportCellValue_2 = string | number | boolean | null;
|
|
1432
1440
|
declare type ReportCellValueType = NonNullable<GridCell_2["valueType"]>;
|
|
1441
|
+
declare interface ReportDataTarget {
|
|
1442
|
+
datasetId: string;
|
|
1443
|
+
field: string;
|
|
1444
|
+
rowKey?: string | number;
|
|
1445
|
+
/** Use table identity when the same dataset appears in several tables. */
|
|
1446
|
+
tableId?: string;
|
|
1447
|
+
}
|
|
1448
|
+
declare interface ReportDataTarget_2 {
|
|
1449
|
+
datasetId: string;
|
|
1450
|
+
field: string;
|
|
1451
|
+
rowKey?: string | number;
|
|
1452
|
+
/** Use table identity when the same dataset appears in several tables. */
|
|
1453
|
+
tableId?: string;
|
|
1454
|
+
}
|
|
1433
1455
|
declare interface ReportDefinition {
|
|
1434
1456
|
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
1435
1457
|
template: ReportTemplate | ReportTemplateLoader;
|
|
@@ -1450,6 +1472,9 @@ declare interface ReportDiagnostic {
|
|
|
1450
1472
|
message: string;
|
|
1451
1473
|
path?: string;
|
|
1452
1474
|
severity: "warning" | "error" | "info";
|
|
1475
|
+
/** Optional explanation supplied by the business source, not inferred from blank cells. */
|
|
1476
|
+
valueState?: ReportValueState;
|
|
1477
|
+
target?: ReportDataTarget;
|
|
1453
1478
|
}
|
|
1454
1479
|
declare type ReportDiscardReason = "reload" | "import" | "replace" | "leave";
|
|
1455
1480
|
declare interface ReportEditBatch {
|
|
@@ -1533,7 +1558,8 @@ declare interface ReportFetchInput extends ReportTaskMonitoring {
|
|
|
1533
1558
|
signal?: AbortSignal;
|
|
1534
1559
|
/** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
|
|
1535
1560
|
onWarning?: (message: string) => void;
|
|
1536
|
-
|
|
1561
|
+
/** Index scopes diagnostics when reports share datasets or a report ID is repeated. */
|
|
1562
|
+
onQueryResult?: (reportId: string, result: ReportQueryResult, reportIndex?: number) => void;
|
|
1537
1563
|
}
|
|
1538
1564
|
declare interface ReportFieldContract {
|
|
1539
1565
|
field: string;
|
|
@@ -1554,6 +1580,7 @@ declare interface ReportFieldTarget {
|
|
|
1554
1580
|
datasetId?: string;
|
|
1555
1581
|
rowKey?: string | number;
|
|
1556
1582
|
tableId?: string;
|
|
1583
|
+
reportScope?: string;
|
|
1557
1584
|
}
|
|
1558
1585
|
declare interface ReportFlowBand {
|
|
1559
1586
|
/** Exact stable component IDs. Static components use nid, lists use id. */
|
|
@@ -1654,7 +1681,13 @@ declare interface ReportPreferencesOptions {
|
|
|
1654
1681
|
key: string;
|
|
1655
1682
|
adapter: ReportPreferencesAdapter;
|
|
1656
1683
|
}
|
|
1684
|
+
declare interface ReportPreviewDataTarget extends ReportDataTarget_2 {
|
|
1685
|
+
/** Added by the query adapter; isolates identical dataset/row/field identities across reports. */
|
|
1686
|
+
reportScope?: string;
|
|
1687
|
+
}
|
|
1657
1688
|
declare interface ReportPreviewDiagnostic {
|
|
1689
|
+
valueState?: ReportValueState_2;
|
|
1690
|
+
target?: ReportPreviewDataTarget;
|
|
1658
1691
|
code: string;
|
|
1659
1692
|
severity: "warning" | "error" | "info";
|
|
1660
1693
|
message: string;
|
|
@@ -1677,6 +1710,35 @@ declare interface ReportPreviewTask {
|
|
|
1677
1710
|
}
|
|
1678
1711
|
declare type ReportPreviewTaskStage = "query" | "validate" | "layout" | "assets" | "import" | "encode" | "download" | "print";
|
|
1679
1712
|
declare type ReportPreviewTool = "search" | "thumbnails" | "zoom" | ReportExportFormat | "print" | "pdfWindow" | "editing" | "import";
|
|
1713
|
+
declare interface ReportPrintCalibration {
|
|
1714
|
+
offsetXmm?: number;
|
|
1715
|
+
offsetYmm?: number;
|
|
1716
|
+
}
|
|
1717
|
+
declare interface ReportPrintFont {
|
|
1718
|
+
/** Same family name used by the template. Sources are trusted application assets. */
|
|
1719
|
+
family: string;
|
|
1720
|
+
source: string;
|
|
1721
|
+
weight?: string;
|
|
1722
|
+
style?: "normal" | "italic" | "oblique";
|
|
1723
|
+
}
|
|
1724
|
+
declare interface ReportPrintMessages {
|
|
1725
|
+
printPrepareTimeout?: string;
|
|
1726
|
+
printImageFailed?: string;
|
|
1727
|
+
printFontFailed?: string;
|
|
1728
|
+
printPrepareFailed?: string;
|
|
1729
|
+
printCalibration?: string;
|
|
1730
|
+
printOffsetX?: string;
|
|
1731
|
+
printOffsetY?: string;
|
|
1732
|
+
printCalibrationTest?: string;
|
|
1733
|
+
printCalibrationHint?: string;
|
|
1734
|
+
}
|
|
1735
|
+
declare interface ReportPrintOptions {
|
|
1736
|
+
/** Defaults to 15 seconds for the entire font/image preparation stage. */
|
|
1737
|
+
resourceTimeoutMs?: number;
|
|
1738
|
+
fonts?: readonly ReportPrintFont[];
|
|
1739
|
+
/** Physical translation only; no scaling or mutation of the report data/plan. */
|
|
1740
|
+
calibration?: ReportPrintCalibration;
|
|
1741
|
+
}
|
|
1680
1742
|
/** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
|
|
1681
1743
|
declare interface ReportProvider {
|
|
1682
1744
|
query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
|
|
@@ -1787,6 +1849,10 @@ declare interface ReportTemplateRepeat_2 {
|
|
|
1787
1849
|
};
|
|
1788
1850
|
}
|
|
1789
1851
|
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
1852
|
+
/** Optional business explanations never replace raw data or schema validation. */
|
|
1853
|
+
declare type ReportValueState = "missing-source" | "not-applicable" | "not-calculable";
|
|
1854
|
+
/** Optional business explanations never replace raw data or schema validation. */
|
|
1855
|
+
declare type ReportValueState_2 = "missing-source" | "not-applicable" | "not-calculable";
|
|
1790
1856
|
declare interface RichParagraph {
|
|
1791
1857
|
segments: RichSegment[];
|
|
1792
1858
|
align?: ComponentStyle["align"];
|
package/dist/vue/async.d.ts
CHANGED
|
@@ -681,6 +681,7 @@ declare interface MachReportConfig {
|
|
|
681
681
|
}
|
|
682
682
|
/** defaults 层可配置项(全部可选,均有内置缺省) */
|
|
683
683
|
declare interface MachReportDefaults {
|
|
684
|
+
printOptions?: ReportPrintOptions;
|
|
684
685
|
showExport?: boolean;
|
|
685
686
|
showPrint?: boolean;
|
|
686
687
|
showPdfWindow?: boolean;
|
|
@@ -727,7 +728,7 @@ declare type MachReportLogger = Pick<Console, "warn" | "info">;
|
|
|
727
728
|
* - 优先级:组件 props > 路由级叠加 > preset > defaults(props 永远最高)
|
|
728
729
|
*/
|
|
729
730
|
/** 工具栏与状态文案(默认简体中文;出海场景覆写) */
|
|
730
|
-
declare interface MachReportMessages extends Partial<ReportCalculationMessages
|
|
731
|
+
declare interface MachReportMessages extends Partial<ReportCalculationMessages>, ReportPrintMessages {
|
|
731
732
|
exportMenu?: string;
|
|
732
733
|
exportMenuDescription?: string;
|
|
733
734
|
clearSearch?: string;
|
|
@@ -738,6 +739,13 @@ declare interface MachReportMessages extends Partial<ReportCalculationMessages>
|
|
|
738
739
|
pageJumpHint?: string;
|
|
739
740
|
pagination?: string;
|
|
740
741
|
recordNavigation?: string;
|
|
742
|
+
dataExplanation?: string;
|
|
743
|
+
dataExplanationHint?: string;
|
|
744
|
+
dataExplanationSearch?: string;
|
|
745
|
+
dataExplanationEmpty?: string;
|
|
746
|
+
dataMissingSource?: string;
|
|
747
|
+
dataNotApplicable?: string;
|
|
748
|
+
dataNotCalculable?: string;
|
|
741
749
|
recordInfo?: string;
|
|
742
750
|
prevRecord?: string;
|
|
743
751
|
nextRecord?: string;
|
|
@@ -1430,6 +1438,20 @@ declare interface ReportCellTableIdentity_2 {
|
|
|
1430
1438
|
declare type ReportCellValue = string | number | boolean | null;
|
|
1431
1439
|
declare type ReportCellValue_2 = string | number | boolean | null;
|
|
1432
1440
|
declare type ReportCellValueType = NonNullable<GridCell_2["valueType"]>;
|
|
1441
|
+
declare interface ReportDataTarget {
|
|
1442
|
+
datasetId: string;
|
|
1443
|
+
field: string;
|
|
1444
|
+
rowKey?: string | number;
|
|
1445
|
+
/** Use table identity when the same dataset appears in several tables. */
|
|
1446
|
+
tableId?: string;
|
|
1447
|
+
}
|
|
1448
|
+
declare interface ReportDataTarget_2 {
|
|
1449
|
+
datasetId: string;
|
|
1450
|
+
field: string;
|
|
1451
|
+
rowKey?: string | number;
|
|
1452
|
+
/** Use table identity when the same dataset appears in several tables. */
|
|
1453
|
+
tableId?: string;
|
|
1454
|
+
}
|
|
1433
1455
|
declare interface ReportDefinition {
|
|
1434
1456
|
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
1435
1457
|
template: ReportTemplate | ReportTemplateLoader;
|
|
@@ -1450,6 +1472,9 @@ declare interface ReportDiagnostic {
|
|
|
1450
1472
|
message: string;
|
|
1451
1473
|
path?: string;
|
|
1452
1474
|
severity: "warning" | "error" | "info";
|
|
1475
|
+
/** Optional explanation supplied by the business source, not inferred from blank cells. */
|
|
1476
|
+
valueState?: ReportValueState;
|
|
1477
|
+
target?: ReportDataTarget;
|
|
1453
1478
|
}
|
|
1454
1479
|
declare type ReportDiscardReason = "reload" | "import" | "replace" | "leave";
|
|
1455
1480
|
declare interface ReportEditBatch {
|
|
@@ -1533,7 +1558,8 @@ declare interface ReportFetchInput extends ReportTaskMonitoring {
|
|
|
1533
1558
|
signal?: AbortSignal;
|
|
1534
1559
|
/** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
|
|
1535
1560
|
onWarning?: (message: string) => void;
|
|
1536
|
-
|
|
1561
|
+
/** Index scopes diagnostics when reports share datasets or a report ID is repeated. */
|
|
1562
|
+
onQueryResult?: (reportId: string, result: ReportQueryResult, reportIndex?: number) => void;
|
|
1537
1563
|
}
|
|
1538
1564
|
declare interface ReportFieldContract {
|
|
1539
1565
|
field: string;
|
|
@@ -1554,6 +1580,7 @@ declare interface ReportFieldTarget {
|
|
|
1554
1580
|
datasetId?: string;
|
|
1555
1581
|
rowKey?: string | number;
|
|
1556
1582
|
tableId?: string;
|
|
1583
|
+
reportScope?: string;
|
|
1557
1584
|
}
|
|
1558
1585
|
declare interface ReportFlowBand {
|
|
1559
1586
|
/** Exact stable component IDs. Static components use nid, lists use id. */
|
|
@@ -1654,7 +1681,13 @@ declare interface ReportPreferencesOptions {
|
|
|
1654
1681
|
key: string;
|
|
1655
1682
|
adapter: ReportPreferencesAdapter;
|
|
1656
1683
|
}
|
|
1684
|
+
declare interface ReportPreviewDataTarget extends ReportDataTarget_2 {
|
|
1685
|
+
/** Added by the query adapter; isolates identical dataset/row/field identities across reports. */
|
|
1686
|
+
reportScope?: string;
|
|
1687
|
+
}
|
|
1657
1688
|
declare interface ReportPreviewDiagnostic {
|
|
1689
|
+
valueState?: ReportValueState_2;
|
|
1690
|
+
target?: ReportPreviewDataTarget;
|
|
1658
1691
|
code: string;
|
|
1659
1692
|
severity: "warning" | "error" | "info";
|
|
1660
1693
|
message: string;
|
|
@@ -1677,6 +1710,35 @@ declare interface ReportPreviewTask {
|
|
|
1677
1710
|
}
|
|
1678
1711
|
declare type ReportPreviewTaskStage = "query" | "validate" | "layout" | "assets" | "import" | "encode" | "download" | "print";
|
|
1679
1712
|
declare type ReportPreviewTool = "search" | "thumbnails" | "zoom" | ReportExportFormat | "print" | "pdfWindow" | "editing" | "import";
|
|
1713
|
+
declare interface ReportPrintCalibration {
|
|
1714
|
+
offsetXmm?: number;
|
|
1715
|
+
offsetYmm?: number;
|
|
1716
|
+
}
|
|
1717
|
+
declare interface ReportPrintFont {
|
|
1718
|
+
/** Same family name used by the template. Sources are trusted application assets. */
|
|
1719
|
+
family: string;
|
|
1720
|
+
source: string;
|
|
1721
|
+
weight?: string;
|
|
1722
|
+
style?: "normal" | "italic" | "oblique";
|
|
1723
|
+
}
|
|
1724
|
+
declare interface ReportPrintMessages {
|
|
1725
|
+
printPrepareTimeout?: string;
|
|
1726
|
+
printImageFailed?: string;
|
|
1727
|
+
printFontFailed?: string;
|
|
1728
|
+
printPrepareFailed?: string;
|
|
1729
|
+
printCalibration?: string;
|
|
1730
|
+
printOffsetX?: string;
|
|
1731
|
+
printOffsetY?: string;
|
|
1732
|
+
printCalibrationTest?: string;
|
|
1733
|
+
printCalibrationHint?: string;
|
|
1734
|
+
}
|
|
1735
|
+
declare interface ReportPrintOptions {
|
|
1736
|
+
/** Defaults to 15 seconds for the entire font/image preparation stage. */
|
|
1737
|
+
resourceTimeoutMs?: number;
|
|
1738
|
+
fonts?: readonly ReportPrintFont[];
|
|
1739
|
+
/** Physical translation only; no scaling or mutation of the report data/plan. */
|
|
1740
|
+
calibration?: ReportPrintCalibration;
|
|
1741
|
+
}
|
|
1680
1742
|
/** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
|
|
1681
1743
|
declare interface ReportProvider {
|
|
1682
1744
|
query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
|
|
@@ -1787,6 +1849,10 @@ declare interface ReportTemplateRepeat_2 {
|
|
|
1787
1849
|
};
|
|
1788
1850
|
}
|
|
1789
1851
|
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
1852
|
+
/** Optional business explanations never replace raw data or schema validation. */
|
|
1853
|
+
declare type ReportValueState = "missing-source" | "not-applicable" | "not-calculable";
|
|
1854
|
+
/** Optional business explanations never replace raw data or schema validation. */
|
|
1855
|
+
declare type ReportValueState_2 = "missing-source" | "not-applicable" | "not-calculable";
|
|
1790
1856
|
declare interface RichParagraph {
|
|
1791
1857
|
segments: RichSegment[];
|
|
1792
1858
|
align?: ComponentStyle["align"];
|
package/dist/vue/index.d.cts
CHANGED
|
@@ -70,6 +70,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
70
70
|
type: PropType<AssetRenderOptions>;
|
|
71
71
|
default: undefined;
|
|
72
72
|
};
|
|
73
|
+
printOptions: {
|
|
74
|
+
type: PropType<ReportPrintOptions>;
|
|
75
|
+
default: undefined;
|
|
76
|
+
};
|
|
73
77
|
/** 保留表头的零行业务结果;不改变计划和导出内容。 */
|
|
74
78
|
emptyState: {
|
|
75
79
|
type: PropType<boolean | ReportEmptyState>;
|
|
@@ -228,6 +232,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
228
232
|
type: PropType<AssetRenderOptions>;
|
|
229
233
|
default: undefined;
|
|
230
234
|
};
|
|
235
|
+
printOptions: {
|
|
236
|
+
type: PropType<ReportPrintOptions>;
|
|
237
|
+
default: undefined;
|
|
238
|
+
};
|
|
231
239
|
/** 保留表头的零行业务结果;不改变计划和导出内容。 */
|
|
232
240
|
emptyState: {
|
|
233
241
|
type: PropType<boolean | ReportEmptyState>;
|
|
@@ -301,6 +309,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
301
309
|
showPdfWindow: boolean;
|
|
302
310
|
showSettings: boolean;
|
|
303
311
|
showParams: boolean;
|
|
312
|
+
printOptions: ReportPrintOptions;
|
|
304
313
|
toolbar: MachReportToolbarOptions;
|
|
305
314
|
interaction: ReportInteractionOptions;
|
|
306
315
|
preferences: ReportPreferencesOptions;
|
|
@@ -469,7 +478,7 @@ declare interface AssetRenderOptions extends OutputDiagnosticOptions {
|
|
|
469
478
|
signal?: AbortSignal;
|
|
470
479
|
}
|
|
471
480
|
/** 供 HTML/Word 导出的完整文档;打印路径逐页渲染,避免预先生成所有页。 */
|
|
472
|
-
export declare function buildPrintDocument(p: RenderPlan): PrintHtmlResult;
|
|
481
|
+
export declare function buildPrintDocument(p: RenderPlan, options?: ReportPrintOptions): PrintHtmlResult;
|
|
473
482
|
export declare function buildWordHtml(p: RenderPlan): {
|
|
474
483
|
html: string;
|
|
475
484
|
filename: string;
|
|
@@ -722,6 +731,8 @@ export declare function createFetchRequest(options?: FetchRequestOptions): HostR
|
|
|
722
731
|
* 用于本地预览、离线场景和单测。
|
|
723
732
|
*/
|
|
724
733
|
export declare function createLocalFetcher(entries: Record<string, LocalTemplateEntry> | ReportRegistry): PlanFetcher;
|
|
734
|
+
/** Independent physical test page. Its ruler is measured in millimetres, never CSS pixels. */
|
|
735
|
+
export declare function createPrintCalibrationPlan(widthMm: number, heightMm: number): RenderPlan_2;
|
|
725
736
|
/** Explicit persistence bridge. Merely registering ReportProvider never enables editing or saving. */
|
|
726
737
|
export declare function createProviderEditing(provider: ReportProvider, options: ProviderEditingOptions): ReportEditingOptions;
|
|
727
738
|
/** Optional browser convenience adapter. Access errors are handled by the preview. */
|
|
@@ -740,6 +751,7 @@ declare interface DatasetValidationOptions {
|
|
|
740
751
|
}
|
|
741
752
|
export declare const DEFAULT_CALCULATION_MESSAGES: ReportCalculationMessages;
|
|
742
753
|
export declare const DEFAULT_MESSAGES: MachReportMessages;
|
|
754
|
+
export declare const DEFAULT_PRINT_MESSAGES: Required<ReportPrintMessages>;
|
|
743
755
|
export declare const DEFAULT_THEME: MachReportTheme;
|
|
744
756
|
export declare interface DefaultPdfExporterOptions {
|
|
745
757
|
/** 中文字体 URL(浏览器 fetch);空串跳过字体加载(西文报表) */
|
|
@@ -1367,6 +1379,7 @@ export declare interface MachReportController {
|
|
|
1367
1379
|
}
|
|
1368
1380
|
/** defaults 层可配置项(全部可选,均有内置缺省) */
|
|
1369
1381
|
export declare interface MachReportDefaults {
|
|
1382
|
+
printOptions?: ReportPrintOptions;
|
|
1370
1383
|
showExport?: boolean;
|
|
1371
1384
|
showPrint?: boolean;
|
|
1372
1385
|
showPdfWindow?: boolean;
|
|
@@ -1449,7 +1462,7 @@ export declare type MachReportLogger = Pick<Console, "warn" | "info">;
|
|
|
1449
1462
|
* - 优先级:组件 props > 路由级叠加 > preset > defaults(props 永远最高)
|
|
1450
1463
|
*/
|
|
1451
1464
|
/** 工具栏与状态文案(默认简体中文;出海场景覆写) */
|
|
1452
|
-
export declare interface MachReportMessages extends Partial<ReportCalculationMessages
|
|
1465
|
+
export declare interface MachReportMessages extends Partial<ReportCalculationMessages>, ReportPrintMessages {
|
|
1453
1466
|
exportMenu?: string;
|
|
1454
1467
|
exportMenuDescription?: string;
|
|
1455
1468
|
clearSearch?: string;
|
|
@@ -1460,6 +1473,13 @@ export declare interface MachReportMessages extends Partial<ReportCalculationMes
|
|
|
1460
1473
|
pageJumpHint?: string;
|
|
1461
1474
|
pagination?: string;
|
|
1462
1475
|
recordNavigation?: string;
|
|
1476
|
+
dataExplanation?: string;
|
|
1477
|
+
dataExplanationHint?: string;
|
|
1478
|
+
dataExplanationSearch?: string;
|
|
1479
|
+
dataExplanationEmpty?: string;
|
|
1480
|
+
dataMissingSource?: string;
|
|
1481
|
+
dataNotApplicable?: string;
|
|
1482
|
+
dataNotCalculable?: string;
|
|
1463
1483
|
recordInfo?: string;
|
|
1464
1484
|
prevRecord?: string;
|
|
1465
1485
|
nextRecord?: string;
|
|
@@ -1978,6 +1998,18 @@ declare interface PlanPage {
|
|
|
1978
1998
|
marginRightMm?: number;
|
|
1979
1999
|
components: PlanComponent[];
|
|
1980
2000
|
}
|
|
2001
|
+
declare interface PlanPage_2 {
|
|
2002
|
+
meta?: Record<string, unknown>;
|
|
2003
|
+
/** wide 表示完整自然列宽;页面仅为预览的垂直窗口分段。 */
|
|
2004
|
+
layout?: "page" | "wide";
|
|
2005
|
+
pageWidthMm: number;
|
|
2006
|
+
pageHeightMm: number;
|
|
2007
|
+
marginTopMm?: number;
|
|
2008
|
+
marginBottomMm?: number;
|
|
2009
|
+
marginLeftMm?: number;
|
|
2010
|
+
marginRightMm?: number;
|
|
2011
|
+
components: PlanComponent_2[];
|
|
2012
|
+
}
|
|
1981
2013
|
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
1982
2014
|
declare interface PlanTableFragment {
|
|
1983
2015
|
/** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
|
|
@@ -2026,6 +2058,12 @@ declare interface PlanTableFragment_3 {
|
|
|
2026
2058
|
rowKey?: string | number;
|
|
2027
2059
|
};
|
|
2028
2060
|
}
|
|
2061
|
+
/** Bounded concurrency, one stage timeout, and cancellation even for a hanging decoder. */
|
|
2062
|
+
export declare function preparePrintResources(doc: Document, options?: ReportPrintOptions, signal?: AbortSignal, base?: string): Promise<void>;
|
|
2063
|
+
export declare function printCalibration(options?: ReportPrintOptions): {
|
|
2064
|
+
x: number;
|
|
2065
|
+
y: number;
|
|
2066
|
+
};
|
|
2029
2067
|
declare interface PrintHtmlResult {
|
|
2030
2068
|
head: string;
|
|
2031
2069
|
pageChunks: string[];
|
|
@@ -2038,6 +2076,8 @@ export declare function printPlans(plans: RenderPlan[], options?: {
|
|
|
2038
2076
|
onProgress?: (done: number, total: number) => void;
|
|
2039
2077
|
onError?: (message: string) => void;
|
|
2040
2078
|
signal?: AbortSignal;
|
|
2079
|
+
printOptions?: ReportPrintOptions;
|
|
2080
|
+
messages?: ReportPrintMessages;
|
|
2041
2081
|
}): Promise<void>;
|
|
2042
2082
|
/**
|
|
2043
2083
|
* 路由/布局级响应式叠加:就近提供配置层(如某路由关闭导出按钮)。
|
|
@@ -2059,6 +2099,12 @@ declare interface RenderPlan {
|
|
|
2059
2099
|
requiresRecalculation?: boolean;
|
|
2060
2100
|
pages: PlanPage[];
|
|
2061
2101
|
}
|
|
2102
|
+
declare interface RenderPlan_2 {
|
|
2103
|
+
schemaVersion: string;
|
|
2104
|
+
/** 编辑需要模板重算上下文;跨 Worker/JSON 保留要求,但不声明本地会话可用。 */
|
|
2105
|
+
requiresRecalculation?: boolean;
|
|
2106
|
+
pages: PlanPage_2[];
|
|
2107
|
+
}
|
|
2062
2108
|
export declare const REPORT_EXPORT_FORMATS: readonly ReportExportFormat[];
|
|
2063
2109
|
export declare const REPORT_PREVIEW_TOOLS: readonly [
|
|
2064
2110
|
"search",
|
|
@@ -2228,6 +2274,20 @@ declare interface ReportCellTableIdentity_2 {
|
|
|
2228
2274
|
declare type ReportCellValue = string | number | boolean | null;
|
|
2229
2275
|
declare type ReportCellValue_2 = string | number | boolean | null;
|
|
2230
2276
|
declare type ReportCellValueType = NonNullable<GridCell_2["valueType"]>;
|
|
2277
|
+
declare interface ReportDataTarget {
|
|
2278
|
+
datasetId: string;
|
|
2279
|
+
field: string;
|
|
2280
|
+
rowKey?: string | number;
|
|
2281
|
+
/** Use table identity when the same dataset appears in several tables. */
|
|
2282
|
+
tableId?: string;
|
|
2283
|
+
}
|
|
2284
|
+
declare interface ReportDataTarget_2 {
|
|
2285
|
+
datasetId: string;
|
|
2286
|
+
field: string;
|
|
2287
|
+
rowKey?: string | number;
|
|
2288
|
+
/** Use table identity when the same dataset appears in several tables. */
|
|
2289
|
+
tableId?: string;
|
|
2290
|
+
}
|
|
2231
2291
|
declare interface ReportDefinition {
|
|
2232
2292
|
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
2233
2293
|
template: ReportTemplate_2 | ReportTemplateLoader;
|
|
@@ -2248,6 +2308,9 @@ declare interface ReportDiagnostic {
|
|
|
2248
2308
|
message: string;
|
|
2249
2309
|
path?: string;
|
|
2250
2310
|
severity: "warning" | "error" | "info";
|
|
2311
|
+
/** Optional explanation supplied by the business source, not inferred from blank cells. */
|
|
2312
|
+
valueState?: ReportValueState;
|
|
2313
|
+
target?: ReportDataTarget;
|
|
2251
2314
|
}
|
|
2252
2315
|
export declare type ReportDiscardReason = "reload" | "import" | "replace" | "leave";
|
|
2253
2316
|
declare interface ReportEditBatch {
|
|
@@ -2343,7 +2406,8 @@ declare interface ReportFetchInput extends ReportTaskMonitoring {
|
|
|
2343
2406
|
signal?: AbortSignal;
|
|
2344
2407
|
/** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
|
|
2345
2408
|
onWarning?: (message: string) => void;
|
|
2346
|
-
|
|
2409
|
+
/** Index scopes diagnostics when reports share datasets or a report ID is repeated. */
|
|
2410
|
+
onQueryResult?: (reportId: string, result: ReportQueryResult, reportIndex?: number) => void;
|
|
2347
2411
|
}
|
|
2348
2412
|
declare interface ReportFieldContract {
|
|
2349
2413
|
field: string;
|
|
@@ -2364,6 +2428,7 @@ export declare interface ReportFieldTarget {
|
|
|
2364
2428
|
datasetId?: string;
|
|
2365
2429
|
rowKey?: string | number;
|
|
2366
2430
|
tableId?: string;
|
|
2431
|
+
reportScope?: string;
|
|
2367
2432
|
}
|
|
2368
2433
|
declare interface ReportFlowBand {
|
|
2369
2434
|
/** Exact stable component IDs. Static components use nid, lists use id. */
|
|
@@ -2518,7 +2583,13 @@ export declare interface ReportPreferencesOptions {
|
|
|
2518
2583
|
adapter: ReportPreferencesAdapter;
|
|
2519
2584
|
}
|
|
2520
2585
|
export declare const ReportPreview: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2586
|
+
export declare interface ReportPreviewDataTarget extends ReportDataTarget_2 {
|
|
2587
|
+
/** Added by the query adapter; isolates identical dataset/row/field identities across reports. */
|
|
2588
|
+
reportScope?: string;
|
|
2589
|
+
}
|
|
2521
2590
|
export declare interface ReportPreviewDiagnostic {
|
|
2591
|
+
valueState?: ReportValueState_2;
|
|
2592
|
+
target?: ReportPreviewDataTarget;
|
|
2522
2593
|
code: string;
|
|
2523
2594
|
severity: "warning" | "error" | "info";
|
|
2524
2595
|
message: string;
|
|
@@ -2541,6 +2612,41 @@ export declare interface ReportPreviewTask {
|
|
|
2541
2612
|
}
|
|
2542
2613
|
export declare type ReportPreviewTaskStage = "query" | "validate" | "layout" | "assets" | "import" | "encode" | "download" | "print";
|
|
2543
2614
|
export declare type ReportPreviewTool = "search" | "thumbnails" | "zoom" | ReportExportFormat | "print" | "pdfWindow" | "editing" | "import";
|
|
2615
|
+
export declare interface ReportPrintCalibration {
|
|
2616
|
+
offsetXmm?: number;
|
|
2617
|
+
offsetYmm?: number;
|
|
2618
|
+
}
|
|
2619
|
+
export declare interface ReportPrintFont {
|
|
2620
|
+
/** Same family name used by the template. Sources are trusted application assets. */
|
|
2621
|
+
family: string;
|
|
2622
|
+
source: string;
|
|
2623
|
+
weight?: string;
|
|
2624
|
+
style?: "normal" | "italic" | "oblique";
|
|
2625
|
+
}
|
|
2626
|
+
export declare interface ReportPrintMessages {
|
|
2627
|
+
printPrepareTimeout?: string;
|
|
2628
|
+
printImageFailed?: string;
|
|
2629
|
+
printFontFailed?: string;
|
|
2630
|
+
printPrepareFailed?: string;
|
|
2631
|
+
printCalibration?: string;
|
|
2632
|
+
printOffsetX?: string;
|
|
2633
|
+
printOffsetY?: string;
|
|
2634
|
+
printCalibrationTest?: string;
|
|
2635
|
+
printCalibrationHint?: string;
|
|
2636
|
+
}
|
|
2637
|
+
export declare interface ReportPrintOptions {
|
|
2638
|
+
/** Defaults to 15 seconds for the entire font/image preparation stage. */
|
|
2639
|
+
resourceTimeoutMs?: number;
|
|
2640
|
+
fonts?: readonly ReportPrintFont[];
|
|
2641
|
+
/** Physical translation only; no scaling or mutation of the report data/plan. */
|
|
2642
|
+
calibration?: ReportPrintCalibration;
|
|
2643
|
+
}
|
|
2644
|
+
export declare class ReportPrintResourceError extends Error {
|
|
2645
|
+
readonly kind: "image" | "font" | "timeout" | "config";
|
|
2646
|
+
readonly resource: string | number;
|
|
2647
|
+
readonly code = "print-resource";
|
|
2648
|
+
constructor(kind: "image" | "font" | "timeout" | "config", resource?: string | number);
|
|
2649
|
+
}
|
|
2544
2650
|
/** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
|
|
2545
2651
|
declare interface ReportProvider {
|
|
2546
2652
|
query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
|
|
@@ -2673,6 +2779,10 @@ declare interface ReportTemplateRepeat_3 {
|
|
|
2673
2779
|
}
|
|
2674
2780
|
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
2675
2781
|
export declare const ReportToolbar: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
2782
|
+
/** Optional business explanations never replace raw data or schema validation. */
|
|
2783
|
+
declare type ReportValueState = "missing-source" | "not-applicable" | "not-calculable";
|
|
2784
|
+
/** Optional business explanations never replace raw data or schema validation. */
|
|
2785
|
+
declare type ReportValueState_2 = "missing-source" | "not-applicable" | "not-calculable";
|
|
2676
2786
|
/** 新消息保持可选,旧的完整文案对象也能获得新增能力的默认文案。 */
|
|
2677
2787
|
export declare function resolveCalculationMessages(messages: Partial<ReportCalculationMessages>): ReportCalculationMessages;
|
|
2678
2788
|
export declare function resolveConfig(config: MachReportConfig | null | undefined, presetName?: string): ResolvedConfig;
|
|
@@ -2692,6 +2802,7 @@ export declare type ResolvedConfig = Required<Pick<MachReportDefaults, "showExpo
|
|
|
2692
2802
|
guardChanges: boolean;
|
|
2693
2803
|
beforeDiscard?: ReportBeforeDiscard;
|
|
2694
2804
|
output: ReportOutputOptions;
|
|
2805
|
+
printOptions?: ReportPrintOptions;
|
|
2695
2806
|
};
|
|
2696
2807
|
declare interface RichParagraph {
|
|
2697
2808
|
segments: RichSegment[];
|
|
@@ -2736,6 +2847,7 @@ declare interface RichSegment_3 {
|
|
|
2736
2847
|
style?: ComponentStyle_3;
|
|
2737
2848
|
}
|
|
2738
2849
|
export declare const SILENT_LOGGER: MachReportLogger;
|
|
2850
|
+
export declare function snapshotPrintOptions(options?: ReportPrintOptions): ReportPrintOptions;
|
|
2739
2851
|
/** 条件格式规则求值(声明式,见 ListColumn.rules) */
|
|
2740
2852
|
declare interface StyleRule {
|
|
2741
2853
|
when: {
|
|
@@ -2927,6 +3039,8 @@ export declare function usePageWindow(plan: Ref<RenderPlan | null>, zoom: Ref<nu
|
|
|
2927
3039
|
export declare function usePrintExport(plan: Ref<RenderPlan | null>, hooks: {
|
|
2928
3040
|
/** 按导出开始时的配置快照处理,避免输出过程中跟随路由配置变化。 */
|
|
2929
3041
|
getXlsxOptions?: () => XlsxRenderOptions;
|
|
3042
|
+
getPrintOptions?: () => ReportPrintOptions;
|
|
3043
|
+
getPrintMessages?: () => ReportPrintMessages;
|
|
2930
3044
|
/** Flush the active editor and await source-backed calculation/persistence before capturing the output plan. */
|
|
2931
3045
|
beforeOutput?: () => boolean | Promise<boolean>;
|
|
2932
3046
|
getPdfExporter: () => PdfExporter;
|