@agile-team/mach-report 1.2.1 → 2.0.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 +86 -255
- package/dist/ReportPreview-Cr0IH1Rz.cjs +6 -0
- package/dist/ReportPreview-DwknBgsJ.js +1266 -0
- package/dist/defaults.d.ts +3 -7
- package/dist/format.d.ts +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +621 -758
- package/dist/layout/textwrap.d.ts +1 -1
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.js +1 -1
- package/dist/plugin-Cj3c2wJc.cjs +1 -0
- package/dist/plugin-DJf_6_fl.js +18 -0
- package/dist/schema/render-plan.d.ts +1 -9
- package/dist/sql/expr.d.ts +3 -3
- package/dist/sql.d.cts +1 -1
- package/dist/sql.d.ts +1 -1
- package/dist/style-CFZ-HE2s.cjs +3 -0
- package/dist/{style-6ihHKVCM.js → style-DnmtG7Gl.js} +69 -81
- package/dist/style.css +1 -1
- package/dist/vue/ReportPreview.d.ts +3 -12
- package/dist/vue/adapters.d.ts +6 -12
- package/dist/vue/async.d.cts +7 -22
- package/dist/vue/async.d.ts +7 -22
- package/dist/vue/local-adapter.d.ts +1 -2
- package/dist/vue/plugin.d.ts +12 -34
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +6 -6
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +48 -48
- package/package.json +2 -12
- package/dist/ReportPreview-CJLvkTVn.cjs +0 -6
- package/dist/ReportPreview-mZiGtf0L.js +0 -1231
- package/dist/compat/jh4j-template.d.ts +0 -12
- package/dist/manager/api.d.ts +0 -45
- package/dist/manager/index.d.ts +0 -2
- package/dist/manager/types.d.ts +0 -50
- package/dist/manager.cjs +0 -1
- package/dist/manager.d.cts +0 -5
- package/dist/manager.d.ts +0 -5
- package/dist/manager.js +0 -104
- package/dist/plugin-C4qpbdMJ.cjs +0 -1
- package/dist/plugin-DcmAPK_K.js +0 -85
- package/dist/style-Xq08-IsV.cjs +0 -3
|
@@ -1,81 +1,72 @@
|
|
|
1
|
-
const C = 1.35, w = 10.5,
|
|
1
|
+
const C = 1.35, w = 10.5, g = 0.75, l = "#333333", S = "#000000", P = "1.0.0-mach", A = 25.4, I = 96;
|
|
2
2
|
function m(t = 96) {
|
|
3
3
|
return t / 25.4;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function L(t, e = 96) {
|
|
6
6
|
return (t || 0) * m(e);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function R(t, e = 96) {
|
|
9
9
|
return t / m(e);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function _(t, e = 96) {
|
|
12
12
|
return t * e / 72;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function D(t, e) {
|
|
15
15
|
const r = 10 ** e;
|
|
16
16
|
return Math.round(t * r) / r;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const b = {
|
|
19
19
|
a3: { widthMm: 297, heightMm: 420 },
|
|
20
20
|
a4: { widthMm: 210, heightMm: 297 },
|
|
21
21
|
a5: { widthMm: 148, heightMm: 210 },
|
|
22
22
|
b4: { widthMm: 250, heightMm: 353 },
|
|
23
23
|
b5: { widthMm: 176, heightMm: 250 }
|
|
24
|
-
},
|
|
25
|
-
function
|
|
26
|
-
if (t && t.code != null && t.code !== 200)
|
|
27
|
-
throw new Error(String(t.message || "渲染计划加载失败"));
|
|
28
|
-
const e = t?.data?.pages;
|
|
29
|
-
return {
|
|
30
|
-
schemaVersion: E,
|
|
31
|
-
pages: Array.isArray(e) ? e : []
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function z(t) {
|
|
24
|
+
}, k = P;
|
|
25
|
+
function H(t) {
|
|
35
26
|
return (t.kind === "image" || t.kind === "barcode" || t.kind === "qrcode" || t.kind === "chart") && !!t.imageData;
|
|
36
27
|
}
|
|
37
|
-
function
|
|
28
|
+
function z(t) {
|
|
38
29
|
return t.kind === "text" && Array.isArray(t.richParagraphs) && t.richParagraphs.length > 0;
|
|
39
30
|
}
|
|
40
|
-
const
|
|
31
|
+
const M = /[\u3000-\u9fff\uff00-\uffef]/, u = new Uint8Array(128);
|
|
41
32
|
{
|
|
42
|
-
for (const t of "iljtf.,:;'`|!()[]")
|
|
43
|
-
for (const t of "mwMW@")
|
|
44
|
-
for (let t = 48; t <= 57; t++)
|
|
45
|
-
for (let t = 65; t <= 90; t++)
|
|
46
|
-
|
|
33
|
+
for (const t of "iljtf.,:;'`|!()[]") u[t.charCodeAt(0)] = 1;
|
|
34
|
+
for (const t of "mwMW@") u[t.charCodeAt(0)] = 2;
|
|
35
|
+
for (let t = 48; t <= 57; t++) u[t] = 3;
|
|
36
|
+
for (let t = 65; t <= 90; t++) u[t] = 4;
|
|
37
|
+
u[32] = 5;
|
|
47
38
|
}
|
|
48
39
|
const T = [0.54, 0.26, 0.95, 0.59, 0.67, 0.3];
|
|
49
|
-
function
|
|
40
|
+
function E(t) {
|
|
50
41
|
const e = t.charCodeAt(0);
|
|
51
|
-
return e < 128 ? T[
|
|
42
|
+
return e < 128 ? T[u[e]] : M.test(t) ? 1 : /[A-Z]/.test(t) ? 0.67 : 0.54;
|
|
52
43
|
}
|
|
53
|
-
const
|
|
44
|
+
const a = {
|
|
54
45
|
measureMm(t, e) {
|
|
55
46
|
const { fontSizePt: r, bold: n = !1, letterSpacingPt: c = 0 } = e, s = 25.4 / 72;
|
|
56
47
|
let i = 0;
|
|
57
48
|
for (const o of t)
|
|
58
|
-
i +=
|
|
49
|
+
i += E(o);
|
|
59
50
|
return n && (i *= 1.04), (i * r + c * t.length) * s;
|
|
60
51
|
}
|
|
61
52
|
};
|
|
62
|
-
function
|
|
63
|
-
return
|
|
53
|
+
function N() {
|
|
54
|
+
return a;
|
|
64
55
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
56
|
+
function p(t, e) {
|
|
57
|
+
return a.measureMm(t, e);
|
|
67
58
|
}
|
|
68
|
-
function
|
|
59
|
+
function O(t) {
|
|
69
60
|
let e;
|
|
70
61
|
return {
|
|
71
62
|
measureMm(r, n) {
|
|
72
|
-
if (e === void 0 && (e = t()), !e) return
|
|
63
|
+
if (e === void 0 && (e = t()), !e) return a.measureMm(r, n);
|
|
73
64
|
const c = n.fontSizePt * 96 / 72;
|
|
74
65
|
return e.font = `${n.bold ? "bold " : ""}${c}px sans-serif`, e.measureText(r).width * 25.4 / 96;
|
|
75
66
|
}
|
|
76
67
|
};
|
|
77
68
|
}
|
|
78
|
-
function
|
|
69
|
+
function x(t, e, r) {
|
|
79
70
|
const n = [];
|
|
80
71
|
let c = "", s = 0;
|
|
81
72
|
const i = () => {
|
|
@@ -92,7 +83,7 @@ function A(t, e, r) {
|
|
|
92
83
|
i(), n.push({ text: o, widthMm: r.measureMm(o, e), cjk: !1, space: !0 });
|
|
93
84
|
continue;
|
|
94
85
|
}
|
|
95
|
-
if (
|
|
86
|
+
if (M.test(o)) {
|
|
96
87
|
i(), n.push({ text: o, widthMm: r.measureMm(o, e), cjk: !0 });
|
|
97
88
|
continue;
|
|
98
89
|
}
|
|
@@ -100,93 +91,90 @@ function A(t, e, r) {
|
|
|
100
91
|
}
|
|
101
92
|
return i(), n;
|
|
102
93
|
}
|
|
103
|
-
function
|
|
94
|
+
function F(t, e, r, n = a) {
|
|
104
95
|
if (!t) return [""];
|
|
105
96
|
const c = [];
|
|
106
97
|
let s = "", i = 0;
|
|
107
98
|
const o = () => {
|
|
108
99
|
c.push(s), s = "", i = 0;
|
|
109
100
|
};
|
|
110
|
-
for (const
|
|
111
|
-
if (
|
|
101
|
+
for (const f of x(t, r, n)) {
|
|
102
|
+
if (f.br) {
|
|
112
103
|
o();
|
|
113
104
|
continue;
|
|
114
105
|
}
|
|
115
|
-
if (i +
|
|
116
|
-
s +=
|
|
106
|
+
if (i + f.widthMm <= e) {
|
|
107
|
+
s += f.text, i += f.widthMm;
|
|
117
108
|
continue;
|
|
118
109
|
}
|
|
119
|
-
if (
|
|
110
|
+
if (f.space) {
|
|
120
111
|
o();
|
|
121
112
|
continue;
|
|
122
113
|
}
|
|
123
|
-
if (
|
|
124
|
-
s.length > 0 && o(), s =
|
|
114
|
+
if (f.cjk) {
|
|
115
|
+
s.length > 0 && o(), s = f.text, i = f.widthMm;
|
|
125
116
|
continue;
|
|
126
117
|
}
|
|
127
|
-
if (s.length > 0 && o(),
|
|
128
|
-
s =
|
|
118
|
+
if (s.length > 0 && o(), f.widthMm <= e) {
|
|
119
|
+
s = f.text, i = f.widthMm;
|
|
129
120
|
continue;
|
|
130
121
|
}
|
|
131
|
-
for (const h of
|
|
122
|
+
for (const h of f.text) {
|
|
132
123
|
const d = n.measureMm(h, r);
|
|
133
124
|
i + d > e && s.length > 0 && o(), s += h, i += d;
|
|
134
125
|
}
|
|
135
126
|
}
|
|
136
127
|
return o(), c;
|
|
137
128
|
}
|
|
138
|
-
function
|
|
129
|
+
function j(t, e = 96, r = 10.5) {
|
|
139
130
|
if (t?.fontSizePx != null)
|
|
140
131
|
return { fontSizePt: t.fontSizePx * 72 / e, fontSizePx: t.fontSizePx };
|
|
141
132
|
const n = t?.fontSize ?? r;
|
|
142
|
-
return { fontSizePt: n, fontSizePx:
|
|
133
|
+
return { fontSizePt: n, fontSizePx: _(n, e) };
|
|
143
134
|
}
|
|
144
|
-
function
|
|
135
|
+
function v(t, e = l) {
|
|
145
136
|
return {
|
|
146
137
|
color: t?.borderColor ?? t?.lineColor ?? e,
|
|
147
138
|
widthPt: t?.lineWidthPt ?? 0.75
|
|
148
139
|
};
|
|
149
140
|
}
|
|
150
|
-
function
|
|
141
|
+
function U(t, e = S) {
|
|
151
142
|
return t?.color ?? e;
|
|
152
143
|
}
|
|
153
|
-
function
|
|
144
|
+
function B(t) {
|
|
154
145
|
return t?.lineHeight ?? 1.35;
|
|
155
146
|
}
|
|
156
|
-
function
|
|
147
|
+
function W(t) {
|
|
157
148
|
const e = t?.borderTop !== !1, r = t?.borderRight !== !1, n = t?.borderBottom !== !1, c = t?.borderLeft !== !1;
|
|
158
149
|
return { top: e, right: r, bottom: n, left: c, inner: e || r || n || c };
|
|
159
150
|
}
|
|
160
151
|
export {
|
|
161
|
-
|
|
152
|
+
I as C,
|
|
162
153
|
w as D,
|
|
163
154
|
C as L,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
155
|
+
A as M,
|
|
156
|
+
b as P,
|
|
157
|
+
k as R,
|
|
158
|
+
P as S,
|
|
159
|
+
j as a,
|
|
160
|
+
z as b,
|
|
161
|
+
v as c,
|
|
162
|
+
W as d,
|
|
163
|
+
B as e,
|
|
164
|
+
U as f,
|
|
174
165
|
S as g,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
H as v,
|
|
190
|
-
U as w,
|
|
191
|
-
O as x
|
|
166
|
+
a as h,
|
|
167
|
+
H as i,
|
|
168
|
+
g as j,
|
|
169
|
+
l as k,
|
|
170
|
+
E as l,
|
|
171
|
+
L as m,
|
|
172
|
+
O as n,
|
|
173
|
+
N as o,
|
|
174
|
+
_ as p,
|
|
175
|
+
p as q,
|
|
176
|
+
D as r,
|
|
177
|
+
m as s,
|
|
178
|
+
R as t,
|
|
179
|
+
F as w
|
|
192
180
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.mrp-toolbar[data-v-48cc0980]{display:flex;align-items:center;gap:8px;padding:6px 12px;background:var(--mrp-toolbar-bg, #323639);border-bottom:1px solid var(--mrp-toolbar-border, #22252a);flex:none;flex-wrap:wrap}.mrp-title[data-v-48cc0980]{font-size:13px;font-weight:600;margin-right:8px;color:var(--mrp-toolbar-fg, #e8e8e8)}.mrp-nav[data-v-48cc0980]{background:transparent;color:var(--mrp-btn-fg, #cfcfcf);border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:2px 8px;font-size:12px;cursor:pointer;white-space:nowrap}.mrp-nav[data-v-48cc0980]:hover:not(:disabled){background:var(--mrp-btn-hover-bg, #414549);color:var(--mrp-btn-hover-fg, #fff)}.mrp-nav[data-v-48cc0980]:disabled{opacity:.4;cursor:not-allowed}.mrp-active[data-v-48cc0980]{background:var(--mrp-btn-active-bg, #2d5fb8);border-color:var(--mrp-btn-active-bg, #2d5fb8);color:#fff}.mrp-pageinfo[data-v-48cc0980]{font-size:12px;min-width:56px;text-align:center;color:var(--mrp-toolbar-fg, #e8e8e8)}.mrp-spacer[data-v-48cc0980]{flex:1}.mrp-search[data-v-48cc0980]{display:flex;align-items:center;gap:4px}.mrp-search-input[data-v-48cc0980]{background:#22252a;color:#e8e8e8;border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:2px 8px;font-size:12px;width:150px;outline:none}.mrp-search-input[data-v-48cc0980]:focus{border-color:var(--mrp-btn-active-bg, #2d5fb8)}.mrp-search-count[data-v-48cc0980]{font-size:12px;color:var(--mrp-toolbar-fg, #e8e8e8);min-width:42px;text-align:center}.mrp-params[data-v-aafce92d]{display:flex;align-items:flex-end;gap:12px;padding:6px 12px;background:var(--mrp-toolbar-bg, #323639);border-bottom:1px solid var(--mrp-toolbar-border, #22252a);flex:none;flex-wrap:wrap}.mrp-params-title[data-v-aafce92d]{font-size:12px;font-weight:600;color:var(--mrp-toolbar-fg, #e8e8e8);padding-bottom:5px;white-space:nowrap}.mrp-params-grid[data-v-aafce92d]{display:flex;flex-wrap:wrap;gap:8px 12px;flex:1}.mrp-param[data-v-aafce92d]{display:flex;flex-direction:column;gap:2px}.mrp-param-label[data-v-aafce92d]{font-size:11px;color:var(--mrp-toolbar-fg, #e8e8e8);opacity:.85}.mrp-param-star[data-v-aafce92d]{color:#ff7b72;font-style:normal;margin-left:2px}.mrp-param-input[data-v-aafce92d]{background:#22252a;color:#e8e8e8;border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:3px 8px;font-size:12px;min-width:130px;outline:none}.mrp-param-input[data-v-aafce92d]:focus{border-color:var(--mrp-btn-active-bg, #2d5fb8)}.mrp-param-missing .mrp-param-input[data-v-aafce92d]{border-color:#ff7b72}select.mrp-param-input option[data-v-aafce92d]{background:#22252a}.mrp-params-actions[data-v-aafce92d]{display:flex;gap:6px;padding-bottom:1px}.mrp-nav[data-v-aafce92d]{background:transparent;color:var(--mrp-btn-fg, #cfcfcf);border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:4px 14px;font-size:12px;cursor:pointer;white-space:nowrap}.mrp-nav[data-v-aafce92d]:hover{background:var(--mrp-btn-hover-bg, #414549);color:var(--mrp-btn-hover-fg, #fff)}.mrp-param-query[data-v-aafce92d]{background:var(--mrp-btn-active-bg, #2d5fb8);border-color:var(--mrp-btn-active-bg, #2d5fb8);color:#fff}.mach-report-preview[data-v-
|
|
1
|
+
.mrp-toolbar[data-v-48cc0980]{display:flex;align-items:center;gap:8px;padding:6px 12px;background:var(--mrp-toolbar-bg, #323639);border-bottom:1px solid var(--mrp-toolbar-border, #22252a);flex:none;flex-wrap:wrap}.mrp-title[data-v-48cc0980]{font-size:13px;font-weight:600;margin-right:8px;color:var(--mrp-toolbar-fg, #e8e8e8)}.mrp-nav[data-v-48cc0980]{background:transparent;color:var(--mrp-btn-fg, #cfcfcf);border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:2px 8px;font-size:12px;cursor:pointer;white-space:nowrap}.mrp-nav[data-v-48cc0980]:hover:not(:disabled){background:var(--mrp-btn-hover-bg, #414549);color:var(--mrp-btn-hover-fg, #fff)}.mrp-nav[data-v-48cc0980]:disabled{opacity:.4;cursor:not-allowed}.mrp-active[data-v-48cc0980]{background:var(--mrp-btn-active-bg, #2d5fb8);border-color:var(--mrp-btn-active-bg, #2d5fb8);color:#fff}.mrp-pageinfo[data-v-48cc0980]{font-size:12px;min-width:56px;text-align:center;color:var(--mrp-toolbar-fg, #e8e8e8)}.mrp-spacer[data-v-48cc0980]{flex:1}.mrp-search[data-v-48cc0980]{display:flex;align-items:center;gap:4px}.mrp-search-input[data-v-48cc0980]{background:#22252a;color:#e8e8e8;border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:2px 8px;font-size:12px;width:150px;outline:none}.mrp-search-input[data-v-48cc0980]:focus{border-color:var(--mrp-btn-active-bg, #2d5fb8)}.mrp-search-count[data-v-48cc0980]{font-size:12px;color:var(--mrp-toolbar-fg, #e8e8e8);min-width:42px;text-align:center}.mrp-params[data-v-aafce92d]{display:flex;align-items:flex-end;gap:12px;padding:6px 12px;background:var(--mrp-toolbar-bg, #323639);border-bottom:1px solid var(--mrp-toolbar-border, #22252a);flex:none;flex-wrap:wrap}.mrp-params-title[data-v-aafce92d]{font-size:12px;font-weight:600;color:var(--mrp-toolbar-fg, #e8e8e8);padding-bottom:5px;white-space:nowrap}.mrp-params-grid[data-v-aafce92d]{display:flex;flex-wrap:wrap;gap:8px 12px;flex:1}.mrp-param[data-v-aafce92d]{display:flex;flex-direction:column;gap:2px}.mrp-param-label[data-v-aafce92d]{font-size:11px;color:var(--mrp-toolbar-fg, #e8e8e8);opacity:.85}.mrp-param-star[data-v-aafce92d]{color:#ff7b72;font-style:normal;margin-left:2px}.mrp-param-input[data-v-aafce92d]{background:#22252a;color:#e8e8e8;border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:3px 8px;font-size:12px;min-width:130px;outline:none}.mrp-param-input[data-v-aafce92d]:focus{border-color:var(--mrp-btn-active-bg, #2d5fb8)}.mrp-param-missing .mrp-param-input[data-v-aafce92d]{border-color:#ff7b72}select.mrp-param-input option[data-v-aafce92d]{background:#22252a}.mrp-params-actions[data-v-aafce92d]{display:flex;gap:6px;padding-bottom:1px}.mrp-nav[data-v-aafce92d]{background:transparent;color:var(--mrp-btn-fg, #cfcfcf);border:1px solid var(--mrp-btn-border, #4a4d52);border-radius:4px;padding:4px 14px;font-size:12px;cursor:pointer;white-space:nowrap}.mrp-nav[data-v-aafce92d]:hover{background:var(--mrp-btn-hover-bg, #414549);color:var(--mrp-btn-hover-fg, #fff)}.mrp-param-query[data-v-aafce92d]{background:var(--mrp-btn-active-bg, #2d5fb8);border-color:var(--mrp-btn-active-bg, #2d5fb8);color:#fff}.mach-report-preview[data-v-249dbb78]{--mrp-shell-bg: #525659;--mrp-shell-fg: #e8e8e8;--mrp-toolbar-bg: #323639;--mrp-toolbar-border: #22252a;--mrp-toolbar-fg: #e8e8e8;--mrp-btn-fg: #cfcfcf;--mrp-btn-border: #4a4d52;--mrp-btn-hover-bg: #414549;--mrp-btn-hover-fg: #ffffff;--mrp-btn-active-bg: #2d5fb8;position:relative;display:flex;flex-direction:column;background:var(--mrp-shell-bg);color:var(--mrp-shell-fg);overflow:hidden}.mrp-main[data-v-249dbb78]{display:flex;flex:1;min-height:0}.mrp-body[data-v-249dbb78]{flex:1;overflow:auto;padding:24px;outline:none}.mrp-scale[data-v-249dbb78]{margin:0 auto}.mrp-scale-inner[data-v-249dbb78]{display:flex;flex-direction:column;align-items:center}.mrp-page-holder[data-v-249dbb78]{background:#fff;box-shadow:0 2px 8px #00000059;margin-bottom:var(--v0e7a3c30);flex:none}.mrp-state[data-v-249dbb78]{padding:40px;text-align:center;color:#bfbfbf;font-size:13px}.mrp-error[data-v-249dbb78]{color:#ff9d9d}.mrp-export-notice[data-v-249dbb78]{padding:7px 12px;font-size:12px;background:#fff0c2;color:#613c00}.mrp-export-error[data-v-249dbb78]{background:#ffe0df;color:#8e1f1f}.mrp-export-progress[data-v-249dbb78]{background:#e7f0ff;color:#1a4d86}.mrp-retry[data-v-249dbb78]{margin-left:12px;background:transparent;color:#8fb7ff;border:1px solid #5a7fbf;border-radius:4px;padding:1px 10px;cursor:pointer}.mrp-overlay[data-v-249dbb78]{position:absolute;inset:0;pointer-events:none}.mrp-page-holder[data-v-249dbb78] mark.mrp-hit{background:#ffe066;color:#7a5c00;border-radius:2px;padding:0 1px}.mrp-thumbs[data-v-249dbb78]{width:140px;flex:none;overflow-y:auto;border-left:1px solid var(--mrp-toolbar-border);background:var(--mrp-toolbar-bg);padding:8px;display:flex;flex-direction:column;gap:8px}.mrp-thumb[data-v-249dbb78]{cursor:pointer;text-align:center}.mrp-thumb-box[data-v-249dbb78]{width:116px;background:#fff;box-shadow:0 1px 4px #0006;overflow:hidden;border:2px solid transparent}.mrp-thumb-active .mrp-thumb-box[data-v-249dbb78]{border-color:var(--mrp-btn-active-bg)}.mrp-thumb-no[data-v-249dbb78]{font-size:11px;color:var(--mrp-toolbar-fg)}.mrp-debug[data-v-249dbb78]{position:absolute;right:8px;bottom:8px;background:#000000c7;color:#7ee787;font:11px/1.6 ui-monospace,monospace;padding:6px 10px;border-radius:6px;pointer-events:none;white-space:pre}
|
|
@@ -23,14 +23,10 @@ declare function __VLS_template(): {
|
|
|
23
23
|
};
|
|
24
24
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
25
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
26
|
-
|
|
26
|
+
reportId: {
|
|
27
27
|
type: PropType<string | string[] | null>;
|
|
28
28
|
default: null;
|
|
29
29
|
};
|
|
30
|
-
furnitureTempId: {
|
|
31
|
-
type: StringConstructor;
|
|
32
|
-
default: string;
|
|
33
|
-
};
|
|
34
30
|
params: {
|
|
35
31
|
type: PropType<Record<string, string>>;
|
|
36
32
|
default: () => {};
|
|
@@ -105,14 +101,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
105
101
|
loaded: (pageCount: number) => any;
|
|
106
102
|
warning: (message: string) => any;
|
|
107
103
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
108
|
-
|
|
104
|
+
reportId: {
|
|
109
105
|
type: PropType<string | string[] | null>;
|
|
110
106
|
default: null;
|
|
111
107
|
};
|
|
112
|
-
furnitureTempId: {
|
|
113
|
-
type: StringConstructor;
|
|
114
|
-
default: string;
|
|
115
|
-
};
|
|
116
108
|
params: {
|
|
117
109
|
type: PropType<Record<string, string>>;
|
|
118
110
|
default: () => {};
|
|
@@ -183,14 +175,13 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
183
175
|
height: string;
|
|
184
176
|
gapPx: number;
|
|
185
177
|
params: Record<string, string>;
|
|
186
|
-
furnitureTempId: string;
|
|
187
|
-
tempId: string | string[] | null;
|
|
188
178
|
debug: boolean;
|
|
189
179
|
showExport: boolean;
|
|
190
180
|
showPrint: boolean;
|
|
191
181
|
showPdfWindow: boolean;
|
|
192
182
|
showParams: boolean;
|
|
193
183
|
messages: Partial<MachReportMessages>;
|
|
184
|
+
reportId: string | string[] | null;
|
|
194
185
|
autoLoad: boolean;
|
|
195
186
|
preset: string;
|
|
196
187
|
paramDefs: ReportParamDef[] | undefined;
|
package/dist/vue/adapters.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { RenderPlan } from '@agile-team/mach-report';
|
|
2
|
-
export type
|
|
2
|
+
export type ReportIdInput = string | string[] | null | undefined;
|
|
3
3
|
export interface PlanFetcher {
|
|
4
4
|
(input: {
|
|
5
|
-
|
|
6
|
-
furnitureTempId?: string;
|
|
5
|
+
reportIds: string[];
|
|
7
6
|
params: Record<string, string>;
|
|
8
7
|
}): Promise<RenderPlan>;
|
|
9
8
|
}
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
9
|
+
export declare function normalizeReportIds(reportId: ReportIdInput): string[];
|
|
10
|
+
export declare function joinReportIds(reportId: ReportIdInput): string;
|
|
12
11
|
export declare class PlanLoadError extends Error {
|
|
13
12
|
constructor(message: string);
|
|
14
13
|
}
|
|
15
|
-
/**
|
|
14
|
+
/** 通用请求函数签名(可适配 Axios 风格客户端) */
|
|
16
15
|
export type HostRequest = (config: {
|
|
17
16
|
url: string;
|
|
18
17
|
method: string;
|
|
@@ -29,12 +28,7 @@ export interface FetchRequestOptions {
|
|
|
29
28
|
}
|
|
30
29
|
/**
|
|
31
30
|
* 零依赖请求适配器:用全局 fetch 实现 HostRequest 签名,
|
|
32
|
-
*
|
|
31
|
+
* 供自定义 PlanFetcher 按需调用,不预设任何报表接口路径或响应包装。
|
|
33
32
|
* 内置超时(AbortController)与网络/HTTP 错误语义。
|
|
34
33
|
*/
|
|
35
34
|
export declare function createFetchRequest(options?: FetchRequestOptions): HostRequest;
|
|
36
|
-
export declare function createJh4jGridPlanFetcher(options: {
|
|
37
|
-
request: HostRequest;
|
|
38
|
-
/** 网关前缀,默认空(同域) */
|
|
39
|
-
baseUrl?: string;
|
|
40
|
-
}): PlanFetcher;
|
package/dist/vue/async.d.cts
CHANGED
|
@@ -9,20 +9,16 @@ import { MachReportPluginOptions } from './plugin';
|
|
|
9
9
|
* import AsyncMachReportPlugin, { preloadMachReport } from "@agile-team/mach-report/vue/async";
|
|
10
10
|
* app.use(AsyncMachReportPlugin, { baseUrl: "/sub/mach-report" });
|
|
11
11
|
* void preloadMachReport(); // 可选:路由 hover 时预取
|
|
12
|
-
* // 模板:<MachReportPreview
|
|
12
|
+
* // 模板:<MachReportPreview report-id="X" />
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
/** 全局异步组件(懒加载 ReportPreview 及其引擎分片;与主插件同源共享) */
|
|
16
16
|
export declare const MachReportPreview: {
|
|
17
17
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
-
|
|
18
|
+
reportId: {
|
|
19
19
|
type: import('vue').PropType<string | string[] | null>;
|
|
20
20
|
default: null;
|
|
21
21
|
};
|
|
22
|
-
furnitureTempId: {
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
22
|
params: {
|
|
27
23
|
type: import('vue').PropType<Record<string, string>>;
|
|
28
24
|
default: () => {};
|
|
@@ -102,14 +98,13 @@ export declare const MachReportPreview: {
|
|
|
102
98
|
height: string;
|
|
103
99
|
gapPx: number;
|
|
104
100
|
params: Record<string, string>;
|
|
105
|
-
furnitureTempId: string;
|
|
106
|
-
tempId: string | string[] | null;
|
|
107
101
|
debug: boolean;
|
|
108
102
|
showExport: boolean;
|
|
109
103
|
showPrint: boolean;
|
|
110
104
|
showPdfWindow: boolean;
|
|
111
105
|
showParams: boolean;
|
|
112
106
|
messages: Partial<import('./config').MachReportMessages>;
|
|
107
|
+
reportId: string | string[] | null;
|
|
113
108
|
autoLoad: boolean;
|
|
114
109
|
preset: string;
|
|
115
110
|
paramDefs: import('..').ReportParamDef[] | undefined;
|
|
@@ -126,14 +121,10 @@ export declare const MachReportPreview: {
|
|
|
126
121
|
M: {};
|
|
127
122
|
Defaults: {};
|
|
128
123
|
}, Readonly<import('vue').ExtractPropTypes<{
|
|
129
|
-
|
|
124
|
+
reportId: {
|
|
130
125
|
type: import('vue').PropType<string | string[] | null>;
|
|
131
126
|
default: null;
|
|
132
127
|
};
|
|
133
|
-
furnitureTempId: {
|
|
134
|
-
type: StringConstructor;
|
|
135
|
-
default: string;
|
|
136
|
-
};
|
|
137
128
|
params: {
|
|
138
129
|
type: import('vue').PropType<Record<string, string>>;
|
|
139
130
|
default: () => {};
|
|
@@ -206,14 +197,13 @@ export declare const MachReportPreview: {
|
|
|
206
197
|
height: string;
|
|
207
198
|
gapPx: number;
|
|
208
199
|
params: Record<string, string>;
|
|
209
|
-
furnitureTempId: string;
|
|
210
|
-
tempId: string | string[] | null;
|
|
211
200
|
debug: boolean;
|
|
212
201
|
showExport: boolean;
|
|
213
202
|
showPrint: boolean;
|
|
214
203
|
showPdfWindow: boolean;
|
|
215
204
|
showParams: boolean;
|
|
216
205
|
messages: Partial<import('./config').MachReportMessages>;
|
|
206
|
+
reportId: string | string[] | null;
|
|
217
207
|
autoLoad: boolean;
|
|
218
208
|
preset: string;
|
|
219
209
|
paramDefs: import('..').ReportParamDef[] | undefined;
|
|
@@ -223,14 +213,10 @@ export declare const MachReportPreview: {
|
|
|
223
213
|
__isTeleport?: never;
|
|
224
214
|
__isSuspense?: never;
|
|
225
215
|
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
226
|
-
|
|
216
|
+
reportId: {
|
|
227
217
|
type: import('vue').PropType<string | string[] | null>;
|
|
228
218
|
default: null;
|
|
229
219
|
};
|
|
230
|
-
furnitureTempId: {
|
|
231
|
-
type: StringConstructor;
|
|
232
|
-
default: string;
|
|
233
|
-
};
|
|
234
220
|
params: {
|
|
235
221
|
type: import('vue').PropType<Record<string, string>>;
|
|
236
222
|
default: () => {};
|
|
@@ -310,14 +296,13 @@ export declare const MachReportPreview: {
|
|
|
310
296
|
height: string;
|
|
311
297
|
gapPx: number;
|
|
312
298
|
params: Record<string, string>;
|
|
313
|
-
furnitureTempId: string;
|
|
314
|
-
tempId: string | string[] | null;
|
|
315
299
|
debug: boolean;
|
|
316
300
|
showExport: boolean;
|
|
317
301
|
showPrint: boolean;
|
|
318
302
|
showPdfWindow: boolean;
|
|
319
303
|
showParams: boolean;
|
|
320
304
|
messages: Partial<import('./config').MachReportMessages>;
|
|
305
|
+
reportId: string | string[] | null;
|
|
321
306
|
autoLoad: boolean;
|
|
322
307
|
preset: string;
|
|
323
308
|
paramDefs: import('..').ReportParamDef[] | undefined;
|
package/dist/vue/async.d.ts
CHANGED
|
@@ -9,20 +9,16 @@ import { MachReportPluginOptions } from './plugin';
|
|
|
9
9
|
* import AsyncMachReportPlugin, { preloadMachReport } from "@agile-team/mach-report/vue/async";
|
|
10
10
|
* app.use(AsyncMachReportPlugin, { baseUrl: "/sub/mach-report" });
|
|
11
11
|
* void preloadMachReport(); // 可选:路由 hover 时预取
|
|
12
|
-
* // 模板:<MachReportPreview
|
|
12
|
+
* // 模板:<MachReportPreview report-id="X" />
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
/** 全局异步组件(懒加载 ReportPreview 及其引擎分片;与主插件同源共享) */
|
|
16
16
|
export declare const MachReportPreview: {
|
|
17
17
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
-
|
|
18
|
+
reportId: {
|
|
19
19
|
type: import('vue').PropType<string | string[] | null>;
|
|
20
20
|
default: null;
|
|
21
21
|
};
|
|
22
|
-
furnitureTempId: {
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
22
|
params: {
|
|
27
23
|
type: import('vue').PropType<Record<string, string>>;
|
|
28
24
|
default: () => {};
|
|
@@ -102,14 +98,13 @@ export declare const MachReportPreview: {
|
|
|
102
98
|
height: string;
|
|
103
99
|
gapPx: number;
|
|
104
100
|
params: Record<string, string>;
|
|
105
|
-
furnitureTempId: string;
|
|
106
|
-
tempId: string | string[] | null;
|
|
107
101
|
debug: boolean;
|
|
108
102
|
showExport: boolean;
|
|
109
103
|
showPrint: boolean;
|
|
110
104
|
showPdfWindow: boolean;
|
|
111
105
|
showParams: boolean;
|
|
112
106
|
messages: Partial<import('./config').MachReportMessages>;
|
|
107
|
+
reportId: string | string[] | null;
|
|
113
108
|
autoLoad: boolean;
|
|
114
109
|
preset: string;
|
|
115
110
|
paramDefs: import('..').ReportParamDef[] | undefined;
|
|
@@ -126,14 +121,10 @@ export declare const MachReportPreview: {
|
|
|
126
121
|
M: {};
|
|
127
122
|
Defaults: {};
|
|
128
123
|
}, Readonly<import('vue').ExtractPropTypes<{
|
|
129
|
-
|
|
124
|
+
reportId: {
|
|
130
125
|
type: import('vue').PropType<string | string[] | null>;
|
|
131
126
|
default: null;
|
|
132
127
|
};
|
|
133
|
-
furnitureTempId: {
|
|
134
|
-
type: StringConstructor;
|
|
135
|
-
default: string;
|
|
136
|
-
};
|
|
137
128
|
params: {
|
|
138
129
|
type: import('vue').PropType<Record<string, string>>;
|
|
139
130
|
default: () => {};
|
|
@@ -206,14 +197,13 @@ export declare const MachReportPreview: {
|
|
|
206
197
|
height: string;
|
|
207
198
|
gapPx: number;
|
|
208
199
|
params: Record<string, string>;
|
|
209
|
-
furnitureTempId: string;
|
|
210
|
-
tempId: string | string[] | null;
|
|
211
200
|
debug: boolean;
|
|
212
201
|
showExport: boolean;
|
|
213
202
|
showPrint: boolean;
|
|
214
203
|
showPdfWindow: boolean;
|
|
215
204
|
showParams: boolean;
|
|
216
205
|
messages: Partial<import('./config').MachReportMessages>;
|
|
206
|
+
reportId: string | string[] | null;
|
|
217
207
|
autoLoad: boolean;
|
|
218
208
|
preset: string;
|
|
219
209
|
paramDefs: import('..').ReportParamDef[] | undefined;
|
|
@@ -223,14 +213,10 @@ export declare const MachReportPreview: {
|
|
|
223
213
|
__isTeleport?: never;
|
|
224
214
|
__isSuspense?: never;
|
|
225
215
|
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
226
|
-
|
|
216
|
+
reportId: {
|
|
227
217
|
type: import('vue').PropType<string | string[] | null>;
|
|
228
218
|
default: null;
|
|
229
219
|
};
|
|
230
|
-
furnitureTempId: {
|
|
231
|
-
type: StringConstructor;
|
|
232
|
-
default: string;
|
|
233
|
-
};
|
|
234
220
|
params: {
|
|
235
221
|
type: import('vue').PropType<Record<string, string>>;
|
|
236
222
|
default: () => {};
|
|
@@ -310,14 +296,13 @@ export declare const MachReportPreview: {
|
|
|
310
296
|
height: string;
|
|
311
297
|
gapPx: number;
|
|
312
298
|
params: Record<string, string>;
|
|
313
|
-
furnitureTempId: string;
|
|
314
|
-
tempId: string | string[] | null;
|
|
315
299
|
debug: boolean;
|
|
316
300
|
showExport: boolean;
|
|
317
301
|
showPrint: boolean;
|
|
318
302
|
showPdfWindow: boolean;
|
|
319
303
|
showParams: boolean;
|
|
320
304
|
messages: Partial<import('./config').MachReportMessages>;
|
|
305
|
+
reportId: string | string[] | null;
|
|
321
306
|
autoLoad: boolean;
|
|
322
307
|
preset: string;
|
|
323
308
|
paramDefs: import('..').ReportParamDef[] | undefined;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ReportTemplate } from '@agile-team/mach-report';
|
|
2
2
|
import { PlanFetcher } from './adapters';
|
|
3
3
|
export interface LocalTemplateEntry {
|
|
4
|
-
tempId: string;
|
|
5
4
|
template: ReportTemplate;
|
|
6
5
|
datasets?: Record<string, Record<string, unknown>[]>;
|
|
7
6
|
}
|
|
8
7
|
/**
|
|
9
8
|
* 本地渲染适配器:模板 + 数据 → core 分页引擎 → RenderPlan。
|
|
10
|
-
*
|
|
9
|
+
* 用于本地预览、离线场景和单测。
|
|
11
10
|
*/
|
|
12
11
|
export declare function createLocalFetcher(entries: Record<string, LocalTemplateEntry>): PlanFetcher;
|