@agile-team/mach-report 2.12.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 +27 -3
- 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-B5ClP9tm.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-B612mw0x.js → config-Dt9NtCPl.js} +227 -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 +306 -3
- package/dist/designer.d.ts +306 -3
- package/dist/designer.js +21 -4266
- 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 +182 -1
- package/dist/index.d.ts +182 -1
- package/dist/index.js +728 -628
- package/dist/{template-review-BzpcI-tR.js → json-snapshot-BeFT3Tso.js} +867 -637
- 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-BDTU4D94.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 +713 -453
- 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 +72 -2
- package/dist/vue/async.d.ts +72 -2
- package/dist/vue/index.d.cts +124 -5
- package/dist/vue/index.d.ts +124 -5
- 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-Dc-SDkYA.cjs +0 -1
- package/dist/ReportPreview-DWXROHBP.cjs +0 -6
- package/dist/ReportPreview-DiNXhQI0.js +0 -4138
- 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-BRoLo2oj.cjs +0 -1
- package/dist/plugin-Cd5G2QQn.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-BfCC8Ng9.cjs +0 -2
package/dist/vue/index.d.ts
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;
|
|
@@ -318,8 +327,8 @@ declare const __VLS_component_2: DefineComponent<__VLS_Props, {
|
|
|
318
327
|
focusSearch: () => void;
|
|
319
328
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
320
329
|
export: (format: ReportExportFormat) => any;
|
|
321
|
-
print: () => any;
|
|
322
330
|
zoom: (mode: number | "fit") => any;
|
|
331
|
+
print: () => any;
|
|
323
332
|
goto: (page: number) => any;
|
|
324
333
|
"pdf-window": () => any;
|
|
325
334
|
"search-input": (query: string) => any;
|
|
@@ -330,8 +339,8 @@ declare const __VLS_component_2: DefineComponent<__VLS_Props, {
|
|
|
330
339
|
"settings-toggle": () => any;
|
|
331
340
|
}, string, MachReportVuePublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
332
341
|
onExport?: ((format: ReportExportFormat) => any) | undefined;
|
|
333
|
-
onPrint?: (() => any) | undefined;
|
|
334
342
|
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
343
|
+
onPrint?: (() => any) | undefined;
|
|
335
344
|
onGoto?: ((page: number) => any) | undefined;
|
|
336
345
|
"onPdf-window"?: (() => any) | undefined;
|
|
337
346
|
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
@@ -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;
|
|
@@ -1459,6 +1472,17 @@ export declare interface MachReportMessages extends Partial<ReportCalculationMes
|
|
|
1459
1472
|
pageJumpInvalid?: string;
|
|
1460
1473
|
pageJumpHint?: string;
|
|
1461
1474
|
pagination?: string;
|
|
1475
|
+
recordNavigation?: string;
|
|
1476
|
+
dataExplanation?: string;
|
|
1477
|
+
dataExplanationHint?: string;
|
|
1478
|
+
dataExplanationSearch?: string;
|
|
1479
|
+
dataExplanationEmpty?: string;
|
|
1480
|
+
dataMissingSource?: string;
|
|
1481
|
+
dataNotApplicable?: string;
|
|
1482
|
+
dataNotCalculable?: string;
|
|
1483
|
+
recordInfo?: string;
|
|
1484
|
+
prevRecord?: string;
|
|
1485
|
+
nextRecord?: string;
|
|
1462
1486
|
columnSearchHint?: string;
|
|
1463
1487
|
columnSearchShortcut?: string;
|
|
1464
1488
|
closeColumnDirectory?: string;
|
|
@@ -1974,6 +1998,18 @@ declare interface PlanPage {
|
|
|
1974
1998
|
marginRightMm?: number;
|
|
1975
1999
|
components: PlanComponent[];
|
|
1976
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
|
+
}
|
|
1977
2013
|
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
1978
2014
|
declare interface PlanTableFragment {
|
|
1979
2015
|
/** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
|
|
@@ -2022,6 +2058,12 @@ declare interface PlanTableFragment_3 {
|
|
|
2022
2058
|
rowKey?: string | number;
|
|
2023
2059
|
};
|
|
2024
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
|
+
};
|
|
2025
2067
|
declare interface PrintHtmlResult {
|
|
2026
2068
|
head: string;
|
|
2027
2069
|
pageChunks: string[];
|
|
@@ -2034,6 +2076,8 @@ export declare function printPlans(plans: RenderPlan[], options?: {
|
|
|
2034
2076
|
onProgress?: (done: number, total: number) => void;
|
|
2035
2077
|
onError?: (message: string) => void;
|
|
2036
2078
|
signal?: AbortSignal;
|
|
2079
|
+
printOptions?: ReportPrintOptions;
|
|
2080
|
+
messages?: ReportPrintMessages;
|
|
2037
2081
|
}): Promise<void>;
|
|
2038
2082
|
/**
|
|
2039
2083
|
* 路由/布局级响应式叠加:就近提供配置层(如某路由关闭导出按钮)。
|
|
@@ -2055,6 +2099,12 @@ declare interface RenderPlan {
|
|
|
2055
2099
|
requiresRecalculation?: boolean;
|
|
2056
2100
|
pages: PlanPage[];
|
|
2057
2101
|
}
|
|
2102
|
+
declare interface RenderPlan_2 {
|
|
2103
|
+
schemaVersion: string;
|
|
2104
|
+
/** 编辑需要模板重算上下文;跨 Worker/JSON 保留要求,但不声明本地会话可用。 */
|
|
2105
|
+
requiresRecalculation?: boolean;
|
|
2106
|
+
pages: PlanPage_2[];
|
|
2107
|
+
}
|
|
2058
2108
|
export declare const REPORT_EXPORT_FORMATS: readonly ReportExportFormat[];
|
|
2059
2109
|
export declare const REPORT_PREVIEW_TOOLS: readonly [
|
|
2060
2110
|
"search",
|
|
@@ -2224,6 +2274,20 @@ declare interface ReportCellTableIdentity_2 {
|
|
|
2224
2274
|
declare type ReportCellValue = string | number | boolean | null;
|
|
2225
2275
|
declare type ReportCellValue_2 = string | number | boolean | null;
|
|
2226
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
|
+
}
|
|
2227
2291
|
declare interface ReportDefinition {
|
|
2228
2292
|
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
2229
2293
|
template: ReportTemplate_2 | ReportTemplateLoader;
|
|
@@ -2244,6 +2308,9 @@ declare interface ReportDiagnostic {
|
|
|
2244
2308
|
message: string;
|
|
2245
2309
|
path?: string;
|
|
2246
2310
|
severity: "warning" | "error" | "info";
|
|
2311
|
+
/** Optional explanation supplied by the business source, not inferred from blank cells. */
|
|
2312
|
+
valueState?: ReportValueState;
|
|
2313
|
+
target?: ReportDataTarget;
|
|
2247
2314
|
}
|
|
2248
2315
|
export declare type ReportDiscardReason = "reload" | "import" | "replace" | "leave";
|
|
2249
2316
|
declare interface ReportEditBatch {
|
|
@@ -2339,7 +2406,8 @@ declare interface ReportFetchInput extends ReportTaskMonitoring {
|
|
|
2339
2406
|
signal?: AbortSignal;
|
|
2340
2407
|
/** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
|
|
2341
2408
|
onWarning?: (message: string) => void;
|
|
2342
|
-
|
|
2409
|
+
/** Index scopes diagnostics when reports share datasets or a report ID is repeated. */
|
|
2410
|
+
onQueryResult?: (reportId: string, result: ReportQueryResult, reportIndex?: number) => void;
|
|
2343
2411
|
}
|
|
2344
2412
|
declare interface ReportFieldContract {
|
|
2345
2413
|
field: string;
|
|
@@ -2360,6 +2428,7 @@ export declare interface ReportFieldTarget {
|
|
|
2360
2428
|
datasetId?: string;
|
|
2361
2429
|
rowKey?: string | number;
|
|
2362
2430
|
tableId?: string;
|
|
2431
|
+
reportScope?: string;
|
|
2363
2432
|
}
|
|
2364
2433
|
declare interface ReportFlowBand {
|
|
2365
2434
|
/** Exact stable component IDs. Static components use nid, lists use id. */
|
|
@@ -2514,7 +2583,13 @@ export declare interface ReportPreferencesOptions {
|
|
|
2514
2583
|
adapter: ReportPreferencesAdapter;
|
|
2515
2584
|
}
|
|
2516
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
|
+
}
|
|
2517
2590
|
export declare interface ReportPreviewDiagnostic {
|
|
2591
|
+
valueState?: ReportValueState_2;
|
|
2592
|
+
target?: ReportPreviewDataTarget;
|
|
2518
2593
|
code: string;
|
|
2519
2594
|
severity: "warning" | "error" | "info";
|
|
2520
2595
|
message: string;
|
|
@@ -2537,6 +2612,41 @@ export declare interface ReportPreviewTask {
|
|
|
2537
2612
|
}
|
|
2538
2613
|
export declare type ReportPreviewTaskStage = "query" | "validate" | "layout" | "assets" | "import" | "encode" | "download" | "print";
|
|
2539
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
|
+
}
|
|
2540
2650
|
/** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
|
|
2541
2651
|
declare interface ReportProvider {
|
|
2542
2652
|
query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
|
|
@@ -2669,6 +2779,10 @@ declare interface ReportTemplateRepeat_3 {
|
|
|
2669
2779
|
}
|
|
2670
2780
|
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
2671
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";
|
|
2672
2786
|
/** 新消息保持可选,旧的完整文案对象也能获得新增能力的默认文案。 */
|
|
2673
2787
|
export declare function resolveCalculationMessages(messages: Partial<ReportCalculationMessages>): ReportCalculationMessages;
|
|
2674
2788
|
export declare function resolveConfig(config: MachReportConfig | null | undefined, presetName?: string): ResolvedConfig;
|
|
@@ -2688,6 +2802,7 @@ export declare type ResolvedConfig = Required<Pick<MachReportDefaults, "showExpo
|
|
|
2688
2802
|
guardChanges: boolean;
|
|
2689
2803
|
beforeDiscard?: ReportBeforeDiscard;
|
|
2690
2804
|
output: ReportOutputOptions;
|
|
2805
|
+
printOptions?: ReportPrintOptions;
|
|
2691
2806
|
};
|
|
2692
2807
|
declare interface RichParagraph {
|
|
2693
2808
|
segments: RichSegment[];
|
|
@@ -2732,6 +2847,7 @@ declare interface RichSegment_3 {
|
|
|
2732
2847
|
style?: ComponentStyle_3;
|
|
2733
2848
|
}
|
|
2734
2849
|
export declare const SILENT_LOGGER: MachReportLogger;
|
|
2850
|
+
export declare function snapshotPrintOptions(options?: ReportPrintOptions): ReportPrintOptions;
|
|
2735
2851
|
/** 条件格式规则求值(声明式,见 ListColumn.rules) */
|
|
2736
2852
|
declare interface StyleRule {
|
|
2737
2853
|
when: {
|
|
@@ -2916,12 +3032,15 @@ export declare function usePageWindow(plan: Ref<RenderPlan | null>, zoom: Ref<nu
|
|
|
2916
3032
|
}[]>;
|
|
2917
3033
|
makeScrollHandler: (currentPage: Ref<number>, pageCount: Ref<number>) => (vp: HTMLElement) => void;
|
|
2918
3034
|
refreshViewport: (vp: HTMLElement | null) => void;
|
|
3035
|
+
scrollToPage: (vp: HTMLElement, index: number) => void;
|
|
2919
3036
|
pageOffsetPx: (index: number) => number;
|
|
2920
3037
|
destroy: () => void;
|
|
2921
3038
|
};
|
|
2922
3039
|
export declare function usePrintExport(plan: Ref<RenderPlan | null>, hooks: {
|
|
2923
3040
|
/** 按导出开始时的配置快照处理,避免输出过程中跟随路由配置变化。 */
|
|
2924
3041
|
getXlsxOptions?: () => XlsxRenderOptions;
|
|
3042
|
+
getPrintOptions?: () => ReportPrintOptions;
|
|
3043
|
+
getPrintMessages?: () => ReportPrintMessages;
|
|
2925
3044
|
/** Flush the active editor and await source-backed calculation/persistence before capturing the output plan. */
|
|
2926
3045
|
beforeOutput?: () => boolean | Promise<boolean>;
|
|
2927
3046
|
getPdfExporter: () => PdfExporter;
|
package/dist/vue-async.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-CktLH_Iy.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-CvbqLUzM.cjs")).then(e=>e.ReportPreview$1)}const t={install(e,o={}){r.machReportPlugin.install(e,o)}};exports.MachReportPreview=r.MachReportPreview;exports.default=t;exports.machReportAsyncPlugin=t;exports.preloadMachReport=i;
|
package/dist/vue-async.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import { M as l } from "./plugin-
|
|
1
|
+
import { m as o } from "./plugin-BGKf-Tqg.js";
|
|
2
|
+
import { M as l } from "./plugin-BGKf-Tqg.js";
|
|
3
3
|
function a() {
|
|
4
|
-
return import("./ReportPreview-
|
|
4
|
+
return import("./ReportPreview-D_ywJ_-H.js").then((t) => t.s);
|
|
5
5
|
}
|
|
6
6
|
const n = {
|
|
7
|
-
install(t,
|
|
8
|
-
|
|
7
|
+
install(t, r = {}) {
|
|
8
|
+
o.install(t, r);
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
11
|
export {
|
package/dist/vue.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@agile-team/mach-report"),i=require("./ReportPreview-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@agile-team/mach-report"),i=require("./ReportPreview-CvbqLUzM.cjs"),a=require("./config-0UIohTS7.cjs"),f=require("./injection-keys-Db_DyLkm.cjs"),C=require("./plugin-CktLH_Iy.cjs"),h=require("vue"),M=require("./data-explanation-BktvER5B.cjs");function v(r){const e=E.createReportSource(r),o=async t=>{if(t.reportIds.length===0)throw new i.PlanLoadError("缺少报表 ID");for(const n of t.reportIds)if(!Object.prototype.hasOwnProperty.call(r,n)||!r[n])throw new i.PlanLoadError(`本地模板 ${n} 不存在`);return e(t)};return o.getParamDefs=e.getParamDefs,o}const A=Object.freeze({loading:!1,hasPlan:!1,pageCount:0,currentPage:1,exporting:null,printing:!1,canExport:!1,canPrint:!1,error:null,pdfFont:Object.freeze({status:"unchecked",fontUrl:""})});function I(){const r=h.shallowRef(null),e=()=>r.value?.state??A,o=Object.freeze({get loading(){return e().loading},get hasPlan(){return e().hasPlan},get pageCount(){return e().pageCount},get currentPage(){return e().currentPage},get exporting(){return e().exporting},get printing(){return e().printing},get canExport(){return e().canExport},get canPrint(){return e().canPrint},get error(){return e().error},get pdfFont(){return e().pdfFont},get editing(){return e().editing??!1},get saving(){return e().saving??!1},get importing(){return e().importing??!1},get dirty(){return e().dirty??!1},get pendingLocalChanges(){return e().pendingLocalChanges??!1},get task(){return e().task??null},get diagnostics(){return e().diagnostics??[]},get reportIds(){return e().reportIds??[]},get params(){return e().params??{}},get canUndo(){return e().canUndo??!1},get canRedo(){return e().canRedo??!1},get changeCount(){return e().changeCount??0},get selection(){return e().selection??null}});function t(){if(!r.value)throw new a.MachReportError("config","报表预览尚未挂载,请在 ready 后调用控制器");return r.value}return{ref(n){const s=n;r.value=s&&typeof s.reload=="function"&&typeof s.print=="function"&&typeof s.exportAs=="function"&&typeof s.openPdfWindow=="function"&&typeof s.gotoPage=="function"&&typeof s.setParams=="function"?s:null},ready:h.computed(()=>r.value!==null),state:o,async checkPdfFont(){const n=t();return n.checkPdfFont?n.checkPdfFont():{status:"unverified",fontUrl:"",message:"旧自定义控制器未提供字体检查,请由宿主确认字体配置"}},cancelTask(){t().cancelTask?.()},async confirmDiscard(n){return await t().confirmDiscard?.(n)??!0},getOutputDiagnostics(n){return t().getOutputDiagnostics?.(n)??[]},async reload(){await t().reload()},async print(){await t().print()},async exportAs(n){await t().exportAs(n)},openPdfWindow(){t().openPdfWindow()},gotoPage(n){t().gotoPage(n)},async setParams(n,s){await t().setParams(n,s)},async importExcel(n,s){const g=t();if(!g.importExcel)throw new a.MachReportError("config","旧自定义控制器未提供 Excel 导入");return g.importExcel(n,s)},getPlan(){return t().getPlan?.()??null},getChanges(){return t().getChanges?.()??[]},getDifferences:()=>t().getDifferences?.()??[],undo:async()=>await t().undo?.()??!1,redo:async()=>await t().redo?.()??!1,restoreChanges:async()=>await t().restoreChanges?.()??!1,getSelection:()=>t().getSelection?.()??null,focusCell:async(n,s)=>await t().focusCell?.(n,s)??!1,focusField:async n=>await t().focusField?.(n)??!1,copySelection:()=>t().copySelection?.()??"",pasteSelection:async n=>await t().pasteSelection?.(n)??!1}}function L(){return h.inject(f.MACH_REPORT_CONTROLLER_KEY,null)}function T(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}function D(r){return Array.isArray(r)&&r.every(e=>T(e)&&typeof e.code=="string"&&typeof e.message=="string"&&["info","warning","error"].includes(e.severity)&&(e.path===void 0||typeof e.path=="string")&&M.hasValidDataExplanation(e))}function x(r,e){return Array.isArray(r)&&r.every(o=>T(o)&&Number.isSafeInteger(o.editIndex)&&o.editIndex>=0&&o.editIndex<e&&typeof o.code=="string"&&typeof o.message=="string")}function F(r,e){let o;if(!T(r)||typeof r.revision!="string"||!r.revision.trim()?o="非空 revision(请先在适配器解包业务响应)":r.sourceToken!==void 0&&typeof r.sourceToken!="string"?o="字符串 sourceToken":r.diagnostics!==void 0&&!D(r.diagnostics)?o="结构化 diagnostics":r.conflicts!==void 0&&!x(r.conflicts,e)&&(o="有效 editIndex/code/message conflicts"),o)throw new a.MachReportError("edit",`ReportProvider.save 必须返回${o};服务器可能已提交,请重新查询确认后再编辑`)}function _(r){return typeof r=="function"?r():r}function b(r,e){const o=new Set(r.flatMap(t=>t.source?.[e]===void 0?[]:[String(t.source[e])]));return o.size===1?[...o][0]:void 0}function y(r,e,o,t){return typeof r=="function"?r():b(e,o)??t??r}function q(r){return r.requestId??globalThis.crypto?.randomUUID?.()??`mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function k(r,e){if(!r.save)throw new a.MachReportError("config","ReportProvider.save 未配置,无法启用业务保存");let o="",t,n,s=0;function g(c,u,p){c.conflicts?.length||u!==o||p!==s||(t=c.revision,n=c.sourceToken)}async function m(c,u){if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");const p=_(e.reportId),O={..._(e.params??{})},R=JSON.stringify([p,O]),w=++s;if(R!==o&&(o=R,t=void 0,n=void 0),e.requireSource!==!1&&c.edits.some(l=>!l.source))throw new E.ReportCellEditError("missing");const d=await r.save({reportId:p,params:O,signal:u.signal,requestId:c.requestId,action:u.action,edits:i.cloneReportSnapshot(c.edits),expectedRevision:y(e.expectedRevision,c.edits,"revision",t),sourceToken:y(e.sourceToken,c.edits,"sourceToken",n)});if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");F(d,c.edits.length),d.diagnostics?.forEach(l=>e.onDiagnostic?.(l));const P=d.diagnostics?.filter(l=>l.severity==="error");if(P?.length)throw new a.MachReportError("edit",P.map(l=>l.message).join(";"),{diagnostics:P});const S=d.conflicts?.map(l=>({source:c.edits[l.editIndex]?.source,address:c.edits[l.editIndex]?.address,message:l.message}));return g(d,R,w),{revision:d.revision,sourceToken:d.sourceToken,conflicts:S}}return{requireSource:e.requireSource??!0,canEdit:e.canEdit,validate:e.validate,saveBatch:m,save:(c,u)=>m({requestId:q(u),edits:[i.cloneReportSnapshot(c)]},u)}}exports.PlanLoadError=i.PlanLoadError;exports.REPORT_EXPORT_FORMATS=i.REPORT_EXPORT_FORMATS;exports.REPORT_PREVIEW_TOOLS=i.REPORT_PREVIEW_TOOLS;exports.ReportPagination=i.ReportPagination;exports.ReportPreview=i.ReportPreview;exports.ReportPrintResourceError=i.ReportPrintResourceError;exports.ReportToolbar=i.ReportToolbar;exports.buildPrintDocument=i.buildPrintDocument;exports.buildWordHtml=i.buildWordHtml;exports.createDefaultPdfExporter=i.createDefaultPdfExporter;exports.createFetchRequest=i.createFetchRequest;exports.createPrintCalibrationPlan=i.createPrintCalibrationPlan;exports.createReportStoragePreferences=i.createReportStoragePreferences;exports.joinReportIds=i.joinReportIds;exports.normalizeReportIds=i.normalizeReportIds;exports.preparePrintResources=i.preparePrintResources;exports.printPlans=i.printPlans;exports.usePageWindow=i.usePageWindow;exports.usePrintExport=i.usePrintExport;exports.useZoom=i.useZoom;exports.DEFAULT_CALCULATION_MESSAGES=a.DEFAULT_CALCULATION_MESSAGES;exports.DEFAULT_MESSAGES=a.DEFAULT_MESSAGES;exports.DEFAULT_PRINT_MESSAGES=a.DEFAULT_PRINT_MESSAGES;exports.DEFAULT_THEME=a.DEFAULT_THEME;exports.MachReportError=a.MachReportError;exports.ReportParamPanel=a.ReportParamPanel;exports.SILENT_LOGGER=a.SILENT_LOGGER;exports.defineMachReportConfig=a.defineMachReportConfig;exports.defineMachReportPreset=a.defineMachReportPreset;exports.normalizeReportLoadError=a.normalizeReportLoadError;exports.printCalibration=a.printCalibration;exports.provideMachReportConfig=a.provideMachReportConfig;exports.resolveCalculationMessages=a.resolveCalculationMessages;exports.resolveConfig=a.resolveConfig;exports.snapshotPrintOptions=a.snapshotPrintOptions;exports.themeToCssVars=a.themeToCssVars;exports.toErrorDetail=a.toErrorDetail;exports.useMachReportConfig=a.useMachReportConfig;exports.MACH_REPORT_CONFIG_KEY=f.MACH_REPORT_CONFIG_KEY;exports.MACH_REPORT_CONTROLLER_KEY=f.MACH_REPORT_CONTROLLER_KEY;exports.MACH_REPORT_FETCHER_KEY=f.MACH_REPORT_FETCHER_KEY;exports.MACH_REPORT_PDF_EXPORTER_KEY=f.MACH_REPORT_PDF_EXPORTER_KEY;exports.MachReportPreview=C.MachReportPreview;exports.machReportPlugin=C.machReportPlugin;exports.createLocalFetcher=v;exports.createProviderEditing=k;exports.useMachReport=I;exports.useReportPreview=L;Object.keys(E).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(exports,r)&&Object.defineProperty(exports,r,{enumerable:!0,get:()=>E[r]})});
|
package/dist/vue.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { createReportSource as
|
|
1
|
+
import { createReportSource as v, ReportCellEditError as x } from "@agile-team/mach-report";
|
|
2
2
|
export * from "@agile-team/mach-report";
|
|
3
|
-
import { P as R, c as
|
|
4
|
-
import { R as
|
|
5
|
-
import { M as u } from "./config-
|
|
6
|
-
import { D as
|
|
3
|
+
import { P as R, c as h } from "./ReportPreview-D_ywJ_-H.js";
|
|
4
|
+
import { R as B, a as J, b as Z, d as Q, e as ee, f as re, g as te, h as ne, i as oe, j as se, k as ae, l as ie, m as ce, n as fe, p as ue, o as de, u as ge, q as le, r as pe } from "./ReportPreview-D_ywJ_-H.js";
|
|
5
|
+
import { M as u } from "./config-Dt9NtCPl.js";
|
|
6
|
+
import { D as Pe, a as Ee, b as Re, c as he, R as we, S as ye, d as Te, e as Se, n as ve, p as xe, f as Ce, r as Ae, g as Ie, s as Oe, t as Me, h as _e, u as De } from "./config-Dt9NtCPl.js";
|
|
7
7
|
import { M as C } from "./injection-keys-e85udZCp.js";
|
|
8
|
-
import { a as
|
|
9
|
-
import { M as
|
|
10
|
-
import { shallowRef as
|
|
8
|
+
import { a as Fe, b as Le, c as be } from "./injection-keys-e85udZCp.js";
|
|
9
|
+
import { M as Ue, m as je } from "./plugin-BGKf-Tqg.js";
|
|
10
|
+
import { shallowRef as A, computed as I, inject as O } from "vue";
|
|
11
|
+
import { h as M } from "./data-explanation-C_J6jYNi.js";
|
|
11
12
|
function z(r) {
|
|
12
|
-
const e =
|
|
13
|
+
const e = v(r), o = async (t) => {
|
|
13
14
|
if (t.reportIds.length === 0) throw new R("缺少报表 ID");
|
|
14
15
|
for (const n of t.reportIds)
|
|
15
16
|
if (!Object.prototype.hasOwnProperty.call(r, n) || !r[n])
|
|
@@ -18,7 +19,7 @@ function z(r) {
|
|
|
18
19
|
};
|
|
19
20
|
return o.getParamDefs = e.getParamDefs, o;
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
+
const _ = Object.freeze({
|
|
22
23
|
loading: !1,
|
|
23
24
|
hasPlan: !1,
|
|
24
25
|
pageCount: 0,
|
|
@@ -30,8 +31,8 @@ const M = Object.freeze({
|
|
|
30
31
|
error: null,
|
|
31
32
|
pdfFont: Object.freeze({ status: "unchecked", fontUrl: "" })
|
|
32
33
|
});
|
|
33
|
-
function
|
|
34
|
-
const r =
|
|
34
|
+
function W() {
|
|
35
|
+
const r = A(null), e = () => r.value?.state ?? _, o = Object.freeze({
|
|
35
36
|
get loading() {
|
|
36
37
|
return e().loading;
|
|
37
38
|
},
|
|
@@ -112,7 +113,7 @@ function G() {
|
|
|
112
113
|
const s = n;
|
|
113
114
|
r.value = s && typeof s.reload == "function" && typeof s.print == "function" && typeof s.exportAs == "function" && typeof s.openPdfWindow == "function" && typeof s.gotoPage == "function" && typeof s.setParams == "function" ? s : null;
|
|
114
115
|
},
|
|
115
|
-
ready:
|
|
116
|
+
ready: I(() => r.value !== null),
|
|
116
117
|
state: o,
|
|
117
118
|
async checkPdfFont() {
|
|
118
119
|
const n = t();
|
|
@@ -167,36 +168,36 @@ function G() {
|
|
|
167
168
|
pasteSelection: async (n) => await t().pasteSelection?.(n) ?? !1
|
|
168
169
|
};
|
|
169
170
|
}
|
|
170
|
-
function
|
|
171
|
+
function Y() {
|
|
171
172
|
return O(C, null);
|
|
172
173
|
}
|
|
173
174
|
function m(r) {
|
|
174
175
|
return !!r && typeof r == "object" && !Array.isArray(r);
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
-
return Array.isArray(r) && r.every((e) => m(e) && typeof e.code == "string" && typeof e.message == "string" && ["info", "warning", "error"].includes(e.severity) && (e.path === void 0 || typeof e.path == "string"));
|
|
177
|
+
function D(r) {
|
|
178
|
+
return Array.isArray(r) && r.every((e) => m(e) && typeof e.code == "string" && typeof e.message == "string" && ["info", "warning", "error"].includes(e.severity) && (e.path === void 0 || typeof e.path == "string") && M(e));
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
+
function k(r, e) {
|
|
180
181
|
return Array.isArray(r) && r.every((o) => m(o) && Number.isSafeInteger(o.editIndex) && o.editIndex >= 0 && o.editIndex < e && typeof o.code == "string" && typeof o.message == "string");
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
+
function F(r, e) {
|
|
183
184
|
let o;
|
|
184
|
-
if (!m(r) || typeof r.revision != "string" || !r.revision.trim() ? o = "非空 revision(请先在适配器解包业务响应)" : r.sourceToken !== void 0 && typeof r.sourceToken != "string" ? o = "字符串 sourceToken" : r.diagnostics !== void 0 && !
|
|
185
|
+
if (!m(r) || typeof r.revision != "string" || !r.revision.trim() ? o = "非空 revision(请先在适配器解包业务响应)" : r.sourceToken !== void 0 && typeof r.sourceToken != "string" ? o = "字符串 sourceToken" : r.diagnostics !== void 0 && !D(r.diagnostics) ? o = "结构化 diagnostics" : r.conflicts !== void 0 && !k(r.conflicts, e) && (o = "有效 editIndex/code/message conflicts"), o) throw new u("edit", `ReportProvider.save 必须返回${o};服务器可能已提交,请重新查询确认后再编辑`);
|
|
185
186
|
}
|
|
186
|
-
function
|
|
187
|
+
function w(r) {
|
|
187
188
|
return typeof r == "function" ? r() : r;
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
+
function L(r, e) {
|
|
190
191
|
const o = new Set(r.flatMap((t) => t.source?.[e] === void 0 ? [] : [String(t.source[e])]));
|
|
191
192
|
return o.size === 1 ? [...o][0] : void 0;
|
|
192
193
|
}
|
|
193
|
-
function
|
|
194
|
-
return typeof r == "function" ? r() :
|
|
194
|
+
function y(r, e, o, t) {
|
|
195
|
+
return typeof r == "function" ? r() : L(e, o) ?? t ?? r;
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function b(r) {
|
|
197
198
|
return r.requestId ?? globalThis.crypto?.randomUUID?.() ?? `mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
198
199
|
}
|
|
199
|
-
function
|
|
200
|
+
function K(r, e) {
|
|
200
201
|
if (!r.save) throw new u("config", "ReportProvider.save 未配置,无法启用业务保存");
|
|
201
202
|
let o = "", t, n, s = 0;
|
|
202
203
|
function d(a, i, g) {
|
|
@@ -204,7 +205,7 @@ function W(r, e) {
|
|
|
204
205
|
}
|
|
205
206
|
async function P(a, i) {
|
|
206
207
|
if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
207
|
-
const g =
|
|
208
|
+
const g = w(e.reportId), E = { ...w(e.params ?? {}) }, l = JSON.stringify([g, E]), T = ++s;
|
|
208
209
|
if (l !== o && (o = l, t = void 0, n = void 0), e.requireSource !== !1 && a.edits.some((c) => !c.source)) throw new x("missing");
|
|
209
210
|
const f = await r.save({
|
|
210
211
|
reportId: g,
|
|
@@ -212,66 +213,72 @@ function W(r, e) {
|
|
|
212
213
|
signal: i.signal,
|
|
213
214
|
requestId: a.requestId,
|
|
214
215
|
action: i.action,
|
|
215
|
-
edits:
|
|
216
|
-
expectedRevision:
|
|
217
|
-
sourceToken:
|
|
216
|
+
edits: h(a.edits),
|
|
217
|
+
expectedRevision: y(e.expectedRevision, a.edits, "revision", t),
|
|
218
|
+
sourceToken: y(e.sourceToken, a.edits, "sourceToken", n)
|
|
218
219
|
});
|
|
219
220
|
if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
220
|
-
|
|
221
|
+
F(f, a.edits.length), f.diagnostics?.forEach((c) => e.onDiagnostic?.(c));
|
|
221
222
|
const p = f.diagnostics?.filter((c) => c.severity === "error");
|
|
222
223
|
if (p?.length) throw new u("edit", p.map((c) => c.message).join(";"), { diagnostics: p });
|
|
223
|
-
const
|
|
224
|
-
return d(f, l, T), { revision: f.revision, sourceToken: f.sourceToken, conflicts:
|
|
224
|
+
const S = f.conflicts?.map((c) => ({ source: a.edits[c.editIndex]?.source, address: a.edits[c.editIndex]?.address, message: c.message }));
|
|
225
|
+
return d(f, l, T), { revision: f.revision, sourceToken: f.sourceToken, conflicts: S };
|
|
225
226
|
}
|
|
226
227
|
return {
|
|
227
228
|
requireSource: e.requireSource ?? !0,
|
|
228
229
|
canEdit: e.canEdit,
|
|
229
230
|
validate: e.validate,
|
|
230
231
|
saveBatch: P,
|
|
231
|
-
save: (a, i) => P({ requestId:
|
|
232
|
+
save: (a, i) => P({ requestId: b(i), edits: [h(a)] }, i)
|
|
232
233
|
};
|
|
233
234
|
}
|
|
234
235
|
export {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
Pe as DEFAULT_CALCULATION_MESSAGES,
|
|
237
|
+
Ee as DEFAULT_MESSAGES,
|
|
238
|
+
Re as DEFAULT_PRINT_MESSAGES,
|
|
239
|
+
he as DEFAULT_THEME,
|
|
240
|
+
Fe as MACH_REPORT_CONFIG_KEY,
|
|
239
241
|
C as MACH_REPORT_CONTROLLER_KEY,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
+
Le as MACH_REPORT_FETCHER_KEY,
|
|
243
|
+
be as MACH_REPORT_PDF_EXPORTER_KEY,
|
|
242
244
|
u as MachReportError,
|
|
243
|
-
|
|
245
|
+
Ue as MachReportPreview,
|
|
244
246
|
R as PlanLoadError,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
247
|
+
B as REPORT_EXPORT_FORMATS,
|
|
248
|
+
J as REPORT_PREVIEW_TOOLS,
|
|
249
|
+
Z as ReportPagination,
|
|
250
|
+
we as ReportParamPanel,
|
|
251
|
+
Q as ReportPreview,
|
|
252
|
+
ee as ReportPrintResourceError,
|
|
253
|
+
re as ReportToolbar,
|
|
254
|
+
ye as SILENT_LOGGER,
|
|
255
|
+
te as buildPrintDocument,
|
|
256
|
+
ne as buildWordHtml,
|
|
257
|
+
oe as createDefaultPdfExporter,
|
|
258
|
+
se as createFetchRequest,
|
|
256
259
|
z as createLocalFetcher,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
260
|
+
ae as createPrintCalibrationPlan,
|
|
261
|
+
K as createProviderEditing,
|
|
262
|
+
ie as createReportStoragePreferences,
|
|
263
|
+
Te as defineMachReportConfig,
|
|
264
|
+
Se as defineMachReportPreset,
|
|
265
|
+
ce as joinReportIds,
|
|
266
|
+
je as machReportPlugin,
|
|
267
|
+
fe as normalizeReportIds,
|
|
268
|
+
ve as normalizeReportLoadError,
|
|
269
|
+
ue as preparePrintResources,
|
|
270
|
+
xe as printCalibration,
|
|
271
|
+
de as printPlans,
|
|
272
|
+
Ce as provideMachReportConfig,
|
|
273
|
+
Ae as resolveCalculationMessages,
|
|
274
|
+
Ie as resolveConfig,
|
|
275
|
+
Oe as snapshotPrintOptions,
|
|
276
|
+
Me as themeToCssVars,
|
|
277
|
+
_e as toErrorDetail,
|
|
278
|
+
W as useMachReport,
|
|
279
|
+
De as useMachReportConfig,
|
|
280
|
+
ge as usePageWindow,
|
|
281
|
+
le as usePrintExport,
|
|
282
|
+
Y as useReportPreview,
|
|
283
|
+
pe as useZoom
|
|
277
284
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as ve, w as Ke, o as He, f as er } from "./progress-7OSZbFok.js";
|
|
2
2
|
import { c as Kt, g as pr } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
3
3
|
import { R as mr } from "./render-plan-Ck6koX9L.js";
|
|
4
|
-
import { o as Ze, s as lr, r as br, t as Ge, u as gr, w as yr, x as vr, y as wr, q as _r } from "./region-binding-workflow-
|
|
4
|
+
import { o as Ze, s as lr, r as br, t as Ge, u as gr, w as yr, x as vr, y as wr, q as _r } from "./region-binding-workflow-DEJbhpCv.js";
|
|
5
5
|
import { f as xr } from "./number-format-BA_KwrZe.js";
|
|
6
6
|
function Ue(Q) {
|
|
7
7
|
throw new Error('Could not dynamically require "' + Q + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|