@agile-team/mach-report 2.14.0 → 2.15.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 +16 -11
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/{ExcelBindingWizard-CvsWR8Ga.js → ExcelBindingWizard-BKH1nGNS.js} +3 -3
- package/dist/{ExcelBindingWizard-CLT2p7P3.cjs → ExcelBindingWizard-Bs43BGNp.cjs} +1 -1
- package/dist/ParamEditor-Da4akw6V.cjs +1 -0
- package/dist/ParamEditor-DoAhzJsm.js +594 -0
- package/dist/{ReportBatchPanel-LqVgiqp7.js → ReportBatchPanel-BMf6boMA.js} +39 -39
- package/dist/{ReportBatchPanel-DkxTzBkD.cjs → ReportBatchPanel-wP9m9Pj1.cjs} +1 -1
- package/dist/ReportPreview-ChV19HBp.js +4619 -0
- package/dist/ReportPreview-DbLvvOUT.cjs +6 -0
- package/dist/{ReportTemplateLibrary-MjWEtc7X.js → ReportTemplateLibrary-C9wutIiT.js} +1 -1
- package/dist/{ReportTemplateLibrary-cQ1sqNYo.cjs → ReportTemplateLibrary-Sxr3eD0J.cjs} +1 -1
- package/dist/{RuleEditor-ChuXMlei.js → RuleEditor-C_Clasvd.js} +5 -5
- package/dist/{RuleEditor-BaR6xUiI.cjs → RuleEditor-XhGHK8DE.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-Dci6aRn1.js → TemplateOutlinePanel-D6Bkny59.js} +2 -2
- package/dist/{TemplateOutlinePanel-BHKP89Xz.cjs → TemplateOutlinePanel-JTSR53vJ.cjs} +1 -1
- package/dist/{TemplateReusePanel-CY5eO2Sh.cjs → TemplateReusePanel-Kx35S0Ql.cjs} +1 -1
- package/dist/{TemplateReusePanel-B7Gmyc1z.js → TemplateReusePanel-rVuK1kTz.js} +2 -2
- package/dist/{TemplateReviewPanel-DjlX3xpt.js → TemplateReviewPanel-B0ar9_zf.js} +2 -2
- package/dist/{TemplateReviewPanel-JvZe9_4G.cjs → TemplateReviewPanel-Dn6X9UmY.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +3 -1
- package/dist/analytics.d.ts +3 -1
- package/dist/analytics.js +154 -60
- package/dist/artifact-integrity.json +135 -0
- package/dist/assets-B9ImAi6_.cjs +1 -0
- package/dist/assets-DEaz4qsp.js +124 -0
- package/dist/batch-BaP6pWDE.cjs +1 -0
- package/dist/batch-BfZHN1do.js +220 -0
- package/dist/batch-CGyt-b2W.js +273 -0
- package/dist/batch-CLpELXBl.cjs +1 -0
- package/dist/capabilities-CAh2Nrue.cjs +1 -0
- package/dist/capabilities-DskCHs3V.js +69 -0
- package/dist/codes.d.cts +2 -0
- package/dist/codes.d.ts +2 -0
- package/dist/{computed-Bvk0W15F.js → computed-C-4C2S5h.js} +3 -3
- package/dist/config-BVsJXSqS.js +842 -0
- package/dist/config-D10us76d.cjs +1 -0
- package/dist/data-explanation-B8MZRYVS.js +16 -0
- package/dist/data-explanation-DE55G30w.cjs +1 -0
- package/dist/designer-2bDlcNXQ.js +5136 -0
- package/dist/designer-BT7XCdbW.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +144 -16
- package/dist/designer.d.ts +144 -16
- package/dist/designer.js +1 -1
- package/dist/drill-ByJviLXS.js +145 -0
- package/dist/drill-DYTxuL3A.cjs +1 -0
- package/dist/{font-loader-vhCT8znW.cjs → font-loader-B_UkxpzC.cjs} +1 -1
- package/dist/{font-loader-DHto6Lra.js → font-loader-Q3bQjmrI.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +82 -4
- package/dist/index.d.ts +82 -4
- package/dist/index.js +785 -820
- package/dist/json-snapshot-DFb2eWkf.js +1416 -0
- package/dist/json-snapshot-WWSGlaHG.cjs +2 -0
- package/dist/licenses/_bwip-js_generic-4.11.4.txt +24 -0
- package/dist/licenses/_fast-csv_format-4.3.5.txt +22 -0
- package/dist/licenses/_fast-csv_parse-4.3.6.txt +22 -0
- package/dist/licenses/_pdf-lib_fontkit-1.1.1.txt +326 -0
- package/dist/licenses/_pdf-lib_standard-fonts-1.0.0.txt +22 -0
- package/dist/licenses/_pdf-lib_upng-1.0.1.txt +22 -0
- package/dist/licenses/_types_node-14.18.63.txt +22 -0
- package/dist/licenses/_types_pako-2.0.3.txt +22 -0
- package/dist/licenses/_types_pegjs-0.10.6.txt +22 -0
- package/dist/licenses/archiver-5.3.2.txt +23 -0
- package/dist/licenses/archiver-utils-2.1.0.txt +23 -0
- package/dist/licenses/archiver-utils-3.0.4.txt +23 -0
- package/dist/licenses/async-3.2.6.txt +20 -0
- package/dist/licenses/balanced-match-1.0.2.txt +22 -0
- package/dist/licenses/base64-js-1.5.1.txt +22 -0
- package/dist/licenses/big-integer-1.6.52.txt +25 -0
- package/dist/licenses/binary-0.3.0.txt +178 -0
- package/dist/licenses/bl-4.1.0.txt +14 -0
- package/dist/licenses/bluebird-3.4.7.txt +22 -0
- package/dist/licenses/brace-expansion-1.1.21.txt +22 -0
- package/dist/licenses/brace-expansion-2.1.7.txt +22 -0
- package/dist/licenses/buffer-5.7.1.txt +22 -0
- package/dist/licenses/buffer-crc32-0.2.13.txt +20 -0
- package/dist/licenses/buffer-indexof-polyfill-1.0.2.txt +23 -0
- package/dist/licenses/buffers-0.1.1.txt +140 -0
- package/dist/licenses/chainsaw-0.1.0.txt +184 -0
- package/dist/licenses/compress-commons-4.1.2.txt +23 -0
- package/dist/licenses/concat-map-0.0.1.txt +19 -0
- package/dist/licenses/core-util-is-1.0.3.txt +20 -0
- package/dist/licenses/crc-32-1.2.2.txt +202 -0
- package/dist/licenses/crc32-stream-4.0.3.txt +23 -0
- package/dist/licenses/dayjs-1.11.23.txt +22 -0
- package/dist/licenses/duplexer2-0.1.4.txt +27 -0
- package/dist/licenses/end-of-stream-1.4.5.txt +22 -0
- package/dist/licenses/exceljs-4.4.0.txt +23 -0
- package/dist/licenses/fast-csv-4.3.6.txt +22 -0
- package/dist/licenses/fast-png-6.4.0.txt +22 -0
- package/dist/licenses/fs-constants-1.0.0.txt +22 -0
- package/dist/licenses/fs.realpath-1.0.0.txt +44 -0
- package/dist/licenses/fstream-1.0.12.txt +16 -0
- package/dist/licenses/glob-7.2.3.txt +22 -0
- package/dist/licenses/graceful-fs-4.2.11.txt +16 -0
- package/dist/licenses/ieee754-1.2.1.txt +12 -0
- package/dist/licenses/immediate-3.0.6.txt +21 -0
- package/dist/licenses/inflight-1.0.6.txt +16 -0
- package/dist/licenses/inherits-2.0.4.txt +17 -0
- package/dist/licenses/iobuffer-5.4.0.txt +23 -0
- package/dist/licenses/isarray-1.0.0.txt +61 -0
- package/dist/licenses/jszip-3.10.2.txt +652 -0
- package/dist/licenses/lazystream-1.0.1.txt +24 -0
- package/dist/licenses/lie-3.3.0.txt +8 -0
- package/dist/licenses/listenercount-1.0.1.txt +6 -0
- package/dist/licenses/lodash.defaults-4.2.0.txt +48 -0
- package/dist/licenses/lodash.difference-4.5.0.txt +48 -0
- package/dist/licenses/lodash.escaperegexp-4.1.2.txt +48 -0
- package/dist/licenses/lodash.flatten-4.4.0.txt +48 -0
- package/dist/licenses/lodash.groupby-4.6.0.txt +48 -0
- package/dist/licenses/lodash.isboolean-3.0.3.txt +23 -0
- package/dist/licenses/lodash.isequal-4.5.0.txt +48 -0
- package/dist/licenses/lodash.isfunction-3.0.9.txt +48 -0
- package/dist/licenses/lodash.isnil-4.0.0.txt +23 -0
- package/dist/licenses/lodash.isplainobject-4.0.6.txt +48 -0
- package/dist/licenses/lodash.isundefined-3.0.1.txt +23 -0
- package/dist/licenses/lodash.union-4.6.0.txt +48 -0
- package/dist/licenses/lodash.uniq-4.5.0.txt +48 -0
- package/dist/licenses/minimatch-3.1.5.txt +16 -0
- package/dist/licenses/minimatch-5.1.9.txt +16 -0
- package/dist/licenses/minimist-1.2.8.txt +19 -0
- package/dist/licenses/mkdirp-0.5.6.txt +22 -0
- package/dist/licenses/node-sql-parser-5.4.0.txt +202 -0
- package/dist/licenses/normalize-path-3.0.0.txt +22 -0
- package/dist/licenses/once-1.4.0.txt +16 -0
- package/dist/licenses/pako-1.0.11.txt +22 -0
- package/dist/licenses/pako-2.2.0.txt +22 -0
- package/dist/licenses/path-is-absolute-1.0.1.txt +22 -0
- package/dist/licenses/pdf-lib-1.17.1.txt +22 -0
- package/dist/licenses/process-nextick-args-2.0.1.txt +20 -0
- package/dist/licenses/readable-stream-2.3.8.txt +48 -0
- package/dist/licenses/readable-stream-3.6.2.txt +48 -0
- package/dist/licenses/readdir-glob-1.1.3.txt +202 -0
- package/dist/licenses/rimraf-2.7.1.txt +16 -0
- package/dist/licenses/safe-buffer-5.1.2.txt +22 -0
- package/dist/licenses/safe-buffer-5.2.1.txt +22 -0
- package/dist/licenses/saxes-5.0.1.txt +397 -0
- package/dist/licenses/setimmediate-1.0.5.txt +21 -0
- package/dist/licenses/string_decoder-1.1.1.txt +49 -0
- package/dist/licenses/string_decoder-1.3.0.txt +49 -0
- package/dist/licenses/tar-stream-2.2.0.txt +22 -0
- package/dist/licenses/tmp-0.2.7.txt +22 -0
- package/dist/licenses/traverse-0.3.9.txt +25 -0
- package/dist/licenses/tslib-1.14.1.txt +13 -0
- package/dist/licenses/unzipper-0.10.14.txt +26 -0
- package/dist/licenses/util-deprecate-1.0.2.txt +25 -0
- package/dist/licenses/uuid-11.1.1.txt +10 -0
- package/dist/licenses/wrappy-1.0.2.txt +16 -0
- package/dist/licenses/xmlchars-2.2.0.txt +19 -0
- package/dist/licenses/zip-stream-4.1.1.txt +23 -0
- package/dist/matrix-CGRGkn5s.js +112 -0
- package/dist/matrix-gEO7ZM_u.cjs +1 -0
- package/dist/media-B7vnpD8k.cjs +1 -0
- package/dist/media-Y90dHK9z.js +70 -0
- package/dist/param-validation-C3HlcLLO.cjs +1 -0
- package/dist/param-validation-Do7Eg8Zv.js +181 -0
- package/dist/{pdf-8UPQebOE.js → pdf-BwNyeGpt.js} +4385 -4321
- package/dist/{pdf-AyJGb22z.cjs → pdf-CvvrjPQg.cjs} +51 -49
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -3
- package/dist/pdf.d.ts +18 -3
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BGKf-Tqg.js → plugin-Ca_XZG3l.js} +2 -2
- package/dist/{plugin-CktLH_Iy.cjs → plugin-DHO7X8z2.cjs} +1 -1
- package/dist/prepared-CFy9B75C.cjs +1 -0
- package/dist/prepared-ajM-H-9B.js +69 -0
- package/dist/progress-B0ctFpKf.cjs +1 -0
- package/dist/progress-D-OTpEav.js +52 -0
- package/dist/record-bindings-By_UKZ2g.cjs +1 -0
- package/dist/record-bindings-Do_b3h4V.js +196 -0
- package/dist/{region-binding-workflow-DEJbhpCv.js → region-binding-workflow-BMhK_TjP.js} +1 -1
- package/dist/{region-binding-workflow-BzfbxRiR.cjs → region-binding-workflow-DIYJdCUr.cjs} +1 -1
- package/dist/{report-params-B44imUd4.js → report-params-B1RzkhJj.js} +1 -1
- package/dist/{report-params-SJfhKgaX.cjs → report-params-WDGrA4oP.cjs} +1 -1
- package/dist/sbom.cdx.json +3982 -0
- package/dist/server/node.d.cts +20 -1
- package/dist/server/node.d.ts +20 -1
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +247 -237
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +772 -4
- package/dist/server.d.ts +772 -4
- package/dist/server.js +885 -645
- package/dist/sha256-ArEYjaTI.cjs +1 -0
- package/dist/sha256-DPEuJ3nh.js +155 -0
- package/dist/style.css +1 -1
- package/dist/template-bindings-C2SpvsMU.js +58 -0
- package/dist/template-bindings-CEtWyiLX.cjs +1 -0
- package/dist/template-catalog-FJE_c9Qe.cjs +1 -0
- package/dist/template-catalog-j2B1MJlL.js +414 -0
- package/dist/{template-fragments-CLkGo6To.js → template-fragments-BGbQLGlV.js} +21 -21
- package/dist/{template-fragments-DFUpq5QM.cjs → template-fragments-DcKeiylI.cjs} +1 -1
- package/dist/{template-outline-B3xVkzSv.cjs → template-outline-BwRV_eRo.cjs} +1 -1
- package/dist/{template-outline-CFenM1PV.js → template-outline-cnWfT_LK.js} +3 -3
- package/dist/{template-registry-COXDEJEM.js → template-registry-BtaKPELV.js} +364 -201
- package/dist/template-registry-Co1zPq5e.cjs +1 -0
- package/dist/textwrap-CWHyzkBH.cjs +4 -0
- package/dist/textwrap-DE1kgcJB.js +110 -0
- package/dist/{tree-CqcQ99NM.js → tree-CjVZLRw7.js} +1 -1
- package/dist/vue/async.d.cts +123 -14
- package/dist/vue/async.d.ts +123 -14
- package/dist/vue/index.d.cts +158 -22
- package/dist/vue/index.d.ts +158 -22
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +80 -78
- package/dist/{workbook-session-DNa2RHNG.cjs → workbook-session-Bjv1YCRK.cjs} +18 -18
- package/dist/{workbook-session-BfK1yHOO.js → workbook-session-BvToI-Fd.js} +5440 -5288
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +20 -1
- package/dist/worker.d.ts +20 -1
- package/dist/worker.js +33 -32
- package/dist/xlsx-node.cjs +34 -34
- package/dist/xlsx-node.js +878 -870
- package/dist/xlsx.cjs +3 -4
- package/dist/xlsx.d.cts +22 -10
- package/dist/xlsx.d.ts +22 -10
- package/dist/xlsx.js +261 -253
- package/package.json +2 -2
- package/dist/ParamEditor-CflQV3eQ.js +0 -526
- package/dist/ParamEditor-vIDzvpPV.cjs +0 -1
- package/dist/ReportPreview-CvbqLUzM.cjs +0 -6
- package/dist/ReportPreview-D_ywJ_-H.js +0 -4533
- package/dist/assets-C2U-e-Sz.cjs +0 -4
- package/dist/assets-Q0wUwNrV.js +0 -217
- package/dist/batch-DzaTNLWI.js +0 -371
- package/dist/batch-xMkqYiTr.cjs +0 -1
- package/dist/capabilities-CK_7hizc.js +0 -63
- package/dist/capabilities-CsZ-pNHR.cjs +0 -1
- package/dist/config-0UIohTS7.cjs +0 -1
- package/dist/config-Dt9NtCPl.js +0 -566
- package/dist/data-explanation-BktvER5B.cjs +0 -1
- package/dist/data-explanation-C_J6jYNi.js +0 -16
- package/dist/designer-Ci1LizA9.js +0 -5020
- package/dist/designer-rtmVIIdN.cjs +0 -2
- package/dist/json-snapshot-BeFT3Tso.js +0 -1952
- package/dist/json-snapshot-D1NTP2oI.cjs +0 -2
- package/dist/matrix-DVyWiYsd.cjs +0 -1
- package/dist/matrix-yZsGnldA.js +0 -227
- package/dist/page-window-index-CIuT4BAv.js +0 -43
- package/dist/page-window-index-DEjnM6IB.cjs +0 -1
- package/dist/param-validation-BlHHXs6u.js +0 -153
- package/dist/param-validation-DCK039V1.cjs +0 -1
- package/dist/progress-7OSZbFok.js +0 -39
- package/dist/progress-BnLiS5eH.cjs +0 -1
- package/dist/task-events-DQ276fn2.cjs +0 -1
- package/dist/task-events-Dpsvf_t2.js +0 -47
- package/dist/template-bindings-BJR4k7qZ.cjs +0 -1
- package/dist/template-bindings-Daui7hLF.js +0 -252
- package/dist/template-registry-D3SjENi6.cjs +0 -1
- package/dist/validate-BJ5HIWY8.cjs +0 -1
- package/dist/validate-CkQBWCeg.js +0 -163
package/dist/vue.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { createReportSource as v, ReportCellEditError as x } from "@agile-team/mach-report";
|
|
2
2
|
export * from "@agile-team/mach-report";
|
|
3
|
-
import { P as R, c as h } from "./ReportPreview-
|
|
4
|
-
import { R as
|
|
5
|
-
import { M as
|
|
6
|
-
import { D as
|
|
3
|
+
import { P as R, c as h } from "./ReportPreview-ChV19HBp.js";
|
|
4
|
+
import { R as Z, a as Q, b as ee, d as re, e as te, f as ne, g as oe, h as se, i as ae, j as ie, k as ce, l as ue, m as fe, n as de, p as ge, o as le, u as pe, q as me, r as Pe } from "./ReportPreview-ChV19HBp.js";
|
|
5
|
+
import { M as f } from "./config-BVsJXSqS.js";
|
|
6
|
+
import { D as Re, a as he, b as we, c as ye, P as Se, R as Te, S as ve, d as xe, e as Ce, n as Ae, p as Oe, f as Ie, r as Me, g as _e, s as De, t as ke, h as Fe, u as be } from "./config-BVsJXSqS.js";
|
|
7
7
|
import { M as C } from "./injection-keys-e85udZCp.js";
|
|
8
|
-
import { a as
|
|
9
|
-
import { M as
|
|
10
|
-
import { shallowRef as A, computed as
|
|
11
|
-
import { h as M } from "./data-explanation-
|
|
12
|
-
|
|
8
|
+
import { a as qe, b as Ue, c as je } from "./injection-keys-e85udZCp.js";
|
|
9
|
+
import { M as Ne, m as He } from "./plugin-Ca_XZG3l.js";
|
|
10
|
+
import { shallowRef as A, computed as O, inject as I } from "vue";
|
|
11
|
+
import { h as M } from "./data-explanation-B8MZRYVS.js";
|
|
12
|
+
import { b as _ } from "./progress-D-OTpEav.js";
|
|
13
|
+
function Y(r) {
|
|
13
14
|
const e = v(r), o = async (t) => {
|
|
14
15
|
if (t.reportIds.length === 0) throw new R("缺少报表 ID");
|
|
15
16
|
for (const n of t.reportIds)
|
|
@@ -19,7 +20,7 @@ function z(r) {
|
|
|
19
20
|
};
|
|
20
21
|
return o.getParamDefs = e.getParamDefs, o;
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
+
const D = Object.freeze({
|
|
23
24
|
loading: !1,
|
|
24
25
|
hasPlan: !1,
|
|
25
26
|
pageCount: 0,
|
|
@@ -31,8 +32,8 @@ const _ = Object.freeze({
|
|
|
31
32
|
error: null,
|
|
32
33
|
pdfFont: Object.freeze({ status: "unchecked", fontUrl: "" })
|
|
33
34
|
});
|
|
34
|
-
function
|
|
35
|
-
const r = A(null), e = () => r.value?.state ??
|
|
35
|
+
function K() {
|
|
36
|
+
const r = A(null), e = () => r.value?.state ?? D, o = Object.freeze({
|
|
36
37
|
get loading() {
|
|
37
38
|
return e().loading;
|
|
38
39
|
},
|
|
@@ -105,7 +106,7 @@ function W() {
|
|
|
105
106
|
});
|
|
106
107
|
function t() {
|
|
107
108
|
if (!r.value)
|
|
108
|
-
throw new
|
|
109
|
+
throw new f("config", "报表预览尚未挂载,请在 ready 后调用控制器");
|
|
109
110
|
return r.value;
|
|
110
111
|
}
|
|
111
112
|
return {
|
|
@@ -113,7 +114,7 @@ function W() {
|
|
|
113
114
|
const s = n;
|
|
114
115
|
r.value = s && typeof s.reload == "function" && typeof s.print == "function" && typeof s.exportAs == "function" && typeof s.openPdfWindow == "function" && typeof s.gotoPage == "function" && typeof s.setParams == "function" ? s : null;
|
|
115
116
|
},
|
|
116
|
-
ready:
|
|
117
|
+
ready: O(() => r.value !== null),
|
|
117
118
|
state: o,
|
|
118
119
|
async checkPdfFont() {
|
|
119
120
|
const n = t();
|
|
@@ -148,7 +149,7 @@ function W() {
|
|
|
148
149
|
},
|
|
149
150
|
async importExcel(n, s) {
|
|
150
151
|
const d = t();
|
|
151
|
-
if (!d.importExcel) throw new
|
|
152
|
+
if (!d.importExcel) throw new f("config", "旧自定义控制器未提供 Excel 导入");
|
|
152
153
|
return d.importExcel(n, s);
|
|
153
154
|
},
|
|
154
155
|
getPlan() {
|
|
@@ -168,21 +169,21 @@ function W() {
|
|
|
168
169
|
pasteSelection: async (n) => await t().pasteSelection?.(n) ?? !1
|
|
169
170
|
};
|
|
170
171
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
172
|
+
function $() {
|
|
173
|
+
return I(C, null);
|
|
173
174
|
}
|
|
174
175
|
function m(r) {
|
|
175
176
|
return !!r && typeof r == "object" && !Array.isArray(r);
|
|
176
177
|
}
|
|
177
|
-
function
|
|
178
|
+
function k(r) {
|
|
178
179
|
return Array.isArray(r) && r.every((e) => m(e) && typeof e.code == "string" && typeof e.message == "string" && ["info", "warning", "error"].includes(e.severity) && (e.path === void 0 || typeof e.path == "string") && M(e));
|
|
179
180
|
}
|
|
180
|
-
function
|
|
181
|
+
function F(r, e) {
|
|
181
182
|
return Array.isArray(r) && r.every((o) => m(o) && Number.isSafeInteger(o.editIndex) && o.editIndex >= 0 && o.editIndex < e && typeof o.code == "string" && typeof o.message == "string");
|
|
182
183
|
}
|
|
183
|
-
function
|
|
184
|
+
function b(r, e) {
|
|
184
185
|
let o;
|
|
185
|
-
if (!m(r) || typeof r.revision != "string" || !r.revision.trim() ? o = "非空 revision(请先在适配器解包业务响应)" : r.sourceToken !== void 0 && typeof r.sourceToken != "string" ? o = "字符串 sourceToken" : r.diagnostics !== void 0 && !
|
|
186
|
+
if (!m(r) || typeof r.revision != "string" || !r.revision.trim() ? o = "非空 revision(请先在适配器解包业务响应)" : r.sourceToken !== void 0 && typeof r.sourceToken != "string" ? o = "字符串 sourceToken" : r.diagnostics !== void 0 && !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};服务器可能已提交,请重新查询确认后再编辑`);
|
|
186
187
|
}
|
|
187
188
|
function w(r) {
|
|
188
189
|
return typeof r == "function" ? r() : r;
|
|
@@ -194,20 +195,20 @@ function L(r, e) {
|
|
|
194
195
|
function y(r, e, o, t) {
|
|
195
196
|
return typeof r == "function" ? r() : L(e, o) ?? t ?? r;
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
+
function q(r) {
|
|
198
199
|
return r.requestId ?? globalThis.crypto?.randomUUID?.() ?? `mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
199
200
|
}
|
|
200
|
-
function
|
|
201
|
-
if (!r.save) throw new
|
|
201
|
+
function V(r, e) {
|
|
202
|
+
if (!r.save) throw new f("config", "ReportProvider.save 未配置,无法启用业务保存");
|
|
202
203
|
let o = "", t, n, s = 0;
|
|
203
204
|
function d(a, i, g) {
|
|
204
205
|
a.conflicts?.length || i !== o || g !== s || (t = a.revision, n = a.sourceToken);
|
|
205
206
|
}
|
|
206
207
|
async function P(a, i) {
|
|
207
208
|
if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
208
|
-
const g = w(e.reportId), E = { ...w(e.params ?? {}) }, l = JSON.stringify([g, E]),
|
|
209
|
+
const g = w(e.reportId), E = { ...w(e.params ?? {}) }, l = JSON.stringify([g, E]), S = ++s;
|
|
209
210
|
if (l !== o && (o = l, t = void 0, n = void 0), e.requireSource !== !1 && a.edits.some((c) => !c.source)) throw new x("missing");
|
|
210
|
-
const
|
|
211
|
+
const u = await r.save({
|
|
211
212
|
reportId: g,
|
|
212
213
|
params: E,
|
|
213
214
|
signal: i.signal,
|
|
@@ -218,67 +219,68 @@ function K(r, e) {
|
|
|
218
219
|
sourceToken: y(e.sourceToken, a.edits, "sourceToken", n)
|
|
219
220
|
});
|
|
220
221
|
if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
221
|
-
|
|
222
|
-
const p =
|
|
223
|
-
if (p?.length) throw new
|
|
224
|
-
const
|
|
225
|
-
return d(
|
|
222
|
+
b(u, a.edits.length), u.diagnostics?.forEach((c) => _(() => e.onDiagnostic?.(c)));
|
|
223
|
+
const p = u.diagnostics?.filter((c) => c.severity === "error");
|
|
224
|
+
if (p?.length) throw new f("edit", p.map((c) => c.message).join(";"), { diagnostics: p });
|
|
225
|
+
const T = u.conflicts?.map((c) => ({ source: a.edits[c.editIndex]?.source, address: a.edits[c.editIndex]?.address, message: c.message }));
|
|
226
|
+
return d(u, l, S), { revision: u.revision, sourceToken: u.sourceToken, conflicts: T };
|
|
226
227
|
}
|
|
227
228
|
return {
|
|
228
229
|
requireSource: e.requireSource ?? !0,
|
|
229
230
|
canEdit: e.canEdit,
|
|
230
231
|
validate: e.validate,
|
|
231
232
|
saveBatch: P,
|
|
232
|
-
save: (a, i) => P({ requestId:
|
|
233
|
+
save: (a, i) => P({ requestId: q(i), edits: [h(a)] }, i)
|
|
233
234
|
};
|
|
234
235
|
}
|
|
235
236
|
export {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
Re as DEFAULT_CALCULATION_MESSAGES,
|
|
238
|
+
he as DEFAULT_MESSAGES,
|
|
239
|
+
we as DEFAULT_PRINT_MESSAGES,
|
|
240
|
+
ye as DEFAULT_THEME,
|
|
241
|
+
qe as MACH_REPORT_CONFIG_KEY,
|
|
241
242
|
C as MACH_REPORT_CONTROLLER_KEY,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
Ue as MACH_REPORT_FETCHER_KEY,
|
|
244
|
+
je as MACH_REPORT_PDF_EXPORTER_KEY,
|
|
245
|
+
f as MachReportError,
|
|
246
|
+
Ne as MachReportPreview,
|
|
247
|
+
Se as PARAM_OPTIONS_MESSAGES,
|
|
246
248
|
R as PlanLoadError,
|
|
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
|
-
|
|
249
|
+
Z as REPORT_EXPORT_FORMATS,
|
|
250
|
+
Q as REPORT_PREVIEW_TOOLS,
|
|
251
|
+
ee as ReportPagination,
|
|
252
|
+
Te as ReportParamPanel,
|
|
253
|
+
re as ReportPreview,
|
|
254
|
+
te as ReportPrintResourceError,
|
|
255
|
+
ne as ReportToolbar,
|
|
256
|
+
ve as SILENT_LOGGER,
|
|
257
|
+
oe as buildPrintDocument,
|
|
258
|
+
se as buildWordHtml,
|
|
259
|
+
ae as createDefaultPdfExporter,
|
|
260
|
+
ie as createFetchRequest,
|
|
261
|
+
Y as createLocalFetcher,
|
|
262
|
+
ce as createPrintCalibrationPlan,
|
|
263
|
+
V as createProviderEditing,
|
|
264
|
+
ue as createReportStoragePreferences,
|
|
265
|
+
xe as defineMachReportConfig,
|
|
266
|
+
Ce as defineMachReportPreset,
|
|
267
|
+
fe as joinReportIds,
|
|
268
|
+
He as machReportPlugin,
|
|
269
|
+
de as normalizeReportIds,
|
|
270
|
+
Ae as normalizeReportLoadError,
|
|
271
|
+
ge as preparePrintResources,
|
|
272
|
+
Oe as printCalibration,
|
|
273
|
+
le as printPlans,
|
|
274
|
+
Ie as provideMachReportConfig,
|
|
275
|
+
Me as resolveCalculationMessages,
|
|
276
|
+
_e as resolveConfig,
|
|
277
|
+
De as snapshotPrintOptions,
|
|
278
|
+
ke as themeToCssVars,
|
|
279
|
+
Fe as toErrorDetail,
|
|
280
|
+
K as useMachReport,
|
|
281
|
+
be as useMachReportConfig,
|
|
282
|
+
pe as usePageWindow,
|
|
283
|
+
me as usePrintExport,
|
|
284
|
+
$ as useReportPreview,
|
|
285
|
+
Pe as useZoom
|
|
284
286
|
};
|