@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.
- package/README.md +8 -2
- package/dist/{ExcelBindingWizard-BrTmdo7f.cjs → ExcelBindingWizard-BV12hGiK.cjs} +1 -1
- package/dist/{ExcelBindingWizard-CcDMLO8Q.js → ExcelBindingWizard-Cy_lPjWV.js} +3 -3
- package/dist/ParamEditor-DenKjvKu.cjs +1 -0
- package/dist/ParamEditor-PyOqHzzw.js +750 -0
- package/dist/{ReportBatchPanel-CJB67WNd.js → ReportBatchPanel-8EFtMrKk.js} +2 -2
- package/dist/{ReportBatchPanel-CHxBtG9R.cjs → ReportBatchPanel-pQ6d0yqJ.cjs} +1 -1
- package/dist/ReportLabelStudio-B_KF3Zc_.cjs +1 -0
- package/dist/{ReportLabelStudio-Tplc1TLJ.js → ReportLabelStudio-HUeo2TsU.js} +68 -68
- package/dist/ReportParamPanel-8xR85nz-.cjs +1 -0
- package/dist/{ReportParamPanel-GI43aGa0.js → ReportParamPanel-DA-YpkvC.js} +328 -298
- package/dist/ReportPreview-CyUXJSVX.cjs +6 -0
- package/dist/ReportPreview-_wTJnsG1.js +7120 -0
- package/dist/{ReportTemplateLibrary-BFQIX0sg.cjs → ReportTemplateLibrary-CjArKxRG.cjs} +1 -1
- package/dist/{ReportTemplateLibrary-KqX4E2sN.js → ReportTemplateLibrary-DH8jl9IF.js} +28 -28
- package/dist/RuleEditor-Bmj98oC4.cjs +1 -0
- package/dist/{RuleEditor-OPX1awrH.js → RuleEditor-GDydlEHz.js} +846 -834
- package/dist/{TemplateOutlinePanel-CVYKVLv_.cjs → TemplateOutlinePanel-B554_qk1.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-DQS-eOs6.js → TemplateOutlinePanel-DjPqzU9h.js} +10 -10
- package/dist/{TemplateReusePanel-CY6O93Zk.cjs → TemplateReusePanel-D0628OYc.cjs} +1 -1
- package/dist/{TemplateReusePanel-DKXiFTyB.js → TemplateReusePanel-DtYbCN7U.js} +2 -2
- package/dist/TemplateReviewPanel-CSwvCz3f.cjs +1 -0
- package/dist/TemplateReviewPanel-D_FR4ISq.js +602 -0
- package/dist/artifact-integrity.json +94 -94
- package/dist/assets-B4AJIOTB.cjs +1 -0
- package/dist/assets-D0FbszhB.js +137 -0
- package/dist/{auto-BB99S802.js → auto-BksreoKc.js} +5 -5
- package/dist/auto-C3mGqzJ8.cjs +1 -0
- package/dist/capabilities-CTwlcl8q.cjs +1 -0
- package/dist/capabilities-lqDEZSq5.js +121 -0
- package/dist/data-bar-2NLRzOCQ.cjs +1 -0
- package/dist/{data-bar-IkI6VvMQ.js → data-bar-BnGtnJ82.js} +1 -1
- package/dist/designer-BNf7NWd6.js +7589 -0
- package/dist/designer-DWnZZ_ej.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +137 -4
- package/dist/designer.d.ts +137 -4
- package/dist/designer.js +5 -5
- package/dist/diagnostic-collector-1sqd7DQP.js +355 -0
- package/dist/diagnostic-collector-D3rlvxm3.cjs +1 -0
- package/dist/{dom-JWrchIre.js → dom-C90cTM6Y.js} +4 -4
- package/dist/dom-CxOkm_Sy.cjs +1 -0
- package/dist/{encoding-7lquyj0w.cjs → encoding-CkziAnZI.cjs} +1 -1
- package/dist/{encoding-CEd-dq9A.js → encoding-DSc9zv2F.js} +2 -2
- package/dist/{font-loader-D8pI87fL.cjs → font-loader-D-znWNWS.cjs} +1 -1
- package/dist/{font-loader-CNWXomuV.js → font-loader-i7lZbqH_.js} +1 -1
- package/dist/{grid-strokes-EoY66L2f.js → grid-strokes-BPiV1WHe.js} +1 -1
- package/dist/grid-strokes-DYf-6DMl.cjs +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +46 -7
- package/dist/index.d.ts +46 -7
- package/dist/index.js +69 -68
- package/dist/{json-snapshot-BRnzKudk.js → json-snapshot-BJWZNryO.js} +919 -791
- package/dist/json-snapshot-C7QZrRBf.cjs +2 -0
- package/dist/{pdf-CJToa81Z.js → pdf-0_5XiTCx.js} +2499 -2492
- package/dist/{pdf-DpMkW72B.cjs → pdf-DWuq6uxx.cjs} +31 -31
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -0
- package/dist/pdf.d.ts +18 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-_BkUVc2z.js → plugin-B1ydqEmS.js} +1 -1
- package/dist/{plugin-BWTp-X7b.cjs → plugin-BQBz2vLG.cjs} +1 -1
- package/dist/prefill-2p9wrpn9.cjs +1 -0
- package/dist/{prefill-CWGdnqQd.js → prefill-Cuzh1wxf.js} +13 -13
- package/dist/prepared-CVbgO9KR.js +128 -0
- package/dist/prepared-DAwe8Il2.cjs +1 -0
- package/dist/protocol-BOri9qJL.js +105 -0
- package/dist/protocol-DD5dHSz-.cjs +1 -0
- package/dist/record-bindings-CAyM5tGg.cjs +1 -0
- package/dist/{record-bindings-DatJZv_e.js → record-bindings-fhav-NLG.js} +1 -1
- package/dist/{region-binding-workflow-DjrXuR1q.js → region-binding-workflow-Cm4mqhih.js} +2 -2
- package/dist/{region-binding-workflow-l7NGfagJ.cjs → region-binding-workflow-DWCUgjZl.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/rich-text-layout-X9YOz1JD.cjs +3 -0
- package/dist/{rich-text-layout-Ciwa6D2o.js → rich-text-layout-YJHtCWQI.js} +1 -1
- package/dist/runtime-BpSAgOw1.js +201 -0
- package/dist/runtime-Cd2UTnwe.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +55 -7
- package/dist/server/node.d.ts +55 -7
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +2721 -2430
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +47 -12
- package/dist/server.d.ts +47 -12
- package/dist/server.js +8 -8
- package/dist/style.css +1 -1
- package/dist/{template-catalog-DtrtT1FY.cjs → template-catalog--yBX169M.cjs} +1 -1
- package/dist/{template-catalog-CRuZL3pi.js → template-catalog-Bu7s7ReF.js} +3 -3
- package/dist/template-fragments-5EzVn7bm.cjs +1 -0
- package/dist/{template-fragments-CPpGpQoz.js → template-fragments-Di2vDFnx.js} +2 -2
- package/dist/{template-registry-O0hNIOfB.js → template-registry-BCBF2b8j.js} +10 -10
- package/dist/template-registry-Bnh5aEYf.cjs +1 -0
- package/dist/textwrap-BPFxhpOw.cjs +4 -0
- package/dist/{textwrap-D4ZksyMK.js → textwrap-CmVkhMhx.js} +1 -1
- package/dist/vue/async.d.cts +97 -18
- package/dist/vue/async.d.ts +97 -18
- package/dist/vue/index.d.cts +127 -28
- package/dist/vue/index.d.ts +127 -28
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +192 -162
- package/dist/{workbook-session-C9ZmCBwY.js → workbook-session-B6P_-5a4.js} +2 -2
- package/dist/{workbook-session-C6-SrnCT.cjs → workbook-session-BnPK3T58.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +55 -7
- package/dist/worker.d.ts +55 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +18 -1
- package/dist/xlsx.d.ts +18 -1
- package/dist/xlsx.js +279 -272
- package/package.json +1 -1
- package/dist/ParamEditor-BGjovFUe.js +0 -737
- package/dist/ParamEditor-CeNp4_zQ.cjs +0 -1
- package/dist/ReportLabelStudio-g8PkqJWn.cjs +0 -1
- package/dist/ReportParamPanel-C7fZTllk.cjs +0 -1
- package/dist/ReportPreview-BoGBGyRr.cjs +0 -6
- package/dist/ReportPreview-QLONCyci.js +0 -6257
- package/dist/RuleEditor-BZUP9yvL.cjs +0 -1
- package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +0 -1
- package/dist/TemplateReviewPanel-Dijwm9YE.js +0 -593
- package/dist/assets-D2gHc4Mz.cjs +0 -1
- package/dist/assets-T_gDeFaz.js +0 -132
- package/dist/auto-BrPWo7Xm.cjs +0 -1
- package/dist/capabilities-DiBj4Qgl.cjs +0 -1
- package/dist/capabilities-pg7j7VLT.js +0 -106
- package/dist/data-bar-CeZuFmYl.cjs +0 -1
- package/dist/designer-BZoVWTgl.js +0 -7172
- package/dist/designer-zS2uKJmY.cjs +0 -2
- package/dist/dom-ChE5D-L-.cjs +0 -1
- package/dist/grid-strokes-Be24LGuV.cjs +0 -1
- package/dist/json-snapshot-DNiIbpOr.cjs +0 -2
- package/dist/prefill-PaAy6wLk.cjs +0 -1
- package/dist/prepared-CJy_qk7d.js +0 -94
- package/dist/prepared-D0yCSxSO.cjs +0 -1
- package/dist/progress-ByiOxUD3.js +0 -250
- package/dist/progress-WomPRP3B.cjs +0 -1
- package/dist/protocol-BG16rz6D.js +0 -90
- package/dist/protocol-wzhl1Fim.cjs +0 -1
- package/dist/record-bindings-MBxbeBsi.cjs +0 -1
- package/dist/rich-text-layout-DK7A_a5r.cjs +0 -3
- package/dist/runtime-DYMOS_gz.cjs +0 -1
- package/dist/runtime-PiCax9zQ.js +0 -171
- package/dist/template-fragments-GVjpew_q.cjs +0 -1
- package/dist/template-registry-DI59PXVK.cjs +0 -1
- package/dist/textwrap-DEHqAjKZ.cjs +0 -4
package/dist/vue.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { createReportSource as
|
|
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
|
|
4
|
-
import { R as
|
|
5
|
-
import { M as
|
|
6
|
-
import { D as
|
|
7
|
-
import { M as
|
|
8
|
-
import { a as
|
|
9
|
-
import { M as
|
|
10
|
-
import { shallowRef as
|
|
11
|
-
import { v as
|
|
12
|
-
import {
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
if (t.reportIds.length === 0) throw new
|
|
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(
|
|
18
|
-
throw new
|
|
19
|
-
return
|
|
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 =
|
|
21
|
+
return o.getParamDefs = r.getParamDefs, o;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
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
|
|
36
|
-
const
|
|
35
|
+
function Z() {
|
|
36
|
+
const e = M(null), r = () => e.value?.state ?? L, o = Object.freeze({
|
|
37
37
|
get loading() {
|
|
38
|
-
return
|
|
38
|
+
return r().loading;
|
|
39
39
|
},
|
|
40
40
|
get stale() {
|
|
41
|
-
return
|
|
41
|
+
return r().stale ?? !1;
|
|
42
42
|
},
|
|
43
43
|
get hasPlan() {
|
|
44
|
-
return
|
|
44
|
+
return r().hasPlan;
|
|
45
45
|
},
|
|
46
46
|
get pageCount() {
|
|
47
|
-
return
|
|
47
|
+
return r().pageCount;
|
|
48
48
|
},
|
|
49
49
|
get currentPage() {
|
|
50
|
-
return
|
|
50
|
+
return r().currentPage;
|
|
51
51
|
},
|
|
52
52
|
get exporting() {
|
|
53
|
-
return
|
|
53
|
+
return r().exporting;
|
|
54
54
|
},
|
|
55
55
|
get printing() {
|
|
56
|
-
return
|
|
56
|
+
return r().printing;
|
|
57
57
|
},
|
|
58
58
|
get canExport() {
|
|
59
|
-
return
|
|
59
|
+
return r().canExport;
|
|
60
60
|
},
|
|
61
61
|
get canPrint() {
|
|
62
|
-
return
|
|
62
|
+
return r().canPrint;
|
|
63
63
|
},
|
|
64
64
|
get error() {
|
|
65
|
-
return
|
|
65
|
+
return r().error;
|
|
66
66
|
},
|
|
67
67
|
get pdfFont() {
|
|
68
|
-
return
|
|
68
|
+
return r().pdfFont;
|
|
69
69
|
},
|
|
70
70
|
get editing() {
|
|
71
|
-
return
|
|
71
|
+
return r().editing ?? !1;
|
|
72
72
|
},
|
|
73
73
|
get saving() {
|
|
74
|
-
return
|
|
74
|
+
return r().saving ?? !1;
|
|
75
75
|
},
|
|
76
76
|
get importing() {
|
|
77
|
-
return
|
|
77
|
+
return r().importing ?? !1;
|
|
78
78
|
},
|
|
79
79
|
get dirty() {
|
|
80
|
-
return
|
|
80
|
+
return r().dirty ?? !1;
|
|
81
81
|
},
|
|
82
82
|
get pendingLocalChanges() {
|
|
83
|
-
return
|
|
83
|
+
return r().pendingLocalChanges ?? !1;
|
|
84
84
|
},
|
|
85
85
|
get task() {
|
|
86
|
-
return
|
|
86
|
+
return r().task ?? null;
|
|
87
87
|
},
|
|
88
88
|
get diagnostics() {
|
|
89
|
-
return
|
|
89
|
+
return r().diagnostics ?? [];
|
|
90
90
|
},
|
|
91
91
|
get reportIds() {
|
|
92
|
-
return
|
|
92
|
+
return r().reportIds ?? [];
|
|
93
93
|
},
|
|
94
94
|
get params() {
|
|
95
|
-
return
|
|
95
|
+
return r().params ?? {};
|
|
96
96
|
},
|
|
97
97
|
get canUndo() {
|
|
98
|
-
return
|
|
98
|
+
return r().canUndo ?? !1;
|
|
99
99
|
},
|
|
100
100
|
get canRedo() {
|
|
101
|
-
return
|
|
101
|
+
return r().canRedo ?? !1;
|
|
102
102
|
},
|
|
103
103
|
get changeCount() {
|
|
104
|
-
return
|
|
104
|
+
return r().changeCount ?? 0;
|
|
105
105
|
},
|
|
106
106
|
get selection() {
|
|
107
|
-
return
|
|
107
|
+
return r().selection ?? null;
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
function t() {
|
|
111
|
-
if (!
|
|
112
|
-
throw new
|
|
113
|
-
return
|
|
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
|
|
118
|
-
|
|
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:
|
|
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,
|
|
151
|
-
await t().setParams(n,
|
|
150
|
+
async setParams(n, s) {
|
|
151
|
+
await t().setParams(n, s);
|
|
152
152
|
},
|
|
153
|
-
async importExcel(n,
|
|
154
|
-
const
|
|
155
|
-
if (!
|
|
156
|
-
return
|
|
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,
|
|
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
|
|
176
|
-
return _
|
|
175
|
+
function Q() {
|
|
176
|
+
return b(_, null);
|
|
177
177
|
}
|
|
178
|
-
function P(
|
|
179
|
-
return !!
|
|
178
|
+
function P(e) {
|
|
179
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
return Array.isArray(
|
|
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
|
|
185
|
-
return
|
|
184
|
+
function I(e) {
|
|
185
|
+
return typeof e == "number" && Number.isFinite(e) && (!Number.isInteger(e) || Number.isSafeInteger(e));
|
|
186
186
|
}
|
|
187
|
-
function
|
|
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(
|
|
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
|
|
192
|
-
return typeof
|
|
200
|
+
function w(e) {
|
|
201
|
+
return typeof e == "function" ? e() : e;
|
|
193
202
|
}
|
|
194
|
-
function
|
|
195
|
-
const o = new Set(
|
|
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
|
|
199
|
-
return typeof
|
|
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
|
|
202
|
-
return
|
|
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
|
|
205
|
-
if (!
|
|
206
|
-
let o = "", t, n,
|
|
207
|
-
function
|
|
208
|
-
|
|
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
|
|
234
|
+
async function l(a, i) {
|
|
211
235
|
if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
212
|
-
const
|
|
213
|
-
if (
|
|
214
|
-
const u = await
|
|
215
|
-
reportId:
|
|
216
|
-
params:
|
|
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:
|
|
242
|
+
requestId: a.requestId,
|
|
219
243
|
action: i.action,
|
|
220
|
-
edits:
|
|
221
|
-
expectedRevision:
|
|
222
|
-
sourceToken:
|
|
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
|
-
|
|
226
|
-
const
|
|
227
|
-
if (
|
|
228
|
-
const
|
|
229
|
-
|
|
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:
|
|
233
|
-
canEdit:
|
|
234
|
-
readOnlyReason:
|
|
235
|
-
history:
|
|
236
|
-
fields:
|
|
237
|
-
validate:
|
|
238
|
-
validation:
|
|
239
|
-
validateBatch:
|
|
240
|
-
saveBatch:
|
|
241
|
-
save: (
|
|
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
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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 {
|
|
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-
|
|
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) {
|