@agile-team/mach-report 2.25.1 → 2.26.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.
Files changed (143) hide show
  1. package/README.md +14 -8
  2. package/dist/ExcelBindingWizard-B418l44t.js +1578 -0
  3. package/dist/ExcelBindingWizard-C4FGVsY_.cjs +1 -0
  4. package/dist/{ParamEditor-CGfaweYX.cjs → ParamEditor-BemJE8n8.cjs} +1 -1
  5. package/dist/{ParamEditor-B7YVD28E.js → ParamEditor-XvMtf_XQ.js} +2 -2
  6. package/dist/{ReportBatchPanel-BRJt0TXp.cjs → ReportBatchPanel-CbY4fvXD.cjs} +1 -1
  7. package/dist/{ReportBatchPanel-BTKHtLTW.js → ReportBatchPanel-Ds0R_uXn.js} +37 -37
  8. package/dist/{ReportLabelStudio-BvK_WBke.cjs → ReportLabelStudio-DuTwN5er.cjs} +1 -1
  9. package/dist/{ReportLabelStudio-CZwqyO3t.js → ReportLabelStudio-ZFy79eRv.js} +26 -26
  10. package/dist/ReportParamPanel-Chxu4MTx.cjs +1 -0
  11. package/dist/{ReportParamPanel-DGXzBzl2.js → ReportParamPanel-Czm3OPo_.js} +216 -205
  12. package/dist/ReportPreview-C9c0Rp7Y.js +7380 -0
  13. package/dist/ReportPreview-CIMR4ERo.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-ClwxhnC0.cjs → ReportTemplateLibrary-C6lByc69.cjs} +1 -1
  15. package/dist/{ReportTemplateLibrary-C7sB0Jay.js → ReportTemplateLibrary-XJVoTDIz.js} +1 -1
  16. package/dist/{RuleEditor-CsDGFaWz.js → RuleEditor-CeNFPeOc.js} +5 -5
  17. package/dist/{RuleEditor-D-OdaGdR.cjs → RuleEditor-gggUkEwB.cjs} +1 -1
  18. package/dist/{TemplateOutlinePanel-DAqR9zQi.cjs → TemplateOutlinePanel-B0e-umq2.cjs} +1 -1
  19. package/dist/{TemplateOutlinePanel-CXOT7d1r.js → TemplateOutlinePanel-BWN4Y9iz.js} +2 -2
  20. package/dist/{TemplateReusePanel-Dcfx3Hba.js → TemplateReusePanel-CR-4OHoU.js} +2 -2
  21. package/dist/{TemplateReusePanel-ygIi-Ajz.cjs → TemplateReusePanel-Cthig1S1.cjs} +1 -1
  22. package/dist/{TemplateReviewPanel-COU8FqPq.js → TemplateReviewPanel-BkWzyNL4.js} +2 -2
  23. package/dist/{TemplateReviewPanel-DyGULVxr.cjs → TemplateReviewPanel-D8o2gDaK.cjs} +1 -1
  24. package/dist/analytics.cjs +1 -1
  25. package/dist/analytics.js +5 -5
  26. package/dist/artifact-integrity.json +106 -102
  27. package/dist/{assets-C4MIvzQ4.js → assets-BFTP-0WR.js} +2 -2
  28. package/dist/{assets-BYdpkTIt.cjs → assets-CZiZhTf2.cjs} +1 -1
  29. package/dist/{auto-D7x7QsWD.js → auto-C7udkeAa.js} +89 -88
  30. package/dist/auto-CXd2E2aZ.cjs +1 -0
  31. package/dist/capabilities-D8UU2clQ.cjs +1 -0
  32. package/dist/{capabilities-CN_kSVjO.js → capabilities-g0a2j9Yy.js} +50 -46
  33. package/dist/{charts-Cjw5AYkg.cjs → charts-D-Vg-ak9.cjs} +1 -1
  34. package/dist/{charts-CxJZ0XaY.js → charts-D48XCefN.js} +1 -1
  35. package/dist/computed-BQgBrma-.cjs +1 -0
  36. package/dist/{computed-f3pOqWLX.js → computed-CH3NYPOW.js} +198 -188
  37. package/dist/{data-bar-Bfh54sT4.js → data-bar-DjOgTLqu.js} +1 -1
  38. package/dist/{dataset-DL83majE.js → dataset-B8oTsC6o.js} +69 -66
  39. package/dist/dataset-D3OsyzG1.cjs +1 -0
  40. package/dist/designer-COuSUxZ1.cjs +2 -0
  41. package/dist/designer-CT4mlrr0.js +7997 -0
  42. package/dist/designer.cjs +1 -1
  43. package/dist/designer.d.cts +83 -4
  44. package/dist/designer.d.ts +83 -4
  45. package/dist/designer.js +4 -4
  46. package/dist/{diagnostic-collector-gB07PHy2.js → diagnostic-collector-C-JBA016.js} +2 -2
  47. package/dist/dom-DgWc-DY1.js +452 -0
  48. package/dist/dom-Fk4NF-gN.cjs +1 -0
  49. package/dist/{encoding-Amq3XrtU.js → encoding-D480EM2r.js} +2 -2
  50. package/dist/{encoding-DRVXs5xm.cjs → encoding-tWc2Wn89.cjs} +1 -1
  51. package/dist/execution-result-7sG_mdcD.cjs +1 -0
  52. package/dist/execution-result-Ba65gieT.js +39 -0
  53. package/dist/{font-loader-p_SyTvqt.cjs → font-loader-BIxme_9g.cjs} +1 -1
  54. package/dist/{font-loader-D4NLIKJL.js → font-loader-CHmEwkHl.js} +1 -1
  55. package/dist/{grid-strokes-DkZEZvcI.js → grid-strokes-DsoICRjZ.js} +1 -1
  56. package/dist/import-range-BwT86Z3j.cjs +1 -0
  57. package/dist/import-range-D9p_blcb.js +98 -0
  58. package/dist/index.cjs +1 -1
  59. package/dist/index.d.cts +1 -1
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.js +25 -25
  62. package/dist/{json-snapshot-CBVWZvyC.js → json-snapshot-BZ0CIQln.js} +1142 -951
  63. package/dist/json-snapshot-DGFeI30h.cjs +2 -0
  64. package/dist/{matrix-b6T291xo.js → matrix-CB9TqTEy.js} +1 -1
  65. package/dist/{matrix-DUYPRL7t.cjs → matrix-CcqYOuq_.cjs} +1 -1
  66. package/dist/{pdf-DU8HelKd.js → pdf-DTR7fAIr.js} +3596 -3517
  67. package/dist/{pdf-C060D5UY.cjs → pdf-d9oJ6V0P.cjs} +49 -49
  68. package/dist/pdf.cjs +1 -1
  69. package/dist/pdf.js +2 -2
  70. package/dist/{plugin-DHe8y5pD.cjs → plugin-B7Bi-1te.cjs} +1 -1
  71. package/dist/{plugin-BdCplNe1.js → plugin-OKDFQFS4.js} +1 -1
  72. package/dist/{prefill-Buy4NJ15.js → prefill-C8fF91JB.js} +3 -3
  73. package/dist/{prefill-Cw4ZYGXZ.cjs → prefill-C_Bf_AMo.cjs} +1 -1
  74. package/dist/{prepared-BlNeOjoO.cjs → prepared-BLhV7vdE.cjs} +1 -1
  75. package/dist/{prepared-CBJ7BkK0.js → prepared-DhgQ0d-h.js} +7 -7
  76. package/dist/protocol-CZ-BILne.cjs +1 -0
  77. package/dist/{protocol-CB19KXGr.js → protocol-DHO91-Jt.js} +3 -3
  78. package/dist/{record-bindings-Cv7lFiof.js → record-bindings-DBrCu6zO.js} +3 -3
  79. package/dist/{record-bindings-B7djSjNs.cjs → record-bindings-KEs-DKCS.cjs} +1 -1
  80. package/dist/region-binding-workflow-FSyIZge8.js +882 -0
  81. package/dist/region-binding-workflow-ikpY1Kbw.cjs +3 -0
  82. package/dist/report-encoding-worker.cjs +1 -1
  83. package/dist/report-encoding-worker.js +1 -1
  84. package/dist/rich-text-layout-BYbIc3eJ.cjs +3 -0
  85. package/dist/rich-text-layout-BtygMWZC.js +96 -0
  86. package/dist/runtime-B5HG8poy.cjs +1 -0
  87. package/dist/runtime-BsvAqz4a.js +204 -0
  88. package/dist/sbom.cdx.json +1 -1
  89. package/dist/server-node.cjs +5 -5
  90. package/dist/server-node.js +2323 -2120
  91. package/dist/server.cjs +1 -1
  92. package/dist/server.d.cts +35 -0
  93. package/dist/server.d.ts +35 -0
  94. package/dist/server.js +340 -328
  95. package/dist/style.css +1 -1
  96. package/dist/{template-catalog-CM6U_RlD.js → template-catalog-BbrN9dgu.js} +5 -5
  97. package/dist/{template-catalog-Cj66M84u.cjs → template-catalog-DDH-5J57.cjs} +1 -1
  98. package/dist/{template-fragments-BDxdCuMD.js → template-fragments-CUTE8-_I.js} +3 -3
  99. package/dist/{template-fragments-DbKdxI1z.cjs → template-fragments-cyAQu7aw.cjs} +1 -1
  100. package/dist/{template-registry-B-AK1oam.cjs → template-registry-D24Z8aQf.cjs} +1 -1
  101. package/dist/{template-registry-DeVgwEZj.js → template-registry-PSuLsnyq.js} +4 -4
  102. package/dist/{template-serialization-CqQY4zDg.cjs → template-serialization-BOUidUlh.cjs} +1 -1
  103. package/dist/{template-serialization-CWmHq7lX.js → template-serialization-BgGWYV_1.js} +1 -1
  104. package/dist/{textwrap-BywMBMXM.js → textwrap-Bt_tnI6V.js} +1 -1
  105. package/dist/vue/async.d.cts +46 -3
  106. package/dist/vue/async.d.ts +46 -3
  107. package/dist/vue/index.d.cts +217 -25
  108. package/dist/vue/index.d.ts +217 -25
  109. package/dist/vue-async.cjs +1 -1
  110. package/dist/vue-async.js +3 -3
  111. package/dist/vue.cjs +1 -1
  112. package/dist/vue.js +434 -202
  113. package/dist/workbook-session-BJfZVp4q.cjs +29 -0
  114. package/dist/{workbook-session-B6hRjTyX.js → workbook-session-DRnMjIFK.js} +2377 -2350
  115. package/dist/worker.cjs +1 -1
  116. package/dist/worker.js +4 -4
  117. package/dist/xlsx.cjs +1 -1
  118. package/dist/xlsx.d.cts +27 -2
  119. package/dist/xlsx.d.ts +27 -2
  120. package/dist/xlsx.js +15 -15
  121. package/package.json +1 -1
  122. package/dist/ExcelBindingWizard-bs3F4dD8.js +0 -1486
  123. package/dist/ExcelBindingWizard-jSdjBtWw.cjs +0 -1
  124. package/dist/ReportParamPanel-B27IGJjk.cjs +0 -1
  125. package/dist/ReportPreview-CnxaDTCO.js +0 -7170
  126. package/dist/ReportPreview-DqFBcsJQ.cjs +0 -6
  127. package/dist/auto-mPK9W0y5.cjs +0 -1
  128. package/dist/capabilities-D4nfhcvB.cjs +0 -1
  129. package/dist/computed-DK6BruFz.cjs +0 -1
  130. package/dist/dataset-IrlXbUvh.cjs +0 -1
  131. package/dist/designer-B597ZdC0.js +0 -7595
  132. package/dist/designer-DFIdv_n7.cjs +0 -2
  133. package/dist/dom-CXWMmwh-.cjs +0 -1
  134. package/dist/dom-DxdCMLzs.js +0 -452
  135. package/dist/json-snapshot-DCFEtfFw.cjs +0 -2
  136. package/dist/protocol-BU_4sXP0.cjs +0 -1
  137. package/dist/region-binding-workflow-EYxvUYJ-.js +0 -977
  138. package/dist/region-binding-workflow-NdkMSFCh.cjs +0 -3
  139. package/dist/rich-text-layout-Ch_N0Ubu.js +0 -52
  140. package/dist/rich-text-layout-yJGuThtC.cjs +0 -3
  141. package/dist/runtime-B5d_lQNQ.js +0 -227
  142. package/dist/runtime-BRx8Agqr.cjs +0 -1
  143. package/dist/workbook-session-BclW7KKH.cjs +0 -29
