@agile-team/mach-report 2.11.2 → 2.13.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 +30 -5
- package/THIRD_PARTY_NOTICES.md +270 -0
- package/dist/{ExcelBindingWizard-LWX6G1A2.js → ExcelBindingWizard-CeAf4QSE.js} +2 -2
- package/dist/{ExcelBindingWizard-a4kslPHF.cjs → ExcelBindingWizard-y0mT-AHR.cjs} +1 -1
- package/dist/{ReportBatchPanel-B5ClP9tm.js → ReportBatchPanel-CW2HV9I8.js} +1 -1
- package/dist/{ReportBatchPanel-Dc-SDkYA.cjs → ReportBatchPanel-Fp1ePFag.cjs} +1 -1
- package/dist/ReportPreview-BN6fk7Wz.cjs +6 -0
- package/dist/ReportPreview-D2Jkyh1U.js +4243 -0
- package/dist/{RuleEditor-C2QsOHOs.cjs → RuleEditor-ChRzNQuF.cjs} +1 -1
- package/dist/{RuleEditor-D9wQHrkf.js → RuleEditor-DzAmW5YH.js} +1 -1
- package/dist/analytics.d.cts +28 -0
- package/dist/analytics.d.ts +28 -0
- package/dist/assets-C2U-e-Sz.cjs +4 -0
- package/dist/assets-Q0wUwNrV.js +217 -0
- package/dist/code-options-BKXXY7NI.js +18 -0
- package/dist/code-options-BUTChiZZ.cjs +1 -0
- package/dist/codes.cjs +9 -0
- package/dist/codes.d.cts +223 -0
- package/dist/codes.d.ts +223 -0
- package/dist/codes.js +26917 -0
- package/dist/config-Bb7RiIO5.cjs +1 -0
- package/dist/{config-B612mw0x.js → config-XVwG87IA.js} +4 -0
- package/dist/designer.cjs +2 -2
- package/dist/designer.d.cts +283 -0
- package/dist/designer.d.ts +283 -0
- package/dist/designer.js +2852 -2010
- package/dist/grid-strokes-Cr7DwUux.cjs +1 -0
- package/dist/grid-strokes-DyyG1q_o.js +53 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +105 -1
- package/dist/index.d.ts +105 -1
- package/dist/index.js +488 -439
- package/dist/pdf.cjs +76 -59
- package/dist/pdf.d.cts +51 -0
- package/dist/pdf.d.ts +51 -0
- package/dist/pdf.js +32128 -32048
- package/dist/{plugin-Cd5G2QQn.js → plugin-D4wizDXB.js} +1 -1
- package/dist/{plugin-BDTU4D94.cjs → plugin-DzS6pxTA.cjs} +1 -1
- package/dist/record-bindings-By_UKZ2g.cjs +1 -0
- package/dist/{list-cell-ClFra1zS.js → record-bindings-D-5jQlTj.js} +67 -44
- package/dist/{region-binding-workflow-DhQvu1co.cjs → region-binding-workflow-BzfbxRiR.cjs} +1 -1
- package/dist/{region-binding-workflow-CXDmt9Bs.js → region-binding-workflow-CcUq8W2Q.js} +1 -1
- package/dist/server/node.d.cts +52 -1
- package/dist/server/node.d.ts +52 -1
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +239 -210
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +95 -3
- package/dist/server.d.ts +95 -3
- package/dist/server.js +457 -434
- package/dist/style.css +1 -1
- package/dist/{template-registry-WNXdkiET.js → template-registry-BjE1VS6g.js} +221 -157
- package/dist/template-registry-D3SjENi6.cjs +1 -0
- package/dist/template-review-DGwWOoCv.cjs +2 -0
- package/dist/{template-review-BdcXSYbx.js → template-review-PgEe_Wr9.js} +792 -666
- package/dist/validate-BJ5HIWY8.cjs +1 -0
- package/dist/validate-DbgEM1Hh.js +163 -0
- package/dist/vue/async.d.cts +125 -2
- package/dist/vue/async.d.ts +125 -2
- package/dist/vue/index.d.cts +121 -8
- package/dist/vue/index.d.ts +121 -8
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +5 -5
- package/dist/{workbook-session-BKOTwcoq.js → workbook-session-BPb3TMnT.js} +1 -1
- package/dist/{workbook-session-CLYLhZWu.cjs → workbook-session-DNa2RHNG.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +52 -1
- package/dist/worker.d.ts +52 -1
- package/dist/worker.js +2 -2
- package/dist/xlsx.cjs +1 -1
- package/dist/xlsx.d.cts +40 -0
- package/dist/xlsx.d.ts +40 -0
- package/dist/xlsx.js +3 -3
- package/package.json +16 -3
- package/dist/ReportPreview-DWXROHBP.cjs +0 -6
- package/dist/ReportPreview-DiNXhQI0.js +0 -4138
- package/dist/assets-Bu6UohJx.cjs +0 -1
- package/dist/assets-DegqDNqY.js +0 -160
- package/dist/config-BRoLo2oj.cjs +0 -1
- package/dist/list-cell-BuYn4tGF.cjs +0 -1
- package/dist/template-registry-ukBGlm8N.cjs +0 -1
- package/dist/template-review-BXp2oyqg.cjs +0 -1
- package/dist/textwrap-CWHyzkBH.cjs +0 -4
- package/dist/textwrap-DE1kgcJB.js +0 -110
- package/dist/validate-7s0yn6ii.js +0 -148
- package/dist/validate-DsRiNw8h.cjs +0 -1
package/dist/vue/index.d.cts
CHANGED
|
@@ -160,8 +160,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
160
160
|
cause?: unknown;
|
|
161
161
|
} | undefined) => any;
|
|
162
162
|
warning: (message: string) => any;
|
|
163
|
-
task: (task: Readonly<ReportPreviewTask>) => any;
|
|
164
163
|
diagnostic: (diagnostic: Readonly<ReportPreviewDiagnostic>) => any;
|
|
164
|
+
task: (task: Readonly<ReportPreviewTask>) => any;
|
|
165
165
|
loaded: (pageCount: number) => any;
|
|
166
166
|
"cell-edit": (edit: ReportCellEdit_2) => any;
|
|
167
167
|
"template-import": (result: ExcelImportResult) => any;
|
|
@@ -281,8 +281,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
281
281
|
cause?: unknown;
|
|
282
282
|
} | undefined) => any) | undefined;
|
|
283
283
|
onWarning?: ((message: string) => any) | undefined;
|
|
284
|
-
onTask?: ((task: Readonly<ReportPreviewTask>) => any) | undefined;
|
|
285
284
|
onDiagnostic?: ((diagnostic: Readonly<ReportPreviewDiagnostic>) => any) | undefined;
|
|
285
|
+
onTask?: ((task: Readonly<ReportPreviewTask>) => any) | undefined;
|
|
286
286
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
287
287
|
"onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
|
|
288
288
|
"onTemplate-import"?: ((result: ExcelImportResult) => any) | undefined;
|
|
@@ -293,8 +293,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
293
293
|
output: ReportOutputOptions;
|
|
294
294
|
height: string;
|
|
295
295
|
gapPx: number;
|
|
296
|
-
reportId: string | string[] | null;
|
|
297
296
|
assets: AssetRenderOptions;
|
|
297
|
+
reportId: string | string[] | null;
|
|
298
298
|
debug: boolean;
|
|
299
299
|
showExport: boolean;
|
|
300
300
|
showPrint: boolean;
|
|
@@ -318,8 +318,8 @@ declare const __VLS_component_2: DefineComponent<__VLS_Props, {
|
|
|
318
318
|
focusSearch: () => void;
|
|
319
319
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
320
320
|
export: (format: ReportExportFormat) => any;
|
|
321
|
-
print: () => any;
|
|
322
321
|
zoom: (mode: number | "fit") => any;
|
|
322
|
+
print: () => any;
|
|
323
323
|
goto: (page: number) => any;
|
|
324
324
|
"pdf-window": () => any;
|
|
325
325
|
"search-input": (query: string) => any;
|
|
@@ -330,8 +330,8 @@ declare const __VLS_component_2: DefineComponent<__VLS_Props, {
|
|
|
330
330
|
"settings-toggle": () => any;
|
|
331
331
|
}, string, MachReportVuePublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
332
332
|
onExport?: ((format: ReportExportFormat) => any) | undefined;
|
|
333
|
-
onPrint?: (() => any) | undefined;
|
|
334
333
|
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
334
|
+
onPrint?: (() => any) | undefined;
|
|
335
335
|
onGoto?: ((page: number) => any) | undefined;
|
|
336
336
|
"onPdf-window"?: (() => any) | undefined;
|
|
337
337
|
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
@@ -474,6 +474,39 @@ export declare function buildWordHtml(p: RenderPlan): {
|
|
|
474
474
|
html: string;
|
|
475
475
|
filename: string;
|
|
476
476
|
};
|
|
477
|
+
/** Serializable symbol settings. Encoders remain in the optional /codes entry. */
|
|
478
|
+
declare interface CodeOptions {
|
|
479
|
+
/** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
|
|
480
|
+
value?: string;
|
|
481
|
+
symbology?: "code128" | "code39" | "ean13" | "ean8";
|
|
482
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
483
|
+
/** White modules around a symbol: QR >=4, linear >=10, EAN >=11. */
|
|
484
|
+
quietZoneModules?: number;
|
|
485
|
+
/** Human-readable content below a linear barcode. */
|
|
486
|
+
showText?: boolean;
|
|
487
|
+
}
|
|
488
|
+
/** Serializable symbol settings. Encoders remain in the optional /codes entry. */
|
|
489
|
+
declare interface CodeOptions_2 {
|
|
490
|
+
/** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
|
|
491
|
+
value?: string;
|
|
492
|
+
symbology?: "code128" | "code39" | "ean13" | "ean8";
|
|
493
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
494
|
+
/** White modules around a symbol: QR >=4, linear >=10, EAN >=11. */
|
|
495
|
+
quietZoneModules?: number;
|
|
496
|
+
/** Human-readable content below a linear barcode. */
|
|
497
|
+
showText?: boolean;
|
|
498
|
+
}
|
|
499
|
+
/** Serializable symbol settings. Encoders remain in the optional /codes entry. */
|
|
500
|
+
declare interface CodeOptions_3 {
|
|
501
|
+
/** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
|
|
502
|
+
value?: string;
|
|
503
|
+
symbology?: "code128" | "code39" | "ean13" | "ean8";
|
|
504
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
505
|
+
/** White modules around a symbol: QR >=4, linear >=10, EAN >=11. */
|
|
506
|
+
quietZoneModules?: number;
|
|
507
|
+
/** Human-readable content below a linear barcode. */
|
|
508
|
+
showText?: boolean;
|
|
509
|
+
}
|
|
477
510
|
/**
|
|
478
511
|
* 列值格式化(声明式、JSON 可序列化)。
|
|
479
512
|
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
@@ -540,6 +573,30 @@ declare type ColumnFormat_3 = {
|
|
|
540
573
|
kind: "date";
|
|
541
574
|
pattern?: string;
|
|
542
575
|
};
|
|
576
|
+
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
577
|
+
declare interface ComponentBinding {
|
|
578
|
+
field: string;
|
|
579
|
+
format?: ValueFormat;
|
|
580
|
+
prefix?: string;
|
|
581
|
+
suffix?: string;
|
|
582
|
+
emptyText?: string;
|
|
583
|
+
}
|
|
584
|
+
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
585
|
+
declare interface ComponentBinding_2 {
|
|
586
|
+
field: string;
|
|
587
|
+
format?: ValueFormat_2;
|
|
588
|
+
prefix?: string;
|
|
589
|
+
suffix?: string;
|
|
590
|
+
emptyText?: string;
|
|
591
|
+
}
|
|
592
|
+
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
593
|
+
declare interface ComponentBinding_3 {
|
|
594
|
+
field: string;
|
|
595
|
+
format?: ValueFormat_3;
|
|
596
|
+
prefix?: string;
|
|
597
|
+
suffix?: string;
|
|
598
|
+
emptyText?: string;
|
|
599
|
+
}
|
|
543
600
|
declare interface ComponentImageContext {
|
|
544
601
|
readonly component: Readonly<PlanComponent>;
|
|
545
602
|
readonly pageIndex: number;
|
|
@@ -915,7 +972,7 @@ declare interface ListColumn {
|
|
|
915
972
|
/** 独立的表头样式,优先于列表级表头样式。 */
|
|
916
973
|
headerStyle?: ComponentStyle_2;
|
|
917
974
|
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
918
|
-
format?:
|
|
975
|
+
format?: ColumnFormat_2;
|
|
919
976
|
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
920
977
|
rules?: StyleRule[];
|
|
921
978
|
/** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
|
|
@@ -940,7 +997,7 @@ declare interface ListColumn_2 {
|
|
|
940
997
|
/** 独立的表头样式,优先于列表级表头样式。 */
|
|
941
998
|
headerStyle?: ComponentStyle;
|
|
942
999
|
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
943
|
-
format?:
|
|
1000
|
+
format?: ColumnFormat;
|
|
944
1001
|
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
945
1002
|
rules?: StyleRule_2[];
|
|
946
1003
|
/** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
|
|
@@ -1402,6 +1459,10 @@ export declare interface MachReportMessages extends Partial<ReportCalculationMes
|
|
|
1402
1459
|
pageJumpInvalid?: string;
|
|
1403
1460
|
pageJumpHint?: string;
|
|
1404
1461
|
pagination?: string;
|
|
1462
|
+
recordNavigation?: string;
|
|
1463
|
+
recordInfo?: string;
|
|
1464
|
+
prevRecord?: string;
|
|
1465
|
+
nextRecord?: string;
|
|
1405
1466
|
columnSearchHint?: string;
|
|
1406
1467
|
columnSearchShortcut?: string;
|
|
1407
1468
|
closeColumnDirectory?: string;
|
|
@@ -1788,6 +1849,10 @@ export declare interface PdfFontCheckResult {
|
|
|
1788
1849
|
/** available 仅表示字体资源可达;实际导出仍会校验文字能否编码。 */
|
|
1789
1850
|
export declare type PdfFontStatus = "unchecked" | "checking" | "available" | "disabled" | "unverified" | "error";
|
|
1790
1851
|
declare interface PlanComponent {
|
|
1852
|
+
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
1853
|
+
code?: CodeOptions;
|
|
1854
|
+
/** Template-only binding; resolved and removed before constructing the output plan. */
|
|
1855
|
+
binding?: ComponentBinding;
|
|
1791
1856
|
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
1792
1857
|
pageAnchor?: "header" | "footer";
|
|
1793
1858
|
kind: ComponentKind;
|
|
@@ -1812,6 +1877,10 @@ declare interface PlanComponent {
|
|
|
1812
1877
|
fallbackText?: string;
|
|
1813
1878
|
}
|
|
1814
1879
|
declare interface PlanComponent_2 {
|
|
1880
|
+
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
1881
|
+
code?: CodeOptions_2;
|
|
1882
|
+
/** Template-only binding; resolved and removed before constructing the output plan. */
|
|
1883
|
+
binding?: ComponentBinding_2;
|
|
1815
1884
|
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
1816
1885
|
pageAnchor?: "header" | "footer";
|
|
1817
1886
|
kind: ComponentKind_2;
|
|
@@ -1836,6 +1905,10 @@ declare interface PlanComponent_2 {
|
|
|
1836
1905
|
fallbackText?: string;
|
|
1837
1906
|
}
|
|
1838
1907
|
declare interface PlanComponent_3 {
|
|
1908
|
+
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
1909
|
+
code?: CodeOptions_3;
|
|
1910
|
+
/** Template-only binding; resolved and removed before constructing the output plan. */
|
|
1911
|
+
binding?: ComponentBinding_3;
|
|
1839
1912
|
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
1840
1913
|
pageAnchor?: "header" | "footer";
|
|
1841
1914
|
kind: ComponentKind_3;
|
|
@@ -2516,7 +2589,7 @@ export declare interface ReportSection {
|
|
|
2516
2589
|
declare interface ReportTaskEvent {
|
|
2517
2590
|
taskId: string;
|
|
2518
2591
|
correlationId?: string;
|
|
2519
|
-
stage: "query" | "validate" | "layout" | "encode";
|
|
2592
|
+
stage: "query" | "validate" | "layout" | "assets" | "encode";
|
|
2520
2593
|
status: "started" | "completed" | "failed";
|
|
2521
2594
|
reportId?: string;
|
|
2522
2595
|
completed?: number;
|
|
@@ -2532,18 +2605,24 @@ declare interface ReportTemplate {
|
|
|
2532
2605
|
schemaVersion?: string;
|
|
2533
2606
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
2534
2607
|
params?: ReportParamDef_2[];
|
|
2608
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
2609
|
+
repeat?: ReportTemplateRepeat;
|
|
2535
2610
|
pages: TemplatePage[];
|
|
2536
2611
|
}
|
|
2537
2612
|
declare interface ReportTemplate_2 {
|
|
2538
2613
|
schemaVersion?: string;
|
|
2539
2614
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
2540
2615
|
params?: ReportParamDef[];
|
|
2616
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
2617
|
+
repeat?: ReportTemplateRepeat_2;
|
|
2541
2618
|
pages: TemplatePage_2[];
|
|
2542
2619
|
}
|
|
2543
2620
|
declare interface ReportTemplate_3 {
|
|
2544
2621
|
schemaVersion?: string;
|
|
2545
2622
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
2546
2623
|
params?: ReportParamDef_3[];
|
|
2624
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
2625
|
+
repeat?: ReportTemplateRepeat_3;
|
|
2547
2626
|
pages: TemplatePage_3[];
|
|
2548
2627
|
}
|
|
2549
2628
|
/** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
|
|
@@ -2565,6 +2644,33 @@ declare interface ReportTemplateProvider {
|
|
|
2565
2644
|
signal?: AbortSignal;
|
|
2566
2645
|
}): Promise<ReportTemplateDocument | undefined>;
|
|
2567
2646
|
}
|
|
2647
|
+
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
2648
|
+
declare interface ReportTemplateRepeat {
|
|
2649
|
+
dataset: string;
|
|
2650
|
+
rowKey?: string;
|
|
2651
|
+
/** Whole copies per record, 1..1000. The field value must be a number, never a numeric string. */
|
|
2652
|
+
copies?: number | {
|
|
2653
|
+
field: string;
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
2657
|
+
declare interface ReportTemplateRepeat_2 {
|
|
2658
|
+
dataset: string;
|
|
2659
|
+
rowKey?: string;
|
|
2660
|
+
/** Whole copies per record, 1..1000. The field value must be a number, never a numeric string. */
|
|
2661
|
+
copies?: number | {
|
|
2662
|
+
field: string;
|
|
2663
|
+
};
|
|
2664
|
+
}
|
|
2665
|
+
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
2666
|
+
declare interface ReportTemplateRepeat_3 {
|
|
2667
|
+
dataset: string;
|
|
2668
|
+
rowKey?: string;
|
|
2669
|
+
/** Whole copies per record, 1..1000. The field value must be a number, never a numeric string. */
|
|
2670
|
+
copies?: number | {
|
|
2671
|
+
field: string;
|
|
2672
|
+
};
|
|
2673
|
+
}
|
|
2568
2674
|
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
2569
2675
|
export declare const ReportToolbar: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
2570
2676
|
/** 新消息保持可选,旧的完整文案对象也能获得新增能力的默认文案。 */
|
|
@@ -2814,6 +2920,7 @@ export declare function usePageWindow(plan: Ref<RenderPlan | null>, zoom: Ref<nu
|
|
|
2814
2920
|
}[]>;
|
|
2815
2921
|
makeScrollHandler: (currentPage: Ref<number>, pageCount: Ref<number>) => (vp: HTMLElement) => void;
|
|
2816
2922
|
refreshViewport: (vp: HTMLElement | null) => void;
|
|
2923
|
+
scrollToPage: (vp: HTMLElement, index: number) => void;
|
|
2817
2924
|
pageOffsetPx: (index: number) => number;
|
|
2818
2925
|
destroy: () => void;
|
|
2819
2926
|
};
|
|
@@ -2868,6 +2975,12 @@ export declare function useZoom(getFitInputs: () => {
|
|
|
2868
2975
|
applyFitZoom: () => void;
|
|
2869
2976
|
setZoom: (mode: "fit" | number) => void;
|
|
2870
2977
|
};
|
|
2978
|
+
/** The same declarative formatting used by list columns, before any output backend. */
|
|
2979
|
+
declare type ValueFormat = ColumnFormat;
|
|
2980
|
+
/** The same declarative formatting used by list columns, before any output backend. */
|
|
2981
|
+
declare type ValueFormat_2 = ColumnFormat_2;
|
|
2982
|
+
/** The same declarative formatting used by list columns, before any output backend. */
|
|
2983
|
+
declare type ValueFormat_3 = ColumnFormat_3;
|
|
2871
2984
|
declare interface XlsxImageOptions {
|
|
2872
2985
|
/** Decoded bytes per unique embedded image; default 16 MiB. */
|
|
2873
2986
|
maxImageBytes?: number;
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -160,8 +160,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
160
160
|
cause?: unknown;
|
|
161
161
|
} | undefined) => any;
|
|
162
162
|
warning: (message: string) => any;
|
|
163
|
-
task: (task: Readonly<ReportPreviewTask>) => any;
|
|
164
163
|
diagnostic: (diagnostic: Readonly<ReportPreviewDiagnostic>) => any;
|
|
164
|
+
task: (task: Readonly<ReportPreviewTask>) => any;
|
|
165
165
|
loaded: (pageCount: number) => any;
|
|
166
166
|
"cell-edit": (edit: ReportCellEdit_2) => any;
|
|
167
167
|
"template-import": (result: ExcelImportResult) => any;
|
|
@@ -281,8 +281,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
281
281
|
cause?: unknown;
|
|
282
282
|
} | undefined) => any) | undefined;
|
|
283
283
|
onWarning?: ((message: string) => any) | undefined;
|
|
284
|
-
onTask?: ((task: Readonly<ReportPreviewTask>) => any) | undefined;
|
|
285
284
|
onDiagnostic?: ((diagnostic: Readonly<ReportPreviewDiagnostic>) => any) | undefined;
|
|
285
|
+
onTask?: ((task: Readonly<ReportPreviewTask>) => any) | undefined;
|
|
286
286
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
287
287
|
"onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
|
|
288
288
|
"onTemplate-import"?: ((result: ExcelImportResult) => any) | undefined;
|
|
@@ -293,8 +293,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
293
293
|
output: ReportOutputOptions;
|
|
294
294
|
height: string;
|
|
295
295
|
gapPx: number;
|
|
296
|
-
reportId: string | string[] | null;
|
|
297
296
|
assets: AssetRenderOptions;
|
|
297
|
+
reportId: string | string[] | null;
|
|
298
298
|
debug: boolean;
|
|
299
299
|
showExport: boolean;
|
|
300
300
|
showPrint: boolean;
|
|
@@ -318,8 +318,8 @@ declare const __VLS_component_2: DefineComponent<__VLS_Props, {
|
|
|
318
318
|
focusSearch: () => void;
|
|
319
319
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
320
320
|
export: (format: ReportExportFormat) => any;
|
|
321
|
-
print: () => any;
|
|
322
321
|
zoom: (mode: number | "fit") => any;
|
|
322
|
+
print: () => any;
|
|
323
323
|
goto: (page: number) => any;
|
|
324
324
|
"pdf-window": () => any;
|
|
325
325
|
"search-input": (query: string) => any;
|
|
@@ -330,8 +330,8 @@ declare const __VLS_component_2: DefineComponent<__VLS_Props, {
|
|
|
330
330
|
"settings-toggle": () => any;
|
|
331
331
|
}, string, MachReportVuePublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
332
332
|
onExport?: ((format: ReportExportFormat) => any) | undefined;
|
|
333
|
-
onPrint?: (() => any) | undefined;
|
|
334
333
|
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
334
|
+
onPrint?: (() => any) | undefined;
|
|
335
335
|
onGoto?: ((page: number) => any) | undefined;
|
|
336
336
|
"onPdf-window"?: (() => any) | undefined;
|
|
337
337
|
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
@@ -474,6 +474,39 @@ export declare function buildWordHtml(p: RenderPlan): {
|
|
|
474
474
|
html: string;
|
|
475
475
|
filename: string;
|
|
476
476
|
};
|
|
477
|
+
/** Serializable symbol settings. Encoders remain in the optional /codes entry. */
|
|
478
|
+
declare interface CodeOptions {
|
|
479
|
+
/** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
|
|
480
|
+
value?: string;
|
|
481
|
+
symbology?: "code128" | "code39" | "ean13" | "ean8";
|
|
482
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
483
|
+
/** White modules around a symbol: QR >=4, linear >=10, EAN >=11. */
|
|
484
|
+
quietZoneModules?: number;
|
|
485
|
+
/** Human-readable content below a linear barcode. */
|
|
486
|
+
showText?: boolean;
|
|
487
|
+
}
|
|
488
|
+
/** Serializable symbol settings. Encoders remain in the optional /codes entry. */
|
|
489
|
+
declare interface CodeOptions_2 {
|
|
490
|
+
/** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
|
|
491
|
+
value?: string;
|
|
492
|
+
symbology?: "code128" | "code39" | "ean13" | "ean8";
|
|
493
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
494
|
+
/** White modules around a symbol: QR >=4, linear >=10, EAN >=11. */
|
|
495
|
+
quietZoneModules?: number;
|
|
496
|
+
/** Human-readable content below a linear barcode. */
|
|
497
|
+
showText?: boolean;
|
|
498
|
+
}
|
|
499
|
+
/** Serializable symbol settings. Encoders remain in the optional /codes entry. */
|
|
500
|
+
declare interface CodeOptions_3 {
|
|
501
|
+
/** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
|
|
502
|
+
value?: string;
|
|
503
|
+
symbology?: "code128" | "code39" | "ean13" | "ean8";
|
|
504
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
505
|
+
/** White modules around a symbol: QR >=4, linear >=10, EAN >=11. */
|
|
506
|
+
quietZoneModules?: number;
|
|
507
|
+
/** Human-readable content below a linear barcode. */
|
|
508
|
+
showText?: boolean;
|
|
509
|
+
}
|
|
477
510
|
/**
|
|
478
511
|
* 列值格式化(声明式、JSON 可序列化)。
|
|
479
512
|
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
@@ -540,6 +573,30 @@ declare type ColumnFormat_3 = {
|
|
|
540
573
|
kind: "date";
|
|
541
574
|
pattern?: string;
|
|
542
575
|
};
|
|
576
|
+
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
577
|
+
declare interface ComponentBinding {
|
|
578
|
+
field: string;
|
|
579
|
+
format?: ValueFormat;
|
|
580
|
+
prefix?: string;
|
|
581
|
+
suffix?: string;
|
|
582
|
+
emptyText?: string;
|
|
583
|
+
}
|
|
584
|
+
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
585
|
+
declare interface ComponentBinding_2 {
|
|
586
|
+
field: string;
|
|
587
|
+
format?: ValueFormat_2;
|
|
588
|
+
prefix?: string;
|
|
589
|
+
suffix?: string;
|
|
590
|
+
emptyText?: string;
|
|
591
|
+
}
|
|
592
|
+
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
593
|
+
declare interface ComponentBinding_3 {
|
|
594
|
+
field: string;
|
|
595
|
+
format?: ValueFormat_3;
|
|
596
|
+
prefix?: string;
|
|
597
|
+
suffix?: string;
|
|
598
|
+
emptyText?: string;
|
|
599
|
+
}
|
|
543
600
|
declare interface ComponentImageContext {
|
|
544
601
|
readonly component: Readonly<PlanComponent>;
|
|
545
602
|
readonly pageIndex: number;
|
|
@@ -915,7 +972,7 @@ declare interface ListColumn {
|
|
|
915
972
|
/** 独立的表头样式,优先于列表级表头样式。 */
|
|
916
973
|
headerStyle?: ComponentStyle_2;
|
|
917
974
|
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
918
|
-
format?:
|
|
975
|
+
format?: ColumnFormat_2;
|
|
919
976
|
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
920
977
|
rules?: StyleRule[];
|
|
921
978
|
/** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
|
|
@@ -940,7 +997,7 @@ declare interface ListColumn_2 {
|
|
|
940
997
|
/** 独立的表头样式,优先于列表级表头样式。 */
|
|
941
998
|
headerStyle?: ComponentStyle;
|
|
942
999
|
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
943
|
-
format?:
|
|
1000
|
+
format?: ColumnFormat;
|
|
944
1001
|
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
945
1002
|
rules?: StyleRule_2[];
|
|
946
1003
|
/** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
|
|
@@ -1402,6 +1459,10 @@ export declare interface MachReportMessages extends Partial<ReportCalculationMes
|
|
|
1402
1459
|
pageJumpInvalid?: string;
|
|
1403
1460
|
pageJumpHint?: string;
|
|
1404
1461
|
pagination?: string;
|
|
1462
|
+
recordNavigation?: string;
|
|
1463
|
+
recordInfo?: string;
|
|
1464
|
+
prevRecord?: string;
|
|
1465
|
+
nextRecord?: string;
|
|
1405
1466
|
columnSearchHint?: string;
|
|
1406
1467
|
columnSearchShortcut?: string;
|
|
1407
1468
|
closeColumnDirectory?: string;
|
|
@@ -1788,6 +1849,10 @@ export declare interface PdfFontCheckResult {
|
|
|
1788
1849
|
/** available 仅表示字体资源可达;实际导出仍会校验文字能否编码。 */
|
|
1789
1850
|
export declare type PdfFontStatus = "unchecked" | "checking" | "available" | "disabled" | "unverified" | "error";
|
|
1790
1851
|
declare interface PlanComponent {
|
|
1852
|
+
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
1853
|
+
code?: CodeOptions;
|
|
1854
|
+
/** Template-only binding; resolved and removed before constructing the output plan. */
|
|
1855
|
+
binding?: ComponentBinding;
|
|
1791
1856
|
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
1792
1857
|
pageAnchor?: "header" | "footer";
|
|
1793
1858
|
kind: ComponentKind;
|
|
@@ -1812,6 +1877,10 @@ declare interface PlanComponent {
|
|
|
1812
1877
|
fallbackText?: string;
|
|
1813
1878
|
}
|
|
1814
1879
|
declare interface PlanComponent_2 {
|
|
1880
|
+
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
1881
|
+
code?: CodeOptions_2;
|
|
1882
|
+
/** Template-only binding; resolved and removed before constructing the output plan. */
|
|
1883
|
+
binding?: ComponentBinding_2;
|
|
1815
1884
|
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
1816
1885
|
pageAnchor?: "header" | "footer";
|
|
1817
1886
|
kind: ComponentKind_2;
|
|
@@ -1836,6 +1905,10 @@ declare interface PlanComponent_2 {
|
|
|
1836
1905
|
fallbackText?: string;
|
|
1837
1906
|
}
|
|
1838
1907
|
declare interface PlanComponent_3 {
|
|
1908
|
+
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
1909
|
+
code?: CodeOptions_3;
|
|
1910
|
+
/** Template-only binding; resolved and removed before constructing the output plan. */
|
|
1911
|
+
binding?: ComponentBinding_3;
|
|
1839
1912
|
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
1840
1913
|
pageAnchor?: "header" | "footer";
|
|
1841
1914
|
kind: ComponentKind_3;
|
|
@@ -2516,7 +2589,7 @@ export declare interface ReportSection {
|
|
|
2516
2589
|
declare interface ReportTaskEvent {
|
|
2517
2590
|
taskId: string;
|
|
2518
2591
|
correlationId?: string;
|
|
2519
|
-
stage: "query" | "validate" | "layout" | "encode";
|
|
2592
|
+
stage: "query" | "validate" | "layout" | "assets" | "encode";
|
|
2520
2593
|
status: "started" | "completed" | "failed";
|
|
2521
2594
|
reportId?: string;
|
|
2522
2595
|
completed?: number;
|
|
@@ -2532,18 +2605,24 @@ declare interface ReportTemplate {
|
|
|
2532
2605
|
schemaVersion?: string;
|
|
2533
2606
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
2534
2607
|
params?: ReportParamDef_2[];
|
|
2608
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
2609
|
+
repeat?: ReportTemplateRepeat;
|
|
2535
2610
|
pages: TemplatePage[];
|
|
2536
2611
|
}
|
|
2537
2612
|
declare interface ReportTemplate_2 {
|
|
2538
2613
|
schemaVersion?: string;
|
|
2539
2614
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
2540
2615
|
params?: ReportParamDef[];
|
|
2616
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
2617
|
+
repeat?: ReportTemplateRepeat_2;
|
|
2541
2618
|
pages: TemplatePage_2[];
|
|
2542
2619
|
}
|
|
2543
2620
|
declare interface ReportTemplate_3 {
|
|
2544
2621
|
schemaVersion?: string;
|
|
2545
2622
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
2546
2623
|
params?: ReportParamDef_3[];
|
|
2624
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
2625
|
+
repeat?: ReportTemplateRepeat_3;
|
|
2547
2626
|
pages: TemplatePage_3[];
|
|
2548
2627
|
}
|
|
2549
2628
|
/** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
|
|
@@ -2565,6 +2644,33 @@ declare interface ReportTemplateProvider {
|
|
|
2565
2644
|
signal?: AbortSignal;
|
|
2566
2645
|
}): Promise<ReportTemplateDocument | undefined>;
|
|
2567
2646
|
}
|
|
2647
|
+
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
2648
|
+
declare interface ReportTemplateRepeat {
|
|
2649
|
+
dataset: string;
|
|
2650
|
+
rowKey?: string;
|
|
2651
|
+
/** Whole copies per record, 1..1000. The field value must be a number, never a numeric string. */
|
|
2652
|
+
copies?: number | {
|
|
2653
|
+
field: string;
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
2657
|
+
declare interface ReportTemplateRepeat_2 {
|
|
2658
|
+
dataset: string;
|
|
2659
|
+
rowKey?: string;
|
|
2660
|
+
/** Whole copies per record, 1..1000. The field value must be a number, never a numeric string. */
|
|
2661
|
+
copies?: number | {
|
|
2662
|
+
field: string;
|
|
2663
|
+
};
|
|
2664
|
+
}
|
|
2665
|
+
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
2666
|
+
declare interface ReportTemplateRepeat_3 {
|
|
2667
|
+
dataset: string;
|
|
2668
|
+
rowKey?: string;
|
|
2669
|
+
/** Whole copies per record, 1..1000. The field value must be a number, never a numeric string. */
|
|
2670
|
+
copies?: number | {
|
|
2671
|
+
field: string;
|
|
2672
|
+
};
|
|
2673
|
+
}
|
|
2568
2674
|
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
2569
2675
|
export declare const ReportToolbar: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
2570
2676
|
/** 新消息保持可选,旧的完整文案对象也能获得新增能力的默认文案。 */
|
|
@@ -2814,6 +2920,7 @@ export declare function usePageWindow(plan: Ref<RenderPlan | null>, zoom: Ref<nu
|
|
|
2814
2920
|
}[]>;
|
|
2815
2921
|
makeScrollHandler: (currentPage: Ref<number>, pageCount: Ref<number>) => (vp: HTMLElement) => void;
|
|
2816
2922
|
refreshViewport: (vp: HTMLElement | null) => void;
|
|
2923
|
+
scrollToPage: (vp: HTMLElement, index: number) => void;
|
|
2817
2924
|
pageOffsetPx: (index: number) => number;
|
|
2818
2925
|
destroy: () => void;
|
|
2819
2926
|
};
|
|
@@ -2868,6 +2975,12 @@ export declare function useZoom(getFitInputs: () => {
|
|
|
2868
2975
|
applyFitZoom: () => void;
|
|
2869
2976
|
setZoom: (mode: "fit" | number) => void;
|
|
2870
2977
|
};
|
|
2978
|
+
/** The same declarative formatting used by list columns, before any output backend. */
|
|
2979
|
+
declare type ValueFormat = ColumnFormat;
|
|
2980
|
+
/** The same declarative formatting used by list columns, before any output backend. */
|
|
2981
|
+
declare type ValueFormat_2 = ColumnFormat_2;
|
|
2982
|
+
/** The same declarative formatting used by list columns, before any output backend. */
|
|
2983
|
+
declare type ValueFormat_3 = ColumnFormat_3;
|
|
2871
2984
|
declare interface XlsxImageOptions {
|
|
2872
2985
|
/** Decoded bytes per unique embedded image; default 16 MiB. */
|
|
2873
2986
|
maxImageBytes?: number;
|
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-DzS6pxTA.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-BN6fk7Wz.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,7 +1,7 @@
|
|
|
1
|
-
import { m as r } from "./plugin-
|
|
2
|
-
import { M as l } from "./plugin-
|
|
1
|
+
import { m as r } from "./plugin-D4wizDXB.js";
|
|
2
|
+
import { M as l } from "./plugin-D4wizDXB.js";
|
|
3
3
|
function a() {
|
|
4
|
-
return import("./ReportPreview-
|
|
4
|
+
return import("./ReportPreview-D2Jkyh1U.js").then((t) => t.o);
|
|
5
5
|
}
|
|
6
6
|
const n = {
|
|
7
7
|
install(t, o = {}) {
|
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-BN6fk7Wz.cjs"),a=require("./config-Bb7RiIO5.cjs"),f=require("./injection-keys-Db_DyLkm.cjs"),_=require("./plugin-DzS6pxTA.cjs"),h=require("vue");function S(r){const e=E.createReportSource(r),n=async t=>{if(t.reportIds.length===0)throw new i.PlanLoadError("缺少报表 ID");for(const o of t.reportIds)if(!Object.prototype.hasOwnProperty.call(r,o)||!r[o])throw new i.PlanLoadError(`本地模板 ${o} 不存在`);return e(t)};return n.getParamDefs=e.getParamDefs,n}const v=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 A(){const r=h.shallowRef(null),e=()=>r.value?.state??v,n=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(o){const s=o;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:n,async checkPdfFont(){const o=t();return o.checkPdfFont?o.checkPdfFont():{status:"unverified",fontUrl:"",message:"旧自定义控制器未提供字体检查,请由宿主确认字体配置"}},cancelTask(){t().cancelTask?.()},async confirmDiscard(o){return await t().confirmDiscard?.(o)??!0},getOutputDiagnostics(o){return t().getOutputDiagnostics?.(o)??[]},async reload(){await t().reload()},async print(){await t().print()},async exportAs(o){await t().exportAs(o)},openPdfWindow(){t().openPdfWindow()},gotoPage(o){t().gotoPage(o)},async setParams(o,s){await t().setParams(o,s)},async importExcel(o,s){const g=t();if(!g.importExcel)throw new a.MachReportError("config","旧自定义控制器未提供 Excel 导入");return g.importExcel(o,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(o,s)=>await t().focusCell?.(o,s)??!1,focusField:async o=>await t().focusField?.(o)??!1,copySelection:()=>t().copySelection?.()??"",pasteSelection:async o=>await t().pasteSelection?.(o)??!1}}function I(){return h.inject(f.MACH_REPORT_CONTROLLER_KEY,null)}function T(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}function L(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"))}function D(r,e){return Array.isArray(r)&&r.every(n=>T(n)&&Number.isSafeInteger(n.editIndex)&&n.editIndex>=0&&n.editIndex<e&&typeof n.code=="string"&&typeof n.message=="string")}function x(r,e){let n;if(!T(r)||typeof r.revision!="string"||!r.revision.trim()?n="非空 revision(请先在适配器解包业务响应)":r.sourceToken!==void 0&&typeof r.sourceToken!="string"?n="字符串 sourceToken":r.diagnostics!==void 0&&!L(r.diagnostics)?n="结构化 diagnostics":r.conflicts!==void 0&&!D(r.conflicts,e)&&(n="有效 editIndex/code/message conflicts"),n)throw new a.MachReportError("edit",`ReportProvider.save 必须返回${n};服务器可能已提交,请重新查询确认后再编辑`)}function w(r){return typeof r=="function"?r():r}function F(r,e){const n=new Set(r.flatMap(t=>t.source?.[e]===void 0?[]:[String(t.source[e])]));return n.size===1?[...n][0]:void 0}function O(r,e,n,t){return typeof r=="function"?r():F(e,n)??t??r}function b(r){return r.requestId??globalThis.crypto?.randomUUID?.()??`mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function q(r,e){if(!r.save)throw new a.MachReportError("config","ReportProvider.save 未配置,无法启用业务保存");let n="",t,o,s=0;function g(c,u,p){c.conflicts?.length||u!==n||p!==s||(t=c.revision,o=c.sourceToken)}async function m(c,u){if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");const p=w(e.reportId),y={...w(e.params??{})},R=JSON.stringify([p,y]),C=++s;if(R!==n&&(n=R,t=void 0,o=void 0),e.requireSource!==!1&&c.edits.some(d=>!d.source))throw new E.ReportCellEditError("missing");const l=await r.save({reportId:p,params:y,signal:u.signal,requestId:c.requestId,action:u.action,edits:i.cloneReportSnapshot(c.edits),expectedRevision:O(e.expectedRevision,c.edits,"revision",t),sourceToken:O(e.sourceToken,c.edits,"sourceToken",o)});if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");x(l,c.edits.length),l.diagnostics?.forEach(d=>e.onDiagnostic?.(d));const P=l.diagnostics?.filter(d=>d.severity==="error");if(P?.length)throw new a.MachReportError("edit",P.map(d=>d.message).join(";"),{diagnostics:P});const M=l.conflicts?.map(d=>({source:c.edits[d.editIndex]?.source,address:c.edits[d.editIndex]?.address,message:d.message}));return g(l,R,C),{revision:l.revision,sourceToken:l.sourceToken,conflicts:M}}return{requireSource:e.requireSource??!0,canEdit:e.canEdit,validate:e.validate,saveBatch:m,save:(c,u)=>m({requestId:b(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.ReportToolbar=i.ReportToolbar;exports.buildPrintDocument=i.buildPrintDocument;exports.buildWordHtml=i.buildWordHtml;exports.createDefaultPdfExporter=i.createDefaultPdfExporter;exports.createFetchRequest=i.createFetchRequest;exports.createReportStoragePreferences=i.createReportStoragePreferences;exports.joinReportIds=i.joinReportIds;exports.normalizeReportIds=i.normalizeReportIds;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_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.provideMachReportConfig=a.provideMachReportConfig;exports.resolveCalculationMessages=a.resolveCalculationMessages;exports.resolveConfig=a.resolveConfig;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=_.MachReportPreview;exports.machReportPlugin=_.machReportPlugin;exports.createLocalFetcher=S;exports.createProviderEditing=q;exports.useMachReport=A;exports.useReportPreview=I;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,12 +1,12 @@
|
|
|
1
1
|
import { createReportSource as S, ReportCellEditError as x } from "@agile-team/mach-report";
|
|
2
2
|
export * from "@agile-team/mach-report";
|
|
3
|
-
import { P as R, c as y } from "./ReportPreview-
|
|
4
|
-
import { R as V, a as X, b as B, d as J, e as Z, f as Q, g as ee, h as re, i as te, j as ne, k as oe, n as se, p as ae, u as ie, l as ce, m as fe } from "./ReportPreview-
|
|
5
|
-
import { M as u } from "./config-
|
|
6
|
-
import { D as de, a as ge, b as le, R as pe, S as me, d as Pe, c as Ee, n as Re, p as ye, r as he, e as we, t as Te, f as ve, u as Se } from "./config-
|
|
3
|
+
import { P as R, c as y } from "./ReportPreview-D2Jkyh1U.js";
|
|
4
|
+
import { R as V, a as X, b as B, d as J, e as Z, f as Q, g as ee, h as re, i as te, j as ne, k as oe, n as se, p as ae, u as ie, l as ce, m as fe } from "./ReportPreview-D2Jkyh1U.js";
|
|
5
|
+
import { M as u } from "./config-XVwG87IA.js";
|
|
6
|
+
import { D as de, a as ge, b as le, R as pe, S as me, d as Pe, c as Ee, n as Re, p as ye, r as he, e as we, t as Te, f as ve, u as Se } from "./config-XVwG87IA.js";
|
|
7
7
|
import { M as C } from "./injection-keys-e85udZCp.js";
|
|
8
8
|
import { a as Ce, b as Ie, c as Ae } from "./injection-keys-e85udZCp.js";
|
|
9
|
-
import { M as Me, m as _e } from "./plugin-
|
|
9
|
+
import { M as Me, m as _e } from "./plugin-D4wizDXB.js";
|
|
10
10
|
import { shallowRef as I, computed as A, inject as O } from "vue";
|
|
11
11
|
function z(r) {
|
|
12
12
|
const e = S(r), o = async (t) => {
|
|
@@ -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-CcUq8W2Q.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.');
|