@agile-team/mach-report 2.8.1 → 2.8.3
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 +3 -3
- package/dist/{ReportPreview-vdZ5XYYb.js → ReportPreview-DRBAUkxj.js} +610 -653
- package/dist/ReportPreview-DjGeWHY-.cjs +6 -0
- package/dist/_plugin-vue_export-helper-BLmdZLlg.cjs +1 -0
- package/dist/_plugin-vue_export-helper-DPbiz14D.js +53 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +38 -0
- package/dist/designer.d.ts +38 -0
- package/dist/designer.js +758 -444
- package/dist/{plugin-zROi2Bgp.js → plugin-BurDDMcd.js} +1 -1
- package/dist/{plugin-BAD7Ry8V.cjs → plugin-DSFu51Ua.cjs} +1 -1
- package/dist/style.css +1 -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 +4 -4
- package/package.json +1 -1
- package/dist/ReportPreview-fKUPcCTN.cjs +0 -6
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { computed as F, unref as d, ref as W, onScopeDispose as Oe, watch as oe, getCurrentScope as
|
|
2
|
-
import { renderPage as zn, renderPlanToImages as Fa, calculateReportSelection as Oa, ReportCalculationError as La, ReportParamValidationError as za, ReportSourceError as qa, inspectOutputCapabilities as Ba, validateReportParams as qn, summarizeReportCellEdits as Cn, createReportCellEditBatch as Na, ReportCellEditError as ze, createReportCellResolver as Kt, parseReportCellFieldInput as
|
|
1
|
+
import { computed as F, unref as d, ref as W, onScopeDispose as Oe, watch as oe, getCurrentScope as Ra, shallowRef as le, nextTick as Fe, onMounted as bt, onBeforeUnmount as Ma, defineComponent as be, openBlock as E, createElementBlock as I, createElementVNode as b, createVNode as X, createTextVNode as re, toDisplayString as x, Fragment as fe, renderList as me, createCommentVNode as j, withModifiers as nt, withDirectives as Zt, withKeys as Ht, vModelText as Yt, createBlock as Ie, normalizeClass as pe, renderSlot as at, getCurrentInstance as Xt, onUnmounted as Qt, createStaticVNode as Ta, isRef as On, inject as gt, provide as Ln, watchEffect as Da, normalizeStyle as De, createSlots as Aa, withCtx as Ot } from "vue";
|
|
2
|
+
import { renderPage as zn, renderPlanToImages as Fa, calculateReportSelection as Oa, ReportCalculationError as La, ReportParamValidationError as za, ReportSourceError as qa, inspectOutputCapabilities as Ba, validateReportParams as qn, summarizeReportCellEdits as Cn, createReportCellEditBatch as Na, ReportCellEditError as ze, createReportCellResolver as Kt, parseReportCellFieldInput as ja, applyReportEditResult as Ha, applyReportCellEditBatch as Ka, reportCellEditKey as $n, getReportCellContext as ct, validateReportCellFieldDefinition as Wa, parseReportClipboard as Ua, formatReportClipboard as Va, resolvePlanAssets as Ga, paginateTemplate as Ja, validateRenderPlan as Za, renderPlanToCanvas as Ya } from "@agile-team/mach-report";
|
|
3
3
|
import { c as Bn } from "./page-window-index-CIuT4BAv.js";
|
|
4
4
|
import { a as Ae, n as In, w as Ge, r as Nn, f as Xa } from "./progress-DD964VAB.js";
|
|
5
5
|
import { i as Qa, b as _a } from "./render-plan-uzZYYSy1.js";
|
|
6
|
-
import { _ as ye } from "./_plugin-vue_export-helper-
|
|
7
|
-
import { b as Wt, c as es, d as ts, a as ns } from "./plugin-
|
|
8
|
-
function
|
|
6
|
+
import { _ as ee, a as ye } from "./_plugin-vue_export-helper-DPbiz14D.js";
|
|
7
|
+
import { b as Wt, c as es, d as ts, a as ns } from "./plugin-BurDDMcd.js";
|
|
8
|
+
function jn(e) {
|
|
9
9
|
return e == null ? [] : Array.isArray(e) ? e.map(String).filter((t) => t !== "") : String(e).split(",").map((t) => t.trim()).filter((t) => t !== "");
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function Ai(e) {
|
|
12
|
+
return jn(e).join(",");
|
|
13
13
|
}
|
|
14
14
|
class Lt extends Error {
|
|
15
15
|
constructor(t) {
|
|
16
16
|
super(t), this.name = "PlanLoadError";
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Fi(e = {}) {
|
|
20
20
|
const { baseUrl: t = "", headers: n, credentials: a, timeoutMs: s = 3e4 } = e, o = t.replace(/\/+$/, "");
|
|
21
21
|
return async ({ url: r, method: l, params: c, signal: v }) => {
|
|
22
22
|
let h = `${o}${r}`;
|
|
23
23
|
if (c && Object.keys(c).length > 0) {
|
|
24
|
-
const i = h.indexOf("#"), k = i >= 0 ? h.slice(i) : "",
|
|
25
|
-
for (const [
|
|
24
|
+
const i = h.indexOf("#"), k = i >= 0 ? h.slice(i) : "", R = i >= 0 ? h.slice(0, i) : h, D = R.indexOf("?"), A = D >= 0 ? R.slice(0, D) : R, z = new URLSearchParams(D >= 0 ? R.slice(D + 1) : "");
|
|
25
|
+
for (const [H, J] of Object.entries(c)) z.set(H, J);
|
|
26
26
|
h = `${A}?${z}${k}`;
|
|
27
27
|
}
|
|
28
28
|
const f = (i, k) => {
|
|
29
|
-
const
|
|
30
|
-
return Object.defineProperty(
|
|
29
|
+
const R = new Lt(i);
|
|
30
|
+
return Object.defineProperty(R, "cause", { value: k, configurable: !0, writable: !0 }), R;
|
|
31
31
|
};
|
|
32
32
|
if (v?.aborted)
|
|
33
33
|
throw f(`请求已取消: ${r}`, v.reason);
|
|
@@ -72,18 +72,18 @@ function as(e, t, n = {}) {
|
|
|
72
72
|
)), h = F(() => {
|
|
73
73
|
const i = e.value;
|
|
74
74
|
if (!i) return [];
|
|
75
|
-
const { start: k, end:
|
|
76
|
-
return i.pages.slice(k,
|
|
75
|
+
const { start: k, end: R } = v.value;
|
|
76
|
+
return i.pages.slice(k, R + 1).map((D, A) => ({ page: D, index: k + A }));
|
|
77
77
|
});
|
|
78
78
|
let f = 0, m = !1;
|
|
79
79
|
function w(i) {
|
|
80
80
|
i && (o.value = i.scrollTop, r.value = i.clientHeight || 800);
|
|
81
81
|
}
|
|
82
82
|
function p(i, k) {
|
|
83
|
-
return (
|
|
83
|
+
return (R) => {
|
|
84
84
|
f || m || (f = requestAnimationFrame(() => {
|
|
85
|
-
if (f = 0, m || (w(
|
|
86
|
-
const D = Math.max(0,
|
|
85
|
+
if (f = 0, m || (w(R), k.value <= 0)) return;
|
|
86
|
+
const D = Math.max(0, R.scrollTop + 32) / t.value;
|
|
87
87
|
i.value = Math.min(k.value, l.value.pageAt(D) + 1);
|
|
88
88
|
}));
|
|
89
89
|
};
|
|
@@ -108,40 +108,40 @@ function ss(e) {
|
|
|
108
108
|
function l() {
|
|
109
109
|
s++, o && cancelAnimationFrame(o), o = 0;
|
|
110
110
|
}
|
|
111
|
-
function c(u, i, k,
|
|
112
|
-
return !r && i === s && e.plan.value === k && e.root.value ===
|
|
111
|
+
function c(u, i, k, R) {
|
|
112
|
+
return !r && i === s && e.plan.value === k && e.root.value === R && R.contains(u.holder) && Number(u.holder.dataset.page) === u.index + 1;
|
|
113
113
|
}
|
|
114
114
|
function v(u) {
|
|
115
115
|
const { holder: i, page: k } = u;
|
|
116
116
|
t.delete(i), i.style.width = `${k.pageWidthMm * Pn}px`, i.style.height = `${k.pageHeightMm * Pn}px`, i.setAttribute("aria-busy", "true");
|
|
117
|
-
const
|
|
118
|
-
|
|
117
|
+
const R = i.ownerDocument.createElement("div");
|
|
118
|
+
R.className = "mrp-page-loading";
|
|
119
119
|
const D = i.ownerDocument.createElement("span");
|
|
120
|
-
D.textContent = e.loading(), D.style.transform = `scale(${1 / Math.max(1e-4, e.zoom())})`,
|
|
120
|
+
D.textContent = e.loading(), D.style.transform = `scale(${1 / Math.max(1e-4, e.zoom())})`, R.append(D), i.replaceChildren(R);
|
|
121
121
|
}
|
|
122
122
|
function h(u) {
|
|
123
123
|
const i = t.get(u.holder);
|
|
124
124
|
return !i || i.page !== u.page || i.element.parentElement !== u.holder ? !1 : (i.query !== e.query() && (e.clear(i.element), e.highlight(i.element), i.query = e.query()), !0);
|
|
125
125
|
}
|
|
126
|
-
function f(u, i, k,
|
|
127
|
-
if (c(u, i, k,
|
|
126
|
+
function f(u, i, k, R) {
|
|
127
|
+
if (c(u, i, k, R))
|
|
128
128
|
try {
|
|
129
129
|
const D = zn(u.page, 96, {}, u.holder.ownerDocument);
|
|
130
|
-
if (e.highlight(D), !c(u, i, k,
|
|
130
|
+
if (e.highlight(D), !c(u, i, k, R)) return;
|
|
131
131
|
u.holder.replaceChildren(D), u.holder.removeAttribute("aria-busy"), t.set(u.holder, { page: u.page, element: D, query: e.query() }), e.mounted(u.holder), e.ready();
|
|
132
132
|
} catch (D) {
|
|
133
|
-
if (!c(u, i, k,
|
|
133
|
+
if (!c(u, i, k, R)) return;
|
|
134
134
|
u.holder.removeAttribute("aria-busy");
|
|
135
135
|
const A = u.holder.ownerDocument.createElement("div");
|
|
136
136
|
A.className = "mrp-page-render-error", A.setAttribute("role", "alert"), A.textContent = D instanceof Error ? D.message : String(D), u.holder.replaceChildren(A), e.error(D);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
function m(u, i, k,
|
|
139
|
+
function m(u, i, k, R) {
|
|
140
140
|
u.length && (o = requestAnimationFrame(() => {
|
|
141
141
|
if (i !== s || r) return;
|
|
142
142
|
o = 0;
|
|
143
143
|
const D = u.shift();
|
|
144
|
-
D && f(D, i, k,
|
|
144
|
+
D && f(D, i, k, R), i === s && e.plan.value === k && e.root.value === R && m(u, i, k, R);
|
|
145
145
|
}));
|
|
146
146
|
}
|
|
147
147
|
function w() {
|
|
@@ -151,16 +151,16 @@ function ss(e) {
|
|
|
151
151
|
a = void 0;
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
const k = s,
|
|
154
|
+
const k = s, R = a?.plan === u ? a.index : e.priority();
|
|
155
155
|
a = void 0;
|
|
156
156
|
const D = [];
|
|
157
|
-
i.querySelectorAll(".mrp-page-holder").forEach((
|
|
158
|
-
const J = Number(
|
|
157
|
+
i.querySelectorAll(".mrp-page-holder").forEach((H) => {
|
|
158
|
+
const J = Number(H.dataset.page) - 1, Z = u.pages[J];
|
|
159
159
|
if (!Z) return;
|
|
160
|
-
const Y = { holder:
|
|
160
|
+
const Y = { holder: H, page: Z, index: J };
|
|
161
161
|
h(Y) || (v(Y), D.push(Y));
|
|
162
162
|
});
|
|
163
|
-
const A = D.findIndex((
|
|
163
|
+
const A = D.findIndex((H) => H.index === R), z = A < 0 ? void 0 : D.splice(A, 1)[0];
|
|
164
164
|
z && f(z, k, u, i), e.ready(), m(D, k, u, i);
|
|
165
165
|
}
|
|
166
166
|
function p(u) {
|
|
@@ -191,7 +191,7 @@ function os(e) {
|
|
|
191
191
|
s(), n.value = "raw", t.value = Math.min(3, Math.max(0.3, l / 100));
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
return
|
|
194
|
+
return Ra() && Oe(s), { zoom: t, zoomMode: n, applyFitZoom: o, setZoom: r };
|
|
195
195
|
}
|
|
196
196
|
let rs = 0;
|
|
197
197
|
function Sn(e, t) {
|
|
@@ -244,7 +244,7 @@ function vt(e) {
|
|
|
244
244
|
function ls(e) {
|
|
245
245
|
return { head: pt(e), pageChunks: e.pages.map(vt) };
|
|
246
246
|
}
|
|
247
|
-
async function
|
|
247
|
+
async function Oi(e, t = {}) {
|
|
248
248
|
const n = {
|
|
249
249
|
schemaVersion: "mach-report-batch-print",
|
|
250
250
|
pages: e.flatMap((r) => r.pages)
|
|
@@ -266,13 +266,13 @@ async function zi(e, t = {}) {
|
|
|
266
266
|
o ? setTimeout(() => s.remove(), 6e4) : s.remove();
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Hn(e) {
|
|
270
270
|
return `<!doctype html><html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="utf-8"><!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:Zoom>100</w:Zoom></w:WordDocument></xml><![endif]-->${e.replace(/^<!doctype html><html><head>/, "")}`;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Li(e) {
|
|
273
273
|
const { head: t, pageChunks: n } = ls(e);
|
|
274
274
|
return {
|
|
275
|
-
html: `${
|
|
275
|
+
html: `${Hn(t)}${n.join("")}</body></html>`,
|
|
276
276
|
filename: "mach-report.doc"
|
|
277
277
|
};
|
|
278
278
|
}
|
|
@@ -297,20 +297,20 @@ function is(e, t) {
|
|
|
297
297
|
function k($) {
|
|
298
298
|
r.get($)?.run.finish(), r.delete($), u();
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function R() {
|
|
301
301
|
for (const [$, P] of c)
|
|
302
302
|
p(P.plan, P.epoch) || ($.close(), c.delete($));
|
|
303
303
|
}
|
|
304
304
|
function D() {
|
|
305
305
|
for (const $ of r.values()) $.run.finish("cancelled");
|
|
306
|
-
l?.finish("cancelled"), o++, z(), u(),
|
|
306
|
+
l?.finish("cancelled"), o++, z(), u(), R();
|
|
307
307
|
}
|
|
308
308
|
const A = oe(e, D, { flush: "sync" });
|
|
309
309
|
function z() {
|
|
310
310
|
n?.remove(), n = null;
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
D(), s = !0, o++, A(), z(),
|
|
312
|
+
function H() {
|
|
313
|
+
D(), s = !0, o++, A(), z(), R(), r.clear(), t.onPrinting?.(!1);
|
|
314
314
|
}
|
|
315
315
|
function J($, P) {
|
|
316
316
|
const q = URL.createObjectURL($);
|
|
@@ -389,7 +389,7 @@ function is(e, t) {
|
|
|
389
389
|
})();
|
|
390
390
|
return f = { plan: $, epoch: P, promise: T, token: q }, T;
|
|
391
391
|
}
|
|
392
|
-
async function
|
|
392
|
+
async function M() {
|
|
393
393
|
const $ = e.value;
|
|
394
394
|
if (s || !$ || $.pages.length === 0) return;
|
|
395
395
|
const P = o;
|
|
@@ -448,7 +448,7 @@ function is(e, t) {
|
|
|
448
448
|
Q.push(vt(st)), V.update("encode", we + 1, P.pages.length), we % Ve === Ve - 1 && await tt();
|
|
449
449
|
}
|
|
450
450
|
if (!p(P, q)) return;
|
|
451
|
-
const ie = pt(P), Ee = `${$ === "word" ?
|
|
451
|
+
const ie = pt(P), Ee = `${$ === "word" ? Hn(ie) : ie}${Q.join("")}</body></html>`;
|
|
452
452
|
Z(P, q, V, new Blob([Ee], { type: $ === "word" ? "application/msword;charset=utf-8" : "text/html;charset=utf-8" }), $ === "word" ? "mach-report.doc" : "mach-report.html");
|
|
453
453
|
} catch (Q) {
|
|
454
454
|
V.finish("failed"), p(P, q) && t.onError(Q instanceof Error ? `导出失败: ${Q.message}` : "导出失败", "export");
|
|
@@ -467,7 +467,7 @@ function is(e, t) {
|
|
|
467
467
|
return;
|
|
468
468
|
}
|
|
469
469
|
if ($ === "xlsx" || $ === "excel") {
|
|
470
|
-
await
|
|
470
|
+
await M();
|
|
471
471
|
return;
|
|
472
472
|
}
|
|
473
473
|
if ($ === "png" || $ === "image") {
|
|
@@ -519,7 +519,7 @@ function is(e, t) {
|
|
|
519
519
|
invalidatePending: D,
|
|
520
520
|
cancel: D,
|
|
521
521
|
releasePrintFrame: z,
|
|
522
|
-
dispose:
|
|
522
|
+
dispose: H
|
|
523
523
|
};
|
|
524
524
|
}
|
|
525
525
|
const Kn = "mrp-hit";
|
|
@@ -604,10 +604,10 @@ function hs(e) {
|
|
|
604
604
|
const f = F(() => {
|
|
605
605
|
if (c.value === 0) return null;
|
|
606
606
|
const A = l.value;
|
|
607
|
-
let z = 0,
|
|
608
|
-
for (; z <
|
|
609
|
-
const Z = z +
|
|
610
|
-
h[Z].cumulative <= A ? z = Z + 1 :
|
|
607
|
+
let z = 0, H = h.length - 1;
|
|
608
|
+
for (; z < H; ) {
|
|
609
|
+
const Z = z + H >>> 1;
|
|
610
|
+
h[Z].cumulative <= A ? z = Z + 1 : H = Z;
|
|
611
611
|
}
|
|
612
612
|
const J = h[z];
|
|
613
613
|
return J ? { pageIndex: J.pageIndex, occurrence: A - (h[z - 1]?.cumulative ?? 0) } : null;
|
|
@@ -618,26 +618,26 @@ function hs(e) {
|
|
|
618
618
|
}
|
|
619
619
|
function i(A) {
|
|
620
620
|
r.value = A, l.value = 0, c.value = 0, h = [], v.value = !1;
|
|
621
|
-
const z = A.trim().toLowerCase(),
|
|
622
|
-
if (!z || !
|
|
621
|
+
const z = A.trim().toLowerCase(), H = t.value;
|
|
622
|
+
if (!z || !H) return;
|
|
623
623
|
v.value = !0;
|
|
624
|
-
const J = p, Z = ps(
|
|
624
|
+
const J = p, Z = ps(H), Y = [];
|
|
625
625
|
let te = 0;
|
|
626
626
|
function ne() {
|
|
627
|
-
if (w = null, J !== p ||
|
|
627
|
+
if (w = null, J !== p || H !== t.value) return;
|
|
628
628
|
const y = performance.now();
|
|
629
629
|
let C = 0;
|
|
630
630
|
for (; C < 5e3 && performance.now() - y < 4; ) {
|
|
631
|
-
const
|
|
632
|
-
if (
|
|
631
|
+
const M = Z.next();
|
|
632
|
+
if (M.done) {
|
|
633
633
|
h = Y, c.value = te, v.value = !1, h[0] && n(h[0].pageIndex + 1);
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
636
|
-
const O = vs(
|
|
636
|
+
const O = vs(M.value.text, z);
|
|
637
637
|
if (O > 0) {
|
|
638
638
|
te += O;
|
|
639
639
|
const N = Y[Y.length - 1];
|
|
640
|
-
N?.pageIndex ===
|
|
640
|
+
N?.pageIndex === M.value.pageIndex ? N.cumulative = te : Y.push({ pageIndex: M.value.pageIndex, cumulative: te });
|
|
641
641
|
}
|
|
642
642
|
C++;
|
|
643
643
|
}
|
|
@@ -654,12 +654,12 @@ function hs(e) {
|
|
|
654
654
|
m = null, i(A);
|
|
655
655
|
}, Math.max(0, d(e.debounceMs) ?? 200));
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function R(A) {
|
|
658
658
|
const z = c.value;
|
|
659
659
|
if (z === 0 || v.value) return;
|
|
660
660
|
l.value = (l.value + A + z) % z;
|
|
661
|
-
const
|
|
662
|
-
|
|
661
|
+
const H = f.value;
|
|
662
|
+
H && n(H.pageIndex + 1);
|
|
663
663
|
}
|
|
664
664
|
function D() {
|
|
665
665
|
u(), r.value = "", l.value = c.value = 0, h = [];
|
|
@@ -675,7 +675,7 @@ function hs(e) {
|
|
|
675
675
|
o.value = !o.value;
|
|
676
676
|
},
|
|
677
677
|
onInput: k,
|
|
678
|
-
onNav:
|
|
678
|
+
onNav: R,
|
|
679
679
|
apply: (A) => {
|
|
680
680
|
r.value.trim() && a(A, r.value.trim());
|
|
681
681
|
},
|
|
@@ -705,16 +705,16 @@ function bs(e, t) {
|
|
|
705
705
|
}
|
|
706
706
|
function ys(e, t) {
|
|
707
707
|
const { thumbsRoot: n, visible: a, renderThumbCanvas: s } = t, o = W(0), r = W(800), l = F(() => (e.value?.pages ?? []).map(
|
|
708
|
-
(
|
|
709
|
-
)), c = F(() => Bn(l.value.map((
|
|
708
|
+
(R) => Math.round(R.pageHeightMm / R.pageWidthMm * 116)
|
|
709
|
+
)), c = F(() => Bn(l.value.map((R) => R + 20), 8)), v = F(() => c.value.window(r.value, o.value, 1)), h = F(() => {
|
|
710
710
|
if (!a.value) return [];
|
|
711
|
-
const { start:
|
|
712
|
-
return l.value.slice(
|
|
711
|
+
const { start: R, end: D } = v.value;
|
|
712
|
+
return l.value.slice(R, D + 1).map((A, z) => ({ index: R + z, height: A }));
|
|
713
713
|
});
|
|
714
714
|
let f = 0, m = 0, w = !1;
|
|
715
715
|
function p() {
|
|
716
|
-
const
|
|
717
|
-
|
|
716
|
+
const R = n.value;
|
|
717
|
+
R && (o.value = R.scrollTop, r.value = R.clientHeight || 800);
|
|
718
718
|
}
|
|
719
719
|
function u() {
|
|
720
720
|
w || m || (m = requestAnimationFrame(() => {
|
|
@@ -724,20 +724,20 @@ function ys(e, t) {
|
|
|
724
724
|
function i() {
|
|
725
725
|
if (h.value, f && cancelAnimationFrame(f), f = 0, w || !a.value || !e.value || !n.value) return;
|
|
726
726
|
p();
|
|
727
|
-
const
|
|
727
|
+
const R = h.value, D = e.value, A = n.value;
|
|
728
728
|
let z = 0;
|
|
729
|
-
function
|
|
729
|
+
function H() {
|
|
730
730
|
if (f = 0, !(w || !a.value || e.value !== D || n.value !== A)) {
|
|
731
|
-
for (let J = 0; z <
|
|
732
|
-
const Z =
|
|
731
|
+
for (let J = 0; z < R.length && J < 2; J++, z++) {
|
|
732
|
+
const Z = R[z].index, Y = A.querySelector(`[data-thumb="${Z + 1}"]`);
|
|
733
733
|
if (!Y || Y.childElementCount > 0) continue;
|
|
734
734
|
const te = s(Z);
|
|
735
735
|
te && (te.style.width = "100%", te.style.height = "100%", te.style.display = "block", Y.appendChild(te));
|
|
736
736
|
}
|
|
737
|
-
z <
|
|
737
|
+
z < R.length && (f = requestAnimationFrame(H));
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
f = requestAnimationFrame(
|
|
740
|
+
f = requestAnimationFrame(H);
|
|
741
741
|
}
|
|
742
742
|
function k() {
|
|
743
743
|
w = !0, f && cancelAnimationFrame(f), m && cancelAnimationFrame(m), f = m = 0;
|
|
@@ -772,49 +772,6 @@ function xs(e) {
|
|
|
772
772
|
}
|
|
773
773
|
return { input: t, toggle: n, focus: a, close: s, onKeydown: o };
|
|
774
774
|
}
|
|
775
|
-
const ks = ["width", "height"], Es = ["d"], ee = /* @__PURE__ */ he({
|
|
776
|
-
__name: "ReportIcon",
|
|
777
|
-
props: {
|
|
778
|
-
name: {},
|
|
779
|
-
size: {}
|
|
780
|
-
},
|
|
781
|
-
setup(e) {
|
|
782
|
-
const t = {
|
|
783
|
-
search: "m15.5 15.5 4.5 4.5M18 10.5a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Z",
|
|
784
|
-
close: "m6 6 12 12M6 18 18 6",
|
|
785
|
-
"chevron-down": "m6 9 6 6 6-6",
|
|
786
|
-
"chevron-up": "m6 15 6-6 6 6",
|
|
787
|
-
"chevron-left": "m15 6-6 6 6 6",
|
|
788
|
-
"chevron-right": "m9 6 6 6-6 6",
|
|
789
|
-
download: "M12 3v12m-5-5 5 5 5-5M4 16v4h16v-4",
|
|
790
|
-
upload: "M12 16V4m-5 5 5-5 5 5M4 16v4h16v-4",
|
|
791
|
-
print: "M7 8V3h10v5M7 17H4V9h16v8h-3M7 14h10v7H7v-7m10-2h.01",
|
|
792
|
-
external: "M14 3h7v7m0-7L10 14M11 3H3v18h18v-8",
|
|
793
|
-
settings: "M3 6h18M3 12h18M3 18h18M8 3v6m8 0v6M9 15v6",
|
|
794
|
-
grid: "M3 3h18v18H3V3m6 0v18m6-18v18M3 9h18M3 15h18",
|
|
795
|
-
fit: "M8 5H3v14h5m8-14h5v14h-5M7 12h10m-7-3-3 3 3 3m4-6 3 3-3 3",
|
|
796
|
-
columns: "M3 4h18v16H3V4m6 0v16m6-16v16M3 9h18",
|
|
797
|
-
"arrow-right": "M4 12h16m-6-6 6 6-6 6",
|
|
798
|
-
file: "M14 3H5v18h14V8l-5-5Zm0 0v5h5M8 12h8m-8 4h6"
|
|
799
|
-
};
|
|
800
|
-
return (n, a) => (E(), I("svg", {
|
|
801
|
-
width: e.size ?? 16,
|
|
802
|
-
height: e.size ?? 16,
|
|
803
|
-
viewBox: "0 0 24 24",
|
|
804
|
-
fill: "none",
|
|
805
|
-
"aria-hidden": "true",
|
|
806
|
-
focusable: "false"
|
|
807
|
-
}, [
|
|
808
|
-
b("path", {
|
|
809
|
-
d: t[e.name],
|
|
810
|
-
stroke: "currentColor",
|
|
811
|
-
"stroke-width": "1.65",
|
|
812
|
-
"stroke-linecap": "round",
|
|
813
|
-
"stroke-linejoin": "round"
|
|
814
|
-
}, null, 8, Es)
|
|
815
|
-
], 8, ks));
|
|
816
|
-
}
|
|
817
|
-
});
|
|
818
775
|
function Wn() {
|
|
819
776
|
const e = W(!1), t = W(null), n = W(null), a = W(null);
|
|
820
777
|
function s(l = !1) {
|
|
@@ -830,11 +787,11 @@ function Wn() {
|
|
|
830
787
|
l && Fe(() => (a.value?.querySelector("input") ?? a.value?.querySelector("button:not(:disabled)"))?.focus());
|
|
831
788
|
}), bt(() => {
|
|
832
789
|
document.addEventListener("pointerdown", o), document.addEventListener("focusin", o);
|
|
833
|
-
}),
|
|
790
|
+
}), Ma(() => {
|
|
834
791
|
document.removeEventListener("pointerdown", o), document.removeEventListener("focusin", o);
|
|
835
792
|
}), { opened: e, root: t, trigger: n, panel: a, close: s, onKeydown: r };
|
|
836
793
|
}
|
|
837
|
-
const
|
|
794
|
+
const ks = ["disabled", "aria-expanded"], Es = ["aria-label"], Cs = ["aria-label", "disabled", "onClick"], $s = { "aria-hidden": "true" }, Is = /* @__PURE__ */ be({
|
|
838
795
|
__name: "ReportExportMenu",
|
|
839
796
|
props: {
|
|
840
797
|
messages: {},
|
|
@@ -866,8 +823,8 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
866
823
|
}
|
|
867
824
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(p.key)) return;
|
|
868
825
|
p.preventDefault(), p.stopPropagation();
|
|
869
|
-
const i = [...l.value?.querySelectorAll("button:not(:disabled)") ?? []], k = i.indexOf(document.activeElement),
|
|
870
|
-
i[
|
|
826
|
+
const i = [...l.value?.querySelectorAll("button:not(:disabled)") ?? []], k = i.indexOf(document.activeElement), R = p.key === "Home" ? 0 : p.key === "End" ? i.length - 1 : (k + (p.key === "ArrowDown" ? 1 : -1) + i.length) % i.length;
|
|
827
|
+
i[R]?.focus();
|
|
871
828
|
}
|
|
872
829
|
return (p, u) => h.value.length ? (E(), I("div", {
|
|
873
830
|
key: 0,
|
|
@@ -894,7 +851,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
894
851
|
name: "chevron-down",
|
|
895
852
|
size: 12
|
|
896
853
|
})
|
|
897
|
-
], 40,
|
|
854
|
+
], 40, ks),
|
|
898
855
|
d(s) ? (E(), I("div", {
|
|
899
856
|
key: 0,
|
|
900
857
|
ref_key: "panel",
|
|
@@ -916,19 +873,19 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
916
873
|
}, [
|
|
917
874
|
X(ee, { name: "file" }),
|
|
918
875
|
b("span", null, x(i.label), 1),
|
|
919
|
-
b("small",
|
|
920
|
-
], 8,
|
|
921
|
-
], 40,
|
|
922
|
-
], 544)) :
|
|
876
|
+
b("small", $s, x(i.extension), 1)
|
|
877
|
+
], 8, Cs))), 128))
|
|
878
|
+
], 40, Es)) : j("", !0)
|
|
879
|
+
], 544)) : j("", !0);
|
|
923
880
|
}
|
|
924
|
-
}),
|
|
881
|
+
}), Ps = /* @__PURE__ */ ye(Is, [["__scopeId", "data-v-83a57a3c"]]), Ss = ["aria-label"], Rs = {
|
|
925
882
|
class: "mrp-pageinfo",
|
|
926
883
|
"aria-live": "polite"
|
|
927
|
-
},
|
|
884
|
+
}, Ms = { class: "mrp-page-buttons" }, Ts = ["aria-label", "title", "disabled"], Ds = ["aria-label", "title", "disabled"], As = ["aria-label", "title", "aria-invalid", "disabled"], Fs = ["aria-label", "disabled"], Os = {
|
|
928
885
|
key: 1,
|
|
929
886
|
class: "mrp-page-error",
|
|
930
887
|
role: "alert"
|
|
931
|
-
},
|
|
888
|
+
}, Ls = /* @__PURE__ */ be({
|
|
932
889
|
__name: "ReportPagination",
|
|
933
890
|
props: {
|
|
934
891
|
pageCount: {},
|
|
@@ -953,8 +910,8 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
953
910
|
role: "navigation",
|
|
954
911
|
"aria-label": e.messages.pagination ?? "报表分页"
|
|
955
912
|
}, [
|
|
956
|
-
b("span",
|
|
957
|
-
b("div",
|
|
913
|
+
b("span", Rs, x(r.value), 1),
|
|
914
|
+
b("div", Ms, [
|
|
958
915
|
b("button", {
|
|
959
916
|
class: "mrp-nav",
|
|
960
917
|
type: "button",
|
|
@@ -964,7 +921,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
964
921
|
onClick: v[0] || (v[0] = (h) => a("goto", e.currentPage - 1))
|
|
965
922
|
}, [
|
|
966
923
|
X(ee, { name: "chevron-left" })
|
|
967
|
-
], 8,
|
|
924
|
+
], 8, Ts),
|
|
968
925
|
b("button", {
|
|
969
926
|
class: "mrp-nav",
|
|
970
927
|
type: "button",
|
|
@@ -974,7 +931,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
974
931
|
onClick: v[1] || (v[1] = (h) => a("goto", e.currentPage + 1))
|
|
975
932
|
}, [
|
|
976
933
|
X(ee, { name: "chevron-right" })
|
|
977
|
-
], 8,
|
|
934
|
+
], 8, Ds)
|
|
978
935
|
]),
|
|
979
936
|
e.pageCount > 1 ? (E(), I("form", {
|
|
980
937
|
key: 0,
|
|
@@ -993,10 +950,10 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
993
950
|
"aria-invalid": o.value,
|
|
994
951
|
disabled: e.busy,
|
|
995
952
|
onInput: v[3] || (v[3] = (h) => o.value = !1),
|
|
996
|
-
onKeydown: v[4] || (v[4] =
|
|
953
|
+
onKeydown: v[4] || (v[4] = Ht((h) => {
|
|
997
954
|
s.value = String(e.currentPage), o.value = !1;
|
|
998
955
|
}, ["esc"]))
|
|
999
|
-
}, null, 40,
|
|
956
|
+
}, null, 40, As), [
|
|
1000
957
|
[Yt, s.value]
|
|
1001
958
|
])
|
|
1002
959
|
]),
|
|
@@ -1010,20 +967,20 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1010
967
|
name: "arrow-right",
|
|
1011
968
|
size: 14
|
|
1012
969
|
})
|
|
1013
|
-
], 8,
|
|
1014
|
-
], 32)) :
|
|
1015
|
-
o.value ? (E(), I("span",
|
|
1016
|
-
], 8,
|
|
970
|
+
], 8, Fs)
|
|
971
|
+
], 32)) : j("", !0),
|
|
972
|
+
o.value ? (E(), I("span", Os, x(e.messages.pageJumpInvalid ?? "请输入有效页码"), 1)) : j("", !0)
|
|
973
|
+
], 8, Ss)) : j("", !0);
|
|
1017
974
|
}
|
|
1018
|
-
}), Un = /* @__PURE__ */ ye(
|
|
975
|
+
}), Un = /* @__PURE__ */ ye(Ls, [["__scopeId", "data-v-0db4fbd3"]]), zs = ["aria-label"], qs = { class: "mrp-title" }, Bs = ["aria-label"], Ns = ["aria-label", "aria-pressed"], js = ["aria-pressed"], Hs = ["aria-pressed"], Ks = ["aria-label"], Ws = ["aria-pressed"], Us = ["aria-pressed", "onClick"], Vs = ["aria-label"], Gs = ["disabled"], Js = ["disabled"], Zs = ["disabled"], Ys = ["aria-label", "aria-expanded"], Xs = ["aria-label"], Qs = ["placeholder", "aria-label", "value"], _s = ["aria-label"], eo = {
|
|
1019
976
|
key: 1,
|
|
1020
977
|
class: "mrp-search-count",
|
|
1021
978
|
role: "status",
|
|
1022
979
|
"aria-live": "polite"
|
|
1023
|
-
},
|
|
980
|
+
}, to = ["disabled", "aria-label"], no = ["disabled", "aria-label"], ao = ["aria-label"], so = {
|
|
1024
981
|
class: "mrp-search-hint",
|
|
1025
982
|
role: "status"
|
|
1026
|
-
},
|
|
983
|
+
}, oo = /* @__PURE__ */ be({
|
|
1027
984
|
__name: "ReportToolbar",
|
|
1028
985
|
props: {
|
|
1029
986
|
pageCount: {},
|
|
@@ -1070,7 +1027,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1070
1027
|
role: "toolbar",
|
|
1071
1028
|
"aria-label": e.messages.title
|
|
1072
1029
|
}, [
|
|
1073
|
-
b("span",
|
|
1030
|
+
b("span", qs, [
|
|
1074
1031
|
X(ee, { name: "file" }),
|
|
1075
1032
|
re(x(e.messages.title), 1)
|
|
1076
1033
|
]),
|
|
@@ -1081,7 +1038,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1081
1038
|
messages: e.messages,
|
|
1082
1039
|
busy: e.busy,
|
|
1083
1040
|
onGoto: f[0] || (f[0] = (m) => s("goto", m))
|
|
1084
|
-
}, null, 8, ["page-count", "current-page", "messages", "busy"])) :
|
|
1041
|
+
}, null, 8, ["page-count", "current-page", "messages", "busy"])) : j("", !0),
|
|
1085
1042
|
f[15] || (f[15] = b("span", { class: "mrp-spacer" }, null, -1)),
|
|
1086
1043
|
e.showSearch !== !1 ? (E(), I("div", {
|
|
1087
1044
|
key: 1,
|
|
@@ -1100,7 +1057,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1100
1057
|
onClick: f[1] || (f[1] = (m) => s("search-toggle"))
|
|
1101
1058
|
}, [
|
|
1102
1059
|
X(ee, { name: "search" })
|
|
1103
|
-
], 10,
|
|
1060
|
+
], 10, Ns),
|
|
1104
1061
|
e.showThumbnails !== !1 ? (E(), I("button", {
|
|
1105
1062
|
key: 0,
|
|
1106
1063
|
class: pe(["mrp-nav", { "mrp-active": e.thumbsVisible }]),
|
|
@@ -1110,8 +1067,8 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1110
1067
|
}, [
|
|
1111
1068
|
X(ee, { name: "grid" }),
|
|
1112
1069
|
re(x(e.messages.thumbnails), 1)
|
|
1113
|
-
], 10,
|
|
1114
|
-
], 8,
|
|
1070
|
+
], 10, js)) : j("", !0)
|
|
1071
|
+
], 8, Bs)) : e.showThumbnails !== !1 ? (E(), I("button", {
|
|
1115
1072
|
key: 2,
|
|
1116
1073
|
class: pe(["mrp-nav", { "mrp-active": e.thumbsVisible }]),
|
|
1117
1074
|
type: "button",
|
|
@@ -1120,7 +1077,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1120
1077
|
}, [
|
|
1121
1078
|
X(ee, { name: "grid" }),
|
|
1122
1079
|
re(x(e.messages.thumbnails), 1)
|
|
1123
|
-
], 10,
|
|
1080
|
+
], 10, Hs)) : j("", !0),
|
|
1124
1081
|
at(h.$slots, "navigation", {}, void 0, !0),
|
|
1125
1082
|
e.showZoom !== !1 ? (E(), I("div", {
|
|
1126
1083
|
key: 3,
|
|
@@ -1136,15 +1093,15 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1136
1093
|
}, [
|
|
1137
1094
|
X(ee, { name: "fit" }),
|
|
1138
1095
|
re(x(e.messages.fitWidth), 1)
|
|
1139
|
-
], 10,
|
|
1096
|
+
], 10, Ws),
|
|
1140
1097
|
(E(), I(fe, null, me([100, 150], (m) => b("button", {
|
|
1141
1098
|
key: m,
|
|
1142
1099
|
class: pe(["mrp-nav", { "mrp-active": e.zoomMode === "raw" && Math.round(e.zoom * 100) === m }]),
|
|
1143
1100
|
"aria-pressed": e.zoomMode === "raw" && Math.round(e.zoom * 100) === m,
|
|
1144
1101
|
type: "button",
|
|
1145
1102
|
onClick: (w) => s("zoom", m)
|
|
1146
|
-
}, x(m) + "%", 11,
|
|
1147
|
-
], 8,
|
|
1103
|
+
}, x(m) + "%", 11, Us)), 64))
|
|
1104
|
+
], 8, Ks)) : j("", !0),
|
|
1148
1105
|
e.showImport || e.showExport || e.showPrint || e.showPdfWindow ? (E(), I("div", {
|
|
1149
1106
|
key: 4,
|
|
1150
1107
|
class: "mrp-output-tools",
|
|
@@ -1160,14 +1117,14 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1160
1117
|
}, [
|
|
1161
1118
|
X(ee, { name: "upload" }),
|
|
1162
1119
|
re(x(e.messages.importExcel ?? "导入 Excel 模板"), 1)
|
|
1163
|
-
], 8,
|
|
1164
|
-
e.showExport ? (E(), Ie(
|
|
1120
|
+
], 8, Gs)) : j("", !0),
|
|
1121
|
+
e.showExport ? (E(), Ie(Ps, {
|
|
1165
1122
|
key: 1,
|
|
1166
1123
|
messages: e.messages,
|
|
1167
1124
|
formats: e.exportFormats,
|
|
1168
1125
|
busy: e.busy,
|
|
1169
1126
|
onExport: f[6] || (f[6] = (m) => s("export", m))
|
|
1170
|
-
}, null, 8, ["messages", "formats", "busy"])) :
|
|
1127
|
+
}, null, 8, ["messages", "formats", "busy"])) : j("", !0),
|
|
1171
1128
|
e.showPrint ? (E(), I("button", {
|
|
1172
1129
|
key: 2,
|
|
1173
1130
|
class: "mrp-nav",
|
|
@@ -1177,7 +1134,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1177
1134
|
}, [
|
|
1178
1135
|
X(ee, { name: "print" }),
|
|
1179
1136
|
re(x(e.messages.print), 1)
|
|
1180
|
-
], 8,
|
|
1137
|
+
], 8, Js)) : j("", !0),
|
|
1181
1138
|
e.showPdfWindow ? (E(), I("button", {
|
|
1182
1139
|
key: 3,
|
|
1183
1140
|
class: "mrp-nav",
|
|
@@ -1187,8 +1144,8 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1187
1144
|
}, [
|
|
1188
1145
|
X(ee, { name: "external" }),
|
|
1189
1146
|
re(x(e.messages.pdfWindow), 1)
|
|
1190
|
-
], 8,
|
|
1191
|
-
], 8,
|
|
1147
|
+
], 8, Zs)) : j("", !0)
|
|
1148
|
+
], 8, Vs)) : j("", !0),
|
|
1192
1149
|
e.showSettings ? (E(), I("button", {
|
|
1193
1150
|
key: 5,
|
|
1194
1151
|
class: pe(["mrp-nav mrp-settings-toggle", { "mrp-active": e.settingsOpen }]),
|
|
@@ -1200,7 +1157,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1200
1157
|
}, [
|
|
1201
1158
|
X(ee, { name: "settings" }),
|
|
1202
1159
|
re(x(e.messages.settings ?? "设置"), 1)
|
|
1203
|
-
], 10,
|
|
1160
|
+
], 10, Ys)) : j("", !0),
|
|
1204
1161
|
e.showSearch !== !1 && e.search.visible ? (E(), I("div", {
|
|
1205
1162
|
key: 6,
|
|
1206
1163
|
class: "mrp-search-panel",
|
|
@@ -1224,7 +1181,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1224
1181
|
onInput: f[10] || (f[10] = (m) => s("search-input", m.target.value)),
|
|
1225
1182
|
onKeydown: f[11] || (f[11] = //@ts-ignore
|
|
1226
1183
|
(...m) => d(o).onKeydown && d(o).onKeydown(...m))
|
|
1227
|
-
}, null, 40,
|
|
1184
|
+
}, null, 40, Qs),
|
|
1228
1185
|
e.search.query ? (E(), I("button", {
|
|
1229
1186
|
key: 0,
|
|
1230
1187
|
class: "mrp-nav mrp-search-clear mrp-icon-button",
|
|
@@ -1236,8 +1193,8 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1236
1193
|
name: "close",
|
|
1237
1194
|
size: 13
|
|
1238
1195
|
})
|
|
1239
|
-
], 8,
|
|
1240
|
-
e.search.query ? (E(), I("span",
|
|
1196
|
+
], 8, _s)) : j("", !0),
|
|
1197
|
+
e.search.query ? (E(), I("span", eo, x(e.search.searching ? e.messages.searching ?? "搜索中…" : c()), 1)) : j("", !0),
|
|
1241
1198
|
b("button", {
|
|
1242
1199
|
class: "mrp-nav mrp-icon-button",
|
|
1243
1200
|
type: "button",
|
|
@@ -1249,7 +1206,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1249
1206
|
name: "chevron-up",
|
|
1250
1207
|
size: 14
|
|
1251
1208
|
})
|
|
1252
|
-
], 8,
|
|
1209
|
+
], 8, to),
|
|
1253
1210
|
b("button", {
|
|
1254
1211
|
class: "mrp-nav mrp-icon-button",
|
|
1255
1212
|
type: "button",
|
|
@@ -1261,7 +1218,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1261
1218
|
name: "chevron-down",
|
|
1262
1219
|
size: 14
|
|
1263
1220
|
})
|
|
1264
|
-
], 8,
|
|
1221
|
+
], 8, no),
|
|
1265
1222
|
b("button", {
|
|
1266
1223
|
class: "mrp-nav mrp-search-close mrp-icon-button",
|
|
1267
1224
|
type: "button",
|
|
@@ -1273,28 +1230,28 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1273
1230
|
name: "close",
|
|
1274
1231
|
size: 14
|
|
1275
1232
|
})
|
|
1276
|
-
], 8,
|
|
1233
|
+
], 8, ao)
|
|
1277
1234
|
], 2),
|
|
1278
|
-
b("span",
|
|
1279
|
-
], 8,
|
|
1280
|
-
], 8,
|
|
1235
|
+
b("span", so, x(e.search.query && !e.search.searching && !e.search.matchCount ? e.messages.searchNoMatches ?? "没有匹配内容" : e.messages.searchHint ?? "Enter 下一个 · Shift+Enter 上一个"), 1)
|
|
1236
|
+
], 8, Xs)) : j("", !0)
|
|
1237
|
+
], 8, zs));
|
|
1281
1238
|
}
|
|
1282
|
-
}),
|
|
1239
|
+
}), ro = /* @__PURE__ */ ye(oo, [["__scopeId", "data-v-5f4b04d8"]]), lo = ["aria-label", "aria-busy"], io = { class: "mrp-calculation-heading" }, uo = { class: "mrp-calculation-controls" }, co = ["aria-label", "value", "disabled"], fo = ["value"], mo = { class: "mrp-calculation-precision" }, go = ["aria-label", "value", "disabled"], po = {
|
|
1283
1240
|
key: 0,
|
|
1284
1241
|
class: "mrp-calculation-expression"
|
|
1285
|
-
},
|
|
1242
|
+
}, vo = ["aria-label", "value", "disabled"], ho = { class: "mrp-calculation-actions" }, bo = {
|
|
1286
1243
|
key: 1,
|
|
1287
1244
|
class: "mrp-calculation-diagnostic",
|
|
1288
1245
|
role: "alert"
|
|
1289
|
-
},
|
|
1246
|
+
}, yo = {
|
|
1290
1247
|
key: 2,
|
|
1291
1248
|
class: "mrp-calculation-result",
|
|
1292
1249
|
role: "status",
|
|
1293
1250
|
"aria-live": "polite"
|
|
1294
|
-
},
|
|
1251
|
+
}, wo = { key: 0 }, xo = {
|
|
1295
1252
|
key: 3,
|
|
1296
1253
|
class: "mrp-calculation-empty"
|
|
1297
|
-
},
|
|
1254
|
+
}, ko = { class: "mrp-calculation-local" }, Eo = /* @__PURE__ */ be({
|
|
1298
1255
|
__name: "ReportCalculationPanel",
|
|
1299
1256
|
props: {
|
|
1300
1257
|
state: {},
|
|
@@ -1320,7 +1277,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1320
1277
|
"aria-label": e.messages.calculationTitle,
|
|
1321
1278
|
"aria-busy": e.state.busy.value
|
|
1322
1279
|
}, [
|
|
1323
|
-
b("header",
|
|
1280
|
+
b("header", io, [
|
|
1324
1281
|
r[5] || (r[5] = b("span", {
|
|
1325
1282
|
class: "mrp-calculation-symbol",
|
|
1326
1283
|
"aria-hidden": "true"
|
|
@@ -1330,7 +1287,7 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1330
1287
|
b("p", null, x(e.messages.calculationHint), 1)
|
|
1331
1288
|
])
|
|
1332
1289
|
]),
|
|
1333
|
-
b("div",
|
|
1290
|
+
b("div", uo, [
|
|
1334
1291
|
b("label", null, [
|
|
1335
1292
|
b("span", null, x(e.messages.calculationFormula), 1),
|
|
1336
1293
|
b("select", {
|
|
@@ -1342,10 +1299,10 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1342
1299
|
(E(!0), I(fe, null, me(a.value, ([l, c]) => (E(), I("option", {
|
|
1343
1300
|
key: l,
|
|
1344
1301
|
value: l
|
|
1345
|
-
}, x(c), 9,
|
|
1346
|
-
], 40,
|
|
1302
|
+
}, x(c), 9, fo))), 128))
|
|
1303
|
+
], 40, co)
|
|
1347
1304
|
]),
|
|
1348
|
-
b("label",
|
|
1305
|
+
b("label", mo, [
|
|
1349
1306
|
b("span", null, x(e.messages.calculationPrecision), 1),
|
|
1350
1307
|
b("input", {
|
|
1351
1308
|
"aria-label": e.messages.calculationPrecision,
|
|
@@ -1356,10 +1313,10 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1356
1313
|
max: "12",
|
|
1357
1314
|
step: "1",
|
|
1358
1315
|
disabled: e.state.busy.value
|
|
1359
|
-
}, null, 40,
|
|
1316
|
+
}, null, 40, go)
|
|
1360
1317
|
])
|
|
1361
1318
|
]),
|
|
1362
|
-
e.state.operation.value === "expression" ? (E(), I("label",
|
|
1319
|
+
e.state.operation.value === "expression" ? (E(), I("label", po, [
|
|
1363
1320
|
b("span", null, x(e.messages.calculationExpression), 1),
|
|
1364
1321
|
b("input", {
|
|
1365
1322
|
"aria-label": e.messages.calculationExpression,
|
|
@@ -1371,10 +1328,10 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1371
1328
|
spellcheck: "false",
|
|
1372
1329
|
disabled: e.state.busy.value,
|
|
1373
1330
|
placeholder: "SUM / COUNT"
|
|
1374
|
-
}, null, 40,
|
|
1331
|
+
}, null, 40, vo),
|
|
1375
1332
|
b("small", { id: n }, x(e.messages.calculationExpressionHint), 1)
|
|
1376
|
-
])) :
|
|
1377
|
-
b("div",
|
|
1333
|
+
])) : j("", !0),
|
|
1334
|
+
b("div", ho, [
|
|
1378
1335
|
e.state.busy.value ? (E(), I("button", {
|
|
1379
1336
|
key: 0,
|
|
1380
1337
|
type: "button",
|
|
@@ -1386,20 +1343,20 @@ const Cs = ["disabled", "aria-expanded"], $s = ["aria-label"], Is = ["aria-label
|
|
|
1386
1343
|
onClick: r[4] || (r[4] = (l) => e.state.run())
|
|
1387
1344
|
}, x(e.messages.calculationRun), 1))
|
|
1388
1345
|
]),
|
|
1389
|
-
s.value ? (E(), I("p",
|
|
1346
|
+
s.value ? (E(), I("p", bo, x(s.value), 1)) : e.state.result.value ? (E(), I("div", yo, [
|
|
1390
1347
|
b("span", null, x(e.messages.calculationResult), 1),
|
|
1391
1348
|
b("output", null, x(e.state.result.value.formatted), 1),
|
|
1392
1349
|
b("small", null, [
|
|
1393
1350
|
b("span", null, x(e.messages.calculationIncluded) + " " + x(e.state.result.value.numericCells), 1),
|
|
1394
1351
|
b("span", null, x(e.messages.calculationExcluded) + " " + x(e.state.result.value.excludedCells), 1)
|
|
1395
1352
|
]),
|
|
1396
|
-
e.state.result.value.numericCells === 0 ? (E(), I("p",
|
|
1397
|
-
])) : (E(), I("p",
|
|
1398
|
-
b("p",
|
|
1399
|
-
], 8,
|
|
1353
|
+
e.state.result.value.numericCells === 0 ? (E(), I("p", wo, x(e.messages.calculationEmpty), 1)) : j("", !0)
|
|
1354
|
+
])) : (E(), I("p", xo, x(e.messages.calculationNoSelection), 1)),
|
|
1355
|
+
b("p", ko, x(e.messages.calculationLocal), 1)
|
|
1356
|
+
], 8, lo));
|
|
1400
1357
|
}
|
|
1401
|
-
}),
|
|
1402
|
-
function
|
|
1358
|
+
}), Co = /* @__PURE__ */ ye(Eo, [["__scopeId", "data-v-ee359251"]]);
|
|
1359
|
+
function $o(e) {
|
|
1403
1360
|
const t = W("sum"), n = W("SUM / COUNT"), a = W(2), s = W(!1), o = le(null), r = W(null);
|
|
1404
1361
|
let l = null, c = 0;
|
|
1405
1362
|
function v() {
|
|
@@ -1415,13 +1372,13 @@ function Po(e) {
|
|
|
1415
1372
|
r.value = "selection";
|
|
1416
1373
|
return;
|
|
1417
1374
|
}
|
|
1418
|
-
const k = ++c,
|
|
1419
|
-
l =
|
|
1375
|
+
const k = ++c, R = new AbortController();
|
|
1376
|
+
l = R, s.value = !0;
|
|
1420
1377
|
try {
|
|
1421
|
-
const D = await Oa(u, i, { operation: t.value, expression: n.value, precision: a.value, signal:
|
|
1378
|
+
const D = await Oa(u, i, { operation: t.value, expression: n.value, precision: a.value, signal: R.signal });
|
|
1422
1379
|
k === c && e.plan.value === u && e.selection.value === i && e.enabled() && (o.value = D);
|
|
1423
1380
|
} catch (D) {
|
|
1424
|
-
k === c && !
|
|
1381
|
+
k === c && !R.signal.aborted && (r.value = D instanceof La ? D.code : "expression");
|
|
1425
1382
|
} finally {
|
|
1426
1383
|
k === c && (s.value = !1, l = null);
|
|
1427
1384
|
}
|
|
@@ -1438,13 +1395,13 @@ function Po(e) {
|
|
|
1438
1395
|
}
|
|
1439
1396
|
return { operation: t, expression: n, precision: a, busy: s, result: o, error: r, run: f, cancel: v, clear: h, setOperation: m, setExpression: w, setPrecision: p };
|
|
1440
1397
|
}
|
|
1441
|
-
const
|
|
1398
|
+
const Io = ["aria-label"], Po = { class: "mrp-settings-header" }, So = ["aria-label"], Ro = ["aria-label"], Mo = ["id", "aria-selected", "aria-controls", "tabindex", "onClick", "onKeydown"], To = { class: "mrp-settings-content" }, Do = ["id", "aria-labelledby", "hidden"], Ao = { key: 0 }, Fo = { class: "mrp-settings-option" }, Oo = ["checked", "disabled"], Lo = { class: "mrp-settings-option" }, zo = ["value", "disabled"], qo = ["id", "aria-labelledby", "hidden"], Bo = { key: 0 }, No = ["checked", "disabled", "onChange"], jo = {
|
|
1442
1399
|
key: 0,
|
|
1443
1400
|
class: "mrp-settings-note"
|
|
1444
|
-
},
|
|
1401
|
+
}, Ho = {
|
|
1445
1402
|
key: 1,
|
|
1446
1403
|
class: "mrp-settings-note"
|
|
1447
|
-
},
|
|
1404
|
+
}, Ko = ["id", "aria-labelledby", "hidden"], Wo = { class: "mrp-settings-intro" }, Uo = { class: "mrp-settings-option mrp-settings-feature" }, Vo = ["id"], Go = ["aria-label", "aria-describedby", "checked", "disabled"], Jo = ["disabled"], Zo = /* @__PURE__ */ be({
|
|
1448
1405
|
__name: "ReportSettings",
|
|
1449
1406
|
props: {
|
|
1450
1407
|
available: {},
|
|
@@ -1463,8 +1420,8 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1463
1420
|
{ key: "advanced", label: n.messages.settingsAdvanced ?? "高级" }
|
|
1464
1421
|
]);
|
|
1465
1422
|
function c(u, i) {
|
|
1466
|
-
const
|
|
1467
|
-
|
|
1423
|
+
const R = { ArrowRight: (i + 1) % 3, ArrowLeft: (i + 2) % 3, Home: 0, End: 2 }[u.key];
|
|
1424
|
+
R !== void 0 && (u.preventDefault(), a("section", l.value[R].key), s.value?.querySelector("#" + r + "-tab-" + l.value[R].key)?.focus());
|
|
1468
1425
|
}
|
|
1469
1426
|
const v = W(null);
|
|
1470
1427
|
let h = null;
|
|
@@ -1489,8 +1446,8 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1489
1446
|
] }
|
|
1490
1447
|
].map((u) => ({ ...u, tools: u.tools.map(([i, k]) => ({ key: i, label: k })) })));
|
|
1491
1448
|
function m(u, i) {
|
|
1492
|
-
const k = u.target,
|
|
1493
|
-
k.checked = n.enabled[i], a("change", i,
|
|
1449
|
+
const k = u.target, R = k.checked;
|
|
1450
|
+
k.checked = n.enabled[i], a("change", i, R);
|
|
1494
1451
|
}
|
|
1495
1452
|
function w(u) {
|
|
1496
1453
|
return !s.value || u.defaultPrevented ? !1 : u.target instanceof Node && s.value.contains(u.target) ? !0 : u.target instanceof Element && u.target.closest('[role="dialog"],dialog[open]') ? !1 : !Array.from(document.querySelectorAll('[aria-modal="true"],dialog[open]')).some((i) => i !== s.value && !s.value.contains(i));
|
|
@@ -1502,8 +1459,8 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1502
1459
|
return;
|
|
1503
1460
|
}
|
|
1504
1461
|
if (u.key !== "Tab") return;
|
|
1505
|
-
const i = Array.from(s.value?.querySelectorAll("a[href],button:not(:disabled),input:not(:disabled),textarea:not(:disabled),select:not(:disabled),[tabindex='0']") ?? []).filter((A) => !A.closest("[hidden]") && A.tabIndex !== -1), k = i?.[0],
|
|
1506
|
-
(!s.value?.contains(document.activeElement) || u.shiftKey && document.activeElement === k || !u.shiftKey && document.activeElement ===
|
|
1462
|
+
const i = Array.from(s.value?.querySelectorAll("a[href],button:not(:disabled),input:not(:disabled),textarea:not(:disabled),select:not(:disabled),[tabindex='0']") ?? []).filter((A) => !A.closest("[hidden]") && A.tabIndex !== -1), k = i?.[0], R = i?.[i.length - 1];
|
|
1463
|
+
(!s.value?.contains(document.activeElement) || u.shiftKey && document.activeElement === k || !u.shiftKey && document.activeElement === R) && (u.preventDefault(), u.stopPropagation(), (u.shiftKey ? R : k)?.focus());
|
|
1507
1464
|
}
|
|
1508
1465
|
return bt(() => {
|
|
1509
1466
|
const u = s.value?.closest(".mach-report-preview")?.querySelector(".mrp-settings-toggle"), i = document.activeElement;
|
|
@@ -1522,7 +1479,7 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1522
1479
|
"aria-modal": "true",
|
|
1523
1480
|
"aria-label": e.messages.settings
|
|
1524
1481
|
}, [
|
|
1525
|
-
b("header",
|
|
1482
|
+
b("header", Po, [
|
|
1526
1483
|
b("div", null, [
|
|
1527
1484
|
i[6] || (i[6] = b("span", { class: "mrp-settings-eyebrow" }, "MACH REPORT", -1)),
|
|
1528
1485
|
b("strong", null, x(e.messages.settings), 1),
|
|
@@ -1550,14 +1507,14 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1550
1507
|
"stroke-linecap": "round"
|
|
1551
1508
|
})
|
|
1552
1509
|
], -1)
|
|
1553
|
-
])], 8,
|
|
1510
|
+
])], 8, So)
|
|
1554
1511
|
]),
|
|
1555
1512
|
b("div", {
|
|
1556
1513
|
class: "mrp-settings-tabs",
|
|
1557
1514
|
role: "tablist",
|
|
1558
1515
|
"aria-label": e.messages.settings
|
|
1559
1516
|
}, [
|
|
1560
|
-
(E(!0), I(fe, null, me(l.value, (k,
|
|
1517
|
+
(E(!0), I(fe, null, me(l.value, (k, R) => (E(), I("button", {
|
|
1561
1518
|
id: r + "-tab-" + k.key,
|
|
1562
1519
|
key: k.key,
|
|
1563
1520
|
type: "button",
|
|
@@ -1566,10 +1523,10 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1566
1523
|
"aria-controls": r + "-panel-" + k.key,
|
|
1567
1524
|
tabindex: o.value === k.key ? 0 : -1,
|
|
1568
1525
|
onClick: (D) => u.$emit("section", k.key),
|
|
1569
|
-
onKeydown: (D) => c(D,
|
|
1570
|
-
}, x(k.label), 41,
|
|
1571
|
-
], 8,
|
|
1572
|
-
b("div",
|
|
1526
|
+
onKeydown: (D) => c(D, R)
|
|
1527
|
+
}, x(k.label), 41, Mo))), 128))
|
|
1528
|
+
], 8, Ro),
|
|
1529
|
+
b("div", To, [
|
|
1573
1530
|
b("section", {
|
|
1574
1531
|
id: r + "-panel-general",
|
|
1575
1532
|
role: "tabpanel",
|
|
@@ -1577,18 +1534,18 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1577
1534
|
hidden: o.value !== "general"
|
|
1578
1535
|
}, [
|
|
1579
1536
|
at(u.$slots, "default", {}, void 0, !0),
|
|
1580
|
-
e.interaction ? (E(), I("fieldset",
|
|
1537
|
+
e.interaction ? (E(), I("fieldset", Ao, [
|
|
1581
1538
|
b("legend", null, x(e.messages.settingsPanes), 1),
|
|
1582
|
-
b("label",
|
|
1539
|
+
b("label", Fo, [
|
|
1583
1540
|
b("span", null, x(e.messages.freezeHeaders), 1),
|
|
1584
1541
|
b("input", {
|
|
1585
1542
|
type: "checkbox",
|
|
1586
1543
|
checked: e.interaction.freezeHeaders,
|
|
1587
1544
|
disabled: e.busy,
|
|
1588
1545
|
onChange: i[1] || (i[1] = (k) => u.$emit("interaction", { freezeHeaders: k.target.checked }))
|
|
1589
|
-
}, null, 40,
|
|
1546
|
+
}, null, 40, Oo)
|
|
1590
1547
|
]),
|
|
1591
|
-
b("label",
|
|
1548
|
+
b("label", Lo, [
|
|
1592
1549
|
b("span", null, x(e.messages.frozenColumns), 1),
|
|
1593
1550
|
b("input", {
|
|
1594
1551
|
class: "mrp-frozen-count",
|
|
@@ -1598,10 +1555,10 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1598
1555
|
value: e.interaction.frozenColumns ?? 0,
|
|
1599
1556
|
disabled: e.busy,
|
|
1600
1557
|
onChange: i[2] || (i[2] = (k) => u.$emit("interaction", { frozenColumns: Math.max(0, Math.min(20, Number(k.target.value) || 0)) }))
|
|
1601
|
-
}, null, 40,
|
|
1558
|
+
}, null, 40, zo)
|
|
1602
1559
|
])
|
|
1603
|
-
])) :
|
|
1604
|
-
], 8,
|
|
1560
|
+
])) : j("", !0)
|
|
1561
|
+
], 8, Do),
|
|
1605
1562
|
b("section", {
|
|
1606
1563
|
id: r + "-panel-tools",
|
|
1607
1564
|
role: "tabpanel",
|
|
@@ -1612,38 +1569,38 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1612
1569
|
key: k.label
|
|
1613
1570
|
}, [
|
|
1614
1571
|
b("legend", null, x(k.label), 1),
|
|
1615
|
-
(E(!0), I(fe, null, me(k.tools, (
|
|
1616
|
-
key:
|
|
1617
|
-
class: pe(["mrp-settings-option", { "mrp-settings-unavailable": !e.available[
|
|
1572
|
+
(E(!0), I(fe, null, me(k.tools, (R) => (E(), I("label", {
|
|
1573
|
+
key: R.key,
|
|
1574
|
+
class: pe(["mrp-settings-option", { "mrp-settings-unavailable": !e.available[R.key] }])
|
|
1618
1575
|
}, [
|
|
1619
1576
|
b("span", null, [
|
|
1620
|
-
re(x(
|
|
1621
|
-
e.available[
|
|
1577
|
+
re(x(R.label), 1),
|
|
1578
|
+
e.available[R.key] ? j("", !0) : (E(), I("small", Bo, x(e.messages.settingsUnavailable), 1))
|
|
1622
1579
|
]),
|
|
1623
1580
|
b("input", {
|
|
1624
1581
|
type: "checkbox",
|
|
1625
|
-
checked: e.enabled[
|
|
1626
|
-
disabled: e.busy || !e.available[
|
|
1627
|
-
onChange: (D) => m(D,
|
|
1628
|
-
}, null, 40,
|
|
1582
|
+
checked: e.enabled[R.key],
|
|
1583
|
+
disabled: e.busy || !e.available[R.key],
|
|
1584
|
+
onChange: (D) => m(D, R.key)
|
|
1585
|
+
}, null, 40, No)
|
|
1629
1586
|
], 2))), 128))
|
|
1630
1587
|
]))), 128)),
|
|
1631
|
-
e.available.editing ? (E(), I("p",
|
|
1632
|
-
e.available.import ? (E(), I("p",
|
|
1633
|
-
], 8,
|
|
1588
|
+
e.available.editing ? (E(), I("p", jo, x(e.persistedEditing ? e.messages.editingSaved : e.messages.editingLocal), 1)) : j("", !0),
|
|
1589
|
+
e.available.import ? (E(), I("p", Ho, x(e.messages.importLocal), 1)) : j("", !0)
|
|
1590
|
+
], 8, qo),
|
|
1634
1591
|
b("section", {
|
|
1635
1592
|
id: r + "-panel-advanced",
|
|
1636
1593
|
role: "tabpanel",
|
|
1637
1594
|
"aria-labelledby": r + "-tab-advanced",
|
|
1638
1595
|
hidden: o.value !== "advanced"
|
|
1639
1596
|
}, [
|
|
1640
|
-
b("p",
|
|
1641
|
-
b("label",
|
|
1597
|
+
b("p", Wo, x(e.messages.settingsAdvancedDescription), 1),
|
|
1598
|
+
b("label", Uo, [
|
|
1642
1599
|
b("span", null, [
|
|
1643
1600
|
re(x(e.messages.settingsCalculations), 1),
|
|
1644
1601
|
b("small", {
|
|
1645
1602
|
id: r + "-calculation-description"
|
|
1646
|
-
}, x(e.messages.settingsCalculationsDescription), 9,
|
|
1603
|
+
}, x(e.messages.settingsCalculationsDescription), 9, Vo)
|
|
1647
1604
|
]),
|
|
1648
1605
|
b("input", {
|
|
1649
1606
|
type: "checkbox",
|
|
@@ -1652,39 +1609,39 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1652
1609
|
checked: e.interaction?.calculations === !0,
|
|
1653
1610
|
disabled: e.busy,
|
|
1654
1611
|
onChange: i[3] || (i[3] = (k) => u.$emit("interaction", { calculations: k.target.checked }))
|
|
1655
|
-
}, null, 40,
|
|
1612
|
+
}, null, 40, Go)
|
|
1656
1613
|
]),
|
|
1657
|
-
e.interaction?.calculations ? at(u.$slots, "advanced", {}, void 0, !0, 0) :
|
|
1658
|
-
], 8,
|
|
1614
|
+
e.interaction?.calculations ? at(u.$slots, "advanced", {}, void 0, !0, 0) : j("", !0)
|
|
1615
|
+
], 8, Ko)
|
|
1659
1616
|
]),
|
|
1660
1617
|
b("footer", null, [
|
|
1661
1618
|
b("button", {
|
|
1662
1619
|
type: "button",
|
|
1663
1620
|
disabled: e.busy,
|
|
1664
1621
|
onClick: i[4] || (i[4] = (k) => u.$emit("reset"))
|
|
1665
|
-
}, x(e.messages.settingsReset), 9,
|
|
1622
|
+
}, x(e.messages.settingsReset), 9, Jo),
|
|
1666
1623
|
b("span", null, x(e.messages.settingsLocal), 1)
|
|
1667
1624
|
])
|
|
1668
|
-
], 8,
|
|
1625
|
+
], 8, Io)
|
|
1669
1626
|
]));
|
|
1670
1627
|
}
|
|
1671
|
-
}),
|
|
1628
|
+
}), Yo = /* @__PURE__ */ ye(Zo, [["__scopeId", "data-v-36723612"]]), Xo = {
|
|
1672
1629
|
class: "mrp-empty",
|
|
1673
1630
|
role: "status"
|
|
1674
|
-
},
|
|
1631
|
+
}, Qo = { key: 0 }, _o = /* @__PURE__ */ be({
|
|
1675
1632
|
__name: "ReportEmpty",
|
|
1676
1633
|
props: {
|
|
1677
1634
|
title: {},
|
|
1678
1635
|
description: {}
|
|
1679
1636
|
},
|
|
1680
1637
|
setup(e) {
|
|
1681
|
-
return (t, n) => (E(), I("div",
|
|
1638
|
+
return (t, n) => (E(), I("div", Xo, [
|
|
1682
1639
|
n[0] || (n[0] = Ta('<svg class="mrp-empty-art" viewBox="0 0 160 112" fill="none" aria-hidden="true" data-v-3e16b87e><ellipse cx="80" cy="100" rx="54" ry="7" fill="currentColor" opacity=".05" data-v-3e16b87e></ellipse><rect x="34" y="15" width="92" height="78" rx="9" fill="currentColor" opacity=".10" data-v-3e16b87e></rect><rect x="42" y="9" width="76" height="78" rx="7" fill="var(--mrp-toolbar-bg, #fff)" stroke="currentColor" stroke-opacity=".2" stroke-width="1.5" data-v-3e16b87e></rect><path d="M55 27H105M55 42H105M55 57H85M55 72H76M71 27V72M89 27V57" stroke="currentColor" stroke-opacity=".4" stroke-width="1.5" stroke-linecap="round" data-v-3e16b87e></path><circle cx="112" cy="76" r="16" fill="var(--mrp-toolbar-bg, #fff)" stroke="currentColor" stroke-opacity=".35" stroke-width="2" data-v-3e16b87e></circle><path d="M124 88L137 101M106 76H118" stroke="currentColor" stroke-opacity=".45" stroke-width="3" stroke-linecap="round" data-v-3e16b87e></path><circle cx="27" cy="38" r="3" fill="currentColor" opacity=".12" data-v-3e16b87e></circle><circle cx="132" cy="24" r="2" fill="currentColor" opacity=".2" data-v-3e16b87e></circle></svg>', 1)),
|
|
1683
1640
|
b("strong", null, x(e.title), 1),
|
|
1684
|
-
e.description ? (E(), I("p",
|
|
1641
|
+
e.description ? (E(), I("p", Qo, x(e.description), 1)) : j("", !0)
|
|
1685
1642
|
]));
|
|
1686
1643
|
}
|
|
1687
|
-
}),
|
|
1644
|
+
}), Rn = /* @__PURE__ */ ye(_o, [["__scopeId", "data-v-3e16b87e"]]), er = ["aria-label"], tr = /* @__PURE__ */ be({
|
|
1688
1645
|
__name: "ReportDiscardDialog",
|
|
1689
1646
|
props: {
|
|
1690
1647
|
messages: {}
|
|
@@ -1727,15 +1684,15 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1727
1684
|
onClick: c[1] || (c[1] = (v) => n("answer", !0))
|
|
1728
1685
|
}, x(e.messages.discardProceed), 513)
|
|
1729
1686
|
])
|
|
1730
|
-
], 8,
|
|
1687
|
+
], 8, er)
|
|
1731
1688
|
], 32));
|
|
1732
1689
|
}
|
|
1733
|
-
}),
|
|
1690
|
+
}), nr = /* @__PURE__ */ ye(tr, [["__scopeId", "data-v-f7590294"]]), ar = {
|
|
1734
1691
|
key: 0,
|
|
1735
1692
|
class: "mrp-task-status",
|
|
1736
1693
|
role: "status",
|
|
1737
1694
|
"aria-live": "polite"
|
|
1738
|
-
},
|
|
1695
|
+
}, sr = { key: 0 }, or = ["value", "max", "aria-label"], rr = /* @__PURE__ */ be({
|
|
1739
1696
|
__name: "ReportTaskStatus",
|
|
1740
1697
|
props: {
|
|
1741
1698
|
task: {},
|
|
@@ -1744,28 +1701,28 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1744
1701
|
emits: ["cancel"],
|
|
1745
1702
|
setup(e) {
|
|
1746
1703
|
const t = e, n = F(() => ({ query: t.messages.taskQuery, validate: t.messages.taskValidate, layout: t.messages.taskLayout, assets: t.messages.taskAssets, import: t.messages.importing, encode: t.messages.taskEncode, download: t.messages.taskDownload, print: t.messages.taskPrint })), a = F(() => t.task?.total === void 0 ? "" : `${t.task.completed ?? 0} / ${t.task.total}`);
|
|
1747
|
-
return (s, o) => e.task && (e.task.status === "running" || e.task.status === "cancelled") ? (E(), I("div",
|
|
1704
|
+
return (s, o) => e.task && (e.task.status === "running" || e.task.status === "cancelled") ? (E(), I("div", ar, [
|
|
1748
1705
|
b("span", null, [
|
|
1749
1706
|
re(x(e.task.status === "cancelled" ? e.messages.taskCancelled : n.value[e.task.stage]) + " ", 1),
|
|
1750
|
-
e.task.status === "running" ? (E(), I("small",
|
|
1707
|
+
e.task.status === "running" ? (E(), I("small", sr, x(a.value), 1)) : j("", !0)
|
|
1751
1708
|
]),
|
|
1752
1709
|
e.task.status === "running" && e.task.total !== void 0 ? (E(), I("progress", {
|
|
1753
1710
|
key: 0,
|
|
1754
1711
|
value: e.task.completed ?? 0,
|
|
1755
1712
|
max: e.task.total,
|
|
1756
1713
|
"aria-label": n.value[e.task.stage]
|
|
1757
|
-
}, null, 8,
|
|
1714
|
+
}, null, 8, or)) : j("", !0),
|
|
1758
1715
|
e.task.status === "running" && e.task.cancellable ? (E(), I("button", {
|
|
1759
1716
|
key: 1,
|
|
1760
1717
|
type: "button",
|
|
1761
1718
|
onClick: o[0] || (o[0] = (r) => s.$emit("cancel"))
|
|
1762
|
-
}, x(e.messages.taskCancel), 1)) :
|
|
1763
|
-
])) :
|
|
1719
|
+
}, x(e.messages.taskCancel), 1)) : j("", !0)
|
|
1720
|
+
])) : j("", !0);
|
|
1764
1721
|
}
|
|
1765
|
-
}),
|
|
1722
|
+
}), lr = /* @__PURE__ */ ye(rr, [["__scopeId", "data-v-657ac599"]]), ir = {
|
|
1766
1723
|
key: 0,
|
|
1767
1724
|
class: "mrp-diagnostics"
|
|
1768
|
-
},
|
|
1725
|
+
}, ur = ["aria-label", "placeholder"], cr = { key: 0 }, dr = ["onClick"], fr = { key: 0 }, mr = /* @__PURE__ */ be({
|
|
1769
1726
|
__name: "ReportDiagnostics",
|
|
1770
1727
|
props: {
|
|
1771
1728
|
entries: {},
|
|
@@ -1791,7 +1748,7 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1791
1748
|
function r(l) {
|
|
1792
1749
|
return l.pageIndex === void 0 ? l.path ?? "" : (t.messages.diagnosticsLocation ?? "").replace("{page}", String(l.pageIndex + 1)).replace("{component}", String((l.componentIndex ?? 0) + 1));
|
|
1793
1750
|
}
|
|
1794
|
-
return (l, c) => e.entries.length ? (E(), I("details",
|
|
1751
|
+
return (l, c) => e.entries.length ? (E(), I("details", ir, [
|
|
1795
1752
|
b("summary", null, [
|
|
1796
1753
|
re(x(e.messages.diagnosticsTitle) + " ", 1),
|
|
1797
1754
|
b("span", null, x(e.entries.length), 1)
|
|
@@ -1801,7 +1758,7 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1801
1758
|
type: "search",
|
|
1802
1759
|
"aria-label": e.messages.diagnosticsSearch,
|
|
1803
1760
|
placeholder: e.messages.diagnosticsSearch
|
|
1804
|
-
}, null, 8,
|
|
1761
|
+
}, null, 8, ur), [
|
|
1805
1762
|
[Yt, n.value]
|
|
1806
1763
|
]),
|
|
1807
1764
|
b("ol", null, [
|
|
@@ -1809,32 +1766,32 @@ const So = ["aria-label"], Mo = { class: "mrp-settings-header" }, Ro = ["aria-la
|
|
|
1809
1766
|
b("div", null, [
|
|
1810
1767
|
b("b", null, x(v.format?.toUpperCase() ?? v.severity) + " · " + x(v.code), 1),
|
|
1811
1768
|
b("p", null, x(a.value[v.code] ?? v.message), 1),
|
|
1812
|
-
a.value[v.code] ? (E(), I("details",
|
|
1769
|
+
a.value[v.code] ? (E(), I("details", cr, [
|
|
1813
1770
|
b("summary", null, x(e.messages.diagnosticsDetails), 1),
|
|
1814
1771
|
re(x(v.message), 1)
|
|
1815
|
-
])) :
|
|
1772
|
+
])) : j("", !0),
|
|
1816
1773
|
b("small", null, x(r(v)), 1)
|
|
1817
1774
|
]),
|
|
1818
1775
|
v.pageIndex !== void 0 ? (E(), I("button", {
|
|
1819
1776
|
key: 0,
|
|
1820
1777
|
type: "button",
|
|
1821
1778
|
onClick: (f) => l.$emit("locate", v)
|
|
1822
|
-
}, x(e.messages.diagnosticsLocate), 9,
|
|
1779
|
+
}, x(e.messages.diagnosticsLocate), 9, dr)) : j("", !0)
|
|
1823
1780
|
]))), 128))
|
|
1824
1781
|
]),
|
|
1825
|
-
s.value.length > o.value.length ? (E(), I("small",
|
|
1826
|
-
])) :
|
|
1782
|
+
s.value.length > o.value.length ? (E(), I("small", fr, x((e.messages.diagnosticsMore ?? "").replace("{count}", String(s.value.length))), 1)) : j("", !0)
|
|
1783
|
+
])) : j("", !0);
|
|
1827
1784
|
}
|
|
1828
|
-
}),
|
|
1785
|
+
}), gr = /* @__PURE__ */ ye(mr, [["__scopeId", "data-v-3b7804ce"]]);
|
|
1829
1786
|
class ke extends Error {
|
|
1830
1787
|
constructor(t, n, a) {
|
|
1831
1788
|
super(n), this.name = "MachReportError", this.code = t, this.cause = a;
|
|
1832
1789
|
}
|
|
1833
1790
|
}
|
|
1834
|
-
function
|
|
1791
|
+
function pr(e) {
|
|
1835
1792
|
return e instanceof ke ? { code: e.code, cause: e.cause } : { code: "render", cause: e };
|
|
1836
1793
|
}
|
|
1837
|
-
function
|
|
1794
|
+
function vr(e) {
|
|
1838
1795
|
if (e instanceof ke) return e;
|
|
1839
1796
|
if (e instanceof za) return new ke("param", e.message, e);
|
|
1840
1797
|
if (e instanceof qa) return new ke(e.code, e.message, e.cause);
|
|
@@ -1844,7 +1801,7 @@ function br(e) {
|
|
|
1844
1801
|
}
|
|
1845
1802
|
return new ke("fetch", e instanceof Error ? e.message : "预览加载失败", e);
|
|
1846
1803
|
}
|
|
1847
|
-
const
|
|
1804
|
+
const Mn = /* @__PURE__ */ new Map(), Ue = /* @__PURE__ */ new Map(), hr = 15e3;
|
|
1848
1805
|
function Ut(e, t) {
|
|
1849
1806
|
return Object.assign(new Error(e), { cause: t });
|
|
1850
1807
|
}
|
|
@@ -1856,11 +1813,11 @@ function ht(e) {
|
|
|
1856
1813
|
const t = Ut("PDF 字体检查已取消", e?.reason);
|
|
1857
1814
|
return t.name = "AbortError", t;
|
|
1858
1815
|
}
|
|
1859
|
-
async function
|
|
1816
|
+
async function br(e, t) {
|
|
1860
1817
|
let n = !1;
|
|
1861
1818
|
const a = setTimeout(() => {
|
|
1862
1819
|
n = !0, t.abort();
|
|
1863
|
-
},
|
|
1820
|
+
}, hr);
|
|
1864
1821
|
try {
|
|
1865
1822
|
const s = await fetch(e, { method: "HEAD", signal: t.signal });
|
|
1866
1823
|
if (t.signal.aborted) throw ht(t.signal);
|
|
@@ -1900,18 +1857,18 @@ async function wr(e, t) {
|
|
|
1900
1857
|
clearTimeout(a);
|
|
1901
1858
|
}
|
|
1902
1859
|
}
|
|
1903
|
-
function
|
|
1860
|
+
function yr(e, t) {
|
|
1904
1861
|
if (t?.aborted) return Promise.reject(ht(t));
|
|
1905
1862
|
if (!e)
|
|
1906
1863
|
return Promise.resolve({ status: "disabled", fontUrl: e, message: "已停用自定义 PDF 字体;内置字体用于西文,其他文字会在导出时校验" });
|
|
1907
|
-
const n =
|
|
1864
|
+
const n = Mn.get(e);
|
|
1908
1865
|
if (n) return Promise.resolve(n);
|
|
1909
1866
|
let a = Ue.get(e);
|
|
1910
1867
|
if (!a) {
|
|
1911
1868
|
const o = new AbortController();
|
|
1912
|
-
a = { controller: o, promise:
|
|
1869
|
+
a = { controller: o, promise: br(e, o), subscribers: 0 };
|
|
1913
1870
|
const r = a;
|
|
1914
|
-
Ue.set(e, r), r.promise = r.promise.then((l) => (!o.signal.aborted && l.status === "available" &&
|
|
1871
|
+
Ue.set(e, r), r.promise = r.promise.then((l) => (!o.signal.aborted && l.status === "available" && Mn.set(e, l), l)).finally(() => {
|
|
1915
1872
|
Ue.get(e) === r && Ue.delete(e);
|
|
1916
1873
|
});
|
|
1917
1874
|
}
|
|
@@ -1931,7 +1888,7 @@ function xr(e, t) {
|
|
|
1931
1888
|
), t?.aborted && v();
|
|
1932
1889
|
});
|
|
1933
1890
|
}
|
|
1934
|
-
function
|
|
1891
|
+
function wr(e = { fontUrl: "/simhei.ttf" }) {
|
|
1935
1892
|
let t = null;
|
|
1936
1893
|
const n = async (a, s, o = {}) => {
|
|
1937
1894
|
Ae(o.signal), t || (t = await import("@agile-team/mach-report/pdf")), Ae(o.signal);
|
|
@@ -1964,15 +1921,15 @@ function kr(e = { fontUrl: "/simhei.ttf" }) {
|
|
|
1964
1921
|
throw new Error(`PDF 有 ${h.length} 页渲染失败:${h[0]}`);
|
|
1965
1922
|
return f.length > 0 && s?.(`PDF 有 ${f.length} 处版式降级:${f.slice(0, 2).join(";")}`), c;
|
|
1966
1923
|
};
|
|
1967
|
-
return n.checkFont = (a) =>
|
|
1924
|
+
return n.checkFont = (a) => yr(e.fontUrl, a), n;
|
|
1968
1925
|
}
|
|
1969
|
-
function
|
|
1926
|
+
function xr(e) {
|
|
1970
1927
|
const t = le(Object.freeze({ status: "unchecked", fontUrl: "" }));
|
|
1971
1928
|
let n = null, a = null, s = 0, o = null;
|
|
1972
1929
|
function r() {
|
|
1973
1930
|
if (e.injectedExporter) return e.injectedExporter;
|
|
1974
1931
|
const h = e.fontUrl();
|
|
1975
|
-
return (!a || n !== h) && (n = h, a =
|
|
1932
|
+
return (!a || n !== h) && (n = h, a = wr({ fontUrl: h })), a;
|
|
1976
1933
|
}
|
|
1977
1934
|
function l() {
|
|
1978
1935
|
s++, o?.abort(), o = null;
|
|
@@ -2004,7 +1961,7 @@ function Er(e) {
|
|
|
2004
1961
|
h && t.value.status === "available" || (l(), (!h || t.value.status === "checking") && (t.value = Object.freeze({ status: "unchecked", fontUrl: e.fontUrl() })), !e.destroyed() && e.plan.value?.pages.length && e.enabled() && v());
|
|
2005
1962
|
}, { immediate: !0 }), { pdfFont: t, getPdfExporter: r, checkPdfFont: c, retryPdfFont: v, cancelFontCheck: l };
|
|
2006
1963
|
}
|
|
2007
|
-
function
|
|
1964
|
+
function kr(e) {
|
|
2008
1965
|
const t = le(null), n = le(!1);
|
|
2009
1966
|
let a = 0, s = null;
|
|
2010
1967
|
function o(c) {
|
|
@@ -2051,8 +2008,8 @@ function Cr(e) {
|
|
|
2051
2008
|
}
|
|
2052
2009
|
return { request: t, pending: n, check: l, settle: o, cancel: r };
|
|
2053
2010
|
}
|
|
2054
|
-
let
|
|
2055
|
-
function
|
|
2011
|
+
let Er = 0;
|
|
2012
|
+
function Cr(e) {
|
|
2056
2013
|
const t = le(null), n = /* @__PURE__ */ new Set();
|
|
2057
2014
|
let a = null;
|
|
2058
2015
|
function s(c) {
|
|
@@ -2063,7 +2020,7 @@ function Ir(e) {
|
|
|
2063
2020
|
}
|
|
2064
2021
|
}
|
|
2065
2022
|
function o(c, v, h) {
|
|
2066
|
-
const f = `mr-task-${Date.now().toString(36)}-${
|
|
2023
|
+
const f = `mr-task-${Date.now().toString(36)}-${++Er}`;
|
|
2067
2024
|
n.add(f), a = h, s({ taskId: f, kind: c, stage: v, status: "running", cancellable: !0 });
|
|
2068
2025
|
function m(p, u, i) {
|
|
2069
2026
|
t.value?.taskId !== f || t.value.status !== "running" || s({ ...t.value, stage: p, completed: u, total: i });
|
|
@@ -2083,7 +2040,7 @@ function Ir(e) {
|
|
|
2083
2040
|
}
|
|
2084
2041
|
return { state: t, start: o, cancel: r, receive: l };
|
|
2085
2042
|
}
|
|
2086
|
-
function
|
|
2043
|
+
function $r(e) {
|
|
2087
2044
|
const t = le(Object.freeze([])), n = /* @__PURE__ */ new Set();
|
|
2088
2045
|
let a = 0;
|
|
2089
2046
|
function s() {
|
|
@@ -2116,15 +2073,15 @@ function Pr(e) {
|
|
|
2116
2073
|
}
|
|
2117
2074
|
return { entries: t, reset: s, add: r, addMany: o, inspect: l };
|
|
2118
2075
|
}
|
|
2119
|
-
let
|
|
2120
|
-
function
|
|
2121
|
-
return `mrp-params-${++
|
|
2076
|
+
let Ir = 0;
|
|
2077
|
+
function Pr() {
|
|
2078
|
+
return `mrp-params-${++Ir}`;
|
|
2122
2079
|
}
|
|
2123
2080
|
function Vn(e, t, n) {
|
|
2124
2081
|
const a = (Array.isArray(t) ? t.find((s) => s?.field === e.field)?.label : void 0) ?? e.field;
|
|
2125
2082
|
return e.code === "required" ? n.paramRequired.replace("{label}", a) : (n.paramInvalid ?? "{label}:{message}").replace("{label}", a).replace("{message}", e.message);
|
|
2126
2083
|
}
|
|
2127
|
-
function
|
|
2084
|
+
function Sr(e) {
|
|
2128
2085
|
const t = W({}), n = W(!1);
|
|
2129
2086
|
function a() {
|
|
2130
2087
|
const l = {};
|
|
@@ -2146,10 +2103,10 @@ function Rr(e) {
|
|
|
2146
2103
|
}
|
|
2147
2104
|
return { values: t, attempted: n, validation: s, pendingRequired: o, reset: a, query: r };
|
|
2148
2105
|
}
|
|
2149
|
-
const
|
|
2106
|
+
const Rr = { class: "mrp-params-title" }, Mr = { class: "mrp-params-grid" }, Tr = ["id"], Dr = {
|
|
2150
2107
|
key: 0,
|
|
2151
2108
|
class: "mrp-param-star"
|
|
2152
|
-
},
|
|
2109
|
+
}, Ar = ["value", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onChange"], Fr = ["disabled", "hidden"], Or = ["value"], Lr = ["type", "placeholder", "value", "min", "max", "step", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onInput"], zr = ["id"], qr = { class: "mrp-params-actions" }, Br = /* @__PURE__ */ be({
|
|
2153
2110
|
__name: "ReportParamPanel",
|
|
2154
2111
|
props: {
|
|
2155
2112
|
defs: {},
|
|
@@ -2160,7 +2117,7 @@ const Tr = { class: "mrp-params-title" }, Dr = { class: "mrp-params-grid" }, Ar
|
|
|
2160
2117
|
},
|
|
2161
2118
|
emits: ["update:modelValue", "query", "reset"],
|
|
2162
2119
|
setup(e, { expose: t, emit: n }) {
|
|
2163
|
-
const a = e, s = n, o = W({ ...a.modelValue }), r = W(null), l =
|
|
2120
|
+
const a = e, s = n, o = W({ ...a.modelValue }), r = W(null), l = Pr();
|
|
2164
2121
|
oe(
|
|
2165
2122
|
() => a.modelValue,
|
|
2166
2123
|
(w) => {
|
|
@@ -2190,8 +2147,8 @@ const Tr = { class: "mrp-params-title" }, Dr = { class: "mrp-params-grid" }, Ar
|
|
|
2190
2147
|
ref: r,
|
|
2191
2148
|
class: "mrp-params"
|
|
2192
2149
|
}, [
|
|
2193
|
-
b("span",
|
|
2194
|
-
b("div",
|
|
2150
|
+
b("span", Rr, x(e.messages.paramsTitle), 1),
|
|
2151
|
+
b("div", Mr, [
|
|
2195
2152
|
(E(!0), I(fe, null, me(v.value, (u) => (E(), I("label", {
|
|
2196
2153
|
key: u.id,
|
|
2197
2154
|
class: pe(["mrp-param", { "mrp-param-missing": !!u.error }])
|
|
@@ -2201,8 +2158,8 @@ const Tr = { class: "mrp-params-title" }, Dr = { class: "mrp-params-grid" }, Ar
|
|
|
2201
2158
|
class: "mrp-param-label"
|
|
2202
2159
|
}, [
|
|
2203
2160
|
re(x(u.label), 1),
|
|
2204
|
-
u.def.required ? (E(), I("i",
|
|
2205
|
-
], 8,
|
|
2161
|
+
u.def.required ? (E(), I("i", Dr, "*")) : j("", !0)
|
|
2162
|
+
], 8, Tr),
|
|
2206
2163
|
(u.def.type ?? "text") === "select" ? (E(), I("select", {
|
|
2207
2164
|
key: 0,
|
|
2208
2165
|
class: "mrp-param-input",
|
|
@@ -2212,18 +2169,18 @@ const Tr = { class: "mrp-params-title" }, Dr = { class: "mrp-params-grid" }, Ar
|
|
|
2212
2169
|
"aria-describedby": u.error ? `${u.id}-error` : void 0,
|
|
2213
2170
|
"aria-required": u.def.required || void 0,
|
|
2214
2171
|
onChange: (i) => h(u.def.field, i.target.value),
|
|
2215
|
-
onKeydown:
|
|
2172
|
+
onKeydown: Ht(f, ["enter"])
|
|
2216
2173
|
}, [
|
|
2217
2174
|
b("option", {
|
|
2218
2175
|
value: "",
|
|
2219
2176
|
disabled: u.def.required,
|
|
2220
2177
|
hidden: u.def.required
|
|
2221
|
-
}, x(u.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", u.label)), 9,
|
|
2178
|
+
}, x(u.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", u.label)), 9, Fr),
|
|
2222
2179
|
(E(!0), I(fe, null, me(u.def.options ?? [], (i) => (E(), I("option", {
|
|
2223
2180
|
key: i.value,
|
|
2224
2181
|
value: i.value
|
|
2225
|
-
}, x(i.label), 9,
|
|
2226
|
-
], 40,
|
|
2182
|
+
}, x(i.label), 9, Or))), 128))
|
|
2183
|
+
], 40, Ar)) : (E(), I("input", {
|
|
2227
2184
|
key: 1,
|
|
2228
2185
|
class: "mrp-param-input",
|
|
2229
2186
|
type: u.def.type === "number" ? "number" : u.def.type === "date" ? "date" : "text",
|
|
@@ -2237,17 +2194,17 @@ const Tr = { class: "mrp-params-title" }, Dr = { class: "mrp-params-grid" }, Ar
|
|
|
2237
2194
|
"aria-describedby": u.error ? `${u.id}-error` : void 0,
|
|
2238
2195
|
"aria-required": u.def.required || void 0,
|
|
2239
2196
|
onInput: (i) => h(u.def.field, i.target.value),
|
|
2240
|
-
onKeydown:
|
|
2241
|
-
}, null, 40,
|
|
2197
|
+
onKeydown: Ht(f, ["enter"])
|
|
2198
|
+
}, null, 40, Lr)),
|
|
2242
2199
|
u.error ? (E(), I("small", {
|
|
2243
2200
|
key: 2,
|
|
2244
2201
|
id: `${u.id}-error`,
|
|
2245
2202
|
class: "mrp-param-error",
|
|
2246
2203
|
role: "status"
|
|
2247
|
-
}, x(d(Vn)(u.error, e.defs, e.messages)), 9,
|
|
2204
|
+
}, x(d(Vn)(u.error, e.defs, e.messages)), 9, zr)) : j("", !0)
|
|
2248
2205
|
], 2))), 128))
|
|
2249
2206
|
]),
|
|
2250
|
-
b("div",
|
|
2207
|
+
b("div", qr, [
|
|
2251
2208
|
b("button", {
|
|
2252
2209
|
class: "mrp-nav mrp-param-query",
|
|
2253
2210
|
type: "button",
|
|
@@ -2261,17 +2218,17 @@ const Tr = { class: "mrp-params-title" }, Dr = { class: "mrp-params-grid" }, Ar
|
|
|
2261
2218
|
])
|
|
2262
2219
|
], 512));
|
|
2263
2220
|
}
|
|
2264
|
-
}),
|
|
2221
|
+
}), Nr = /* @__PURE__ */ ye(Br, [["__scopeId", "data-v-156737bc"]]), jr = { class: "mrp-edit-bar" }, Hr = ["disabled"], Kr = ["disabled"], Wr = { class: "mrp-changes" }, Ur = ["aria-label"], Vr = { key: 0 }, Gr = { key: 1 }, Jr = ["onClick"], Zr = ["title"], Yr = ["title"], Xr = ["disabled"], Qr = {
|
|
2265
2222
|
key: 0,
|
|
2266
2223
|
role: "status"
|
|
2267
|
-
},
|
|
2224
|
+
}, _r = {
|
|
2268
2225
|
key: 1,
|
|
2269
2226
|
role: "status"
|
|
2270
|
-
},
|
|
2227
|
+
}, el = {
|
|
2271
2228
|
key: 2,
|
|
2272
2229
|
class: "mrp-conflicts",
|
|
2273
2230
|
open: ""
|
|
2274
|
-
},
|
|
2231
|
+
}, tl = /* @__PURE__ */ be({
|
|
2275
2232
|
__name: "ReportEditBar",
|
|
2276
2233
|
props: {
|
|
2277
2234
|
differences: {},
|
|
@@ -2288,57 +2245,57 @@ const Tr = { class: "mrp-params-title" }, Dr = { class: "mrp-params-grid" }, Ar
|
|
|
2288
2245
|
function t(n) {
|
|
2289
2246
|
return n.source ? `${n.source.rowKey} · ${n.source.field}` : `${n.address.pageIndex + 1} / ${n.address.rowIndex + 1}:${n.address.columnIndex + 1}`;
|
|
2290
2247
|
}
|
|
2291
|
-
return (n, a) => (E(), I("div",
|
|
2248
|
+
return (n, a) => (E(), I("div", jr, [
|
|
2292
2249
|
b("button", {
|
|
2293
2250
|
type: "button",
|
|
2294
2251
|
disabled: e.busy || e.saving || !e.canUndo,
|
|
2295
2252
|
onClick: a[0] || (a[0] = (s) => n.$emit("undo"))
|
|
2296
|
-
}, x(e.messages.undo), 9,
|
|
2253
|
+
}, x(e.messages.undo), 9, Hr),
|
|
2297
2254
|
b("button", {
|
|
2298
2255
|
type: "button",
|
|
2299
2256
|
disabled: e.busy || e.saving || !e.canRedo,
|
|
2300
2257
|
onClick: a[1] || (a[1] = (s) => n.$emit("redo"))
|
|
2301
|
-
}, x(e.messages.redo), 9,
|
|
2302
|
-
b("details",
|
|
2258
|
+
}, x(e.messages.redo), 9, Kr),
|
|
2259
|
+
b("details", Wr, [
|
|
2303
2260
|
b("summary", null, x(e.messages.changes) + " · " + x(e.messages.changesCount?.replace("{count}", String(e.differences.length))), 1),
|
|
2304
2261
|
b("section", {
|
|
2305
2262
|
"aria-label": e.messages.changes
|
|
2306
2263
|
}, [
|
|
2307
|
-
e.differences.length ? (E(), I("ol",
|
|
2264
|
+
e.differences.length ? (E(), I("ol", Gr, [
|
|
2308
2265
|
(E(!0), I(fe, null, me(e.differences, (s, o) => (E(), I("li", { key: o }, [
|
|
2309
2266
|
b("button", {
|
|
2310
2267
|
type: "button",
|
|
2311
2268
|
onClick: (r) => n.$emit("locate", s)
|
|
2312
|
-
}, x(t(s)), 9,
|
|
2269
|
+
}, x(t(s)), 9, Jr),
|
|
2313
2270
|
b("span", null, [
|
|
2314
2271
|
b("s", {
|
|
2315
2272
|
title: e.messages.changesBefore
|
|
2316
|
-
}, x(s.previousText || "∅"), 9,
|
|
2273
|
+
}, x(s.previousText || "∅"), 9, Zr),
|
|
2317
2274
|
a[3] || (a[3] = re(" → ", -1)),
|
|
2318
2275
|
b("strong", {
|
|
2319
2276
|
title: e.messages.changesAfter
|
|
2320
|
-
}, x(s.text || "∅"), 9,
|
|
2277
|
+
}, x(s.text || "∅"), 9, Yr)
|
|
2321
2278
|
])
|
|
2322
2279
|
]))), 128))
|
|
2323
|
-
])) : (E(), I("p",
|
|
2324
|
-
], 8,
|
|
2280
|
+
])) : (E(), I("p", Vr, x(e.messages.changesEmpty), 1))
|
|
2281
|
+
], 8, Ur)
|
|
2325
2282
|
]),
|
|
2326
2283
|
b("button", {
|
|
2327
2284
|
type: "button",
|
|
2328
2285
|
disabled: e.busy || e.saving || !e.differences.length,
|
|
2329
2286
|
onClick: a[2] || (a[2] = (s) => n.$emit("restore"))
|
|
2330
|
-
}, x(e.messages.restoreChanges), 9,
|
|
2331
|
-
e.saving ? (E(), I("span",
|
|
2332
|
-
e.conflicts.length ? (E(), I("details",
|
|
2287
|
+
}, x(e.messages.restoreChanges), 9, Xr),
|
|
2288
|
+
e.saving ? (E(), I("span", Qr, x(e.messages.saving), 1)) : e.differences.length && !e.conflicts.length ? (E(), I("span", _r, x(e.persisted ? e.messages.editSaved : e.messages.editingLocal), 1)) : j("", !0),
|
|
2289
|
+
e.conflicts.length ? (E(), I("details", el, [
|
|
2333
2290
|
b("summary", null, x(e.messages.conflicts) + " · " + x(e.conflicts.length), 1),
|
|
2334
2291
|
b("ul", null, [
|
|
2335
2292
|
(E(!0), I(fe, null, me(e.conflicts, (s, o) => (E(), I("li", { key: o }, x(s.message), 1))), 128))
|
|
2336
2293
|
])
|
|
2337
|
-
])) :
|
|
2294
|
+
])) : j("", !0)
|
|
2338
2295
|
]));
|
|
2339
2296
|
}
|
|
2340
|
-
}),
|
|
2341
|
-
function
|
|
2297
|
+
}), nl = /* @__PURE__ */ ye(tl, [["__scopeId", "data-v-df1c7b86"]]);
|
|
2298
|
+
function al(e) {
|
|
2342
2299
|
const t = e.table?.columnKeys ?? [], n = t.map(() => []);
|
|
2343
2300
|
if (!e.grid) return t;
|
|
2344
2301
|
for (const { ci: a, cell: s } of Nn(e.grid, e.widthMm, e.heightMm).cells) {
|
|
@@ -2349,29 +2306,29 @@ function ol(e) {
|
|
|
2349
2306
|
}
|
|
2350
2307
|
return t.map((a, s) => n[s].join(" / ") || a);
|
|
2351
2308
|
}
|
|
2352
|
-
function
|
|
2309
|
+
function sl(e, t = []) {
|
|
2353
2310
|
const n = /* @__PURE__ */ new Set(), a = [];
|
|
2354
2311
|
for (const [s, o] of (e?.pages ?? []).entries())
|
|
2355
2312
|
for (const r of o.components) {
|
|
2356
2313
|
const l = r.table;
|
|
2357
2314
|
if (!l || l.role !== "header" || n.has(l.id)) continue;
|
|
2358
2315
|
n.add(l.id);
|
|
2359
|
-
const c =
|
|
2316
|
+
const c = al(r), v = t.filter((w) => w.pageIndex <= s), h = v[v.length - 1]?.label, f = l.source?.datasetId, m = [...new Set([h, l.title, f].filter(Boolean))].join(" · ") || l.id;
|
|
2360
2317
|
l.columnKeys.forEach((w, p) => {
|
|
2361
2318
|
w && a.push({ key: JSON.stringify([l.id, p]), field: w, label: c[p], group: m, pageIndex: s, tableId: l.id, ...f ? { datasetId: f } : {} });
|
|
2362
2319
|
});
|
|
2363
2320
|
}
|
|
2364
2321
|
return a;
|
|
2365
2322
|
}
|
|
2366
|
-
function
|
|
2323
|
+
function ol(e, t) {
|
|
2367
2324
|
const n = t.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
|
|
2368
2325
|
return e.filter((a) => {
|
|
2369
2326
|
const s = `${a.label} ${a.field} ${a.group}`.toLocaleLowerCase();
|
|
2370
2327
|
return n.every((o) => s.includes(o));
|
|
2371
2328
|
});
|
|
2372
2329
|
}
|
|
2373
|
-
function
|
|
2374
|
-
const t = Wn(), n = W(""), a = W(0), s = `mrp-column-list-${Xt()?.uid ?? 0}`, o = F(() =>
|
|
2330
|
+
function rl(e) {
|
|
2331
|
+
const t = Wn(), n = W(""), a = W(0), s = `mrp-column-list-${Xt()?.uid ?? 0}`, o = F(() => sl(e.plan(), e.sections())), r = F(() => ol(o.value, n.value)), l = F(() => r.value.slice(0, 100)), c = F(() => [...new Set(l.value.map((p) => p.group))].map((p) => ({ label: p, items: l.value.filter((u) => u.group === p) })));
|
|
2375
2332
|
oe(n, () => {
|
|
2376
2333
|
a.value = 0;
|
|
2377
2334
|
}), oe(e.busy, (p) => {
|
|
@@ -2404,20 +2361,20 @@ function il(e) {
|
|
|
2404
2361
|
}
|
|
2405
2362
|
return { ...t, field: n, active: a, listId: s, directory: o, matches: r, candidates: l, groups: c, choose: v, submit: h, clear: f, onSearchKeydown: m, candidateIndex: w };
|
|
2406
2363
|
}
|
|
2407
|
-
const
|
|
2364
|
+
const ll = ["aria-label"], il = {
|
|
2408
2365
|
key: 0,
|
|
2409
2366
|
class: "mrp-section-tabs"
|
|
2410
|
-
},
|
|
2367
|
+
}, ul = ["aria-current", "disabled", "onClick"], cl = ["aria-expanded", "disabled"], dl = {
|
|
2411
2368
|
key: 0,
|
|
2412
2369
|
class: "mrp-column-count"
|
|
2413
|
-
},
|
|
2370
|
+
}, fl = ["aria-label"], ml = { class: "mrp-column-heading" }, gl = ["aria-label"], pl = ["aria-label", "placeholder", "aria-controls", "aria-activedescendant", "disabled"], vl = ["aria-label"], hl = ["id", "aria-label"], bl = {
|
|
2414
2371
|
key: 0,
|
|
2415
2372
|
class: "mrp-column-empty",
|
|
2416
2373
|
role: "status"
|
|
2417
|
-
},
|
|
2374
|
+
}, yl = ["aria-label"], wl = ["id", "aria-selected", "disabled", "onPointermove", "onClick"], xl = ["title"], kl = {
|
|
2418
2375
|
class: "mrp-column-help",
|
|
2419
2376
|
role: "status"
|
|
2420
|
-
},
|
|
2377
|
+
}, El = /* @__PURE__ */ be({
|
|
2421
2378
|
__name: "ReportNavigation",
|
|
2422
2379
|
props: {
|
|
2423
2380
|
sections: {},
|
|
@@ -2429,8 +2386,8 @@ const ul = ["aria-label"], cl = {
|
|
|
2429
2386
|
},
|
|
2430
2387
|
emits: ["goto", "locate", "locate-target"],
|
|
2431
2388
|
setup(e, { emit: t }) {
|
|
2432
|
-
const n = e, a = t, s =
|
|
2433
|
-
function
|
|
2389
|
+
const n = e, a = t, s = rl({ plan: () => n.plan, sections: () => n.sections, busy: () => n.busy, locate: (D) => a("locate-target", D), locateField: (D) => a("locate", D) }), { root: o, trigger: r, panel: l, opened: c, field: v, active: h, directory: f, matches: m, candidates: w, groups: p, listId: u } = s, i = F(() => ({ columnDirectory: "字段目录", columnSearch: "搜索列名或字段", columnNoMatches: "未找到匹配字段", columnResults: "匹配字段", ...n.messages })), k = F(() => (n.messages.columnResultsMore ?? "{count} 个匹配字段,显示前 {limit} 个;继续输入可缩小范围").replace("{count}", String(m.value.length)).replace("{limit}", String(w.value.length)));
|
|
2390
|
+
function R(D) {
|
|
2434
2391
|
const A = n.sections[D];
|
|
2435
2392
|
return !!A && n.currentPage >= A.pageIndex + 1 && (!n.sections[D + 1] || n.currentPage <= n.sections[D + 1].pageIndex);
|
|
2436
2393
|
}
|
|
@@ -2438,16 +2395,16 @@ const ul = ["aria-label"], cl = {
|
|
|
2438
2395
|
class: pe(["mrp-section-nav", { "mrp-compact": e.compact }]),
|
|
2439
2396
|
"aria-label": e.messages.sections ?? "工作表与章节"
|
|
2440
2397
|
}, [
|
|
2441
|
-
e.sections.length > 1 ? (E(), I("div",
|
|
2442
|
-
(E(!0), I(fe, null, me(e.sections, (z,
|
|
2443
|
-
key:
|
|
2398
|
+
e.sections.length > 1 ? (E(), I("div", il, [
|
|
2399
|
+
(E(!0), I(fe, null, me(e.sections, (z, H) => (E(), I("button", {
|
|
2400
|
+
key: H,
|
|
2444
2401
|
type: "button",
|
|
2445
|
-
class: pe({ active:
|
|
2446
|
-
"aria-current":
|
|
2402
|
+
class: pe({ active: R(H) }),
|
|
2403
|
+
"aria-current": R(H) ? "page" : void 0,
|
|
2447
2404
|
disabled: e.busy,
|
|
2448
2405
|
onClick: (J) => a("goto", z.pageIndex + 1)
|
|
2449
|
-
}, x(z.label), 11,
|
|
2450
|
-
])) :
|
|
2406
|
+
}, x(z.label), 11, ul))), 128))
|
|
2407
|
+
])) : j("", !0),
|
|
2451
2408
|
b("div", {
|
|
2452
2409
|
ref_key: "root",
|
|
2453
2410
|
ref: o,
|
|
@@ -2467,12 +2424,12 @@ const ul = ["aria-label"], cl = {
|
|
|
2467
2424
|
}, [
|
|
2468
2425
|
X(ee, { name: "columns" }),
|
|
2469
2426
|
b("span", null, x(i.value.columnDirectory), 1),
|
|
2470
|
-
d(f).length ? (E(), I("span",
|
|
2427
|
+
d(f).length ? (E(), I("span", dl, x(d(f).length), 1)) : j("", !0),
|
|
2471
2428
|
X(ee, {
|
|
2472
2429
|
name: "chevron-down",
|
|
2473
2430
|
size: 12
|
|
2474
2431
|
})
|
|
2475
|
-
], 10,
|
|
2432
|
+
], 10, cl),
|
|
2476
2433
|
d(c) ? (E(), I("div", {
|
|
2477
2434
|
key: 0,
|
|
2478
2435
|
ref_key: "panel",
|
|
@@ -2481,7 +2438,7 @@ const ul = ["aria-label"], cl = {
|
|
|
2481
2438
|
role: "dialog",
|
|
2482
2439
|
"aria-label": i.value.columnDirectory
|
|
2483
2440
|
}, [
|
|
2484
|
-
b("div",
|
|
2441
|
+
b("div", ml, [
|
|
2485
2442
|
b("span", null, [
|
|
2486
2443
|
X(ee, { name: "columns" }),
|
|
2487
2444
|
re(x(i.value.columnDirectory), 1)
|
|
@@ -2496,7 +2453,7 @@ const ul = ["aria-label"], cl = {
|
|
|
2496
2453
|
name: "close",
|
|
2497
2454
|
size: 15
|
|
2498
2455
|
})
|
|
2499
|
-
], 8,
|
|
2456
|
+
], 8, gl)
|
|
2500
2457
|
]),
|
|
2501
2458
|
b("form", {
|
|
2502
2459
|
class: "mrp-column-search",
|
|
@@ -2522,7 +2479,7 @@ const ul = ["aria-label"], cl = {
|
|
|
2522
2479
|
disabled: e.busy,
|
|
2523
2480
|
onKeydown: A[3] || (A[3] = //@ts-ignore
|
|
2524
2481
|
(...z) => d(s).onSearchKeydown && d(s).onSearchKeydown(...z))
|
|
2525
|
-
}, null, 40,
|
|
2482
|
+
}, null, 40, pl), [
|
|
2526
2483
|
[Yt, d(v)]
|
|
2527
2484
|
]),
|
|
2528
2485
|
d(v) ? (E(), I("button", {
|
|
@@ -2537,7 +2494,7 @@ const ul = ["aria-label"], cl = {
|
|
|
2537
2494
|
name: "close",
|
|
2538
2495
|
size: 13
|
|
2539
2496
|
})
|
|
2540
|
-
], 8,
|
|
2497
|
+
], 8, vl)) : j("", !0)
|
|
2541
2498
|
], 32),
|
|
2542
2499
|
b("div", {
|
|
2543
2500
|
id: d(u),
|
|
@@ -2545,7 +2502,7 @@ const ul = ["aria-label"], cl = {
|
|
|
2545
2502
|
role: "listbox",
|
|
2546
2503
|
"aria-label": i.value.columnResults
|
|
2547
2504
|
}, [
|
|
2548
|
-
d(w).length ?
|
|
2505
|
+
d(w).length ? j("", !0) : (E(), I("p", bl, [
|
|
2549
2506
|
X(ee, {
|
|
2550
2507
|
name: "search",
|
|
2551
2508
|
size: 22
|
|
@@ -2558,49 +2515,49 @@ const ul = ["aria-label"], cl = {
|
|
|
2558
2515
|
"aria-label": z.label
|
|
2559
2516
|
}, [
|
|
2560
2517
|
b("strong", null, x(z.label), 1),
|
|
2561
|
-
(E(!0), I(fe, null, me(z.items, (
|
|
2562
|
-
id: `${d(u)}-${d(s).candidateIndex(
|
|
2563
|
-
key:
|
|
2518
|
+
(E(!0), I(fe, null, me(z.items, (H) => (E(), I("button", {
|
|
2519
|
+
id: `${d(u)}-${d(s).candidateIndex(H.key)}`,
|
|
2520
|
+
key: H.key,
|
|
2564
2521
|
type: "button",
|
|
2565
2522
|
role: "option",
|
|
2566
2523
|
tabindex: "-1",
|
|
2567
|
-
class: pe({ "mrp-column-active": d(s).candidateIndex(
|
|
2568
|
-
"aria-selected": d(s).candidateIndex(
|
|
2524
|
+
class: pe({ "mrp-column-active": d(s).candidateIndex(H.key) === d(h) }),
|
|
2525
|
+
"aria-selected": d(s).candidateIndex(H.key) === d(h),
|
|
2569
2526
|
disabled: e.busy,
|
|
2570
|
-
onPointermove: (J) => h.value = d(s).candidateIndex(
|
|
2527
|
+
onPointermove: (J) => h.value = d(s).candidateIndex(H.key),
|
|
2571
2528
|
onMousedown: A[6] || (A[6] = nt(() => {
|
|
2572
2529
|
}, ["prevent"])),
|
|
2573
|
-
onClick: (J) => d(s).choose(
|
|
2530
|
+
onClick: (J) => d(s).choose(H)
|
|
2574
2531
|
}, [
|
|
2575
2532
|
b("span", null, [
|
|
2576
|
-
re(x(
|
|
2533
|
+
re(x(H.label), 1),
|
|
2577
2534
|
b("code", {
|
|
2578
|
-
title:
|
|
2579
|
-
}, x(
|
|
2535
|
+
title: H.field
|
|
2536
|
+
}, x(H.field), 9, xl)
|
|
2580
2537
|
]),
|
|
2581
2538
|
X(ee, {
|
|
2582
2539
|
name: "arrow-right",
|
|
2583
2540
|
size: 14
|
|
2584
2541
|
})
|
|
2585
|
-
], 42,
|
|
2586
|
-
], 8,
|
|
2587
|
-
], 8,
|
|
2588
|
-
b("p",
|
|
2589
|
-
], 8,
|
|
2542
|
+
], 42, wl))), 128))
|
|
2543
|
+
], 8, yl))), 128))
|
|
2544
|
+
], 8, hl),
|
|
2545
|
+
b("p", kl, x(d(m).length > d(w).length ? k.value : e.messages.columnSearchShortcut ?? "↑ ↓ 选择 · Enter 定位"), 1)
|
|
2546
|
+
], 8, fl)) : j("", !0)
|
|
2590
2547
|
], 544)
|
|
2591
|
-
], 10,
|
|
2548
|
+
], 10, ll));
|
|
2592
2549
|
}
|
|
2593
|
-
}), Tn = /* @__PURE__ */ ye(
|
|
2550
|
+
}), Tn = /* @__PURE__ */ ye(El, [["__scopeId", "data-v-b47639d9"]]), Cl = { class: "mrp-import-summary" }, $l = { key: 0 }, Il = { key: 0 }, Pl = /* @__PURE__ */ be({
|
|
2594
2551
|
__name: "ReportImportSummary",
|
|
2595
2552
|
props: {
|
|
2596
2553
|
result: {},
|
|
2597
2554
|
messages: {}
|
|
2598
2555
|
},
|
|
2599
2556
|
setup(e) {
|
|
2600
|
-
return (t, n) => (E(), I("details",
|
|
2557
|
+
return (t, n) => (E(), I("details", Cl, [
|
|
2601
2558
|
b("summary", null, [
|
|
2602
2559
|
re(x(e.messages.importSummary) + " · " + x(e.messages.importPreserved?.replace("{sheets}", String(e.result.sheets.length))) + " ", 1),
|
|
2603
|
-
e.result.warnings.length ? (E(), I("span",
|
|
2560
|
+
e.result.warnings.length ? (E(), I("span", $l, " · " + x(e.result.warnings.length) + " " + x(e.messages.importWarnings), 1)) : j("", !0)
|
|
2604
2561
|
]),
|
|
2605
2562
|
b("p", null, x(e.messages.importReadOnly), 1),
|
|
2606
2563
|
b("ul", null, [
|
|
@@ -2608,12 +2565,12 @@ const ul = ["aria-label"], cl = {
|
|
|
2608
2565
|
key: a.index
|
|
2609
2566
|
}, x(a.name) + " · " + x(a.range) + " · " + x(a.rowCount) + " × " + x(a.columnCount), 1))), 128))
|
|
2610
2567
|
]),
|
|
2611
|
-
e.result.warnings.length ? (E(), I("ul",
|
|
2568
|
+
e.result.warnings.length ? (E(), I("ul", Il, [
|
|
2612
2569
|
(E(!0), I(fe, null, me(e.result.warnings, (a, s) => (E(), I("li", { key: s }, x(a), 1))), 128))
|
|
2613
|
-
])) :
|
|
2570
|
+
])) : j("", !0)
|
|
2614
2571
|
]));
|
|
2615
2572
|
}
|
|
2616
|
-
}),
|
|
2573
|
+
}), Sl = /* @__PURE__ */ ye(Pl, [["__scopeId", "data-v-54f275e8"]]), Gn = {
|
|
2617
2574
|
calculationTitle: "选区计算",
|
|
2618
2575
|
calculationLocal: "仅本地分析,不写回实绩、不重算原公式。请选取同一单位与量纲的数值。",
|
|
2619
2576
|
calculationHint: "点击起点,Shift + 点击终点或方向键扩选。",
|
|
@@ -2642,7 +2599,7 @@ const ul = ["aria-label"], cl = {
|
|
|
2642
2599
|
calculationErrorOverflow: "结果超出有效数值范围。",
|
|
2643
2600
|
calculationErrorPrecision: "数值超出安全精度,或展示小数位不是 0 至 12 的整数。"
|
|
2644
2601
|
};
|
|
2645
|
-
function
|
|
2602
|
+
function Rl(e) {
|
|
2646
2603
|
const t = { ...Gn };
|
|
2647
2604
|
for (const n of Object.keys(t)) {
|
|
2648
2605
|
const a = e[n];
|
|
@@ -2650,7 +2607,7 @@ function Tl(e) {
|
|
|
2650
2607
|
}
|
|
2651
2608
|
return t;
|
|
2652
2609
|
}
|
|
2653
|
-
const
|
|
2610
|
+
const Ml = {
|
|
2654
2611
|
...Gn,
|
|
2655
2612
|
exportMenu: "导出",
|
|
2656
2613
|
exportMenuDescription: "选择文件格式",
|
|
@@ -2793,7 +2750,7 @@ const Dl = {
|
|
|
2793
2750
|
diagnosticImageDecode: "图片加载失败,请检查资源后重试。",
|
|
2794
2751
|
diagnosticAssetFailed: "图表或图片生成失败,请重试或联系管理员。",
|
|
2795
2752
|
diagnosticAssetBudget: "图片资源超出处理范围,请减少资源或缩小报表范围。"
|
|
2796
|
-
},
|
|
2753
|
+
}, Tl = {
|
|
2797
2754
|
emptyAccent: "#79a7e8",
|
|
2798
2755
|
shellBg: "#f4f7fc",
|
|
2799
2756
|
shellFg: "#334155",
|
|
@@ -2806,10 +2763,10 @@ const Dl = {
|
|
|
2806
2763
|
btnHoverFg: "#315fba",
|
|
2807
2764
|
btnActiveBg: "#3569d4"
|
|
2808
2765
|
};
|
|
2809
|
-
function
|
|
2766
|
+
function Dl(e = {}) {
|
|
2810
2767
|
return { ...e, defaults: e.defaults ?? {}, presets: e.presets ?? {} };
|
|
2811
2768
|
}
|
|
2812
|
-
function
|
|
2769
|
+
function zi(e) {
|
|
2813
2770
|
return e;
|
|
2814
2771
|
}
|
|
2815
2772
|
const Le = {
|
|
@@ -2821,7 +2778,7 @@ const Le = {
|
|
|
2821
2778
|
gapPx: 18,
|
|
2822
2779
|
pdfFontUrl: "/simhei.ttf",
|
|
2823
2780
|
logger: console
|
|
2824
|
-
},
|
|
2781
|
+
}, qi = { warn: () => {
|
|
2825
2782
|
}, info: () => {
|
|
2826
2783
|
} };
|
|
2827
2784
|
function ft(e, t) {
|
|
@@ -2837,7 +2794,7 @@ function ft(e, t) {
|
|
|
2837
2794
|
output: { ...e?.output, ...t?.output }
|
|
2838
2795
|
};
|
|
2839
2796
|
}
|
|
2840
|
-
function
|
|
2797
|
+
function Al(e) {
|
|
2841
2798
|
return {
|
|
2842
2799
|
showExport: e.showExport ?? Le.showExport,
|
|
2843
2800
|
showPrint: e.showPrint ?? Le.showPrint,
|
|
@@ -2847,13 +2804,13 @@ function Ol(e) {
|
|
|
2847
2804
|
gapPx: e.gapPx ?? Le.gapPx
|
|
2848
2805
|
};
|
|
2849
2806
|
}
|
|
2850
|
-
function
|
|
2807
|
+
function Fl(e, t) {
|
|
2851
2808
|
const n = t ? e?.presets?.[t] : e?.defaultPreset ? e?.presets?.[e.defaultPreset] : void 0, a = ft(e?.defaults, n);
|
|
2852
2809
|
return {
|
|
2853
|
-
...
|
|
2810
|
+
...Al(a),
|
|
2854
2811
|
pdfFontUrl: a.pdfFontUrl ?? Le.pdfFontUrl,
|
|
2855
|
-
theme: { ...
|
|
2856
|
-
messages: { ...
|
|
2812
|
+
theme: { ...Tl, ...a.theme },
|
|
2813
|
+
messages: { ...Ml, ...a.messages },
|
|
2857
2814
|
logger: a.logger ?? Le.logger,
|
|
2858
2815
|
preview: {
|
|
2859
2816
|
overscanPages: Dn(a.preview?.overscanPages, 1, 10, !0),
|
|
@@ -2876,13 +2833,13 @@ function Dn(e, t, n, a = !1) {
|
|
|
2876
2833
|
const s = Math.max(0, Math.min(n, e));
|
|
2877
2834
|
return a ? Math.floor(s) : s;
|
|
2878
2835
|
}
|
|
2879
|
-
function
|
|
2836
|
+
function Ol(e) {
|
|
2880
2837
|
const t = {};
|
|
2881
2838
|
return e.emptyAccent != null && (t["--mrp-empty-accent"] = e.emptyAccent), e.shellBg != null && (t["--mrp-shell-bg"] = e.shellBg), e.shellFg != null && (t["--mrp-shell-fg"] = e.shellFg), e.toolbarBg != null && (t["--mrp-toolbar-bg"] = e.toolbarBg), e.toolbarBorder != null && (t["--mrp-toolbar-border"] = e.toolbarBorder), e.toolbarFg != null && (t["--mrp-toolbar-fg"] = e.toolbarFg), e.btnFg != null && (t["--mrp-btn-fg"] = e.btnFg), e.btnBorder != null && (t["--mrp-btn-border"] = e.btnBorder), e.btnHoverBg != null && (t["--mrp-btn-hover-bg"] = e.btnHoverBg), e.btnHoverFg != null && (t["--mrp-btn-hover-fg"] = e.btnHoverFg), e.btnActiveBg != null && (t["--mrp-btn-active-bg"] = e.btnActiveBg), t;
|
|
2882
2839
|
}
|
|
2883
|
-
function
|
|
2840
|
+
function Bi(e) {
|
|
2884
2841
|
const t = gt(Wt, null), n = F(() => {
|
|
2885
|
-
const a = t?.value ?? null, s = "defaults" in e || "presets" in e || "defaultPreset" in e ?
|
|
2842
|
+
const a = t?.value ?? null, s = "defaults" in e || "presets" in e || "defaultPreset" in e ? Dl(e) : { defaults: e, presets: {} };
|
|
2886
2843
|
if (!a) return s;
|
|
2887
2844
|
const o = { ...a.presets, ...s.presets };
|
|
2888
2845
|
for (const r of Object.keys(o))
|
|
@@ -2898,7 +2855,7 @@ function Hi(e) {
|
|
|
2898
2855
|
});
|
|
2899
2856
|
Ln(Wt, n);
|
|
2900
2857
|
}
|
|
2901
|
-
function
|
|
2858
|
+
function Ll() {
|
|
2902
2859
|
return gt(Wt, F(() => null));
|
|
2903
2860
|
}
|
|
2904
2861
|
function Ce(e) {
|
|
@@ -2910,15 +2867,15 @@ function Jn(e, t) {
|
|
|
2910
2867
|
const a = e.source?.field ?? e.table?.columnKey;
|
|
2911
2868
|
return a === void 0 || !n || !Object.prototype.hasOwnProperty.call(n, a) ? void 0 : n[a];
|
|
2912
2869
|
}
|
|
2913
|
-
class
|
|
2870
|
+
class zl extends Error {
|
|
2914
2871
|
constructor(t) {
|
|
2915
2872
|
super(t.map((n) => n.message).join(";")), this.conflicts = t, this.name = "ReportEditConflictError";
|
|
2916
2873
|
}
|
|
2917
2874
|
}
|
|
2918
|
-
function
|
|
2875
|
+
function ql() {
|
|
2919
2876
|
return globalThis.crypto?.randomUUID?.() ?? `mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
2920
2877
|
}
|
|
2921
|
-
function
|
|
2878
|
+
function Bl(e) {
|
|
2922
2879
|
const t = le([]), n = le([]), a = le([]), s = le([]), o = le(!1), r = le(null), l = le([]), c = F(() => l.value.length > 0), v = F(() => Cn(t.value)), h = F(() => !!e.options.value && !o.value && !e.blocked() && n.value.length > 0), f = F(() => !!e.options.value && !o.value && !e.blocked() && a.value.length > 0);
|
|
2923
2880
|
let m = null, w = null, p = 0, u = null;
|
|
2924
2881
|
function i() {
|
|
@@ -2927,35 +2884,35 @@ function Hl(e) {
|
|
|
2927
2884
|
function k() {
|
|
2928
2885
|
p++, i(), u = null, t.value = [], n.value = [], a.value = [], s.value = [], l.value = [], r.value = null;
|
|
2929
2886
|
}
|
|
2930
|
-
function
|
|
2887
|
+
function R() {
|
|
2931
2888
|
const y = e.options.value;
|
|
2932
2889
|
return y ? typeof y == "object" ? y : {} : null;
|
|
2933
2890
|
}
|
|
2934
|
-
function D(y, C,
|
|
2891
|
+
function D(y, C, M) {
|
|
2935
2892
|
if (!e.options.value || e.blocked()) throw new ze("readonly");
|
|
2936
2893
|
const O = Kt(y);
|
|
2937
2894
|
for (const N of C.edits) {
|
|
2938
2895
|
const K = O(N.address);
|
|
2939
|
-
if (!K?.editable ||
|
|
2940
|
-
if (
|
|
2941
|
-
const G = Jn(K,
|
|
2942
|
-
G &&
|
|
2896
|
+
if (!K?.editable || M.canEdit?.(K) === !1) throw new ze("readonly");
|
|
2897
|
+
if (M.requireSource && !K.source) throw new ze("missing");
|
|
2898
|
+
const G = Jn(K, M);
|
|
2899
|
+
G && ja(K, N.value, G);
|
|
2943
2900
|
}
|
|
2944
2901
|
}
|
|
2945
|
-
async function A(y, C,
|
|
2946
|
-
if (C.saveBatch) return C.saveBatch(Ce(y),
|
|
2902
|
+
async function A(y, C, M) {
|
|
2903
|
+
if (C.saveBatch) return C.saveBatch(Ce(y), M);
|
|
2947
2904
|
if (C.save && y.edits.length > 1) throw new ze("atomic");
|
|
2948
|
-
if (y.edits[0]) return C.save?.(Ce(y.edits[0]),
|
|
2905
|
+
if (y.edits[0]) return C.save?.(Ce(y.edits[0]), M);
|
|
2949
2906
|
}
|
|
2950
|
-
async function z(y, C,
|
|
2907
|
+
async function z(y, C, M) {
|
|
2951
2908
|
for (const O of y.edits) {
|
|
2952
|
-
const N = await C.validate?.(Ce(O),
|
|
2909
|
+
const N = await C.validate?.(Ce(O), M);
|
|
2953
2910
|
if (N) throw new Error(N);
|
|
2954
|
-
if (
|
|
2911
|
+
if (M.signal.aborted) return;
|
|
2955
2912
|
}
|
|
2956
2913
|
}
|
|
2957
|
-
function
|
|
2958
|
-
if (e.plan.value =
|
|
2914
|
+
function H(y, C, M, O, N) {
|
|
2915
|
+
if (e.plan.value = Ha(Ka(y, C), C, M), t.value = [...t.value, ...C.edits], N) {
|
|
2959
2916
|
const G = new Set(C.edits.map($n));
|
|
2960
2917
|
l.value = l.value.filter((B) => !G.has($n(B)));
|
|
2961
2918
|
} else l.value = Cn([...l.value, ...C.edits]);
|
|
@@ -2967,24 +2924,24 @@ function Hl(e) {
|
|
|
2967
2924
|
}
|
|
2968
2925
|
}
|
|
2969
2926
|
async function J(y, C) {
|
|
2970
|
-
const
|
|
2971
|
-
if (!
|
|
2927
|
+
const M = e.plan.value, O = R();
|
|
2928
|
+
if (!M || !O || e.blocked()) return !1;
|
|
2972
2929
|
const N = new AbortController(), K = p;
|
|
2973
2930
|
m = N, o.value = !0, r.value = null;
|
|
2974
|
-
const G = () => m === N && !N.signal.aborted && e.plan.value ===
|
|
2931
|
+
const G = () => m === N && !N.signal.aborted && e.plan.value === M && e.options.value !== !1;
|
|
2975
2932
|
try {
|
|
2976
|
-
const B = Na(
|
|
2977
|
-
if (D(
|
|
2933
|
+
const B = Na(M, y, ql());
|
|
2934
|
+
if (D(M, B, O), B.edits = B.edits.filter((T) => !Object.is(T.previousValue, T.value)), !B.edits.length) return !0;
|
|
2978
2935
|
const $ = JSON.stringify([C, B.edits]);
|
|
2979
|
-
u?.plan ===
|
|
2936
|
+
u?.plan === M && u.signature === $ ? B.requestId = u.requestId : u = { plan: M, signature: $, requestId: B.requestId }, D(M, B, O);
|
|
2980
2937
|
const P = { signal: N.signal, requestId: B.requestId, action: C };
|
|
2981
2938
|
if (await z(B, O, P), !G()) return !1;
|
|
2982
|
-
D(
|
|
2939
|
+
D(M, B, O);
|
|
2983
2940
|
const q = await A(B, O, P);
|
|
2984
2941
|
if (!G()) return !1;
|
|
2985
2942
|
if (q?.conflicts?.length)
|
|
2986
|
-
throw s.value = Ce(q.conflicts), new
|
|
2987
|
-
return D(
|
|
2943
|
+
throw s.value = Ce(q.conflicts), new zl(q.conflicts);
|
|
2944
|
+
return D(M, B, O), H(M, B, q, C, !!(O.save || O.saveBatch)), K === p;
|
|
2988
2945
|
} catch (B) {
|
|
2989
2946
|
return G() && (r.value = e.errorMessage?.(B) ?? (B instanceof Error ? B.message : "Cell edit failed"), e.onError(r.value, B)), !1;
|
|
2990
2947
|
} finally {
|
|
@@ -2993,18 +2950,18 @@ function Hl(e) {
|
|
|
2993
2950
|
}
|
|
2994
2951
|
async function Z(y, C = "edit") {
|
|
2995
2952
|
if (w) return w;
|
|
2996
|
-
const
|
|
2997
|
-
w =
|
|
2998
|
-
const O = await
|
|
2999
|
-
return w ===
|
|
2953
|
+
const M = J(y, C);
|
|
2954
|
+
w = M;
|
|
2955
|
+
const O = await M;
|
|
2956
|
+
return w === M && (w = null), O;
|
|
3000
2957
|
}
|
|
3001
2958
|
async function Y() {
|
|
3002
2959
|
const y = p, C = n.value[n.value.length - 1];
|
|
3003
|
-
return !C || o.value || !await Z(C.map((
|
|
2960
|
+
return !C || o.value || !await Z(C.map((M) => ({ address: M.address, value: M.previousValue })), "undo") || y !== p ? !1 : (n.value = n.value.slice(0, -1), a.value = [...a.value, C], !0);
|
|
3004
2961
|
}
|
|
3005
2962
|
async function te() {
|
|
3006
2963
|
const y = p, C = a.value[a.value.length - 1];
|
|
3007
|
-
return !C || o.value || !await Z(C.map((
|
|
2964
|
+
return !C || o.value || !await Z(C.map((M) => ({ address: M.address, value: M.value })), "redo") || y !== p ? !1 : (a.value = a.value.slice(0, -1), n.value = [...n.value, C], !0);
|
|
3008
2965
|
}
|
|
3009
2966
|
async function ne() {
|
|
3010
2967
|
const y = p;
|
|
@@ -3012,13 +2969,13 @@ function Hl(e) {
|
|
|
3012
2969
|
}
|
|
3013
2970
|
return { changes: t, differences: v, localDifferences: l, hasLocalDrafts: c, lastError: r, conflicts: s, saving: o, canUndo: h, canRedo: f, apply: Z, undo: Y, redo: te, restore: ne, cancel: i, reset: k };
|
|
3014
2971
|
}
|
|
3015
|
-
let
|
|
3016
|
-
const
|
|
3017
|
-
function
|
|
2972
|
+
let Nl = 0;
|
|
2973
|
+
const jl = "position:absolute;inset:0;width:100%;height:100%;min-height:20px;box-sizing:border-box;z-index:10;resize:none;margin:0;padding:2px 4px;border:2px solid var(--mrp-btn-active-bg,#2563eb);outline:none;background:var(--mrp-toolbar-bg,#fff);color:var(--mrp-toolbar-fg,#111);font:inherit;line-height:1.25;white-space:pre-wrap;";
|
|
2974
|
+
function Hl(e) {
|
|
3018
2975
|
return e.type === "boolean" ? [{ value: !0, label: e.trueLabel ?? "是" }, { value: !1, label: e.falseLabel ?? "否" }] : e.type === "enum" ? e.options.map((t) => ({ value: t.value, label: t.label ?? String(t.value) })) : [];
|
|
3019
2976
|
}
|
|
3020
|
-
function
|
|
3021
|
-
const a = e.createElement("select"), s = [{ value: null, label: "—" }, ...
|
|
2977
|
+
function Kl(e, t, n) {
|
|
2978
|
+
const a = e.createElement("select"), s = [{ value: null, label: "—" }, ...Hl(t)];
|
|
3022
2979
|
if (s.forEach((o, r) => {
|
|
3023
2980
|
const l = e.createElement("option");
|
|
3024
2981
|
l.value = String(r), l.textContent = o.label, (Object.is(n.value, o.value) || n.value === "" && o.value === null) && (l.selected = !0), a.append(l);
|
|
@@ -3028,21 +2985,21 @@ function Ul(e, t, n) {
|
|
|
3028
2985
|
}
|
|
3029
2986
|
return { input: a, value: () => a.value === "unknown" ? n.value : s[Number(a.value)]?.value ?? null };
|
|
3030
2987
|
}
|
|
3031
|
-
function
|
|
2988
|
+
function Wl(e, t, n) {
|
|
3032
2989
|
const a = t?.type === "number" || t?.type === "date" ? e.createElement("input") : e.createElement("textarea");
|
|
3033
2990
|
return a.value = n.value == null ? "" : String(n.value), a instanceof HTMLInputElement && (a.type = t?.type === "date" ? "date" : "text", t?.type === "number" && (a.inputMode = "decimal"), t?.type === "date" && (t.min && (a.min = t.min), t.max && (a.max = t.max))), { input: a, value: () => t?.type === "date" && a instanceof HTMLInputElement && a.validity.badInput ? "invalid-date" : a.value };
|
|
3034
2991
|
}
|
|
3035
|
-
function
|
|
2992
|
+
function Ul(e) {
|
|
3036
2993
|
if (!e) return "";
|
|
3037
2994
|
const t = [e.hint, e.unit];
|
|
3038
2995
|
return (e.type === "number" || e.type === "date") && (e.min !== void 0 && t.push(`≥ ${e.min}`), e.max !== void 0 && t.push(`≤ ${e.max}`)), e.type === "number" && e.precision !== void 0 && t.push(`最多 ${e.precision} 位小数`), e.type === "text" && e.maxLength !== void 0 && t.push(`最多 ${e.maxLength} 字符`), t.filter(Boolean).join(" · ");
|
|
3039
2996
|
}
|
|
3040
|
-
function
|
|
3041
|
-
const s = e.ownerDocument, o = a?.type === "boolean" || a?.type === "enum" ?
|
|
3042
|
-
l.className = "mrp-cell-editor-host", l.style.cssText = "position:absolute;inset:0;z-index:10;", r.className = "mrp-cell-editor", r.style.cssText =
|
|
2997
|
+
function Vl(e, t, n, a) {
|
|
2998
|
+
const s = e.ownerDocument, o = a?.type === "boolean" || a?.type === "enum" ? Kl(s, a, n) : Wl(s, a, n), r = o.input, l = s.createElement("span");
|
|
2999
|
+
l.className = "mrp-cell-editor-host", l.style.cssText = "position:absolute;inset:0;z-index:10;", r.className = "mrp-cell-editor", r.style.cssText = jl, r.setAttribute("aria-label", a?.label ?? t), a?.required && r.setAttribute("aria-required", "true");
|
|
3043
3000
|
const c = s.createElement("span");
|
|
3044
|
-
c.id = `mrp-cell-hint-${++
|
|
3045
|
-
const v =
|
|
3001
|
+
c.id = `mrp-cell-hint-${++Nl}`, c.className = "mrp-cell-editor-hint", c.style.cssText = "position:absolute;top:100%;left:0;min-width:100%;width:max-content;max-width:320px;box-sizing:border-box;padding:4px 8px;white-space:normal;border:1px solid var(--mrp-toolbar-border,#ddd);background:var(--mrp-toolbar-bg,#fff);color:var(--mrp-toolbar-fg,#111);font-size:12px;line-height:1.4;box-shadow:0 3px 10px #0002;z-index:11;";
|
|
3002
|
+
const v = Ul(a);
|
|
3046
3003
|
return c.textContent = v, c.hidden = !v, r.setAttribute("aria-describedby", c.id), l.append(r, c), e.append(l), {
|
|
3047
3004
|
input: r,
|
|
3048
3005
|
root: l,
|
|
@@ -3067,8 +3024,8 @@ function Vt(e) {
|
|
|
3067
3024
|
};
|
|
3068
3025
|
return Object.values(a).every((s) => Number.isInteger(s) && s >= 0) ? a : null;
|
|
3069
3026
|
}
|
|
3070
|
-
function
|
|
3071
|
-
const t = le(null), n =
|
|
3027
|
+
function Gl(e) {
|
|
3028
|
+
const t = le(null), n = Bl(e), { saving: a, changes: s } = n, o = le(!1), r = F(() => o.value || n.hasLocalDrafts.value);
|
|
3072
3029
|
let l = null;
|
|
3073
3030
|
function c() {
|
|
3074
3031
|
const i = t.value;
|
|
@@ -3092,36 +3049,36 @@ function Zl(e) {
|
|
|
3092
3049
|
o.value = i.editor.input.value !== i.editor.initialInput, i.editor.input.disabled = !0;
|
|
3093
3050
|
const k = f(i);
|
|
3094
3051
|
l = k;
|
|
3095
|
-
const
|
|
3096
|
-
return l === k && (l = null),
|
|
3052
|
+
const R = await k;
|
|
3053
|
+
return l === k && (l = null), R;
|
|
3097
3054
|
}
|
|
3098
3055
|
function w(i) {
|
|
3099
3056
|
if (i.stopPropagation(), !i.isComposing && (i.key === "Escape" && (i.preventDefault(), c()), i.key === "Enter" && !i.shiftKey || i.key === "Tab")) {
|
|
3100
3057
|
i.preventDefault();
|
|
3101
3058
|
const k = t.value?.address;
|
|
3102
|
-
m().then((
|
|
3103
|
-
|
|
3059
|
+
m().then((R) => {
|
|
3060
|
+
R && k && e.onNavigate?.(k, i.key, i.shiftKey);
|
|
3104
3061
|
});
|
|
3105
3062
|
}
|
|
3106
3063
|
}
|
|
3107
3064
|
async function p(i) {
|
|
3108
3065
|
if (!e.options.value || e.blocked() || !await m() || !i.isConnected) return;
|
|
3109
|
-
const k = e.plan.value,
|
|
3110
|
-
if (!k || !
|
|
3066
|
+
const k = e.plan.value, R = Vt(i);
|
|
3067
|
+
if (!k || !R || !e.options.value || e.blocked()) return;
|
|
3111
3068
|
const D = typeof e.options.value == "object" ? e.options.value : {};
|
|
3112
3069
|
try {
|
|
3113
|
-
const A = ct(k,
|
|
3070
|
+
const A = ct(k, R);
|
|
3114
3071
|
if (!A?.editable || D.canEdit?.(A) === !1) return;
|
|
3115
3072
|
const z = Jn(A, D);
|
|
3116
3073
|
z && Wa(A, z);
|
|
3117
|
-
const
|
|
3118
|
-
t.value = { plan: k, address:
|
|
3119
|
-
o.value = J.value !==
|
|
3074
|
+
const H = Vl(i, e.label(), A, z), J = H.input;
|
|
3075
|
+
t.value = { plan: k, address: R, editor: H }, o.value = !1, J.addEventListener("keydown", (Z) => w(Z)), J.addEventListener("input", () => {
|
|
3076
|
+
o.value = J.value !== H.initialInput, H.feedback();
|
|
3120
3077
|
}), J.addEventListener("change", () => {
|
|
3121
|
-
o.value = J.value !==
|
|
3078
|
+
o.value = J.value !== H.initialInput;
|
|
3122
3079
|
}), J.addEventListener("blur", () => {
|
|
3123
3080
|
!a.value && !e.suspendBlur?.() && m();
|
|
3124
|
-
}),
|
|
3081
|
+
}), H.focus();
|
|
3125
3082
|
} catch (A) {
|
|
3126
3083
|
e.onError(A instanceof Error ? A.message : "无法编辑单元格", A);
|
|
3127
3084
|
}
|
|
@@ -3129,8 +3086,8 @@ function Zl(e) {
|
|
|
3129
3086
|
async function u(i) {
|
|
3130
3087
|
const k = i.target;
|
|
3131
3088
|
if (!(k instanceof Element) || k.closest(".mrp-cell-editor")) return;
|
|
3132
|
-
const
|
|
3133
|
-
|
|
3089
|
+
const R = k.closest("td[data-mr-row-index]");
|
|
3090
|
+
R && await p(R);
|
|
3134
3091
|
}
|
|
3135
3092
|
return oe(e.options, (i, k) => {
|
|
3136
3093
|
(!i || i !== k) && c();
|
|
@@ -3151,14 +3108,14 @@ function Zl(e) {
|
|
|
3151
3108
|
};
|
|
3152
3109
|
}
|
|
3153
3110
|
const Gt = ["html", "pdf", "xlsx", "png", "word"], An = ["search", "thumbnails", "zoom", ...Gt, "print", "pdfWindow", "editing", "import"];
|
|
3154
|
-
function
|
|
3111
|
+
function Ni(e) {
|
|
3155
3112
|
return {
|
|
3156
3113
|
load: (t) => JSON.parse(e.getItem(t) ?? "null"),
|
|
3157
3114
|
save: (t, n) => e.setItem(t, JSON.stringify(n)),
|
|
3158
3115
|
remove: (t) => e.removeItem(t)
|
|
3159
3116
|
};
|
|
3160
3117
|
}
|
|
3161
|
-
function
|
|
3118
|
+
function Jl(e, t, n, a) {
|
|
3162
3119
|
const s = W({});
|
|
3163
3120
|
let o = 0, r = 0, l = Promise.resolve();
|
|
3164
3121
|
const c = F(() => Object.fromEntries(An.map((m) => [
|
|
@@ -3193,11 +3150,11 @@ function Yl(e, t, n, a) {
|
|
|
3193
3150
|
o++;
|
|
3194
3151
|
}), { enabled: c, setEnabled: v, reset: f };
|
|
3195
3152
|
}
|
|
3196
|
-
function
|
|
3197
|
-
const a = W({}), s =
|
|
3153
|
+
function Zl(e, t, n) {
|
|
3154
|
+
const a = W({}), s = Ll(), o = F(() => Fl(s.value, e.preset)), r = F(() => ({
|
|
3198
3155
|
...o.value.messages,
|
|
3199
3156
|
...e.messages
|
|
3200
|
-
})), l = F(() => e.showExport ?? o.value.showExport), c = F(() => e.showPrint ?? o.value.showPrint), v = F(() => e.showPdfWindow ?? o.value.showPdfWindow), h = F(() => e.showSettings ?? o.value.showSettings), f = F(() => e.guardChanges ?? o.value.guardChanges), m = F(() => ({ ...o.value.output, ...e.output })), w = F(() => ({ ...o.value.toolbar, ...e.toolbar })), p = F(() => ({ ...o.value.interaction, ...e.interaction, ...a.value })), u = F(() => e.preferences ?? o.value.preferences), i = F(() => e.assets ?? o.value.assets), k = F(() => e.gapPx ?? (t.value ? 0 : o.value.gapPx)),
|
|
3157
|
+
})), l = F(() => e.showExport ?? o.value.showExport), c = F(() => e.showPrint ?? o.value.showPrint), v = F(() => e.showPdfWindow ?? o.value.showPdfWindow), h = F(() => e.showSettings ?? o.value.showSettings), f = F(() => e.guardChanges ?? o.value.guardChanges), m = F(() => ({ ...o.value.output, ...e.output })), w = F(() => ({ ...o.value.toolbar, ...e.toolbar })), p = F(() => ({ ...o.value.interaction, ...e.interaction, ...a.value })), u = F(() => e.preferences ?? o.value.preferences), i = F(() => e.assets ?? o.value.assets), k = F(() => e.gapPx ?? (t.value ? 0 : o.value.gapPx)), R = F(() => e.showParams ?? o.value.showParams), D = F(() => e.editable ?? o.value.editable), A = F(() => e.excelImport ?? o.value.excelImport), z = F(() => ({
|
|
3201
3158
|
search: w.value.search !== !1,
|
|
3202
3159
|
thumbnails: w.value.thumbnails !== !1,
|
|
3203
3160
|
zoom: w.value.zoom !== !1,
|
|
@@ -3209,16 +3166,16 @@ function Xl(e, t, n) {
|
|
|
3209
3166
|
pdfWindow: v.value,
|
|
3210
3167
|
editing: !!D.value,
|
|
3211
3168
|
import: !!A.value
|
|
3212
|
-
})),
|
|
3169
|
+
})), H = Jl(z, F(() => ({
|
|
3213
3170
|
editing: w.value.editing,
|
|
3214
3171
|
import: w.value.excelImport
|
|
3215
|
-
})), u, () => n(r.value.preferencesError ?? "Preferences storage unavailable")), J =
|
|
3216
|
-
return { resolved: o, resolvedMessages: r, effectiveShowExport: l, effectiveShowPrint: c, effectiveShowPdfWindow: v, effectiveShowSettings: h, effectiveGuardChanges: f, effectiveOutput: m, effectiveInteraction: p, effectiveAssets: i, effectiveGapPx: k, effectiveShowParams:
|
|
3172
|
+
})), u, () => n(r.value.preferencesError ?? "Preferences storage unavailable")), J = H.enabled, Z = F(() => Gt.filter((C) => J.value[C])), Y = F(() => J.value.editing ? D.value : !1), te = F(() => J.value.import ? A.value : !1), ne = F(() => typeof D.value == "object" && (typeof D.value.save == "function" || typeof D.value.saveBatch == "function")), y = F(() => typeof e.emptyState == "object" ? e.emptyState : {});
|
|
3173
|
+
return { resolved: o, resolvedMessages: r, effectiveShowExport: l, effectiveShowPrint: c, effectiveShowPdfWindow: v, effectiveShowSettings: h, effectiveGuardChanges: f, effectiveOutput: m, effectiveInteraction: p, effectiveAssets: i, effectiveGapPx: k, effectiveShowParams: R, availableTools: z, tools: H, toolState: J, visibleExportFormats: Z, effectiveEditable: Y, effectiveExcelImport: te, persistedEditing: ne, emptyStateContent: y, sessionInteraction: a };
|
|
3217
3174
|
}
|
|
3218
3175
|
function Zn(e) {
|
|
3219
3176
|
return e.table.role === "header" ? -Math.max(1, e.grid?.cells.length ?? 1) : e.table.rowIndex;
|
|
3220
3177
|
}
|
|
3221
|
-
function
|
|
3178
|
+
function Me(e, t, n = t) {
|
|
3222
3179
|
const a = e.pages[t.pageIndex]?.components[t.componentIndex], s = a?.table, o = e.pages[n.pageIndex]?.components[n.componentIndex]?.table;
|
|
3223
3180
|
return s && o && s.id === o.id ? {
|
|
3224
3181
|
grid: s.id,
|
|
@@ -3242,27 +3199,27 @@ function Fn(e, t) {
|
|
|
3242
3199
|
return l ? { ...l.address, columnIndex: l.keys.indexOf(r) } : null;
|
|
3243
3200
|
};
|
|
3244
3201
|
}
|
|
3245
|
-
function
|
|
3202
|
+
function Yl(e, t) {
|
|
3246
3203
|
const n = [...e.ownerDocument.querySelectorAll("a[href],button,input,textarea,select,[tabindex]:not([tabindex='-1'])")].filter((o) => o.tabIndex >= 0 && !o.matches(":disabled,[hidden],input[type='hidden']") && !o.closest("[inert],[aria-hidden='true']") && o.getClientRects().length > 0).map((o, r) => ({ element: o, order: r })).sort((o, r) => (o.element.tabIndex || 1 / 0) - (r.element.tabIndex || 1 / 0) || o.order - r.order), a = n.findIndex(({ element: o }) => o === e);
|
|
3247
3204
|
if (a < 0) return !1;
|
|
3248
3205
|
const s = n[a + (t ? -1 : 1)]?.element;
|
|
3249
3206
|
return s ? (s.focus(), e.ownerDocument.activeElement === s) : !1;
|
|
3250
3207
|
}
|
|
3251
|
-
function
|
|
3208
|
+
function Xl(e, t) {
|
|
3252
3209
|
const n = e?.source;
|
|
3253
|
-
return !
|
|
3210
|
+
return !Ql(e, t.field) || t.tableId !== void 0 && e?.table?.id !== t.tableId || t.datasetId !== void 0 && (n?.datasetId ?? e?.component.table?.source?.datasetId) !== t.datasetId ? !1 : t.rowKey === void 0 || n?.rowKey === t.rowKey;
|
|
3254
3211
|
}
|
|
3255
|
-
function
|
|
3212
|
+
function Ql(e, t) {
|
|
3256
3213
|
if ((e?.source?.field ?? e?.table?.columnKey) === t) return !0;
|
|
3257
3214
|
if (!e || e.table?.role !== "header") return !1;
|
|
3258
3215
|
const n = e.address.columnIndex;
|
|
3259
3216
|
return e.component.table?.columnKeys.slice(n, n + (e.cell.colSpan ?? 1)).includes(t) ?? !1;
|
|
3260
3217
|
}
|
|
3261
|
-
function
|
|
3218
|
+
function _l(e, t) {
|
|
3262
3219
|
return e.pageIndex === t.pageIndex && e.componentIndex === t.componentIndex;
|
|
3263
3220
|
}
|
|
3264
|
-
function
|
|
3265
|
-
return
|
|
3221
|
+
function ei(e, t) {
|
|
3222
|
+
return _l(e, t) && e.rowIndex === t.rowIndex && e.columnIndex === t.columnIndex;
|
|
3266
3223
|
}
|
|
3267
3224
|
function zt(e) {
|
|
3268
3225
|
return `[data-page="${e.pageIndex + 1}"] [data-mr-component-index="${e.componentIndex}"] td[data-mr-row-index="${e.rowIndex}"][data-mr-column-index="${e.columnIndex}"]`;
|
|
@@ -3270,11 +3227,11 @@ function zt(e) {
|
|
|
3270
3227
|
function Jt(e) {
|
|
3271
3228
|
return `${e.pageIndex}:${e.componentIndex}:${e.rowIndex}:${e.columnIndex}`;
|
|
3272
3229
|
}
|
|
3273
|
-
function
|
|
3274
|
-
const n =
|
|
3230
|
+
function ti(e, t) {
|
|
3231
|
+
const n = Me(e, t.anchor), a = Me(e, t.focus, t.anchor);
|
|
3275
3232
|
return { grid: n.grid, minRow: Math.min(n.row, a.row), maxRow: Math.max(n.row, a.row), minColumn: Math.min(n.column, a.column), maxColumn: Math.max(n.column, a.column), focusKey: Jt(t.focus), origin: e.pages[t.anchor.pageIndex]?.components[t.anchor.componentIndex]?.table };
|
|
3276
3233
|
}
|
|
3277
|
-
function
|
|
3234
|
+
function ni(e, t, n) {
|
|
3278
3235
|
const a = t?.table;
|
|
3279
3236
|
if (!a || !n.origin || a.id !== n.origin.id) return { grid: `${e.pageIndex}:${e.componentIndex}`, rowOffset: 0, missingColumn: -1 };
|
|
3280
3237
|
const s = /* @__PURE__ */ new Map();
|
|
@@ -3282,7 +3239,7 @@ function si(e, t, n) {
|
|
|
3282
3239
|
s.has(o) || s.set(o, r);
|
|
3283
3240
|
}), { grid: a.id, rowOffset: a.role === "header" ? -Math.max(1, t.grid?.cells.length ?? 1) : a.rowIndex, columns: a.columnKeys.map((o) => s.get(o) ?? -1), missingColumn: s.get("") ?? -1 };
|
|
3284
3241
|
}
|
|
3285
|
-
function
|
|
3242
|
+
function ai(e, t, n) {
|
|
3286
3243
|
if (!n || !t || t.grid !== n.grid) return !1;
|
|
3287
3244
|
const a = t.rowOffset + e.row, s = t.columns ? t.columns[e.column] ?? t.missingColumn : e.column;
|
|
3288
3245
|
return a >= n.minRow && a <= n.maxRow && s >= n.minColumn && s <= n.maxColumn;
|
|
@@ -3293,74 +3250,74 @@ function mt(e, t, n) {
|
|
|
3293
3250
|
function qt(e, t, n) {
|
|
3294
3251
|
e.classList.contains(t) !== n && e.classList.toggle(t, n);
|
|
3295
3252
|
}
|
|
3296
|
-
function
|
|
3253
|
+
function si(e, t, n, a, s, o) {
|
|
3297
3254
|
t.role !== n && (mt(e, "role", n), t.role = n), t.selected !== a && (qt(e, "mrp-cell-selected", a), mt(e, "aria-selected", String(a)), t.selected = a), t.focused !== s && (qt(e, "mrp-cell-focus", s), mt(e, "tabindex", s ? "0" : "-1"), t.focused = s), t.modified !== o && (qt(e, "mrp-cell-modified", o), t.modified = o);
|
|
3298
3255
|
}
|
|
3299
|
-
function
|
|
3256
|
+
function oi(e) {
|
|
3300
3257
|
const t = () => e.editable?.() ?? e.enabled(), n = le(null), a = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap();
|
|
3301
3258
|
let o = null, r = /* @__PURE__ */ new Set();
|
|
3302
3259
|
function l(y = e.root.value ?? void 0) {
|
|
3303
3260
|
if (!y) return;
|
|
3304
|
-
const C = n.value,
|
|
3261
|
+
const C = n.value, M = e.plan.value, O = e.differences();
|
|
3305
3262
|
O !== o && (o = O, r = new Set(O.map((K) => Jt(K.address))));
|
|
3306
|
-
const N = C &&
|
|
3307
|
-
y instanceof HTMLTableElement && h(y,
|
|
3308
|
-
for (const K of y.querySelectorAll("table")) h(K,
|
|
3263
|
+
const N = C && M ? ti(M, C) : null;
|
|
3264
|
+
y instanceof HTMLTableElement && h(y, M, N);
|
|
3265
|
+
for (const K of y.querySelectorAll("table")) h(K, M, N);
|
|
3309
3266
|
}
|
|
3310
3267
|
function c(y) {
|
|
3311
3268
|
const C = a.get(y);
|
|
3312
3269
|
if (C) return C;
|
|
3313
|
-
const
|
|
3270
|
+
const M = y.closest("[data-mr-component-index]"), O = M?.closest(".mrp-page-holder"), N = { pageIndex: Number(O?.dataset.page) - 1, componentIndex: Number(M?.dataset.mrComponentIndex) };
|
|
3314
3271
|
return Object.values(N).every((K) => Number.isInteger(K) && K >= 0) ? (a.set(y, N), N) : null;
|
|
3315
3272
|
}
|
|
3316
3273
|
function v(y, C) {
|
|
3317
|
-
const
|
|
3318
|
-
if (
|
|
3274
|
+
const M = s.get(y);
|
|
3275
|
+
if (M) return M;
|
|
3319
3276
|
const O = Number(y.dataset.mrRowIndex), N = Number(y.dataset.mrColumnIndex);
|
|
3320
3277
|
if (![O, N].every((G) => Number.isInteger(G) && G >= 0)) return null;
|
|
3321
3278
|
const K = { row: O, column: N, key: Jt({ ...C, rowIndex: O, columnIndex: N }) };
|
|
3322
3279
|
return s.set(y, K), K;
|
|
3323
3280
|
}
|
|
3324
|
-
function h(y, C,
|
|
3281
|
+
function h(y, C, M) {
|
|
3325
3282
|
const O = c(y);
|
|
3326
3283
|
if (!O) return;
|
|
3327
|
-
const N = C?.pages[O.pageIndex]?.components[O.componentIndex], K = N?.table?.role === "header" ? "columnheader" : "gridcell", G =
|
|
3284
|
+
const N = C?.pages[O.pageIndex]?.components[O.componentIndex], K = N?.table?.role === "header" ? "columnheader" : "gridcell", G = M ? ni(O, N, M) : null;
|
|
3328
3285
|
mt(y, "role", "grid");
|
|
3329
3286
|
for (const B of y.rows) for (const $ of B.cells) {
|
|
3330
3287
|
const P = v($, O);
|
|
3331
|
-
P &&
|
|
3288
|
+
P && si($, P, K, ai(P, G, M), M?.focusKey === P.key, r.size > 0 && r.has(P.key));
|
|
3332
3289
|
}
|
|
3333
3290
|
}
|
|
3334
3291
|
async function f(y, C = !1) {
|
|
3335
3292
|
if (!e.plan.value || !ct(e.plan.value, y)) return !1;
|
|
3336
|
-
const
|
|
3337
|
-
n.value = { anchor: O ?
|
|
3293
|
+
const M = n.value, O = C && M && Me(e.plan.value, M.anchor).grid === Me(e.plan.value, y, M.anchor).grid;
|
|
3294
|
+
n.value = { anchor: O ? M.anchor : { ...y }, focus: { ...y } }, e.root.value?.querySelector(zt(y)) || e.gotoPage(y.pageIndex + 1), await Fe(), l();
|
|
3338
3295
|
const N = e.root.value?.querySelector(zt(y));
|
|
3339
3296
|
return N?.focus({ preventScroll: !0 }), N?.scrollIntoView?.({ block: "nearest", inline: "nearest" }), !!N;
|
|
3340
3297
|
}
|
|
3341
3298
|
function m(y) {
|
|
3342
3299
|
const C = y.target;
|
|
3343
3300
|
if (!(C instanceof Element) || C.closest("textarea,input,button,select")) return;
|
|
3344
|
-
const
|
|
3301
|
+
const M = C.closest("td[data-mr-row-index]"), O = M && Vt(M);
|
|
3345
3302
|
if (!O || e.busy() || !e.plan.value || !ct(e.plan.value, O)) return;
|
|
3346
|
-
const N = n.value, K = y.shiftKey && N &&
|
|
3347
|
-
n.value = { anchor: K ? N.anchor : { ...O }, focus: { ...O } }, l(),
|
|
3303
|
+
const N = n.value, K = y.shiftKey && N && Me(e.plan.value, N.anchor).grid === Me(e.plan.value, O, N.anchor).grid;
|
|
3304
|
+
n.value = { anchor: K ? N.anchor : { ...O }, focus: { ...O } }, l(), M.focus({ preventScroll: !0 });
|
|
3348
3305
|
}
|
|
3349
3306
|
function w(y) {
|
|
3350
3307
|
const C = e.plan.value?.pages[y.pageIndex]?.components[y.componentIndex];
|
|
3351
|
-
return C?.grid ? Nn(C.grid, C.widthMm, C.heightMm).cells.map((
|
|
3308
|
+
return C?.grid ? Nn(C.grid, C.widthMm, C.heightMm).cells.map((M) => ({ ...y, rowIndex: M.ri, columnIndex: M.ci })) : [];
|
|
3352
3309
|
}
|
|
3353
|
-
function p(y, C,
|
|
3354
|
-
const O = w(y), N =
|
|
3355
|
-
if (C === "Tab") return O[O.findIndex((B) =>
|
|
3310
|
+
function p(y, C, M) {
|
|
3311
|
+
const O = w(y), N = M ? -1 : 1;
|
|
3312
|
+
if (C === "Tab") return O[O.findIndex((B) => ei(B, y)) + N];
|
|
3356
3313
|
const K = C === "ArrowUp" || C === "ArrowDown" || C === "Enter", G = C === "ArrowUp" || C === "ArrowLeft" ? -1 : N;
|
|
3357
3314
|
return O.filter((B) => K ? B.columnIndex === y.columnIndex && (B.rowIndex - y.rowIndex) * G > 0 : B.rowIndex === y.rowIndex && (B.columnIndex - y.columnIndex) * G > 0).sort((B, $) => K ? (B.rowIndex - $.rowIndex) * G : (B.columnIndex - $.columnIndex) * G)[0];
|
|
3358
3315
|
}
|
|
3359
|
-
function u(y, C,
|
|
3316
|
+
function u(y, C, M) {
|
|
3360
3317
|
if (C === "ArrowLeft" || C === "ArrowRight") return;
|
|
3361
3318
|
const O = e.plan.value;
|
|
3362
3319
|
if (!O.pages[y.pageIndex]?.components[y.componentIndex]?.table) return;
|
|
3363
|
-
const K = C === "ArrowUp" ||
|
|
3320
|
+
const K = C === "ArrowUp" || M ? -1 : 1;
|
|
3364
3321
|
for (let G = y.pageIndex; G >= 0 && G < O.pages.length; G += K) {
|
|
3365
3322
|
const B = O.pages[G].components, $ = G === y.pageIndex ? y.componentIndex + K : K === 1 ? 0 : B.length - 1;
|
|
3366
3323
|
for (let P = $; P >= 0 && P < B.length; P += K) {
|
|
@@ -3369,27 +3326,27 @@ function li(e) {
|
|
|
3369
3326
|
}
|
|
3370
3327
|
}
|
|
3371
3328
|
}
|
|
3372
|
-
function i(y, C,
|
|
3329
|
+
function i(y, C, M, O) {
|
|
3373
3330
|
const N = e.plan.value, K = N.pages[y.pageIndex].components[y.componentIndex].table, G = N.pages[C.pageIndex].components[C.componentIndex]?.table;
|
|
3374
3331
|
if (G?.id !== K.id || G.role === "header" && K.role !== "header" && (O > 0 || K.rowIndex + y.rowIndex > 0)) return;
|
|
3375
|
-
const B = w(C), $ =
|
|
3332
|
+
const B = w(C), $ = M === "Tab" ? B : B.filter((P) => P.columnIndex === y.columnIndex);
|
|
3376
3333
|
return O === 1 ? $[0] : $[$.length - 1];
|
|
3377
3334
|
}
|
|
3378
|
-
function k(y, C,
|
|
3379
|
-
const K = p(y, C,
|
|
3335
|
+
function k(y, C, M = !1, O = !1, N = !1) {
|
|
3336
|
+
const K = p(y, C, M) ?? u(y, C, M);
|
|
3380
3337
|
return K ? (f(K, O), !0) : ((C !== "Tab" || !N) && f(y), !1);
|
|
3381
3338
|
}
|
|
3382
|
-
function
|
|
3339
|
+
function R(y) {
|
|
3383
3340
|
const C = n.value;
|
|
3384
3341
|
if (e.busy() || y.target instanceof Element && y.target.closest("textarea,input,select,button,a[href],[contenteditable]")) return !1;
|
|
3385
3342
|
if (!C) return z(y);
|
|
3386
|
-
const
|
|
3343
|
+
const M = y.key;
|
|
3387
3344
|
if (D(y) || A(y, C.focus)) return !0;
|
|
3388
|
-
if (!["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter"].includes(
|
|
3389
|
-
const O = k(C.focus,
|
|
3390
|
-
if (
|
|
3345
|
+
if (!["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter"].includes(M)) return !1;
|
|
3346
|
+
const O = k(C.focus, M, M === "Tab" && y.shiftKey, y.shiftKey && M !== "Tab", !0);
|
|
3347
|
+
if (M === "Tab" && !O) {
|
|
3391
3348
|
const N = e.root.value?.ownerDocument.activeElement;
|
|
3392
|
-
if (!(N instanceof HTMLElement) || !
|
|
3349
|
+
if (!(N instanceof HTMLElement) || !Yl(N, y.shiftKey)) return !1;
|
|
3393
3350
|
}
|
|
3394
3351
|
return y.preventDefault(), !0;
|
|
3395
3352
|
}
|
|
@@ -3400,18 +3357,18 @@ function li(e) {
|
|
|
3400
3357
|
}
|
|
3401
3358
|
function A(y, C) {
|
|
3402
3359
|
if (!t() || !e.plan.value || y.key !== "F2" && !(y.key === "Enter" && ct(e.plan.value, C)?.editable)) return !1;
|
|
3403
|
-
const
|
|
3404
|
-
return
|
|
3360
|
+
const M = e.root.value?.querySelector(zt(C));
|
|
3361
|
+
return M && (y.preventDefault(), e.edit(M)), !0;
|
|
3405
3362
|
}
|
|
3406
3363
|
function z(y) {
|
|
3407
3364
|
if (!["ArrowDown", "ArrowRight", "ArrowUp", "ArrowLeft", "Enter"].includes(y.key)) return !1;
|
|
3408
|
-
const C = e.root.value?.querySelector("td[data-mr-row-index]"),
|
|
3409
|
-
return
|
|
3365
|
+
const C = e.root.value?.querySelector("td[data-mr-row-index]"), M = C && Vt(C);
|
|
3366
|
+
return M ? (y.preventDefault(), f(M), !0) : !1;
|
|
3410
3367
|
}
|
|
3411
|
-
function
|
|
3368
|
+
function H() {
|
|
3412
3369
|
const y = n.value, C = e.plan.value;
|
|
3413
3370
|
if (!y || !C) return "";
|
|
3414
|
-
const
|
|
3371
|
+
const M = [], O = Me(C, y.anchor), N = Me(C, y.focus, y.anchor), K = Fn(C, y.anchor), G = Kt(C), B = Math.min(O.column, N.column), $ = Math.max(O.column, N.column);
|
|
3415
3372
|
if ((Math.abs(O.row - N.row) + 1) * ($ - B + 1) > 1e4)
|
|
3416
3373
|
return e.error(new ze("limit")), "";
|
|
3417
3374
|
for (let P = Math.min(O.row, N.row); P <= Math.max(O.row, N.row); P++) {
|
|
@@ -3420,31 +3377,31 @@ function li(e) {
|
|
|
3420
3377
|
const V = K(P, T);
|
|
3421
3378
|
q.push(V ? G(V)?.cell.text ?? "" : "");
|
|
3422
3379
|
}
|
|
3423
|
-
|
|
3380
|
+
M.push(q);
|
|
3424
3381
|
}
|
|
3425
|
-
return Va(
|
|
3382
|
+
return Va(M);
|
|
3426
3383
|
}
|
|
3427
3384
|
function J(y) {
|
|
3428
|
-
!n.value || y.target instanceof Element && y.target.closest("textarea,input,select") || (y.clipboardData?.setData("text/plain",
|
|
3385
|
+
!n.value || y.target instanceof Element && y.target.closest("textarea,input,select") || (y.clipboardData?.setData("text/plain", H()), y.preventDefault());
|
|
3429
3386
|
}
|
|
3430
3387
|
async function Z(y) {
|
|
3431
3388
|
const C = n.value;
|
|
3432
3389
|
if (!C || !t() || e.busy()) return !1;
|
|
3433
3390
|
try {
|
|
3434
|
-
let
|
|
3391
|
+
let M;
|
|
3435
3392
|
try {
|
|
3436
|
-
|
|
3393
|
+
M = Ua(y);
|
|
3437
3394
|
} catch ($) {
|
|
3438
3395
|
throw new ze($ instanceof Error && $.message.includes("limit") ? "limit" : "clipboard");
|
|
3439
3396
|
}
|
|
3440
|
-
const O = e.plan.value, N =
|
|
3397
|
+
const O = e.plan.value, N = Me(O, C.anchor), K = Me(O, C.focus, C.anchor), G = Fn(O, C.anchor), B = M.flatMap(($, P) => $.map((q, T) => {
|
|
3441
3398
|
const V = G(Math.min(N.row, K.row) + P, Math.min(N.column, K.column) + T);
|
|
3442
3399
|
if (!V) throw new ze("missing");
|
|
3443
3400
|
return { address: V, value: q };
|
|
3444
3401
|
}));
|
|
3445
3402
|
return await e.apply(B);
|
|
3446
|
-
} catch (
|
|
3447
|
-
return e.error(
|
|
3403
|
+
} catch (M) {
|
|
3404
|
+
return e.error(M), !1;
|
|
3448
3405
|
}
|
|
3449
3406
|
}
|
|
3450
3407
|
function Y(y) {
|
|
@@ -3455,13 +3412,13 @@ function li(e) {
|
|
|
3455
3412
|
async function te(y) {
|
|
3456
3413
|
const C = e.plan.value;
|
|
3457
3414
|
if (!C) return !1;
|
|
3458
|
-
const
|
|
3415
|
+
const M = Kt(C);
|
|
3459
3416
|
for (let O = 0; O < C.pages.length; O++) {
|
|
3460
3417
|
const N = C.pages[O];
|
|
3461
3418
|
for (let K = 0; K < N.components.length; K++)
|
|
3462
3419
|
for (const G of w({ pageIndex: O, componentIndex: K, rowIndex: 0, columnIndex: 0 })) {
|
|
3463
|
-
const B =
|
|
3464
|
-
if (
|
|
3420
|
+
const B = M(G);
|
|
3421
|
+
if (Xl(B, y))
|
|
3465
3422
|
return f(G);
|
|
3466
3423
|
}
|
|
3467
3424
|
}
|
|
@@ -3470,9 +3427,9 @@ function li(e) {
|
|
|
3470
3427
|
function ne() {
|
|
3471
3428
|
n.value = null, l();
|
|
3472
3429
|
}
|
|
3473
|
-
return { selection: n, refresh: l, reset: ne, focusCell: f, focusField: te, navigate: k, onClick: m, onKeydown:
|
|
3430
|
+
return { selection: n, refresh: l, reset: ne, focusCell: f, focusField: te, navigate: k, onClick: m, onKeydown: R, onCopy: J, onPaste: Y, copySelection: H, pasteSelection: Z };
|
|
3474
3431
|
}
|
|
3475
|
-
function
|
|
3432
|
+
function ri(e) {
|
|
3476
3433
|
let t = 0, n = !1;
|
|
3477
3434
|
function a() {
|
|
3478
3435
|
const o = e.viewport.value, r = e.root.value, l = e.plan.value;
|
|
@@ -3484,13 +3441,13 @@ function ii(e) {
|
|
|
3484
3441
|
const w = m.closest("[data-page]"), p = Number(w?.dataset.page) - 1, u = l.pages[p]?.components[Number(m.dataset.mrComponentIndex)];
|
|
3485
3442
|
if (!u?.grid || !w) return;
|
|
3486
3443
|
m.style.transform = "", m.style.zIndex = "";
|
|
3487
|
-
const i = m.getBoundingClientRect(), k = w.getBoundingClientRect().bottom,
|
|
3488
|
-
|
|
3444
|
+
const i = m.getBoundingClientRect(), k = w.getBoundingClientRect().bottom, R = Math.max(0, (f.left - i.left) / h), D = c.freezeHeaders ? Math.max(0, Math.min((f.top - i.top) / h, (k - i.bottom) / h)) : 0;
|
|
3445
|
+
R > 0 && v > 0 && (m.style.zIndex = "1"), u.table?.role === "header" && D > 0 && (m.style.transform = `translateY(${D}px)`, m.style.zIndex = "5"), m.querySelectorAll(".mrp-cell-frozen").forEach((z) => {
|
|
3489
3446
|
z.style.transform = "", z.style.zIndex = "", z.classList.remove("mrp-cell-frozen");
|
|
3490
3447
|
});
|
|
3491
|
-
const A = Array.from({ length: v }, (z,
|
|
3448
|
+
const A = Array.from({ length: v }, (z, H) => `td[data-mr-column-index="${H}"]`);
|
|
3492
3449
|
!u.table && c.freezeHeaders && A.push('td[data-mr-row-index="0"]'), A.length && m.querySelectorAll(A.join(",")).forEach((z) => {
|
|
3493
|
-
const
|
|
3450
|
+
const H = Number(z.dataset.mrColumnIndex) < v, J = !u.table && Number(z.dataset.mrRowIndex) === 0 && !!c.freezeHeaders, Z = H ? R : 0, Y = J ? D : 0;
|
|
3494
3451
|
z.style.transform = Z || Y ? `translate(${Z}px, ${Y}px)` : "", z.classList.toggle("mrp-cell-frozen", !!(Z || Y)), z.style.zIndex = Z || Y ? J ? "7" : "6" : "";
|
|
3495
3452
|
});
|
|
3496
3453
|
}), n = !!c.freezeHeaders || v > 0;
|
|
@@ -3519,13 +3476,13 @@ function Xn(e, t) {
|
|
|
3519
3476
|
if (!n.ok) throw new ke("validate", `渲染计划校验失败(${n.errors.length} 处): ${n.errors.slice(0, 3).map((a) => `${a.path}: ${a.message}`).join("; ")}`);
|
|
3520
3477
|
n.warnings.forEach((a) => t(`${a.path}: ${a.message}`));
|
|
3521
3478
|
}
|
|
3522
|
-
async function
|
|
3479
|
+
async function li(e, t, n, a) {
|
|
3523
3480
|
const s = await Ge(e(t), t.signal);
|
|
3524
3481
|
return Ae(t.signal), a("validate"), Xn(s, t.onWarning ?? (() => {
|
|
3525
3482
|
})), Ae(t.signal), a("assets"), Yn(s, n, t.signal, t.onWarning ?? (() => {
|
|
3526
3483
|
}));
|
|
3527
3484
|
}
|
|
3528
|
-
async function
|
|
3485
|
+
async function ii(e, t, n, a, s, o) {
|
|
3529
3486
|
const { importExcelTemplate: r } = await import("@agile-team/mach-report/xlsx");
|
|
3530
3487
|
Ae(a);
|
|
3531
3488
|
const l = await Ge(r(e, { ...t, signal: a }), a);
|
|
@@ -3535,28 +3492,28 @@ async function ci(e, t, n, a, s, o) {
|
|
|
3535
3492
|
const v = await Yn(c, n, a, s);
|
|
3536
3493
|
return { result: l, plan: v };
|
|
3537
3494
|
}
|
|
3538
|
-
const
|
|
3495
|
+
const ui = {
|
|
3539
3496
|
key: 7,
|
|
3540
3497
|
class: "mrp-edit-hint",
|
|
3541
3498
|
role: "status"
|
|
3542
|
-
},
|
|
3499
|
+
}, ci = {
|
|
3543
3500
|
key: 9,
|
|
3544
3501
|
class: "mrp-export-notice mrp-export-warning",
|
|
3545
3502
|
role: "status"
|
|
3546
|
-
},
|
|
3503
|
+
}, di = { class: "mrp-main" }, fi = {
|
|
3547
3504
|
key: 0,
|
|
3548
3505
|
class: "mrp-state"
|
|
3549
|
-
},
|
|
3506
|
+
}, mi = {
|
|
3550
3507
|
key: 1,
|
|
3551
3508
|
class: "mrp-state mrp-error"
|
|
3552
|
-
},
|
|
3509
|
+
}, gi = ["data-page"], pi = ["aria-label", "aria-current", "onClick"], vi = ["data-thumb"], hi = { class: "mrp-thumb-no" }, bi = {
|
|
3553
3510
|
key: 10,
|
|
3554
3511
|
class: "mrp-footer"
|
|
3555
|
-
},
|
|
3512
|
+
}, yi = { class: "mrp-footer-context" }, wi = ["aria-label"], xi = { key: 0 }, ki = { class: "mrp-overlay" }, Ei = {
|
|
3556
3513
|
key: 11,
|
|
3557
3514
|
class: "mrp-debug",
|
|
3558
3515
|
"aria-hidden": "true"
|
|
3559
|
-
}, Bt = 96 / 25.4, Nt = "mach-report:ui",
|
|
3516
|
+
}, Bt = 96 / 25.4, Nt = "mach-report:ui", jt = "mach-report:ui:wide", Ci = /* @__PURE__ */ be({
|
|
3560
3517
|
__name: "ReportPreview",
|
|
3561
3518
|
props: {
|
|
3562
3519
|
reportId: {
|
|
@@ -3607,11 +3564,11 @@ const di = {
|
|
|
3607
3564
|
},
|
|
3608
3565
|
emits: ["loaded", "task", "diagnostic", "error", "warning", "cell-edit", "template-import", "preferences-change"],
|
|
3609
3566
|
setup(e, { expose: t, emit: n }) {
|
|
3610
|
-
const a = e, s = n, o = le(null), r = W(!1), l = W(""), c = le(null), v = W(null), h = W(!1), f = W(null), m = W(1), w = W(null), p = W(null), u = W(null), i = W(!1), k = W(!1),
|
|
3567
|
+
const a = e, s = n, o = le(null), r = W(!1), l = W(""), c = le(null), v = W(null), h = W(!1), f = W(null), m = W(1), w = W(null), p = W(null), u = W(null), i = W(!1), k = W(!1), R = W(!1), D = W("general"), A = le(null), z = W(null), H = W(null), J = ws();
|
|
3611
3568
|
let Z = null, Y = !1;
|
|
3612
|
-
const te =
|
|
3613
|
-
let
|
|
3614
|
-
const O = gt(es, null), N = gt(ts, null), K = F(() =>
|
|
3569
|
+
const te = Cr((g) => s("task", g)), ne = $r((g) => s("diagnostic", g)), y = le(null), C = F(() => !!o.value?.pages.length && o.value.pages.every((g) => g.layout === "wide"));
|
|
3570
|
+
let M = Nt;
|
|
3571
|
+
const O = gt(es, null), N = gt(ts, null), K = F(() => jn(a.reportId)), G = F(() => a.fetcher ?? O), B = F(() => o.value?.pages.length ?? 0), $ = F(() => Object.freeze({
|
|
3615
3572
|
loading: r.value,
|
|
3616
3573
|
hasPlan: B.value > 0,
|
|
3617
3574
|
pageCount: B.value,
|
|
@@ -3659,7 +3616,7 @@ const di = {
|
|
|
3659
3616
|
persistedEditing: tn,
|
|
3660
3617
|
emptyStateContent: yt,
|
|
3661
3618
|
sessionInteraction: wt
|
|
3662
|
-
} =
|
|
3619
|
+
} = Zl(a, C, (g) => s("warning", g)), nn = F(() => ge.value.pdf || ge.value.pdfWindow), xt = F(() => we.value.calculations === !0), kt = F(() => Rl(T.value)), { pdfFont: an, getPdfExporter: ta, checkPdfFont: na, retryPdfFont: sn, cancelFontCheck: aa } = xr({
|
|
3663
3620
|
plan: o,
|
|
3664
3621
|
fontUrl: () => q.value.pdfFontUrl,
|
|
3665
3622
|
enabled: () => nn.value,
|
|
@@ -3673,11 +3630,11 @@ const di = {
|
|
|
3673
3630
|
await U.commit() && (en.reset(), wt.value = {}, s("preferences-change", Object.freeze({ ...ge.value })));
|
|
3674
3631
|
}
|
|
3675
3632
|
async function on(g = "general") {
|
|
3676
|
-
if (
|
|
3677
|
-
|
|
3633
|
+
if (R.value) {
|
|
3634
|
+
R.value = !1;
|
|
3678
3635
|
return;
|
|
3679
3636
|
}
|
|
3680
|
-
!await U.commit() || Y || !Q.value || (D.value = g,
|
|
3637
|
+
!await U.commit() || Y || !Q.value || (D.value = g, R.value = !0);
|
|
3681
3638
|
}
|
|
3682
3639
|
function rn(g) {
|
|
3683
3640
|
return g instanceof ze ? {
|
|
@@ -3692,7 +3649,7 @@ const di = {
|
|
|
3692
3649
|
clipboard: T.value.clipboardInvalid
|
|
3693
3650
|
}[g.code] ?? g.message : g instanceof Error ? g.message : "单元格保存失败";
|
|
3694
3651
|
}
|
|
3695
|
-
const U =
|
|
3652
|
+
const U = Gl({
|
|
3696
3653
|
plan: o,
|
|
3697
3654
|
options: Je,
|
|
3698
3655
|
blocked: () => r.value || k.value || v.value !== null || h.value || Pe.pending.value,
|
|
@@ -3706,7 +3663,7 @@ const di = {
|
|
|
3706
3663
|
f.value = { kind: "error", message: g }, P(g, "edit", S);
|
|
3707
3664
|
},
|
|
3708
3665
|
onNavigate: (g, S, L) => ae.navigate(g, S, L)
|
|
3709
|
-
}), ae =
|
|
3666
|
+
}), ae = oi({
|
|
3710
3667
|
plan: o,
|
|
3711
3668
|
root: w,
|
|
3712
3669
|
enabled: () => !!Je.value || xt.value,
|
|
@@ -3722,11 +3679,11 @@ const di = {
|
|
|
3722
3679
|
const S = rn(g);
|
|
3723
3680
|
f.value = { kind: "error", message: S }, P(S, "edit", g);
|
|
3724
3681
|
}
|
|
3725
|
-
}), Et =
|
|
3682
|
+
}), Et = $o({ plan: o, selection: ae.selection, enabled: () => xt.value });
|
|
3726
3683
|
function ra() {
|
|
3727
3684
|
on("advanced");
|
|
3728
3685
|
}
|
|
3729
|
-
const Pe =
|
|
3686
|
+
const Pe = kr({
|
|
3730
3687
|
pending: () => U.pendingLocalChanges.value,
|
|
3731
3688
|
reportIds: () => y.value?.reportIds ?? K.value,
|
|
3732
3689
|
hook: () => a.beforeDiscard ?? q.value.beforeDiscard,
|
|
@@ -3778,7 +3735,7 @@ const di = {
|
|
|
3778
3735
|
} catch (g) {
|
|
3779
3736
|
return { defs: [], error: new ke("config", g instanceof Error ? g.message : "查询参数配置无效", g) };
|
|
3780
3737
|
}
|
|
3781
|
-
}), It = F(() => $t.value.defs), Ze =
|
|
3738
|
+
}), It = F(() => $t.value.defs), Ze = Sr({ defs: It, reportIds: K, params: () => a.params, messages: () => T.value }), { values: Ye, attempted: lt, pendingRequired: fn } = Ze, mn = W(null);
|
|
3782
3739
|
function ca() {
|
|
3783
3740
|
lt.value = !0, Ze.validation.value.ok || Fe(() => mn.value?.focusInvalid()), Ne();
|
|
3784
3741
|
}
|
|
@@ -3788,7 +3745,7 @@ const di = {
|
|
|
3788
3745
|
const fa = F(() => ({
|
|
3789
3746
|
height: a.height,
|
|
3790
3747
|
"--mrp-page-gap": `${Math.max(0, _t.value)}px`,
|
|
3791
|
-
...
|
|
3748
|
+
...Ol(q.value.theme)
|
|
3792
3749
|
})), { zoom: ve, zoomMode: Xe, applyFitZoom: gn, setZoom: Qe } = os(() => ({
|
|
3793
3750
|
viewport: p.value,
|
|
3794
3751
|
pageWidthPx: Pt.contentSize.value.w || 210 * Bt
|
|
@@ -3796,8 +3753,8 @@ const di = {
|
|
|
3796
3753
|
pxPerMm: Bt,
|
|
3797
3754
|
gapPx: _t,
|
|
3798
3755
|
overscan: F(() => q.value.preview.overscanPages)
|
|
3799
|
-
}), { contentSize: St, windowRange: _e, visiblePages: pn, makeScrollHandler: ma, refreshViewport:
|
|
3800
|
-
oe([we, ve], () =>
|
|
3756
|
+
}), { contentSize: St, windowRange: _e, visiblePages: pn, makeScrollHandler: ma, refreshViewport: Rt } = Pt, ga = ma(m, B), Mt = ri({ root: w, viewport: p, plan: o, zoom: ve, options: () => we.value });
|
|
3757
|
+
oe([we, ve], () => Mt.schedule(), { flush: "post" });
|
|
3801
3758
|
function Tt(g) {
|
|
3802
3759
|
Qe(g * 100);
|
|
3803
3760
|
}
|
|
@@ -3844,40 +3801,40 @@ const di = {
|
|
|
3844
3801
|
r.value = !0, l.value = "", f.value = null, Be();
|
|
3845
3802
|
const ue = J.start(), _ = new AbortController();
|
|
3846
3803
|
de = _;
|
|
3847
|
-
const
|
|
3804
|
+
const Re = te.start("query", "query", () => {
|
|
3848
3805
|
de === _ && (_.abort(), ce++, de = null, r.value = !1);
|
|
3849
3806
|
}), ut = [...K.value], $e = Object.freeze({ ...L }), Te = /* @__PURE__ */ new Set();
|
|
3850
|
-
function Ke(
|
|
3851
|
-
g !== ce || _.signal.aborted || Te.has(
|
|
3807
|
+
function Ke(he) {
|
|
3808
|
+
g !== ce || _.signal.aborted || Te.has(he) || (Te.add(he), q.value.logger.warn("[mach-report] 报表告警:", he), ne.add({ code: "layout", severity: "warning", message: he }), s("warning", he));
|
|
3852
3809
|
}
|
|
3853
3810
|
try {
|
|
3854
|
-
const
|
|
3811
|
+
const he = await li(S, {
|
|
3855
3812
|
reportIds: ut,
|
|
3856
3813
|
params: L,
|
|
3857
|
-
taskId:
|
|
3814
|
+
taskId: Re.taskId,
|
|
3858
3815
|
onEvent: (qe) => {
|
|
3859
|
-
g === ce && !_.signal.aborted &&
|
|
3816
|
+
g === ce && !_.signal.aborted && Re.update(qe.stage, qe.completed, qe.total);
|
|
3860
3817
|
},
|
|
3861
3818
|
onQueryResult: (qe, Sa) => {
|
|
3862
3819
|
g === ce && !_.signal.aborted && ne.addMany(Sa.diagnostics ?? []);
|
|
3863
3820
|
},
|
|
3864
3821
|
signal: _.signal,
|
|
3865
3822
|
onWarning: Ke
|
|
3866
|
-
}, st.value,
|
|
3867
|
-
if (!it(g, _) || (o.value =
|
|
3868
|
-
|
|
3869
|
-
const We = C.value ?
|
|
3870
|
-
We !==
|
|
3871
|
-
} catch (
|
|
3823
|
+
}, st.value, Re.update);
|
|
3824
|
+
if (!it(g, _) || (o.value = he, y.value = Object.freeze({ reportIds: Object.freeze(ut), params: $e }), ne.inspect(he, "dom"), !it(g, _))) return;
|
|
3825
|
+
Re.finish(), m.value = 1, J.end(ue), vn();
|
|
3826
|
+
const We = C.value ? jt : Nt;
|
|
3827
|
+
We !== M && (M = We, Ft()), Xe.value === "fit" && gn(), s("loaded", he.pages.length);
|
|
3828
|
+
} catch (he) {
|
|
3872
3829
|
if (g !== ce) return;
|
|
3873
3830
|
if (_.signal.aborted) {
|
|
3874
|
-
|
|
3831
|
+
Re.finish("cancelled");
|
|
3875
3832
|
return;
|
|
3876
3833
|
}
|
|
3877
|
-
|
|
3878
|
-
const We =
|
|
3834
|
+
Re.finish("failed");
|
|
3835
|
+
const We = vr(he);
|
|
3879
3836
|
l.value = We.message;
|
|
3880
|
-
const qe =
|
|
3837
|
+
const qe = pr(We);
|
|
3881
3838
|
P(We.message, qe.code, qe.cause);
|
|
3882
3839
|
} finally {
|
|
3883
3840
|
g === ce && (r.value = !1), de === _ && (de = null);
|
|
@@ -3888,11 +3845,11 @@ const di = {
|
|
|
3888
3845
|
const S = Math.max(1, Math.min(B.value, g));
|
|
3889
3846
|
m.value = S;
|
|
3890
3847
|
const L = p.value;
|
|
3891
|
-
L && (L.scrollTop = Pt.pageOffsetPx(S - 1) * ve.value,
|
|
3848
|
+
L && (L.scrollTop = Pt.pageOffsetPx(S - 1) * ve.value, Rt(L), Ia.prioritize(S - 1));
|
|
3892
3849
|
}
|
|
3893
|
-
const
|
|
3850
|
+
const je = is(o, {
|
|
3894
3851
|
getPdfExporter: ta,
|
|
3895
|
-
onTask: (g) => te.receive(g, () =>
|
|
3852
|
+
onTask: (g) => te.receive(g, () => je.cancel()),
|
|
3896
3853
|
onDiagnostic: ne.add,
|
|
3897
3854
|
getXlsxOptions: () => q.value.xlsx,
|
|
3898
3855
|
onError: (g, S) => {
|
|
@@ -3910,19 +3867,19 @@ const di = {
|
|
|
3910
3867
|
onPrinting: (g) => {
|
|
3911
3868
|
h.value = g;
|
|
3912
3869
|
}
|
|
3913
|
-
}), { releasePrintFrame: hn, dispose: ha } =
|
|
3870
|
+
}), { releasePrintFrame: hn, dispose: ha } = je;
|
|
3914
3871
|
async function bn() {
|
|
3915
|
-
r.value || k.value || U.active.value && !await U.commit() || (c.value = null, Ct("html") && await
|
|
3872
|
+
r.value || k.value || U.active.value && !await U.commit() || (c.value = null, Ct("html") && await je.print());
|
|
3916
3873
|
}
|
|
3917
3874
|
async function yn(g) {
|
|
3918
|
-
r.value || k.value || U.active.value && !await U.commit() || (c.value = null, Ct(g) && await
|
|
3875
|
+
r.value || k.value || U.active.value && !await U.commit() || (c.value = null, Ct(g) && await je.exportAs(g));
|
|
3919
3876
|
}
|
|
3920
3877
|
function wn() {
|
|
3921
3878
|
if (r.value || k.value || U.active.value) {
|
|
3922
3879
|
f.value = { kind: "warning", message: T.value.editingHint ?? "请先确认单元格修改" };
|
|
3923
3880
|
return;
|
|
3924
3881
|
}
|
|
3925
|
-
c.value = null, Ct("pdf") &&
|
|
3882
|
+
c.value = null, Ct("pdf") && je.openPdfWindow();
|
|
3926
3883
|
}
|
|
3927
3884
|
async function ba(g, S = {}) {
|
|
3928
3885
|
Y || (Ye.value = { ...Ye.value, ...g }, S.reload !== !1 && (lt.value = !0, await Ne()));
|
|
@@ -3963,23 +3920,23 @@ const di = {
|
|
|
3963
3920
|
return { ...S, ...g, limits: { ...S.limits, ...g?.limits } };
|
|
3964
3921
|
}
|
|
3965
3922
|
function xa(g, S) {
|
|
3966
|
-
U.reset(), ae.reset(), hn(), se.reset(), o.value = g, y.value = null, ne.reset(), A.value = { sheets: Ce(S.sheets), warnings: [...S.warnings] }, m.value = 1, l.value = "", f.value = S.warnings.length ? { kind: "warning", message: S.warnings.join(";") } : null, vn(),
|
|
3923
|
+
U.reset(), ae.reset(), hn(), se.reset(), o.value = g, y.value = null, ne.reset(), A.value = { sheets: Ce(S.sheets), warnings: [...S.warnings] }, m.value = 1, l.value = "", f.value = S.warnings.length ? { kind: "warning", message: S.warnings.join(";") } : null, vn(), M = C.value ? jt : Nt, Ft(), ne.addMany(S.warnings.map((L) => ({ code: "excel-import", severity: "warning", message: L }))), o.value === g && ne.inspect(g, "dom");
|
|
3967
3924
|
}
|
|
3968
3925
|
async function kn(g, S) {
|
|
3969
3926
|
if (Y) throw new ke("config", "报表预览已卸载");
|
|
3970
3927
|
if (ie.value && U.pendingLocalChanges.value && !await Pe.check("import") || Y) return null;
|
|
3971
3928
|
const L = ++ce;
|
|
3972
|
-
de?.abort(), de = null, r.value = !1, U.cancel(),
|
|
3929
|
+
de?.abort(), de = null, r.value = !1, U.cancel(), je.invalidatePending(), k.value = !0;
|
|
3973
3930
|
const ue = new AbortController();
|
|
3974
3931
|
de = ue, c.value = null, f.value = { kind: "progress", message: T.value.importing ?? "正在导入 Excel…" };
|
|
3975
3932
|
const _ = te.start("import", "import", () => {
|
|
3976
3933
|
de === ue && (ue.abort(), ce++, de = null, k.value = !1, f.value = null);
|
|
3977
|
-
}),
|
|
3934
|
+
}), Re = wa(S), ut = Xa(Re.signal, ue);
|
|
3978
3935
|
try {
|
|
3979
|
-
const { result: $e, plan: Te } = await
|
|
3980
|
-
...
|
|
3981
|
-
onProgress: (Ke,
|
|
3982
|
-
_.update("import", Ke,
|
|
3936
|
+
const { result: $e, plan: Te } = await ii(g, {
|
|
3937
|
+
...Re,
|
|
3938
|
+
onProgress: (Ke, he) => {
|
|
3939
|
+
_.update("import", Ke, he), Re.onProgress?.(Ke, he);
|
|
3983
3940
|
}
|
|
3984
3941
|
}, st.value, ue.signal, (Ke) => {
|
|
3985
3942
|
L === ce && s("warning", Ke);
|
|
@@ -4017,7 +3974,7 @@ const di = {
|
|
|
4017
3974
|
function Ca(g) {
|
|
4018
3975
|
if (!ae.onKeydown(g) && !(g.target instanceof Element && g.target.closest("input,textarea,select,[contenteditable='true']"))) {
|
|
4019
3976
|
if (ge.value.search && (g.ctrlKey || g.metaKey) && g.key.toLowerCase() === "f") {
|
|
4020
|
-
g.preventDefault(), se.visible.value || se.toggle(), Fe(() =>
|
|
3977
|
+
g.preventDefault(), se.visible.value || se.toggle(), Fe(() => H.value?.focusSearch());
|
|
4021
3978
|
return;
|
|
4022
3979
|
}
|
|
4023
3980
|
switch (g.key) {
|
|
@@ -4046,7 +4003,7 @@ const di = {
|
|
|
4046
4003
|
function $a() {
|
|
4047
4004
|
try {
|
|
4048
4005
|
localStorage.setItem(
|
|
4049
|
-
|
|
4006
|
+
M,
|
|
4050
4007
|
JSON.stringify({ zoomMode: Xe.value === "fit" ? "fit" : Math.round(ve.value * 100) })
|
|
4051
4008
|
);
|
|
4052
4009
|
} catch {
|
|
@@ -4074,7 +4031,7 @@ const di = {
|
|
|
4074
4031
|
clear: se.clear,
|
|
4075
4032
|
highlight: se.apply,
|
|
4076
4033
|
mounted: (g) => {
|
|
4077
|
-
ae.refresh(g),
|
|
4034
|
+
ae.refresh(g), Mt.schedule();
|
|
4078
4035
|
},
|
|
4079
4036
|
ready: () => {
|
|
4080
4037
|
se.activeMatch.value || (Dt = ""), En();
|
|
@@ -4105,7 +4062,7 @@ const di = {
|
|
|
4105
4062
|
Da(() => {
|
|
4106
4063
|
Se.schedule();
|
|
4107
4064
|
}, { flush: "post" });
|
|
4108
|
-
const Pa = F(() => a.debug), { debugStats:
|
|
4065
|
+
const Pa = F(() => a.debug), { debugStats: He } = bs(Pa, {
|
|
4109
4066
|
plan: o,
|
|
4110
4067
|
pageCount: B,
|
|
4111
4068
|
windowRange: _e,
|
|
@@ -4113,18 +4070,18 @@ const di = {
|
|
|
4113
4070
|
loadMs: J.loadMs
|
|
4114
4071
|
});
|
|
4115
4072
|
function At() {
|
|
4116
|
-
|
|
4073
|
+
Rt(p.value), Se.schedule(), Xe.value === "fit" && gn(), En(!0);
|
|
4117
4074
|
}
|
|
4118
4075
|
function Ft() {
|
|
4119
|
-
Qe(
|
|
4076
|
+
Qe(M === jt ? 100 : "fit");
|
|
4120
4077
|
try {
|
|
4121
|
-
const g = JSON.parse(localStorage.getItem(
|
|
4078
|
+
const g = JSON.parse(localStorage.getItem(M) ?? "{}");
|
|
4122
4079
|
g.zoomMode === "fit" ? Qe("fit") : typeof g.zoomMode == "number" && Qe(g.zoomMode);
|
|
4123
4080
|
} catch {
|
|
4124
4081
|
}
|
|
4125
4082
|
}
|
|
4126
4083
|
return bt(() => {
|
|
4127
|
-
window.addEventListener("resize", At), window.addEventListener("beforeunload", ln), typeof ResizeObserver < "u" && p.value && (Z = new ResizeObserver(At), Z.observe(p.value)),
|
|
4084
|
+
window.addEventListener("resize", At), window.addEventListener("beforeunload", ln), typeof ResizeObserver < "u" && p.value && (Z = new ResizeObserver(At), Z.observe(p.value)), Rt(p.value), Ft(), a.autoLoad && Ne();
|
|
4128
4085
|
}), Qt(() => {
|
|
4129
4086
|
Y = !0, Pe.cancel(), te.cancel(), U.reset(), k.value = !1, aa(), ce++, de?.abort(), de = null, window.removeEventListener("resize", At), window.removeEventListener("beforeunload", ln), Z?.disconnect(), Z = null, Se.destroy(), se.reset(), ha();
|
|
4130
4087
|
}), oe(
|
|
@@ -4140,7 +4097,7 @@ const di = {
|
|
|
4140
4097
|
class: pe(["mach-report-preview", { "mrp-wide-report": C.value }]),
|
|
4141
4098
|
style: De(fa.value)
|
|
4142
4099
|
}, [
|
|
4143
|
-
d(Qn) && It.value.length > 0 ? (E(), Ie(
|
|
4100
|
+
d(Qn) && It.value.length > 0 ? (E(), Ie(Nr, {
|
|
4144
4101
|
key: 0,
|
|
4145
4102
|
ref_key: "paramPanelRef",
|
|
4146
4103
|
ref: mn,
|
|
@@ -4152,10 +4109,10 @@ const di = {
|
|
|
4152
4109
|
issues: d(Ze).validation.value.issues,
|
|
4153
4110
|
onQuery: ca,
|
|
4154
4111
|
onReset: da
|
|
4155
|
-
}, null, 8, ["defs", "modelValue", "messages", "attempted", "issues"])) :
|
|
4156
|
-
X(
|
|
4112
|
+
}, null, 8, ["defs", "modelValue", "messages", "attempted", "issues"])) : j("", !0),
|
|
4113
|
+
X(ro, {
|
|
4157
4114
|
ref_key: "toolbarRef",
|
|
4158
|
-
ref:
|
|
4115
|
+
ref: H,
|
|
4159
4116
|
"page-count": B.value,
|
|
4160
4117
|
"current-page": m.value,
|
|
4161
4118
|
"zoom-mode": d(Xe),
|
|
@@ -4168,7 +4125,7 @@ const di = {
|
|
|
4168
4125
|
"show-zoom": d(ge).zoom,
|
|
4169
4126
|
"export-formats": d(ea),
|
|
4170
4127
|
"show-settings": d(Q),
|
|
4171
|
-
"settings-open":
|
|
4128
|
+
"settings-open": R.value,
|
|
4172
4129
|
messages: d(T),
|
|
4173
4130
|
search: { visible: d(se).visible.value, query: d(se).query.value, matchIndex: d(se).matchIndex.value, matchCount: d(se).matchCount.value, searching: d(se).searching.value },
|
|
4174
4131
|
"thumbs-visible": i.value,
|
|
@@ -4200,27 +4157,27 @@ const di = {
|
|
|
4200
4157
|
onLocateTarget: cn,
|
|
4201
4158
|
onGoto: xe,
|
|
4202
4159
|
onLocate: dn
|
|
4203
|
-
}, null, 8, ["plan", "sections", "current-page", "messages", "busy"])) :
|
|
4160
|
+
}, null, 8, ["plan", "sections", "current-page", "messages", "busy"])) : j("", !0)
|
|
4204
4161
|
]),
|
|
4205
4162
|
key: "0"
|
|
4206
4163
|
} : void 0
|
|
4207
4164
|
]), 1032, ["page-count", "current-page", "zoom-mode", "zoom", "show-export", "show-print", "show-pdf-window", "show-search", "show-thumbnails", "show-zoom", "export-formats", "show-settings", "settings-open", "messages", "search", "thumbs-visible", "show-import", "busy", "onZoom", "onSearchInput", "onSearchNav", "onSearchToggle"]),
|
|
4208
|
-
d(Pe).request.value ? (E(), Ie(
|
|
4165
|
+
d(Pe).request.value ? (E(), Ie(nr, {
|
|
4209
4166
|
key: 1,
|
|
4210
4167
|
messages: d(T),
|
|
4211
4168
|
onAnswer: d(Pe).settle
|
|
4212
|
-
}, null, 8, ["messages", "onAnswer"])) :
|
|
4213
|
-
X(
|
|
4169
|
+
}, null, 8, ["messages", "onAnswer"])) : j("", !0),
|
|
4170
|
+
X(lr, {
|
|
4214
4171
|
task: d(te).state.value,
|
|
4215
4172
|
messages: d(T),
|
|
4216
4173
|
onCancel: un
|
|
4217
4174
|
}, null, 8, ["task", "messages"]),
|
|
4218
|
-
X(
|
|
4175
|
+
X(gr, {
|
|
4219
4176
|
entries: d(ne).entries.value,
|
|
4220
4177
|
messages: d(T),
|
|
4221
4178
|
onLocate: ia
|
|
4222
4179
|
}, null, 8, ["entries", "messages"]),
|
|
4223
|
-
|
|
4180
|
+
R.value && d(Q) ? (E(), Ie(Yo, {
|
|
4224
4181
|
key: 2,
|
|
4225
4182
|
available: d(_n),
|
|
4226
4183
|
enabled: d(ge),
|
|
@@ -4233,10 +4190,10 @@ const di = {
|
|
|
4233
4190
|
onInteraction: S[5] || (S[5] = (L) => wt.value = { ...d(wt), ...L }),
|
|
4234
4191
|
onChange: sa,
|
|
4235
4192
|
onReset: oa,
|
|
4236
|
-
onClose: S[6] || (S[6] = (L) =>
|
|
4193
|
+
onClose: S[6] || (S[6] = (L) => R.value = !1)
|
|
4237
4194
|
}, {
|
|
4238
4195
|
advanced: Ot(() => [
|
|
4239
|
-
X(
|
|
4196
|
+
X(Co, {
|
|
4240
4197
|
state: d(Et),
|
|
4241
4198
|
messages: kt.value
|
|
4242
4199
|
}, null, 8, ["state", "messages"])
|
|
@@ -4245,7 +4202,7 @@ const di = {
|
|
|
4245
4202
|
at(g.$slots, "settings", {}, void 0, !0)
|
|
4246
4203
|
]),
|
|
4247
4204
|
_: 3
|
|
4248
|
-
}, 8, ["available", "enabled", "messages", "persisted-editing", "interaction", "section", "busy"])) :
|
|
4205
|
+
}, 8, ["available", "enabled", "messages", "persisted-editing", "interaction", "section", "busy"])) : j("", !0),
|
|
4249
4206
|
rt.value.length > 1 && B.value > 0 && d(we).navigation !== !1 ? (E(), Ie(Tn, {
|
|
4250
4207
|
key: 3,
|
|
4251
4208
|
plan: o.value,
|
|
@@ -4256,13 +4213,13 @@ const di = {
|
|
|
4256
4213
|
busy: r.value || k.value || d(U).saving.value,
|
|
4257
4214
|
onGoto: xe,
|
|
4258
4215
|
onLocate: dn
|
|
4259
|
-
}, null, 8, ["plan", "sections", "current-page", "messages", "busy"])) :
|
|
4260
|
-
A.value ? (E(), Ie(
|
|
4216
|
+
}, null, 8, ["plan", "sections", "current-page", "messages", "busy"])) : j("", !0),
|
|
4217
|
+
A.value ? (E(), Ie(Sl, {
|
|
4261
4218
|
key: 4,
|
|
4262
4219
|
result: A.value,
|
|
4263
4220
|
messages: d(T)
|
|
4264
|
-
}, null, 8, ["result", "messages"])) :
|
|
4265
|
-
d(Je) && B.value > 0 ? (E(), Ie(
|
|
4221
|
+
}, null, 8, ["result", "messages"])) : j("", !0),
|
|
4222
|
+
d(Je) && B.value > 0 ? (E(), Ie(nl, {
|
|
4266
4223
|
key: 5,
|
|
4267
4224
|
differences: d(U).differences.value,
|
|
4268
4225
|
conflicts: d(U).conflicts.value,
|
|
@@ -4276,7 +4233,7 @@ const di = {
|
|
|
4276
4233
|
onRedo: d(U).redo,
|
|
4277
4234
|
onRestore: d(U).restore,
|
|
4278
4235
|
onLocate: S[7] || (S[7] = (L) => d(ae).focusCell(L.address))
|
|
4279
|
-
}, null, 8, ["differences", "conflicts", "messages", "saving", "can-undo", "can-redo", "persisted", "busy", "onUndo", "onRedo", "onRestore"])) :
|
|
4236
|
+
}, null, 8, ["differences", "conflicts", "messages", "saving", "can-undo", "can-redo", "persisted", "busy", "onUndo", "onRedo", "onRestore"])) : j("", !0),
|
|
4280
4237
|
d(ot) ? (E(), I("input", {
|
|
4281
4238
|
key: 6,
|
|
4282
4239
|
ref_key: "importInputRef",
|
|
@@ -4286,22 +4243,22 @@ const di = {
|
|
|
4286
4243
|
accept: ".xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
4287
4244
|
hidden: "",
|
|
4288
4245
|
onChange: ka
|
|
4289
|
-
}, null, 544)) :
|
|
4290
|
-
d(Je) && B.value > 0 ? (E(), I("div",
|
|
4246
|
+
}, null, 544)) : j("", !0),
|
|
4247
|
+
d(Je) && B.value > 0 ? (E(), I("div", ui, x(d(U).saving.value ? d(T).saving : d(T).editingHint), 1)) : j("", !0),
|
|
4291
4248
|
f.value ? (E(), I("div", {
|
|
4292
4249
|
key: 8,
|
|
4293
4250
|
class: pe(["mrp-export-notice", `mrp-export-${f.value.kind}`]),
|
|
4294
4251
|
role: "alert"
|
|
4295
|
-
}, x(f.value.message), 3)) :
|
|
4296
|
-
d(an).status === "error" && nn.value ? (E(), I("div",
|
|
4252
|
+
}, x(f.value.message), 3)) : j("", !0),
|
|
4253
|
+
d(an).status === "error" && nn.value ? (E(), I("div", ci, [
|
|
4297
4254
|
re(x(d(T).pdfFontUnavailable) + " ", 1),
|
|
4298
4255
|
b("button", {
|
|
4299
4256
|
type: "button",
|
|
4300
4257
|
onClick: S[8] || (S[8] = //@ts-ignore
|
|
4301
4258
|
(...L) => d(sn) && d(sn)(...L))
|
|
4302
4259
|
}, x(d(T).retry), 1)
|
|
4303
|
-
])) :
|
|
4304
|
-
b("div",
|
|
4260
|
+
])) : j("", !0),
|
|
4261
|
+
b("div", di, [
|
|
4305
4262
|
b("div", {
|
|
4306
4263
|
ref_key: "viewportRef",
|
|
4307
4264
|
ref: p,
|
|
@@ -4318,17 +4275,17 @@ const di = {
|
|
|
4318
4275
|
onPaste: S[12] || (S[12] = //@ts-ignore
|
|
4319
4276
|
(...L) => d(ae).onPaste && d(ae).onPaste(...L)),
|
|
4320
4277
|
onScrollPassive: S[13] || (S[13] = (L) => {
|
|
4321
|
-
d(ga)(L.target), d(
|
|
4278
|
+
d(ga)(L.target), d(Mt).schedule();
|
|
4322
4279
|
})
|
|
4323
4280
|
}, [
|
|
4324
|
-
r.value ? (E(), I("div",
|
|
4281
|
+
r.value ? (E(), I("div", fi, x(d(T).loading), 1)) : l.value ? (E(), I("div", mi, [
|
|
4325
4282
|
re(x(l.value) + " ", 1),
|
|
4326
4283
|
b("button", {
|
|
4327
4284
|
class: "mrp-retry",
|
|
4328
4285
|
type: "button",
|
|
4329
4286
|
onClick: Ne
|
|
4330
4287
|
}, x(d(T).retry), 1)
|
|
4331
|
-
])) : !o.value || B.value === 0 ? (E(), Ie(
|
|
4288
|
+
])) : !o.value || B.value === 0 ? (E(), Ie(Rn, {
|
|
4332
4289
|
key: 2,
|
|
4333
4290
|
title: d(fn) ? d(T).paramPrompt ?? d(T).paramsTitle : d(T).empty,
|
|
4334
4291
|
description: d(fn) ? d(T).paramPromptDescription : d(yt).description ?? d(T).emptyDescription
|
|
@@ -4348,25 +4305,25 @@ const di = {
|
|
|
4348
4305
|
class: "mrp-spacer-top",
|
|
4349
4306
|
style: De({ height: `${d(_e).padTopPx}px` }),
|
|
4350
4307
|
"aria-hidden": "true"
|
|
4351
|
-
}, null, 4)) :
|
|
4308
|
+
}, null, 4)) : j("", !0),
|
|
4352
4309
|
(E(!0), I(fe, null, me(d(pn), (L) => (E(), I("div", {
|
|
4353
4310
|
key: L.index,
|
|
4354
4311
|
class: "mrp-page-holder",
|
|
4355
4312
|
"data-page": L.index + 1
|
|
4356
|
-
}, null, 8,
|
|
4313
|
+
}, null, 8, gi))), 128)),
|
|
4357
4314
|
d(_e).padBottomPx > 0 ? (E(), I("div", {
|
|
4358
4315
|
key: 1,
|
|
4359
4316
|
class: "mrp-spacer-bottom",
|
|
4360
4317
|
style: De({ height: `${d(_e).padBottomPx}px` }),
|
|
4361
4318
|
"aria-hidden": "true"
|
|
4362
|
-
}, null, 4)) :
|
|
4319
|
+
}, null, 4)) : j("", !0)
|
|
4363
4320
|
], 4)
|
|
4364
4321
|
], 4)),
|
|
4365
|
-
!r.value && !l.value && o.value && B.value > 0 && e.emptyState ? (E(), Ie(
|
|
4322
|
+
!r.value && !l.value && o.value && B.value > 0 && e.emptyState ? (E(), Ie(Rn, {
|
|
4366
4323
|
key: 4,
|
|
4367
4324
|
title: d(yt).title ?? d(T).empty,
|
|
4368
4325
|
description: d(yt).description ?? d(T).emptyDescription
|
|
4369
|
-
}, null, 8, ["title", "description"])) :
|
|
4326
|
+
}, null, 8, ["title", "description"])) : j("", !0)
|
|
4370
4327
|
], 544),
|
|
4371
4328
|
d(ge).thumbnails && i.value && B.value > 0 ? (E(), I("aside", {
|
|
4372
4329
|
key: 0,
|
|
@@ -4381,7 +4338,7 @@ const di = {
|
|
|
4381
4338
|
class: "mrp-thumb-spacer",
|
|
4382
4339
|
style: De({ height: `${d(Se).windowRange.value.padTopPx}px` }),
|
|
4383
4340
|
"aria-hidden": "true"
|
|
4384
|
-
}, null, 4)) :
|
|
4341
|
+
}, null, 4)) : j("", !0),
|
|
4385
4342
|
(E(!0), I(fe, null, me(d(Se).visibleThumbs.value, (L) => (E(), I("button", {
|
|
4386
4343
|
key: L.index,
|
|
4387
4344
|
class: pe(["mrp-thumb", { "mrp-thumb-active": L.index + 1 === m.value }]),
|
|
@@ -4395,19 +4352,19 @@ const di = {
|
|
|
4395
4352
|
class: "mrp-thumb-box",
|
|
4396
4353
|
"data-thumb": L.index + 1,
|
|
4397
4354
|
style: De({ height: `${L.height}px` })
|
|
4398
|
-
}, null, 12,
|
|
4399
|
-
b("span",
|
|
4400
|
-
], 14,
|
|
4355
|
+
}, null, 12, vi),
|
|
4356
|
+
b("span", hi, x(L.index + 1), 1)
|
|
4357
|
+
], 14, pi))), 128)),
|
|
4401
4358
|
d(Se).windowRange.value.padBottomPx > 0 ? (E(), I("div", {
|
|
4402
4359
|
key: 1,
|
|
4403
4360
|
class: "mrp-thumb-spacer",
|
|
4404
4361
|
style: De({ height: `${d(Se).windowRange.value.padBottomPx}px` }),
|
|
4405
4362
|
"aria-hidden": "true"
|
|
4406
|
-
}, null, 4)) :
|
|
4407
|
-
], 544)) :
|
|
4363
|
+
}, null, 4)) : j("", !0)
|
|
4364
|
+
], 544)) : j("", !0)
|
|
4408
4365
|
]),
|
|
4409
|
-
B.value > 0 ? (E(), I("footer",
|
|
4410
|
-
b("div",
|
|
4366
|
+
B.value > 0 ? (E(), I("footer", bi, [
|
|
4367
|
+
b("div", yi, [
|
|
4411
4368
|
xt.value && d(Q) ? (E(), I("button", {
|
|
4412
4369
|
key: 0,
|
|
4413
4370
|
class: "mrp-calculation-toggle",
|
|
@@ -4417,8 +4374,8 @@ const di = {
|
|
|
4417
4374
|
}, [
|
|
4418
4375
|
S[15] || (S[15] = b("span", { "aria-hidden": "true" }, "∑", -1)),
|
|
4419
4376
|
re(x(kt.value.calculationTitle), 1),
|
|
4420
|
-
d(Et).result.value ? (E(), I("strong",
|
|
4421
|
-
], 8,
|
|
4377
|
+
d(Et).result.value ? (E(), I("strong", xi, x(d(Et).result.value.formatted), 1)) : j("", !0)
|
|
4378
|
+
], 8, wi)) : j("", !0)
|
|
4422
4379
|
]),
|
|
4423
4380
|
X(Un, {
|
|
4424
4381
|
"page-count": B.value,
|
|
@@ -4427,55 +4384,55 @@ const di = {
|
|
|
4427
4384
|
busy: r.value || k.value || d(U).saving.value,
|
|
4428
4385
|
onGoto: xe
|
|
4429
4386
|
}, null, 8, ["page-count", "current-page", "messages", "busy"])
|
|
4430
|
-
])) :
|
|
4431
|
-
b("div",
|
|
4387
|
+
])) : j("", !0),
|
|
4388
|
+
b("div", ki, [
|
|
4432
4389
|
at(g.$slots, "default", {}, void 0, !0)
|
|
4433
4390
|
]),
|
|
4434
|
-
d(
|
|
4391
|
+
d(He) ? (E(), I("div", Ei, [
|
|
4435
4392
|
S[16] || (S[16] = b("div", null, "mach-report debug", -1)),
|
|
4436
|
-
b("div", null, "pages: " + x(d(
|
|
4437
|
-
b("div", null, "zoom: " + x(d(
|
|
4438
|
-
b("div", null, "plan: " + x(d(
|
|
4439
|
-
])) :
|
|
4393
|
+
b("div", null, "pages: " + x(d(He).pages) + " | window: [" + x(d(He).window) + "]", 1),
|
|
4394
|
+
b("div", null, "zoom: " + x(d(He).zoom) + " | load: " + x(d(He).loadMs), 1),
|
|
4395
|
+
b("div", null, "plan: " + x(d(He).planKB) + "KB", 1)
|
|
4396
|
+
])) : j("", !0)
|
|
4440
4397
|
], 6));
|
|
4441
4398
|
}
|
|
4442
|
-
}),
|
|
4399
|
+
}), $i = /* @__PURE__ */ ye(Ci, [["__scopeId", "data-v-7b74ffd9"]]), ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4443
4400
|
__proto__: null,
|
|
4444
|
-
default:
|
|
4401
|
+
default: $i
|
|
4445
4402
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4446
4403
|
export {
|
|
4447
4404
|
is as A,
|
|
4448
4405
|
os as B,
|
|
4449
|
-
|
|
4406
|
+
ji as C,
|
|
4450
4407
|
Gn as D,
|
|
4451
4408
|
ke as M,
|
|
4452
4409
|
Lt as P,
|
|
4453
4410
|
Gt as R,
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4411
|
+
qi as S,
|
|
4412
|
+
Ml as a,
|
|
4413
|
+
Tl as b,
|
|
4457
4414
|
Ce as c,
|
|
4458
4415
|
An as d,
|
|
4459
4416
|
Un as e,
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4417
|
+
Nr as f,
|
|
4418
|
+
$i as g,
|
|
4419
|
+
ro as h,
|
|
4463
4420
|
ls as i,
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4421
|
+
Li as j,
|
|
4422
|
+
wr as k,
|
|
4423
|
+
Fi as l,
|
|
4424
|
+
Ni as m,
|
|
4425
|
+
Dl as n,
|
|
4426
|
+
zi as o,
|
|
4427
|
+
Ai as p,
|
|
4428
|
+
jn as q,
|
|
4429
|
+
vr as r,
|
|
4430
|
+
Oi as s,
|
|
4431
|
+
Bi as t,
|
|
4432
|
+
Rl as u,
|
|
4433
|
+
Fl as v,
|
|
4434
|
+
Ol as w,
|
|
4435
|
+
pr as x,
|
|
4436
|
+
Ll as y,
|
|
4480
4437
|
as as z
|
|
4481
4438
|
};
|