@agile-team/mach-report 2.22.0 → 2.23.1
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 -6
- package/dist/ExcelBindingWizard-BrTmdo7f.cjs +1 -0
- package/dist/ExcelBindingWizard-CcDMLO8Q.js +1486 -0
- package/dist/ParamEditor-BGjovFUe.js +737 -0
- package/dist/ParamEditor-CeNp4_zQ.cjs +1 -0
- package/dist/ReportBatchPanel-CHxBtG9R.cjs +1 -0
- package/dist/ReportBatchPanel-CJB67WNd.js +351 -0
- package/dist/ReportLabelStudio-Tplc1TLJ.js +784 -0
- package/dist/ReportLabelStudio-g8PkqJWn.cjs +1 -0
- package/dist/ReportParamPanel-C7fZTllk.cjs +1 -0
- package/dist/{ReportParamPanel-BHSKVL8k.js → ReportParamPanel-GI43aGa0.js} +146 -127
- package/dist/ReportPreview-BoGBGyRr.cjs +6 -0
- package/dist/ReportPreview-QLONCyci.js +6257 -0
- package/dist/ReportTemplateLibrary-BFQIX0sg.cjs +1 -0
- package/dist/ReportTemplateLibrary-KqX4E2sN.js +312 -0
- package/dist/RuleEditor-BZUP9yvL.cjs +1 -0
- package/dist/RuleEditor-OPX1awrH.js +2342 -0
- package/dist/TemplateOutlinePanel-CVYKVLv_.cjs +1 -0
- package/dist/TemplateOutlinePanel-DQS-eOs6.js +97 -0
- package/dist/TemplateReusePanel-CY6O93Zk.cjs +1 -0
- package/dist/TemplateReusePanel-DKXiFTyB.js +389 -0
- package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +1 -0
- package/dist/TemplateReviewPanel-Dijwm9YE.js +593 -0
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.js +26 -26
- package/dist/artifact-integrity.json +106 -104
- package/dist/assets-D2gHc4Mz.cjs +1 -0
- package/dist/assets-T_gDeFaz.js +132 -0
- package/dist/auto-BB99S802.js +257 -0
- package/dist/auto-BrPWo7Xm.cjs +1 -0
- package/dist/capabilities-DiBj4Qgl.cjs +1 -0
- package/dist/capabilities-pg7j7VLT.js +106 -0
- package/dist/charts-Cjw5AYkg.cjs +1 -0
- package/dist/{charts-Dlv8j2AG.js → charts-CxJZ0XaY.js} +1 -1
- package/dist/computed-DK6BruFz.cjs +1 -0
- package/dist/{computed-C8NRZQss.js → computed-f3pOqWLX.js} +381 -301
- package/dist/data-bar-CeZuFmYl.cjs +1 -0
- package/dist/{data-bar-8baGYEZ9.js → data-bar-IkI6VvMQ.js} +1 -1
- package/dist/designer-BZoVWTgl.js +7172 -0
- package/dist/designer-zS2uKJmY.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +105 -45
- package/dist/designer.d.ts +105 -45
- package/dist/designer.js +4 -4
- package/dist/dom-ChE5D-L-.cjs +1 -0
- package/dist/dom-JWrchIre.js +452 -0
- package/dist/dom-cell-address-DLD1mkTB.cjs +1 -0
- package/dist/dom-cell-address-Fn-8nk7D.js +11 -0
- package/dist/{encoding-ncQAvyOv.cjs → encoding-7lquyj0w.cjs} +1 -1
- package/dist/{encoding-DbnhbwI8.js → encoding-CEd-dq9A.js} +2 -2
- package/dist/{font-loader-Di0lQKFf.js → font-loader-CNWXomuV.js} +1 -1
- package/dist/{font-loader-BB372_XN.cjs → font-loader-D8pI87fL.cjs} +1 -1
- package/dist/grid-strokes-Be24LGuV.cjs +1 -0
- package/dist/grid-strokes-EoY66L2f.js +53 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +944 -1259
- package/dist/{json-snapshot-DvQbZlD7.js → json-snapshot-BRnzKudk.js} +763 -776
- package/dist/json-snapshot-DNiIbpOr.cjs +2 -0
- package/dist/matrix-B8QWbsGM.cjs +1 -0
- package/dist/matrix-C6e_r_vp.js +302 -0
- package/dist/{pdf-DmlnL5eB.js → pdf-CJToa81Z.js} +20 -20
- package/dist/{pdf-CARdBcuw.cjs → pdf-DpMkW72B.cjs} +42 -42
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.js +2 -2
- package/dist/{plugin-AcAQ2m9X.cjs → plugin-BWTp-X7b.cjs} +1 -1
- package/dist/{plugin-w5Nyt08U.js → plugin-_BkUVc2z.js} +1 -1
- package/dist/{prefill-BXBxx5We.js → prefill-CWGdnqQd.js} +21 -21
- package/dist/prefill-PaAy6wLk.cjs +1 -0
- package/dist/prepared-CJy_qk7d.js +94 -0
- package/dist/prepared-D0yCSxSO.cjs +1 -0
- package/dist/progress-ByiOxUD3.js +250 -0
- package/dist/progress-WomPRP3B.cjs +1 -0
- package/dist/{protocol-fjaeKkjf.js → protocol-BG16rz6D.js} +3 -3
- package/dist/{protocol-C9ZaylID.cjs → protocol-wzhl1Fim.cjs} +1 -1
- package/dist/record-bindings-DatJZv_e.js +200 -0
- package/dist/record-bindings-MBxbeBsi.cjs +1 -0
- package/dist/{region-binding-workflow-aA8nxmkZ.js → region-binding-workflow-DjrXuR1q.js} +2 -2
- package/dist/{region-binding-workflow-BiJQ7NU6.cjs → region-binding-workflow-l7NGfagJ.cjs} +2 -2
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/rich-text-layout-Ciwa6D2o.js +52 -0
- package/dist/rich-text-layout-DK7A_a5r.cjs +3 -0
- package/dist/runtime-DYMOS_gz.cjs +1 -0
- package/dist/{runtime-BTtpjF3D.js → runtime-PiCax9zQ.js} +52 -51
- package/dist/sbom.cdx.json +1 -1
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +1676 -1619
- package/dist/server.cjs +1 -1
- package/dist/server.js +24 -24
- package/dist/style.css +1 -1
- package/dist/{template-catalog-JSxSqk5y.js → template-catalog-CRuZL3pi.js} +17 -17
- package/dist/template-catalog-DtrtT1FY.cjs +1 -0
- package/dist/{template-fragments-D2JFj7Du.js → template-fragments-CPpGpQoz.js} +12 -12
- package/dist/template-fragments-GVjpew_q.cjs +1 -0
- package/dist/template-registry-DI59PXVK.cjs +1 -0
- package/dist/{template-registry-Do1Uav2Z.js → template-registry-O0hNIOfB.js} +17 -17
- package/dist/{template-serialization-CU4n_Miu.js → template-serialization-CWmHq7lX.js} +1 -1
- package/dist/{template-serialization-CgqBo6s-.cjs → template-serialization-CqQY4zDg.cjs} +1 -1
- package/dist/textwrap-D4ZksyMK.js +111 -0
- package/dist/textwrap-DEHqAjKZ.cjs +4 -0
- package/dist/vue/async.d.cts +31 -0
- package/dist/vue/async.d.ts +31 -0
- package/dist/vue/index.d.cts +32 -1
- package/dist/vue/index.d.ts +32 -1
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +52 -47
- package/dist/{workbook-session-BvEBRRMz.cjs → workbook-session-C6-SrnCT.cjs} +4 -4
- package/dist/{workbook-session-f0wVlzst.js → workbook-session-C9ZmCBwY.js} +15 -16
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.js +184 -179
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-CW79I6Gl.cjs +0 -1
- package/dist/ExcelBindingWizard-CZyppD7I.js +0 -1485
- package/dist/ParamEditor-CiYCJI0b.cjs +0 -1
- package/dist/ParamEditor-DQit-Gdf.js +0 -732
- package/dist/ReportBatchPanel-DKTpV7MU.js +0 -350
- package/dist/ReportBatchPanel-Db6TAfG5.cjs +0 -1
- package/dist/ReportLabelStudio-B0i9ohQj.cjs +0 -1
- package/dist/ReportLabelStudio-BYnRqmje.js +0 -780
- package/dist/ReportParamPanel-lngONOEz.cjs +0 -1
- package/dist/ReportPreview-BDgKssYR.js +0 -5887
- package/dist/ReportPreview-Dw-4icG6.cjs +0 -6
- package/dist/ReportTemplateLibrary-BZuKn0YK.js +0 -311
- package/dist/ReportTemplateLibrary-DEXH07ND.cjs +0 -1
- package/dist/RuleEditor-CIQn547x.js +0 -2341
- package/dist/RuleEditor-zSUmPjKa.cjs +0 -1
- package/dist/TemplateOutlinePanel-B5SfGYVN.cjs +0 -1
- package/dist/TemplateOutlinePanel-D0PgOSQE.js +0 -96
- package/dist/TemplateReusePanel-BKlAEF8-.js +0 -388
- package/dist/TemplateReusePanel-DAy_Hwqz.cjs +0 -1
- package/dist/TemplateReviewPanel-CowmHaQQ.cjs +0 -1
- package/dist/TemplateReviewPanel-div-EH_m.js +0 -592
- package/dist/assets-CxHunY_9.js +0 -232
- package/dist/assets-vbjAGgk8.cjs +0 -1
- package/dist/auto-DcUHlKob.cjs +0 -1
- package/dist/auto-moShblh1.js +0 -240
- package/dist/charts-aCtoswXq.cjs +0 -1
- package/dist/component-tree-1_QCiQJX.js +0 -67
- package/dist/component-tree-BjZIp6w9.cjs +0 -1
- package/dist/computed-4TnxzgIh.cjs +0 -1
- package/dist/data-bar-YltqGTaC.cjs +0 -1
- package/dist/designer-B7jJeAeG.js +0 -6914
- package/dist/designer-BWQVpJeN.cjs +0 -2
- package/dist/grid-geometry-D3SJgWFv.js +0 -136
- package/dist/grid-geometry-D8ReblRV.cjs +0 -1
- package/dist/json-snapshot-nyV63AbB.cjs +0 -2
- package/dist/matrix-0hywp0-F.cjs +0 -1
- package/dist/matrix-Dy-tyY7E.js +0 -381
- package/dist/prefill-DUvejVt1.cjs +0 -1
- package/dist/prepared-YXy-fVLw.cjs +0 -1
- package/dist/prepared-rXCKqdHY.js +0 -88
- package/dist/progress-B0ctFpKf.cjs +0 -1
- package/dist/progress-Hc2vxoCs.js +0 -52
- package/dist/record-bindings-Ct1HkPrc.cjs +0 -1
- package/dist/record-bindings-VZGS-Qd8.js +0 -155
- package/dist/rich-text-layout-K48VHUoW.cjs +0 -3
- package/dist/rich-text-layout-wxBhnAS7.js +0 -102
- package/dist/runtime-Dq0LUsyS.cjs +0 -1
- package/dist/template-catalog-CLAM4w7H.cjs +0 -1
- package/dist/template-fragments-Ca25Jt7e.cjs +0 -1
- package/dist/template-outline-CDWXptuj.js +0 -88
- package/dist/template-outline-K4jGhATu.cjs +0 -1
- package/dist/template-registry-CWnuGqyP.cjs +0 -1
- package/dist/textwrap-CkGjRFT3.js +0 -110
- package/dist/textwrap-OTOUMr4f.cjs +0 -4
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { D as d } from "./progress-ByiOxUD3.js";
|
|
2
|
+
const M = /[\u3000-\u9fff\uff00-\uffef]/, w = /[ \n\u3000-\u9fff\uff00-\uffef]/, s = new Uint8Array(128);
|
|
3
|
+
{
|
|
4
|
+
for (const t of "iljtf.,:;'`|!()[]") s[t.charCodeAt(0)] = 1;
|
|
5
|
+
for (const t of "mwMW@") s[t.charCodeAt(0)] = 2;
|
|
6
|
+
for (let t = 48; t <= 57; t++) s[t] = 3;
|
|
7
|
+
for (let t = 65; t <= 90; t++) s[t] = 4;
|
|
8
|
+
s[32] = 5;
|
|
9
|
+
}
|
|
10
|
+
const g = [0.54, 0.26, 0.95, 0.59, 0.67, 0.3];
|
|
11
|
+
function p(t) {
|
|
12
|
+
const e = t.charCodeAt(0);
|
|
13
|
+
return e < 128 ? g[s[e]] : M.test(t) ? 1 : /[A-Z]/.test(t) ? 0.67 : 0.54;
|
|
14
|
+
}
|
|
15
|
+
const h = {
|
|
16
|
+
measureMm(t, e) {
|
|
17
|
+
const { fontSizePt: f, bold: c = !1, letterSpacingPt: i = 0 } = e, n = 25.4 / 72;
|
|
18
|
+
let r = 0, o = 0;
|
|
19
|
+
for (const a of t)
|
|
20
|
+
r += p(a), o++;
|
|
21
|
+
return c && (r *= 1.04), (r * f + i * Math.max(0, o - 1)) * n;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function x() {
|
|
25
|
+
return h;
|
|
26
|
+
}
|
|
27
|
+
function j(t, e) {
|
|
28
|
+
return h.measureMm(t, e);
|
|
29
|
+
}
|
|
30
|
+
function k(t) {
|
|
31
|
+
let e;
|
|
32
|
+
return {
|
|
33
|
+
measureMm(f, c) {
|
|
34
|
+
if (e === void 0 && (e = t()), !e) return h.measureMm(f, c);
|
|
35
|
+
const i = c.fontSizePt * 96 / 72;
|
|
36
|
+
e.font = `${c.italic ? "italic " : ""}${c.bold ? "bold " : ""}${i}px ${c.fontFamily ?? d}`, "letterSpacing" in e && (e.letterSpacing = "0px");
|
|
37
|
+
const n = (c.letterSpacingPt ?? 0) * Math.max(0, Array.from(f).length - 1);
|
|
38
|
+
return e.measureText(f).width * 25.4 / 96 + n * 25.4 / 72;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function A(t, e, f) {
|
|
43
|
+
if (!w.test(t)) return [{ text: t, widthMm: f.measureMm(t, e), cjk: !1 }];
|
|
44
|
+
const c = [];
|
|
45
|
+
let i = "";
|
|
46
|
+
const n = () => {
|
|
47
|
+
i && (c.push({ text: i, widthMm: f.measureMm(i, e), cjk: !1 }), i = "");
|
|
48
|
+
};
|
|
49
|
+
for (const r of t) {
|
|
50
|
+
if (r === `
|
|
51
|
+
`) {
|
|
52
|
+
n(), c.push({ text: `
|
|
53
|
+
`, widthMm: 0, cjk: !1, br: !0 });
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (r === " ") {
|
|
57
|
+
n(), c.push({ text: r, widthMm: f.measureMm(r, e), cjk: !1, space: !0 });
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (M.test(r)) {
|
|
61
|
+
n(), c.push({ text: r, widthMm: f.measureMm(r, e), cjk: !0 });
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
i += r;
|
|
65
|
+
}
|
|
66
|
+
return n(), c;
|
|
67
|
+
}
|
|
68
|
+
function _(t, e, f, c = h) {
|
|
69
|
+
if (!t) return [""];
|
|
70
|
+
t = t.replace(/\r\n?/g, `
|
|
71
|
+
`);
|
|
72
|
+
const i = [];
|
|
73
|
+
let n = "", r = 0;
|
|
74
|
+
const o = (f.letterSpacingPt ?? 0) * 25.4 / 72, a = () => {
|
|
75
|
+
i.push(n), n = "", r = 0;
|
|
76
|
+
};
|
|
77
|
+
for (const u of A(t, f, c)) {
|
|
78
|
+
if (u.br) {
|
|
79
|
+
a();
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const m = n.length > 0 ? o : 0;
|
|
83
|
+
if (r + m + u.widthMm <= e) {
|
|
84
|
+
n += u.text, r += m + u.widthMm;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (u.space) {
|
|
88
|
+
a();
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (u.cjk) {
|
|
92
|
+
n.length > 0 && a(), n = u.text, r = u.widthMm;
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if (n.length > 0 && a(), u.widthMm <= e) {
|
|
96
|
+
n = u.text, r = u.widthMm;
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
for (const l of u.text)
|
|
100
|
+
c.measureMm(n + l, f) > e && n.length > 0 && a(), n += l, r = c.measureMm(n, f);
|
|
101
|
+
}
|
|
102
|
+
return a(), i;
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
k as a,
|
|
106
|
+
x as b,
|
|
107
|
+
p as c,
|
|
108
|
+
h,
|
|
109
|
+
j as m,
|
|
110
|
+
_ as w
|
|
111
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const w=require("./progress-WomPRP3B.cjs"),M=/[\u3000-\u9fff\uff00-\uffef]/,g=/[ \n\u3000-\u9fff\uff00-\uffef]/,a=new Uint8Array(128);{for(const t of"iljtf.,:;'`|!()[]")a[t.charCodeAt(0)]=1;for(const t of"mwMW@")a[t.charCodeAt(0)]=2;for(let t=48;t<=57;t++)a[t]=3;for(let t=65;t<=90;t++)a[t]=4;a[32]=5}const p=[.54,.26,.95,.59,.67,.3];function d(t){const e=t.charCodeAt(0);return e<128?p[a[e]]:M.test(t)?1:/[A-Z]/.test(t)?.67:.54}const o={measureMm(t,e){const{fontSizePt:i,bold:c=!1,letterSpacingPt:f=0}=e,r=25.4/72;let n=0,h=0;for(const s of t)n+=d(s),h++;return c&&(n*=1.04),(n*i+f*Math.max(0,h-1))*r}};function A(){return o}function T(t,e){return o.measureMm(t,e)}function x(t){let e;return{measureMm(i,c){if(e===void 0&&(e=t()),!e)return o.measureMm(i,c);const f=c.fontSizePt*96/72;e.font=`${c.italic?"italic ":""}${c.bold?"bold ":""}${f}px ${c.fontFamily??w.DEFAULT_FONT_FAMILY}`,"letterSpacing"in e&&(e.letterSpacing="0px");const r=(c.letterSpacingPt??0)*Math.max(0,Array.from(i).length-1);return e.measureText(i).width*25.4/96+r*25.4/72}}}function S(t,e,i){if(!g.test(t))return[{text:t,widthMm:i.measureMm(t,e),cjk:!1}];const c=[];let f="";const r=()=>{f&&(c.push({text:f,widthMm:i.measureMm(f,e),cjk:!1}),f="")};for(const n of t){if(n===`
|
|
2
|
+
`){r(),c.push({text:`
|
|
3
|
+
`,widthMm:0,cjk:!1,br:!0});continue}if(n===" "){r(),c.push({text:n,widthMm:i.measureMm(n,e),cjk:!1,space:!0});continue}if(M.test(n)){r(),c.push({text:n,widthMm:i.measureMm(n,e),cjk:!0});continue}f+=n}return r(),c}function j(t,e,i,c=o){if(!t)return[""];t=t.replace(/\r\n?/g,`
|
|
4
|
+
`);const f=[];let r="",n=0;const h=(i.letterSpacingPt??0)*25.4/72,s=()=>{f.push(r),r="",n=0};for(const u of S(t,i,c)){if(u.br){s();continue}const m=r.length>0?h:0;if(n+m+u.widthMm<=e){r+=u.text,n+=m+u.widthMm;continue}if(u.space){s();continue}if(u.cjk){r.length>0&&s(),r=u.text,n=u.widthMm;continue}if(r.length>0&&s(),u.widthMm<=e){r=u.text,n=u.widthMm;continue}for(const l of u.text)c.measureMm(r+l,i)>e&&r.length>0&&s(),r+=l,n=c.measureMm(r,i)}return s(),f}exports.charWidthEm=d;exports.createCanvasMeasurer=x;exports.createHeuristicMeasurer=A;exports.heuristicMeasurer=o;exports.measureTextMm=T;exports.wrapText=j;
|
package/dist/vue/async.d.cts
CHANGED
|
@@ -1015,6 +1015,20 @@ declare interface MachReportMessages extends Partial<ReportCalculationMessages>,
|
|
|
1015
1015
|
importing?: string;
|
|
1016
1016
|
editCell?: string;
|
|
1017
1017
|
editingHint?: string;
|
|
1018
|
+
editCellEditable?: string;
|
|
1019
|
+
editCellReadOnly?: string;
|
|
1020
|
+
editCellFormula?: string;
|
|
1021
|
+
editCellProtected?: string;
|
|
1022
|
+
editCellComplex?: string;
|
|
1023
|
+
editCellStructure?: string;
|
|
1024
|
+
editCellDerived?: string;
|
|
1025
|
+
editCellPermission?: string;
|
|
1026
|
+
editCellBusy?: string;
|
|
1027
|
+
editHistoryLimited?: string;
|
|
1028
|
+
changesSearch?: string;
|
|
1029
|
+
changesAllDatasets?: string;
|
|
1030
|
+
changesNoMatches?: string;
|
|
1031
|
+
changesRange?: string;
|
|
1018
1032
|
saving?: string;
|
|
1019
1033
|
editInvalidNumber?: string;
|
|
1020
1034
|
editInvalidBoolean?: string;
|
|
@@ -1165,6 +1179,8 @@ declare interface MachReportStateError {
|
|
|
1165
1179
|
}
|
|
1166
1180
|
/** 主题变量(组件外壳注入的 --mrp-* CSS 自定义属性) */
|
|
1167
1181
|
declare interface MachReportTheme {
|
|
1182
|
+
/** Native controls follow the host's declared light/dark palette. */
|
|
1183
|
+
colorScheme?: "light" | "dark";
|
|
1168
1184
|
/** 空态插图强调色,不随正文颜色变灰。 */
|
|
1169
1185
|
emptyAccent?: string;
|
|
1170
1186
|
shellBg: string;
|
|
@@ -1177,6 +1193,11 @@ declare interface MachReportTheme {
|
|
|
1177
1193
|
btnHoverBg: string;
|
|
1178
1194
|
btnHoverFg: string;
|
|
1179
1195
|
btnActiveBg: string;
|
|
1196
|
+
/** Foreground on solid primary actions. Optional for existing complete themes. */
|
|
1197
|
+
btnActiveFg?: string;
|
|
1198
|
+
errorFg?: string;
|
|
1199
|
+
warningFg?: string;
|
|
1200
|
+
successFg?: string;
|
|
1180
1201
|
}
|
|
1181
1202
|
declare interface MachReportToolbarOptions {
|
|
1182
1203
|
/** Reasons explain host restrictions without granting capabilities. */
|
|
@@ -2068,11 +2089,21 @@ declare interface ReportEditConflict {
|
|
|
2068
2089
|
currentValue?: ReportCellValue_2;
|
|
2069
2090
|
revision?: string | number;
|
|
2070
2091
|
}
|
|
2092
|
+
declare interface ReportEditHistoryOptions {
|
|
2093
|
+
/** Retained undo/redo transactions. Default 100. Zero disables undo retention. */
|
|
2094
|
+
maxSteps?: number;
|
|
2095
|
+
/** Conservative retained transaction size in bytes. Default 8 MiB. */
|
|
2096
|
+
maxBytes?: number;
|
|
2097
|
+
}
|
|
2071
2098
|
/** Opt in with true for local drafts, or provide host validation and persistence. */
|
|
2072
2099
|
declare interface ReportEditingOptions {
|
|
2073
2100
|
/** Optional field controls, keyed by source.field / table.columnKey; a resolver supports dataset-specific rules. */
|
|
2074
2101
|
fields?: Readonly<Record<string, ReportCellFieldOptions>> | ((context: ReportCellContext) => ReportCellFieldOptions | undefined);
|
|
2075
2102
|
canEdit?(context: ReportCellContext): boolean;
|
|
2103
|
+
/** Optional explanation when canEdit rejects a cell. Does not grant editing access. */
|
|
2104
|
+
readOnlyReason?(context: ReportCellContext): string | undefined;
|
|
2105
|
+
/** Bounds undo/redo retention. Net differences and getChanges remain complete. */
|
|
2106
|
+
history?: ReportEditHistoryOptions;
|
|
2076
2107
|
/** Return an error message or throw to reject the edit. */
|
|
2077
2108
|
validate?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | string | Promise<void | string>;
|
|
2078
2109
|
/** Same declarative rules can be run in Node via validateReportDataset. Requires a source-backed session. */
|
package/dist/vue/async.d.ts
CHANGED
|
@@ -1015,6 +1015,20 @@ declare interface MachReportMessages extends Partial<ReportCalculationMessages>,
|
|
|
1015
1015
|
importing?: string;
|
|
1016
1016
|
editCell?: string;
|
|
1017
1017
|
editingHint?: string;
|
|
1018
|
+
editCellEditable?: string;
|
|
1019
|
+
editCellReadOnly?: string;
|
|
1020
|
+
editCellFormula?: string;
|
|
1021
|
+
editCellProtected?: string;
|
|
1022
|
+
editCellComplex?: string;
|
|
1023
|
+
editCellStructure?: string;
|
|
1024
|
+
editCellDerived?: string;
|
|
1025
|
+
editCellPermission?: string;
|
|
1026
|
+
editCellBusy?: string;
|
|
1027
|
+
editHistoryLimited?: string;
|
|
1028
|
+
changesSearch?: string;
|
|
1029
|
+
changesAllDatasets?: string;
|
|
1030
|
+
changesNoMatches?: string;
|
|
1031
|
+
changesRange?: string;
|
|
1018
1032
|
saving?: string;
|
|
1019
1033
|
editInvalidNumber?: string;
|
|
1020
1034
|
editInvalidBoolean?: string;
|
|
@@ -1165,6 +1179,8 @@ declare interface MachReportStateError {
|
|
|
1165
1179
|
}
|
|
1166
1180
|
/** 主题变量(组件外壳注入的 --mrp-* CSS 自定义属性) */
|
|
1167
1181
|
declare interface MachReportTheme {
|
|
1182
|
+
/** Native controls follow the host's declared light/dark palette. */
|
|
1183
|
+
colorScheme?: "light" | "dark";
|
|
1168
1184
|
/** 空态插图强调色,不随正文颜色变灰。 */
|
|
1169
1185
|
emptyAccent?: string;
|
|
1170
1186
|
shellBg: string;
|
|
@@ -1177,6 +1193,11 @@ declare interface MachReportTheme {
|
|
|
1177
1193
|
btnHoverBg: string;
|
|
1178
1194
|
btnHoverFg: string;
|
|
1179
1195
|
btnActiveBg: string;
|
|
1196
|
+
/** Foreground on solid primary actions. Optional for existing complete themes. */
|
|
1197
|
+
btnActiveFg?: string;
|
|
1198
|
+
errorFg?: string;
|
|
1199
|
+
warningFg?: string;
|
|
1200
|
+
successFg?: string;
|
|
1180
1201
|
}
|
|
1181
1202
|
declare interface MachReportToolbarOptions {
|
|
1182
1203
|
/** Reasons explain host restrictions without granting capabilities. */
|
|
@@ -2068,11 +2089,21 @@ declare interface ReportEditConflict {
|
|
|
2068
2089
|
currentValue?: ReportCellValue_2;
|
|
2069
2090
|
revision?: string | number;
|
|
2070
2091
|
}
|
|
2092
|
+
declare interface ReportEditHistoryOptions {
|
|
2093
|
+
/** Retained undo/redo transactions. Default 100. Zero disables undo retention. */
|
|
2094
|
+
maxSteps?: number;
|
|
2095
|
+
/** Conservative retained transaction size in bytes. Default 8 MiB. */
|
|
2096
|
+
maxBytes?: number;
|
|
2097
|
+
}
|
|
2071
2098
|
/** Opt in with true for local drafts, or provide host validation and persistence. */
|
|
2072
2099
|
declare interface ReportEditingOptions {
|
|
2073
2100
|
/** Optional field controls, keyed by source.field / table.columnKey; a resolver supports dataset-specific rules. */
|
|
2074
2101
|
fields?: Readonly<Record<string, ReportCellFieldOptions>> | ((context: ReportCellContext) => ReportCellFieldOptions | undefined);
|
|
2075
2102
|
canEdit?(context: ReportCellContext): boolean;
|
|
2103
|
+
/** Optional explanation when canEdit rejects a cell. Does not grant editing access. */
|
|
2104
|
+
readOnlyReason?(context: ReportCellContext): string | undefined;
|
|
2105
|
+
/** Bounds undo/redo retention. Net differences and getChanges remain complete. */
|
|
2106
|
+
history?: ReportEditHistoryOptions;
|
|
2076
2107
|
/** Return an error message or throw to reject the edit. */
|
|
2077
2108
|
validate?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | string | Promise<void | string>;
|
|
2078
2109
|
/** Same declarative rules can be run in Node via validateReportDataset. Requires a source-backed session. */
|
package/dist/vue/index.d.cts
CHANGED
|
@@ -1847,6 +1847,20 @@ export declare interface MachReportMessages extends Partial<ReportCalculationMes
|
|
|
1847
1847
|
importing?: string;
|
|
1848
1848
|
editCell?: string;
|
|
1849
1849
|
editingHint?: string;
|
|
1850
|
+
editCellEditable?: string;
|
|
1851
|
+
editCellReadOnly?: string;
|
|
1852
|
+
editCellFormula?: string;
|
|
1853
|
+
editCellProtected?: string;
|
|
1854
|
+
editCellComplex?: string;
|
|
1855
|
+
editCellStructure?: string;
|
|
1856
|
+
editCellDerived?: string;
|
|
1857
|
+
editCellPermission?: string;
|
|
1858
|
+
editCellBusy?: string;
|
|
1859
|
+
editHistoryLimited?: string;
|
|
1860
|
+
changesSearch?: string;
|
|
1861
|
+
changesAllDatasets?: string;
|
|
1862
|
+
changesNoMatches?: string;
|
|
1863
|
+
changesRange?: string;
|
|
1850
1864
|
saving?: string;
|
|
1851
1865
|
editInvalidNumber?: string;
|
|
1852
1866
|
editInvalidBoolean?: string;
|
|
@@ -2010,6 +2024,8 @@ export declare interface MachReportStateError {
|
|
|
2010
2024
|
}
|
|
2011
2025
|
/** 主题变量(组件外壳注入的 --mrp-* CSS 自定义属性) */
|
|
2012
2026
|
export declare interface MachReportTheme {
|
|
2027
|
+
/** Native controls follow the host's declared light/dark palette. */
|
|
2028
|
+
colorScheme?: "light" | "dark";
|
|
2013
2029
|
/** 空态插图强调色,不随正文颜色变灰。 */
|
|
2014
2030
|
emptyAccent?: string;
|
|
2015
2031
|
shellBg: string;
|
|
@@ -2022,6 +2038,11 @@ export declare interface MachReportTheme {
|
|
|
2022
2038
|
btnHoverBg: string;
|
|
2023
2039
|
btnHoverFg: string;
|
|
2024
2040
|
btnActiveBg: string;
|
|
2041
|
+
/** Foreground on solid primary actions. Optional for existing complete themes. */
|
|
2042
|
+
btnActiveFg?: string;
|
|
2043
|
+
errorFg?: string;
|
|
2044
|
+
warningFg?: string;
|
|
2045
|
+
successFg?: string;
|
|
2025
2046
|
}
|
|
2026
2047
|
export declare interface MachReportToolbarOptions {
|
|
2027
2048
|
/** Reasons explain host restrictions without granting capabilities. */
|
|
@@ -2486,7 +2507,7 @@ export declare function printPlans(plans: RenderPlan_2[], options?: {
|
|
|
2486
2507
|
* 同名 preset 与 messages/theme 均按字段继承;组件 props 仍拥有最高优先级。
|
|
2487
2508
|
*/
|
|
2488
2509
|
export declare function provideMachReportConfig(overlay: MachReportConfigInput | MachReportDefaults): void;
|
|
2489
|
-
export declare interface ProviderEditingOptions extends Pick<ReportEditingOptions, "canEdit" | "validate" | "requireSource"> {
|
|
2510
|
+
export declare interface ProviderEditingOptions extends Pick<ReportEditingOptions, "canEdit" | "readOnlyReason" | "history" | "fields" | "validate" | "validation" | "validateBatch" | "requireSource"> {
|
|
2490
2511
|
reportId: Current<string>;
|
|
2491
2512
|
params?: Current<Record<string, string>>;
|
|
2492
2513
|
/** Getters are useful when query metadata is held by the host. Otherwise stable cell sources are used. */
|
|
@@ -3052,11 +3073,21 @@ declare interface ReportEditConflict {
|
|
|
3052
3073
|
currentValue?: ReportCellValue;
|
|
3053
3074
|
revision?: string | number;
|
|
3054
3075
|
}
|
|
3076
|
+
export declare interface ReportEditHistoryOptions {
|
|
3077
|
+
/** Retained undo/redo transactions. Default 100. Zero disables undo retention. */
|
|
3078
|
+
maxSteps?: number;
|
|
3079
|
+
/** Conservative retained transaction size in bytes. Default 8 MiB. */
|
|
3080
|
+
maxBytes?: number;
|
|
3081
|
+
}
|
|
3055
3082
|
/** Opt in with true for local drafts, or provide host validation and persistence. */
|
|
3056
3083
|
export declare interface ReportEditingOptions {
|
|
3057
3084
|
/** Optional field controls, keyed by source.field / table.columnKey; a resolver supports dataset-specific rules. */
|
|
3058
3085
|
fields?: Readonly<Record<string, ReportCellFieldOptions>> | ((context: ReportCellContext) => ReportCellFieldOptions | undefined);
|
|
3059
3086
|
canEdit?(context: ReportCellContext): boolean;
|
|
3087
|
+
/** Optional explanation when canEdit rejects a cell. Does not grant editing access. */
|
|
3088
|
+
readOnlyReason?(context: ReportCellContext): string | undefined;
|
|
3089
|
+
/** Bounds undo/redo retention. Net differences and getChanges remain complete. */
|
|
3090
|
+
history?: ReportEditHistoryOptions;
|
|
3060
3091
|
/** Return an error message or throw to reject the edit. */
|
|
3061
3092
|
validate?(edit: Readonly<ReportCellEdit>, operation: ReportEditOperation): void | string | Promise<void | string>;
|
|
3062
3093
|
/** Same declarative rules can be run in Node via validateReportDataset. Requires a source-backed session. */
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -1847,6 +1847,20 @@ export declare interface MachReportMessages extends Partial<ReportCalculationMes
|
|
|
1847
1847
|
importing?: string;
|
|
1848
1848
|
editCell?: string;
|
|
1849
1849
|
editingHint?: string;
|
|
1850
|
+
editCellEditable?: string;
|
|
1851
|
+
editCellReadOnly?: string;
|
|
1852
|
+
editCellFormula?: string;
|
|
1853
|
+
editCellProtected?: string;
|
|
1854
|
+
editCellComplex?: string;
|
|
1855
|
+
editCellStructure?: string;
|
|
1856
|
+
editCellDerived?: string;
|
|
1857
|
+
editCellPermission?: string;
|
|
1858
|
+
editCellBusy?: string;
|
|
1859
|
+
editHistoryLimited?: string;
|
|
1860
|
+
changesSearch?: string;
|
|
1861
|
+
changesAllDatasets?: string;
|
|
1862
|
+
changesNoMatches?: string;
|
|
1863
|
+
changesRange?: string;
|
|
1850
1864
|
saving?: string;
|
|
1851
1865
|
editInvalidNumber?: string;
|
|
1852
1866
|
editInvalidBoolean?: string;
|
|
@@ -2010,6 +2024,8 @@ export declare interface MachReportStateError {
|
|
|
2010
2024
|
}
|
|
2011
2025
|
/** 主题变量(组件外壳注入的 --mrp-* CSS 自定义属性) */
|
|
2012
2026
|
export declare interface MachReportTheme {
|
|
2027
|
+
/** Native controls follow the host's declared light/dark palette. */
|
|
2028
|
+
colorScheme?: "light" | "dark";
|
|
2013
2029
|
/** 空态插图强调色,不随正文颜色变灰。 */
|
|
2014
2030
|
emptyAccent?: string;
|
|
2015
2031
|
shellBg: string;
|
|
@@ -2022,6 +2038,11 @@ export declare interface MachReportTheme {
|
|
|
2022
2038
|
btnHoverBg: string;
|
|
2023
2039
|
btnHoverFg: string;
|
|
2024
2040
|
btnActiveBg: string;
|
|
2041
|
+
/** Foreground on solid primary actions. Optional for existing complete themes. */
|
|
2042
|
+
btnActiveFg?: string;
|
|
2043
|
+
errorFg?: string;
|
|
2044
|
+
warningFg?: string;
|
|
2045
|
+
successFg?: string;
|
|
2025
2046
|
}
|
|
2026
2047
|
export declare interface MachReportToolbarOptions {
|
|
2027
2048
|
/** Reasons explain host restrictions without granting capabilities. */
|
|
@@ -2486,7 +2507,7 @@ export declare function printPlans(plans: RenderPlan_2[], options?: {
|
|
|
2486
2507
|
* 同名 preset 与 messages/theme 均按字段继承;组件 props 仍拥有最高优先级。
|
|
2487
2508
|
*/
|
|
2488
2509
|
export declare function provideMachReportConfig(overlay: MachReportConfigInput | MachReportDefaults): void;
|
|
2489
|
-
export declare interface ProviderEditingOptions extends Pick<ReportEditingOptions, "canEdit" | "validate" | "requireSource"> {
|
|
2510
|
+
export declare interface ProviderEditingOptions extends Pick<ReportEditingOptions, "canEdit" | "readOnlyReason" | "history" | "fields" | "validate" | "validation" | "validateBatch" | "requireSource"> {
|
|
2490
2511
|
reportId: Current<string>;
|
|
2491
2512
|
params?: Current<Record<string, string>>;
|
|
2492
2513
|
/** Getters are useful when query metadata is held by the host. Otherwise stable cell sources are used. */
|
|
@@ -3052,11 +3073,21 @@ declare interface ReportEditConflict {
|
|
|
3052
3073
|
currentValue?: ReportCellValue;
|
|
3053
3074
|
revision?: string | number;
|
|
3054
3075
|
}
|
|
3076
|
+
export declare interface ReportEditHistoryOptions {
|
|
3077
|
+
/** Retained undo/redo transactions. Default 100. Zero disables undo retention. */
|
|
3078
|
+
maxSteps?: number;
|
|
3079
|
+
/** Conservative retained transaction size in bytes. Default 8 MiB. */
|
|
3080
|
+
maxBytes?: number;
|
|
3081
|
+
}
|
|
3055
3082
|
/** Opt in with true for local drafts, or provide host validation and persistence. */
|
|
3056
3083
|
export declare interface ReportEditingOptions {
|
|
3057
3084
|
/** Optional field controls, keyed by source.field / table.columnKey; a resolver supports dataset-specific rules. */
|
|
3058
3085
|
fields?: Readonly<Record<string, ReportCellFieldOptions>> | ((context: ReportCellContext) => ReportCellFieldOptions | undefined);
|
|
3059
3086
|
canEdit?(context: ReportCellContext): boolean;
|
|
3087
|
+
/** Optional explanation when canEdit rejects a cell. Does not grant editing access. */
|
|
3088
|
+
readOnlyReason?(context: ReportCellContext): string | undefined;
|
|
3089
|
+
/** Bounds undo/redo retention. Net differences and getChanges remain complete. */
|
|
3090
|
+
history?: ReportEditHistoryOptions;
|
|
3060
3091
|
/** Return an error message or throw to reject the edit. */
|
|
3061
3092
|
validate?(edit: Readonly<ReportCellEdit>, operation: ReportEditOperation): void | string | Promise<void | string>;
|
|
3062
3093
|
/** Same declarative rules can be run in Node via validateReportDataset. Requires a source-backed session. */
|
package/dist/vue-async.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-BWTp-X7b.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-BoGBGyRr.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-
|
|
2
|
-
import { M as l } from "./plugin-
|
|
1
|
+
import { m as o } from "./plugin-_BkUVc2z.js";
|
|
2
|
+
import { M as l } from "./plugin-_BkUVc2z.js";
|
|
3
3
|
function a() {
|
|
4
|
-
return import("./ReportPreview-
|
|
4
|
+
return import("./ReportPreview-QLONCyci.js").then((t) => t.x);
|
|
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 E=require("@agile-team/mach-report"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@agile-team/mach-report"),o=require("./ReportPreview-BoGBGyRr.cjs"),i=require("./ReportParamPanel-C7fZTllk.cjs"),f=require("./injection-keys-Db_DyLkm.cjs"),A=require("./plugin-BWTp-X7b.cjs"),h=require("vue"),v=require("./json-snapshot-DNiIbpOr.cjs"),w=require("./progress-WomPRP3B.cjs");function C(r){const e=E.createReportSource(r),a=async t=>{if(t.reportIds.length===0)throw new o.PlanLoadError("缺少报表 ID");for(const n of t.reportIds)if(!Object.prototype.hasOwnProperty.call(r,n)||!r[n])throw new o.PlanLoadError(`本地模板 ${n} 不存在`);return e(t)};return a.getParamDefs=e.getParamDefs,a}const I=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 D(){const r=h.shallowRef(null),e=()=>r.value?.state??I,a=Object.freeze({get loading(){return e().loading},get stale(){return e().stale??!1},get hasPlan(){return e().hasPlan},get pageCount(){return e().pageCount},get currentPage(){return e().currentPage},get exporting(){return e().exporting},get printing(){return e().printing},get canExport(){return e().canExport},get canPrint(){return e().canPrint},get error(){return e().error},get pdfFont(){return e().pdfFont},get editing(){return e().editing??!1},get saving(){return e().saving??!1},get importing(){return e().importing??!1},get dirty(){return e().dirty??!1},get pendingLocalChanges(){return e().pendingLocalChanges??!1},get task(){return e().task??null},get diagnostics(){return e().diagnostics??[]},get reportIds(){return e().reportIds??[]},get params(){return e().params??{}},get canUndo(){return e().canUndo??!1},get canRedo(){return e().canRedo??!1},get changeCount(){return e().changeCount??0},get selection(){return e().selection??null}});function t(){if(!r.value)throw new i.MachReportError("config","报表预览尚未挂载,请在 ready 后调用控制器");return r.value}return{ref(n){const s=n;r.value=s&&typeof s.reload=="function"&&typeof s.print=="function"&&typeof s.exportAs=="function"&&typeof s.openPdfWindow=="function"&&typeof s.gotoPage=="function"&&typeof s.setParams=="function"?s:null},ready:h.computed(()=>r.value!==null),state:a,async checkPdfFont(){const n=t();return n.checkPdfFont?n.checkPdfFont():{status:"unverified",fontUrl:"",message:"旧自定义控制器未提供字体检查,请由宿主确认字体配置"}},cancelTask(){t().cancelTask?.()},async confirmDiscard(n){return await t().confirmDiscard?.(n)??!0},getOutputDiagnostics(n){return t().getOutputDiagnostics?.(n)??[]},async reload(){await t().reload()},async print(){await t().print()},async exportAs(n){await t().exportAs(n)},openPdfWindow(){t().openPdfWindow()},gotoPage(n){t().gotoPage(n)},async setParams(n,s){await t().setParams(n,s)},async importExcel(n,s){const g=t();if(!g.importExcel)throw new i.MachReportError("config","旧自定义控制器未提供 Excel 导入");return g.importExcel(n,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(n,s)=>await t().focusCell?.(n,s)??!1,focusField:async n=>await t().focusField?.(n)??!1,copySelection:()=>t().copySelection?.()??"",pasteSelection:async n=>await t().pasteSelection?.(n)??!1}}function L(){return h.inject(f.MACH_REPORT_CONTROLLER_KEY,null)}function T(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}function x(r){return Array.isArray(r)&&r.every(e=>T(e)&&typeof e.code=="string"&&typeof e.message=="string"&&["info","warning","error"].includes(e.severity)&&(e.path===void 0||typeof e.path=="string")&&v.hasValidDataExplanation(e))}function F(r,e){return Array.isArray(r)&&r.every(a=>T(a)&&Number.isSafeInteger(a.editIndex)&&a.editIndex>=0&&a.editIndex<e&&typeof a.code=="string"&&typeof a.message=="string")}function b(r,e){let a;if(!T(r)||typeof r.revision!="string"||!r.revision.trim()?a="非空 revision(请先在适配器解包业务响应)":r.sourceToken!==void 0&&typeof r.sourceToken!="string"?a="字符串 sourceToken":r.diagnostics!==void 0&&!x(r.diagnostics)?a="结构化 diagnostics":r.conflicts!==void 0&&!F(r.conflicts,e)&&(a="有效 editIndex/code/message conflicts"),a)throw new i.MachReportError("edit",`ReportProvider.save 必须返回${a};服务器可能已提交,请重新查询确认后再编辑`)}function m(r){return typeof r=="function"?r():r}function q(r,e){const a=new Set(r.flatMap(t=>t.source?.[e]===void 0?[]:[String(t.source[e])]));return a.size===1?[...a][0]:void 0}function O(r,e,a,t){return typeof r=="function"?r():q(e,a)??t??r}function k(r){return r.requestId??globalThis.crypto?.randomUUID?.()??`mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function U(r,e){if(!r.save)throw new i.MachReportError("config","ReportProvider.save 未配置,无法启用业务保存");let a="",t,n,s=0;function g(c,l,p){c.conflicts?.length||l!==a||p!==s||(t=c.revision,n=c.sourceToken)}async function S(c,l){if(l.signal.aborted)throw l.signal.reason??new DOMException("Aborted","AbortError");const p=m(e.reportId),_={...m(e.params??{})},R=JSON.stringify([p,_]),M=++s;if(R!==a&&(a=R,t=void 0,n=void 0),e.requireSource!==!1&&c.edits.some(u=>!u.source))throw new E.ReportCellEditError("missing");const d=await r.save({reportId:p,params:_,signal:l.signal,requestId:c.requestId,action:l.action,edits:o.cloneReportSnapshot(c.edits),expectedRevision:O(e.expectedRevision,c.edits,"revision",t),sourceToken:O(e.sourceToken,c.edits,"sourceToken",n)});if(l.signal.aborted)throw l.signal.reason??new DOMException("Aborted","AbortError");b(d,c.edits.length),d.diagnostics?.forEach(u=>w.observeOutput(()=>e.onDiagnostic?.(u)));const P=d.diagnostics?.filter(u=>u.severity==="error");if(P?.length)throw new i.MachReportError("edit",P.map(u=>u.message).join(";"),{diagnostics:P});const y=d.conflicts?.map(u=>({source:c.edits[u.editIndex]?.source,address:c.edits[u.editIndex]?.address,message:u.message}));return g(d,R,M),{revision:d.revision,sourceToken:d.sourceToken,conflicts:y}}return{requireSource:e.requireSource??!0,canEdit:e.canEdit,readOnlyReason:e.readOnlyReason,history:e.history,fields:e.fields,validate:e.validate,validation:e.validation,validateBatch:e.validateBatch,saveBatch:S,save:(c,l)=>S({requestId:k(l),edits:[o.cloneReportSnapshot(c)]},l)}}exports.PlanLoadError=o.PlanLoadError;exports.REPORT_EXPORT_FORMATS=o.REPORT_EXPORT_FORMATS;exports.REPORT_PREVIEW_TOOLS=o.REPORT_PREVIEW_TOOLS;exports.ReportDataComparisonPanel=o._sfc_main;exports.ReportExportMenu=o.ReportExportMenu;exports.ReportPagination=o.ReportPagination;exports.ReportPrefillPanel=o._sfc_main$1;exports.ReportPreview=o.ReportPreview;exports.ReportPrintResourceError=o.ReportPrintResourceError;exports.ReportTaskStatus=o.ReportTaskStatus;exports.ReportToolbar=o.ReportToolbar;exports.ReportValidationPanel=o.ReportValidationPanel;exports.buildPrintDocument=o.buildPrintDocument;exports.buildWordHtml=o.buildWordHtml;exports.createDefaultPdfExporter=o.createDefaultPdfExporter;exports.createFetchRequest=o.createFetchRequest;exports.createPrintCalibrationPlan=o.createPrintCalibrationPlan;exports.createReportStoragePreferences=o.createReportStoragePreferences;exports.joinReportIds=o.joinReportIds;exports.normalizeReportIds=o.normalizeReportIds;exports.preparePrintResources=o.preparePrintResources;exports.printPlans=o.printPlans;exports.usePageWindow=o.usePageWindow;exports.usePrintExport=o.usePrintExport;exports.useZoom=o.useZoom;exports.DEFAULT_CALCULATION_MESSAGES=i.DEFAULT_CALCULATION_MESSAGES;exports.DEFAULT_DATA_REVIEW_MESSAGES=i.DEFAULT_DATA_REVIEW_MESSAGES;exports.DEFAULT_MESSAGES=i.DEFAULT_MESSAGES;exports.DEFAULT_PRINT_MESSAGES=i.DEFAULT_PRINT_MESSAGES;exports.DEFAULT_THEME=i.DEFAULT_THEME;exports.MachReportError=i.MachReportError;exports.PARAM_OPTIONS_MESSAGES=i.PARAM_OPTIONS_MESSAGES;exports.ReportParamPanel=i.ReportParamPanel;exports.SILENT_LOGGER=i.SILENT_LOGGER;exports.defineMachReportConfig=i.defineMachReportConfig;exports.defineMachReportPreset=i.defineMachReportPreset;exports.normalizeReportLoadError=i.normalizeReportLoadError;exports.printCalibration=i.printCalibration;exports.provideMachReportConfig=i.provideMachReportConfig;exports.resolveCalculationMessages=i.resolveCalculationMessages;exports.resolveConfig=i.resolveConfig;exports.resolveDataReviewMessages=i.resolveDataReviewMessages;exports.snapshotPrintOptions=i.snapshotPrintOptions;exports.themeToCssVars=i.themeToCssVars;exports.toErrorDetail=i.toErrorDetail;exports.useMachReportConfig=i.useMachReportConfig;exports.MACH_REPORT_CONFIG_KEY=f.MACH_REPORT_CONFIG_KEY;exports.MACH_REPORT_CONTROLLER_KEY=f.MACH_REPORT_CONTROLLER_KEY;exports.MACH_REPORT_FETCHER_KEY=f.MACH_REPORT_FETCHER_KEY;exports.MACH_REPORT_PDF_EXPORTER_KEY=f.MACH_REPORT_PDF_EXPORTER_KEY;exports.MachReportPreview=A.MachReportPreview;exports.machReportPlugin=A.machReportPlugin;exports.createLocalFetcher=C;exports.createProviderEditing=U;exports.useMachReport=D;exports.useReportPreview=L;Object.keys(E).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(exports,r)&&Object.defineProperty(exports,r,{enumerable:!0,get:()=>E[r]})});
|