@@ -378,7 +378,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
378
378
  paramDefs: ReportParamDef[] | undefined;
379
379
  fetcher: PlanFetcher | null;
380
380
  }>;
381
- declare const __VLS_component_2: DefineComponent<__VLS_Props, {
381
+ declare const __VLS_component_2: DefineComponent<__VLS_Props_2, {
382
382
  focusSearch: () => void;
383
383
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
384
384
  export: (format: ReportExportFormat) => any;
@@ -392,7 +392,7 @@ declare const __VLS_component_2: DefineComponent<__VLS_Props, {
392
392
  "thumbs-toggle": () => any;
393
393
  "import-excel": () => any;
394
394
  "settings-toggle": () => any;
395
- }, string, MachReportVuePublicProps, Readonly<__VLS_Props> & Readonly<{
395
+ }, string, MachReportVuePublicProps, Readonly<__VLS_Props_2> & Readonly<{
396
396
  onExport?: ((format: ReportExportFormat) => any) | undefined;
397
397
  onZoom?: ((mode: number | "fit") => any) | undefined;
398
398
  onPrint?: (() => any) | undefined;
@@ -411,6 +411,12 @@ declare const __VLS_component_2: DefineComponent<__VLS_Props, {
411
411
  exportFormats: readonly ReportExportFormat[];
412
412
  }>;
413
413
  declare type __VLS_Props = {
414
+ source: ReportDocumentSource;
415
+ height?: string;
416
+ messages?: Partial<MachReportMessages>;
417
+ preset?: string;
418
+ };
419
+ declare type __VLS_Props_2 = {
414
420
  pageCount: number;
415
421
  currentPage: number;
416
422
  zoomMode: "fit" | "raw";
@@ -438,13 +444,13 @@ declare type __VLS_Props = {
438
444
  /** Standalone toolbar escape hatch; ReportPreview renders pagination in its footer. */
439
445
  showPagination?: boolean;
440
446
  };
441
- declare type __VLS_Props_2 = {
447
+ declare type __VLS_Props_3 = {
442
448
  pageCount: number;
443
449
  currentPage: number;
444
450
  messages: MachReportMessages;
445
451
  busy?: boolean;
446
452
  };
447
- declare type __VLS_Props_3 = {
453
+ declare type __VLS_Props_4 = {
448
454
  defs: ReportParamDef[];
449
455
  modelValue: Record<string, string>;
450
456
  messages: MachReportMessages;
@@ -457,21 +463,21 @@ declare type __VLS_Props_3 = {
457
463
  disabled?: boolean;
458
464
  loadOptions?: ReportParamOptionsLoader;
459
465
  };
460
- declare type __VLS_Props_4 = {
466
+ declare type __VLS_Props_5 = {
461
467
  issues: readonly ReportValidationIssue[];
462
468
  messages?: Partial<ReportValidationPanelMessages>;
463
469
  plan?: RenderPlan | null;
464
470
  busy?: boolean;
465
471
  };
466
- declare type __VLS_Props_5 = {
472
+ declare type __VLS_Props_6 = {
467
473
  state: ReportPrefillState;
468
474
  messages: ReportDataReviewMessages;
469
475
  };
470
- declare type __VLS_Props_6 = {
476
+ declare type __VLS_Props_7 = {
471
477
  state: ReportDataComparisonState;
472
478
  messages: ReportDataReviewMessages;
473
479
  };
474
- declare type __VLS_Props_7 = {
480
+ declare type __VLS_Props_8 = {
475
481
  messages: MachReportMessages;
476
482
  formats?: readonly ReportExportFormat[];
477
483
  busy?: boolean;
@@ -483,7 +489,7 @@ declare type __VLS_Props_7 = {
483
489
  disabled?: boolean;
484
490
  }[];
485
491
  };
486
- declare type __VLS_Props_8 = {
492
+ declare type __VLS_Props_9 = {
487
493
  task: Readonly<ReportPreviewTask> | null;
488
494
  messages?: MachReportMessages;
489
495
  };
@@ -496,6 +502,11 @@ declare function __VLS_template(): {
496
502
  messages: MachReportMessages;
497
503
  }): any;
498
504
  settings?(_: {}): any;
505
+ pagination?(_: {
506
+ pageCount: number;
507
+ currentPage: number;
508
+ gotoPage: typeof gotoPage;
509
+ }): any;
499
510
  default?(_: {}): any;
500
511
  };
501
512
  };
@@ -631,6 +642,7 @@ export declare function buildWordHtml(p: RenderPlan_2): {
631
642
  html: string;
632
643
  filename: string;
633
644
  };
645
+ declare function cancel(): void;
634
646
  /** Serializable symbol settings. Encoders remain in the optional /codes entry. */
635
647
  declare interface CodeOptions {
636
648
  /** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
@@ -965,7 +977,8 @@ export declare function createFetchRequest(options?: FetchRequestOptions): HostR
965
977
  export declare function createLocalFetcher(entries: Record<string, LocalTemplateEntry> | ReportRegistry): PlanFetcher;
966
978
  /** Independent physical test page. Its ruler is measured in millimetres, never CSS pixels. */
967
979
  export declare function createPrintCalibrationPlan(widthMm: number, heightMm: number): RenderPlan;
968
- /** Explicit persistence bridge. Merely registering ReportProvider never enables editing or saving. */
980
+ /** Explicit persistence bridge. Direct callbacks own one logical editing session;
981
+ * Preview instances isolate a shared bridge automatically. Registration never enables saving. */
969
982
  export declare function createProviderEditing(provider: ReportProvider, options?: ProviderEditingOptions): ReportEditingOptions;
970
983
  /** Optional browser convenience adapter. Access errors are handled by the preview. */
971
984
  export declare function createReportStoragePreferences(storage: Pick<Storage, "getItem" | "setItem" | "removeItem">): ReportPreferencesAdapter;
@@ -1006,6 +1019,72 @@ declare interface DiagnosticSummary<T> {
1006
1019
  readonly counts: Readonly<Record<string, number>>;
1007
1020
  };
1008
1021
  }
1022
+ /** Bounded detail window with exact occurrence totals. Unknown business codes beyond 128 buckets share `other`. */
1023
+ declare interface DiagnosticSummary_2<T> {
1024
+ readonly total: number;
1025
+ readonly counts: Readonly<Record<string, number>>;
1026
+ readonly entries: readonly T[];
1027
+ readonly omitted: number;
1028
+ /** Business value explanations form a separate presentation channel, including omitted locations. */
1029
+ readonly explanations?: {
1030
+ readonly total: number;
1031
+ readonly counts: Readonly<Record<string, number>>;
1032
+ };
1033
+ }
1034
+ /** Bounded detail window with exact occurrence totals. Unknown business codes beyond 128 buckets share `other`. */
1035
+ declare interface DiagnosticSummary_3<T> {
1036
+ readonly total: number;
1037
+ readonly counts: Readonly<Record<string, number>>;
1038
+ readonly entries: readonly T[];
1039
+ readonly omitted: number;
1040
+ /** Business value explanations form a separate presentation channel, including omitted locations. */
1041
+ readonly explanations?: {
1042
+ readonly total: number;
1043
+ readonly counts: Readonly<Record<string, number>>;
1044
+ };
1045
+ }
1046
+ declare interface ExcelImportDiagnostic extends ExcelImportDiagnosticLocation {
1047
+ code: ExcelImportDiagnosticCode;
1048
+ severity: "warning";
1049
+ message: string;
1050
+ }
1051
+ declare interface ExcelImportDiagnostic_2 extends ExcelImportDiagnosticLocation_2 {
1052
+ code: ExcelImportDiagnosticCode_2;
1053
+ severity: "warning";
1054
+ message: string;
1055
+ }
1056
+ declare type ExcelImportDiagnosticCode = "formula-shared" | "formula-cached" | "formula-result-missing" | "number-format" | "date-readonly" | "date-epoch" | "literal-placeholder" | "style-color" | "style-fill" | "style-border" | "style-alignment" | "font-decoration" | "rich-text-color" | "rich-text-decoration" | "hidden-column" | "hidden-row" | "paper-scale" | "hidden-sheet" | "protected-sheet" | "conditional-format" | "auto-filter" | "data-validation" | "image-omitted" | "image-segment" | "image-crop" | "image-transform" | "image-external" | "drawing-shape" | "chart" | "pivot" | "external-link" | "embedded-object";
1057
+ declare type ExcelImportDiagnosticCode_2 = "formula-shared" | "formula-cached" | "formula-result-missing" | "number-format" | "date-readonly" | "date-epoch" | "literal-placeholder" | "style-color" | "style-fill" | "style-border" | "style-alignment" | "font-decoration" | "rich-text-color" | "rich-text-decoration" | "hidden-column" | "hidden-row" | "paper-scale" | "hidden-sheet" | "protected-sheet" | "conditional-format" | "auto-filter" | "data-validation" | "image-omitted" | "image-segment" | "image-crop" | "image-transform" | "image-external" | "drawing-shape" | "chart" | "pivot" | "external-link" | "embedded-object";
1058
+ /** Original workbook coordinates, independent of preview segmentation. Rows/columns are one-based. */
1059
+ declare interface ExcelImportDiagnosticLocation {
1060
+ sheet?: string;
1061
+ range?: string;
1062
+ cell?: string;
1063
+ row?: number;
1064
+ column?: number;
1065
+ /** OOXML part when a workbook feature cannot safely be attributed to a sheet. */
1066
+ part?: string;
1067
+ }
1068
+ /** Original workbook coordinates, independent of preview segmentation. Rows/columns are one-based. */
1069
+ declare interface ExcelImportDiagnosticLocation_2 {
1070
+ sheet?: string;
1071
+ range?: string;
1072
+ cell?: string;
1073
+ row?: number;
1074
+ column?: number;
1075
+ /** OOXML part when a workbook feature cannot safely be attributed to a sheet. */
1076
+ part?: string;
1077
+ }
1078
+ declare interface ExcelImportDiagnostics {
1079
+ /** Bounded detail window (200); use summary counts for all feature occurrences. */
1080
+ diagnostics?: readonly ExcelImportDiagnostic[];
1081
+ diagnosticSummary?: DiagnosticSummary_2<ExcelImportDiagnostic>;
1082
+ }
1083
+ declare interface ExcelImportDiagnostics_2 {
1084
+ /** Bounded detail window (200); use summary counts for all feature occurrences. */
1085
+ diagnostics?: readonly ExcelImportDiagnostic_2[];
1086
+ diagnosticSummary?: DiagnosticSummary_3<ExcelImportDiagnostic_2>;
1087
+ }
1009
1088
  declare interface ExcelImportedSheet {
1010
1089
  name: string;
1011
1090
  /** Original, one-based workbook position. */
@@ -1086,16 +1165,17 @@ declare interface ExcelImportOptions_2 extends OutputTaskOptions_3 {
1086
1165
  /** Optional resource limits; hard ceilings prevent unbounded allocations. */
1087
1166
  limits?: ExcelImportLimits_2;
1088
1167
  }
1089
- declare interface ExcelImportResult {
1168
+ declare interface ExcelImportResult extends ExcelImportDiagnostics {
1090
1169
  template: ReportTemplate;
1091
1170
  warnings: string[];
1092
1171
  sheets: ExcelImportedSheet[];
1093
1172
  }
1094
- declare interface ExcelImportResult_2 {
1173
+ declare interface ExcelImportResult_2 extends ExcelImportDiagnostics_2 {
1095
1174
  template: ReportTemplate_3;
1096
1175
  warnings: string[];
1097
1176
  sheets: ExcelImportedSheet_2[];
1098
1177
  }
1178
+ declare function exportDocument(format: "pdf" | "xlsx"): Promise<ReportRuntimeExportResult>;
1099
1179
  declare interface ExpressionOptions {
1100
1180
  numeric?: "number" | "decimal";
1101
1181
  digits?: number;
@@ -1140,6 +1220,8 @@ declare interface FormulaAdapter_2 {
1140
1220
  rows: readonly Record<string, unknown>[];
1141
1221
  }): unknown;
1142
1222
  }
1223
+ declare function gotoPage(n: number): void;
1224
+ declare function gotoPage_2(page: number): Promise<void>;
1143
1225
  declare interface GridCell {
1144
1226
  /** Resolved visual only. Original value, text, editability and source are unchanged. */
1145
1227
  dataBar?: {
@@ -1779,8 +1861,9 @@ export declare type MachReportLogger = Pick<Console, "warn" | "info">;
1779
1861
  * - 优先级:组件 props > 路由级叠加 > preset > defaults(props 永远最高)
1780
1862
  */
1781
1863
  /** 工具栏与状态文案(默认简体中文;出海场景覆写) */
1782
- export declare interface MachReportMessages extends Partial<ReportCalculationMessages>, Partial<ReportDataReviewMessages>, Partial<ConflictReviewMessages>, ReportPrintMessages, ReportParamOptionsMessages {
1864
+ export declare interface MachReportMessages extends Partial<ReportDocumentMessages>, Partial<ReportCalculationMessages>, Partial<ReportDataReviewMessages>, Partial<ConflictReviewMessages>, ReportPrintMessages, ReportParamOptionsMessages {
1783
1865
  previousSnapshot?: string;
1866
+ importOmitted?: string;
1784
1867
  reviewTools?: string;
1785
1868
  validationTitle?: string;
1786
1869
  validationError?: string;
@@ -2518,6 +2601,24 @@ declare interface PlanTableFragment_3 {
2518
2601
  rowKey?: string | number;
2519
2602
  };
2520
2603
  }
2604
+ declare interface PreparedReport {
2605
+ plan: RenderPlan;
2606
+ diagnostics: ReportDiagnostic_2[];
2607
+ /** Present when an explicit diagnosticLimit bounds the detail array. Totals include omitted locations. */
2608
+ diagnosticSummary?: DiagnosticSummary_2<ReportDiagnostic_2>;
2609
+ stats: ReportRuntimeStats;
2610
+ revisions: Record<string, {
2611
+ revision?: string;
2612
+ sourceToken?: string;
2613
+ }>;
2614
+ /** Ordered occurrences; legacy revisions remains last-value-by-ID for compatibility. */
2615
+ sources?: ReportRuntimeSource[];
2616
+ /** Captured metrics identity; absence on old saved instances remains supported with diagnostics. */
2617
+ layout?: {
2618
+ textMetrics: "heuristic" | "provided" | "font-bytes";
2619
+ fontFingerprint?: string;
2620
+ };
2621
+ }
2521
2622
  /** Bounded concurrency, one stage timeout, and cancellation even for a hanging decoder. */
2522
2623
  export declare function preparePrintResources(doc: Document, options?: ReportPrintOptions, signal?: AbortSignal, base?: string): Promise<void>;
2523
2624
  declare interface PreviewEncoding {
@@ -2563,6 +2664,7 @@ export declare interface ProviderEditingOptions extends Pick<ReportEditingOption
2563
2664
  sourceToken?: Current<string | undefined>;
2564
2665
  onDiagnostic?(diagnostic: ReportDiagnostic): void;
2565
2666
  }
2667
+ declare function reload(): Promise<void>;
2566
2668
  declare interface RenderPlan {
2567
2669
  schemaVersion: string;
2568
2670
  /** 编辑需要模板重算上下文;跨 Worker/JSON 保留要求,但不声明本地会话可用。 */
@@ -2921,7 +3023,7 @@ declare interface ReportDataComparisonField {
2921
3023
  zeroDenominator?: "omit" | "zero-if-equal";
2922
3024
  missing?: "distinct" | "empty-equivalent" | "zero";
2923
3025
  }
2924
- export declare const ReportDataComparisonPanel: DefineComponent<__VLS_Props_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, MachReportVuePublicProps, Readonly<__VLS_Props_6> & Readonly<{}>, {}>;
3026
+ export declare const ReportDataComparisonPanel: DefineComponent<__VLS_Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, MachReportVuePublicProps, Readonly<__VLS_Props_7> & Readonly<{}>, {}>;
2925
3027
  export declare interface ReportDataComparisonReviewOptions extends ReportDataReviewSource {
2926
3028
  fields: readonly ReportDataComparisonField[];
2927
3029
  maxDifferences?: number;
@@ -3075,6 +3177,79 @@ declare interface ReportDiagnostic_2 extends Partial<Pick<OutputDiagnostic_2, "f
3075
3177
  target?: ReportDataTarget_2;
3076
3178
  }
3077
3179
  export declare type ReportDiscardReason = "reload" | "import" | "replace" | "leave";
3180
+ export declare interface ReportDocumentExportRequest {
3181
+ version: string;
3182
+ format: "pdf" | "xlsx";
3183
+ signal?: AbortSignal;
3184
+ }
3185
+ declare interface ReportDocumentManifest {
3186
+ scope: string;
3187
+ id: string;
3188
+ version: string;
3189
+ /** CAS token increases after each append and completion. */
3190
+ revision: number;
3191
+ state: "building" | "complete" | "failed";
3192
+ failure?: {
3193
+ code: "cancelled" | "generation";
3194
+ message: string;
3195
+ };
3196
+ pageCount: number;
3197
+ bytes: number;
3198
+ plan: Omit<RenderPlan, "pages">;
3199
+ metadata?: Omit<PreparedReport, "plan">;
3200
+ }
3201
+ export declare interface ReportDocumentMessages {
3202
+ documentBuilding: string;
3203
+ documentComplete: string;
3204
+ documentFailed: string;
3205
+ documentRefresh: string;
3206
+ documentLoading: string;
3207
+ documentCancel: string;
3208
+ documentFullExport: string;
3209
+ }
3210
+ export declare const ReportDocumentPreview: DefineComponent<__VLS_Props, {
3211
+ reload: typeof reload;
3212
+ gotoPage: typeof gotoPage_2;
3213
+ cancel: typeof cancel;
3214
+ export: typeof exportDocument;
3215
+ state: ComputedRef<{
3216
+ manifest: ReportDocumentManifest | null;
3217
+ currentPage: number;
3218
+ loading: boolean;
3219
+ exporting: boolean;
3220
+ error: string;
3221
+ }>;
3222
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3223
+ error: (message: string) => any;
3224
+ loaded: (manifest: Readonly<ReportDocumentManifest>) => any;
3225
+ exported: (result: ReportRuntimeExportResult) => any;
3226
+ }, string, MachReportVuePublicProps, Readonly<__VLS_Props> & Readonly<{
3227
+ onError?: ((message: string) => any) | undefined;
3228
+ onLoaded?: ((manifest: Readonly<ReportDocumentManifest>) => any) | undefined;
3229
+ onExported?: ((result: ReportRuntimeExportResult) => any) | undefined;
3230
+ }>, {
3231
+ height: string;
3232
+ messages: Partial<MachReportMessages>;
3233
+ preset: string;
3234
+ }>;
3235
+ /** Host-authorized transport. Export must encode the complete pinned document. */
3236
+ export declare interface ReportDocumentSource {
3237
+ load(input: ReportDocumentWindowRequest): Promise<ReportDocumentWindow>;
3238
+ export?(input: ReportDocumentExportRequest): Promise<ReportRuntimeExportResult>;
3239
+ }
3240
+ export declare interface ReportDocumentWindow {
3241
+ manifest: ReportDocumentManifest;
3242
+ pages: PlanPage[];
3243
+ nextPage: number;
3244
+ }
3245
+ export declare interface ReportDocumentWindowRequest {
3246
+ /** Omit only when opening or explicitly refreshing a document. */
3247
+ version?: string;
3248
+ /** Zero-based global page offset. */
3249
+ fromPage: number;
3250
+ limit: number;
3251
+ signal?: AbortSignal;
3252
+ }
3078
3253
  /** Serializable action metadata. URLs, scripts and automatic navigation are deliberately absent. */
3079
3254
  declare interface ReportDrillAction {
3080
3255
  id: string;
@@ -3211,10 +3386,10 @@ export declare interface ReportExportExecutionOptions {
3211
3386
  }
3212
3387
  /** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
3213
3388
  export declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
3214
- export declare const ReportExportMenu: DefineComponent<__VLS_Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3389
+ export declare const ReportExportMenu: DefineComponent<__VLS_Props_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3215
3390
  export: (format: ReportExportFormat) => any;
3216
3391
  action: (id: string) => any;
3217
- }, string, MachReportVuePublicProps, Readonly<__VLS_Props_7> & Readonly<{
3392
+ }, string, MachReportVuePublicProps, Readonly<__VLS_Props_8> & Readonly<{
3218
3393
  onExport?: ((format: ReportExportFormat) => any) | undefined;
3219
3394
  onAction?: ((id: string) => any) | undefined;
3220
3395
  }>, {}>;
@@ -3430,9 +3605,9 @@ declare interface ReportPageFlow_2 {
3430
3605
  declare interface ReportPageFlow_3 {
3431
3606
  bands: ReportFlowBand_3[];
3432
3607
  }
3433
- export declare const ReportPagination: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3608
+ export declare const ReportPagination: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3434
3609
  goto: (page: number) => any;
3435
- }, string, MachReportVuePublicProps, Readonly<__VLS_Props_2> & Readonly<{
3610
+ }, string, MachReportVuePublicProps, Readonly<__VLS_Props_3> & Readonly<{
3436
3611
  onGoto?: ((page: number) => any) | undefined;
3437
3612
  }>, {}>;
3438
3613
  /** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
@@ -3543,13 +3718,13 @@ export declare interface ReportParamOptionsMessages {
3543
3718
  paramNumberRangeStart?: string;
3544
3719
  paramNumberRangeEnd?: string;
3545
3720
  }
3546
- export declare const ReportParamPanel: DefineComponent<__VLS_Props_3, {
3721
+ export declare const ReportParamPanel: DefineComponent<__VLS_Props_4, {
3547
3722
  focusInvalid: typeof focusInvalid;
3548
3723
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3549
3724
  reset: () => any;
3550
3725
  query: () => any;
3551
3726
  "update:modelValue": (value: Record<string, string>) => any;
3552
- }, string, MachReportVuePublicProps, Readonly<__VLS_Props_3> & Readonly<{
3727
+ }, string, MachReportVuePublicProps, Readonly<__VLS_Props_4> & Readonly<{
3553
3728
  onReset?: (() => any) | undefined;
3554
3729
  onQuery?: (() => any) | undefined;
3555
3730
  "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
@@ -3651,7 +3826,7 @@ declare interface ReportPrefillItem {
3651
3826
  before?: ReportCellValue;
3652
3827
  after?: ReportCellValue;
3653
3828
  }
3654
- export declare const ReportPrefillPanel: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, MachReportVuePublicProps, Readonly<__VLS_Props_5> & Readonly<{}>, {}>;
3829
+ export declare const ReportPrefillPanel: DefineComponent<__VLS_Props_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, MachReportVuePublicProps, Readonly<__VLS_Props_6> & Readonly<{}>, {}>;
3655
3830
  declare interface ReportPrefillPreview {
3656
3831
  sourceScope?: string;
3657
3832
  datasetId: string;
@@ -3793,6 +3968,23 @@ declare interface ReportRuntimeBudget {
3793
3968
  maxPreparedBytes?: number;
3794
3969
  maxDurationMs?: number;
3795
3970
  }
3971
+ declare interface ReportRuntimeExportResult extends Omit<PreparedReport, "plan"> {
3972
+ bytes: Uint8Array;
3973
+ format: "pdf" | "xlsx";
3974
+ contentType: string;
3975
+ }
3976
+ /** One query occurrence; repeated report IDs retain independent provenance. */
3977
+ declare interface ReportRuntimeSource extends ReportQuerySource {
3978
+ /** Runtime provenance uses the same ordered occurrence scope as the query session. */
3979
+ reportScope: ReportQuerySource["reportScope"];
3980
+ }
3981
+ declare interface ReportRuntimeStats {
3982
+ rows: number;
3983
+ pages: number;
3984
+ cells: number;
3985
+ durationMs: number;
3986
+ outputBytes?: number;
3987
+ }
3796
3988
  declare interface ReportSaveInput extends ReportLoadContext {
3797
3989
  requestId: string;
3798
3990
  expectedRevision?: string;
@@ -3830,9 +4022,9 @@ declare interface ReportTaskMonitoring {
3830
4022
  onEvent?: ReportTaskObserver;
3831
4023
  }
3832
4024
  declare type ReportTaskObserver = (event: ReportTaskEvent) => void;
3833
- export declare const ReportTaskStatus: DefineComponent<__VLS_Props_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
4025
+ export declare const ReportTaskStatus: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3834
4026
  cancel: () => any;
3835
- }, string, MachReportVuePublicProps, Readonly<__VLS_Props_8> & Readonly<{
4027
+ }, string, MachReportVuePublicProps, Readonly<__VLS_Props_9> & Readonly<{
3836
4028
  onCancel?: (() => any) | undefined;
3837
4029
  }>, {
3838
4030
  messages: MachReportMessages;
@@ -3970,9 +4162,9 @@ declare interface ReportValidationIssue {
3970
4162
  severity: "error" | "warning";
3971
4163
  message: string;
3972
4164
  }
3973
- export declare const ReportValidationPanel: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
4165
+ export declare const ReportValidationPanel: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3974
4166
  locate: (issue: ReportValidationIssue) => any;
3975
- }, string, MachReportVuePublicProps, Readonly<__VLS_Props_4> & Readonly<{
4167
+ }, string, MachReportVuePublicProps, Readonly<__VLS_Props_5> & Readonly<{
3976
4168
  onLocate?: ((issue: ReportValidationIssue) => any) | undefined;
3977
4169
  }>, {}>;
3978
4170
  declare interface ReportValidationPanelMessages {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-DHe8y5pD.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-DqFBcsJQ.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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-B7Bi-1te.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-CIMR4ERo.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 o } from "./plugin-BdCplNe1.js";
2
- import { M as l } from "./plugin-BdCplNe1.js";
1
+ import { m as o } from "./plugin-OKDFQFS4.js";
2
+ import { M as l } from "./plugin-OKDFQFS4.js";
3
3
  function a() {
4
- return import("./ReportPreview-CnxaDTCO.js").then((t) => t.x);
4
+ return import("./ReportPreview-C9c0Rp7Y.js").then((t) => t.y);
5
5
  }
6
6
  const n = {
7
7
  install(t, r = {}) {
package/dist/vue.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("@agile-team/mach-report"),i=require("./ReportPreview-DqFBcsJQ.cjs"),a=require("./ReportParamPanel-B27IGJjk.cjs"),E=require("./injection-keys-Db_DyLkm.cjs"),M=require("./plugin-DHe8y5pD.cjs"),m=require("vue"),D=require("./json-snapshot-DCFEtfFw.cjs"),L=require("./diagnostic-collector-wASg6Fzs.cjs");function F(e){const r=g.createReportSource(e),n=async t=>{if(t.reportIds.length===0)throw new i.PlanLoadError("缺少报表 ID");for(const o of t.reportIds)if(!Object.prototype.hasOwnProperty.call(e,o)||!e[o])throw new i.PlanLoadError(`本地模板 ${o} 不存在`);return r(t)};return n.getParamDefs=r.getParamDefs,n}const x=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 b(){const e=m.shallowRef(null),r=()=>e.value?.state??x,n=Object.freeze({get loading(){return r().loading},get stale(){return r().stale??!1},get hasPlan(){return r().hasPlan},get pageCount(){return r().pageCount},get currentPage(){return r().currentPage},get exporting(){return r().exporting},get printing(){return r().printing},get canExport(){return r().canExport},get canPrint(){return r().canPrint},get error(){return r().error},get pdfFont(){return r().pdfFont},get editing(){return r().editing??!1},get saving(){return r().saving??!1},get importing(){return r().importing??!1},get dirty(){return r().dirty??!1},get pendingLocalChanges(){return r().pendingLocalChanges??!1},get task(){return r().task??null},get diagnostics(){return r().diagnostics??[]},get reportIds(){return r().reportIds??[]},get params(){return r().params??{}},get canUndo(){return r().canUndo??!1},get canRedo(){return r().canRedo??!1},get changeCount(){return r().changeCount??0},get selection(){return r().selection??null}});function t(){if(!e.value)throw new a.MachReportError("config","报表预览尚未挂载,请在 ready 后调用控制器");return e.value}return{ref(o){const s=o;e.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:m.computed(()=>e.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 f=t();if(!f.importExcel)throw new a.MachReportError("config","旧自定义控制器未提供 Excel 导入");return f.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 q(){return m.inject(E.MACH_REPORT_CONTROLLER_KEY,null)}function T(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function N(e){return Array.isArray(e)&&e.every(r=>T(r)&&typeof r.code=="string"&&typeof r.message=="string"&&["info","warning","error"].includes(r.severity)&&(r.path===void 0||typeof r.path=="string")&&D.hasValidDataExplanation(r))}function A(e){return typeof e=="number"&&Number.isFinite(e)&&(!Number.isInteger(e)||Number.isSafeInteger(e))}function k(e){return e==null||typeof e=="string"||typeof e=="boolean"||A(e)}function U(e){return e===void 0||typeof e=="string"&&!!e.trim()||A(e)}function G(e,r){return Array.isArray(e)&&e.every(n=>T(n)&&Number.isSafeInteger(n.editIndex)&&n.editIndex>=0&&n.editIndex<r&&typeof n.code=="string"&&typeof n.message=="string"&&k(n.currentValue)&&U(n.revision))}function j(e,r){let n;if(!T(e)||typeof e.revision!="string"||!e.revision.trim()?n="非空 revision(请先在适配器解包业务响应)":e.sourceToken!==void 0&&typeof e.sourceToken!="string"?n="字符串 sourceToken":e.diagnostics!==void 0&&!N(e.diagnostics)?n="结构化 diagnostics":e.conflicts!==void 0&&!G(e.conflicts,r)&&(n="有效 editIndex/code/message/currentValue/revision conflicts"),n)throw new a.MachReportError("edit",`ReportProvider.save 必须返回${n};服务器可能已提交,请重新查询确认后再编辑`)}function y(e){return typeof e=="function"?e():e}function w(e,r){const n=new Set(e.flatMap(t=>t.source?.[r]===void 0?[]:[String(t.source[r])]));return n.size===1?[...n][0]:void 0}function O(e,r,n,t,o,s=!1){return typeof e=="function"?e():s?t??o?.[n]??w(r,n)??e:w(r,n)??t??e??o?.[n]}function H(e,r,n){const t=r.query,o=e.reportId===void 0;if(o&&(!t||t.reportIds.length!==1))throw new a.MachReportError("config","自动业务保存需要当前成功查询的单个报表上下文");const s=e.reportId===void 0?t.reportIds[0]:y(e.reportId);if(!s.trim())throw new a.MachReportError("config","业务保存缺少报表 ID");if(o&&new Set(n.map(u=>u.source?.sourceScope)).size>1)throw new g.ReportCellEditError("atomic");const f={...y(e.params??t?.params??{})},p=t?.sources.filter(u=>u.reportId===s)??[],c=p.length===1?p[0]:void 0;return{reportId:s,params:f,source:c,automatic:o,identity:JSON.stringify([s,f,t?.queryId??t?.sources])}}function V(e){return e.requestId??globalThis.crypto?.randomUUID?.()??`mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function W(e,r={}){if(!e.save)throw new a.MachReportError("config","ReportProvider.save 未配置,无法启用业务保存");let n="",t,o,s=0;function f(c,u,R){c.conflicts?.length||u!==n||R!==s||(t=c.revision,o=c.sourceToken)}async function p(c,u){if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");const{reportId:R,params:C,identity:P,source:S,automatic:_}=H(r,u,c.edits),v=++s;if(P!==n&&(n=P,t=void 0,o=void 0),r.requireSource!==!1&&c.edits.some(l=>!l.source))throw new g.ReportCellEditError("missing");const d=await e.save({reportId:R,params:C,signal:u.signal,requestId:c.requestId,action:u.action,edits:i.cloneReportSnapshot(c.edits),expectedRevision:O(r.expectedRevision,c.edits,"revision",t,S,_),sourceToken:O(r.sourceToken,c.edits,"sourceToken",o,S,_)});if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");j(d,c.edits.length),d.diagnostics?.forEach(l=>L.observeOutput(()=>r.onDiagnostic?.(l)));const h=d.diagnostics?.filter(l=>l.severity==="error");if(h?.length)throw new a.MachReportError("edit",h.map(l=>l.message).join(";"),{diagnostics:h});const I=d.conflicts?.map(l=>({source:c.edits[l.editIndex]?.source,address:c.edits[l.editIndex]?.address,message:l.message,...l.currentValue===void 0?{}:{currentValue:l.currentValue},revision:l.revision??d.revision}));return f(d,P,v),{revision:d.revision,sourceToken:d.sourceToken,conflicts:I}}return{requireSource:r.requireSource??!0,canEdit:r.canEdit,readOnlyReason:r.readOnlyReason,history:r.history,fields:r.fields,validate:r.validate,validation:r.validation,validateBatch:r.validateBatch,saveBatch:p,save:(c,u)=>p({requestId:V(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.ReportDataComparisonPanel=i._sfc_main;exports.ReportExportMenu=i.ReportExportMenu;exports.ReportPagination=i.ReportPagination;exports.ReportPrefillPanel=i._sfc_main$1;exports.ReportPreview=i.ReportPreview;exports.ReportPrintResourceError=i.ReportPrintResourceError;exports.ReportTaskStatus=i.ReportTaskStatus;exports.ReportToolbar=i.ReportToolbar;exports.ReportValidationPanel=i.ReportValidationPanel;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_DATA_REVIEW_MESSAGES=a.DEFAULT_DATA_REVIEW_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.PARAM_OPTIONS_MESSAGES=a.PARAM_OPTIONS_MESSAGES;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.resolveDataReviewMessages=a.resolveDataReviewMessages;exports.snapshotPrintOptions=a.snapshotPrintOptions;exports.themeToCssVars=a.themeToCssVars;exports.toErrorDetail=a.toErrorDetail;exports.useMachReportConfig=a.useMachReportConfig;exports.MACH_REPORT_CONFIG_KEY=E.MACH_REPORT_CONFIG_KEY;exports.MACH_REPORT_CONTROLLER_KEY=E.MACH_REPORT_CONTROLLER_KEY;exports.MACH_REPORT_FETCHER_KEY=E.MACH_REPORT_FETCHER_KEY;exports.MACH_REPORT_PDF_EXPORTER_KEY=E.MACH_REPORT_PDF_EXPORTER_KEY;exports.MachReportPreview=M.MachReportPreview;exports.machReportPlugin=M.machReportPlugin;exports.createLocalFetcher=F;exports.createProviderEditing=W;exports.useMachReport=b;exports.useReportPreview=q;Object.keys(g).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>g[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("@agile-team/mach-report"),c=require("./ReportPreview-CIMR4ERo.cjs"),a=require("vue"),re=require("./execution-result-7sG_mdcD.cjs"),T=require("./diagnostic-collector-wASg6Fzs.cjs"),l=require("./ReportParamPanel-Chxu4MTx.cjs"),N=require("./json-snapshot-DGFeI30h.cjs"),J=require("./template-registry-D24Z8aQf.cjs"),oe=require("./_plugin-vue_export-helper-BLmdZLlg.cjs"),k=require("./injection-keys-Db_DyLkm.cjs"),$=require("./plugin-B7Bi-1te.cjs"),ne=3,ae=8e6,se=16e6,ie=7;function S(e){return new l.MachReportError("validate",e)}function ce(e){return!e||![e.scope,e.id,e.version].every(t=>typeof t=="string"&&!!t.trim()&&t.length<=256)||!["building","complete","failed"].includes(e.state)||!Number.isSafeInteger(e.pageCount)||e.pageCount<0||e.pageCount>1e5||e.revision!==e.pageCount+(e.state==="building"?0:1)||!Number.isSafeInteger(e.bytes)||e.bytes<0||!e.plan||"pages"in e.plan||!J.validateRenderPlan({...e.plan,pages:[]}).ok?!1:e.state!=="failed"||!!e.failure&&["cancelled","generation"].includes(e.failure.code)&&typeof e.failure.message=="string"&&e.failure.message.length<=1024}function U(e,t){if(Object.is(e,t))return!0;if(!e||!t||typeof e!="object"||typeof t!="object"||Array.isArray(e)!==Array.isArray(t))return!1;const n=e,r=t,o=Object.keys(n);return o.length===Object.keys(r).length&&o.every(i=>Object.prototype.hasOwnProperty.call(r,i)&&U(n[i],r[i]))}function le(e,t){if(t){if(e.scope!==t.scope||e.id!==t.id||e.version!==t.version)throw S("文档版本已变化,请刷新后重新打开");if(e.revision<t.revision||t.state!=="building"&&(e.revision!==t.revision||e.state!==t.state))throw S("文档修订发生回退或终态被修改");if(e.pageCount<t.pageCount||e.bytes<t.bytes||!U(e.plan,t.plan))throw S("文档已提交边界回退或计划头被修改");if(t.state!=="building"&&!U(e,t))throw S("终态文档清单被修改")}}function ue(e,t,n){const r=N.snapshotReportJson(e,{maxBytes:ae,check:()=>T.assertOutputActive(t.signal),error:(d,p)=>S(p)});if(!ce(r.manifest)||!Array.isArray(r.pages))throw S("文档页窗口清单无效");const{manifest:o,pages:i,nextPage:C}=r;if(N.snapshotReportJson(o,{maxBytes:1e6,error:(d,p)=>S(p)}),le(o,n),t.version!==void 0&&t.version!==o.version)throw S("文档返回了不同版本");const m=Math.min(t.fromPage,o.pageCount);if(i.length>t.limit||C!==m+i.length||C>o.pageCount||m<o.pageCount&&i.length===0)throw S("文档页窗口边界无效");if(!J.validateRenderPlan({...o.plan,pages:i}).ok)throw S("文档页内容无效");return r}function W(e){const t=new Map,n=new Map;let r,o=0,i=0,C=!1;function m(s,E){const g=new TextEncoder().encode(JSON.stringify(E)).byteLength,w=t.get(s);for(w&&(o-=w.bytes),t.delete(s),t.set(s,{page:E,bytes:g}),o+=g;t.size>ie||o>se;){const h=t.keys().next().value;o-=t.get(h).bytes,t.delete(h)}}function d(s){const E=n.get(s);if(E)return E;const g=new AbortController,w=i,h={fromPage:s,limit:ne,version:r?.version,signal:g.signal},v={controller:g,users:0,promise:T.waitForOutput(Promise.resolve().then(()=>(T.assertOutputActive(g.signal),e.load({...h}))),g.signal).then(y=>{if(T.assertOutputActive(g.signal),w!==i)throw S("文档加载已被替换");const _=ue(y,h,r);return r=_.manifest,_.pages.forEach((A,P)=>m(s+P,A)),_}).finally(()=>{n.get(s)===v&&n.delete(s)})};return n.set(s,v),v}async function p(s,E){if(T.assertOutputActive(E),C||!Number.isSafeInteger(s)||s<0||s>=1e5)throw S("文档页索引无效或预览已关闭");const g=t.get(s);if(g&&r)return t.delete(s),t.set(s,g),c.cloneReportSnapshot({manifest:r,page:g.page});const w=s,h=d(w);h.users++;try{const v=await T.waitForOutput(h.promise,E);if(T.assertOutputActive(E),s>=v.manifest.pageCount&&(v.manifest.pageCount>0||s>0))throw S("页码超出文档范围");const y=v.pages[s-w];if(!y&&s<v.manifest.pageCount)throw S("目标页未返回,请缩小页窗口");return c.cloneReportSnapshot({manifest:v.manifest,...y?{page:y}:{}})}finally{--h.users===0&&n.get(w)===h&&(n.delete(w),h.controller.abort())}}function R(){i++;for(const s of n.values())s.controller.abort();n.clear(),t.clear(),o=0,r=void 0}return{load:p,reset:R,dispose:()=>{R(),C=!0},get cachedPages(){return t.size},get cachedBytes(){return o}}}const pe=["aria-busy"],fe={class:"mrp-document-status",role:"status"},de={key:0,class:"mrp-document-error",role:"alert"},ge=a.defineComponent({__name:"ReportDocumentPreview",props:{source:{},height:{default:"100vh"},messages:{default:void 0},preset:{default:void 0}},emits:["loaded","error","exported"],setup(e,{expose:t,emit:n}){const r=e,o=n,i=l.useMachReportConfig(),C=a.computed(()=>l.resolveConfig(i.value,r.preset)),m=a.computed(()=>({...l.DEFAULT_DOCUMENT_MESSAGES,...C.value.messages,...r.messages})),d=a.shallowRef(),p=a.shallowRef(),R=a.ref(1),s=a.ref(!1),E=a.ref(!1),g=a.ref(""),w=a.ref(!1);let h=W(r.source),v=0,y=!1,_,A;const P=async()=>c.cloneReportSnapshot(p.value),j=a.ref(""),V=a.computed(()=>!!r.source.export&&d.value?.state==="complete"&&d.value.pageCount>0&&!w.value),Q=a.computed(()=>{if(s.value)return m.value.documentLoading;const u=d.value;return u?(u.state==="building"?m.value.documentBuilding:u.state==="failed"?m.value.documentFailed:m.value.documentComplete).replace("{pages}",String(u.pageCount)):""});function L(u){g.value=u instanceof Error?u.message:String(u),o("error",g.value)}function D(){v++,_?.abort(),A?.abort(),_=void 0,A=void 0,s.value=!1,E.value=!1}function ee(u){if(u.target instanceof Element&&u.target.closest("input,textarea,select,[contenteditable=true]")||u.ctrlKey||u.metaKey||u.altKey||s.value||E.value||!d.value?.pageCount)return;const O={PageDown:R.value+1,PageUp:R.value-1,Home:1,End:d.value.pageCount}[u.key];O!==void 0&&(u.preventDefault(),u.stopPropagation(),M(Math.max(1,Math.min(O,d.value.pageCount))))}async function M(u){if(!Number.isSafeInteger(u)||u<1||d.value&&u>d.value.pageCount)throw new l.MachReportError("param",m.value.pageJumpInvalid??"请输入有效页码");_?.abort();const b=new AbortController,O=++v;_=b,s.value=!0,g.value="";try{const f=await h.load(u-1,b.signal);if(T.assertOutputActive(b.signal),O!==v)return;d.value=f.manifest,R.value=u,w.value=!1,p.value={...f.manifest.plan,pages:f.page?[f.page]:[]},j.value=JSON.stringify([f.manifest.scope,f.manifest.id,f.manifest.version,u]),o("loaded",c.cloneReportSnapshot(f.manifest))}catch(f){!b.signal.aborted&&O===v&&(w.value=!0,L(f))}finally{O===v&&(s.value=!1,_=void 0)}}async function B(){D(),h.reset(),w.value=!!p.value,d.value=void 0,await M(1)}async function G(u){const b=r.source,O=d.value;if(!b.export||!O||!V.value||s.value||E.value)throw new l.MachReportError("export",m.value.documentFullExport);const f=new AbortController;A=f,E.value=!0;try{const I=await T.waitForOutput(b.export({version:O.version,format:u,signal:f.signal}),f.signal);if(T.assertOutputActive(f.signal),re.assertReportExportResult(I,u),b!==r.source||d.value?.version!==O.version||I.stats.pages!==O.pageCount)throw new l.MachReportError("export","完整文档导出的版本或页数不一致");return o("exported",I),I}finally{A===f&&(E.value=!1,A=void 0)}}async function te(u){if(u!=="pdf"&&u!=="xlsx")return;const b=v,O=r.source;try{const f=await G(u),I=new Blob([Uint8Array.from(f.bytes).buffer],{type:f.contentType}),H=URL.createObjectURL(I),F=document.createElement("a");F.href=H,F.download=`report.${u}`,F.click(),setTimeout(()=>URL.revokeObjectURL(H),1e4)}catch(f){if(b!==v||O!==r.source||f&&typeof f=="object"&&"name"in f&&f.name==="AbortError")return;L(f)}}return a.watch(()=>r.source,()=>{D(),h.dispose(),h=W(r.source),p.value=void 0,d.value=void 0,y&&M(1)}),a.onMounted(()=>{y=!0,M(1)}),a.onUnmounted(()=>{y=!1,D(),h.dispose()}),t({reload:B,gotoPage:M,cancel:D,export:G,state:a.computed(()=>c.cloneReportSnapshot({manifest:d.value??null,currentPage:R.value,loading:s.value,exporting:E.value,error:g.value}))}),(u,b)=>(a.openBlock(),a.createElementBlock("section",{class:"mrp-document",style:a.normalizeStyle({...a.unref(l.themeToCssVars)(C.value.theme),height:e.height}),"aria-busy":s.value||E.value,onKeydownCapture:ee},[a.createElementVNode("div",fe,[a.createElementVNode("span",null,a.toDisplayString(Q.value),1),s.value||E.value?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",onClick:D},a.toDisplayString(m.value.documentCancel),1)):(a.openBlock(),a.createElementBlock("button",{key:1,type:"button",onClick:B},a.toDisplayString(m.value.documentRefresh),1))]),g.value?(a.openBlock(),a.createElementBlock("div",de,a.toDisplayString(g.value),1)):a.createCommentVNode("",!0),p.value?(a.openBlock(),a.createBlock(c.ReportPreview,{key:1,"report-id":j.value,fetcher:P,height:"100%",messages:m.value,preset:e.preset,editable:!1,"excel-import":!1,prefill:!1,"data-comparison":!1,"show-params":!1,"show-export":V.value,"show-print":!1,"show-pdf-window":!1,"show-settings":!1,toolbar:{search:!1,thumbnails:!1,exportFormats:[]},interaction:{navigation:!1,calculations:!1},onError:L},{export:a.withCtx(()=>[a.createVNode(c.ReportExportMenu,{messages:m.value,formats:["pdf","xlsx"],busy:s.value||E.value,onExport:te},null,8,["messages","busy"])]),pagination:a.withCtx(()=>[a.createVNode(c.ReportPagination,{"page-count":d.value?.pageCount??0,"current-page":R.value,messages:m.value,busy:s.value||E.value,onGoto:M},null,8,["page-count","current-page","messages","busy"])]),_:1},8,["report-id","messages","preset","show-export"])):a.createCommentVNode("",!0)],44,pe))}}),me=oe._export_sfc(ge,[["__scopeId","data-v-69238bdb"]]);function Ee(e){const t=x.createReportSource(e),n=async r=>{if(r.reportIds.length===0)throw new c.PlanLoadError("缺少报表 ID");for(const o of r.reportIds)if(!Object.prototype.hasOwnProperty.call(e,o)||!e[o])throw new c.PlanLoadError(`本地模板 ${o} 不存在`);return t(r)};return n.getParamDefs=t.getParamDefs,n}const Re=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 he(){const e=a.shallowRef(null),t=()=>e.value?.state??Re,n=Object.freeze({get loading(){return t().loading},get stale(){return t().stale??!1},get hasPlan(){return t().hasPlan},get pageCount(){return t().pageCount},get currentPage(){return t().currentPage},get exporting(){return t().exporting},get printing(){return t().printing},get canExport(){return t().canExport},get canPrint(){return t().canPrint},get error(){return t().error},get pdfFont(){return t().pdfFont},get editing(){return t().editing??!1},get saving(){return t().saving??!1},get importing(){return t().importing??!1},get dirty(){return t().dirty??!1},get pendingLocalChanges(){return t().pendingLocalChanges??!1},get task(){return t().task??null},get diagnostics(){return t().diagnostics??[]},get reportIds(){return t().reportIds??[]},get params(){return t().params??{}},get canUndo(){return t().canUndo??!1},get canRedo(){return t().canRedo??!1},get changeCount(){return t().changeCount??0},get selection(){return t().selection??null}});function r(){if(!e.value)throw new l.MachReportError("config","报表预览尚未挂载,请在 ready 后调用控制器");return e.value}return{ref(o){const i=o;e.value=i&&typeof i.reload=="function"&&typeof i.print=="function"&&typeof i.exportAs=="function"&&typeof i.openPdfWindow=="function"&&typeof i.gotoPage=="function"&&typeof i.setParams=="function"?i:null},ready:a.computed(()=>e.value!==null),state:n,async checkPdfFont(){const o=r();return o.checkPdfFont?o.checkPdfFont():{status:"unverified",fontUrl:"",message:"旧自定义控制器未提供字体检查,请由宿主确认字体配置"}},cancelTask(){r().cancelTask?.()},async confirmDiscard(o){return await r().confirmDiscard?.(o)??!0},getOutputDiagnostics(o){return r().getOutputDiagnostics?.(o)??[]},async reload(){await r().reload()},async print(){await r().print()},async exportAs(o){await r().exportAs(o)},openPdfWindow(){r().openPdfWindow()},gotoPage(o){r().gotoPage(o)},async setParams(o,i){await r().setParams(o,i)},async importExcel(o,i){const C=r();if(!C.importExcel)throw new l.MachReportError("config","旧自定义控制器未提供 Excel 导入");return C.importExcel(o,i)},getPlan(){return r().getPlan?.()??null},getChanges(){return r().getChanges?.()??[]},getDifferences:()=>r().getDifferences?.()??[],undo:async()=>await r().undo?.()??!1,redo:async()=>await r().redo?.()??!1,restoreChanges:async()=>await r().restoreChanges?.()??!1,getSelection:()=>r().getSelection?.()??null,focusCell:async(o,i)=>await r().focusCell?.(o,i)??!1,focusField:async o=>await r().focusField?.(o)??!1,copySelection:()=>r().copySelection?.()??"",pasteSelection:async o=>await r().pasteSelection?.(o)??!1}}function ve(){return a.inject(k.MACH_REPORT_CONTROLLER_KEY,null)}function q(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function ye(e){return Array.isArray(e)&&e.every(t=>q(t)&&typeof t.code=="string"&&typeof t.message=="string"&&["info","warning","error"].includes(t.severity)&&(t.path===void 0||typeof t.path=="string")&&N.hasValidDataExplanation(t))}function X(e){return typeof e=="number"&&Number.isFinite(e)&&(!Number.isInteger(e)||Number.isSafeInteger(e))}function Pe(e){return e==null||typeof e=="string"||typeof e=="boolean"||X(e)}function we(e){return e===void 0||typeof e=="string"&&!!e.trim()||X(e)}function Ce(e,t){return Array.isArray(e)&&e.every(n=>q(n)&&Number.isSafeInteger(n.editIndex)&&n.editIndex>=0&&n.editIndex<t&&typeof n.code=="string"&&typeof n.message=="string"&&Pe(n.currentValue)&&we(n.revision))}function Se(e,t){let n;if(!q(e)||typeof e.revision!="string"||!e.revision.trim()?n="非空 revision(请先在适配器解包业务响应)":e.sourceToken!==void 0&&typeof e.sourceToken!="string"?n="字符串 sourceToken":e.diagnostics!==void 0&&!ye(e.diagnostics)?n="结构化 diagnostics":e.conflicts!==void 0&&!Ce(e.conflicts,t)&&(n="有效 editIndex/code/message/currentValue/revision conflicts"),n)throw new l.MachReportError("edit",`ReportProvider.save 必须返回${n};服务器可能已提交,请重新查询确认后再编辑`)}function K(e){return typeof e=="function"?e():e}function z(e,t){const n=new Set(e.flatMap(r=>r.source?.[t]===void 0?[]:[String(r.source[t])]));return n.size===1?[...n][0]:void 0}function Y(e,t,n,r,o,i=!1){return typeof e=="function"?e():i?r??o?.[n]??z(t,n)??e:z(t,n)??r??e??o?.[n]}function _e(e,t,n){const r=t.query,o=e.reportId===void 0;if(o&&(!r||r.reportIds.length!==1))throw new l.MachReportError("config","自动业务保存需要当前成功查询的单个报表上下文");const i=e.reportId===void 0?r.reportIds[0]:K(e.reportId);if(!i.trim())throw new l.MachReportError("config","业务保存缺少报表 ID");if(o&&new Set(n.map(p=>p.source?.sourceScope)).size>1)throw new x.ReportCellEditError("atomic");const C={...K(e.params??r?.params??{})},m=r?.sources.filter(p=>p.reportId===i)??[],d=m.length===1?m[0]:void 0;return{reportId:i,params:C,source:d,automatic:o,identity:JSON.stringify([i,C,r?.queryId,r?.sources])}}function be(e){return e.requestId??globalThis.crypto?.randomUUID?.()??`mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function Z(e,t={}){if(!e.save)throw new l.MachReportError("config","ReportProvider.save 未配置,无法启用业务保存");let n="",r,o,i=0;function C(p,R,s){p.conflicts?.length||R!==n||s!==i||(r=p.revision,p.sourceToken!==void 0&&(o=p.sourceToken))}async function m(p,R){if(R.signal.aborted)throw R.signal.reason??new DOMException("Aborted","AbortError");const{reportId:s,params:E,identity:g,source:w,automatic:h}=_e(t,R,p.edits),v=++i;if(g!==n&&(n=g,r=void 0,o=void 0),t.requireSource!==!1&&p.edits.some(P=>!P.source))throw new x.ReportCellEditError("missing");const y=await e.save({reportId:s,params:E,signal:R.signal,requestId:p.requestId,action:R.action,edits:c.cloneReportSnapshot(p.edits),expectedRevision:Y(t.expectedRevision,p.edits,"revision",r,w,h),sourceToken:Y(t.sourceToken,p.edits,"sourceToken",o,w,h)});if(R.signal.aborted)throw R.signal.reason??new DOMException("Aborted","AbortError");Se(y,p.edits.length),y.diagnostics?.forEach(P=>T.observeOutput(()=>t.onDiagnostic?.(P)));const _=y.diagnostics?.filter(P=>P.severity==="error");if(_?.length)throw new l.MachReportError("edit",_.map(P=>P.message).join(";"),{diagnostics:_});const A=y.conflicts?.map(P=>({source:p.edits[P.editIndex]?.source,address:p.edits[P.editIndex]?.address,message:P.message,...P.currentValue===void 0?{}:{currentValue:P.currentValue},revision:P.revision??y.revision}));return C(y,g,v),{revision:y.revision,sourceToken:y.sourceToken,conflicts:A}}const d={requireSource:t.requireSource??!0,canEdit:t.canEdit,readOnlyReason:t.readOnlyReason,history:t.history,fields:t.fields,validate:t.validate,validation:t.validation,validateBatch:t.validateBatch,saveBatch:m,save:(p,R)=>m({requestId:be(R),edits:[c.cloneReportSnapshot(p)]},R)};return c.registerProviderEditing(d,()=>Z(e,t)),d}exports.PlanLoadError=c.PlanLoadError;exports.REPORT_EXPORT_FORMATS=c.REPORT_EXPORT_FORMATS;exports.REPORT_PREVIEW_TOOLS=c.REPORT_PREVIEW_TOOLS;exports.ReportDataComparisonPanel=c._sfc_main;exports.ReportExportMenu=c.ReportExportMenu;exports.ReportPagination=c.ReportPagination;exports.ReportPrefillPanel=c._sfc_main$1;exports.ReportPreview=c.ReportPreview;exports.ReportPrintResourceError=c.ReportPrintResourceError;exports.ReportTaskStatus=c.ReportTaskStatus;exports.ReportToolbar=c.ReportToolbar;exports.ReportValidationPanel=c.ReportValidationPanel;exports.buildPrintDocument=c.buildPrintDocument;exports.buildWordHtml=c.buildWordHtml;exports.createDefaultPdfExporter=c.createDefaultPdfExporter;exports.createFetchRequest=c.createFetchRequest;exports.createPrintCalibrationPlan=c.createPrintCalibrationPlan;exports.createReportStoragePreferences=c.createReportStoragePreferences;exports.joinReportIds=c.joinReportIds;exports.normalizeReportIds=c.normalizeReportIds;exports.preparePrintResources=c.preparePrintResources;exports.printPlans=c.printPlans;exports.usePageWindow=c.usePageWindow;exports.usePrintExport=c.usePrintExport;exports.useZoom=c.useZoom;exports.DEFAULT_CALCULATION_MESSAGES=l.DEFAULT_CALCULATION_MESSAGES;exports.DEFAULT_DATA_REVIEW_MESSAGES=l.DEFAULT_DATA_REVIEW_MESSAGES;exports.DEFAULT_MESSAGES=l.DEFAULT_MESSAGES;exports.DEFAULT_PRINT_MESSAGES=l.DEFAULT_PRINT_MESSAGES;exports.DEFAULT_THEME=l.DEFAULT_THEME;exports.MachReportError=l.MachReportError;exports.PARAM_OPTIONS_MESSAGES=l.PARAM_OPTIONS_MESSAGES;exports.ReportParamPanel=l.ReportParamPanel;exports.SILENT_LOGGER=l.SILENT_LOGGER;exports.defineMachReportConfig=l.defineMachReportConfig;exports.defineMachReportPreset=l.defineMachReportPreset;exports.normalizeReportLoadError=l.normalizeReportLoadError;exports.printCalibration=l.printCalibration;exports.provideMachReportConfig=l.provideMachReportConfig;exports.resolveCalculationMessages=l.resolveCalculationMessages;exports.resolveConfig=l.resolveConfig;exports.resolveDataReviewMessages=l.resolveDataReviewMessages;exports.snapshotPrintOptions=l.snapshotPrintOptions;exports.themeToCssVars=l.themeToCssVars;exports.toErrorDetail=l.toErrorDetail;exports.useMachReportConfig=l.useMachReportConfig;exports.MACH_REPORT_CONFIG_KEY=k.MACH_REPORT_CONFIG_KEY;exports.MACH_REPORT_CONTROLLER_KEY=k.MACH_REPORT_CONTROLLER_KEY;exports.MACH_REPORT_FETCHER_KEY=k.MACH_REPORT_FETCHER_KEY;exports.MACH_REPORT_PDF_EXPORTER_KEY=k.MACH_REPORT_PDF_EXPORTER_KEY;exports.MachReportPreview=$.MachReportPreview;exports.machReportPlugin=$.machReportPlugin;exports.ReportDocumentPreview=me;exports.createLocalFetcher=Ee;exports.createProviderEditing=Z;exports.useMachReport=he;exports.useReportPreview=ve;Object.keys(x).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>x[e]})});