@agile-team/mach-report 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -3
- package/dist/ExcelBindingWizard-CLT2p7P3.cjs +1 -0
- package/dist/ExcelBindingWizard-CvsWR8Ga.js +1485 -0
- package/dist/{ParamEditor-BLaE5q5W.js → ParamEditor-CflQV3eQ.js} +191 -187
- package/dist/ParamEditor-vIDzvpPV.cjs +1 -0
- package/dist/ReportBatchPanel-DkxTzBkD.cjs +1 -0
- package/dist/{ReportBatchPanel-B5ClP9tm.js → ReportBatchPanel-LqVgiqp7.js} +3 -3
- package/dist/ReportPreview-CvbqLUzM.cjs +6 -0
- package/dist/ReportPreview-D_ywJ_-H.js +4533 -0
- package/dist/{ReportTemplateLibrary-BZB-XWjj.js → ReportTemplateLibrary-MjWEtc7X.js} +1 -1
- package/dist/ReportTemplateLibrary-cQ1sqNYo.cjs +1 -0
- package/dist/RuleEditor-BaR6xUiI.cjs +1 -0
- package/dist/RuleEditor-ChuXMlei.js +2037 -0
- package/dist/TemplateOutlinePanel-BHKP89Xz.cjs +1 -0
- package/dist/TemplateOutlinePanel-Dci6aRn1.js +96 -0
- package/dist/TemplateReusePanel-B7Gmyc1z.js +388 -0
- package/dist/TemplateReusePanel-CY5eO2Sh.cjs +1 -0
- package/dist/TemplateReviewPanel-DjlX3xpt.js +592 -0
- package/dist/TemplateReviewPanel-JvZe9_4G.cjs +1 -0
- package/dist/{batch-mRqhhhjt.js → batch-DzaTNLWI.js} +23 -16
- package/dist/batch-xMkqYiTr.cjs +1 -0
- package/dist/config-0UIohTS7.cjs +1 -0
- package/dist/{config-B612mw0x.js → config-Dt9NtCPl.js} +227 -186
- package/dist/data-explanation-BktvER5B.cjs +1 -0
- package/dist/data-explanation-C_J6jYNi.js +16 -0
- package/dist/designer-Ci1LizA9.js +5020 -0
- package/dist/designer-rtmVIIdN.cjs +2 -0
- package/dist/designer.cjs +1 -2
- package/dist/designer.d.cts +306 -3
- package/dist/designer.d.ts +306 -3
- package/dist/designer.js +21 -4266
- package/dist/font-loader-DHto6Lra.js +297 -0
- package/dist/font-loader-vhCT8znW.cjs +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +182 -1
- package/dist/index.d.ts +182 -1
- package/dist/index.js +728 -628
- package/dist/{template-review-BzpcI-tR.js → json-snapshot-BeFT3Tso.js} +867 -637
- package/dist/json-snapshot-D1NTP2oI.cjs +2 -0
- package/dist/pdf-8UPQebOE.js +36288 -0
- package/dist/pdf-AyJGb22z.cjs +101 -0
- package/dist/pdf.cjs +1 -101
- package/dist/pdf.js +9 -36579
- package/dist/plugin-BGKf-Tqg.js +22 -0
- package/dist/{plugin-BDTU4D94.cjs → plugin-CktLH_Iy.cjs} +1 -1
- package/dist/{region-binding-workflow-CcUq8W2Q.js → region-binding-workflow-DEJbhpCv.js} +1 -1
- package/dist/server/node.d.cts +46 -11
- package/dist/server/node.d.ts +46 -11
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +294 -280
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +107 -12
- package/dist/server.d.ts +107 -12
- package/dist/server.js +713 -453
- package/dist/style.css +1 -1
- package/dist/template-bindings-BJR4k7qZ.cjs +1 -0
- package/dist/template-bindings-Daui7hLF.js +252 -0
- package/dist/template-fragments-CLkGo6To.js +187 -0
- package/dist/template-fragments-DFUpq5QM.cjs +1 -0
- package/dist/template-outline-B3xVkzSv.cjs +1 -0
- package/dist/template-outline-CFenM1PV.js +88 -0
- package/dist/{template-registry-BjE1VS6g.js → template-registry-COXDEJEM.js} +1 -1
- package/dist/{useLocalDraft-C07SYRnC.js → useLocalDraft-BnhcxXk_.js} +1 -1
- package/dist/{useLocalDraft-Yiw1wFgI.cjs → useLocalDraft-CioIfDb6.cjs} +1 -1
- package/dist/{validate-DbgEM1Hh.js → validate-CkQBWCeg.js} +3 -3
- package/dist/vue/async.d.cts +72 -2
- package/dist/vue/async.d.ts +72 -2
- package/dist/vue/index.d.cts +124 -5
- package/dist/vue/index.d.ts +124 -5
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +5 -5
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +78 -71
- package/dist/{workbook-session-BPb3TMnT.js → workbook-session-BfK1yHOO.js} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +46 -11
- package/dist/worker.d.ts +46 -11
- package/dist/worker.js +59 -55
- package/dist/xlsx.js +3 -3
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-CeAf4QSE.js +0 -1465
- package/dist/ExcelBindingWizard-y0mT-AHR.cjs +0 -1
- package/dist/ParamEditor-MBBC7lUE.cjs +0 -1
- package/dist/ReportBatchPanel-Dc-SDkYA.cjs +0 -1
- package/dist/ReportPreview-DWXROHBP.cjs +0 -6
- package/dist/ReportPreview-DiNXhQI0.js +0 -4138
- package/dist/ReportTemplateLibrary-5fk5CQBO.cjs +0 -1
- package/dist/RuleEditor-ChRzNQuF.cjs +0 -1
- package/dist/RuleEditor-DzAmW5YH.js +0 -2024
- package/dist/TemplateReviewPanel-BKofGrV9.js +0 -222
- package/dist/TemplateReviewPanel-DwtOcLue.cjs +0 -1
- package/dist/batch-Bt3Fd27Z.cjs +0 -1
- package/dist/config-BRoLo2oj.cjs +0 -1
- package/dist/plugin-Cd5G2QQn.js +0 -22
- package/dist/record-bindings-By_UKZ2g.cjs +0 -1
- package/dist/record-bindings-D-5jQlTj.js +0 -196
- package/dist/template-review-BfCC8Ng9.cjs +0 -2
|
@@ -1,65 +1,85 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { ReportParamValidationError as z, ReportSourceError as J, validateReportParams as
|
|
1
|
+
import { ref as C, watch as A, computed as x, defineComponent as _, openBlock as d, createElementBlock as u, toDisplayString as v, createCommentVNode as w, createElementVNode as P, Fragment as I, renderList as D, normalizeClass as G, createTextVNode as W, withKeys as q, unref as j, inject as T, provide as K } from "vue";
|
|
2
|
+
import { ReportParamValidationError as z, ReportSourceError as J, validateReportParams as O } from "@agile-team/mach-report";
|
|
3
3
|
import { _ as X } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
4
4
|
import { a as k } from "./injection-keys-e85udZCp.js";
|
|
5
|
+
const Y = {
|
|
6
|
+
printPrepareTimeout: "打印资源准备超时,请检查字体与图片后重试。",
|
|
7
|
+
printImageFailed: "第 {index} 张图片未能加载,已停止打印,避免输出缺失内容。",
|
|
8
|
+
printFontFailed: "打印字体 {family} 未能加载,请检查字体资源后重试。",
|
|
9
|
+
printPrepareFailed: "打印准备失败,请检查打印配置或改用 PDF。",
|
|
10
|
+
printCalibration: "打印校准",
|
|
11
|
+
printOffsetX: "水平偏移(mm)",
|
|
12
|
+
printOffsetY: "垂直偏移(mm)",
|
|
13
|
+
printCalibrationTest: "打印校准页",
|
|
14
|
+
printCalibrationHint: "正值向右/向下移动,负值向左/向上。使用同规格纸张及 100% 比例,先试打一张。系统对话框关闭不代表设备已完成。"
|
|
15
|
+
};
|
|
16
|
+
function Ae(e) {
|
|
17
|
+
const a = e?.calibration?.offsetXmm ?? 0, s = e?.calibration?.offsetYmm ?? 0;
|
|
18
|
+
if (![a, s].every((r) => Number.isFinite(r) && Math.abs(r) <= 20)) throw new RangeError("Print calibration must be within ±20 mm");
|
|
19
|
+
return { x: a, y: s };
|
|
20
|
+
}
|
|
21
|
+
function Se(e = {}) {
|
|
22
|
+
if (e.fonts && (!Array.isArray(e.fonts) || e.fonts.length > 8)) throw new RangeError("At most eight print font faces are allowed");
|
|
23
|
+
return { ...e, ...e.fonts ? { fonts: e.fonts.map((a) => ({ ...a })) } : {}, ...e.calibration ? { calibration: { ...e.calibration } } : {} };
|
|
24
|
+
}
|
|
5
25
|
class h extends Error {
|
|
6
|
-
constructor(
|
|
7
|
-
super(
|
|
26
|
+
constructor(a, s, r) {
|
|
27
|
+
super(s), this.name = "MachReportError", this.code = a, this.cause = r;
|
|
8
28
|
}
|
|
9
29
|
}
|
|
10
|
-
function
|
|
30
|
+
function Ce(e) {
|
|
11
31
|
return e instanceof h ? { code: e.code, cause: e.cause } : { code: "render", cause: e };
|
|
12
32
|
}
|
|
13
|
-
function
|
|
33
|
+
function Me(e) {
|
|
14
34
|
if (e instanceof h) return e;
|
|
15
35
|
if (e instanceof z) return new h("param", e.message, e);
|
|
16
36
|
if (e instanceof J) return new h(e.code, e.message, e.cause);
|
|
17
37
|
if (e instanceof Error) {
|
|
18
|
-
const
|
|
19
|
-
if (typeof
|
|
38
|
+
const a = { params: "param", config: "config", validate: "validate", fetch: "fetch" }, s = e.code;
|
|
39
|
+
if (typeof s == "string" && Object.prototype.hasOwnProperty.call(a, s)) return new h(a[s], e.message, e);
|
|
20
40
|
}
|
|
21
41
|
return new h("fetch", e instanceof Error ? e.message : "预览加载失败", e);
|
|
22
42
|
}
|
|
23
43
|
let Q = 0;
|
|
24
|
-
function
|
|
44
|
+
function Z() {
|
|
25
45
|
return `mrp-params-${++Q}`;
|
|
26
46
|
}
|
|
27
|
-
function N(e,
|
|
28
|
-
const
|
|
29
|
-
return e.code === "required" ?
|
|
47
|
+
function N(e, a, s) {
|
|
48
|
+
const r = (Array.isArray(a) ? a.find((i) => i?.field === e.field)?.label : void 0) ?? e.field;
|
|
49
|
+
return e.code === "required" ? s.paramRequired.replace("{label}", r) : (s.paramInvalid ?? "{label}:{message}").replace("{label}", r).replace("{message}", e.message);
|
|
30
50
|
}
|
|
31
|
-
function
|
|
32
|
-
const
|
|
33
|
-
function
|
|
51
|
+
function Fe(e) {
|
|
52
|
+
const a = C({}), s = C(!1);
|
|
53
|
+
function r() {
|
|
34
54
|
const f = {};
|
|
35
55
|
for (const g of Array.isArray(e.defs.value) ? e.defs.value : [])
|
|
36
56
|
typeof g?.field == "string" && Object.defineProperty(f, g.field, { value: e.params()[g.field] ?? g.defaultValue ?? "", writable: !0, enumerable: !0, configurable: !0 });
|
|
37
|
-
|
|
57
|
+
a.value = f, s.value = !1;
|
|
38
58
|
}
|
|
39
|
-
|
|
40
|
-
const
|
|
59
|
+
r(), A(e.defs, r), A(e.reportIds, r), A(() => JSON.stringify(e.params()), r);
|
|
60
|
+
const i = x(() => O(e.defs.value, { ...e.params(), ...a.value })), o = x(() => !s.value && i.value.issues.length > 0 && i.value.issues.every((f) => f.code === "required"));
|
|
41
61
|
function m() {
|
|
42
|
-
const f =
|
|
62
|
+
const f = i.value;
|
|
43
63
|
if (!f.ok) {
|
|
44
64
|
const p = f.issues[0];
|
|
45
65
|
return { quiet: o.value, error: new h(p.code === "definition" ? "config" : "param", N(p, e.defs.value, e.messages()), { issues: f.issues }) };
|
|
46
66
|
}
|
|
47
|
-
const g = { ...f.values },
|
|
48
|
-
for (const [p,
|
|
67
|
+
const g = { ...f.values }, M = new Set(e.defs.value.filter((p) => p.defaultValue !== void 0).map((p) => p.field));
|
|
68
|
+
for (const [p, F] of Object.entries(g)) F === "" && !M.has(p) && delete g[p];
|
|
49
69
|
return { params: g, quiet: !1 };
|
|
50
70
|
}
|
|
51
|
-
return { values:
|
|
71
|
+
return { values: a, attempted: s, validation: i, pendingRequired: o, reset: r, query: m };
|
|
52
72
|
}
|
|
53
|
-
const
|
|
73
|
+
const ee = {
|
|
54
74
|
key: 0,
|
|
55
75
|
class: "mrp-params-title"
|
|
56
|
-
},
|
|
76
|
+
}, ae = { class: "mrp-params-grid" }, te = ["id"], re = {
|
|
57
77
|
key: 0,
|
|
58
78
|
class: "mrp-param-star"
|
|
59
|
-
},
|
|
79
|
+
}, ne = ["value", "disabled", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onChange"], se = ["disabled", "hidden"], ie = ["value"], oe = ["aria-labelledby"], le = ["value", "disabled", "min", "max", "aria-label", "aria-invalid", "aria-describedby", "aria-required", "onInput"], ce = ["type", "inputmode", "maxlength", "placeholder", "value", "disabled", "min", "max", "step", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onInput"], de = ["id"], ue = {
|
|
60
80
|
key: 1,
|
|
61
81
|
class: "mrp-params-actions"
|
|
62
|
-
},
|
|
82
|
+
}, pe = ["disabled"], fe = ["disabled"], ge = /* @__PURE__ */ _({
|
|
63
83
|
__name: "ReportParamPanel",
|
|
64
84
|
props: {
|
|
65
85
|
defs: {},
|
|
@@ -72,149 +92,149 @@ const Z = {
|
|
|
72
92
|
disabled: { type: Boolean, default: !1 }
|
|
73
93
|
},
|
|
74
94
|
emits: ["update:modelValue", "query", "reset"],
|
|
75
|
-
setup(e, { expose:
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
() =>
|
|
79
|
-
(
|
|
80
|
-
o.value = { ...
|
|
95
|
+
setup(e, { expose: a, emit: s }) {
|
|
96
|
+
const r = e, i = s, o = C({ ...r.modelValue }), m = C(null), f = Z();
|
|
97
|
+
A(
|
|
98
|
+
() => r.modelValue,
|
|
99
|
+
(n) => {
|
|
100
|
+
o.value = { ...n };
|
|
81
101
|
}
|
|
82
102
|
);
|
|
83
|
-
const g = x(() =>
|
|
84
|
-
() => (Array.isArray(
|
|
85
|
-
def:
|
|
86
|
-
id: `${f}-${
|
|
87
|
-
label:
|
|
88
|
-
value: o.value[
|
|
89
|
-
error:
|
|
103
|
+
const g = x(() => r.issues ?? O(r.defs, o.value).issues), M = x(
|
|
104
|
+
() => (Array.isArray(r.defs) ? r.defs : []).filter((n) => n && typeof n.field == "string").map((n, l) => ({
|
|
105
|
+
def: n,
|
|
106
|
+
id: `${f}-${l}`,
|
|
107
|
+
label: n.label ?? n.field,
|
|
108
|
+
value: o.value[n.field] ?? "",
|
|
109
|
+
error: r.attempted ? g.value.find((t) => t.field === n.field) : void 0
|
|
90
110
|
}))
|
|
91
111
|
);
|
|
92
|
-
function p(
|
|
93
|
-
o.value = { ...o.value, [
|
|
112
|
+
function p(n, l) {
|
|
113
|
+
o.value = { ...o.value, [n]: l }, i("update:modelValue", { ...o.value });
|
|
94
114
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
115
|
+
function F(n) {
|
|
116
|
+
return n.type === "number" ? "number" : n.type === "date" || n.type === "month" ? n.type : "text";
|
|
97
117
|
}
|
|
98
|
-
function y(
|
|
99
|
-
return
|
|
118
|
+
function y(n, l) {
|
|
119
|
+
return n.split("/")[l] ?? "";
|
|
100
120
|
}
|
|
101
|
-
function
|
|
102
|
-
return
|
|
121
|
+
function H(n, l, t) {
|
|
122
|
+
return t ? !!y(n, 0) != !!y(n, 1) ? !y(n, l) || void 0 : !0 : void 0;
|
|
103
123
|
}
|
|
104
|
-
function U(
|
|
105
|
-
const c = [y(o.value[
|
|
106
|
-
c[
|
|
124
|
+
function U(n, l, t) {
|
|
125
|
+
const c = [y(o.value[n] ?? "", 0), y(o.value[n] ?? "", 1)];
|
|
126
|
+
c[l] = t, p(n, c.every((E) => !E) ? "" : c.join("/"));
|
|
107
127
|
}
|
|
108
|
-
function
|
|
109
|
-
|
|
128
|
+
function R(n) {
|
|
129
|
+
n.isComposing || i("query");
|
|
110
130
|
}
|
|
111
131
|
function $() {
|
|
112
132
|
m.value?.querySelector('[aria-invalid="true"]')?.focus();
|
|
113
133
|
}
|
|
114
|
-
return
|
|
134
|
+
return a({ focusInvalid: $ }), (n, l) => (d(), u("div", {
|
|
115
135
|
ref_key: "root",
|
|
116
136
|
ref: m,
|
|
117
137
|
class: "mrp-params"
|
|
118
138
|
}, [
|
|
119
|
-
e.showTitle !== !1 ? (d(), u("span",
|
|
120
|
-
P("div",
|
|
121
|
-
(d(!0), u(I, null, D(
|
|
122
|
-
key:
|
|
123
|
-
class:
|
|
139
|
+
e.showTitle !== !1 ? (d(), u("span", ee, v(e.messages.paramsTitle), 1)) : w("", !0),
|
|
140
|
+
P("div", ae, [
|
|
141
|
+
(d(!0), u(I, null, D(M.value, (t) => (d(), u("label", {
|
|
142
|
+
key: t.id,
|
|
143
|
+
class: G(["mrp-param", { "mrp-param-missing": !!t.error }])
|
|
124
144
|
}, [
|
|
125
145
|
P("span", {
|
|
126
|
-
id: `${
|
|
146
|
+
id: `${t.id}-label`,
|
|
127
147
|
class: "mrp-param-label"
|
|
128
148
|
}, [
|
|
129
|
-
W(v(
|
|
130
|
-
|
|
131
|
-
], 8,
|
|
132
|
-
(
|
|
149
|
+
W(v(t.label), 1),
|
|
150
|
+
t.def.required ? (d(), u("i", re, "*")) : w("", !0)
|
|
151
|
+
], 8, te),
|
|
152
|
+
(t.def.type ?? "text") === "select" ? (d(), u("select", {
|
|
133
153
|
key: 0,
|
|
134
154
|
class: "mrp-param-input",
|
|
135
|
-
value:
|
|
155
|
+
value: t.value,
|
|
136
156
|
disabled: e.disabled,
|
|
137
|
-
"aria-labelledby": `${
|
|
138
|
-
"aria-invalid":
|
|
139
|
-
"aria-describedby":
|
|
140
|
-
"aria-required":
|
|
141
|
-
onChange: (c) => p(
|
|
142
|
-
onKeydown: q(
|
|
157
|
+
"aria-labelledby": `${t.id}-label`,
|
|
158
|
+
"aria-invalid": t.error ? !0 : void 0,
|
|
159
|
+
"aria-describedby": t.error ? `${t.id}-error` : void 0,
|
|
160
|
+
"aria-required": t.def.required || void 0,
|
|
161
|
+
onChange: (c) => p(t.def.field, c.target.value),
|
|
162
|
+
onKeydown: q(R, ["enter"])
|
|
143
163
|
}, [
|
|
144
164
|
P("option", {
|
|
145
165
|
value: "",
|
|
146
|
-
disabled:
|
|
147
|
-
hidden:
|
|
148
|
-
}, v(
|
|
149
|
-
(d(!0), u(I, null, D(
|
|
166
|
+
disabled: t.def.required,
|
|
167
|
+
hidden: t.def.required
|
|
168
|
+
}, v(t.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", t.label)), 9, se),
|
|
169
|
+
(d(!0), u(I, null, D(t.def.options ?? [], (c) => (d(), u("option", {
|
|
150
170
|
key: c.value,
|
|
151
171
|
value: c.value
|
|
152
|
-
}, v(c.label), 9,
|
|
153
|
-
], 40,
|
|
172
|
+
}, v(c.label), 9, ie))), 128))
|
|
173
|
+
], 40, ne)) : t.def.type === "dateRange" ? (d(), u("div", {
|
|
154
174
|
key: 1,
|
|
155
175
|
class: "mrp-param-range",
|
|
156
176
|
role: "group",
|
|
157
|
-
"aria-labelledby": `${
|
|
177
|
+
"aria-labelledby": `${t.id}-label`
|
|
158
178
|
}, [
|
|
159
179
|
(d(!0), u(I, null, D([e.messages.paramRangeStart ?? "开始日期", e.messages.paramRangeEnd ?? "结束日期"], (c, E) => (d(), u("input", {
|
|
160
180
|
key: E,
|
|
161
181
|
class: "mrp-param-input",
|
|
162
182
|
type: "date",
|
|
163
|
-
value: y(
|
|
183
|
+
value: y(t.value, E),
|
|
164
184
|
disabled: e.disabled,
|
|
165
|
-
min:
|
|
166
|
-
max:
|
|
167
|
-
"aria-label": `${
|
|
168
|
-
"aria-invalid":
|
|
169
|
-
"aria-describedby":
|
|
170
|
-
"aria-required":
|
|
171
|
-
onInput: (V) => U(
|
|
172
|
-
onKeydown: q(
|
|
173
|
-
}, null, 40,
|
|
174
|
-
], 8,
|
|
185
|
+
min: t.def.min,
|
|
186
|
+
max: t.def.max,
|
|
187
|
+
"aria-label": `${t.label} · ${c}`,
|
|
188
|
+
"aria-invalid": H(t.value, E, t.error),
|
|
189
|
+
"aria-describedby": t.error ? `${t.id}-error` : void 0,
|
|
190
|
+
"aria-required": t.def.required || void 0,
|
|
191
|
+
onInput: (V) => U(t.def.field, E, V.target.value),
|
|
192
|
+
onKeydown: q(R, ["enter"])
|
|
193
|
+
}, null, 40, le))), 128))
|
|
194
|
+
], 8, oe)) : (d(), u("input", {
|
|
175
195
|
key: 2,
|
|
176
196
|
class: "mrp-param-input",
|
|
177
|
-
type:
|
|
178
|
-
inputmode:
|
|
179
|
-
maxlength:
|
|
180
|
-
placeholder:
|
|
181
|
-
value:
|
|
197
|
+
type: F(t.def),
|
|
198
|
+
inputmode: t.def.type === "year" ? "numeric" : void 0,
|
|
199
|
+
maxlength: t.def.type === "year" ? 4 : void 0,
|
|
200
|
+
placeholder: t.def.placeholder ?? (e.messages.paramTextPlaceholder ?? "请输入{label}").replace("{label}", t.label),
|
|
201
|
+
value: t.value,
|
|
182
202
|
disabled: e.disabled,
|
|
183
|
-
min:
|
|
184
|
-
max:
|
|
185
|
-
step:
|
|
186
|
-
"aria-labelledby": `${
|
|
187
|
-
"aria-invalid":
|
|
188
|
-
"aria-describedby":
|
|
189
|
-
"aria-required":
|
|
190
|
-
onInput: (c) => p(
|
|
191
|
-
onKeydown: q(
|
|
192
|
-
}, null, 40,
|
|
193
|
-
|
|
203
|
+
min: t.def.min,
|
|
204
|
+
max: t.def.max,
|
|
205
|
+
step: t.def.type === "number" ? "any" : void 0,
|
|
206
|
+
"aria-labelledby": `${t.id}-label`,
|
|
207
|
+
"aria-invalid": t.error ? !0 : void 0,
|
|
208
|
+
"aria-describedby": t.error ? `${t.id}-error` : void 0,
|
|
209
|
+
"aria-required": t.def.required || void 0,
|
|
210
|
+
onInput: (c) => p(t.def.field, c.target.value),
|
|
211
|
+
onKeydown: q(R, ["enter"])
|
|
212
|
+
}, null, 40, ce)),
|
|
213
|
+
t.error ? (d(), u("small", {
|
|
194
214
|
key: 3,
|
|
195
|
-
id: `${
|
|
215
|
+
id: `${t.id}-error`,
|
|
196
216
|
class: "mrp-param-error",
|
|
197
217
|
role: "status"
|
|
198
|
-
}, v(j(N)(
|
|
218
|
+
}, v(j(N)(t.error, e.defs, e.messages)), 9, de)) : w("", !0)
|
|
199
219
|
], 2))), 128))
|
|
200
220
|
]),
|
|
201
|
-
e.showActions !== !1 ? (d(), u("div",
|
|
221
|
+
e.showActions !== !1 ? (d(), u("div", ue, [
|
|
202
222
|
P("button", {
|
|
203
223
|
class: "mrp-nav mrp-param-query",
|
|
204
224
|
type: "button",
|
|
205
225
|
disabled: e.disabled,
|
|
206
|
-
onClick:
|
|
207
|
-
}, v(e.messages.query), 9,
|
|
226
|
+
onClick: l[0] || (l[0] = (t) => n.$emit("query"))
|
|
227
|
+
}, v(e.messages.query), 9, pe),
|
|
208
228
|
P("button", {
|
|
209
229
|
class: "mrp-nav",
|
|
210
230
|
type: "button",
|
|
211
231
|
disabled: e.disabled,
|
|
212
|
-
onClick:
|
|
213
|
-
}, v(e.messages.reset), 9,
|
|
232
|
+
onClick: l[1] || (l[1] = (t) => n.$emit("reset"))
|
|
233
|
+
}, v(e.messages.reset), 9, fe)
|
|
214
234
|
])) : w("", !0)
|
|
215
235
|
], 512));
|
|
216
236
|
}
|
|
217
|
-
}),
|
|
237
|
+
}), Re = /* @__PURE__ */ X(ge, [["__scopeId", "data-v-f64e743f"]]), L = {
|
|
218
238
|
calculationTitle: "选区计算",
|
|
219
239
|
calculationLocal: "仅本地分析,不写回实绩、不重算原公式。请选取同一单位与量纲的数值。",
|
|
220
240
|
calculationHint: "点击起点,Shift + 点击终点或方向键扩选。",
|
|
@@ -243,16 +263,17 @@ const Z = {
|
|
|
243
263
|
calculationErrorOverflow: "结果超出有效数值范围。",
|
|
244
264
|
calculationErrorPrecision: "数值超出安全精度,或展示小数位不是 0 至 12 的整数。"
|
|
245
265
|
};
|
|
246
|
-
function
|
|
247
|
-
const
|
|
248
|
-
for (const
|
|
249
|
-
const
|
|
250
|
-
typeof
|
|
266
|
+
function Ie(e) {
|
|
267
|
+
const a = { ...L };
|
|
268
|
+
for (const s of Object.keys(a)) {
|
|
269
|
+
const r = e[s];
|
|
270
|
+
typeof r == "string" && (a[s] = r);
|
|
251
271
|
}
|
|
252
|
-
return
|
|
272
|
+
return a;
|
|
253
273
|
}
|
|
254
|
-
const
|
|
255
|
-
...
|
|
274
|
+
const me = {
|
|
275
|
+
...Y,
|
|
276
|
+
...L,
|
|
256
277
|
exportMenu: "导出",
|
|
257
278
|
exportMenuDescription: "选择文件格式",
|
|
258
279
|
clearSearch: "清除搜索",
|
|
@@ -262,6 +283,17 @@ const ge = {
|
|
|
262
283
|
pageJumpInvalid: "请输入有效页码",
|
|
263
284
|
pageJumpHint: "Enter 跳转",
|
|
264
285
|
pagination: "报表分页",
|
|
286
|
+
recordNavigation: "标签记录",
|
|
287
|
+
recordInfo: "记录 {cur} / {total}",
|
|
288
|
+
prevRecord: "上一条记录",
|
|
289
|
+
nextRecord: "下一条记录",
|
|
290
|
+
dataExplanation: "来源数据说明",
|
|
291
|
+
dataExplanationHint: "按字段查看来源与计算说明",
|
|
292
|
+
dataExplanationSearch: "搜索说明、字段或记录",
|
|
293
|
+
dataExplanationEmpty: "没有匹配的数据说明",
|
|
294
|
+
dataMissingSource: "暂无来源",
|
|
295
|
+
dataNotApplicable: "业务不适用",
|
|
296
|
+
dataNotCalculable: "无法计算",
|
|
265
297
|
columnSearchHint: "输入列名或字段标识",
|
|
266
298
|
columnSearchShortcut: "↑ ↓ 选择 · Enter 定位",
|
|
267
299
|
closeColumnDirectory: "关闭字段目录",
|
|
@@ -397,7 +429,7 @@ const ge = {
|
|
|
397
429
|
diagnosticImageDecode: "图片加载失败,请检查资源后重试。",
|
|
398
430
|
diagnosticAssetFailed: "图表或图片生成失败,请重试或联系管理员。",
|
|
399
431
|
diagnosticAssetBudget: "图片资源超出处理范围,请减少资源或缩小报表范围。"
|
|
400
|
-
},
|
|
432
|
+
}, be = {
|
|
401
433
|
emptyAccent: "#79a7e8",
|
|
402
434
|
shellBg: "#f4f7fc",
|
|
403
435
|
shellFg: "#334155",
|
|
@@ -410,10 +442,10 @@ const ge = {
|
|
|
410
442
|
btnHoverFg: "#315fba",
|
|
411
443
|
btnActiveBg: "#3569d4"
|
|
412
444
|
};
|
|
413
|
-
function
|
|
445
|
+
function ve(e = {}) {
|
|
414
446
|
return { ...e, defaults: e.defaults ?? {}, presets: e.presets ?? {} };
|
|
415
447
|
}
|
|
416
|
-
function
|
|
448
|
+
function De(e) {
|
|
417
449
|
return e;
|
|
418
450
|
}
|
|
419
451
|
const b = {
|
|
@@ -425,23 +457,28 @@ const b = {
|
|
|
425
457
|
gapPx: 18,
|
|
426
458
|
pdfFontUrl: "/simhei.ttf",
|
|
427
459
|
logger: console
|
|
428
|
-
},
|
|
460
|
+
}, qe = { warn: () => {
|
|
429
461
|
}, info: () => {
|
|
430
462
|
} };
|
|
431
|
-
function
|
|
463
|
+
function he(e, a) {
|
|
464
|
+
if (!(!e && !a))
|
|
465
|
+
return { ...e, ...a, calibration: { ...e?.calibration, ...a?.calibration } };
|
|
466
|
+
}
|
|
467
|
+
function S(e, a) {
|
|
432
468
|
return {
|
|
433
469
|
...e,
|
|
434
|
-
...
|
|
435
|
-
theme: { ...e?.theme, ...
|
|
436
|
-
messages: { ...e?.messages, ...
|
|
437
|
-
preview: { ...e?.preview, ...
|
|
438
|
-
xlsx: { ...e?.xlsx, ...
|
|
439
|
-
toolbar: { ...e?.toolbar, ...
|
|
440
|
-
interaction: { ...e?.interaction, ...
|
|
441
|
-
output: { ...e?.output, ...
|
|
470
|
+
...a,
|
|
471
|
+
theme: { ...e?.theme, ...a?.theme },
|
|
472
|
+
messages: { ...e?.messages, ...a?.messages },
|
|
473
|
+
preview: { ...e?.preview, ...a?.preview },
|
|
474
|
+
xlsx: { ...e?.xlsx, ...a?.xlsx },
|
|
475
|
+
toolbar: { ...e?.toolbar, ...a?.toolbar },
|
|
476
|
+
interaction: { ...e?.interaction, ...a?.interaction },
|
|
477
|
+
output: { ...e?.output, ...a?.output },
|
|
478
|
+
printOptions: he(e?.printOptions, a?.printOptions)
|
|
442
479
|
};
|
|
443
480
|
}
|
|
444
|
-
function
|
|
481
|
+
function ye(e) {
|
|
445
482
|
return {
|
|
446
483
|
showExport: e.showExport ?? b.showExport,
|
|
447
484
|
showPrint: e.showPrint ?? b.showPrint,
|
|
@@ -451,75 +488,79 @@ function ve(e) {
|
|
|
451
488
|
gapPx: e.gapPx ?? b.gapPx
|
|
452
489
|
};
|
|
453
490
|
}
|
|
454
|
-
function
|
|
455
|
-
const
|
|
491
|
+
function ke(e, a) {
|
|
492
|
+
const s = a ? e?.presets?.[a] : e?.defaultPreset ? e?.presets?.[e.defaultPreset] : void 0, r = S(e?.defaults, s);
|
|
456
493
|
return {
|
|
457
|
-
...
|
|
458
|
-
pdfFontUrl:
|
|
459
|
-
theme: { ...
|
|
460
|
-
messages: { ...
|
|
461
|
-
logger:
|
|
494
|
+
...ye(r),
|
|
495
|
+
pdfFontUrl: r.pdfFontUrl ?? b.pdfFontUrl,
|
|
496
|
+
theme: { ...be, ...r.theme },
|
|
497
|
+
messages: { ...me, ...r.messages },
|
|
498
|
+
logger: r.logger ?? b.logger,
|
|
462
499
|
preview: {
|
|
463
|
-
overscanPages: B(
|
|
464
|
-
searchDebounceMs: B(
|
|
500
|
+
overscanPages: B(r.preview?.overscanPages, 1, 10, !0),
|
|
501
|
+
searchDebounceMs: B(r.preview?.searchDebounceMs, 200, 2e3)
|
|
465
502
|
},
|
|
466
|
-
xlsx: { ...
|
|
467
|
-
editable:
|
|
468
|
-
excelImport:
|
|
469
|
-
toolbar: { ...
|
|
470
|
-
interaction: { ...
|
|
471
|
-
preferences:
|
|
472
|
-
assets:
|
|
473
|
-
guardChanges:
|
|
474
|
-
beforeDiscard:
|
|
475
|
-
output: { ...
|
|
503
|
+
xlsx: { ...r.xlsx },
|
|
504
|
+
editable: r.editable ?? !1,
|
|
505
|
+
excelImport: r.excelImport ?? !1,
|
|
506
|
+
toolbar: { ...r.toolbar },
|
|
507
|
+
interaction: { ...r.interaction },
|
|
508
|
+
preferences: r.preferences,
|
|
509
|
+
assets: r.assets,
|
|
510
|
+
guardChanges: r.guardChanges ?? !0,
|
|
511
|
+
beforeDiscard: r.beforeDiscard,
|
|
512
|
+
output: { ...r.output },
|
|
513
|
+
printOptions: r.printOptions
|
|
476
514
|
};
|
|
477
515
|
}
|
|
478
|
-
function B(e,
|
|
479
|
-
if (e == null || !Number.isFinite(e)) return
|
|
480
|
-
const
|
|
481
|
-
return
|
|
516
|
+
function B(e, a, s, r = !1) {
|
|
517
|
+
if (e == null || !Number.isFinite(e)) return a;
|
|
518
|
+
const i = Math.max(0, Math.min(s, e));
|
|
519
|
+
return r ? Math.floor(i) : i;
|
|
482
520
|
}
|
|
483
|
-
function
|
|
484
|
-
const
|
|
485
|
-
return e.emptyAccent != null && (
|
|
521
|
+
function Be(e) {
|
|
522
|
+
const a = {};
|
|
523
|
+
return e.emptyAccent != null && (a["--mrp-empty-accent"] = e.emptyAccent), e.shellBg != null && (a["--mrp-shell-bg"] = e.shellBg), e.shellFg != null && (a["--mrp-shell-fg"] = e.shellFg), e.toolbarBg != null && (a["--mrp-toolbar-bg"] = e.toolbarBg), e.toolbarBorder != null && (a["--mrp-toolbar-border"] = e.toolbarBorder), e.toolbarFg != null && (a["--mrp-toolbar-fg"] = e.toolbarFg), e.btnFg != null && (a["--mrp-btn-fg"] = e.btnFg), e.btnBorder != null && (a["--mrp-btn-border"] = e.btnBorder), e.btnHoverBg != null && (a["--mrp-btn-hover-bg"] = e.btnHoverBg), e.btnHoverFg != null && (a["--mrp-btn-hover-fg"] = e.btnHoverFg), e.btnActiveBg != null && (a["--mrp-btn-active-bg"] = e.btnActiveBg), a;
|
|
486
524
|
}
|
|
487
|
-
function
|
|
488
|
-
const
|
|
489
|
-
const
|
|
490
|
-
if (!
|
|
491
|
-
const o = { ...
|
|
525
|
+
function Te(e) {
|
|
526
|
+
const a = T(k, null), s = x(() => {
|
|
527
|
+
const r = a?.value ?? null, i = "defaults" in e || "presets" in e || "defaultPreset" in e ? ve(e) : { defaults: e, presets: {} };
|
|
528
|
+
if (!r) return i;
|
|
529
|
+
const o = { ...r.presets, ...i.presets };
|
|
492
530
|
for (const m of Object.keys(o))
|
|
493
531
|
o[m] = S(
|
|
494
|
-
S(
|
|
495
|
-
|
|
532
|
+
S(r.presets[m], i.defaults),
|
|
533
|
+
i.presets[m]
|
|
496
534
|
);
|
|
497
535
|
return {
|
|
498
|
-
defaults: S(
|
|
536
|
+
defaults: S(r.defaults, i.defaults),
|
|
499
537
|
presets: o,
|
|
500
|
-
defaultPreset:
|
|
538
|
+
defaultPreset: i.defaultPreset ?? r.defaultPreset
|
|
501
539
|
};
|
|
502
540
|
});
|
|
503
|
-
K(k,
|
|
541
|
+
K(k, s);
|
|
504
542
|
}
|
|
505
|
-
function
|
|
543
|
+
function Oe() {
|
|
506
544
|
return T(k, x(() => null));
|
|
507
545
|
}
|
|
508
546
|
export {
|
|
509
|
-
|
|
547
|
+
L as D,
|
|
510
548
|
h as M,
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
549
|
+
Re as R,
|
|
550
|
+
qe as S,
|
|
551
|
+
me as a,
|
|
552
|
+
Y as b,
|
|
553
|
+
be as c,
|
|
554
|
+
ve as d,
|
|
555
|
+
De as e,
|
|
556
|
+
Te as f,
|
|
557
|
+
ke as g,
|
|
558
|
+
Ce as h,
|
|
559
|
+
Fe as i,
|
|
560
|
+
Me as n,
|
|
561
|
+
Ae as p,
|
|
562
|
+
Ie as r,
|
|
563
|
+
Se as s,
|
|
564
|
+
Be as t,
|
|
565
|
+
Oe as u
|
|
525
566
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t,r=a=>typeof a=="string"&&a.trim().length>0&&a.length<=256;return!r(e.datasetId)||!r(e.field)||e.tableId!==void 0&&!r(e.tableId)?!1:e.rowKey===void 0?!0:typeof e.rowKey=="string"?e.rowKey.trim().length>0&&e.rowKey.length<=1024:typeof e.rowKey=="number"&&Number.isFinite(e.rowKey)}function n(t){return t==="missing-source"||t==="not-applicable"||t==="not-calculable"}function o(t){return t.target!==void 0&&!i(t.target)?!1:t.valueState===void 0||n(t.valueState)&&t.target!==void 0}exports.hasValidDataExplanation=o;exports.isReportDataTarget=i;exports.isReportValueState=n;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function i(t) {
|
|
2
|
+
if (!t || typeof t != "object" || Array.isArray(t)) return !1;
|
|
3
|
+
const e = t, r = (a) => typeof a == "string" && a.trim().length > 0 && a.length <= 256;
|
|
4
|
+
return !r(e.datasetId) || !r(e.field) || e.tableId !== void 0 && !r(e.tableId) ? !1 : e.rowKey === void 0 ? !0 : typeof e.rowKey == "string" ? e.rowKey.trim().length > 0 && e.rowKey.length <= 1024 : typeof e.rowKey == "number" && Number.isFinite(e.rowKey);
|
|
5
|
+
}
|
|
6
|
+
function n(t) {
|
|
7
|
+
return t === "missing-source" || t === "not-applicable" || t === "not-calculable";
|
|
8
|
+
}
|
|
9
|
+
function o(t) {
|
|
10
|
+
return t.target !== void 0 && !i(t.target) ? !1 : t.valueState === void 0 || n(t.valueState) && t.target !== void 0;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
n as a,
|
|
14
|
+
o as h,
|
|
15
|
+
i
|
|
16
|
+
};
|