@agile-team/mach-report 2.23.1 → 2.24.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 (149) hide show
  1. package/README.md +8 -2
  2. package/dist/{ExcelBindingWizard-BrTmdo7f.cjs → ExcelBindingWizard-BV12hGiK.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-CcDMLO8Q.js → ExcelBindingWizard-Cy_lPjWV.js} +3 -3
  4. package/dist/ParamEditor-DenKjvKu.cjs +1 -0
  5. package/dist/ParamEditor-PyOqHzzw.js +750 -0
  6. package/dist/{ReportBatchPanel-CJB67WNd.js → ReportBatchPanel-8EFtMrKk.js} +2 -2
  7. package/dist/{ReportBatchPanel-CHxBtG9R.cjs → ReportBatchPanel-pQ6d0yqJ.cjs} +1 -1
  8. package/dist/ReportLabelStudio-B_KF3Zc_.cjs +1 -0
  9. package/dist/{ReportLabelStudio-Tplc1TLJ.js → ReportLabelStudio-HUeo2TsU.js} +68 -68
  10. package/dist/ReportParamPanel-8xR85nz-.cjs +1 -0
  11. package/dist/{ReportParamPanel-GI43aGa0.js → ReportParamPanel-DA-YpkvC.js} +328 -298
  12. package/dist/ReportPreview-CyUXJSVX.cjs +6 -0
  13. package/dist/ReportPreview-_wTJnsG1.js +7120 -0
  14. package/dist/{ReportTemplateLibrary-BFQIX0sg.cjs → ReportTemplateLibrary-CjArKxRG.cjs} +1 -1
  15. package/dist/{ReportTemplateLibrary-KqX4E2sN.js → ReportTemplateLibrary-DH8jl9IF.js} +28 -28
  16. package/dist/RuleEditor-Bmj98oC4.cjs +1 -0
  17. package/dist/{RuleEditor-OPX1awrH.js → RuleEditor-GDydlEHz.js} +846 -834
  18. package/dist/{TemplateOutlinePanel-CVYKVLv_.cjs → TemplateOutlinePanel-B554_qk1.cjs} +1 -1
  19. package/dist/{TemplateOutlinePanel-DQS-eOs6.js → TemplateOutlinePanel-DjPqzU9h.js} +10 -10
  20. package/dist/{TemplateReusePanel-CY6O93Zk.cjs → TemplateReusePanel-D0628OYc.cjs} +1 -1
  21. package/dist/{TemplateReusePanel-DKXiFTyB.js → TemplateReusePanel-DtYbCN7U.js} +2 -2
  22. package/dist/TemplateReviewPanel-CSwvCz3f.cjs +1 -0
  23. package/dist/TemplateReviewPanel-D_FR4ISq.js +602 -0
  24. package/dist/artifact-integrity.json +94 -94
  25. package/dist/assets-B4AJIOTB.cjs +1 -0
  26. package/dist/assets-D0FbszhB.js +137 -0
  27. package/dist/{auto-BB99S802.js → auto-BksreoKc.js} +5 -5
  28. package/dist/auto-C3mGqzJ8.cjs +1 -0
  29. package/dist/capabilities-CTwlcl8q.cjs +1 -0
  30. package/dist/capabilities-lqDEZSq5.js +121 -0
  31. package/dist/data-bar-2NLRzOCQ.cjs +1 -0
  32. package/dist/{data-bar-IkI6VvMQ.js → data-bar-BnGtnJ82.js} +1 -1
  33. package/dist/designer-BNf7NWd6.js +7589 -0
  34. package/dist/designer-DWnZZ_ej.cjs +2 -0
  35. package/dist/designer.cjs +1 -1
  36. package/dist/designer.d.cts +137 -4
  37. package/dist/designer.d.ts +137 -4
  38. package/dist/designer.js +5 -5
  39. package/dist/diagnostic-collector-1sqd7DQP.js +355 -0
  40. package/dist/diagnostic-collector-D3rlvxm3.cjs +1 -0
  41. package/dist/{dom-JWrchIre.js → dom-C90cTM6Y.js} +4 -4
  42. package/dist/dom-CxOkm_Sy.cjs +1 -0
  43. package/dist/{encoding-7lquyj0w.cjs → encoding-CkziAnZI.cjs} +1 -1
  44. package/dist/{encoding-CEd-dq9A.js → encoding-DSc9zv2F.js} +2 -2
  45. package/dist/{font-loader-D8pI87fL.cjs → font-loader-D-znWNWS.cjs} +1 -1
  46. package/dist/{font-loader-CNWXomuV.js → font-loader-i7lZbqH_.js} +1 -1
  47. package/dist/{grid-strokes-EoY66L2f.js → grid-strokes-BPiV1WHe.js} +1 -1
  48. package/dist/grid-strokes-DYf-6DMl.cjs +1 -0
  49. package/dist/index.cjs +5 -5
  50. package/dist/index.d.cts +46 -7
  51. package/dist/index.d.ts +46 -7
  52. package/dist/index.js +69 -68
  53. package/dist/{json-snapshot-BRnzKudk.js → json-snapshot-BJWZNryO.js} +919 -791
  54. package/dist/json-snapshot-C7QZrRBf.cjs +2 -0
  55. package/dist/{pdf-CJToa81Z.js → pdf-0_5XiTCx.js} +2499 -2492
  56. package/dist/{pdf-DpMkW72B.cjs → pdf-DWuq6uxx.cjs} +31 -31
  57. package/dist/pdf.cjs +1 -1
  58. package/dist/pdf.d.cts +18 -0
  59. package/dist/pdf.d.ts +18 -0
  60. package/dist/pdf.js +2 -2
  61. package/dist/{plugin-_BkUVc2z.js → plugin-B1ydqEmS.js} +1 -1
  62. package/dist/{plugin-BWTp-X7b.cjs → plugin-BQBz2vLG.cjs} +1 -1
  63. package/dist/prefill-2p9wrpn9.cjs +1 -0
  64. package/dist/{prefill-CWGdnqQd.js → prefill-Cuzh1wxf.js} +13 -13
  65. package/dist/prepared-CVbgO9KR.js +128 -0
  66. package/dist/prepared-DAwe8Il2.cjs +1 -0
  67. package/dist/protocol-BOri9qJL.js +105 -0
  68. package/dist/protocol-DD5dHSz-.cjs +1 -0
  69. package/dist/record-bindings-CAyM5tGg.cjs +1 -0
  70. package/dist/{record-bindings-DatJZv_e.js → record-bindings-fhav-NLG.js} +1 -1
  71. package/dist/{region-binding-workflow-DjrXuR1q.js → region-binding-workflow-Cm4mqhih.js} +2 -2
  72. package/dist/{region-binding-workflow-l7NGfagJ.cjs → region-binding-workflow-DWCUgjZl.cjs} +1 -1
  73. package/dist/report-encoding-worker.cjs +1 -1
  74. package/dist/report-encoding-worker.js +1 -1
  75. package/dist/rich-text-layout-X9YOz1JD.cjs +3 -0
  76. package/dist/{rich-text-layout-Ciwa6D2o.js → rich-text-layout-YJHtCWQI.js} +1 -1
  77. package/dist/runtime-BpSAgOw1.js +201 -0
  78. package/dist/runtime-Cd2UTnwe.cjs +1 -0
  79. package/dist/sbom.cdx.json +1 -1
  80. package/dist/server/node.d.cts +55 -7
  81. package/dist/server/node.d.ts +55 -7
  82. package/dist/server-node.cjs +5 -5
  83. package/dist/server-node.js +2721 -2430
  84. package/dist/server.cjs +1 -1
  85. package/dist/server.d.cts +47 -12
  86. package/dist/server.d.ts +47 -12
  87. package/dist/server.js +8 -8
  88. package/dist/style.css +1 -1
  89. package/dist/{template-catalog-DtrtT1FY.cjs → template-catalog--yBX169M.cjs} +1 -1
  90. package/dist/{template-catalog-CRuZL3pi.js → template-catalog-Bu7s7ReF.js} +3 -3
  91. package/dist/template-fragments-5EzVn7bm.cjs +1 -0
  92. package/dist/{template-fragments-CPpGpQoz.js → template-fragments-Di2vDFnx.js} +2 -2
  93. package/dist/{template-registry-O0hNIOfB.js → template-registry-BCBF2b8j.js} +10 -10
  94. package/dist/template-registry-Bnh5aEYf.cjs +1 -0
  95. package/dist/textwrap-BPFxhpOw.cjs +4 -0
  96. package/dist/{textwrap-D4ZksyMK.js → textwrap-CmVkhMhx.js} +1 -1
  97. package/dist/vue/async.d.cts +97 -18
  98. package/dist/vue/async.d.ts +97 -18
  99. package/dist/vue/index.d.cts +127 -28
  100. package/dist/vue/index.d.ts +127 -28
  101. package/dist/vue-async.cjs +1 -1
  102. package/dist/vue-async.js +3 -3
  103. package/dist/vue.cjs +1 -1
  104. package/dist/vue.js +192 -162
  105. package/dist/{workbook-session-C9ZmCBwY.js → workbook-session-B6P_-5a4.js} +2 -2
  106. package/dist/{workbook-session-C6-SrnCT.cjs → workbook-session-BnPK3T58.cjs} +1 -1
  107. package/dist/worker.cjs +1 -1
  108. package/dist/worker.d.cts +55 -7
  109. package/dist/worker.d.ts +55 -7
  110. package/dist/worker.js +4 -4
  111. package/dist/xlsx.cjs +4 -4
  112. package/dist/xlsx.d.cts +18 -1
  113. package/dist/xlsx.d.ts +18 -1
  114. package/dist/xlsx.js +279 -272
  115. package/package.json +1 -1
  116. package/dist/ParamEditor-BGjovFUe.js +0 -737
  117. package/dist/ParamEditor-CeNp4_zQ.cjs +0 -1
  118. package/dist/ReportLabelStudio-g8PkqJWn.cjs +0 -1
  119. package/dist/ReportParamPanel-C7fZTllk.cjs +0 -1
  120. package/dist/ReportPreview-BoGBGyRr.cjs +0 -6
  121. package/dist/ReportPreview-QLONCyci.js +0 -6257
  122. package/dist/RuleEditor-BZUP9yvL.cjs +0 -1
  123. package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +0 -1
  124. package/dist/TemplateReviewPanel-Dijwm9YE.js +0 -593
  125. package/dist/assets-D2gHc4Mz.cjs +0 -1
  126. package/dist/assets-T_gDeFaz.js +0 -132
  127. package/dist/auto-BrPWo7Xm.cjs +0 -1
  128. package/dist/capabilities-DiBj4Qgl.cjs +0 -1
  129. package/dist/capabilities-pg7j7VLT.js +0 -106
  130. package/dist/data-bar-CeZuFmYl.cjs +0 -1
  131. package/dist/designer-BZoVWTgl.js +0 -7172
  132. package/dist/designer-zS2uKJmY.cjs +0 -2
  133. package/dist/dom-ChE5D-L-.cjs +0 -1
  134. package/dist/grid-strokes-Be24LGuV.cjs +0 -1
  135. package/dist/json-snapshot-DNiIbpOr.cjs +0 -2
  136. package/dist/prefill-PaAy6wLk.cjs +0 -1
  137. package/dist/prepared-CJy_qk7d.js +0 -94
  138. package/dist/prepared-D0yCSxSO.cjs +0 -1
  139. package/dist/progress-ByiOxUD3.js +0 -250
  140. package/dist/progress-WomPRP3B.cjs +0 -1
  141. package/dist/protocol-BG16rz6D.js +0 -90
  142. package/dist/protocol-wzhl1Fim.cjs +0 -1
  143. package/dist/record-bindings-MBxbeBsi.cjs +0 -1
  144. package/dist/rich-text-layout-DK7A_a5r.cjs +0 -3
  145. package/dist/runtime-DYMOS_gz.cjs +0 -1
  146. package/dist/runtime-PiCax9zQ.js +0 -171
  147. package/dist/template-fragments-GVjpew_q.cjs +0 -1
  148. package/dist/template-registry-DI59PXVK.cjs +0 -1
  149. package/dist/textwrap-DEHqAjKZ.cjs +0 -4
