@agile-team/mach-report 2.8.4 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -9
- package/dist/ExcelBindingWizard-DiaxvWpQ.cjs +1 -0
- package/dist/ExcelBindingWizard-RLJIXKKG.js +816 -0
- package/dist/{ReportPreview-DTWiCH5a.js → ReportPreview-B5ZNEasW.js} +22 -21
- package/dist/ReportPreview-DRtVPUYo.cjs +6 -0
- package/dist/RuleEditor-CskN5Fr3.cjs +1 -0
- package/dist/RuleEditor-CtJFzKuY.js +1578 -0
- package/dist/TemplateReviewPanel-C_Lmzis6.cjs +1 -0
- package/dist/TemplateReviewPanel-Cn32OY4_.js +173 -0
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +188 -5
- package/dist/analytics.d.ts +188 -5
- package/dist/analytics.js +68 -202
- package/dist/{assets-B9qJku3V.js → assets-DDsfEi8R.js} +3 -3
- package/dist/{assets-RZan7EyL.cjs → assets-ahTRUXRk.cjs} +1 -1
- package/dist/binding-preview-B5834rml.cjs +2 -0
- package/dist/binding-preview-ChXjN5L5.js +649 -0
- package/dist/{capabilities-joSutDF8.js → capabilities-Cm9hZ3uV.js} +5 -5
- package/dist/{capabilities-xGTpnPjJ.cjs → capabilities-DYzWL7KS.cjs} +1 -1
- package/dist/dataset-BkRmwgeJ.cjs +1 -0
- package/dist/dataset-H5pFuQGU.js +121 -0
- package/dist/defaults-DXhiM1ZD.js +10 -0
- package/dist/defaults-xhmcLLrf.cjs +1 -0
- package/dist/designer.cjs +2 -1
- package/dist/designer.d.cts +1373 -6
- package/dist/designer.d.ts +1373 -6
- package/dist/designer.js +2495 -767
- package/dist/grid-geometry-BNptEcMm.js +65 -0
- package/dist/grid-geometry-CZ_cYB6O.cjs +1 -0
- package/dist/import-template-CNMLJSQw.js +23030 -0
- package/dist/import-template-CpxunKVp.cjs +29 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +202 -3
- package/dist/index.d.ts +202 -3
- package/dist/index.js +554 -535
- package/dist/matrix-CNPDJxED.js +745 -0
- package/dist/matrix-Div9Ilh3.cjs +1 -0
- package/dist/pdf.cjs +46 -46
- package/dist/pdf.d.cts +2 -0
- package/dist/pdf.d.ts +2 -0
- package/dist/pdf.js +17 -16
- package/dist/{plugin-CQmJXNcA.js → plugin-BWwIgZXV.js} +1 -1
- package/dist/{plugin-DSFu51Ua.cjs → plugin-Dg-J1Rbm.cjs} +1 -1
- package/dist/progress-7OSZbFok.js +39 -0
- package/dist/progress-BnLiS5eH.cjs +1 -0
- package/dist/render-plan-7xpGrCEl.cjs +1 -0
- package/dist/render-plan-Ck6koX9L.js +13 -0
- package/dist/server/node.d.cts +62 -0
- package/dist/server/node.d.ts +62 -0
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +373 -145
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +311 -0
- package/dist/server.d.ts +311 -0
- package/dist/server.js +590 -186
- package/dist/{style-Dv5o_x6b.js → style-CQ1PK8ZB.js} +5 -5
- package/dist/style-UgIJSA1F.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/template-registry-CHMYZ7SD.cjs +1 -0
- package/dist/template-registry-R61AMCr0.js +433 -0
- package/dist/template-review-hvWWQFsi.js +1027 -0
- package/dist/template-review-jEcOfmGr.cjs +1 -0
- package/dist/textwrap-CWHyzkBH.cjs +4 -0
- package/dist/{textwrap-DOl04hCQ.js → textwrap-DE1kgcJB.js} +1 -1
- package/dist/{validate-DfHPD8wX.cjs → validate-BDiMqkJC.cjs} +1 -1
- package/dist/{validate-S6CgIm5d.js → validate-DWPF7icl.js} +13 -13
- package/dist/vue/async.d.cts +186 -0
- package/dist/vue/async.d.ts +186 -0
- package/dist/vue/index.d.cts +271 -3
- package/dist/vue/index.d.ts +271 -3
- 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/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +2 -0
- package/dist/worker.d.ts +2 -0
- package/dist/worker.js +1 -1
- package/dist/xlsx.cjs +2 -30
- package/dist/xlsx.d.cts +268 -0
- package/dist/xlsx.d.ts +268 -0
- package/dist/xlsx.js +220 -23440
- package/package.json +1 -1
- package/dist/ReportPreview-DjGeWHY-.cjs +0 -6
- package/dist/progress-DD964VAB.js +0 -102
- package/dist/progress-KvhwXZ1Q.cjs +0 -1
- package/dist/render-plan-CckPEQyf.cjs +0 -1
- package/dist/render-plan-uzZYYSy1.js +0 -19
- package/dist/report-source-BXHNy_AD.js +0 -755
- package/dist/report-source-CCAvFE3t.cjs +0 -1
- package/dist/style-CpwiOPyB.cjs +0 -1
- package/dist/template-registry-DWExx0gU.cjs +0 -1
- package/dist/template-registry-NpOakidD.js +0 -354
- package/dist/textwrap-CnGsEum6.cjs +0 -4
package/dist/designer.js
CHANGED
|
@@ -1,268 +1,285 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideMachReportConfig as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
d: "M3 4h14M6 8h8M3 12h14M6 16h8"
|
|
16
|
-
}, Ge = {
|
|
17
|
-
key: 2,
|
|
18
|
-
d: "M3 4h14M8 8h9M3 12h14M8 16h9"
|
|
19
|
-
}, He = {
|
|
20
|
-
key: 3,
|
|
21
|
-
d: "M3 4h14M3 8h14M3 12h14M3 16h14"
|
|
22
|
-
}, Ue = /* @__PURE__ */ Ce({
|
|
23
|
-
__name: "AlignmentControl",
|
|
24
|
-
props: {
|
|
25
|
-
modelValue: {},
|
|
26
|
-
label: {},
|
|
27
|
-
labels: {},
|
|
28
|
-
autoLabel: {},
|
|
29
|
-
allowAuto: { type: Boolean }
|
|
30
|
-
},
|
|
31
|
-
emits: ["update:modelValue"],
|
|
32
|
-
setup(r, { emit: w }) {
|
|
33
|
-
const c = r, g = w, u = () => c.allowAuto ? ["auto", "left", "center", "right", "justify"] : ["left", "center", "right", "justify"];
|
|
34
|
-
async function i(b, $) {
|
|
35
|
-
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(b.key)) return;
|
|
36
|
-
b.preventDefault();
|
|
37
|
-
const _ = u(), k = _.indexOf($), C = b.key === "Home" ? 0 : b.key === "End" ? _.length - 1 : (k + (b.key === "ArrowRight" ? 1 : -1) + _.length) % _.length;
|
|
38
|
-
g("update:modelValue", _[C]);
|
|
39
|
-
const A = b.currentTarget.parentElement;
|
|
40
|
-
await Y(), A?.querySelector(`[data-align="${_[C]}"]`)?.focus();
|
|
41
|
-
}
|
|
42
|
-
return (b, $) => (p(), y("div", {
|
|
43
|
-
class: "mr-designer-alignment",
|
|
44
|
-
role: "radiogroup",
|
|
45
|
-
"aria-label": r.label
|
|
46
|
-
}, [
|
|
47
|
-
(p(!0), y(X, null, oe(u(), (m) => (p(), y("button", {
|
|
48
|
-
key: m,
|
|
49
|
-
type: "button",
|
|
50
|
-
role: "radio",
|
|
51
|
-
"data-align": m,
|
|
52
|
-
"aria-label": r.labels[m],
|
|
53
|
-
title: r.labels[m],
|
|
54
|
-
"aria-checked": r.modelValue === m,
|
|
55
|
-
tabindex: r.modelValue === m ? 0 : -1,
|
|
56
|
-
onClick: (_) => g("update:modelValue", m),
|
|
57
|
-
onKeydown: (_) => i(_, m)
|
|
58
|
-
}, [
|
|
59
|
-
m === "auto" ? (p(), y("span", Oe, s(r.autoLabel), 1)) : (p(), y("svg", Ie, [
|
|
60
|
-
m === "left" ? (p(), y("path", Je)) : m === "center" ? (p(), y("path", Ne)) : m === "right" ? (p(), y("path", Ge)) : (p(), y("path", He))
|
|
61
|
-
]))
|
|
62
|
-
], 40, Pe))), 128))
|
|
63
|
-
], 8, Be));
|
|
64
|
-
}
|
|
65
|
-
}), we = /* @__PURE__ */ Se(Ue, [["__scopeId", "data-v-c85770c4"]]);
|
|
66
|
-
function Fe(r, w, c) {
|
|
67
|
-
if (!r.length) return;
|
|
68
|
-
const g = Math.max(0, r.indexOf(w)), i = {
|
|
69
|
-
ArrowDown: Math.min(g + 1, r.length - 1),
|
|
70
|
-
ArrowUp: Math.max(g - 1, 0),
|
|
71
|
-
Home: 0,
|
|
72
|
-
End: r.length - 1
|
|
73
|
-
}[c];
|
|
74
|
-
return i === void 0 ? void 0 : r[i];
|
|
1
|
+
import { watch as Z, onBeforeUnmount as $e, defineComponent as Ee, computed as z, ref as j, openBlock as h, createElementBlock as y, createElementVNode as n, toDisplayString as l, createTextVNode as P, withDirectives as oe, vModelSelect as ye, normalizeStyle as re, Fragment as U, renderList as W, unref as e, normalizeClass as _e, withModifiers as tt, createCommentVNode as B, nextTick as de, createVNode as Q, onMounted as ht, shallowRef as nt, defineAsyncComponent as Me, getCurrentInstance as gt, withKeys as Be, createBlock as fe, vShow as Te, isRef as Ce, vModelText as qe } from "vue";
|
|
2
|
+
import { provideMachReportConfig as ft, createLocalFetcher as bt, ReportPreview as yt } from "@agile-team/mach-report/vue";
|
|
3
|
+
import { resolveGridLayout as ve, parseReportTemplate as Y, serializeReportTemplate as me, validateReportTemplateDocument as Ye } from "@agile-team/mach-report";
|
|
4
|
+
import { _ as Ie, a as ae } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
5
|
+
import { r as Ne } from "./style-CQ1PK8ZB.js";
|
|
6
|
+
const wt = 96 / 25.4;
|
|
7
|
+
function Oe(t) {
|
|
8
|
+
return t.kind === "list" ? Math.max(
|
|
9
|
+
16,
|
|
10
|
+
(t.headerGrid?.rowHeightsMm?.reduce(
|
|
11
|
+
(u, s) => u + s,
|
|
12
|
+
0
|
|
13
|
+
) ?? 8) + (t.rowHeightMm ?? 8) * 3
|
|
14
|
+
) : t.heightMm;
|
|
75
15
|
}
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
if (f.key === "Enter") {
|
|
115
|
-
o.includes(u.value) && A(u.value);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
f.key === "ArrowUp" && (u.value = o.at(-1)), await Y(), _(!0);
|
|
16
|
+
function Se(t) {
|
|
17
|
+
return {
|
|
18
|
+
leftMm: t.leftMm,
|
|
19
|
+
topMm: t.topMm,
|
|
20
|
+
widthMm: t.widthMm,
|
|
21
|
+
heightMm: Oe(t)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function ze(t, u) {
|
|
25
|
+
return u ? t.template.pages[u.pageIndex]?.components[u.componentIndex] : void 0;
|
|
26
|
+
}
|
|
27
|
+
function kt(t, u = "detail") {
|
|
28
|
+
const s = { leftMm: 10, topMm: 10, widthMm: 60, heightMm: 10 };
|
|
29
|
+
return t === "list" ? {
|
|
30
|
+
kind: t,
|
|
31
|
+
leftMm: 10,
|
|
32
|
+
topMm: 30,
|
|
33
|
+
widthMm: 90,
|
|
34
|
+
dataset: u,
|
|
35
|
+
columns: [
|
|
36
|
+
{ header: "字段", field: "field", widthMm: 45 },
|
|
37
|
+
{ header: "数值", field: "value", widthMm: 45 }
|
|
38
|
+
],
|
|
39
|
+
border: !0,
|
|
40
|
+
headerBackgroundColor: "#eaf2fc",
|
|
41
|
+
headerAlign: "center"
|
|
42
|
+
} : t === "text" ? {
|
|
43
|
+
...s,
|
|
44
|
+
kind: t,
|
|
45
|
+
text: "文本",
|
|
46
|
+
style: { fontSize: 12, color: "#233c5c" }
|
|
47
|
+
} : t === "rect" ? {
|
|
48
|
+
...s,
|
|
49
|
+
kind: t,
|
|
50
|
+
style: {
|
|
51
|
+
borderColor: "#cbd5e1",
|
|
52
|
+
lineWidthPt: 0.75,
|
|
53
|
+
backgroundColor: "#eff6ff"
|
|
119
54
|
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const o = f.relatedTarget;
|
|
127
|
-
!o || b.value?.contains(o) || i.value?.contains(o) || k();
|
|
128
|
-
}
|
|
129
|
-
return te(c, (f) => {
|
|
130
|
-
f.some((o) => o.index === u.value) || (u.value = f[0]?.index ?? -1);
|
|
131
|
-
}), te(w, () => {
|
|
132
|
-
k();
|
|
133
|
-
}), Ee(() => document.addEventListener("pointerdown", O)), be(() => document.removeEventListener("pointerdown", O)), {
|
|
134
|
-
open: g,
|
|
135
|
-
cursor: u,
|
|
136
|
-
trigger: i,
|
|
137
|
-
panel: b,
|
|
138
|
-
search: $,
|
|
139
|
-
list: m,
|
|
140
|
-
toggle: C,
|
|
141
|
-
close: k,
|
|
142
|
-
choose: A,
|
|
143
|
-
escape: S,
|
|
144
|
-
navigate: G,
|
|
145
|
-
searchKeydown: Z,
|
|
146
|
-
leave: V
|
|
55
|
+
} : {
|
|
56
|
+
...s,
|
|
57
|
+
kind: t,
|
|
58
|
+
widthMm: 48,
|
|
59
|
+
heightMm: 24,
|
|
60
|
+
imageData: `data:image/svg+xml;charset=utf-8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="180" height="90" viewBox="0 0 180 90"><rect width="180" height="90" rx="5" fill="#eff6ff"/><path d="m25 68 32-32 25 23 27-35 45 44" fill="none" stroke="#94b8e5" stroke-width="3"/><circle cx="45" cy="24" r="7" fill="#bfd5ef"/></svg>')}`
|
|
147
61
|
};
|
|
148
62
|
}
|
|
149
|
-
function
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
function Z() {
|
|
180
|
-
const o = $.value[u.value];
|
|
181
|
-
if (!o) return;
|
|
182
|
-
const d = o.component, v = r.value.template.pages[o.pageIndex], h = d.columns.map((x) => x.widthMm);
|
|
183
|
-
d.headerGrid && (d.headerGrid.colWidthsMm = h), v.layout === "wide" && h.every((x) => Number.isFinite(x) && x > 0) && (d.widthMm = h.reduce((x, t) => x + t, 0), v.widthMm = Math.max(...v.components.map((x) => x.leftMm + x.widthMm)) + (v.marginRightMm ?? 0));
|
|
184
|
-
}
|
|
185
|
-
function O(o, d) {
|
|
186
|
-
const v = m.value;
|
|
187
|
-
if (!v?.headerGrid) return;
|
|
188
|
-
const x = pe(v.headerGrid, v.widthMm, 100).cells.filter(({ ci: t, cell: I }) => t <= o && t + (I.colSpan ?? 1) > o).slice(-1)[0];
|
|
189
|
-
x && (Object.assign(x.cell, { text: d, rawText: d, value: d }), v.columns.slice(x.ci, x.ci + (x.cell.colSpan ?? 1)).forEach((t) => {
|
|
190
|
-
t.header = d;
|
|
191
|
-
}));
|
|
63
|
+
function je(t, u, s = !1) {
|
|
64
|
+
const r = Math.max(2, Math.min(u.widthMm, t.widthMm)), a = Math.max(2, Math.min(u.heightMm, t.heightMm));
|
|
65
|
+
return {
|
|
66
|
+
leftMm: Math.max(0, Math.min(u.widthMm - r, t.leftMm)),
|
|
67
|
+
topMm: Math.max(
|
|
68
|
+
0,
|
|
69
|
+
Math.min(u.heightMm - (s ? 2 : a), t.topMm)
|
|
70
|
+
),
|
|
71
|
+
widthMm: r,
|
|
72
|
+
heightMm: a
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function Qe(t, u) {
|
|
76
|
+
const s = t.widthMm;
|
|
77
|
+
if (Object.assign(t, {
|
|
78
|
+
leftMm: u.leftMm,
|
|
79
|
+
topMm: u.topMm,
|
|
80
|
+
widthMm: u.widthMm
|
|
81
|
+
}), t.kind !== "list") t.heightMm = u.heightMm;
|
|
82
|
+
else if (s > 0 && u.widthMm !== s) {
|
|
83
|
+
const r = u.widthMm / s;
|
|
84
|
+
t.columns.forEach((a) => {
|
|
85
|
+
a.widthMm = Math.round(a.widthMm * r * 100) / 100;
|
|
86
|
+
}), t.widthMm = t.columns.reduce(
|
|
87
|
+
(a, b) => a + b.widthMm,
|
|
88
|
+
0
|
|
89
|
+
), t.headerGrid && (t.headerGrid.colWidthsMm = t.columns.map(
|
|
90
|
+
(a) => a.widthMm
|
|
91
|
+
));
|
|
192
92
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
93
|
+
}
|
|
94
|
+
function Mt(t, u, s) {
|
|
95
|
+
if (u === s || !t.columns[u] || !t.columns[s]) return !1;
|
|
96
|
+
if (t.headerGrid) {
|
|
97
|
+
if (ve(t.headerGrid, t.widthMm, 100).cells.some(({ cell: b }) => (b.colSpan ?? 1) > 1))
|
|
98
|
+
throw new Error("请先拆分跨列合并表头,再调整列顺序,避免改变业务分组。");
|
|
99
|
+
const a = Re(t);
|
|
100
|
+
a.forEach((b) => {
|
|
101
|
+
b.splice(s, 0, b.splice(u, 1)[0]);
|
|
102
|
+
}), t.headerGrid = Ge(
|
|
103
|
+
a,
|
|
104
|
+
t.columns.map((b) => b.widthMm),
|
|
105
|
+
t.headerGrid.rowHeightsMm ?? a.map(() => 8)
|
|
106
|
+
);
|
|
200
107
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
108
|
+
return t.columns.splice(s, 0, t.columns.splice(u, 1)[0]), t.headerGrid && (t.headerGrid.colWidthsMm = t.columns.map((r) => r.widthMm)), !0;
|
|
109
|
+
}
|
|
110
|
+
function Re(t) {
|
|
111
|
+
if (!t.headerGrid)
|
|
112
|
+
return [t.columns.map((s) => ({ text: s.header }))];
|
|
113
|
+
const u = Array.from(
|
|
114
|
+
{ length: t.headerGrid.cells.length },
|
|
115
|
+
() => Array.from({ length: t.columns.length }, () => null)
|
|
116
|
+
);
|
|
117
|
+
for (const { cell: s, ri: r, ci: a } of ve(
|
|
118
|
+
t.headerGrid,
|
|
119
|
+
t.widthMm,
|
|
120
|
+
100
|
|
121
|
+
).cells)
|
|
122
|
+
u[r][a] = s;
|
|
123
|
+
return u;
|
|
124
|
+
}
|
|
125
|
+
function Ge(t, u, s) {
|
|
126
|
+
const r = /* @__PURE__ */ new Set();
|
|
127
|
+
return { cells: t.map(
|
|
128
|
+
(b, m) => b.flatMap((_, d) => {
|
|
129
|
+
if (r.has(`${m}:${d}`)) return [];
|
|
130
|
+
if (!_) return [null];
|
|
131
|
+
for (let w = m; w < m + (_.rowSpan ?? 1); w++)
|
|
132
|
+
for (let x = d; x < d + (_.colSpan ?? 1); x++)
|
|
133
|
+
(w !== m || x !== d) && r.add(`${w}:${x}`);
|
|
134
|
+
return [_];
|
|
135
|
+
})
|
|
136
|
+
), colWidthsMm: u, rowHeightsMm: s };
|
|
137
|
+
}
|
|
138
|
+
function xt(t) {
|
|
139
|
+
const u = Re(t), s = t.headerGrid?.rowHeightsMm ?? u.map(() => 8);
|
|
140
|
+
u.unshift(
|
|
141
|
+
t.columns.map(() => ({
|
|
142
|
+
text: "分组",
|
|
143
|
+
style: { align: "center", backgroundColor: "#eaf2fc", bold: !0 }
|
|
144
|
+
}))
|
|
145
|
+
), t.headerGrid = Ge(
|
|
146
|
+
u,
|
|
147
|
+
t.columns.map((r) => r.widthMm),
|
|
148
|
+
[8, ...s]
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
function Ct(t, u, s, r) {
|
|
152
|
+
if (s >= r || s < 0 || r >= t.columns.length)
|
|
153
|
+
throw new Error("请选择同一行的至少两个连续表头。");
|
|
154
|
+
const a = Re(t), b = a[u];
|
|
155
|
+
if (!b) throw new Error("表头行不存在。");
|
|
156
|
+
const m = b.slice(s, r + 1);
|
|
157
|
+
if (m.some(
|
|
158
|
+
(d) => !d || (d.colSpan ?? 1) !== 1 || (d.rowSpan ?? 1) !== 1
|
|
159
|
+
))
|
|
160
|
+
throw new Error("选择包含合并区域,请先拆分,再重新合并。");
|
|
161
|
+
const _ = m[0];
|
|
162
|
+
b[s] = { ..._, colSpan: r - s + 1 };
|
|
163
|
+
for (let d = s + 1; d <= r; d++) b[d] = null;
|
|
164
|
+
t.headerGrid = Ge(
|
|
165
|
+
a,
|
|
166
|
+
t.columns.map((d) => d.widthMm),
|
|
167
|
+
t.headerGrid?.rowHeightsMm ?? [8]
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
function _t(t, u, s) {
|
|
171
|
+
if (!t.headerGrid) return;
|
|
172
|
+
const a = ve(t.headerGrid, t.widthMm, 100).cells.find(
|
|
173
|
+
({ ri: w, ci: x, cell: E }) => u >= w && u < w + (E.rowSpan ?? 1) && s >= x && s < x + (E.colSpan ?? 1)
|
|
174
|
+
);
|
|
175
|
+
if (!a) return;
|
|
176
|
+
const b = Re(t), { ri: m, ci: _, cell: d } = a;
|
|
177
|
+
for (let w = m; w < m + (d.rowSpan ?? 1); w++)
|
|
178
|
+
for (let x = _; x < _ + (d.colSpan ?? 1); x++) {
|
|
179
|
+
const E = {
|
|
180
|
+
...d,
|
|
181
|
+
text: w === b.length - 1 ? t.columns[x].header : d.text
|
|
182
|
+
};
|
|
183
|
+
delete E.colSpan, delete E.rowSpan, b[w][x] = E;
|
|
208
184
|
}
|
|
185
|
+
t.headerGrid = Ge(
|
|
186
|
+
b,
|
|
187
|
+
t.columns.map((w) => w.widthMm),
|
|
188
|
+
t.headerGrid.rowHeightsMm ?? b.map(() => 8)
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
function Ze(t, u, s) {
|
|
192
|
+
const r = t.filter((a) => a !== u).flatMap((a) => {
|
|
193
|
+
const b = a[s], m = s === "leftMm" ? a.widthMm : Oe(a);
|
|
194
|
+
return [b, b + m / 2, b + m];
|
|
195
|
+
});
|
|
196
|
+
return [...new Set(r)].sort((a, b) => a - b);
|
|
197
|
+
}
|
|
198
|
+
function St(t, u) {
|
|
199
|
+
if (!t.length) return;
|
|
200
|
+
let s = 0, r = t.length;
|
|
201
|
+
for (; s < r; ) {
|
|
202
|
+
const m = s + r >>> 1;
|
|
203
|
+
t[m] < u ? s = m + 1 : r = m;
|
|
209
204
|
}
|
|
210
|
-
|
|
205
|
+
const a = t[Math.max(0, s - 1)], b = t[Math.min(t.length - 1, s)];
|
|
206
|
+
return Math.abs(a - u) < Math.abs(b - u) ? a : b;
|
|
211
207
|
}
|
|
212
|
-
function
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
if (
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
c.value = C, g.value = c.value.length - 1;
|
|
224
|
-
}
|
|
225
|
-
function _(k) {
|
|
226
|
-
if (!(k < 0 ? !u.value : !i.value))
|
|
227
|
-
return g.value += k, c.value[g.value];
|
|
228
|
-
}
|
|
229
|
-
return { canUndo: u, canRedo: i, current: b, reset: $, record: m, move: _ };
|
|
208
|
+
function et(t, u, s, r) {
|
|
209
|
+
let a = 1 / 0, b = {
|
|
210
|
+
value: Math.round(t * 2) / 2
|
|
211
|
+
};
|
|
212
|
+
for (const m of [0, u / 2, u]) {
|
|
213
|
+
const _ = St(s, t + m);
|
|
214
|
+
if (_ === void 0) continue;
|
|
215
|
+
const d = Math.abs(_ - t - m);
|
|
216
|
+
d <= r && d < a && (a = d, b = { value: _ - m, guide: _ });
|
|
217
|
+
}
|
|
218
|
+
return b;
|
|
230
219
|
}
|
|
231
|
-
function
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
220
|
+
function $t(t) {
|
|
221
|
+
let u;
|
|
222
|
+
function s(r, a, b = !1) {
|
|
223
|
+
if (t.disabled() || r.button !== 0) return;
|
|
224
|
+
r.preventDefault(), r.stopPropagation(), u?.();
|
|
225
|
+
const m = r.currentTarget.closest(
|
|
226
|
+
"[data-canvas-component]"
|
|
227
|
+
), _ = Se(a), d = r.clientX, w = r.clientY;
|
|
228
|
+
let x = _, E = 0;
|
|
229
|
+
const G = t.scale.value, A = m.parentElement;
|
|
230
|
+
let g, f;
|
|
231
|
+
const I = () => {
|
|
232
|
+
for (const [T, F] of [
|
|
233
|
+
["x", g],
|
|
234
|
+
["y", f]
|
|
235
|
+
])
|
|
236
|
+
A.style.setProperty(
|
|
237
|
+
`--mr-canvas-guide-${T}-display`,
|
|
238
|
+
F === void 0 ? "none" : "block"
|
|
239
|
+
), F !== void 0 && A.style.setProperty(
|
|
240
|
+
`--mr-canvas-guide-${T}`,
|
|
241
|
+
`${F * G}px`
|
|
242
|
+
);
|
|
243
|
+
}, k = () => {
|
|
244
|
+
E = 0, I(), m.style.left = `${x.leftMm * G}px`, m.style.top = `${x.topMm * G}px`, m.style.width = `${x.widthMm * G}px`, m.style.height = `${x.heightMm * G}px`;
|
|
245
|
+
}, S = {
|
|
246
|
+
leftMm: Ze(t.page().components, a, "leftMm"),
|
|
247
|
+
topMm: Ze(t.page().components, a, "topMm")
|
|
248
|
+
}, c = (T) => {
|
|
249
|
+
const F = (T.clientX - d) / G, te = (T.clientY - w) / G, o = et(
|
|
250
|
+
_.leftMm + F,
|
|
251
|
+
_.widthMm,
|
|
252
|
+
S.leftMm,
|
|
253
|
+
5 / G
|
|
254
|
+
), q = et(
|
|
255
|
+
_.topMm + te,
|
|
256
|
+
_.heightMm,
|
|
257
|
+
S.topMm,
|
|
258
|
+
5 / G
|
|
259
|
+
);
|
|
260
|
+
g = b ? void 0 : o.guide, f = b ? void 0 : q.guide, x = je(
|
|
261
|
+
b ? {
|
|
262
|
+
..._,
|
|
263
|
+
widthMm: Math.round((_.widthMm + F) * 2) / 2,
|
|
264
|
+
heightMm: Math.round((_.heightMm + te) * 2) / 2
|
|
265
|
+
} : { ..._, leftMm: o.value, topMm: q.value },
|
|
266
|
+
t.page(),
|
|
267
|
+
a.kind === "list"
|
|
268
|
+
), E || (E = requestAnimationFrame(k));
|
|
269
|
+
}, M = (T) => {
|
|
270
|
+
window.removeEventListener("pointermove", c), window.removeEventListener("pointerup", p), window.removeEventListener("pointercancel", C), window.removeEventListener("keydown", D), E && cancelAnimationFrame(E), x = T ? x : _, g = void 0, f = void 0, k(), u = void 0, T && JSON.stringify(x) !== JSON.stringify(_) && t.commit(x);
|
|
271
|
+
}, p = () => M(!0), C = () => M(!1), D = (T) => {
|
|
272
|
+
T.key === "Escape" && (T.preventDefault(), C());
|
|
273
|
+
};
|
|
274
|
+
window.addEventListener("pointermove", c), window.addEventListener("pointerup", p), window.addEventListener("pointercancel", C), window.addEventListener("keydown", D), u = C;
|
|
260
275
|
}
|
|
261
|
-
return
|
|
276
|
+
return Z(t.disabled, (r) => {
|
|
277
|
+
r && u?.();
|
|
278
|
+
}), Z(t.page, () => u?.()), $e(() => u?.()), { start: s };
|
|
262
279
|
}
|
|
263
|
-
const
|
|
264
|
-
title: "
|
|
265
|
-
heading: "
|
|
280
|
+
const Et = {
|
|
281
|
+
title: "报表模板设计器",
|
|
282
|
+
heading: "模板设计",
|
|
266
283
|
unpublished: "未发布",
|
|
267
284
|
dirty: "有未保存修改",
|
|
268
285
|
reset: "恢复草稿",
|
|
@@ -293,7 +310,65 @@ const Qe = {
|
|
|
293
310
|
applyJson: "校验并应用 JSON",
|
|
294
311
|
note: "字段映射应与数据源契约一致。此编辑器维护模板属性;保存由接入方提供的版本服务处理。",
|
|
295
312
|
invalid: "请先修正模板错误,再预览或保存。"
|
|
296
|
-
},
|
|
313
|
+
}, It = {
|
|
314
|
+
repeatPage: "每页重复",
|
|
315
|
+
repeatNone: "不重复",
|
|
316
|
+
repeatHeader: "页眉",
|
|
317
|
+
repeatFooter: "页脚",
|
|
318
|
+
textFormat: "文字样式",
|
|
319
|
+
fontSize: "字号(pt)",
|
|
320
|
+
fontBold: "加粗",
|
|
321
|
+
textColor: "文字颜色",
|
|
322
|
+
backgroundColor: "背景颜色",
|
|
323
|
+
canvasGridLimited: "设计窗口仅显示前 2000 个单元格;最终预览与导出保留完整内容。",
|
|
324
|
+
design: "设计",
|
|
325
|
+
preview: "预览",
|
|
326
|
+
componentSection: "组件",
|
|
327
|
+
toolsSection: "工具",
|
|
328
|
+
component: "组件",
|
|
329
|
+
components: "组件目录",
|
|
330
|
+
canvasHint: "点击选择 · 拖动移动 · 方向键微调 · Shift 加速 · Esc 取消",
|
|
331
|
+
zoom: "缩放",
|
|
332
|
+
sampleRows: "数据预览区域",
|
|
333
|
+
resizeComponent: "调整组件尺寸",
|
|
334
|
+
resizeColumn: "调整列宽",
|
|
335
|
+
insertComponent: "添加组件",
|
|
336
|
+
insertText: "文本",
|
|
337
|
+
insertList: "明细表",
|
|
338
|
+
insertImage: "图片",
|
|
339
|
+
insertRect: "矩形",
|
|
340
|
+
removeComponent: "删除组件",
|
|
341
|
+
duplicateComponent: "复制组件",
|
|
342
|
+
forward: "向上移动层级",
|
|
343
|
+
backward: "向下移动层级",
|
|
344
|
+
positionGroup: "位置与尺寸 · mm",
|
|
345
|
+
componentContent: "组件内容",
|
|
346
|
+
componentText: "文本内容",
|
|
347
|
+
imageSource: "图片地址或 data URI",
|
|
348
|
+
imageUpload: "上传图片",
|
|
349
|
+
imageBudget: "图片不超过 4 MB,支持 PNG/JPEG/WebP/SVG",
|
|
350
|
+
leftPosition: "左侧",
|
|
351
|
+
topPosition: "顶部",
|
|
352
|
+
componentWidth: "宽度",
|
|
353
|
+
componentHeight: "高度",
|
|
354
|
+
noComponent: "在画布或目录选择组件",
|
|
355
|
+
listDataset: "数据集",
|
|
356
|
+
columnOrder: "列结构",
|
|
357
|
+
moveColumnLeft: "向前移动列",
|
|
358
|
+
moveColumnRight: "向后移动列",
|
|
359
|
+
columnVisible: "显示此列",
|
|
360
|
+
headerStructure: "多层表头",
|
|
361
|
+
addHeaderRow: "添加分组行",
|
|
362
|
+
mergeHeader: "合并所选表头",
|
|
363
|
+
splitHeader: "拆分表头",
|
|
364
|
+
headerRow: "表头行",
|
|
365
|
+
headerFirst: "开始列",
|
|
366
|
+
headerLast: "结束列",
|
|
367
|
+
excelTool: "Excel 绑定",
|
|
368
|
+
rulesTool: "计算与规则",
|
|
369
|
+
reviewTool: "发布检查",
|
|
370
|
+
toolsDescription: "按需绑定数据、定义规则并验证模板。",
|
|
371
|
+
rulesNeedList: "请先在字段区域选择明细表。",
|
|
297
372
|
undo: "撤销",
|
|
298
373
|
redo: "重做",
|
|
299
374
|
columnsSearch: "搜索列名或字段",
|
|
@@ -335,16 +410,1047 @@ const Qe = {
|
|
|
335
410
|
technicalDetails: "标识与修订",
|
|
336
411
|
fieldPosition: "当前字段",
|
|
337
412
|
previewFieldDirectory: "定位字段"
|
|
338
|
-
},
|
|
339
|
-
...
|
|
340
|
-
...
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
|
|
413
|
+
}, Pe = {
|
|
414
|
+
...Et,
|
|
415
|
+
...It
|
|
416
|
+
}, At = { class: "mr-canvas" }, Dt = { class: "mr-canvas-heading" }, Tt = { class: "mr-canvas-scroll" }, Lt = ["data-canvas-component", "aria-label", "aria-pressed", "tabindex", "onFocus", "onPointerdown", "onClick", "onKeydown"], Rt = { class: "mr-canvas-table" }, Gt = {
|
|
417
|
+
key: 1,
|
|
418
|
+
class: "mr-canvas-table-row is-header"
|
|
419
|
+
}, Pt = ["onPointerdown"], Ht = {
|
|
420
|
+
key: 2,
|
|
421
|
+
class: "mr-canvas-placeholder"
|
|
422
|
+
}, Vt = ["aria-label", "onPointerdown"], Bt = {
|
|
423
|
+
key: 1,
|
|
424
|
+
class: "mr-canvas-static-grid"
|
|
425
|
+
}, zt = {
|
|
426
|
+
key: 0,
|
|
427
|
+
class: "mr-canvas-grid-limit"
|
|
428
|
+
}, Nt = ["src"], jt = ["aria-label", "onPointerdown"], Ft = /* @__PURE__ */ Ee({
|
|
429
|
+
__name: "TemplateDesignCanvas",
|
|
430
|
+
props: {
|
|
431
|
+
document: {},
|
|
432
|
+
selection: {},
|
|
433
|
+
pageIndex: {},
|
|
434
|
+
datasets: {},
|
|
435
|
+
disabled: { type: Boolean },
|
|
436
|
+
messages: {}
|
|
437
|
+
},
|
|
438
|
+
emits: ["select", "geometry", "column", "width"],
|
|
439
|
+
setup(t, { emit: u }) {
|
|
440
|
+
const s = t, r = u, a = z(() => ({ ...Pe, ...s.messages })), b = j(0.8), m = z(() => b.value * wt), _ = z(() => s.document.template.pages[s.pageIndex]), d = $t({
|
|
441
|
+
scale: m,
|
|
442
|
+
page: () => _.value,
|
|
443
|
+
disabled: () => s.disabled === !0,
|
|
444
|
+
commit: (k) => r("geometry", k)
|
|
445
|
+
});
|
|
446
|
+
function w(k) {
|
|
447
|
+
return s.selection?.pageIndex === s.pageIndex && s.selection.componentIndex === k;
|
|
448
|
+
}
|
|
449
|
+
function x(k) {
|
|
450
|
+
const S = _.value.components[k];
|
|
451
|
+
return {
|
|
452
|
+
left: `${S.leftMm * m.value}px`,
|
|
453
|
+
top: `${S.topMm * m.value}px`,
|
|
454
|
+
width: `${S.widthMm * m.value}px`,
|
|
455
|
+
height: `${Oe(S) * m.value}px`
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
function E(k, S) {
|
|
459
|
+
const c = _.value.components[S];
|
|
460
|
+
if (s.disabled || !w(S)) return;
|
|
461
|
+
const M = {
|
|
462
|
+
ArrowLeft: [-1, 0],
|
|
463
|
+
ArrowRight: [1, 0],
|
|
464
|
+
ArrowUp: [0, -1],
|
|
465
|
+
ArrowDown: [0, 1]
|
|
466
|
+
}, p = M[k.key];
|
|
467
|
+
if (!p) return;
|
|
468
|
+
k.preventDefault(), k.stopPropagation();
|
|
469
|
+
const C = Se(c), D = k.shiftKey ? 5 : 0.5;
|
|
470
|
+
C.leftMm += p[0] * D, C.topMm += p[1] * D, r("geometry", C);
|
|
471
|
+
}
|
|
472
|
+
function G(k) {
|
|
473
|
+
let S = 0;
|
|
474
|
+
return k.columns.map((c) => (S += c.widthMm, S));
|
|
475
|
+
}
|
|
476
|
+
function A(k) {
|
|
477
|
+
return k.grid ? ve(
|
|
478
|
+
k.grid,
|
|
479
|
+
k.widthMm,
|
|
480
|
+
k.heightMm
|
|
481
|
+
).cells.slice(0, 2e3) : [];
|
|
482
|
+
}
|
|
483
|
+
function g(k) {
|
|
484
|
+
return k.headerGrid ? ve(
|
|
485
|
+
k.headerGrid,
|
|
486
|
+
k.widthMm,
|
|
487
|
+
k.headerGrid.rowHeightsMm?.reduce(
|
|
488
|
+
(S, c) => S + c,
|
|
489
|
+
0
|
|
490
|
+
) ?? k.headerGrid.cells.length * 8
|
|
491
|
+
).cells : [];
|
|
492
|
+
}
|
|
493
|
+
let f;
|
|
494
|
+
Z(
|
|
495
|
+
() => s.disabled,
|
|
496
|
+
(k) => {
|
|
497
|
+
k && f?.();
|
|
498
|
+
}
|
|
499
|
+
), Z(
|
|
500
|
+
() => s.document,
|
|
501
|
+
() => f?.()
|
|
502
|
+
), $e(() => f?.());
|
|
503
|
+
function I(k, S, c) {
|
|
504
|
+
if (s.disabled || k.button !== 0) return;
|
|
505
|
+
k.preventDefault(), k.stopPropagation(), f?.();
|
|
506
|
+
const M = k.clientX, p = S.columns[c].widthMm;
|
|
507
|
+
let C = p;
|
|
508
|
+
const D = k.currentTarget, T = ($) => {
|
|
509
|
+
C = Math.max(
|
|
510
|
+
2,
|
|
511
|
+
Math.round((p + ($.clientX - M) / m.value) * 2) / 2
|
|
512
|
+
), D.style.transform = `translateX(${(C - p) * m.value}px)`;
|
|
513
|
+
}, F = () => {
|
|
514
|
+
window.removeEventListener("pointermove", T), window.removeEventListener("pointerup", te), window.removeEventListener("pointercancel", o), window.removeEventListener("keydown", q), D.style.transform = "", f = void 0;
|
|
515
|
+
}, te = () => {
|
|
516
|
+
F(), C !== p && r("width", c, C);
|
|
517
|
+
}, o = () => F(), q = ($) => {
|
|
518
|
+
$.key === "Escape" && ($.preventDefault(), o());
|
|
519
|
+
};
|
|
520
|
+
window.addEventListener("pointermove", T), window.addEventListener("pointerup", te), window.addEventListener("pointercancel", o), window.addEventListener("keydown", q), f = o;
|
|
521
|
+
}
|
|
522
|
+
return (k, S) => (h(), y("div", At, [
|
|
523
|
+
n("div", Dt, [
|
|
524
|
+
n("span", null, l(a.value.canvasHint), 1),
|
|
525
|
+
n("label", null, [
|
|
526
|
+
P(l(a.value.zoom), 1),
|
|
527
|
+
oe(n("select", {
|
|
528
|
+
"onUpdate:modelValue": S[0] || (S[0] = (c) => b.value = c)
|
|
529
|
+
}, [...S[1] || (S[1] = [
|
|
530
|
+
n("option", { value: 0.5 }, "50%", -1),
|
|
531
|
+
n("option", { value: 0.8 }, "80%", -1),
|
|
532
|
+
n("option", { value: 1 }, "100%", -1),
|
|
533
|
+
n("option", { value: 1.25 }, "125%", -1)
|
|
534
|
+
])], 512), [
|
|
535
|
+
[
|
|
536
|
+
ye,
|
|
537
|
+
b.value,
|
|
538
|
+
void 0,
|
|
539
|
+
{ number: !0 }
|
|
540
|
+
]
|
|
541
|
+
])
|
|
542
|
+
])
|
|
543
|
+
]),
|
|
544
|
+
n("div", Tt, [
|
|
545
|
+
n("div", {
|
|
546
|
+
class: "mr-canvas-paper",
|
|
547
|
+
style: re({
|
|
548
|
+
width: `${_.value.widthMm * m.value}px`,
|
|
549
|
+
height: `${_.value.heightMm * m.value}px`
|
|
550
|
+
})
|
|
551
|
+
}, [
|
|
552
|
+
(h(!0), y(U, null, W(_.value.components, (c, M) => (h(), y("div", {
|
|
553
|
+
key: M,
|
|
554
|
+
class: _e(["mr-canvas-component", { "is-selected": w(M) }]),
|
|
555
|
+
"data-canvas-component": M,
|
|
556
|
+
style: re(x(M)),
|
|
557
|
+
role: "button",
|
|
558
|
+
"aria-label": `${a.value.component} ${M + 1} ${c.kind}`,
|
|
559
|
+
"aria-pressed": w(M),
|
|
560
|
+
tabindex: w(M) ? 0 : -1,
|
|
561
|
+
onFocus: (p) => r("select", { pageIndex: t.pageIndex, componentIndex: M }),
|
|
562
|
+
onPointerdown: (p) => {
|
|
563
|
+
r("select", { pageIndex: t.pageIndex, componentIndex: M }), e(d).start(p, c);
|
|
564
|
+
},
|
|
565
|
+
onClick: (p) => r("select", { pageIndex: t.pageIndex, componentIndex: M }),
|
|
566
|
+
onKeydown: (p) => E(p, M)
|
|
567
|
+
}, [
|
|
568
|
+
c.kind === "list" ? (h(), y(U, { key: 0 }, [
|
|
569
|
+
n("div", Rt, [
|
|
570
|
+
c.headerGrid ? (h(), y("div", {
|
|
571
|
+
key: 0,
|
|
572
|
+
class: "mr-canvas-merged",
|
|
573
|
+
style: re({
|
|
574
|
+
height: `${(c.headerGrid.rowHeightsMm?.reduce((p, C) => p + C, 0) ?? c.headerGrid.cells.length * 8) * m.value}px`
|
|
575
|
+
})
|
|
576
|
+
}, [
|
|
577
|
+
(h(!0), y(U, null, W(g(c), (p, C) => (h(), y("div", {
|
|
578
|
+
key: C,
|
|
579
|
+
style: re({
|
|
580
|
+
left: `${p.xMm * m.value}px`,
|
|
581
|
+
top: `${p.yMm * m.value}px`,
|
|
582
|
+
width: `${p.widthMm * m.value}px`,
|
|
583
|
+
height: `${p.heightMm * m.value}px`,
|
|
584
|
+
textAlign: p.cell.style?.align ?? "center"
|
|
585
|
+
})
|
|
586
|
+
}, l(p.cell.text), 5))), 128))
|
|
587
|
+
], 4)) : (h(), y("div", Gt, [
|
|
588
|
+
(h(!0), y(U, null, W(c.columns, (p, C) => (h(), y("div", {
|
|
589
|
+
key: C,
|
|
590
|
+
style: re({
|
|
591
|
+
width: `${p.widthMm * m.value}px`,
|
|
592
|
+
opacity: p.hidden ? 0.35 : 1
|
|
593
|
+
}),
|
|
594
|
+
onPointerdown: tt((D) => {
|
|
595
|
+
r("select", { pageIndex: t.pageIndex, componentIndex: M }), r("column", C);
|
|
596
|
+
}, ["stop"])
|
|
597
|
+
}, l(p.header), 45, Pt))), 128))
|
|
598
|
+
])),
|
|
599
|
+
(h(!0), y(U, null, W((t.datasets?.[c.dataset] ?? []).slice(0, 3), (p, C) => (h(), y("div", {
|
|
600
|
+
key: C,
|
|
601
|
+
class: "mr-canvas-table-row"
|
|
602
|
+
}, [
|
|
603
|
+
(h(!0), y(U, null, W(c.columns, (D, T) => (h(), y("div", {
|
|
604
|
+
key: T,
|
|
605
|
+
style: re({
|
|
606
|
+
width: `${D.widthMm * m.value}px`,
|
|
607
|
+
opacity: D.hidden ? 0.35 : 1
|
|
608
|
+
})
|
|
609
|
+
}, l(p[D.field] ?? "—"), 5))), 128))
|
|
610
|
+
]))), 128)),
|
|
611
|
+
t.datasets?.[c.dataset]?.length ? B("", !0) : (h(), y("div", Ht, l(c.dataset) + " · " + l(a.value.sampleRows), 1))
|
|
612
|
+
]),
|
|
613
|
+
w(M) && !t.disabled ? (h(!0), y(U, { key: 0 }, W(G(c), (p, C) => (h(), y("span", {
|
|
614
|
+
key: C,
|
|
615
|
+
class: "mr-canvas-column-handle",
|
|
616
|
+
"aria-label": `${a.value.resizeColumn} ${c.columns[C]?.header}`,
|
|
617
|
+
role: "separator",
|
|
618
|
+
"aria-orientation": "vertical",
|
|
619
|
+
style: re({ left: `${p * m.value}px` }),
|
|
620
|
+
onPointerdown: (D) => I(D, c, C)
|
|
621
|
+
}, null, 44, Vt))), 128)) : B("", !0)
|
|
622
|
+
], 64)) : c.grid ? (h(), y("div", Bt, [
|
|
623
|
+
(h(!0), y(U, null, W(A(c), (p, C) => (h(), y("div", {
|
|
624
|
+
key: C,
|
|
625
|
+
style: re({
|
|
626
|
+
left: `${p.xMm * m.value}px`,
|
|
627
|
+
top: `${p.yMm * m.value}px`,
|
|
628
|
+
width: `${p.widthMm * m.value}px`,
|
|
629
|
+
height: `${p.heightMm * m.value}px`,
|
|
630
|
+
backgroundColor: p.cell.style?.backgroundColor,
|
|
631
|
+
color: p.cell.style?.color,
|
|
632
|
+
fontWeight: p.cell.style?.bold ? "700" : "400",
|
|
633
|
+
fontSize: `${e(Ne)(p.cell.style).fontSizePx * b.value}px`,
|
|
634
|
+
textAlign: p.cell.style?.align ?? "left"
|
|
635
|
+
})
|
|
636
|
+
}, l(p.cell.text), 5))), 128)),
|
|
637
|
+
c.grid.cells.reduce((p, C) => p + C.length, 0) > 2e3 ? (h(), y("span", zt, l(a.value.canvasGridLimited), 1)) : B("", !0)
|
|
638
|
+
])) : c.imageData ? (h(), y("img", {
|
|
639
|
+
key: 2,
|
|
640
|
+
src: c.imageData,
|
|
641
|
+
alt: "",
|
|
642
|
+
draggable: "false"
|
|
643
|
+
}, null, 8, Nt)) : (h(), y("div", {
|
|
644
|
+
key: 3,
|
|
645
|
+
class: "mr-canvas-content",
|
|
646
|
+
style: re({
|
|
647
|
+
color: c.style?.color,
|
|
648
|
+
backgroundColor: c.style?.backgroundColor,
|
|
649
|
+
fontWeight: c.style?.bold ? "700" : "400",
|
|
650
|
+
fontSize: `${e(Ne)(c.style).fontSizePx * b.value}px`,
|
|
651
|
+
textAlign: c.style?.align
|
|
652
|
+
})
|
|
653
|
+
}, l(c.text ?? c.fallbackText ?? (c.kind === "rect" ? "" : c.kind)), 5)),
|
|
654
|
+
w(M) && !t.disabled ? (h(), y("span", {
|
|
655
|
+
key: 4,
|
|
656
|
+
class: "mr-canvas-resize",
|
|
657
|
+
"aria-label": a.value.resizeComponent,
|
|
658
|
+
role: "separator",
|
|
659
|
+
onPointerdown: (p) => e(d).start(p, c, !0)
|
|
660
|
+
}, null, 40, jt)) : B("", !0)
|
|
661
|
+
], 46, Lt))), 128))
|
|
662
|
+
], 4)
|
|
663
|
+
])
|
|
664
|
+
]));
|
|
665
|
+
}
|
|
666
|
+
}), Ot = /* @__PURE__ */ Ie(Ft, [["__scopeId", "data-v-0b2669dc"]]), Ut = ["aria-label"], Jt = ["data-align", "aria-label", "title", "aria-checked", "tabindex", "onClick", "onKeydown"], Kt = { key: 0 }, Wt = {
|
|
667
|
+
key: 1,
|
|
668
|
+
viewBox: "0 0 20 20",
|
|
669
|
+
fill: "none",
|
|
670
|
+
"aria-hidden": "true"
|
|
671
|
+
}, Xt = {
|
|
672
|
+
key: 0,
|
|
673
|
+
d: "M3 4h14M3 8h9M3 12h14M3 16h9"
|
|
674
|
+
}, qt = {
|
|
675
|
+
key: 1,
|
|
676
|
+
d: "M3 4h14M6 8h8M3 12h14M6 16h8"
|
|
677
|
+
}, Yt = {
|
|
678
|
+
key: 2,
|
|
679
|
+
d: "M3 4h14M8 8h9M3 12h14M8 16h9"
|
|
680
|
+
}, Qt = {
|
|
681
|
+
key: 3,
|
|
682
|
+
d: "M3 4h14M3 8h14M3 12h14M3 16h14"
|
|
683
|
+
}, Zt = /* @__PURE__ */ Ee({
|
|
684
|
+
__name: "AlignmentControl",
|
|
685
|
+
props: {
|
|
686
|
+
modelValue: {},
|
|
687
|
+
label: {},
|
|
688
|
+
labels: {},
|
|
689
|
+
autoLabel: {},
|
|
690
|
+
allowAuto: { type: Boolean }
|
|
691
|
+
},
|
|
692
|
+
emits: ["update:modelValue"],
|
|
693
|
+
setup(t, { emit: u }) {
|
|
694
|
+
const s = t, r = u, a = () => s.allowAuto ? ["auto", "left", "center", "right", "justify"] : ["left", "center", "right", "justify"];
|
|
695
|
+
async function b(m, _) {
|
|
696
|
+
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(m.key)) return;
|
|
697
|
+
m.preventDefault();
|
|
698
|
+
const w = a(), x = w.indexOf(_), E = m.key === "Home" ? 0 : m.key === "End" ? w.length - 1 : (x + (m.key === "ArrowRight" ? 1 : -1) + w.length) % w.length;
|
|
699
|
+
r("update:modelValue", w[E]);
|
|
700
|
+
const G = m.currentTarget.parentElement;
|
|
701
|
+
await de(), G?.querySelector(`[data-align="${w[E]}"]`)?.focus();
|
|
702
|
+
}
|
|
703
|
+
return (m, _) => (h(), y("div", {
|
|
704
|
+
class: "mr-designer-alignment",
|
|
705
|
+
role: "radiogroup",
|
|
706
|
+
"aria-label": t.label
|
|
707
|
+
}, [
|
|
708
|
+
(h(!0), y(U, null, W(a(), (d) => (h(), y("button", {
|
|
709
|
+
key: d,
|
|
710
|
+
type: "button",
|
|
711
|
+
role: "radio",
|
|
712
|
+
"data-align": d,
|
|
713
|
+
"aria-label": t.labels[d],
|
|
714
|
+
title: t.labels[d],
|
|
715
|
+
"aria-checked": t.modelValue === d,
|
|
716
|
+
tabindex: t.modelValue === d ? 0 : -1,
|
|
717
|
+
onClick: (w) => r("update:modelValue", d),
|
|
718
|
+
onKeydown: (w) => b(w, d)
|
|
719
|
+
}, [
|
|
720
|
+
d === "auto" ? (h(), y("span", Kt, l(t.autoLabel), 1)) : (h(), y("svg", Wt, [
|
|
721
|
+
d === "left" ? (h(), y("path", Xt)) : d === "center" ? (h(), y("path", qt)) : d === "right" ? (h(), y("path", Yt)) : (h(), y("path", Qt))
|
|
722
|
+
]))
|
|
723
|
+
], 40, Jt))), 128))
|
|
724
|
+
], 8, Ut));
|
|
725
|
+
}
|
|
726
|
+
}), Fe = /* @__PURE__ */ Ie(Zt, [["__scopeId", "data-v-c85770c4"]]), en = ["disabled"], tn = { class: "mr-component-dimensions" }, nn = ["min", "value", "onChange"], an = { key: 0 }, on = ["value"], ln = { value: "" }, sn = { value: "header" }, rn = { value: "footer" }, dn = { key: 1 }, un = ["value"], cn = ["value"], mn = { class: "mr-component-upload" }, vn = ["aria-label"], pn = {
|
|
727
|
+
key: 0,
|
|
728
|
+
role: "alert"
|
|
729
|
+
}, hn = {
|
|
730
|
+
key: 3,
|
|
731
|
+
class: "mr-component-type"
|
|
732
|
+
}, gn = { class: "mr-component-dimensions" }, fn = ["value"], bn = ["checked"], yn = { class: "mr-component-dimensions" }, wn = ["value"], kn = ["value"], Mn = { key: 4 }, xn = ["value"], Cn = /* @__PURE__ */ Ee({
|
|
733
|
+
__name: "CanvasComponentInspector",
|
|
734
|
+
props: {
|
|
735
|
+
component: {},
|
|
736
|
+
disabled: { type: Boolean },
|
|
737
|
+
messages: {}
|
|
738
|
+
},
|
|
739
|
+
emits: ["geometry", "patch"],
|
|
740
|
+
setup(t, { emit: u }) {
|
|
741
|
+
const s = t, r = u, a = z(() => ({ ...Pe, ...s.messages })), b = j(""), m = ["leftMm", "topMm", "widthMm", "heightMm"], _ = z(() => [
|
|
742
|
+
a.value.leftPosition,
|
|
743
|
+
a.value.topPosition,
|
|
744
|
+
a.value.componentWidth,
|
|
745
|
+
a.value.componentHeight
|
|
746
|
+
]);
|
|
747
|
+
function d(A, g) {
|
|
748
|
+
const f = Number(g.target.value);
|
|
749
|
+
Number.isFinite(f) && r("geometry", { ...Se(s.component), [A]: f });
|
|
750
|
+
}
|
|
751
|
+
function w(A, g) {
|
|
752
|
+
if (s.component.kind === "list") return;
|
|
753
|
+
const f = { ...s.component.style, [A]: g };
|
|
754
|
+
A === "fontSize" && delete f.fontSizePx, r("patch", { style: f });
|
|
755
|
+
}
|
|
756
|
+
const x = z(() => ({
|
|
757
|
+
auto: a.value.auto,
|
|
758
|
+
left: a.value.left,
|
|
759
|
+
center: a.value.center,
|
|
760
|
+
right: a.value.right,
|
|
761
|
+
justify: a.value.justify
|
|
762
|
+
}));
|
|
763
|
+
function E(A) {
|
|
764
|
+
return A.target.value;
|
|
765
|
+
}
|
|
766
|
+
async function G(A) {
|
|
767
|
+
const g = A.target, f = g.files?.[0];
|
|
768
|
+
if (!f) return;
|
|
769
|
+
b.value = "";
|
|
770
|
+
const I = s.component;
|
|
771
|
+
try {
|
|
772
|
+
if (f.size > 4 * 1024 * 1024 || !["image/png", "image/jpeg", "image/webp", "image/svg+xml"].includes(
|
|
773
|
+
f.type
|
|
774
|
+
))
|
|
775
|
+
throw new Error(a.value.imageBudget);
|
|
776
|
+
const k = new FileReader(), S = await new Promise((c, M) => {
|
|
777
|
+
k.onload = () => c(String(k.result)), k.onerror = () => M(k.error), k.readAsDataURL(f);
|
|
778
|
+
});
|
|
779
|
+
!s.disabled && s.component === I && r("patch", { imageData: S });
|
|
780
|
+
} catch (k) {
|
|
781
|
+
b.value = k instanceof Error ? k.message : String(k);
|
|
782
|
+
} finally {
|
|
783
|
+
g.value = "";
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
return (A, g) => (h(), y("fieldset", {
|
|
787
|
+
class: "mr-component-properties",
|
|
788
|
+
disabled: t.disabled
|
|
789
|
+
}, [
|
|
790
|
+
n("h3", null, l(a.value.positionGroup), 1),
|
|
791
|
+
n("div", tn, [
|
|
792
|
+
(h(!0), y(U, null, W(m.filter(
|
|
793
|
+
(f) => t.component.kind !== "list" || f !== "heightMm"
|
|
794
|
+
), (f, I) => (h(), y("label", { key: f }, [
|
|
795
|
+
P(l(_.value[I]), 1),
|
|
796
|
+
n("input", {
|
|
797
|
+
type: "number",
|
|
798
|
+
step: "0.5",
|
|
799
|
+
min: f === "widthMm" || f === "heightMm" ? 2 : 0,
|
|
800
|
+
value: e(Se)(t.component)[f],
|
|
801
|
+
onChange: (k) => d(f, k)
|
|
802
|
+
}, null, 40, nn)
|
|
803
|
+
]))), 128))
|
|
804
|
+
]),
|
|
805
|
+
t.component.kind !== "list" ? (h(), y("label", an, [
|
|
806
|
+
P(l(a.value.repeatPage), 1),
|
|
807
|
+
n("select", {
|
|
808
|
+
value: t.component.pageAnchor ?? "",
|
|
809
|
+
onChange: g[0] || (g[0] = (f) => r("patch", { pageAnchor: E(f) || void 0 }))
|
|
810
|
+
}, [
|
|
811
|
+
n("option", ln, l(a.value.repeatNone), 1),
|
|
812
|
+
n("option", sn, l(a.value.repeatHeader), 1),
|
|
813
|
+
n("option", rn, l(a.value.repeatFooter), 1)
|
|
814
|
+
], 40, on)
|
|
815
|
+
])) : B("", !0),
|
|
816
|
+
n("h3", null, l(a.value.componentContent), 1),
|
|
817
|
+
t.component.kind === "text" ? (h(), y("label", dn, [
|
|
818
|
+
P(l(a.value.componentText), 1),
|
|
819
|
+
n("textarea", {
|
|
820
|
+
rows: "4",
|
|
821
|
+
value: t.component.text,
|
|
822
|
+
onChange: g[1] || (g[1] = (f) => r("patch", { text: E(f) }))
|
|
823
|
+
}, null, 40, un)
|
|
824
|
+
])) : B("", !0),
|
|
825
|
+
t.component.kind === "image" ? (h(), y(U, { key: 2 }, [
|
|
826
|
+
n("label", null, [
|
|
827
|
+
P(l(a.value.imageSource), 1),
|
|
828
|
+
n("textarea", {
|
|
829
|
+
rows: "2",
|
|
830
|
+
value: t.component.imageData,
|
|
831
|
+
onChange: g[2] || (g[2] = (f) => r("patch", { imageData: E(f) }))
|
|
832
|
+
}, null, 40, cn)
|
|
833
|
+
]),
|
|
834
|
+
n("label", mn, [
|
|
835
|
+
P(l(a.value.imageUpload), 1),
|
|
836
|
+
n("input", {
|
|
837
|
+
type: "file",
|
|
838
|
+
accept: "image/png,image/jpeg,image/webp,image/svg+xml",
|
|
839
|
+
"aria-label": a.value.imageUpload,
|
|
840
|
+
onChange: G
|
|
841
|
+
}, null, 40, vn)
|
|
842
|
+
]),
|
|
843
|
+
b.value ? (h(), y("p", pn, l(b.value), 1)) : B("", !0)
|
|
844
|
+
], 64)) : B("", !0),
|
|
845
|
+
t.component.kind === "text" ? (h(), y("div", hn, [
|
|
846
|
+
n("h3", null, l(a.value.textFormat), 1),
|
|
847
|
+
n("div", gn, [
|
|
848
|
+
n("label", null, [
|
|
849
|
+
P(l(a.value.fontSize), 1),
|
|
850
|
+
n("input", {
|
|
851
|
+
type: "number",
|
|
852
|
+
min: "1",
|
|
853
|
+
max: "200",
|
|
854
|
+
value: e(Ne)(t.component.style).fontSizePt,
|
|
855
|
+
onChange: g[3] || (g[3] = (f) => w("fontSize", Number(E(f))))
|
|
856
|
+
}, null, 40, fn)
|
|
857
|
+
]),
|
|
858
|
+
n("label", null, [
|
|
859
|
+
P(l(a.value.fontBold), 1),
|
|
860
|
+
n("input", {
|
|
861
|
+
type: "checkbox",
|
|
862
|
+
checked: t.component.style?.bold === !0,
|
|
863
|
+
onChange: g[4] || (g[4] = (f) => w("bold", f.target.checked))
|
|
864
|
+
}, null, 40, bn)
|
|
865
|
+
])
|
|
866
|
+
]),
|
|
867
|
+
Q(Fe, {
|
|
868
|
+
"model-value": t.component.style?.align ?? "left",
|
|
869
|
+
label: a.value.bodyAlign,
|
|
870
|
+
labels: x.value,
|
|
871
|
+
"auto-label": a.value.autoShort,
|
|
872
|
+
"onUpdate:modelValue": g[5] || (g[5] = (f) => w("align", f))
|
|
873
|
+
}, null, 8, ["model-value", "label", "labels", "auto-label"]),
|
|
874
|
+
n("div", yn, [
|
|
875
|
+
n("label", null, [
|
|
876
|
+
P(l(a.value.textColor), 1),
|
|
877
|
+
n("input", {
|
|
878
|
+
type: "color",
|
|
879
|
+
value: t.component.style?.color ?? "#233c5c",
|
|
880
|
+
onChange: g[6] || (g[6] = (f) => w("color", E(f)))
|
|
881
|
+
}, null, 40, wn)
|
|
882
|
+
]),
|
|
883
|
+
n("label", null, [
|
|
884
|
+
P(l(a.value.backgroundColor), 1),
|
|
885
|
+
n("input", {
|
|
886
|
+
type: "color",
|
|
887
|
+
value: t.component.style?.backgroundColor ?? "#ffffff",
|
|
888
|
+
onChange: g[7] || (g[7] = (f) => w("backgroundColor", E(f)))
|
|
889
|
+
}, null, 40, kn)
|
|
890
|
+
])
|
|
891
|
+
])
|
|
892
|
+
])) : B("", !0),
|
|
893
|
+
t.component.kind === "list" ? (h(), y("label", Mn, [
|
|
894
|
+
P(l(a.value.listDataset), 1),
|
|
895
|
+
n("input", {
|
|
896
|
+
value: t.component.dataset,
|
|
897
|
+
onChange: g[8] || (g[8] = (f) => r("patch", { dataset: E(f) }))
|
|
898
|
+
}, null, 40, xn)
|
|
899
|
+
])) : B("", !0)
|
|
900
|
+
], 8, en));
|
|
901
|
+
}
|
|
902
|
+
}), _n = /* @__PURE__ */ Ie(Cn, [["__scopeId", "data-v-2dcbd9cb"]]), Sn = { class: "mr-header-editor" }, $n = ["disabled"], En = ["value"], In = ["value"], An = ["value"], Dn = ["disabled"], Tn = /* @__PURE__ */ Ee({
|
|
903
|
+
__name: "HeaderStructureEditor",
|
|
904
|
+
props: {
|
|
905
|
+
list: {},
|
|
906
|
+
disabled: { type: Boolean },
|
|
907
|
+
messages: {}
|
|
908
|
+
},
|
|
909
|
+
emits: ["command"],
|
|
910
|
+
setup(t, { emit: u }) {
|
|
911
|
+
const s = t, r = u, a = z(() => ({ ...Pe, ...s.messages })), b = j(0), m = j(0), _ = j(Math.min(1, s.list.columns.length - 1));
|
|
912
|
+
return Z(
|
|
913
|
+
() => s.list.columns.length,
|
|
914
|
+
(d) => {
|
|
915
|
+
m.value = Math.min(m.value, d - 1), _.value = Math.min(_.value, d - 1);
|
|
916
|
+
}
|
|
917
|
+
), (d, w) => (h(), y("details", Sn, [
|
|
918
|
+
n("summary", null, [
|
|
919
|
+
P(l(a.value.headerStructure), 1),
|
|
920
|
+
n("span", null, l(t.list.headerGrid?.cells.length ?? 1) + " " + l(a.value.headerRow), 1)
|
|
921
|
+
]),
|
|
922
|
+
n("fieldset", { disabled: t.disabled }, [
|
|
923
|
+
n("label", null, [
|
|
924
|
+
P(l(a.value.headerRow), 1),
|
|
925
|
+
oe(n("select", {
|
|
926
|
+
"onUpdate:modelValue": w[0] || (w[0] = (x) => b.value = x)
|
|
927
|
+
}, [
|
|
928
|
+
(h(!0), y(U, null, W(t.list.headerGrid?.cells.length ?? 1, (x) => (h(), y("option", {
|
|
929
|
+
key: x,
|
|
930
|
+
value: x - 1
|
|
931
|
+
}, l(x), 9, En))), 128))
|
|
932
|
+
], 512), [
|
|
933
|
+
[
|
|
934
|
+
ye,
|
|
935
|
+
b.value,
|
|
936
|
+
void 0,
|
|
937
|
+
{ number: !0 }
|
|
938
|
+
]
|
|
939
|
+
])
|
|
940
|
+
]),
|
|
941
|
+
n("label", null, [
|
|
942
|
+
P(l(a.value.headerFirst), 1),
|
|
943
|
+
oe(n("select", {
|
|
944
|
+
"onUpdate:modelValue": w[1] || (w[1] = (x) => m.value = x)
|
|
945
|
+
}, [
|
|
946
|
+
(h(!0), y(U, null, W(t.list.columns, (x, E) => (h(), y("option", {
|
|
947
|
+
key: E,
|
|
948
|
+
value: E
|
|
949
|
+
}, l(E + 1) + " · " + l(x.header), 9, In))), 128))
|
|
950
|
+
], 512), [
|
|
951
|
+
[
|
|
952
|
+
ye,
|
|
953
|
+
m.value,
|
|
954
|
+
void 0,
|
|
955
|
+
{ number: !0 }
|
|
956
|
+
]
|
|
957
|
+
])
|
|
958
|
+
]),
|
|
959
|
+
n("label", null, [
|
|
960
|
+
P(l(a.value.headerLast), 1),
|
|
961
|
+
oe(n("select", {
|
|
962
|
+
"onUpdate:modelValue": w[2] || (w[2] = (x) => _.value = x)
|
|
963
|
+
}, [
|
|
964
|
+
(h(!0), y(U, null, W(t.list.columns, (x, E) => (h(), y("option", {
|
|
965
|
+
key: E,
|
|
966
|
+
value: E
|
|
967
|
+
}, l(E + 1) + " · " + l(x.header), 9, An))), 128))
|
|
968
|
+
], 512), [
|
|
969
|
+
[
|
|
970
|
+
ye,
|
|
971
|
+
_.value,
|
|
972
|
+
void 0,
|
|
973
|
+
{ number: !0 }
|
|
974
|
+
]
|
|
975
|
+
])
|
|
976
|
+
]),
|
|
977
|
+
n("div", null, [
|
|
978
|
+
n("button", {
|
|
979
|
+
type: "button",
|
|
980
|
+
onClick: w[3] || (w[3] = (x) => r("command", { action: "add", row: b.value, first: m.value, last: _.value }))
|
|
981
|
+
}, l(a.value.addHeaderRow), 1),
|
|
982
|
+
n("button", {
|
|
983
|
+
type: "button",
|
|
984
|
+
disabled: m.value >= _.value,
|
|
985
|
+
onClick: w[4] || (w[4] = (x) => r("command", { action: "merge", row: b.value, first: m.value, last: _.value }))
|
|
986
|
+
}, l(a.value.mergeHeader), 9, Dn),
|
|
987
|
+
n("button", {
|
|
988
|
+
type: "button",
|
|
989
|
+
onClick: w[5] || (w[5] = (x) => r("command", { action: "split", row: b.value, first: m.value, last: _.value }))
|
|
990
|
+
}, l(a.value.splitHeader), 1)
|
|
991
|
+
])
|
|
992
|
+
], 8, $n)
|
|
993
|
+
]));
|
|
994
|
+
}
|
|
995
|
+
}), Ln = /* @__PURE__ */ Ie(Tn, [["__scopeId", "data-v-acd607ef"]]);
|
|
996
|
+
function Rn(t, u) {
|
|
997
|
+
const s = j("preview"), r = j(), a = j(0), b = z(
|
|
998
|
+
() => ze(t.value, r.value)
|
|
999
|
+
);
|
|
1000
|
+
Z(t, () => {
|
|
1001
|
+
b.value || (r.value = void 0), t.value.template.pages[a.value] || (a.value = 0);
|
|
1002
|
+
});
|
|
1003
|
+
function m(A) {
|
|
1004
|
+
r.value = A, a.value = A.pageIndex;
|
|
1005
|
+
}
|
|
1006
|
+
function _(A) {
|
|
1007
|
+
const g = r.value;
|
|
1008
|
+
return g ? u((f) => {
|
|
1009
|
+
const I = ze(f, g);
|
|
1010
|
+
I && A(I, f);
|
|
1011
|
+
}) : !1;
|
|
1012
|
+
}
|
|
1013
|
+
function d(A) {
|
|
1014
|
+
_((g, f) => {
|
|
1015
|
+
const I = f.template.pages[r.value.pageIndex];
|
|
1016
|
+
Qe(
|
|
1017
|
+
g,
|
|
1018
|
+
je(A, I, g.kind === "list")
|
|
1019
|
+
);
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
function w(A) {
|
|
1023
|
+
let g = -1;
|
|
1024
|
+
const f = a.value;
|
|
1025
|
+
u((I) => {
|
|
1026
|
+
const k = I.template.pages[f].components;
|
|
1027
|
+
k.push(kt(A)), g = k.length - 1;
|
|
1028
|
+
}) && m({ pageIndex: f, componentIndex: g });
|
|
1029
|
+
}
|
|
1030
|
+
function x() {
|
|
1031
|
+
const A = r.value;
|
|
1032
|
+
A && u((g) => {
|
|
1033
|
+
g.template.pages[A.pageIndex].components.splice(
|
|
1034
|
+
A.componentIndex,
|
|
1035
|
+
1
|
|
1036
|
+
);
|
|
1037
|
+
}) && (r.value = void 0);
|
|
1038
|
+
}
|
|
1039
|
+
function E() {
|
|
1040
|
+
const A = r.value;
|
|
1041
|
+
if (!A) return;
|
|
1042
|
+
let g = -1;
|
|
1043
|
+
u((f) => {
|
|
1044
|
+
const I = f.template.pages[A.pageIndex], k = JSON.parse(JSON.stringify(ze(f, A))), S = Se(k);
|
|
1045
|
+
S.leftMm += 4, S.topMm += 4, Qe(
|
|
1046
|
+
k,
|
|
1047
|
+
je(S, I, k.kind === "list")
|
|
1048
|
+
), k.kind === "list" ? delete k.id : (delete k.nid, delete k.rkey), I.components.push(k), g = I.components.length - 1;
|
|
1049
|
+
}) && m({ pageIndex: A.pageIndex, componentIndex: g });
|
|
1050
|
+
}
|
|
1051
|
+
function G(A) {
|
|
1052
|
+
const g = r.value;
|
|
1053
|
+
if (!g) return;
|
|
1054
|
+
const f = g.componentIndex + A;
|
|
1055
|
+
t.value.template.pages[g.pageIndex]?.components[f] && u((I) => {
|
|
1056
|
+
const k = I.template.pages[g.pageIndex].components;
|
|
1057
|
+
k.splice(f, 0, k.splice(g.componentIndex, 1)[0]);
|
|
1058
|
+
}) && m({ pageIndex: g.pageIndex, componentIndex: f });
|
|
1059
|
+
}
|
|
1060
|
+
return {
|
|
1061
|
+
mode: s,
|
|
1062
|
+
selection: r,
|
|
1063
|
+
pageIndex: a,
|
|
1064
|
+
active: b,
|
|
1065
|
+
select: m,
|
|
1066
|
+
mutate: _,
|
|
1067
|
+
geometry: d,
|
|
1068
|
+
insert: w,
|
|
1069
|
+
remove: x,
|
|
1070
|
+
duplicate: E,
|
|
1071
|
+
reorder: G
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
function Gn(t, u, s) {
|
|
1075
|
+
const { draft: r, lists: a, selected: b, activeList: m, blocked: _, jsonPending: d, error: w } = t, { section: x, activeIndex: E } = u, G = Rn(r, t.transaction), {
|
|
1076
|
+
mode: A,
|
|
1077
|
+
selection: g,
|
|
1078
|
+
pageIndex: f,
|
|
1079
|
+
active: I
|
|
1080
|
+
} = G, k = j("excel"), S = j(/* @__PURE__ */ new Set());
|
|
1081
|
+
Z([x, k], () => {
|
|
1082
|
+
x.value === "tools" && (S.value = /* @__PURE__ */ new Set([...S.value, k.value]));
|
|
1083
|
+
}), Z(g, ($) => {
|
|
1084
|
+
if (!$) return;
|
|
1085
|
+
const L = a.value.findIndex(
|
|
1086
|
+
(R) => R.pageIndex === $.pageIndex && R.componentIndex === $.componentIndex
|
|
1087
|
+
);
|
|
1088
|
+
L >= 0 && (b.value = L);
|
|
1089
|
+
});
|
|
1090
|
+
const c = z(
|
|
1091
|
+
() => t.editingReadonly.value || _.value || d.value
|
|
1092
|
+
), M = z(
|
|
1093
|
+
() => s()?.[m.value?.dataset ?? ""]
|
|
1094
|
+
);
|
|
1095
|
+
function p($) {
|
|
1096
|
+
A.value = $, x.value === "tools" && (x.value = $ === "design" ? "component" : "fields");
|
|
1097
|
+
}
|
|
1098
|
+
function C($) {
|
|
1099
|
+
if (!r.value.template.pages[$.pageIndex]?.components[$.componentIndex])
|
|
1100
|
+
return;
|
|
1101
|
+
if (G.select($), r.value.template.pages[$.pageIndex]?.components[$.componentIndex]?.kind === "list") {
|
|
1102
|
+
const R = a.value.findIndex(
|
|
1103
|
+
(H) => H.pageIndex === $.pageIndex && H.componentIndex === $.componentIndex
|
|
1104
|
+
);
|
|
1105
|
+
R >= 0 && (b.value = R), x.value = "fields";
|
|
1106
|
+
} else x.value = "component";
|
|
1107
|
+
}
|
|
1108
|
+
function D($) {
|
|
1109
|
+
const L = $.target;
|
|
1110
|
+
L.value && (G.insert(L.value), A.value = "design", x.value = "component", L.value = "");
|
|
1111
|
+
}
|
|
1112
|
+
function T($) {
|
|
1113
|
+
G.mutate((L, R) => {
|
|
1114
|
+
if (L.kind !== "list" && $.pageAnchor !== L.pageAnchor) {
|
|
1115
|
+
const K = R.template.pages[g.value.pageIndex];
|
|
1116
|
+
$.pageAnchor === "header" && (L.topMm = K.marginTopMm ?? 0), $.pageAnchor === "footer" && (L.topMm = Math.max(
|
|
1117
|
+
0,
|
|
1118
|
+
K.heightMm - (K.marginBottomMm ?? 0) - L.heightMm
|
|
1119
|
+
));
|
|
1120
|
+
}
|
|
1121
|
+
const H = L;
|
|
1122
|
+
for (const [K, ue] of Object.entries($))
|
|
1123
|
+
ue === void 0 ? delete H[K] : H[K] = ue;
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
function F($) {
|
|
1127
|
+
const L = a.value[b.value];
|
|
1128
|
+
L && t.transaction((R) => {
|
|
1129
|
+
R.template.pages[L.pageIndex].components[L.componentIndex] = $;
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
function te($) {
|
|
1133
|
+
const L = m.value;
|
|
1134
|
+
if (!L) return;
|
|
1135
|
+
const R = JSON.parse(JSON.stringify(L));
|
|
1136
|
+
try {
|
|
1137
|
+
Mt(R, E.value, E.value + $) && (F(R), u.activate(E.value + $));
|
|
1138
|
+
} catch (H) {
|
|
1139
|
+
w.value = H instanceof Error ? H.message : String(H);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
function o($) {
|
|
1143
|
+
const L = a.value[b.value];
|
|
1144
|
+
L && t.transaction((R) => {
|
|
1145
|
+
const H = R.template.pages[L.pageIndex].components[L.componentIndex];
|
|
1146
|
+
H?.kind === "list" && ($.action === "add" ? xt(H) : $.action === "merge" ? Ct(H, $.row, $.first, $.last) : _t(H, $.row, $.first));
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
function q($) {
|
|
1150
|
+
const L = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec($.path ?? ""), R = $.pageIndex ?? (L ? Number(L[1]) : void 0), H = $.componentIndex ?? (L ? Number(L[2]) : void 0);
|
|
1151
|
+
if (!(R === void 0 || H === void 0) && (A.value = "design", C({ pageIndex: R, componentIndex: H }), $.field)) {
|
|
1152
|
+
const K = m.value?.columns.findIndex(
|
|
1153
|
+
(ue) => ue.field === $.field
|
|
1154
|
+
);
|
|
1155
|
+
K !== void 0 && K >= 0 && u.activate(K);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
return {
|
|
1159
|
+
mode: A,
|
|
1160
|
+
setMode: p,
|
|
1161
|
+
canvasSelection: g,
|
|
1162
|
+
canvasPage: f,
|
|
1163
|
+
canvasActive: I,
|
|
1164
|
+
tool: k,
|
|
1165
|
+
visitedTools: S,
|
|
1166
|
+
editDisabled: c,
|
|
1167
|
+
dataSchema: M,
|
|
1168
|
+
chooseCanvas: C,
|
|
1169
|
+
insertComponent: D,
|
|
1170
|
+
patchCanvas: T,
|
|
1171
|
+
changeList: F,
|
|
1172
|
+
moveColumn: te,
|
|
1173
|
+
headerCommand: o,
|
|
1174
|
+
locateReview: q,
|
|
1175
|
+
canvas: G
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
function Pn(t, u, s) {
|
|
1179
|
+
if (!t.length) return;
|
|
1180
|
+
const r = Math.max(0, t.indexOf(u)), b = {
|
|
1181
|
+
ArrowDown: Math.min(r + 1, t.length - 1),
|
|
1182
|
+
ArrowUp: Math.max(r - 1, 0),
|
|
1183
|
+
Home: 0,
|
|
1184
|
+
End: t.length - 1
|
|
1185
|
+
}[s];
|
|
1186
|
+
return b === void 0 ? void 0 : t[b];
|
|
1187
|
+
}
|
|
1188
|
+
function Hn(t, u, s) {
|
|
1189
|
+
const r = j(!1), a = j(t.activeIndex.value), b = j(null), m = j(null), _ = j(null), d = j(null);
|
|
1190
|
+
function w(S = !1) {
|
|
1191
|
+
const c = d.value, M = c?.querySelector(
|
|
1192
|
+
`button[data-column-index="${a.value}"]`
|
|
1193
|
+
);
|
|
1194
|
+
if (!c || !M) return;
|
|
1195
|
+
S && M.focus({ preventScroll: !0 });
|
|
1196
|
+
const p = c.getBoundingClientRect(), C = M.getBoundingClientRect(), D = p.top + c.clientTop, T = D + c.clientHeight;
|
|
1197
|
+
C.top < D ? c.scrollTop += C.top - D : C.bottom > T && (c.scrollTop += C.bottom - T);
|
|
1198
|
+
}
|
|
1199
|
+
async function x(S = !1) {
|
|
1200
|
+
r.value && (r.value = !1, S && (await de(), b.value?.focus({ preventScroll: !0 })));
|
|
1201
|
+
}
|
|
1202
|
+
async function E() {
|
|
1203
|
+
if (r.value) return x(!0);
|
|
1204
|
+
const S = s.value.map((c) => c.index);
|
|
1205
|
+
a.value = S.includes(t.activeIndex.value) ? t.activeIndex.value : S[0] ?? -1, r.value = !0, await de(), _.value?.focus({ preventScroll: !0 }), w();
|
|
1206
|
+
}
|
|
1207
|
+
function G(S) {
|
|
1208
|
+
t.activate(S), x(!0);
|
|
1209
|
+
}
|
|
1210
|
+
function A(S) {
|
|
1211
|
+
r.value && (S.preventDefault(), S.stopPropagation(), x(!0));
|
|
1212
|
+
}
|
|
1213
|
+
async function g(S) {
|
|
1214
|
+
const c = Pn(
|
|
1215
|
+
s.value.map((M) => M.index),
|
|
1216
|
+
a.value,
|
|
1217
|
+
S.key
|
|
1218
|
+
);
|
|
1219
|
+
c !== void 0 && (a.value = c, S.preventDefault(), await de(), w(!0));
|
|
1220
|
+
}
|
|
1221
|
+
async function f(S) {
|
|
1222
|
+
if (!["ArrowDown", "ArrowUp", "Enter"].includes(S.key)) return;
|
|
1223
|
+
S.preventDefault(), S.stopPropagation();
|
|
1224
|
+
const c = s.value.map((M) => M.index);
|
|
1225
|
+
if (c.length) {
|
|
1226
|
+
if (S.key === "Enter") {
|
|
1227
|
+
c.includes(a.value) && G(a.value);
|
|
1228
|
+
return;
|
|
1229
|
+
}
|
|
1230
|
+
S.key === "ArrowUp" && (a.value = c.at(-1)), await de(), w(!0);
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
function I(S) {
|
|
1234
|
+
const c = S.target;
|
|
1235
|
+
!r.value || m.value?.contains(c) || b.value?.contains(c) || x();
|
|
1236
|
+
}
|
|
1237
|
+
function k(S) {
|
|
1238
|
+
const c = S.relatedTarget;
|
|
1239
|
+
!c || m.value?.contains(c) || b.value?.contains(c) || x();
|
|
1240
|
+
}
|
|
1241
|
+
return Z(s, (S) => {
|
|
1242
|
+
S.some((c) => c.index === a.value) || (a.value = S[0]?.index ?? -1);
|
|
1243
|
+
}), Z(u, () => {
|
|
1244
|
+
x();
|
|
1245
|
+
}), ht(() => document.addEventListener("pointerdown", I)), $e(() => document.removeEventListener("pointerdown", I)), {
|
|
1246
|
+
open: r,
|
|
1247
|
+
cursor: a,
|
|
1248
|
+
trigger: b,
|
|
1249
|
+
panel: m,
|
|
1250
|
+
search: _,
|
|
1251
|
+
list: d,
|
|
1252
|
+
toggle: E,
|
|
1253
|
+
close: x,
|
|
1254
|
+
choose: G,
|
|
1255
|
+
escape: A,
|
|
1256
|
+
navigate: g,
|
|
1257
|
+
searchKeydown: f,
|
|
1258
|
+
leave: k
|
|
1259
|
+
};
|
|
1260
|
+
}
|
|
1261
|
+
function Vn(t, u, s, r) {
|
|
1262
|
+
const a = j(0), b = j(""), m = j([]), _ = z(
|
|
1263
|
+
() => t.value.template.pages.flatMap(
|
|
1264
|
+
(c, M) => c.components.flatMap(
|
|
1265
|
+
(p, C) => p.kind === "list" ? [{ component: p, pageIndex: M, componentIndex: C }] : []
|
|
1266
|
+
)
|
|
1267
|
+
)
|
|
1268
|
+
), d = z(
|
|
1269
|
+
() => _.value[a.value]?.component
|
|
1270
|
+
), w = z(() => {
|
|
1271
|
+
const c = d.value;
|
|
1272
|
+
if (!c) return [];
|
|
1273
|
+
const M = c.columns.map(
|
|
1274
|
+
(p) => p.headerStyle?.align ?? p.headerAlign ?? c.headerStyle?.align ?? c.headerAlign ?? p.style?.align ?? "center"
|
|
1275
|
+
);
|
|
1276
|
+
if (c.headerGrid && u())
|
|
1277
|
+
for (const p of ve(c.headerGrid, c.widthMm, 100).cells)
|
|
1278
|
+
for (let C = p.ci; C < p.ci + (p.cell.colSpan ?? 1); C++)
|
|
1279
|
+
M[C] = p.cell.style?.align ?? "left";
|
|
1280
|
+
return M;
|
|
1281
|
+
}), x = z(() => {
|
|
1282
|
+
const c = b.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
|
|
1283
|
+
return (d.value?.columns ?? []).flatMap((M, p) => {
|
|
1284
|
+
const C = `${M.header} ${M.field}`.toLocaleLowerCase();
|
|
1285
|
+
return c.every((D) => C.includes(D)) ? [{ column: M, index: p }] : [];
|
|
1286
|
+
});
|
|
1287
|
+
});
|
|
1288
|
+
function E(c, M) {
|
|
1289
|
+
m.value = M ? [.../* @__PURE__ */ new Set([...m.value, c])] : m.value.filter((p) => p !== c);
|
|
1290
|
+
}
|
|
1291
|
+
function G(c) {
|
|
1292
|
+
for (const M of x.value) E(M.index, c);
|
|
1293
|
+
}
|
|
1294
|
+
function A() {
|
|
1295
|
+
m.value = [];
|
|
1296
|
+
}
|
|
1297
|
+
function g(c, M, p) {
|
|
1298
|
+
if (!s()) return;
|
|
1299
|
+
const C = d.value?.columns[c];
|
|
1300
|
+
C && (M === "hidden" && p === !0 && !d.value?.columns.some(
|
|
1301
|
+
(D, T) => T !== c && !D.hidden
|
|
1302
|
+
) || (Object.assign(C, { [M]: M === "widthMm" ? Number(p) : p }), M === "header" && I(c, String(p)), M === "headerAlign" && k(
|
|
1303
|
+
c,
|
|
1304
|
+
p
|
|
1305
|
+
), M === "widthMm" && f(), r()));
|
|
1306
|
+
}
|
|
1307
|
+
function f() {
|
|
1308
|
+
const c = _.value[a.value];
|
|
1309
|
+
if (!c) return;
|
|
1310
|
+
const M = c.component, p = t.value.template.pages[c.pageIndex], C = M.columns.map((D) => D.widthMm);
|
|
1311
|
+
M.headerGrid && (M.headerGrid.colWidthsMm = C), p.layout === "wide" && C.every((D) => Number.isFinite(D) && D > 0) && (M.widthMm = C.reduce((D, T) => D + T, 0), p.widthMm = Math.max(
|
|
1312
|
+
...p.components.map(
|
|
1313
|
+
(D) => D.leftMm + D.widthMm
|
|
1314
|
+
)
|
|
1315
|
+
) + (p.marginRightMm ?? 0));
|
|
1316
|
+
}
|
|
1317
|
+
function I(c, M) {
|
|
1318
|
+
const p = d.value;
|
|
1319
|
+
if (!p?.headerGrid) return;
|
|
1320
|
+
const D = ve(p.headerGrid, p.widthMm, 100).cells.filter(({ ci: T, cell: F }) => T <= c && T + (F.colSpan ?? 1) > c).slice(-1)[0];
|
|
1321
|
+
D && (Object.assign(D.cell, { text: M, rawText: M, value: M }), p.columns.slice(D.ci, D.ci + (D.cell.colSpan ?? 1)).forEach((T) => {
|
|
1322
|
+
T.header = M;
|
|
1323
|
+
}));
|
|
1324
|
+
}
|
|
1325
|
+
function k(c, M) {
|
|
1326
|
+
const p = d.value, C = p?.columns[c];
|
|
1327
|
+
if (C?.headerStyle?.align !== void 0 && (C.headerStyle = { ...C.headerStyle, align: M }), !p?.headerGrid) return;
|
|
1328
|
+
const T = ve(p.headerGrid, p.widthMm, 100).cells.filter(({ ci: F, cell: te }) => F <= c && F + (te.colSpan ?? 1) > c).slice(-1)[0];
|
|
1329
|
+
T && (T.cell.style = { ...T.cell.style, align: M }, p.columns.slice(T.ci, T.ci + (T.cell.colSpan ?? 1)).forEach((F) => {
|
|
1330
|
+
F.headerAlign = M, F.headerStyle?.align !== void 0 && (F.headerStyle = { ...F.headerStyle, align: M });
|
|
1331
|
+
}));
|
|
1332
|
+
}
|
|
1333
|
+
function S(c, M) {
|
|
1334
|
+
if (!(!s() || c === "headerAlign" && M === "auto")) {
|
|
1335
|
+
for (const p of m.value) {
|
|
1336
|
+
const C = d.value?.columns[p];
|
|
1337
|
+
C && (Object.assign(C, { [c]: M }), c === "headerAlign" && k(
|
|
1338
|
+
p,
|
|
1339
|
+
M
|
|
1340
|
+
));
|
|
1341
|
+
}
|
|
1342
|
+
r();
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
return {
|
|
1346
|
+
selected: a,
|
|
1347
|
+
query: b,
|
|
1348
|
+
selectedColumns: m,
|
|
1349
|
+
lists: _,
|
|
1350
|
+
activeList: d,
|
|
1351
|
+
headerAlignments: w,
|
|
1352
|
+
visibleColumns: x,
|
|
1353
|
+
toggleColumn: E,
|
|
1354
|
+
selectVisible: G,
|
|
1355
|
+
clearSelection: A,
|
|
1356
|
+
setColumn: g,
|
|
1357
|
+
alignColumns: S
|
|
1358
|
+
};
|
|
1359
|
+
}
|
|
1360
|
+
function be(t) {
|
|
1361
|
+
return t.kind === "snapshot" ? t.value.length * 2 : (t.removed.length + t.inserted.length) * 2 + 16;
|
|
1362
|
+
}
|
|
1363
|
+
function Bn(t, u, s = !1) {
|
|
1364
|
+
const r = { kind: "snapshot", value: u };
|
|
1365
|
+
if (s) return r;
|
|
1366
|
+
let a = 0;
|
|
1367
|
+
const b = Math.min(t.length, u.length);
|
|
1368
|
+
for (; a < b && t.charCodeAt(a) === u.charCodeAt(a); ) a++;
|
|
1369
|
+
let m = t.length, _ = u.length;
|
|
1370
|
+
for (; m > a && _ > a && t.charCodeAt(m - 1) === u.charCodeAt(_ - 1); )
|
|
1371
|
+
m--, _--;
|
|
1372
|
+
const d = { kind: "patch", start: a, removed: t.slice(a, m), inserted: u.slice(a, _) };
|
|
1373
|
+
return be(d) < be(r) ? d : r;
|
|
1374
|
+
}
|
|
1375
|
+
function Le(t, u, s = !1) {
|
|
1376
|
+
if (u.kind === "snapshot") return u.value;
|
|
1377
|
+
const r = s ? u.inserted : u.removed, a = s ? u.removed : u.inserted;
|
|
1378
|
+
return t.slice(0, u.start) + a + t.slice(u.start + r.length);
|
|
1379
|
+
}
|
|
1380
|
+
function zn(t, u = { entries: 100, bytes: 16 * 1024 * 1024 }) {
|
|
1381
|
+
if (![u.entries, u.bytes].every((g) => Number.isSafeInteger(g) && g > 0)) throw new RangeError("History budgets must be positive safe integers");
|
|
1382
|
+
const s = nt([{ kind: "snapshot", value: t }]), r = j(0), a = j(t), b = z(() => r.value > 0), m = z(() => r.value + 1 < s.value.length), _ = z(() => a.value), d = z(() => s.value.reduce((g, f) => g + be(f), 0));
|
|
1383
|
+
function w(g) {
|
|
1384
|
+
s.value = [{ kind: "snapshot", value: g }], r.value = 0, a.value = g;
|
|
1385
|
+
}
|
|
1386
|
+
function x(g) {
|
|
1387
|
+
let f = g;
|
|
1388
|
+
for (; f > 0 && s.value[f].kind !== "snapshot"; ) f--;
|
|
1389
|
+
let I = "";
|
|
1390
|
+
for (; f <= g; f++) I = Le(I, s.value[f]);
|
|
1391
|
+
return I;
|
|
1392
|
+
}
|
|
1393
|
+
function E(g) {
|
|
1394
|
+
let f = g.reduce((I, k) => I + be(k), 0);
|
|
1395
|
+
for (; g.length > 1 && (g.length > u.entries || f > u.bytes); ) {
|
|
1396
|
+
const I = g[0], k = g[1], S = { kind: "snapshot", value: Le(I.value, k) };
|
|
1397
|
+
f += be(S) - be(I) - be(k), g.splice(0, 2, S);
|
|
1398
|
+
}
|
|
1399
|
+
return g;
|
|
1400
|
+
}
|
|
1401
|
+
function G(g) {
|
|
1402
|
+
if (a.value === g) return;
|
|
1403
|
+
const f = s.value.slice(0, r.value + 1);
|
|
1404
|
+
f.push(Bn(a.value, g, f.length % 20 === 0)), s.value = E(f), r.value = s.value.length - 1, a.value = g;
|
|
1405
|
+
}
|
|
1406
|
+
function A(g) {
|
|
1407
|
+
if (g < 0 ? !b.value : !m.value) return;
|
|
1408
|
+
const f = s.value[r.value];
|
|
1409
|
+
return g < 0 && f.kind === "patch" ? a.value = Le(a.value, f, !0) : g > 0 ? a.value = Le(a.value, s.value[r.value + 1]) : a.value = x(r.value - 1), r.value += g, a.value;
|
|
1410
|
+
}
|
|
1411
|
+
return { canUndo: b, canRedo: m, current: _, retainedBytes: d, reset: w, record: G, move: A };
|
|
1412
|
+
}
|
|
1413
|
+
function Nn(t) {
|
|
1414
|
+
const u = nt(null), s = j(!1);
|
|
1415
|
+
let r, a = 0;
|
|
1416
|
+
function b(d) {
|
|
1417
|
+
r?.(d), r = void 0, u.value = null;
|
|
1418
|
+
}
|
|
1419
|
+
function m() {
|
|
1420
|
+
a++, b(!1), s.value = !1;
|
|
1421
|
+
}
|
|
1422
|
+
async function _(d) {
|
|
1423
|
+
m();
|
|
1424
|
+
const w = a, x = t();
|
|
1425
|
+
s.value = !0;
|
|
1426
|
+
try {
|
|
1427
|
+
const E = await new Promise((G, A) => {
|
|
1428
|
+
if (r = G, !x) {
|
|
1429
|
+
u.value = d;
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
Promise.resolve().then(() => a === w ? x(d) : !1).then((g) => {
|
|
1433
|
+
a === w && b(g === !0);
|
|
1434
|
+
}, (g) => {
|
|
1435
|
+
a === w && (r = void 0, u.value = null, A(g));
|
|
1436
|
+
});
|
|
1437
|
+
});
|
|
1438
|
+
return a === w && E === !0;
|
|
1439
|
+
} finally {
|
|
1440
|
+
a === w && (s.value = !1);
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
return $e(m), { confirmation: u, pending: s, decide: b, request: _, cancel: m };
|
|
1444
|
+
}
|
|
1445
|
+
function jn(t, u) {
|
|
1446
|
+
const s = j(Y(t.modelValue)), r = j(me(s.value)), a = j(me(s.value)), b = j(""), m = j(!1), _ = z(() => ({
|
|
1447
|
+
...Pe,
|
|
1448
|
+
...t.messages
|
|
1449
|
+
})), d = z(() => ({
|
|
344
1450
|
showExport: !1,
|
|
345
1451
|
showPrint: !1,
|
|
346
1452
|
showPdfWindow: !1,
|
|
347
|
-
...
|
|
1453
|
+
...t.preview,
|
|
348
1454
|
theme: {
|
|
349
1455
|
shellBg: "#f1f5f9",
|
|
350
1456
|
shellFg: "#334155",
|
|
@@ -356,312 +1462,488 @@ function Ze(r, w) {
|
|
|
356
1462
|
btnHoverBg: "#eff6ff",
|
|
357
1463
|
btnHoverFg: "#1d4ed8",
|
|
358
1464
|
btnActiveBg: "#2563eb",
|
|
359
|
-
...
|
|
1465
|
+
...t.preview?.theme
|
|
360
1466
|
}
|
|
361
1467
|
}));
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
1468
|
+
ft({
|
|
1469
|
+
get defaults() {
|
|
1470
|
+
return d.value;
|
|
1471
|
+
}
|
|
1472
|
+
});
|
|
1473
|
+
let w, x = 0;
|
|
1474
|
+
const E = z(
|
|
1475
|
+
() => Ye(s.value)
|
|
1476
|
+
), G = z(() => {
|
|
367
1477
|
try {
|
|
368
|
-
return
|
|
1478
|
+
return me(s.value) !== r.value;
|
|
369
1479
|
} catch {
|
|
370
1480
|
return !0;
|
|
371
1481
|
}
|
|
372
|
-
}),
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
1482
|
+
}), A = j(a.value), g = z(() => a.value !== A.value), f = z(
|
|
1483
|
+
() => G.value || a.value !== A.value
|
|
1484
|
+
), I = () => JSON.stringify({
|
|
1485
|
+
document: s.value,
|
|
1486
|
+
json: a.value,
|
|
1487
|
+
appliedJson: A.value
|
|
1488
|
+
}), k = zn(I()), S = Nn(() => t.beforeDiscard), c = z(() => m.value || S.pending.value), M = () => !t.readonly && !c.value && !g.value, p = Vn(
|
|
1489
|
+
s,
|
|
1490
|
+
() => E.value.ok,
|
|
1491
|
+
M,
|
|
1492
|
+
H
|
|
1493
|
+
), { selected: C, lists: D, activeList: T, headerAlignments: F, setColumn: te } = p;
|
|
1494
|
+
Z(C, () => p.clearSelection());
|
|
1495
|
+
const o = z(
|
|
1496
|
+
() => E.value.ok ? bt({
|
|
1497
|
+
draft: {
|
|
1498
|
+
template: s.value.template,
|
|
1499
|
+
datasets: t.datasets ?? {},
|
|
1500
|
+
params: []
|
|
1501
|
+
}
|
|
1502
|
+
}) : void 0
|
|
1503
|
+
);
|
|
1504
|
+
function q() {
|
|
1505
|
+
x++, w?.abort(), w = void 0, m.value = !1;
|
|
1506
|
+
}
|
|
1507
|
+
let $ = 0;
|
|
1508
|
+
async function L(V = "replace", N) {
|
|
1509
|
+
if (!f.value) return !0;
|
|
1510
|
+
const J = I();
|
|
382
1511
|
try {
|
|
383
|
-
return await
|
|
384
|
-
reason:
|
|
385
|
-
document: JSON.parse(
|
|
386
|
-
|
|
1512
|
+
return await S.request({
|
|
1513
|
+
reason: V,
|
|
1514
|
+
document: JSON.parse(
|
|
1515
|
+
JSON.stringify(s.value)
|
|
1516
|
+
),
|
|
1517
|
+
replacement: N ? Y(N) : void 0,
|
|
387
1518
|
pendingLocalChanges: !0
|
|
388
|
-
}) &&
|
|
389
|
-
} catch (
|
|
390
|
-
return
|
|
1519
|
+
}) && J === I();
|
|
1520
|
+
} catch (ne) {
|
|
1521
|
+
return b.value = ne instanceof Error ? ne.message : String(ne), !1;
|
|
391
1522
|
}
|
|
392
1523
|
}
|
|
393
|
-
function
|
|
394
|
-
|
|
1524
|
+
function R(V) {
|
|
1525
|
+
q(), s.value = V, r.value = me(V), a.value = r.value, A.value = a.value, b.value = "", C.value = 0, p.clearSelection(), k.reset(I());
|
|
395
1526
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
1527
|
+
Z(
|
|
1528
|
+
() => t.modelValue,
|
|
1529
|
+
async (V) => {
|
|
1530
|
+
let N;
|
|
1531
|
+
try {
|
|
1532
|
+
N = Y(V);
|
|
1533
|
+
} catch (ne) {
|
|
1534
|
+
b.value = ne instanceof Error ? ne.message : String(ne);
|
|
1535
|
+
return;
|
|
1536
|
+
}
|
|
1537
|
+
try {
|
|
1538
|
+
if (me(N) === me(s.value))
|
|
1539
|
+
return;
|
|
1540
|
+
} catch {
|
|
1541
|
+
}
|
|
1542
|
+
const J = ++$;
|
|
1543
|
+
if (q(), !await L("replace", N)) {
|
|
1544
|
+
J === $ && E.value.ok && u("update:modelValue", Y(s.value));
|
|
1545
|
+
return;
|
|
1546
|
+
}
|
|
1547
|
+
J === $ && R(N);
|
|
403
1548
|
}
|
|
1549
|
+
), $e(() => {
|
|
1550
|
+
$++, q();
|
|
1551
|
+
});
|
|
1552
|
+
function H() {
|
|
1553
|
+
S.cancel(), b.value = "", E.value.ok && (a.value = me(s.value), A.value = a.value, u("update:modelValue", Y(s.value))), k.record(I());
|
|
1554
|
+
}
|
|
1555
|
+
function K(V) {
|
|
1556
|
+
if (!M()) return !1;
|
|
404
1557
|
try {
|
|
405
|
-
|
|
406
|
-
|
|
1558
|
+
const N = Y(s.value);
|
|
1559
|
+
V(N);
|
|
1560
|
+
const J = Ye(N);
|
|
1561
|
+
if (!J.ok)
|
|
1562
|
+
throw new Error(
|
|
1563
|
+
J.errors.map((ne) => `${ne.path}: ${ne.message}`).join(`
|
|
1564
|
+
`)
|
|
1565
|
+
);
|
|
1566
|
+
return s.value = N, H(), !0;
|
|
1567
|
+
} catch (N) {
|
|
1568
|
+
return b.value = N instanceof Error ? N.message : String(N), !1;
|
|
407
1569
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
1570
|
+
}
|
|
1571
|
+
async function ue(V) {
|
|
1572
|
+
if (!M()) return !1;
|
|
1573
|
+
try {
|
|
1574
|
+
const N = Y(V);
|
|
1575
|
+
return !await L("replace", N) || !M() ? !1 : (s.value = N, C.value = 0, p.clearSelection(), H(), !0);
|
|
1576
|
+
} catch (N) {
|
|
1577
|
+
return b.value = N instanceof Error ? N.message : String(N), !1;
|
|
412
1578
|
}
|
|
413
|
-
E === F && se(L);
|
|
414
|
-
}), be(() => {
|
|
415
|
-
F++, T();
|
|
416
|
-
});
|
|
417
|
-
function ne() {
|
|
418
|
-
f.cancel(), i.value = "", C.value.ok && (u.value = ee(c.value), S.value = u.value, w("update:modelValue", U(c.value))), V.record(O());
|
|
419
1579
|
}
|
|
420
|
-
function
|
|
421
|
-
|
|
1580
|
+
function xe(V) {
|
|
1581
|
+
M() && (s.value.name = V, H());
|
|
422
1582
|
}
|
|
423
|
-
function
|
|
424
|
-
|
|
1583
|
+
function Ae(V) {
|
|
1584
|
+
M() && (s.value.description = V, H());
|
|
425
1585
|
}
|
|
426
|
-
function
|
|
427
|
-
if (!(
|
|
1586
|
+
function pe() {
|
|
1587
|
+
if (!(t.readonly || c.value))
|
|
428
1588
|
try {
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
1589
|
+
const V = Y(a.value);
|
|
1590
|
+
if (V.id !== s.value.id)
|
|
1591
|
+
throw new Error("属性编辑不允许更换模板 ID,请另存为新模板");
|
|
1592
|
+
if (V.revision !== s.value.revision)
|
|
1593
|
+
throw new Error("修订号由保存服务管理,不能在 JSON 中修改");
|
|
1594
|
+
s.value = V, C.value = 0, p.clearSelection(), H();
|
|
1595
|
+
} catch (V) {
|
|
1596
|
+
b.value = V instanceof Error ? V.message : String(V);
|
|
435
1597
|
}
|
|
436
1598
|
}
|
|
437
|
-
async function
|
|
438
|
-
|
|
1599
|
+
async function se() {
|
|
1600
|
+
c.value || t.readonly || !await L("reset") || (R(Y(r.value)), u("update:modelValue", Y(s.value)));
|
|
439
1601
|
}
|
|
440
|
-
function
|
|
441
|
-
if (
|
|
442
|
-
|
|
443
|
-
const
|
|
444
|
-
if (!
|
|
445
|
-
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
}
|
|
449
|
-
async function
|
|
450
|
-
if (!
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
const
|
|
1602
|
+
function ie(V) {
|
|
1603
|
+
if (c.value || t.readonly) return;
|
|
1604
|
+
k.record(I());
|
|
1605
|
+
const N = k.move(V);
|
|
1606
|
+
if (!N) return;
|
|
1607
|
+
S.cancel();
|
|
1608
|
+
const J = JSON.parse(N);
|
|
1609
|
+
s.value = J.document, a.value = J.json, A.value = J.appliedJson, b.value = "", C.value = 0, p.clearSelection(), E.value.ok && u("update:modelValue", Y(s.value));
|
|
1610
|
+
}
|
|
1611
|
+
async function he() {
|
|
1612
|
+
if (!t.save || !M() || !E.value.ok) return;
|
|
1613
|
+
const V = ++x;
|
|
1614
|
+
w = new AbortController(), m.value = !0, b.value = "";
|
|
1615
|
+
const N = Y(s.value);
|
|
454
1616
|
try {
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
1617
|
+
const J = Y(
|
|
1618
|
+
await t.save(N, {
|
|
1619
|
+
expectedRevision: N.revision,
|
|
1620
|
+
signal: w.signal
|
|
1621
|
+
})
|
|
1622
|
+
);
|
|
1623
|
+
if (V !== x) return;
|
|
1624
|
+
if (J.id !== N.id)
|
|
1625
|
+
throw new Error("保存服务返回了其他模板的文档");
|
|
1626
|
+
s.value = J, r.value = me(J), a.value = r.value, A.value = a.value, k.reset(I()), u("saved", Y(J)), u("update:modelValue", Y(J));
|
|
1627
|
+
} catch (J) {
|
|
1628
|
+
V === x && (b.value = J instanceof Error ? J.message : String(J));
|
|
461
1629
|
} finally {
|
|
462
|
-
|
|
1630
|
+
V === x && (m.value = !1, w = void 0);
|
|
463
1631
|
}
|
|
464
1632
|
}
|
|
465
|
-
const
|
|
466
|
-
|
|
1633
|
+
const we = z(
|
|
1634
|
+
() => k.canUndo.value || I() !== k.current.value
|
|
1635
|
+
), le = z(
|
|
1636
|
+
() => k.canRedo.value && I() === k.current.value
|
|
1637
|
+
);
|
|
1638
|
+
return {
|
|
1639
|
+
...p,
|
|
1640
|
+
editingReadonly: z(() => t.readonly === !0),
|
|
1641
|
+
transaction: K,
|
|
1642
|
+
replaceDocument: ue,
|
|
1643
|
+
originalDocument: z(() => Y(r.value)),
|
|
1644
|
+
canUndo: we,
|
|
1645
|
+
canRedo: le,
|
|
1646
|
+
undo: () => ie(-1),
|
|
1647
|
+
redo: () => ie(1),
|
|
1648
|
+
pendingLocalChanges: f,
|
|
1649
|
+
jsonPending: g,
|
|
1650
|
+
blocked: c,
|
|
1651
|
+
confirmation: S.confirmation,
|
|
1652
|
+
decideDiscard: S.decide,
|
|
1653
|
+
guardChanges: L,
|
|
1654
|
+
draft: s,
|
|
1655
|
+
json: a,
|
|
1656
|
+
selected: C,
|
|
1657
|
+
error: b,
|
|
1658
|
+
saving: m,
|
|
1659
|
+
dirty: G,
|
|
1660
|
+
validation: E,
|
|
1661
|
+
lists: D,
|
|
1662
|
+
activeList: T,
|
|
1663
|
+
headerAlignments: F,
|
|
1664
|
+
previewOptions: d,
|
|
1665
|
+
fetcher: o,
|
|
1666
|
+
messages: _,
|
|
1667
|
+
setName: xe,
|
|
1668
|
+
setDescription: Ae,
|
|
1669
|
+
setColumn: te,
|
|
1670
|
+
applyJson: pe,
|
|
1671
|
+
reset: se,
|
|
1672
|
+
save: he
|
|
1673
|
+
};
|
|
467
1674
|
}
|
|
468
|
-
function
|
|
469
|
-
const
|
|
470
|
-
const
|
|
471
|
-
return
|
|
1675
|
+
function Fn(t, u) {
|
|
1676
|
+
const s = j("fields"), r = () => u.value?.columns.length ? 0 : -1, a = j(r()), b = z(() => {
|
|
1677
|
+
const d = u.value?.columns[a.value];
|
|
1678
|
+
return d ? { column: d, index: a.value } : void 0;
|
|
472
1679
|
});
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
}),
|
|
476
|
-
|
|
1680
|
+
Z(t, () => {
|
|
1681
|
+
a.value = r();
|
|
1682
|
+
}), Z(u, (d) => {
|
|
1683
|
+
d?.columns[a.value] || (a.value = r());
|
|
477
1684
|
});
|
|
478
|
-
function
|
|
479
|
-
|
|
1685
|
+
function m(d) {
|
|
1686
|
+
u.value?.columns[d] && (a.value = d);
|
|
480
1687
|
}
|
|
481
|
-
function
|
|
482
|
-
const
|
|
483
|
-
|
|
1688
|
+
function _(d) {
|
|
1689
|
+
const w = u.value?.columns.length ?? 0;
|
|
1690
|
+
w && (a.value = Math.max(
|
|
484
1691
|
0,
|
|
485
|
-
Math.min(
|
|
1692
|
+
Math.min(w - 1, a.value + d)
|
|
486
1693
|
));
|
|
487
1694
|
}
|
|
488
|
-
return { section:
|
|
1695
|
+
return { section: s, activeIndex: a, activeColumn: b, activate: m, stepColumn: _ };
|
|
489
1696
|
}
|
|
490
|
-
const
|
|
1697
|
+
const On = ["aria-label", "aria-busy"], Un = { class: "mr-designer-bar" }, Jn = { class: "mr-designer-heading" }, Kn = ["aria-label"], Wn = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], Xn = ["aria-label"], qn = ["aria-pressed"], Yn = ["aria-pressed"], Qn = { class: "mr-designer-actions" }, Zn = { class: "mr-designer-history" }, ea = ["aria-label", "title", "disabled"], ta = ["aria-label", "title", "disabled"], na = ["disabled"], aa = ["disabled"], oa = ["aria-label"], la = {
|
|
1698
|
+
key: 0,
|
|
1699
|
+
class: "mr-designer-tools"
|
|
1700
|
+
}, sa = ["aria-label"], ia = ["aria-pressed", "onClick"], ra = { class: "mr-designer-tool-content" }, da = {
|
|
1701
|
+
key: 2,
|
|
1702
|
+
class: "mr-designer-rule-workspace"
|
|
1703
|
+
}, ua = { key: 0 }, ca = ["value"], ma = {
|
|
1704
|
+
key: 2,
|
|
1705
|
+
class: "mr-designer-note"
|
|
1706
|
+
}, va = {
|
|
1707
|
+
key: 1,
|
|
1708
|
+
class: "mr-designer-inspector"
|
|
1709
|
+
}, pa = ["id", "aria-labelledby"], ha = {
|
|
491
1710
|
key: 0,
|
|
492
1711
|
class: "mr-designer-area"
|
|
493
|
-
},
|
|
1712
|
+
}, ga = ["value"], fa = { class: "mr-designer-current" }, ba = ["aria-expanded", "aria-controls"], ya = { class: "mr-designer-current-name" }, wa = { class: "mr-designer-directory-entry" }, ka = { class: "mr-designer-field-position" }, Ma = ["aria-label"], xa = ["aria-label", "title", "disabled"], Ca = ["aria-label", "title", "disabled"], _a = ["disabled", "aria-label"], Sa = { class: "mr-designer-property-group" }, $a = ["value"], Ea = ["value", "list"], Ia = ["id"], Aa = ["value"], Da = { class: "mr-designer-property-group" }, Ta = { class: "mr-designer-format-pair" }, La = { class: "mr-designer-stacked" }, Ra = ["value"], Ga = { class: "mr-designer-stacked" }, Pa = ["value"], Ha = { value: "identifier" }, Va = { value: "dimension" }, Ba = { value: "measure" }, za = { value: "date" }, Na = { value: "text" }, ja = { class: "mr-designer-control-row" }, Fa = { class: "mr-designer-control-row" }, Oa = { class: "mr-designer-toggle" }, Ua = ["checked"], Ja = { class: "mr-designer-column-structure" }, Ka = ["aria-label", "title", "disabled"], Wa = ["aria-label", "title", "disabled"], Xa = ["checked", "disabled"], qa = ["id", "aria-label"], Ya = { class: "mr-designer-directory-heading" }, Qa = ["aria-label"], Za = { class: "mr-designer-search" }, eo = ["aria-label", "placeholder"], to = ["aria-label", "title"], no = { class: "mr-designer-column-tools" }, ao = ["disabled"], oo = {
|
|
494
1713
|
key: 1,
|
|
495
1714
|
role: "status"
|
|
496
|
-
},
|
|
1715
|
+
}, lo = { key: 2 }, so = ["aria-label"], io = ["aria-label", "checked", "disabled", "onChange"], ro = ["data-column-index", "aria-pressed", "tabindex", "onClick"], uo = { class: "mr-designer-column-number" }, co = { class: "mr-designer-column-name" }, mo = {
|
|
497
1716
|
key: 0,
|
|
498
1717
|
role: "status",
|
|
499
1718
|
class: "mr-designer-empty"
|
|
500
|
-
},
|
|
1719
|
+
}, vo = {
|
|
501
1720
|
key: 0,
|
|
502
1721
|
class: "mr-designer-batch"
|
|
503
|
-
},
|
|
1722
|
+
}, po = ["aria-label", "disabled"], ho = { value: "" }, go = { value: "auto" }, fo = { value: "left" }, bo = { value: "center" }, yo = { value: "right" }, wo = { value: "justify" }, ko = ["aria-label", "disabled"], Mo = { value: "" }, xo = { value: "left" }, Co = { value: "center" }, _o = { value: "right" }, So = { value: "justify" }, $o = {
|
|
504
1723
|
key: 2,
|
|
505
1724
|
role: "status",
|
|
506
1725
|
class: "mr-designer-empty"
|
|
507
|
-
},
|
|
508
|
-
|
|
1726
|
+
}, Eo = { class: "mr-designer-object-tools" }, Io = ["aria-label", "disabled"], Ao = { value: "" }, Do = { value: "text" }, To = { value: "list" }, Lo = { value: "image" }, Ro = { value: "rect" }, Go = ["title", "aria-label", "disabled"], Po = ["title", "aria-label", "disabled"], Ho = { key: 0 }, Vo = ["value"], Bo = { class: "mr-designer-stacked" }, zo = ["value"], No = {
|
|
1727
|
+
value: -1,
|
|
1728
|
+
disabled: ""
|
|
1729
|
+
}, jo = ["value"], Fo = { class: "mr-designer-layer-tools" }, Oo = ["disabled"], Uo = ["disabled"], Jo = {
|
|
1730
|
+
key: 2,
|
|
1731
|
+
class: "mr-designer-empty"
|
|
1732
|
+
}, Ko = { class: "mr-designer-stacked" }, Wo = ["value", "disabled"], Xo = { class: "mr-designer-stacked" }, qo = ["value", "disabled"], Yo = { class: "mr-designer-technical" }, Qo = { class: "mr-designer-identity" }, Zo = { class: "mr-designer-stacked mr-designer-json-label" }, el = ["aria-label", "disabled"], tl = ["disabled"], nl = {
|
|
1733
|
+
key: 4,
|
|
509
1734
|
role: "status",
|
|
510
1735
|
class: "mr-designer-note mr-designer-pending"
|
|
511
|
-
},
|
|
1736
|
+
}, al = ["aria-label"], ol = {
|
|
512
1737
|
key: 0,
|
|
513
1738
|
role: "alert",
|
|
514
1739
|
class: "mr-designer-error"
|
|
515
|
-
},
|
|
1740
|
+
}, ll = {
|
|
516
1741
|
key: 1,
|
|
517
1742
|
role: "alert",
|
|
518
1743
|
class: "mr-designer-error"
|
|
519
|
-
},
|
|
520
|
-
key:
|
|
1744
|
+
}, sl = {
|
|
1745
|
+
key: 4,
|
|
521
1746
|
class: "mr-designer-note mr-designer-invalid"
|
|
522
|
-
},
|
|
1747
|
+
}, il = /* @__PURE__ */ Ee({
|
|
523
1748
|
__name: "ReportTemplateEditor",
|
|
524
1749
|
props: {
|
|
525
1750
|
modelValue: {},
|
|
526
1751
|
datasets: {},
|
|
1752
|
+
dataSchemas: {},
|
|
1753
|
+
bindingDatasets: {},
|
|
1754
|
+
bindingSession: {},
|
|
527
1755
|
readonly: { type: Boolean },
|
|
528
1756
|
messages: {},
|
|
529
1757
|
preview: {},
|
|
530
1758
|
beforeDiscard: { type: Function },
|
|
531
1759
|
save: { type: Function }
|
|
532
1760
|
},
|
|
533
|
-
emits: ["update:modelValue", "saved"],
|
|
534
|
-
setup(
|
|
535
|
-
const
|
|
536
|
-
|
|
1761
|
+
emits: ["update:modelValue", "saved", "excel-bound"],
|
|
1762
|
+
setup(t, { expose: u, emit: s }) {
|
|
1763
|
+
const r = Me(
|
|
1764
|
+
() => import("./ExcelBindingWizard-RLJIXKKG.js")
|
|
1765
|
+
), a = Me(() => import("./RuleEditor-CtJFzKuY.js")), b = Me(
|
|
1766
|
+
() => import("./TemplateReviewPanel-Cn32OY4_.js")
|
|
1767
|
+
), m = t, _ = s, d = jn(m, (X, v) => {
|
|
1768
|
+
_(X === "saved" ? "saved" : "update:modelValue", v);
|
|
537
1769
|
}), {
|
|
538
|
-
draft:
|
|
539
|
-
json:
|
|
540
|
-
selected:
|
|
541
|
-
error:
|
|
542
|
-
saving:
|
|
543
|
-
pendingLocalChanges:
|
|
544
|
-
jsonPending:
|
|
545
|
-
blocked:
|
|
546
|
-
confirmation:
|
|
547
|
-
canUndo:
|
|
548
|
-
canRedo:
|
|
549
|
-
validation:
|
|
550
|
-
lists:
|
|
551
|
-
activeList:
|
|
552
|
-
visibleColumns:
|
|
553
|
-
query:
|
|
554
|
-
selectedColumns:
|
|
555
|
-
fetcher:
|
|
556
|
-
messages:
|
|
557
|
-
} =
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
1770
|
+
draft: w,
|
|
1771
|
+
json: x,
|
|
1772
|
+
selected: E,
|
|
1773
|
+
error: G,
|
|
1774
|
+
saving: A,
|
|
1775
|
+
pendingLocalChanges: g,
|
|
1776
|
+
jsonPending: f,
|
|
1777
|
+
blocked: I,
|
|
1778
|
+
confirmation: k,
|
|
1779
|
+
canUndo: S,
|
|
1780
|
+
canRedo: c,
|
|
1781
|
+
validation: M,
|
|
1782
|
+
lists: p,
|
|
1783
|
+
activeList: C,
|
|
1784
|
+
visibleColumns: D,
|
|
1785
|
+
query: T,
|
|
1786
|
+
selectedColumns: F,
|
|
1787
|
+
fetcher: te,
|
|
1788
|
+
messages: o
|
|
1789
|
+
} = d, q = Fn(E, C), { section: $, activeIndex: L, activeColumn: R } = q, H = `mr-designer-${gt()?.uid ?? 0}`, K = [
|
|
1790
|
+
"fields",
|
|
1791
|
+
"component",
|
|
1792
|
+
"template",
|
|
1793
|
+
"tools",
|
|
1794
|
+
"advanced"
|
|
1795
|
+
], ue = Gn(
|
|
1796
|
+
d,
|
|
1797
|
+
q,
|
|
1798
|
+
() => m.dataSchemas
|
|
1799
|
+
), {
|
|
1800
|
+
mode: xe,
|
|
1801
|
+
setMode: Ae,
|
|
1802
|
+
canvasSelection: pe,
|
|
1803
|
+
canvasPage: se,
|
|
1804
|
+
canvasActive: ie,
|
|
1805
|
+
tool: he,
|
|
1806
|
+
visitedTools: we,
|
|
1807
|
+
editDisabled: le,
|
|
1808
|
+
dataSchema: V,
|
|
1809
|
+
chooseCanvas: N,
|
|
1810
|
+
insertComponent: J,
|
|
1811
|
+
patchCanvas: ne,
|
|
1812
|
+
changeList: at,
|
|
1813
|
+
moveColumn: Ue,
|
|
1814
|
+
headerCommand: ot,
|
|
1815
|
+
locateReview: lt,
|
|
1816
|
+
canvas: ce
|
|
1817
|
+
} = ue, st = z(
|
|
1818
|
+
() => A.value ? o.value.saving : m.readonly ? o.value.readonly : g.value ? o.value.dirty : o.value.ready
|
|
1819
|
+
), Je = j(null), He = j(null), ee = Hn(q, $, D), {
|
|
1820
|
+
open: Ke,
|
|
1821
|
+
cursor: it,
|
|
1822
|
+
trigger: rt,
|
|
1823
|
+
panel: dt,
|
|
1824
|
+
search: ut,
|
|
1825
|
+
list: ct
|
|
1826
|
+
} = ee;
|
|
1827
|
+
Z($, async () => {
|
|
1828
|
+
await de(), He.value && (He.value.scrollTop = 0);
|
|
569
1829
|
});
|
|
570
|
-
const
|
|
571
|
-
auto:
|
|
572
|
-
left:
|
|
573
|
-
center:
|
|
574
|
-
right:
|
|
575
|
-
justify:
|
|
1830
|
+
const We = z(() => ({
|
|
1831
|
+
auto: o.value.auto,
|
|
1832
|
+
left: o.value.left,
|
|
1833
|
+
center: o.value.center,
|
|
1834
|
+
right: o.value.right,
|
|
1835
|
+
justify: o.value.justify
|
|
576
1836
|
}));
|
|
577
|
-
let
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
}),
|
|
1837
|
+
let De = null;
|
|
1838
|
+
Z(k, async (X) => {
|
|
1839
|
+
X ? (De = document.activeElement, await de(), Je.value?.focus()) : (await de(), De?.isConnected && De.focus(), De = null);
|
|
1840
|
+
}), u({
|
|
581
1841
|
get pendingLocalChanges() {
|
|
582
|
-
return
|
|
1842
|
+
return g.value;
|
|
583
1843
|
},
|
|
584
1844
|
get saving() {
|
|
585
|
-
return
|
|
1845
|
+
return A.value;
|
|
586
1846
|
},
|
|
587
1847
|
get blocked() {
|
|
588
|
-
return
|
|
1848
|
+
return I.value;
|
|
589
1849
|
},
|
|
590
|
-
guardChanges:
|
|
591
|
-
reset:
|
|
592
|
-
save:
|
|
1850
|
+
guardChanges: d.guardChanges,
|
|
1851
|
+
reset: d.reset,
|
|
1852
|
+
save: d.save
|
|
593
1853
|
});
|
|
594
|
-
function
|
|
595
|
-
|
|
1854
|
+
async function mt(X) {
|
|
1855
|
+
const v = { ...X.document, id: w.value.id };
|
|
1856
|
+
if (w.value.revision === void 0 ? delete v.revision : v.revision = w.value.revision, !await d.replaceDocument(v)) return;
|
|
1857
|
+
const i = Y(d.draft.value);
|
|
1858
|
+
_("excel-bound", { ...X, document: i, session: { ...X.session, identity: { id: i.id, name: i.name } } });
|
|
596
1859
|
}
|
|
597
|
-
function
|
|
598
|
-
return
|
|
1860
|
+
function ge(X) {
|
|
1861
|
+
return X.target.value;
|
|
599
1862
|
}
|
|
600
|
-
function
|
|
601
|
-
|
|
602
|
-
i.alignColumns(
|
|
603
|
-
a,
|
|
604
|
-
l.value
|
|
605
|
-
), l.value = "";
|
|
1863
|
+
function Ve(X) {
|
|
1864
|
+
return X.target.checked;
|
|
606
1865
|
}
|
|
607
|
-
|
|
608
|
-
const
|
|
1866
|
+
function Xe(X, v) {
|
|
1867
|
+
const i = X.target;
|
|
1868
|
+
d.alignColumns(
|
|
1869
|
+
v,
|
|
1870
|
+
i.value
|
|
1871
|
+
), i.value = "";
|
|
1872
|
+
}
|
|
1873
|
+
async function vt(X) {
|
|
1874
|
+
const i = {
|
|
609
1875
|
ArrowRight: 1,
|
|
610
1876
|
ArrowLeft: -1,
|
|
611
|
-
Home: -
|
|
612
|
-
End:
|
|
613
|
-
}[
|
|
614
|
-
if (
|
|
615
|
-
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
const
|
|
619
|
-
await
|
|
1877
|
+
Home: -K.length,
|
|
1878
|
+
End: K.length
|
|
1879
|
+
}[X.key];
|
|
1880
|
+
if (i === void 0) return;
|
|
1881
|
+
X.preventDefault();
|
|
1882
|
+
const O = K.indexOf($.value), ke = X.key === "Home" ? 0 : X.key === "End" ? K.length - 1 : (O + i + K.length) % K.length;
|
|
1883
|
+
$.value = K[ke];
|
|
1884
|
+
const pt = X.currentTarget.parentElement;
|
|
1885
|
+
await de(), pt?.querySelector(`#${H}-tab-${$.value}`)?.focus();
|
|
620
1886
|
}
|
|
621
|
-
return (
|
|
1887
|
+
return (X, v) => (h(), y("section", {
|
|
622
1888
|
class: "mr-designer",
|
|
623
|
-
"aria-label": e(
|
|
624
|
-
"aria-busy": e(
|
|
1889
|
+
"aria-label": e(o).title,
|
|
1890
|
+
"aria-busy": e(A)
|
|
625
1891
|
}, [
|
|
626
|
-
n("header",
|
|
627
|
-
n("div",
|
|
628
|
-
|
|
1892
|
+
n("header", Un, [
|
|
1893
|
+
n("div", Jn, [
|
|
1894
|
+
Q(ae, {
|
|
629
1895
|
name: "columns",
|
|
630
1896
|
size: 15
|
|
631
1897
|
}),
|
|
632
|
-
n("strong", null,
|
|
1898
|
+
n("strong", null, l(e(o).heading), 1),
|
|
633
1899
|
n("span", {
|
|
634
|
-
class:
|
|
635
|
-
},
|
|
1900
|
+
class: _e({ "mr-designer-dirty": e(g) })
|
|
1901
|
+
}, l(st.value), 3)
|
|
636
1902
|
]),
|
|
637
1903
|
n("nav", {
|
|
638
1904
|
class: "mr-designer-tabs",
|
|
639
1905
|
role: "tablist",
|
|
640
|
-
"aria-label": e(
|
|
1906
|
+
"aria-label": e(o).sectionsLabel
|
|
641
1907
|
}, [
|
|
642
|
-
(
|
|
643
|
-
id: `${
|
|
644
|
-
key:
|
|
1908
|
+
(h(), y(U, null, W(K, (i) => n("button", {
|
|
1909
|
+
id: `${H}-tab-${i}`,
|
|
1910
|
+
key: i,
|
|
645
1911
|
type: "button",
|
|
646
1912
|
role: "tab",
|
|
647
|
-
"aria-selected": e(
|
|
648
|
-
"aria-controls": `${
|
|
649
|
-
tabindex: e(
|
|
650
|
-
onClick: (
|
|
651
|
-
onKeydown:
|
|
652
|
-
},
|
|
653
|
-
], 8,
|
|
654
|
-
n("div",
|
|
655
|
-
|
|
1913
|
+
"aria-selected": e($) === i,
|
|
1914
|
+
"aria-controls": `${H}-panel-${i}`,
|
|
1915
|
+
tabindex: e($) === i ? 0 : -1,
|
|
1916
|
+
onClick: (O) => $.value = i,
|
|
1917
|
+
onKeydown: vt
|
|
1918
|
+
}, l(e(o)[`${i}Section`]), 41, Wn)), 64))
|
|
1919
|
+
], 8, Kn),
|
|
1920
|
+
n("div", {
|
|
1921
|
+
class: "mr-designer-mode",
|
|
1922
|
+
role: "group",
|
|
1923
|
+
"aria-label": e(o).design
|
|
1924
|
+
}, [
|
|
1925
|
+
n("button", {
|
|
1926
|
+
type: "button",
|
|
1927
|
+
"aria-pressed": e(xe) === "design",
|
|
1928
|
+
onClick: v[0] || (v[0] = (i) => e(Ae)("design"))
|
|
1929
|
+
}, l(e(o).design), 9, qn),
|
|
1930
|
+
n("button", {
|
|
1931
|
+
type: "button",
|
|
1932
|
+
"aria-pressed": e(xe) === "preview",
|
|
1933
|
+
onClick: v[1] || (v[1] = (i) => e(Ae)("preview"))
|
|
1934
|
+
}, l(e(o).preview), 9, Yn)
|
|
1935
|
+
], 8, Xn),
|
|
1936
|
+
n("div", Qn, [
|
|
1937
|
+
n("div", Zn, [
|
|
656
1938
|
n("button", {
|
|
657
1939
|
type: "button",
|
|
658
1940
|
class: "mr-designer-icon-button",
|
|
659
|
-
"aria-label": e(
|
|
660
|
-
title: e(
|
|
661
|
-
disabled:
|
|
662
|
-
onClick:
|
|
663
|
-
(...
|
|
664
|
-
}, [...
|
|
1941
|
+
"aria-label": e(o).undo,
|
|
1942
|
+
title: e(o).undo,
|
|
1943
|
+
disabled: t.readonly || e(I) || !e(S),
|
|
1944
|
+
onClick: v[2] || (v[2] = //@ts-ignore
|
|
1945
|
+
(...i) => e(d).undo && e(d).undo(...i))
|
|
1946
|
+
}, [...v[48] || (v[48] = [
|
|
665
1947
|
n("svg", {
|
|
666
1948
|
viewBox: "0 0 24 24",
|
|
667
1949
|
fill: "none",
|
|
@@ -669,16 +1951,16 @@ const tt = ["aria-label", "aria-busy"], nt = { class: "mr-designer-bar" }, lt =
|
|
|
669
1951
|
}, [
|
|
670
1952
|
n("path", { d: "M4 10h10a6 6 0 0 1 0 12M4 10l5-5M4 10l5 5" })
|
|
671
1953
|
], -1)
|
|
672
|
-
])], 8,
|
|
1954
|
+
])], 8, ea),
|
|
673
1955
|
n("button", {
|
|
674
1956
|
type: "button",
|
|
675
1957
|
class: "mr-designer-icon-button",
|
|
676
|
-
"aria-label": e(
|
|
677
|
-
title: e(
|
|
678
|
-
disabled:
|
|
679
|
-
onClick:
|
|
680
|
-
(...
|
|
681
|
-
}, [...
|
|
1958
|
+
"aria-label": e(o).redo,
|
|
1959
|
+
title: e(o).redo,
|
|
1960
|
+
disabled: t.readonly || e(I) || !e(c),
|
|
1961
|
+
onClick: v[3] || (v[3] = //@ts-ignore
|
|
1962
|
+
(...i) => e(d).redo && e(d).redo(...i))
|
|
1963
|
+
}, [...v[49] || (v[49] = [
|
|
682
1964
|
n("svg", {
|
|
683
1965
|
viewBox: "0 0 24 24",
|
|
684
1966
|
fill: "none",
|
|
@@ -686,492 +1968,938 @@ const tt = ["aria-label", "aria-busy"], nt = { class: "mr-designer-bar" }, lt =
|
|
|
686
1968
|
}, [
|
|
687
1969
|
n("path", { d: "M20 10H10a6 6 0 0 0 0 12m10-12-5-5m5 5-5 5" })
|
|
688
1970
|
], -1)
|
|
689
|
-
])], 8,
|
|
1971
|
+
])], 8, ta)
|
|
690
1972
|
]),
|
|
691
1973
|
n("button", {
|
|
692
1974
|
type: "button",
|
|
693
1975
|
class: "mr-designer-reset",
|
|
694
|
-
disabled:
|
|
695
|
-
onClick:
|
|
696
|
-
(...
|
|
697
|
-
},
|
|
698
|
-
|
|
1976
|
+
disabled: t.readonly || e(I) || !e(g),
|
|
1977
|
+
onClick: v[4] || (v[4] = //@ts-ignore
|
|
1978
|
+
(...i) => e(d).reset && e(d).reset(...i))
|
|
1979
|
+
}, l(e(o).reset), 9, na),
|
|
1980
|
+
t.save ? (h(), y("button", {
|
|
699
1981
|
key: 0,
|
|
700
1982
|
type: "button",
|
|
701
1983
|
class: "mr-designer-save",
|
|
702
|
-
disabled:
|
|
703
|
-
onClick:
|
|
704
|
-
(...
|
|
1984
|
+
disabled: t.readonly || e(I) || e(f) || !e(M).ok || !e(g),
|
|
1985
|
+
onClick: v[5] || (v[5] = //@ts-ignore
|
|
1986
|
+
(...i) => e(d).save && e(d).save(...i))
|
|
705
1987
|
}, [
|
|
706
|
-
|
|
1988
|
+
Q(ae, {
|
|
707
1989
|
name: "file",
|
|
708
1990
|
size: 13
|
|
709
1991
|
}),
|
|
710
|
-
P(
|
|
711
|
-
], 8,
|
|
1992
|
+
P(l(e(A) ? e(o).saving : e(o).save), 1)
|
|
1993
|
+
], 8, aa)) : B("", !0)
|
|
712
1994
|
])
|
|
713
1995
|
]),
|
|
714
|
-
e(
|
|
1996
|
+
e(k) ? (h(), y("div", {
|
|
715
1997
|
key: 0,
|
|
716
1998
|
role: "alertdialog",
|
|
717
|
-
"aria-label": e(
|
|
1999
|
+
"aria-label": e(o).discardTitle,
|
|
718
2000
|
class: "mr-designer-confirm",
|
|
719
|
-
onKeydown:
|
|
2001
|
+
onKeydown: v[8] || (v[8] = Be(tt((i) => e(d).decideDiscard(!1), ["prevent", "stop"]), ["esc"]))
|
|
720
2002
|
}, [
|
|
721
2003
|
n("div", null, [
|
|
722
|
-
n("strong", null,
|
|
723
|
-
n("p", null,
|
|
2004
|
+
n("strong", null, l(e(o).discardTitle), 1),
|
|
2005
|
+
n("p", null, l(e(o).discardDescription), 1)
|
|
724
2006
|
]),
|
|
725
2007
|
n("div", null, [
|
|
726
2008
|
n("button", {
|
|
727
2009
|
ref_key: "keepButton",
|
|
728
|
-
ref:
|
|
2010
|
+
ref: Je,
|
|
729
2011
|
type: "button",
|
|
730
|
-
onClick:
|
|
731
|
-
},
|
|
2012
|
+
onClick: v[6] || (v[6] = (i) => e(d).decideDiscard(!1))
|
|
2013
|
+
}, l(e(o).keepEditing), 513),
|
|
732
2014
|
n("button", {
|
|
733
2015
|
type: "button",
|
|
734
|
-
onClick:
|
|
735
|
-
},
|
|
2016
|
+
onClick: v[7] || (v[7] = (i) => e(d).decideDiscard(!0))
|
|
2017
|
+
}, l(e(o).discard), 1)
|
|
736
2018
|
])
|
|
737
|
-
], 40,
|
|
738
|
-
n("div",
|
|
739
|
-
|
|
2019
|
+
], 40, oa)) : B("", !0),
|
|
2020
|
+
n("div", {
|
|
2021
|
+
class: _e(["mr-designer-body", { "is-tools": e($) === "tools" }])
|
|
2022
|
+
}, [
|
|
2023
|
+
e(we).size ? oe((h(), y("div", la, [
|
|
2024
|
+
n("nav", {
|
|
2025
|
+
class: "mr-designer-tool-tabs",
|
|
2026
|
+
"aria-label": e(o).toolsSection
|
|
2027
|
+
}, [
|
|
2028
|
+
(h(), y(U, null, W(["excel", "rules", "review"], (i) => n("button", {
|
|
2029
|
+
key: i,
|
|
2030
|
+
type: "button",
|
|
2031
|
+
"aria-pressed": e(he) === i,
|
|
2032
|
+
onClick: (O) => he.value = i
|
|
2033
|
+
}, l(e(o)[`${i}Tool`]), 9, ia)), 64)),
|
|
2034
|
+
n("span", null, l(e(o).toolsDescription), 1)
|
|
2035
|
+
], 8, sa),
|
|
2036
|
+
n("div", ra, [
|
|
2037
|
+
e(we).has("excel") ? oe((h(), fe(e(r), {
|
|
2038
|
+
key: 0,
|
|
2039
|
+
datasets: t.bindingDatasets ?? [],
|
|
2040
|
+
session: t.bindingSession,
|
|
2041
|
+
identity: { id: e(w).id, name: e(w).name },
|
|
2042
|
+
"lock-id": "",
|
|
2043
|
+
readonly: e(le),
|
|
2044
|
+
onApply: mt
|
|
2045
|
+
}, null, 8, ["datasets", "session", "identity", "readonly"])), [
|
|
2046
|
+
[Te, e(he) === "excel"]
|
|
2047
|
+
]) : B("", !0),
|
|
2048
|
+
e(we).has("review") ? oe((h(), fe(e(b), {
|
|
2049
|
+
key: 1,
|
|
2050
|
+
document: e(w),
|
|
2051
|
+
previous: e(d).originalDocument.value,
|
|
2052
|
+
datasets: t.datasets,
|
|
2053
|
+
"data-schemas": t.dataSchemas,
|
|
2054
|
+
onLocate: e(lt)
|
|
2055
|
+
}, null, 8, ["document", "previous", "datasets", "data-schemas", "onLocate"])), [
|
|
2056
|
+
[Te, e(he) === "review"]
|
|
2057
|
+
]) : B("", !0),
|
|
2058
|
+
e(we).has("rules") ? oe((h(), y("div", da, [
|
|
2059
|
+
e(p).length > 1 ? (h(), y("label", ua, [
|
|
2060
|
+
P(l(e(o).area), 1),
|
|
2061
|
+
oe(n("select", {
|
|
2062
|
+
"onUpdate:modelValue": v[9] || (v[9] = (i) => Ce(E) ? E.value = i : null)
|
|
2063
|
+
}, [
|
|
2064
|
+
(h(!0), y(U, null, W(e(p), (i, O) => (h(), y("option", {
|
|
2065
|
+
key: O,
|
|
2066
|
+
value: O
|
|
2067
|
+
}, l(i.component.title || i.component.dataset), 9, ca))), 128))
|
|
2068
|
+
], 512), [
|
|
2069
|
+
[ye, e(E)]
|
|
2070
|
+
])
|
|
2071
|
+
])) : B("", !0),
|
|
2072
|
+
e(C) ? (h(), fe(e(a), {
|
|
2073
|
+
key: 1,
|
|
2074
|
+
list: e(C),
|
|
2075
|
+
datasets: t.datasets,
|
|
2076
|
+
"dataset-schema": e(V),
|
|
2077
|
+
"dataset-schemas": t.dataSchemas,
|
|
2078
|
+
readonly: e(le),
|
|
2079
|
+
onChange: e(at)
|
|
2080
|
+
}, null, 8, ["list", "datasets", "dataset-schema", "dataset-schemas", "readonly", "onChange"])) : (h(), y("p", ma, l(e(o).rulesNeedList), 1))
|
|
2081
|
+
], 512)), [
|
|
2082
|
+
[Te, e(he) === "rules"]
|
|
2083
|
+
]) : B("", !0)
|
|
2084
|
+
])
|
|
2085
|
+
], 512)), [
|
|
2086
|
+
[Te, e($) === "tools"]
|
|
2087
|
+
]) : B("", !0),
|
|
2088
|
+
e($) !== "tools" ? (h(), y("aside", va, [
|
|
740
2089
|
n("div", {
|
|
741
2090
|
ref_key: "inspectorPanel",
|
|
742
|
-
ref:
|
|
743
|
-
id: `${
|
|
744
|
-
class:
|
|
2091
|
+
ref: He,
|
|
2092
|
+
id: `${H}-panel-${e($)}`,
|
|
2093
|
+
class: _e(["mr-designer-panel", { "is-advanced": e($) === "advanced" }]),
|
|
745
2094
|
role: "tabpanel",
|
|
746
|
-
"aria-labelledby": `${
|
|
2095
|
+
"aria-labelledby": `${H}-tab-${e($)}`
|
|
747
2096
|
}, [
|
|
748
|
-
e(
|
|
749
|
-
e(
|
|
750
|
-
P(
|
|
751
|
-
|
|
752
|
-
"onUpdate:modelValue":
|
|
2097
|
+
e($) === "fields" ? (h(), y(U, { key: 0 }, [
|
|
2098
|
+
e(p).length > 1 ? (h(), y("label", ha, [
|
|
2099
|
+
P(l(e(o).area), 1),
|
|
2100
|
+
oe(n("select", {
|
|
2101
|
+
"onUpdate:modelValue": v[10] || (v[10] = (i) => Ce(E) ? E.value = i : null)
|
|
753
2102
|
}, [
|
|
754
|
-
(
|
|
755
|
-
key:
|
|
756
|
-
value:
|
|
757
|
-
},
|
|
2103
|
+
(h(!0), y(U, null, W(e(p), (i, O) => (h(), y("option", {
|
|
2104
|
+
key: O,
|
|
2105
|
+
value: O
|
|
2106
|
+
}, l(i.pageIndex + 1) + " " + l(e(o).page) + " · " + l(i.component.title || i.component.dataset), 9, ga))), 128))
|
|
758
2107
|
], 512), [
|
|
759
|
-
[
|
|
2108
|
+
[ye, e(E)]
|
|
760
2109
|
])
|
|
761
|
-
])) :
|
|
762
|
-
e(
|
|
763
|
-
n("div",
|
|
2110
|
+
])) : B("", !0),
|
|
2111
|
+
e(C) ? (h(), y(U, { key: 1 }, [
|
|
2112
|
+
n("div", fa, [
|
|
764
2113
|
n("button", {
|
|
765
2114
|
ref_key: "directoryTrigger",
|
|
766
|
-
ref:
|
|
2115
|
+
ref: rt,
|
|
767
2116
|
type: "button",
|
|
768
2117
|
class: "mr-designer-field-trigger",
|
|
769
|
-
"aria-expanded": e(
|
|
770
|
-
"aria-controls": `${
|
|
2118
|
+
"aria-expanded": e(Ke),
|
|
2119
|
+
"aria-controls": `${H}-directory`,
|
|
771
2120
|
"aria-haspopup": "dialog",
|
|
772
|
-
onClick:
|
|
773
|
-
(...
|
|
774
|
-
onKeydown:
|
|
2121
|
+
onClick: v[11] || (v[11] = //@ts-ignore
|
|
2122
|
+
(...i) => e(ee).toggle && e(ee).toggle(...i)),
|
|
2123
|
+
onKeydown: v[12] || (v[12] = Be(
|
|
775
2124
|
//@ts-ignore
|
|
776
|
-
(...
|
|
2125
|
+
(...i) => e(ee).escape && e(ee).escape(...i),
|
|
777
2126
|
["esc"]
|
|
778
2127
|
))
|
|
779
2128
|
}, [
|
|
780
|
-
n("span",
|
|
781
|
-
n("strong", null,
|
|
782
|
-
n("small", null,
|
|
2129
|
+
n("span", ya, [
|
|
2130
|
+
n("strong", null, l(e(R)?.column.header || e(o).noColumns), 1),
|
|
2131
|
+
n("small", null, l(e(R)?.column.field || "—"), 1)
|
|
783
2132
|
]),
|
|
784
|
-
n("span",
|
|
785
|
-
P(
|
|
786
|
-
n("b", null,
|
|
787
|
-
|
|
2133
|
+
n("span", wa, [
|
|
2134
|
+
P(l(e(o).columnDirectory) + " ", 1),
|
|
2135
|
+
n("b", null, l(e(C).columns.length), 1),
|
|
2136
|
+
Q(ae, {
|
|
788
2137
|
name: "chevron-down",
|
|
789
2138
|
size: 13
|
|
790
2139
|
})
|
|
791
2140
|
])
|
|
792
|
-
], 40,
|
|
793
|
-
n("div",
|
|
2141
|
+
], 40, ba),
|
|
2142
|
+
n("div", ka, [
|
|
794
2143
|
n("span", {
|
|
795
|
-
"aria-label": e(
|
|
2144
|
+
"aria-label": e(o).fieldPosition
|
|
796
2145
|
}, [
|
|
797
|
-
P(
|
|
798
|
-
|
|
799
|
-
P(
|
|
800
|
-
], 8,
|
|
2146
|
+
P(l(e(L) >= 0 ? e(L) + 1 : 0), 1),
|
|
2147
|
+
v[50] || (v[50] = n("i", null, "/", -1)),
|
|
2148
|
+
P(l(e(C).columns.length), 1)
|
|
2149
|
+
], 8, Ma),
|
|
801
2150
|
n("button", {
|
|
802
2151
|
type: "button",
|
|
803
2152
|
class: "mr-designer-icon-button",
|
|
804
|
-
"aria-label": e(
|
|
805
|
-
title: e(
|
|
806
|
-
disabled: e(
|
|
807
|
-
onClick:
|
|
2153
|
+
"aria-label": e(o).previousColumn,
|
|
2154
|
+
title: e(o).previousColumn,
|
|
2155
|
+
disabled: e(L) <= 0,
|
|
2156
|
+
onClick: v[13] || (v[13] = (i) => e(q).stepColumn(-1))
|
|
808
2157
|
}, [
|
|
809
|
-
|
|
2158
|
+
Q(ae, {
|
|
810
2159
|
name: "chevron-left",
|
|
811
2160
|
size: 14
|
|
812
2161
|
})
|
|
813
|
-
], 8,
|
|
2162
|
+
], 8, xa),
|
|
814
2163
|
n("button", {
|
|
815
2164
|
type: "button",
|
|
816
2165
|
class: "mr-designer-icon-button",
|
|
817
|
-
"aria-label": e(
|
|
818
|
-
title: e(
|
|
819
|
-
disabled: e(
|
|
820
|
-
onClick:
|
|
2166
|
+
"aria-label": e(o).nextColumn,
|
|
2167
|
+
title: e(o).nextColumn,
|
|
2168
|
+
disabled: e(L) >= e(C).columns.length - 1,
|
|
2169
|
+
onClick: v[14] || (v[14] = (i) => e(q).stepColumn(1))
|
|
821
2170
|
}, [
|
|
822
|
-
|
|
2171
|
+
Q(ae, {
|
|
823
2172
|
name: "chevron-right",
|
|
824
2173
|
size: 14
|
|
825
2174
|
})
|
|
826
|
-
], 8,
|
|
2175
|
+
], 8, Ca)
|
|
827
2176
|
])
|
|
828
2177
|
]),
|
|
829
|
-
e(
|
|
2178
|
+
e(R) ? (h(), y("fieldset", {
|
|
830
2179
|
key: 0,
|
|
831
2180
|
class: "mr-designer-properties",
|
|
832
|
-
disabled:
|
|
833
|
-
"aria-label": e(
|
|
2181
|
+
disabled: t.readonly || e(I) || e(f),
|
|
2182
|
+
"aria-label": e(o).columnProperties
|
|
834
2183
|
}, [
|
|
835
|
-
n("div",
|
|
836
|
-
n("h3", null,
|
|
2184
|
+
n("div", Sa, [
|
|
2185
|
+
n("h3", null, l(e(o).contentGroup), 1),
|
|
837
2186
|
n("label", null, [
|
|
838
|
-
P(
|
|
2187
|
+
P(l(e(o).header), 1),
|
|
839
2188
|
n("input", {
|
|
840
|
-
value: e(
|
|
841
|
-
onInput:
|
|
842
|
-
e(
|
|
2189
|
+
value: e(R).column.header,
|
|
2190
|
+
onInput: v[15] || (v[15] = (i) => e(d).setColumn(
|
|
2191
|
+
e(R).index,
|
|
843
2192
|
"header",
|
|
844
|
-
|
|
2193
|
+
ge(i)
|
|
845
2194
|
))
|
|
846
|
-
}, null, 40,
|
|
2195
|
+
}, null, 40, $a)
|
|
847
2196
|
]),
|
|
848
2197
|
n("label", null, [
|
|
849
|
-
P(
|
|
2198
|
+
P(l(e(o).field), 1),
|
|
850
2199
|
n("input", {
|
|
851
|
-
value: e(
|
|
852
|
-
|
|
853
|
-
|
|
2200
|
+
value: e(R).column.field,
|
|
2201
|
+
list: e(V) ? `${H}-fields` : void 0,
|
|
2202
|
+
onChange: v[16] || (v[16] = (i) => e(d).setColumn(
|
|
2203
|
+
e(R).index,
|
|
854
2204
|
"field",
|
|
855
|
-
|
|
2205
|
+
ge(i)
|
|
856
2206
|
))
|
|
857
|
-
}, null, 40,
|
|
858
|
-
])
|
|
2207
|
+
}, null, 40, Ea)
|
|
2208
|
+
]),
|
|
2209
|
+
e(V) ? (h(), y("datalist", {
|
|
2210
|
+
key: 0,
|
|
2211
|
+
id: `${H}-fields`
|
|
2212
|
+
}, [
|
|
2213
|
+
(h(!0), y(U, null, W(e(V).fields, (i) => (h(), y("option", {
|
|
2214
|
+
key: i.field,
|
|
2215
|
+
value: i.field
|
|
2216
|
+
}, l(i.label) + " · " + l(i.type) + " " + l(i.unit), 9, Aa))), 128))
|
|
2217
|
+
], 8, Ia)) : B("", !0)
|
|
859
2218
|
]),
|
|
860
|
-
n("div",
|
|
861
|
-
n("h3", null,
|
|
862
|
-
n("div",
|
|
863
|
-
n("label",
|
|
864
|
-
P(
|
|
2219
|
+
n("div", Da, [
|
|
2220
|
+
n("h3", null, l(e(o).formatGroup), 1),
|
|
2221
|
+
n("div", Ta, [
|
|
2222
|
+
n("label", La, [
|
|
2223
|
+
P(l(e(o).width), 1),
|
|
865
2224
|
n("input", {
|
|
866
2225
|
type: "number",
|
|
867
2226
|
min: "0.1",
|
|
868
2227
|
step: "0.5",
|
|
869
|
-
value: e(
|
|
870
|
-
onChange:
|
|
871
|
-
e(
|
|
2228
|
+
value: e(R).column.widthMm,
|
|
2229
|
+
onChange: v[17] || (v[17] = (i) => e(d).setColumn(
|
|
2230
|
+
e(R).index,
|
|
872
2231
|
"widthMm",
|
|
873
|
-
|
|
2232
|
+
ge(i)
|
|
874
2233
|
))
|
|
875
|
-
}, null, 40,
|
|
2234
|
+
}, null, 40, Ra)
|
|
876
2235
|
]),
|
|
877
|
-
n("label",
|
|
878
|
-
P(
|
|
2236
|
+
n("label", Ga, [
|
|
2237
|
+
P(l(e(o).semantic), 1),
|
|
879
2238
|
n("select", {
|
|
880
|
-
value: e(
|
|
881
|
-
onChange:
|
|
882
|
-
e(
|
|
2239
|
+
value: e(R).column.semanticRole || "text",
|
|
2240
|
+
onChange: v[18] || (v[18] = (i) => e(d).setColumn(
|
|
2241
|
+
e(R).index,
|
|
883
2242
|
"semanticRole",
|
|
884
|
-
|
|
2243
|
+
ge(i)
|
|
885
2244
|
))
|
|
886
2245
|
}, [
|
|
887
|
-
n("option",
|
|
888
|
-
n("option",
|
|
889
|
-
n("option",
|
|
890
|
-
n("option",
|
|
891
|
-
n("option",
|
|
892
|
-
], 40,
|
|
2246
|
+
n("option", Ha, l(e(o).identifier), 1),
|
|
2247
|
+
n("option", Va, l(e(o).dimension), 1),
|
|
2248
|
+
n("option", Ba, l(e(o).measure), 1),
|
|
2249
|
+
n("option", za, l(e(o).date), 1),
|
|
2250
|
+
n("option", Na, l(e(o).text), 1)
|
|
2251
|
+
], 40, Pa)
|
|
893
2252
|
])
|
|
894
2253
|
]),
|
|
895
|
-
n("div",
|
|
896
|
-
n("span", null,
|
|
897
|
-
|
|
898
|
-
"model-value": e(
|
|
899
|
-
label: e(
|
|
900
|
-
labels:
|
|
901
|
-
"auto-label": e(
|
|
2254
|
+
n("div", ja, [
|
|
2255
|
+
n("span", null, l(e(o).bodyAlign), 1),
|
|
2256
|
+
Q(Fe, {
|
|
2257
|
+
"model-value": e(R).column.align ?? e(R).column.style?.align ?? e(C).align ?? "left",
|
|
2258
|
+
label: e(o).bodyAlign,
|
|
2259
|
+
labels: We.value,
|
|
2260
|
+
"auto-label": e(o).autoShort,
|
|
902
2261
|
"allow-auto": "",
|
|
903
|
-
"onUpdate:modelValue":
|
|
2262
|
+
"onUpdate:modelValue": v[19] || (v[19] = (i) => e(d).setColumn(e(R).index, "align", i))
|
|
904
2263
|
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
905
2264
|
]),
|
|
906
|
-
n("div",
|
|
907
|
-
n("span", null,
|
|
908
|
-
|
|
909
|
-
"model-value": e(
|
|
910
|
-
label: e(
|
|
911
|
-
labels:
|
|
912
|
-
"auto-label": e(
|
|
913
|
-
"onUpdate:modelValue":
|
|
914
|
-
e(
|
|
2265
|
+
n("div", Fa, [
|
|
2266
|
+
n("span", null, l(e(o).headerAlign), 1),
|
|
2267
|
+
Q(Fe, {
|
|
2268
|
+
"model-value": e(d).headerAlignments.value[e(R).index] || "left",
|
|
2269
|
+
label: e(o).headerAlign,
|
|
2270
|
+
labels: We.value,
|
|
2271
|
+
"auto-label": e(o).autoShort,
|
|
2272
|
+
"onUpdate:modelValue": v[20] || (v[20] = (i) => e(d).setColumn(
|
|
2273
|
+
e(R).index,
|
|
915
2274
|
"headerAlign",
|
|
916
|
-
|
|
2275
|
+
i
|
|
917
2276
|
))
|
|
918
2277
|
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
919
2278
|
])
|
|
920
2279
|
]),
|
|
921
|
-
n("label",
|
|
922
|
-
P(
|
|
2280
|
+
n("label", Oa, [
|
|
2281
|
+
P(l(e(o).editable), 1),
|
|
923
2282
|
n("input", {
|
|
924
2283
|
type: "checkbox",
|
|
925
2284
|
role: "switch",
|
|
926
|
-
checked: e(
|
|
927
|
-
onChange:
|
|
928
|
-
e(
|
|
2285
|
+
checked: e(R).column.editable === !0,
|
|
2286
|
+
onChange: v[21] || (v[21] = (i) => e(d).setColumn(
|
|
2287
|
+
e(R).index,
|
|
929
2288
|
"editable",
|
|
930
|
-
|
|
2289
|
+
Ve(i)
|
|
931
2290
|
))
|
|
932
|
-
}, null, 40,
|
|
2291
|
+
}, null, 40, Ua)
|
|
2292
|
+
]),
|
|
2293
|
+
n("div", Ja, [
|
|
2294
|
+
n("span", null, l(e(o).columnOrder), 1),
|
|
2295
|
+
n("button", {
|
|
2296
|
+
type: "button",
|
|
2297
|
+
"aria-label": e(o).moveColumnLeft,
|
|
2298
|
+
title: e(o).moveColumnLeft,
|
|
2299
|
+
disabled: e(L) <= 0,
|
|
2300
|
+
onClick: v[22] || (v[22] = (i) => e(Ue)(-1))
|
|
2301
|
+
}, [
|
|
2302
|
+
Q(ae, {
|
|
2303
|
+
name: "chevron-left",
|
|
2304
|
+
size: 13
|
|
2305
|
+
})
|
|
2306
|
+
], 8, Ka),
|
|
2307
|
+
n("button", {
|
|
2308
|
+
type: "button",
|
|
2309
|
+
"aria-label": e(o).moveColumnRight,
|
|
2310
|
+
title: e(o).moveColumnRight,
|
|
2311
|
+
disabled: e(L) >= e(C).columns.length - 1,
|
|
2312
|
+
onClick: v[23] || (v[23] = (i) => e(Ue)(1))
|
|
2313
|
+
}, [
|
|
2314
|
+
Q(ae, {
|
|
2315
|
+
name: "chevron-right",
|
|
2316
|
+
size: 13
|
|
2317
|
+
})
|
|
2318
|
+
], 8, Wa),
|
|
2319
|
+
n("label", null, [
|
|
2320
|
+
P(l(e(o).columnVisible), 1),
|
|
2321
|
+
n("input", {
|
|
2322
|
+
type: "checkbox",
|
|
2323
|
+
checked: e(R).column.hidden !== !0,
|
|
2324
|
+
disabled: e(R).column.hidden !== !0 && e(C).columns.filter((i) => !i.hidden).length === 1,
|
|
2325
|
+
onChange: v[24] || (v[24] = (i) => e(d).setColumn(
|
|
2326
|
+
e(R).index,
|
|
2327
|
+
"hidden",
|
|
2328
|
+
!Ve(i)
|
|
2329
|
+
))
|
|
2330
|
+
}, null, 40, Xa)
|
|
2331
|
+
])
|
|
933
2332
|
])
|
|
934
|
-
], 8,
|
|
935
|
-
e(
|
|
2333
|
+
], 8, _a)) : B("", !0),
|
|
2334
|
+
e(Ke) ? (h(), y("div", {
|
|
936
2335
|
key: 1,
|
|
937
|
-
id: `${
|
|
2336
|
+
id: `${H}-directory`,
|
|
938
2337
|
ref_key: "directoryPanel",
|
|
939
|
-
ref:
|
|
2338
|
+
ref: dt,
|
|
940
2339
|
role: "dialog",
|
|
941
|
-
"aria-label": e(
|
|
2340
|
+
"aria-label": e(o).columnDirectory,
|
|
942
2341
|
class: "mr-designer-directory",
|
|
943
|
-
onKeydown:
|
|
2342
|
+
onKeydown: v[34] || (v[34] = Be(
|
|
944
2343
|
//@ts-ignore
|
|
945
|
-
(...
|
|
2344
|
+
(...i) => e(ee).escape && e(ee).escape(...i),
|
|
946
2345
|
["esc"]
|
|
947
2346
|
)),
|
|
948
|
-
onFocusout:
|
|
949
|
-
(...
|
|
2347
|
+
onFocusout: v[35] || (v[35] = //@ts-ignore
|
|
2348
|
+
(...i) => e(ee).leave && e(ee).leave(...i))
|
|
950
2349
|
}, [
|
|
951
|
-
n("div",
|
|
2350
|
+
n("div", Ya, [
|
|
952
2351
|
n("strong", null, [
|
|
953
|
-
P(
|
|
954
|
-
n("span", null,
|
|
2352
|
+
P(l(e(o).columnDirectory) + " ", 1),
|
|
2353
|
+
n("span", null, l(e(C).columns.length), 1)
|
|
955
2354
|
]),
|
|
956
2355
|
n("button", {
|
|
957
2356
|
type: "button",
|
|
958
2357
|
class: "mr-designer-icon-button",
|
|
959
|
-
"aria-label": e(
|
|
960
|
-
onClick:
|
|
2358
|
+
"aria-label": e(o).closeDirectory,
|
|
2359
|
+
onClick: v[25] || (v[25] = (i) => e(ee).close(!0))
|
|
961
2360
|
}, [
|
|
962
|
-
|
|
2361
|
+
Q(ae, {
|
|
963
2362
|
name: "close",
|
|
964
2363
|
size: 15
|
|
965
2364
|
})
|
|
966
|
-
], 8,
|
|
2365
|
+
], 8, Qa)
|
|
967
2366
|
]),
|
|
968
|
-
n("div",
|
|
969
|
-
|
|
2367
|
+
n("div", Za, [
|
|
2368
|
+
Q(ae, {
|
|
970
2369
|
name: "search",
|
|
971
2370
|
size: 14
|
|
972
2371
|
}),
|
|
973
|
-
|
|
2372
|
+
oe(n("input", {
|
|
974
2373
|
ref_key: "directorySearch",
|
|
975
|
-
ref:
|
|
976
|
-
"onUpdate:modelValue":
|
|
2374
|
+
ref: ut,
|
|
2375
|
+
"onUpdate:modelValue": v[26] || (v[26] = (i) => Ce(T) ? T.value = i : null),
|
|
977
2376
|
type: "search",
|
|
978
|
-
"aria-label": e(
|
|
979
|
-
placeholder: e(
|
|
980
|
-
onKeydown:
|
|
981
|
-
(...
|
|
982
|
-
}, null, 40,
|
|
983
|
-
[
|
|
2377
|
+
"aria-label": e(o).columnsSearch,
|
|
2378
|
+
placeholder: e(o).columnsSearch,
|
|
2379
|
+
onKeydown: v[27] || (v[27] = //@ts-ignore
|
|
2380
|
+
(...i) => e(ee).searchKeydown && e(ee).searchKeydown(...i))
|
|
2381
|
+
}, null, 40, eo), [
|
|
2382
|
+
[qe, e(T)]
|
|
984
2383
|
]),
|
|
985
|
-
e(
|
|
2384
|
+
e(T) ? (h(), y("button", {
|
|
986
2385
|
key: 0,
|
|
987
2386
|
type: "button",
|
|
988
2387
|
class: "mr-designer-icon-button",
|
|
989
|
-
"aria-label": e(
|
|
990
|
-
title: e(
|
|
991
|
-
onClick:
|
|
2388
|
+
"aria-label": e(o).clearSearch,
|
|
2389
|
+
title: e(o).clearSearch,
|
|
2390
|
+
onClick: v[28] || (v[28] = (i) => T.value = "")
|
|
992
2391
|
}, [
|
|
993
|
-
|
|
2392
|
+
Q(ae, {
|
|
994
2393
|
name: "close",
|
|
995
2394
|
size: 13
|
|
996
2395
|
})
|
|
997
|
-
], 8,
|
|
2396
|
+
], 8, to)) : B("", !0)
|
|
998
2397
|
]),
|
|
999
|
-
n("div",
|
|
2398
|
+
n("div", no, [
|
|
1000
2399
|
n("button", {
|
|
1001
2400
|
type: "button",
|
|
1002
|
-
disabled:
|
|
1003
|
-
onClick:
|
|
1004
|
-
},
|
|
1005
|
-
e(
|
|
2401
|
+
disabled: t.readonly || e(I) || e(f) || !e(D).length,
|
|
2402
|
+
onClick: v[29] || (v[29] = (i) => e(d).selectVisible(!0))
|
|
2403
|
+
}, l(e(o).selectVisible), 9, ao),
|
|
2404
|
+
e(F).length ? (h(), y("button", {
|
|
1006
2405
|
key: 0,
|
|
1007
2406
|
type: "button",
|
|
1008
|
-
onClick:
|
|
1009
|
-
(...
|
|
1010
|
-
},
|
|
1011
|
-
e(
|
|
2407
|
+
onClick: v[30] || (v[30] = //@ts-ignore
|
|
2408
|
+
(...i) => e(d).clearSelection && e(d).clearSelection(...i))
|
|
2409
|
+
}, l(e(o).clearSelection), 1)) : B("", !0),
|
|
2410
|
+
e(F).length ? (h(), y("span", oo, l(e(o).columnsSelected) + " " + l(e(F).length), 1)) : (h(), y("span", lo, l(e(D).length) + " / " + l(e(C).columns.length), 1))
|
|
1012
2411
|
]),
|
|
1013
2412
|
n("div", {
|
|
1014
2413
|
ref_key: "columnList",
|
|
1015
|
-
ref:
|
|
2414
|
+
ref: ct,
|
|
1016
2415
|
class: "mr-designer-column-list",
|
|
1017
|
-
"aria-label": e(
|
|
2416
|
+
"aria-label": e(o).columnDirectory,
|
|
1018
2417
|
role: "group"
|
|
1019
2418
|
}, [
|
|
1020
|
-
(
|
|
1021
|
-
key:
|
|
1022
|
-
class:
|
|
2419
|
+
(h(!0), y(U, null, W(e(D), ({ column: i, index: O }) => (h(), y("div", {
|
|
2420
|
+
key: O,
|
|
2421
|
+
class: _e(["mr-designer-column-row", { "is-active": e(L) === O }])
|
|
1023
2422
|
}, [
|
|
1024
2423
|
n("input", {
|
|
1025
2424
|
type: "checkbox",
|
|
1026
|
-
"aria-label": `${e(
|
|
1027
|
-
checked: e(
|
|
1028
|
-
disabled:
|
|
1029
|
-
onChange: (
|
|
1030
|
-
}, null, 40,
|
|
2425
|
+
"aria-label": `${e(o).selectColumn} ${i.header}`,
|
|
2426
|
+
checked: e(F).includes(O),
|
|
2427
|
+
disabled: t.readonly || e(I) || e(f),
|
|
2428
|
+
onChange: (ke) => e(d).toggleColumn(O, Ve(ke))
|
|
2429
|
+
}, null, 40, io),
|
|
1031
2430
|
n("button", {
|
|
1032
2431
|
type: "button",
|
|
1033
|
-
"data-column-index":
|
|
1034
|
-
"aria-pressed": e(
|
|
1035
|
-
tabindex: e(
|
|
1036
|
-
onClick: (
|
|
1037
|
-
onKeydown:
|
|
1038
|
-
(...
|
|
2432
|
+
"data-column-index": O,
|
|
2433
|
+
"aria-pressed": e(L) === O,
|
|
2434
|
+
tabindex: e(it) === O ? 0 : -1,
|
|
2435
|
+
onClick: (ke) => e(ee).choose(O),
|
|
2436
|
+
onKeydown: v[31] || (v[31] = //@ts-ignore
|
|
2437
|
+
(...ke) => e(ee).navigate && e(ee).navigate(...ke))
|
|
1039
2438
|
}, [
|
|
1040
|
-
n("span",
|
|
1041
|
-
n("span",
|
|
1042
|
-
n("strong", null,
|
|
1043
|
-
n("small", null,
|
|
2439
|
+
n("span", uo, l(O + 1), 1),
|
|
2440
|
+
n("span", co, [
|
|
2441
|
+
n("strong", null, l(i.header), 1),
|
|
2442
|
+
n("small", null, l(i.field), 1)
|
|
1044
2443
|
]),
|
|
1045
|
-
e(
|
|
2444
|
+
e(L) === O ? (h(), fe(ae, {
|
|
1046
2445
|
key: 0,
|
|
1047
2446
|
name: "chevron-right",
|
|
1048
2447
|
size: 13
|
|
1049
|
-
})) :
|
|
1050
|
-
], 40,
|
|
2448
|
+
})) : B("", !0)
|
|
2449
|
+
], 40, ro)
|
|
1051
2450
|
], 2))), 128)),
|
|
1052
|
-
e(
|
|
1053
|
-
|
|
2451
|
+
e(D).length ? B("", !0) : (h(), y("p", mo, [
|
|
2452
|
+
Q(ae, {
|
|
1054
2453
|
name: "search",
|
|
1055
2454
|
size: 20
|
|
1056
2455
|
}),
|
|
1057
|
-
P(
|
|
2456
|
+
P(l(e(o).noColumns), 1)
|
|
1058
2457
|
]))
|
|
1059
|
-
], 8,
|
|
1060
|
-
e(
|
|
2458
|
+
], 8, so),
|
|
2459
|
+
e(F).length ? (h(), y("div", vo, [
|
|
1061
2460
|
n("label", null, [
|
|
1062
|
-
P(
|
|
2461
|
+
P(l(e(o).batchBody), 1),
|
|
1063
2462
|
n("select", {
|
|
1064
|
-
"aria-label": e(
|
|
1065
|
-
disabled:
|
|
1066
|
-
onChange:
|
|
2463
|
+
"aria-label": e(o).batchBody,
|
|
2464
|
+
disabled: t.readonly || e(I) || e(f),
|
|
2465
|
+
onChange: v[32] || (v[32] = (i) => Xe(i, "align"))
|
|
1067
2466
|
}, [
|
|
1068
|
-
n("option",
|
|
1069
|
-
n("option",
|
|
1070
|
-
n("option",
|
|
1071
|
-
n("option",
|
|
1072
|
-
n("option",
|
|
1073
|
-
n("option",
|
|
1074
|
-
], 40,
|
|
2467
|
+
n("option", ho, l(e(o).chooseAlignment), 1),
|
|
2468
|
+
n("option", go, l(e(o).auto), 1),
|
|
2469
|
+
n("option", fo, l(e(o).left), 1),
|
|
2470
|
+
n("option", bo, l(e(o).center), 1),
|
|
2471
|
+
n("option", yo, l(e(o).right), 1),
|
|
2472
|
+
n("option", wo, l(e(o).justify), 1)
|
|
2473
|
+
], 40, po)
|
|
1075
2474
|
]),
|
|
1076
2475
|
n("label", null, [
|
|
1077
|
-
P(
|
|
2476
|
+
P(l(e(o).batchHeader), 1),
|
|
1078
2477
|
n("select", {
|
|
1079
|
-
"aria-label": e(
|
|
1080
|
-
disabled:
|
|
1081
|
-
onChange:
|
|
2478
|
+
"aria-label": e(o).batchHeader,
|
|
2479
|
+
disabled: t.readonly || e(I) || e(f),
|
|
2480
|
+
onChange: v[33] || (v[33] = (i) => Xe(i, "headerAlign"))
|
|
1082
2481
|
}, [
|
|
1083
|
-
n("option",
|
|
1084
|
-
n("option",
|
|
1085
|
-
n("option",
|
|
1086
|
-
n("option",
|
|
1087
|
-
n("option",
|
|
1088
|
-
], 40,
|
|
2482
|
+
n("option", Mo, l(e(o).chooseAlignment), 1),
|
|
2483
|
+
n("option", xo, l(e(o).left), 1),
|
|
2484
|
+
n("option", Co, l(e(o).center), 1),
|
|
2485
|
+
n("option", _o, l(e(o).right), 1),
|
|
2486
|
+
n("option", So, l(e(o).justify), 1)
|
|
2487
|
+
], 40, ko)
|
|
1089
2488
|
])
|
|
1090
|
-
])) :
|
|
1091
|
-
], 40,
|
|
1092
|
-
], 64)) : (
|
|
1093
|
-
], 64)) : e(
|
|
1094
|
-
n("
|
|
1095
|
-
|
|
1096
|
-
|
|
2489
|
+
])) : B("", !0)
|
|
2490
|
+
], 40, qa)) : B("", !0)
|
|
2491
|
+
], 64)) : (h(), y("p", $o, l(e(o).noColumns), 1))
|
|
2492
|
+
], 64)) : e($) === "component" ? (h(), y(U, { key: 1 }, [
|
|
2493
|
+
n("div", Eo, [
|
|
2494
|
+
n("select", {
|
|
2495
|
+
"aria-label": e(o).insertComponent,
|
|
2496
|
+
disabled: e(le),
|
|
2497
|
+
onChange: v[36] || (v[36] = //@ts-ignore
|
|
2498
|
+
(...i) => e(J) && e(J)(...i))
|
|
2499
|
+
}, [
|
|
2500
|
+
n("option", Ao, l(e(o).insertComponent), 1),
|
|
2501
|
+
n("option", Do, l(e(o).insertText), 1),
|
|
2502
|
+
n("option", To, l(e(o).insertList), 1),
|
|
2503
|
+
n("option", Lo, l(e(o).insertImage), 1),
|
|
2504
|
+
n("option", Ro, l(e(o).insertRect), 1)
|
|
2505
|
+
], 40, Io),
|
|
2506
|
+
n("button", {
|
|
2507
|
+
type: "button",
|
|
2508
|
+
title: e(o).duplicateComponent,
|
|
2509
|
+
"aria-label": e(o).duplicateComponent,
|
|
2510
|
+
disabled: e(le) || !e(ie),
|
|
2511
|
+
onClick: v[37] || (v[37] = //@ts-ignore
|
|
2512
|
+
(...i) => e(ce).duplicate && e(ce).duplicate(...i))
|
|
2513
|
+
}, " + ", 8, Go),
|
|
2514
|
+
n("button", {
|
|
2515
|
+
type: "button",
|
|
2516
|
+
title: e(o).removeComponent,
|
|
2517
|
+
"aria-label": e(o).removeComponent,
|
|
2518
|
+
disabled: e(le) || !e(ie),
|
|
2519
|
+
onClick: v[38] || (v[38] = //@ts-ignore
|
|
2520
|
+
(...i) => e(ce).remove && e(ce).remove(...i))
|
|
2521
|
+
}, [
|
|
2522
|
+
Q(ae, {
|
|
2523
|
+
name: "close",
|
|
2524
|
+
size: 14
|
|
2525
|
+
})
|
|
2526
|
+
], 8, Po)
|
|
2527
|
+
]),
|
|
2528
|
+
e(w).template.pages.length > 1 ? (h(), y("label", Ho, [
|
|
2529
|
+
P(l(e(o).page), 1),
|
|
2530
|
+
oe(n("select", {
|
|
2531
|
+
"onUpdate:modelValue": v[39] || (v[39] = (i) => Ce(se) ? se.value = i : null)
|
|
2532
|
+
}, [
|
|
2533
|
+
(h(!0), y(U, null, W(e(w).template.pages, (i, O) => (h(), y("option", {
|
|
2534
|
+
key: O,
|
|
2535
|
+
value: O
|
|
2536
|
+
}, l(O + 1), 9, Vo))), 128))
|
|
2537
|
+
], 512), [
|
|
2538
|
+
[
|
|
2539
|
+
ye,
|
|
2540
|
+
e(se),
|
|
2541
|
+
void 0,
|
|
2542
|
+
{ number: !0 }
|
|
2543
|
+
]
|
|
2544
|
+
])
|
|
2545
|
+
])) : B("", !0),
|
|
2546
|
+
n("label", Bo, [
|
|
2547
|
+
P(l(e(o).components), 1),
|
|
2548
|
+
n("select", {
|
|
2549
|
+
value: e(pe)?.pageIndex === e(se) ? e(pe).componentIndex : -1,
|
|
2550
|
+
onChange: v[40] || (v[40] = (i) => e(N)({
|
|
2551
|
+
pageIndex: e(se),
|
|
2552
|
+
componentIndex: Number(ge(i))
|
|
2553
|
+
}))
|
|
2554
|
+
}, [
|
|
2555
|
+
n("option", No, l(e(o).noComponent), 1),
|
|
2556
|
+
(h(!0), y(U, null, W(e(w).template.pages[e(se)]?.components, (i, O) => (h(), y("option", {
|
|
2557
|
+
key: O,
|
|
2558
|
+
value: O
|
|
2559
|
+
}, l(O + 1) + " · " + l(i.kind === "list" ? i.title || i.dataset : i.text || i.kind), 9, jo))), 128))
|
|
2560
|
+
], 40, zo)
|
|
2561
|
+
]),
|
|
2562
|
+
e(ie) ? (h(), y(U, { key: 1 }, [
|
|
2563
|
+
n("div", Fo, [
|
|
2564
|
+
n("button", {
|
|
2565
|
+
type: "button",
|
|
2566
|
+
disabled: e(le) || e(pe)?.componentIndex === 0,
|
|
2567
|
+
onClick: v[41] || (v[41] = (i) => e(ce).reorder(-1))
|
|
2568
|
+
}, l(e(o).backward), 9, Oo),
|
|
2569
|
+
n("button", {
|
|
2570
|
+
type: "button",
|
|
2571
|
+
disabled: e(le) || e(pe)?.componentIndex === (e(w).template.pages[e(se)]?.components.length ?? 0) - 1,
|
|
2572
|
+
onClick: v[42] || (v[42] = (i) => e(ce).reorder(1))
|
|
2573
|
+
}, l(e(o).forward), 9, Uo)
|
|
2574
|
+
]),
|
|
2575
|
+
Q(_n, {
|
|
2576
|
+
component: e(ie),
|
|
2577
|
+
disabled: e(le),
|
|
2578
|
+
messages: e(o),
|
|
2579
|
+
onGeometry: e(ce).geometry,
|
|
2580
|
+
onPatch: e(ne)
|
|
2581
|
+
}, null, 8, ["component", "disabled", "messages", "onGeometry", "onPatch"]),
|
|
2582
|
+
e(ie).kind === "list" ? (h(), fe(Ln, {
|
|
2583
|
+
key: 0,
|
|
2584
|
+
list: e(ie),
|
|
2585
|
+
disabled: e(le),
|
|
2586
|
+
messages: e(o),
|
|
2587
|
+
onCommand: e(ot)
|
|
2588
|
+
}, null, 8, ["list", "disabled", "messages", "onCommand"])) : B("", !0)
|
|
2589
|
+
], 64)) : (h(), y("p", Jo, l(e(o).noComponent), 1))
|
|
2590
|
+
], 64)) : e($) === "template" ? (h(), y(U, { key: 2 }, [
|
|
2591
|
+
n("h3", null, l(e(o).templateDetails), 1),
|
|
2592
|
+
n("label", Ko, [
|
|
2593
|
+
P(l(e(o).name), 1),
|
|
1097
2594
|
n("input", {
|
|
1098
|
-
value: e(
|
|
1099
|
-
disabled:
|
|
1100
|
-
onInput:
|
|
1101
|
-
}, null, 40,
|
|
2595
|
+
value: e(w).name,
|
|
2596
|
+
disabled: t.readonly || e(I) || e(f),
|
|
2597
|
+
onInput: v[43] || (v[43] = (i) => e(d).setName(ge(i)))
|
|
2598
|
+
}, null, 40, Wo)
|
|
1102
2599
|
]),
|
|
1103
|
-
n("label",
|
|
1104
|
-
P(
|
|
2600
|
+
n("label", Xo, [
|
|
2601
|
+
P(l(e(o).description), 1),
|
|
1105
2602
|
n("textarea", {
|
|
1106
2603
|
rows: "2",
|
|
1107
|
-
value: e(
|
|
1108
|
-
disabled:
|
|
1109
|
-
onInput:
|
|
1110
|
-
}, null, 40,
|
|
2604
|
+
value: e(w).description,
|
|
2605
|
+
disabled: t.readonly || e(I) || e(f),
|
|
2606
|
+
onInput: v[44] || (v[44] = (i) => e(d).setDescription(ge(i)))
|
|
2607
|
+
}, null, 40, qo)
|
|
1111
2608
|
]),
|
|
1112
|
-
n("details",
|
|
1113
|
-
n("summary", null,
|
|
1114
|
-
n("dl",
|
|
1115
|
-
n("dt", null,
|
|
1116
|
-
n("dd", null,
|
|
1117
|
-
n("dt", null,
|
|
1118
|
-
n("dd", null,
|
|
2609
|
+
n("details", Yo, [
|
|
2610
|
+
n("summary", null, l(e(o).technicalDetails), 1),
|
|
2611
|
+
n("dl", Qo, [
|
|
2612
|
+
n("dt", null, l(e(o).templateIdentity), 1),
|
|
2613
|
+
n("dd", null, l(e(w).id), 1),
|
|
2614
|
+
n("dt", null, l(e(o).templateRevision), 1),
|
|
2615
|
+
n("dd", null, l(e(w).revision || e(o).unpublished), 1)
|
|
1119
2616
|
])
|
|
1120
2617
|
])
|
|
1121
|
-
], 64)) : (
|
|
1122
|
-
n("h3", null,
|
|
1123
|
-
n("label",
|
|
1124
|
-
P(
|
|
1125
|
-
|
|
1126
|
-
"onUpdate:modelValue":
|
|
2618
|
+
], 64)) : (h(), y(U, { key: 3 }, [
|
|
2619
|
+
n("h3", null, l(e(o).advancedTitle), 1),
|
|
2620
|
+
n("label", Zo, [
|
|
2621
|
+
P(l(e(o).json), 1),
|
|
2622
|
+
oe(n("textarea", {
|
|
2623
|
+
"onUpdate:modelValue": v[45] || (v[45] = (i) => Ce(x) ? x.value = i : null),
|
|
1127
2624
|
class: "mr-designer-json",
|
|
1128
|
-
"aria-label": e(
|
|
1129
|
-
disabled:
|
|
2625
|
+
"aria-label": e(o).json,
|
|
2626
|
+
disabled: t.readonly || e(I),
|
|
1130
2627
|
spellcheck: "false"
|
|
1131
|
-
}, null, 8,
|
|
1132
|
-
[
|
|
2628
|
+
}, null, 8, el), [
|
|
2629
|
+
[qe, e(x)]
|
|
1133
2630
|
])
|
|
1134
2631
|
]),
|
|
1135
2632
|
n("button", {
|
|
1136
2633
|
type: "button",
|
|
1137
2634
|
class: "mr-designer-apply-json",
|
|
1138
|
-
disabled:
|
|
1139
|
-
onClick:
|
|
1140
|
-
(...
|
|
1141
|
-
},
|
|
2635
|
+
disabled: t.readonly || e(I),
|
|
2636
|
+
onClick: v[46] || (v[46] = //@ts-ignore
|
|
2637
|
+
(...i) => e(d).applyJson && e(d).applyJson(...i))
|
|
2638
|
+
}, l(e(o).applyJson), 9, tl)
|
|
1142
2639
|
], 64)),
|
|
1143
|
-
e(
|
|
1144
|
-
], 10,
|
|
1145
|
-
]),
|
|
1146
|
-
|
|
2640
|
+
e(f) ? (h(), y("p", nl, l(e(o).jsonPending), 1)) : B("", !0)
|
|
2641
|
+
], 10, pa)
|
|
2642
|
+
])) : B("", !0),
|
|
2643
|
+
e($) !== "tools" ? (h(), y("div", {
|
|
2644
|
+
key: 2,
|
|
1147
2645
|
class: "mr-designer-preview",
|
|
1148
|
-
"aria-label": e(
|
|
2646
|
+
"aria-label": e(o).previewTitle
|
|
1149
2647
|
}, [
|
|
1150
|
-
e(
|
|
1151
|
-
e(
|
|
1152
|
-
(
|
|
1153
|
-
key:
|
|
1154
|
-
},
|
|
2648
|
+
e(G) ? (h(), y("div", ol, l(e(G)), 1)) : B("", !0),
|
|
2649
|
+
e(M).ok ? B("", !0) : (h(), y("ul", ll, [
|
|
2650
|
+
(h(!0), y(U, null, W(e(M).errors, (i) => (h(), y("li", {
|
|
2651
|
+
key: i.path
|
|
2652
|
+
}, l(i.path) + ":" + l(i.message), 1))), 128))
|
|
1155
2653
|
])),
|
|
1156
|
-
e(
|
|
2654
|
+
e(xe) === "design" && e(M).ok ? (h(), fe(Ot, {
|
|
1157
2655
|
key: 2,
|
|
2656
|
+
document: e(w),
|
|
2657
|
+
selection: e(pe),
|
|
2658
|
+
"page-index": e(se),
|
|
2659
|
+
datasets: t.datasets,
|
|
2660
|
+
disabled: e(le),
|
|
2661
|
+
messages: e(o),
|
|
2662
|
+
onSelect: e(N),
|
|
2663
|
+
onGeometry: e(ce).geometry,
|
|
2664
|
+
onColumn: e(q).activate,
|
|
2665
|
+
onWidth: v[47] || (v[47] = (i, O) => e(d).setColumn(i, "widthMm", String(O)))
|
|
2666
|
+
}, null, 8, ["document", "selection", "page-index", "datasets", "disabled", "messages", "onSelect", "onGeometry", "onColumn"])) : e(te) && e(M).ok ? (h(), fe(e(yt), {
|
|
2667
|
+
key: 3,
|
|
1158
2668
|
"report-id": "draft",
|
|
1159
|
-
fetcher: e(
|
|
2669
|
+
fetcher: e(te),
|
|
1160
2670
|
messages: {
|
|
1161
|
-
title: e(
|
|
1162
|
-
columnDirectory: e(
|
|
2671
|
+
title: e(o).previewTitle,
|
|
2672
|
+
columnDirectory: e(o).previewFieldDirectory
|
|
1163
2673
|
},
|
|
1164
2674
|
"show-params": !1,
|
|
1165
2675
|
editable: !1,
|
|
1166
2676
|
"excel-import": !1,
|
|
1167
2677
|
height: "100%"
|
|
1168
|
-
}, null, 8, ["fetcher", "messages"])) : (
|
|
1169
|
-
], 8,
|
|
1170
|
-
])
|
|
1171
|
-
], 8,
|
|
2678
|
+
}, null, 8, ["fetcher", "messages"])) : (h(), y("p", sl, l(e(o).invalid), 1))
|
|
2679
|
+
], 8, al)) : B("", !0)
|
|
2680
|
+
], 2)
|
|
2681
|
+
], 8, On));
|
|
1172
2682
|
}
|
|
1173
|
-
}),
|
|
2683
|
+
}), vl = /* @__PURE__ */ Ie(il, [["__scopeId", "data-v-9e22163e"]]), pl = {
|
|
2684
|
+
title: "变更与验收",
|
|
2685
|
+
run: "运行检查",
|
|
2686
|
+
running: "检查中…",
|
|
2687
|
+
samples: "验收样例",
|
|
2688
|
+
none: "仅检查结构",
|
|
2689
|
+
first20: "每个数据集前 20 行",
|
|
2690
|
+
first100: "每个数据集前 100 行",
|
|
2691
|
+
all: "全部当前数据(总计 ≤1000 行)",
|
|
2692
|
+
changes: "模板变更",
|
|
2693
|
+
issues: "待处理项",
|
|
2694
|
+
results: "样例结果",
|
|
2695
|
+
noChanges: "与基线一致",
|
|
2696
|
+
noIssues: "本次检查未发现问题",
|
|
2697
|
+
empty: "选择验收样例后运行,检查字段映射、排版与输出能力。",
|
|
2698
|
+
baseline: "未提供上一版本,仅检查当前模板。",
|
|
2699
|
+
errors: "错误",
|
|
2700
|
+
warnings: "提示",
|
|
2701
|
+
locate: "定位",
|
|
2702
|
+
before: "修改前",
|
|
2703
|
+
after: "修改后",
|
|
2704
|
+
breaking: "影响兼容性",
|
|
2705
|
+
acknowledge: "已确认字段与结构变更",
|
|
2706
|
+
truncated: "变更较多,仅展示前 500 项;兼容检查仍包含全部变更。",
|
|
2707
|
+
pages: "页",
|
|
2708
|
+
rows: "行",
|
|
2709
|
+
checked: "检查结果对应本次样例,不代替服务端发布权限与全量数据校验。",
|
|
2710
|
+
categories: { metadata: "信息", structure: "结构", binding: "字段", calculation: "计算", format: "样式" },
|
|
2711
|
+
kinds: { added: "新增", removed: "删除", modified: "修改", moved: "调序" }
|
|
2712
|
+
}, hl = {
|
|
2713
|
+
title: "Excel 业务绑定",
|
|
2714
|
+
intro: "保留模板版式,明确数据来源",
|
|
2715
|
+
upload: "选择 Excel 模板",
|
|
2716
|
+
replace: "更换文件",
|
|
2717
|
+
loading: "正在解析模板…",
|
|
2718
|
+
cancel: "取消解析",
|
|
2719
|
+
source: "原始模板",
|
|
2720
|
+
sourceHint: "点击行号选择,Shift 点击扩展;选择整行区域后标记用途。",
|
|
2721
|
+
sourceOnly: "来源样例仅供设计,应用时将全部替换为接口数据。",
|
|
2722
|
+
sheet: "工作表",
|
|
2723
|
+
dataset: "业务数据集",
|
|
2724
|
+
chooseDataset: "选择数据集契约",
|
|
2725
|
+
rowKey: "稳定业务主键",
|
|
2726
|
+
chooseRowKey: "选择业务主键",
|
|
2727
|
+
titleRegion: "标题",
|
|
2728
|
+
headerRegion: "多层表头",
|
|
2729
|
+
detailRegion: "样例明细",
|
|
2730
|
+
footerRegion: "静态尾页",
|
|
2731
|
+
optional: "可选",
|
|
2732
|
+
selectRegion: "标记选中行",
|
|
2733
|
+
clear: "清除",
|
|
2734
|
+
mapping: "逐列映射",
|
|
2735
|
+
coverage: "映射覆盖",
|
|
2736
|
+
physical: "Excel 列",
|
|
2737
|
+
business: "业务字段",
|
|
2738
|
+
chooseField: "选择已声明字段",
|
|
2739
|
+
selected: "已选行",
|
|
2740
|
+
previousRows: "上一组行",
|
|
2741
|
+
nextRows: "下一组行",
|
|
2742
|
+
previousColumns: "上一组列",
|
|
2743
|
+
nextColumns: "下一组列",
|
|
2744
|
+
rowStart: "预览起始行",
|
|
2745
|
+
columnStart: "预览起始列",
|
|
2746
|
+
apply: "校验并使用模板",
|
|
2747
|
+
check: "校验绑定",
|
|
2748
|
+
identity: "新模板",
|
|
2749
|
+
templateId: "模板标识",
|
|
2750
|
+
templateName: "模板名称",
|
|
2751
|
+
issues: "请先修正绑定",
|
|
2752
|
+
ready: "绑定校验通过",
|
|
2753
|
+
noSource: "导入 .xlsx,开始绑定业务数据",
|
|
2754
|
+
noContract: "请由接入方提供数据集字段契约,再配置业务绑定。",
|
|
2755
|
+
fieldType: "类型",
|
|
2756
|
+
precision: "位小数",
|
|
2757
|
+
sample: "契约样例",
|
|
2758
|
+
unnamed: "未标记",
|
|
2759
|
+
applied: "模板已生成,等待接入方确认",
|
|
2760
|
+
readonly: "当前只读",
|
|
2761
|
+
invalidFile: "请选择未加密的 .xlsx 文件",
|
|
2762
|
+
emptySelection: "请先在原始模板中选择行",
|
|
2763
|
+
footerHint: "静态尾页保留为独立页面,不随明细重复;不是每页页脚。",
|
|
2764
|
+
inspectWarning: "来源兼容性提示",
|
|
2765
|
+
session: "绑定会话可随草稿保存,再次传入即可恢复",
|
|
2766
|
+
decimals: "精确小数按原文本保留",
|
|
2767
|
+
selectionLabel: "选择源行",
|
|
2768
|
+
regionLegend: "区域用途",
|
|
2769
|
+
summary: "绑定摘要",
|
|
2770
|
+
stepSource: "选模板",
|
|
2771
|
+
stepRegions: "标区域",
|
|
2772
|
+
stepFields: "绑字段",
|
|
2773
|
+
stepValidate: "校验应用",
|
|
2774
|
+
errors: "项问题",
|
|
2775
|
+
sourceError: "模板解析失败",
|
|
2776
|
+
dimensions: "原始范围",
|
|
2777
|
+
mappedTo: "绑定到",
|
|
2778
|
+
sampleOnly: "仅契约样例",
|
|
2779
|
+
schemaOnly: "契约字段,不执行接口查询"
|
|
2780
|
+
}, gl = {
|
|
2781
|
+
detail: "主从",
|
|
2782
|
+
matrix: "矩阵",
|
|
2783
|
+
measureLabel: "显示名称",
|
|
2784
|
+
childDataset: "明细数据集",
|
|
2785
|
+
parentKey: "主表关联键",
|
|
2786
|
+
foreignKey: "明细外键",
|
|
2787
|
+
rowKey: "明细业务主键",
|
|
2788
|
+
noRowKey: "只读明细,不绑定编辑身份",
|
|
2789
|
+
childColumns: "明细展示字段",
|
|
2790
|
+
title: "明细标题",
|
|
2791
|
+
unmatched: "未关联明细",
|
|
2792
|
+
ignore: "显式忽略",
|
|
2793
|
+
childHeader: "展示明细表头",
|
|
2794
|
+
rowFields: "行维度",
|
|
2795
|
+
columnFields: "列维度",
|
|
2796
|
+
totals: "原始样本总计",
|
|
2797
|
+
widthSettings: "动态列宽 · mm",
|
|
2798
|
+
dimensionWidth: "维度列宽",
|
|
2799
|
+
measureWidth: "度量列宽",
|
|
2800
|
+
detailHint: "以业务键关联宿主提供的数据集。应用主从布局将替换矩阵配置。",
|
|
2801
|
+
matrixHint: "查询时按维度生成动态列。应用矩阵将替换普通分组、主从和总计;可撤销恢复。",
|
|
2802
|
+
computations: "计算",
|
|
2803
|
+
groups: "分组",
|
|
2804
|
+
conditions: "条件",
|
|
2805
|
+
target: "结果字段",
|
|
2806
|
+
newField: "新增计算字段",
|
|
2807
|
+
select: "选择字段",
|
|
2808
|
+
row: "当前行",
|
|
2809
|
+
group: "当前组",
|
|
2810
|
+
dataset: "整个数据集",
|
|
2811
|
+
scope: "计算范围",
|
|
2812
|
+
numeric: "数值模式",
|
|
2813
|
+
number: "普通数值",
|
|
2814
|
+
decimal: "精确小数",
|
|
2815
|
+
digits: "小数位",
|
|
2816
|
+
groupFields: "分组依据",
|
|
2817
|
+
field: "字段",
|
|
2818
|
+
constant: "常量",
|
|
2819
|
+
operation: "运算",
|
|
2820
|
+
aggregate: "聚合",
|
|
2821
|
+
text: "文本",
|
|
2822
|
+
boolean: "布尔",
|
|
2823
|
+
null: "空值",
|
|
2824
|
+
true: "是",
|
|
2825
|
+
false: "否",
|
|
2826
|
+
add: "相加",
|
|
2827
|
+
subtract: "相减",
|
|
2828
|
+
multiply: "相乘",
|
|
2829
|
+
divide: "相除",
|
|
2830
|
+
coalesce: "首个非空值",
|
|
2831
|
+
sum: "求和",
|
|
2832
|
+
count: "计数",
|
|
2833
|
+
avg: "平均值",
|
|
2834
|
+
min: "最小值",
|
|
2835
|
+
max: "最大值",
|
|
2836
|
+
weightedAvg: "加权平均",
|
|
2837
|
+
subtotalLabel: "小计",
|
|
2838
|
+
weight: "权重字段",
|
|
2839
|
+
argument: "参数",
|
|
2840
|
+
addArgument: "添加参数",
|
|
2841
|
+
remove: "移除",
|
|
2842
|
+
apply: "应用规则",
|
|
2843
|
+
check: "样例验算",
|
|
2844
|
+
addGroup: "添加分组",
|
|
2845
|
+
noGroups: "尚未配置分组",
|
|
2846
|
+
header: "组头模板",
|
|
2847
|
+
footer: "组尾标签",
|
|
2848
|
+
repeat: "跨页重复组头",
|
|
2849
|
+
orphan: "组头与首行保持同页",
|
|
2850
|
+
outer: "外层",
|
|
2851
|
+
inner: "内层",
|
|
2852
|
+
addAggregate: "添加聚合",
|
|
2853
|
+
measure: "度量字段",
|
|
2854
|
+
output: "输出字段",
|
|
2855
|
+
condition: "条件字段",
|
|
2856
|
+
comparison: "比较方式",
|
|
2857
|
+
threshold: "比较值",
|
|
2858
|
+
effect: "效果",
|
|
2859
|
+
style: "条件样式",
|
|
2860
|
+
cell: "单元格可见",
|
|
2861
|
+
rowVisibility: "明细行可见",
|
|
2862
|
+
color: "文字颜色",
|
|
2863
|
+
background: "背景颜色",
|
|
2864
|
+
bold: "加粗",
|
|
2865
|
+
column: "目标列",
|
|
2866
|
+
newCondition: "新增条件样式",
|
|
2867
|
+
removeCondition: "移除此规则",
|
|
2868
|
+
advanced: "计算边界",
|
|
2869
|
+
nulls: "空值处理",
|
|
2870
|
+
propagate: "保留为空",
|
|
2871
|
+
error: "报告错误",
|
|
2872
|
+
division: "除零处理",
|
|
2873
|
+
dependencies: "计算顺序",
|
|
2874
|
+
noData: "尚无样例数据",
|
|
2875
|
+
sample: "样例前 1000 行 · 仅验算,不修改来源",
|
|
2876
|
+
preview: "计算结果",
|
|
2877
|
+
existing: "已有规则",
|
|
2878
|
+
ready: "规则已通过结构校验",
|
|
2879
|
+
allRows: "全部行",
|
|
2880
|
+
noFields: "当前数据集尚无字段",
|
|
2881
|
+
resultType: "常量类型",
|
|
2882
|
+
settings: "规则设置",
|
|
2883
|
+
moveUp: "向外移动",
|
|
2884
|
+
moveDown: "向内移动",
|
|
2885
|
+
missingTarget: "请选择或填写结果字段",
|
|
2886
|
+
noSelection: "请先选择列",
|
|
2887
|
+
countHint: "留空度量字段可统计行数",
|
|
2888
|
+
decimalHint: "精确小数以文本保存,避免大数精度丢失。",
|
|
2889
|
+
readonly: "只读",
|
|
2890
|
+
formatMode: "条件规则",
|
|
2891
|
+
rule: "规则",
|
|
2892
|
+
sampleError: "验算未通过",
|
|
2893
|
+
new: "新增",
|
|
2894
|
+
enabled: "启用"
|
|
2895
|
+
}, fl = Me(() => import("./TemplateReviewPanel-Cn32OY4_.js")), bl = Me(() => import("./ExcelBindingWizard-RLJIXKKG.js")), yl = Me(() => import("./RuleEditor-CtJFzKuY.js"));
|
|
1174
2896
|
export {
|
|
1175
|
-
|
|
1176
|
-
|
|
2897
|
+
hl as EXCEL_BINDING_MESSAGES,
|
|
2898
|
+
bl as ExcelBindingWizard,
|
|
2899
|
+
gl as RULE_EDITOR_MESSAGES,
|
|
2900
|
+
vl as ReportTemplateEditor,
|
|
2901
|
+
yl as RuleEditor,
|
|
2902
|
+
Pe as TEMPLATE_EDITOR_MESSAGES,
|
|
2903
|
+
pl as TEMPLATE_REVIEW_MESSAGES,
|
|
2904
|
+
fl as TemplateReviewPanel
|
|
1177
2905
|
};
|