package/dist/vue.js CHANGED
@@ -1,26 +1,26 @@
1
- import { createReportSource as T, ReportCellEditError as A } from "@agile-team/mach-report";
1
+ import { createReportSource as O, ReportCellEditError as T } from "@agile-team/mach-report";
2
2
  export * from "@agile-team/mach-report";
3
- import { P as R, c as h } from "./ReportPreview-QLONCyci.js";
4
- import { R as Z, a as Q, _ as ee, b as re, d as te, e as ne, f as oe, g as ae, h as se, i as ie, j as ce, k as ue, l as fe, m as le, n as de, o as ge, p as pe, q as Pe, r as me, s as Ee, t as Re, u as he, v as ye, w as we } from "./ReportPreview-QLONCyci.js";
5
- import { M as f } from "./ReportParamPanel-GI43aGa0.js";
6
- import { D as ve, a as Te, b as Ae, c as xe, d as Ce, P as Oe, R as _e, S as Ie, e as Me, f as De, n as ke, p as Fe, g as Le, r as be, h as Ue, i as qe, s as je, t as Ge, j as Ne, u as He } from "./ReportParamPanel-GI43aGa0.js";
7
- import { M as x } from "./injection-keys-e85udZCp.js";
8
- import { a as ze, b as Ve, c as Ye } from "./injection-keys-e85udZCp.js";
9
- import { M as $e, m as Be } from "./plugin-_BkUVc2z.js";
10
- import { shallowRef as C, computed as O, inject as _ } from "vue";
11
- import { v as I } from "./json-snapshot-BRnzKudk.js";
12
- import { u as M } from "./progress-ByiOxUD3.js";
13
- function V(r) {
14
- const e = T(r), o = async (t) => {
15
- if (t.reportIds.length === 0) throw new R("缺少报表 ID");
3
+ import { P as h, c as y } from "./ReportPreview-_wTJnsG1.js";
4
+ import { R as oe, a as se, _ as ae, b as ie, d as ce, e as ue, f as fe, g as de, h as le, i as ge, j as pe, k as me, l as Pe, m as Ee, n as Re, o as he, p as ye, q as we, r as Se, s as ve, t as Te, u as Ie, v as Ae, w as xe } from "./ReportPreview-_wTJnsG1.js";
5
+ import { M as d } from "./ReportParamPanel-DA-YpkvC.js";
6
+ import { D as Oe, a as _e, b as Me, c as De, d as be, P as ke, R as Fe, S as Le, e as qe, f as Ne, n as Ue, p as Ve, g as je, r as Ge, h as ze, i as He, s as We, t as Ye, j as Be, u as Ke } from "./ReportParamPanel-DA-YpkvC.js";
7
+ import { M as _ } from "./injection-keys-e85udZCp.js";
8
+ import { a as Xe, b as Je, c as Ze } from "./injection-keys-e85udZCp.js";
9
+ import { M as er, m as rr } from "./plugin-B1ydqEmS.js";
10
+ import { shallowRef as M, computed as D, inject as b } from "vue";
11
+ import { v as k } from "./json-snapshot-BJWZNryO.js";
12
+ import { x as F } from "./diagnostic-collector-1sqd7DQP.js";
13
+ function J(e) {
14
+ const r = O(e), o = async (t) => {
15
+ if (t.reportIds.length === 0) throw new h("缺少报表 ID");
16
16
  for (const n of t.reportIds)
17
- if (!Object.prototype.hasOwnProperty.call(r, n) || !r[n])
18
- throw new R(`本地模板 ${n} 不存在`);
19
- return e(t);
17
+ if (!Object.prototype.hasOwnProperty.call(e, n) || !e[n])
18
+ throw new h(`本地模板 ${n} 不存在`);
19
+ return r(t);
20
20
  };
21
- return o.getParamDefs = e.getParamDefs, o;
21
+ return o.getParamDefs = r.getParamDefs, o;
22
22
  }
23
- const D = Object.freeze({
23
+ const L = Object.freeze({
24
24
  loading: !1,
25
25
  hasPlan: !1,
26
26
  pageCount: 0,
@@ -32,92 +32,92 @@ const D = Object.freeze({
32
32
  error: null,
33
33
  pdfFont: Object.freeze({ status: "unchecked", fontUrl: "" })
34
34
  });
35
- function Y() {
36
- const r = C(null), e = () => r.value?.state ?? D, o = Object.freeze({
35
+ function Z() {
36
+ const e = M(null), r = () => e.value?.state ?? L, o = Object.freeze({
37
37
  get loading() {
38
- return e().loading;
38
+ return r().loading;
39
39
  },
40
40
  get stale() {
41
- return e().stale ?? !1;
41
+ return r().stale ?? !1;
42
42
  },
43
43
  get hasPlan() {
44
- return e().hasPlan;
44
+ return r().hasPlan;
45
45
  },
46
46
  get pageCount() {
47
- return e().pageCount;
47
+ return r().pageCount;
48
48
  },
49
49
  get currentPage() {
50
- return e().currentPage;
50
+ return r().currentPage;
51
51
  },
52
52
  get exporting() {
53
- return e().exporting;
53
+ return r().exporting;
54
54
  },
55
55
  get printing() {
56
- return e().printing;
56
+ return r().printing;
57
57
  },
58
58
  get canExport() {
59
- return e().canExport;
59
+ return r().canExport;
60
60
  },
61
61
  get canPrint() {
62
- return e().canPrint;
62
+ return r().canPrint;
63
63
  },
64
64
  get error() {
65
- return e().error;
65
+ return r().error;
66
66
  },
67
67
  get pdfFont() {
68
- return e().pdfFont;
68
+ return r().pdfFont;
69
69
  },
70
70
  get editing() {
71
- return e().editing ?? !1;
71
+ return r().editing ?? !1;
72
72
  },
73
73
  get saving() {
74
- return e().saving ?? !1;
74
+ return r().saving ?? !1;
75
75
  },
76
76
  get importing() {
77
- return e().importing ?? !1;
77
+ return r().importing ?? !1;
78
78
  },
79
79
  get dirty() {
80
- return e().dirty ?? !1;
80
+ return r().dirty ?? !1;
81
81
  },
82
82
  get pendingLocalChanges() {
83
- return e().pendingLocalChanges ?? !1;
83
+ return r().pendingLocalChanges ?? !1;
84
84
  },
85
85
  get task() {
86
- return e().task ?? null;
86
+ return r().task ?? null;
87
87
  },
88
88
  get diagnostics() {
89
- return e().diagnostics ?? [];
89
+ return r().diagnostics ?? [];
90
90
  },
91
91
  get reportIds() {
92
- return e().reportIds ?? [];
92
+ return r().reportIds ?? [];
93
93
  },
94
94
  get params() {
95
- return e().params ?? {};
95
+ return r().params ?? {};
96
96
  },
97
97
  get canUndo() {
98
- return e().canUndo ?? !1;
98
+ return r().canUndo ?? !1;
99
99
  },
100
100
  get canRedo() {
101
- return e().canRedo ?? !1;
101
+ return r().canRedo ?? !1;
102
102
  },
103
103
  get changeCount() {
104
- return e().changeCount ?? 0;
104
+ return r().changeCount ?? 0;
105
105
  },
106
106
  get selection() {
107
- return e().selection ?? null;
107
+ return r().selection ?? null;
108
108
  }
109
109
  });
110
110
  function t() {
111
- if (!r.value)
112
- throw new f("config", "报表预览尚未挂载,请在 ready 后调用控制器");
113
- return r.value;
111
+ if (!e.value)
112
+ throw new d("config", "报表预览尚未挂载,请在 ready 后调用控制器");
113
+ return e.value;
114
114
  }
115
115
  return {
116
116
  ref(n) {
117
- const a = n;
118
- r.value = a && typeof a.reload == "function" && typeof a.print == "function" && typeof a.exportAs == "function" && typeof a.openPdfWindow == "function" && typeof a.gotoPage == "function" && typeof a.setParams == "function" ? a : null;
117
+ const s = n;
118
+ 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;
119
119
  },
120
- ready: O(() => r.value !== null),
120
+ ready: D(() => e.value !== null),
121
121
  state: o,
122
122
  async checkPdfFont() {
123
123
  const n = t();
@@ -147,13 +147,13 @@ function Y() {
147
147
  gotoPage(n) {
148
148
  t().gotoPage(n);
149
149
  },
150
- async setParams(n, a) {
151
- await t().setParams(n, a);
150
+ async setParams(n, s) {
151
+ await t().setParams(n, s);
152
152
  },
153
- async importExcel(n, a) {
154
- const l = t();
155
- if (!l.importExcel) throw new f("config", "旧自定义控制器未提供 Excel 导入");
156
- return l.importExcel(n, a);
153
+ async importExcel(n, s) {
154
+ const f = t();
155
+ if (!f.importExcel) throw new d("config", "旧自定义控制器未提供 Excel 导入");
156
+ return f.importExcel(n, s);
157
157
  },
158
158
  getPlan() {
159
159
  return t().getPlan?.() ?? null;
@@ -166,136 +166,166 @@ function Y() {
166
166
  redo: async () => await t().redo?.() ?? !1,
167
167
  restoreChanges: async () => await t().restoreChanges?.() ?? !1,
168
168
  getSelection: () => t().getSelection?.() ?? null,
169
- focusCell: async (n, a) => await t().focusCell?.(n, a) ?? !1,
169
+ focusCell: async (n, s) => await t().focusCell?.(n, s) ?? !1,
170
170
  focusField: async (n) => await t().focusField?.(n) ?? !1,
171
171
  copySelection: () => t().copySelection?.() ?? "",
172
172
  pasteSelection: async (n) => await t().pasteSelection?.(n) ?? !1
173
173
  };
174
174
  }
175
- function K() {
176
- return _(x, null);
175
+ function Q() {
176
+ return b(_, null);
177
177
  }
178
- function P(r) {
179
- return !!r && typeof r == "object" && !Array.isArray(r);
178
+ function P(e) {
179
+ return !!e && typeof e == "object" && !Array.isArray(e);
180
180
  }
181
- function k(r) {
182
- return Array.isArray(r) && r.every((e) => P(e) && typeof e.code == "string" && typeof e.message == "string" && ["info", "warning", "error"].includes(e.severity) && (e.path === void 0 || typeof e.path == "string") && I(e));
181
+ function q(e) {
182
+ return Array.isArray(e) && e.every((r) => P(r) && typeof r.code == "string" && typeof r.message == "string" && ["info", "warning", "error"].includes(r.severity) && (r.path === void 0 || typeof r.path == "string") && k(r));
183
183
  }
184
- function F(r, e) {
185
- return Array.isArray(r) && r.every((o) => P(o) && Number.isSafeInteger(o.editIndex) && o.editIndex >= 0 && o.editIndex < e && typeof o.code == "string" && typeof o.message == "string");
184
+ function I(e) {
185
+ return typeof e == "number" && Number.isFinite(e) && (!Number.isInteger(e) || Number.isSafeInteger(e));
186
186
  }
187
- function L(r, e) {
187
+ function N(e) {
188
+ return e == null || typeof e == "string" || typeof e == "boolean" || I(e);
189
+ }
190
+ function U(e) {
191
+ return e === void 0 || typeof e == "string" && !!e.trim() || I(e);
192
+ }
193
+ function V(e, r) {
194
+ return Array.isArray(e) && e.every((o) => P(o) && Number.isSafeInteger(o.editIndex) && o.editIndex >= 0 && o.editIndex < r && typeof o.code == "string" && typeof o.message == "string" && N(o.currentValue) && U(o.revision));
195
+ }
196
+ function j(e, r) {
188
197
  let o;
189
- if (!P(r) || typeof r.revision != "string" || !r.revision.trim() ? o = "非空 revision(请先在适配器解包业务响应)" : r.sourceToken !== void 0 && typeof r.sourceToken != "string" ? o = "字符串 sourceToken" : r.diagnostics !== void 0 && !k(r.diagnostics) ? o = "结构化 diagnostics" : r.conflicts !== void 0 && !F(r.conflicts, e) && (o = "有效 editIndex/code/message conflicts"), o) throw new f("edit", `ReportProvider.save 必须返回${o};服务器可能已提交,请重新查询确认后再编辑`);
198
+ if (!P(e) || typeof e.revision != "string" || !e.revision.trim() ? o = "非空 revision(请先在适配器解包业务响应)" : e.sourceToken !== void 0 && typeof e.sourceToken != "string" ? o = "字符串 sourceToken" : e.diagnostics !== void 0 && !q(e.diagnostics) ? o = "结构化 diagnostics" : e.conflicts !== void 0 && !V(e.conflicts, r) && (o = "有效 editIndex/code/message/currentValue/revision conflicts"), o) throw new d("edit", `ReportProvider.save 必须返回${o};服务器可能已提交,请重新查询确认后再编辑`);
190
199
  }
191
- function y(r) {
192
- return typeof r == "function" ? r() : r;
200
+ function w(e) {
201
+ return typeof e == "function" ? e() : e;
193
202
  }
194
- function b(r, e) {
195
- const o = new Set(r.flatMap((t) => t.source?.[e] === void 0 ? [] : [String(t.source[e])]));
203
+ function S(e, r) {
204
+ const o = new Set(e.flatMap((t) => t.source?.[r] === void 0 ? [] : [String(t.source[r])]));
196
205
  return o.size === 1 ? [...o][0] : void 0;
197
206
  }
198
- function w(r, e, o, t) {
199
- return typeof r == "function" ? r() : b(e, o) ?? t ?? r;
207
+ function v(e, r, o, t, n, s = !1) {
208
+ return typeof e == "function" ? e() : s ? t ?? n?.[o] ?? S(r, o) ?? e : S(r, o) ?? t ?? e ?? n?.[o];
209
+ }
210
+ function G(e, r, o) {
211
+ const t = r.query, n = e.reportId === void 0;
212
+ if (n && (!t || t.reportIds.length !== 1)) throw new d("config", "自动业务保存需要当前成功查询的单个报表上下文");
213
+ const s = e.reportId === void 0 ? t.reportIds[0] : w(e.reportId);
214
+ if (!s.trim()) throw new d("config", "业务保存缺少报表 ID");
215
+ if (n && new Set(o.map((i) => i.source?.sourceScope)).size > 1) throw new T("atomic");
216
+ const f = { ...w(e.params ?? t?.params ?? {}) }, l = t?.sources.filter((i) => i.reportId === s) ?? [], a = l.length === 1 ? l[0] : void 0;
217
+ return {
218
+ reportId: s,
219
+ params: f,
220
+ source: a,
221
+ automatic: n,
222
+ identity: JSON.stringify([s, f, t?.queryId ?? t?.sources])
223
+ };
200
224
  }
201
- function U(r) {
202
- return r.requestId ?? globalThis.crypto?.randomUUID?.() ?? `mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
225
+ function z(e) {
226
+ return e.requestId ?? globalThis.crypto?.randomUUID?.() ?? `mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
203
227
  }
204
- function $(r, e) {
205
- if (!r.save) throw new f("config", "ReportProvider.save 未配置,无法启用业务保存");
206
- let o = "", t, n, a = 0;
207
- function l(s, i, d) {
208
- s.conflicts?.length || i !== o || d !== a || (t = s.revision, n = s.sourceToken);
228
+ function ee(e, r = {}) {
229
+ if (!e.save) throw new d("config", "ReportProvider.save 未配置,无法启用业务保存");
230
+ let o = "", t, n, s = 0;
231
+ function f(a, i, g) {
232
+ a.conflicts?.length || i !== o || g !== s || (t = a.revision, n = a.sourceToken);
209
233
  }
210
- async function m(s, i) {
234
+ async function l(a, i) {
211
235
  if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
212
- const d = y(e.reportId), E = { ...y(e.params ?? {}) }, g = JSON.stringify([d, E]), S = ++a;
213
- if (g !== o && (o = g, t = void 0, n = void 0), e.requireSource !== !1 && s.edits.some((c) => !c.source)) throw new A("missing");
214
- const u = await r.save({
215
- reportId: d,
216
- params: E,
236
+ const { reportId: g, params: A, identity: p, source: E, automatic: R } = G(r, i, a.edits), x = ++s;
237
+ if (p !== o && (o = p, t = void 0, n = void 0), r.requireSource !== !1 && a.edits.some((c) => !c.source)) throw new T("missing");
238
+ const u = await e.save({
239
+ reportId: g,
240
+ params: A,
217
241
  signal: i.signal,
218
- requestId: s.requestId,
242
+ requestId: a.requestId,
219
243
  action: i.action,
220
- edits: h(s.edits),
221
- expectedRevision: w(e.expectedRevision, s.edits, "revision", t),
222
- sourceToken: w(e.sourceToken, s.edits, "sourceToken", n)
244
+ edits: y(a.edits),
245
+ expectedRevision: v(r.expectedRevision, a.edits, "revision", t, E, R),
246
+ sourceToken: v(r.sourceToken, a.edits, "sourceToken", n, E, R)
223
247
  });
224
248
  if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
225
- L(u, s.edits.length), u.diagnostics?.forEach((c) => M(() => e.onDiagnostic?.(c)));
226
- const p = u.diagnostics?.filter((c) => c.severity === "error");
227
- if (p?.length) throw new f("edit", p.map((c) => c.message).join(";"), { diagnostics: p });
228
- const v = u.conflicts?.map((c) => ({ source: s.edits[c.editIndex]?.source, address: s.edits[c.editIndex]?.address, message: c.message }));
229
- return l(u, g, S), { revision: u.revision, sourceToken: u.sourceToken, conflicts: v };
249
+ j(u, a.edits.length), u.diagnostics?.forEach((c) => F(() => r.onDiagnostic?.(c)));
250
+ const m = u.diagnostics?.filter((c) => c.severity === "error");
251
+ if (m?.length) throw new d("edit", m.map((c) => c.message).join(";"), { diagnostics: m });
252
+ const C = u.conflicts?.map((c) => ({
253
+ source: a.edits[c.editIndex]?.source,
254
+ address: a.edits[c.editIndex]?.address,
255
+ message: c.message,
256
+ ...c.currentValue === void 0 ? {} : { currentValue: c.currentValue },
257
+ revision: c.revision ?? u.revision
258
+ }));
259
+ return f(u, p, x), { revision: u.revision, sourceToken: u.sourceToken, conflicts: C };
230
260
  }
231
261
  return {
232
- requireSource: e.requireSource ?? !0,
233
- canEdit: e.canEdit,
234
- readOnlyReason: e.readOnlyReason,
235
- history: e.history,
236
- fields: e.fields,
237
- validate: e.validate,
238
- validation: e.validation,
239
- validateBatch: e.validateBatch,
240
- saveBatch: m,
241
- save: (s, i) => m({ requestId: U(i), edits: [h(s)] }, i)
262
+ requireSource: r.requireSource ?? !0,
263
+ canEdit: r.canEdit,
264
+ readOnlyReason: r.readOnlyReason,
265
+ history: r.history,
266
+ fields: r.fields,
267
+ validate: r.validate,
268
+ validation: r.validation,
269
+ validateBatch: r.validateBatch,
270
+ saveBatch: l,
271
+ save: (a, i) => l({ requestId: z(i), edits: [y(a)] }, i)
242
272
  };
243
273
  }
244
274
  export {
245
- ve as DEFAULT_CALCULATION_MESSAGES,
246
- Te as DEFAULT_DATA_REVIEW_MESSAGES,
247
- Ae as DEFAULT_MESSAGES,
248
- xe as DEFAULT_PRINT_MESSAGES,
249
- Ce as DEFAULT_THEME,
250
- ze as MACH_REPORT_CONFIG_KEY,
251
- x as MACH_REPORT_CONTROLLER_KEY,
252
- Ve as MACH_REPORT_FETCHER_KEY,
253
- Ye as MACH_REPORT_PDF_EXPORTER_KEY,
254
- f as MachReportError,
255
- $e as MachReportPreview,
256
- Oe as PARAM_OPTIONS_MESSAGES,
257
- R as PlanLoadError,
258
- Z as REPORT_EXPORT_FORMATS,
259
- Q as REPORT_PREVIEW_TOOLS,
260
- ee as ReportDataComparisonPanel,
261
- re as ReportExportMenu,
262
- te as ReportPagination,
263
- _e as ReportParamPanel,
264
- ne as ReportPrefillPanel,
265
- oe as ReportPreview,
266
- ae as ReportPrintResourceError,
267
- se as ReportTaskStatus,
268
- ie as ReportToolbar,
269
- ce as ReportValidationPanel,
270
- Ie as SILENT_LOGGER,
271
- ue as buildPrintDocument,
272
- fe as buildWordHtml,
273
- le as createDefaultPdfExporter,
274
- de as createFetchRequest,
275
- V as createLocalFetcher,
276
- ge as createPrintCalibrationPlan,
277
- $ as createProviderEditing,
278
- pe as createReportStoragePreferences,
279
- Me as defineMachReportConfig,
280
- De as defineMachReportPreset,
281
- Pe as joinReportIds,
282
- Be as machReportPlugin,
283
- me as normalizeReportIds,
284
- ke as normalizeReportLoadError,
285
- Ee as preparePrintResources,
286
- Fe as printCalibration,
287
- Re as printPlans,
288
- Le as provideMachReportConfig,
289
- be as resolveCalculationMessages,
290
- Ue as resolveConfig,
291
- qe as resolveDataReviewMessages,
292
- je as snapshotPrintOptions,
293
- Ge as themeToCssVars,
294
- Ne as toErrorDetail,
295
- Y as useMachReport,
296
- He as useMachReportConfig,
297
- he as usePageWindow,
298
- ye as usePrintExport,
299
- K as useReportPreview,
300
- we as useZoom
275
+ Oe as DEFAULT_CALCULATION_MESSAGES,
276
+ _e as DEFAULT_DATA_REVIEW_MESSAGES,
277
+ Me as DEFAULT_MESSAGES,
278
+ De as DEFAULT_PRINT_MESSAGES,
279
+ be as DEFAULT_THEME,
280
+ Xe as MACH_REPORT_CONFIG_KEY,
281
+ _ as MACH_REPORT_CONTROLLER_KEY,
282
+ Je as MACH_REPORT_FETCHER_KEY,
283
+ Ze as MACH_REPORT_PDF_EXPORTER_KEY,
284
+ d as MachReportError,
285
+ er as MachReportPreview,
286
+ ke as PARAM_OPTIONS_MESSAGES,
287
+ h as PlanLoadError,
288
+ oe as REPORT_EXPORT_FORMATS,
289
+ se as REPORT_PREVIEW_TOOLS,
290
+ ae as ReportDataComparisonPanel,
291
+ ie as ReportExportMenu,
292
+ ce as ReportPagination,
293
+ Fe as ReportParamPanel,
294
+ ue as ReportPrefillPanel,
295
+ fe as ReportPreview,
296
+ de as ReportPrintResourceError,
297
+ le as ReportTaskStatus,
298
+ ge as ReportToolbar,
299
+ pe as ReportValidationPanel,
300
+ Le as SILENT_LOGGER,
301
+ me as buildPrintDocument,
302
+ Pe as buildWordHtml,
303
+ Ee as createDefaultPdfExporter,
304
+ Re as createFetchRequest,
305
+ J as createLocalFetcher,
306
+ he as createPrintCalibrationPlan,
307
+ ee as createProviderEditing,
308
+ ye as createReportStoragePreferences,
309
+ qe as defineMachReportConfig,
310
+ Ne as defineMachReportPreset,
311
+ we as joinReportIds,
312
+ rr as machReportPlugin,
313
+ Se as normalizeReportIds,
314
+ Ue as normalizeReportLoadError,
315
+ ve as preparePrintResources,
316
+ Ve as printCalibration,
317
+ Te as printPlans,
318
+ je as provideMachReportConfig,
319
+ Ge as resolveCalculationMessages,
320
+ ze as resolveConfig,
321
+ He as resolveDataReviewMessages,
322
+ We as snapshotPrintOptions,
323
+ Ye as themeToCssVars,
324
+ Be as toErrorDetail,
325
+ Z as useMachReport,
326
+ Ke as useMachReportConfig,
327
+ Ie as usePageWindow,
328
+ Ae as usePrintExport,
329
+ Q as useReportPreview,
330
+ xe as useZoom
301
331
  };
@@ -1,6 +1,6 @@
1
- import { v as ve, w as Ke, o as He, R as gr, z as er } from "./progress-ByiOxUD3.js";
1
+ import { y as ve, w as Ke, o as He, R as gr, B as er } from "./diagnostic-collector-1sqd7DQP.js";
2
2
  import { c as Kt, g as yr } from "./_commonjsHelpers-DaMA6jEr.js";
3
- import { o as Ze, s as cr, r as vr, t as Ge, u as wr, w as _r, x as xr, y as Sr, q as kr } from "./region-binding-workflow-DjrXuR1q.js";
3
+ import { o as Ze, s as cr, r as vr, t as Ge, u as wr, w as _r, x as xr, y as Sr, q as kr } from "./region-binding-workflow-Cm4mqhih.js";
4
4
  import { c as Cr } from "./media-Y90dHK9z.js";
5
5
  import { f as Er } from "./number-format-BA_KwrZe.js";
6
6
  function $e(G) {