@agile-team/mach-report 2.11.0 → 2.11.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 +3 -3
- package/dist/ExcelBindingWizard-LWX6G1A2.js +1465 -0
- package/dist/ExcelBindingWizard-a4kslPHF.cjs +1 -0
- package/dist/ParamEditor-BLaE5q5W.js +522 -0
- package/dist/ParamEditor-MBBC7lUE.cjs +1 -0
- package/dist/ReportBatchPanel-B5ClP9tm.js +350 -0
- package/dist/ReportBatchPanel-Dc-SDkYA.cjs +1 -0
- package/dist/ReportTemplateLibrary-5fk5CQBO.cjs +1 -0
- package/dist/ReportTemplateLibrary-BZB-XWjj.js +311 -0
- package/dist/designer.cjs +2 -2
- package/dist/designer.d.cts +73 -2
- package/dist/designer.d.ts +73 -2
- package/dist/designer.js +1509 -1407
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +19 -5
- package/dist/index.d.ts +19 -5
- package/dist/index.js +502 -494
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-CjIiVox-.cjs +0 -1
- package/dist/ExcelBindingWizard-Dxm-K5HL.js +0 -1240
- package/dist/ParamEditor-D-Hf5xfO.cjs +0 -1
- package/dist/ParamEditor-DRGxzxeO.js +0 -381
- package/dist/ReportBatchPanel-BYgg0EDB.cjs +0 -1
- package/dist/ReportBatchPanel-Bby5yLzU.js +0 -287
- package/dist/ReportTemplateLibrary-C6CO7YCT.cjs +0 -1
- package/dist/ReportTemplateLibrary-DfzDXRvr.js +0 -260
package/dist/designer.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { provideMachReportConfig as
|
|
3
|
-
import { resolveGridLayout as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { r as
|
|
6
|
-
import { c as
|
|
7
|
-
import { r as
|
|
8
|
-
function
|
|
9
|
-
if (!t.tree) return
|
|
10
|
-
if (
|
|
1
|
+
import { ref as z, computed as F, watch as ee, onMounted as pt, onBeforeUnmount as Le, nextTick as ce, defineComponent as Ge, openBlock as g, createElementBlock as b, createElementVNode as a, toDisplayString as l, unref as e, createTextVNode as O, withDirectives as ue, isRef as Ve, createCommentVNode as N, vModelSelect as He, normalizeStyle as be, Fragment as q, renderList as Q, normalizeClass as Pe, withModifiers as gt, createVNode as le, shallowRef as ht, defineAsyncComponent as ge, getCurrentInstance as $t, withKeys as Ze, createBlock as Me, vShow as Ae, vModelText as ut } from "vue";
|
|
2
|
+
import { provideMachReportConfig as Et, createLocalFetcher as Rt, ReportPreview as Tt } from "@agile-team/mach-report/vue";
|
|
3
|
+
import { resolveGridLayout as Se, parseReportTemplate as ae, serializeReportTemplate as ke, validateReportTemplateDocument as ct } from "@agile-team/mach-report";
|
|
4
|
+
import { _ as Fe, a as re } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
5
|
+
import { r as Lt, a as Dt, b as At } from "./list-cell-ClFra1zS.js";
|
|
6
|
+
import { c as Pt } from "./tree-CqcQ99NM.js";
|
|
7
|
+
import { r as je } from "./style-CQ1PK8ZB.js";
|
|
8
|
+
function Ht(t, c, i = 3) {
|
|
9
|
+
if (!t.tree) return c.slice(0, i).map((s) => t.columns.map((o) => Lt(t, o, s)));
|
|
10
|
+
if (c.length > 200) return [];
|
|
11
11
|
try {
|
|
12
|
-
return
|
|
12
|
+
return Pt(c, { ...t.tree, maxRows: Math.min(200, t.tree.maxRows ?? 200), maxAggregationVisits: Math.min(2e3, t.tree.maxAggregationVisits ?? 2e3) }, { computed: t.computed?.length ? { fields: t.computed, maxRows: 200, maxCells: 4096 } : void 0 }).entries.slice(0, i).map((o) => t.columns.map((p) => Dt(t, p, o)));
|
|
13
13
|
} catch {
|
|
14
14
|
return [];
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
17
|
+
const et = 96 / 25.4;
|
|
18
|
+
function at(t) {
|
|
19
19
|
return t.kind === "list" ? Math.max(
|
|
20
20
|
16,
|
|
21
21
|
(t.headerGrid?.rowHeightsMm?.reduce(
|
|
22
|
-
(
|
|
22
|
+
(c, i) => c + i,
|
|
23
23
|
0
|
|
24
24
|
) ?? 8) + (t.rowHeightMm ?? 8) * 3
|
|
25
25
|
) : t.heightMm;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function ye(t) {
|
|
28
28
|
return {
|
|
29
29
|
leftMm: t.leftMm,
|
|
30
30
|
topMm: t.topMm,
|
|
31
31
|
widthMm: t.widthMm,
|
|
32
|
-
heightMm:
|
|
32
|
+
heightMm: at(t)
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function Te(t, c) {
|
|
36
|
+
return c ? t.template.pages[c.pageIndex]?.components[c.componentIndex] : void 0;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Gt(t, c = "detail") {
|
|
39
39
|
const i = { leftMm: 10, topMm: 10, widthMm: 60, heightMm: 10 };
|
|
40
40
|
return t === "list" ? {
|
|
41
41
|
kind: t,
|
|
42
42
|
leftMm: 10,
|
|
43
43
|
topMm: 30,
|
|
44
44
|
widthMm: 90,
|
|
45
|
-
dataset:
|
|
45
|
+
dataset: c,
|
|
46
46
|
columns: [
|
|
47
47
|
{ header: "字段", field: "field", widthMm: 45 },
|
|
48
48
|
{ header: "数值", field: "value", widthMm: 45 }
|
|
@@ -71,27 +71,27 @@ function Tt(t, d = "detail") {
|
|
|
71
71
|
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>')}`
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
const s = Math.max(2, Math.min(
|
|
74
|
+
function tt(t, c, i = !1) {
|
|
75
|
+
const s = Math.max(2, Math.min(c.widthMm, t.widthMm)), o = Math.max(2, Math.min(c.heightMm, t.heightMm));
|
|
76
76
|
return {
|
|
77
|
-
leftMm: Math.max(0, Math.min(
|
|
77
|
+
leftMm: Math.max(0, Math.min(c.widthMm - s, t.leftMm)),
|
|
78
78
|
topMm: Math.max(
|
|
79
79
|
0,
|
|
80
|
-
Math.min(
|
|
80
|
+
Math.min(c.heightMm - (i ? 2 : o), t.topMm)
|
|
81
81
|
),
|
|
82
82
|
widthMm: s,
|
|
83
83
|
heightMm: o
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Ue(t, c) {
|
|
87
87
|
const i = t.widthMm;
|
|
88
88
|
if (Object.assign(t, {
|
|
89
|
-
leftMm:
|
|
90
|
-
topMm:
|
|
91
|
-
widthMm:
|
|
92
|
-
}), t.kind !== "list") t.heightMm =
|
|
93
|
-
else if (i > 0 &&
|
|
94
|
-
const s =
|
|
89
|
+
leftMm: c.leftMm,
|
|
90
|
+
topMm: c.topMm,
|
|
91
|
+
widthMm: c.widthMm
|
|
92
|
+
}), t.kind !== "list") t.heightMm = c.heightMm;
|
|
93
|
+
else if (i > 0 && c.widthMm !== i) {
|
|
94
|
+
const s = c.widthMm / i;
|
|
95
95
|
t.columns.forEach((o) => {
|
|
96
96
|
o.widthMm = Math.round(o.widthMm * s * 100) / 100;
|
|
97
97
|
}), t.widthMm = t.columns.reduce(
|
|
@@ -102,235 +102,235 @@ function je(t, d) {
|
|
|
102
102
|
));
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
if (
|
|
105
|
+
function Ft(t, c, i) {
|
|
106
|
+
if (c === i || !t.columns[c] || !t.columns[i]) return !1;
|
|
107
107
|
if (t.headerGrid) {
|
|
108
|
-
if (
|
|
108
|
+
if (Se(t.headerGrid, t.widthMm, 100).cells.some(({ cell: p }) => (p.colSpan ?? 1) > 1))
|
|
109
109
|
throw new Error("请先拆分跨列合并表头,再调整列顺序,避免改变业务分组。");
|
|
110
110
|
const o = We(t);
|
|
111
111
|
o.forEach((p) => {
|
|
112
|
-
p.splice(i, 0, p.splice(
|
|
113
|
-
}), t.headerGrid =
|
|
112
|
+
p.splice(i, 0, p.splice(c, 1)[0]);
|
|
113
|
+
}), t.headerGrid = Ke(
|
|
114
114
|
o,
|
|
115
115
|
t.columns.map((p) => p.widthMm),
|
|
116
116
|
t.headerGrid.rowHeightsMm ?? o.map(() => 8)
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
|
-
return t.columns.splice(i, 0, t.columns.splice(
|
|
119
|
+
return t.columns.splice(i, 0, t.columns.splice(c, 1)[0]), t.headerGrid && (t.headerGrid.colWidthsMm = t.columns.map((s) => s.widthMm)), !0;
|
|
120
120
|
}
|
|
121
121
|
function We(t) {
|
|
122
122
|
if (!t.headerGrid)
|
|
123
123
|
return [t.columns.map((i) => ({ text: i.header }))];
|
|
124
|
-
const
|
|
124
|
+
const c = Array.from(
|
|
125
125
|
{ length: t.headerGrid.cells.length },
|
|
126
126
|
() => Array.from({ length: t.columns.length }, () => null)
|
|
127
127
|
);
|
|
128
|
-
for (const { cell: i, ri: s, ci: o } of
|
|
128
|
+
for (const { cell: i, ri: s, ci: o } of Se(
|
|
129
129
|
t.headerGrid,
|
|
130
130
|
t.widthMm,
|
|
131
131
|
100
|
|
132
132
|
).cells)
|
|
133
|
-
|
|
134
|
-
return
|
|
133
|
+
c[s][o] = i;
|
|
134
|
+
return c;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Ke(t, c, i) {
|
|
137
137
|
const s = /* @__PURE__ */ new Set();
|
|
138
138
|
return { cells: t.map(
|
|
139
|
-
(p,
|
|
140
|
-
if (s.has(`${
|
|
141
|
-
if (!
|
|
142
|
-
for (let m =
|
|
143
|
-
for (let
|
|
144
|
-
(m !==
|
|
145
|
-
return [
|
|
139
|
+
(p, h) => p.flatMap((M, f) => {
|
|
140
|
+
if (s.has(`${h}:${f}`)) return [];
|
|
141
|
+
if (!M) return [null];
|
|
142
|
+
for (let m = h; m < h + (M.rowSpan ?? 1); m++)
|
|
143
|
+
for (let y = f; y < f + (M.colSpan ?? 1); y++)
|
|
144
|
+
(m !== h || y !== f) && s.add(`${m}:${y}`);
|
|
145
|
+
return [M];
|
|
146
146
|
})
|
|
147
|
-
), colWidthsMm:
|
|
147
|
+
), colWidthsMm: c, rowHeightsMm: i };
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
const
|
|
151
|
-
|
|
149
|
+
function Nt(t) {
|
|
150
|
+
const c = We(t), i = t.headerGrid?.rowHeightsMm ?? c.map(() => 8);
|
|
151
|
+
c.unshift(
|
|
152
152
|
t.columns.map(() => ({
|
|
153
153
|
text: "分组",
|
|
154
154
|
style: { align: "center", backgroundColor: "#eaf2fc", bold: !0 }
|
|
155
155
|
}))
|
|
156
|
-
), t.headerGrid =
|
|
157
|
-
|
|
156
|
+
), t.headerGrid = Ke(
|
|
157
|
+
c,
|
|
158
158
|
t.columns.map((s) => s.widthMm),
|
|
159
159
|
[8, ...i]
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function zt(t, c, i, s) {
|
|
163
163
|
if (i >= s || i < 0 || s >= t.columns.length)
|
|
164
164
|
throw new Error("请选择同一行的至少两个连续表头。");
|
|
165
|
-
const o = We(t), p = o[
|
|
165
|
+
const o = We(t), p = o[c];
|
|
166
166
|
if (!p) throw new Error("表头行不存在。");
|
|
167
|
-
const
|
|
168
|
-
if (
|
|
167
|
+
const h = p.slice(i, s + 1);
|
|
168
|
+
if (h.some(
|
|
169
169
|
(f) => !f || (f.colSpan ?? 1) !== 1 || (f.rowSpan ?? 1) !== 1
|
|
170
170
|
))
|
|
171
171
|
throw new Error("选择包含合并区域,请先拆分,再重新合并。");
|
|
172
|
-
const
|
|
173
|
-
p[i] = { ...
|
|
172
|
+
const M = h[0];
|
|
173
|
+
p[i] = { ...M, colSpan: s - i + 1 };
|
|
174
174
|
for (let f = i + 1; f <= s; f++) p[f] = null;
|
|
175
|
-
t.headerGrid =
|
|
175
|
+
t.headerGrid = Ke(
|
|
176
176
|
o,
|
|
177
177
|
t.columns.map((f) => f.widthMm),
|
|
178
178
|
t.headerGrid?.rowHeightsMm ?? [8]
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Ot(t, c, i) {
|
|
182
182
|
if (!t.headerGrid) return;
|
|
183
|
-
const o =
|
|
184
|
-
({ ri: m, ci:
|
|
183
|
+
const o = Se(t.headerGrid, t.widthMm, 100).cells.find(
|
|
184
|
+
({ ri: m, ci: y, cell: A }) => c >= m && c < m + (A.rowSpan ?? 1) && i >= y && i < y + (A.colSpan ?? 1)
|
|
185
185
|
);
|
|
186
186
|
if (!o) return;
|
|
187
|
-
const p = We(t), { ri:
|
|
188
|
-
for (let m =
|
|
189
|
-
for (let
|
|
190
|
-
const
|
|
187
|
+
const p = We(t), { ri: h, ci: M, cell: f } = o;
|
|
188
|
+
for (let m = h; m < h + (f.rowSpan ?? 1); m++)
|
|
189
|
+
for (let y = M; y < M + (f.colSpan ?? 1); y++) {
|
|
190
|
+
const A = {
|
|
191
191
|
...f,
|
|
192
|
-
text: m === p.length - 1 ? t.columns[
|
|
192
|
+
text: m === p.length - 1 ? t.columns[y].header : f.text
|
|
193
193
|
};
|
|
194
|
-
delete
|
|
194
|
+
delete A.colSpan, delete A.rowSpan, p[m][y] = A;
|
|
195
195
|
}
|
|
196
|
-
t.headerGrid =
|
|
196
|
+
t.headerGrid = Ke(
|
|
197
197
|
p,
|
|
198
198
|
t.columns.map((m) => m.widthMm),
|
|
199
199
|
t.headerGrid.rowHeightsMm ?? p.map(() => 8)
|
|
200
200
|
);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
const
|
|
202
|
+
function Bt(t) {
|
|
203
|
+
const c = z(), i = z(0.8), s = z(0), o = z(0), p = F(() => i.value * et), h = F(() => t.document.template.pages[t.pageIndex]), M = F(() => h.value.widthMm * p.value > o.value - 40);
|
|
204
204
|
let f;
|
|
205
205
|
function m(I) {
|
|
206
|
-
const v =
|
|
206
|
+
const v = c.value;
|
|
207
207
|
if (!v) return;
|
|
208
|
-
let
|
|
209
|
-
const
|
|
210
|
-
I === "selection" &&
|
|
211
|
-
const
|
|
212
|
-
i.value = Math.max(0.05, Math.min(2, I === "width" ?
|
|
213
|
-
v.scrollLeft =
|
|
208
|
+
let d = { leftMm: 0, topMm: 0, widthMm: h.value.widthMm, heightMm: h.value.heightMm };
|
|
209
|
+
const C = t.selection?.pageIndex === t.pageIndex ? h.value.components[t.selection.componentIndex] : void 0;
|
|
210
|
+
I === "selection" && C && (d = ye(C));
|
|
211
|
+
const S = (v.clientWidth - 40) / (d.widthMm * et), R = (v.clientHeight - 40) / (d.heightMm * et);
|
|
212
|
+
i.value = Math.max(0.05, Math.min(2, I === "width" ? S : Math.min(S, R))), ce(() => {
|
|
213
|
+
v.scrollLeft = d.leftMm * p.value, v.scrollTop = d.topMm * p.value;
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
const I =
|
|
216
|
+
function y() {
|
|
217
|
+
const I = c.value;
|
|
218
218
|
I && (o.value = I.clientWidth, s.value = I.scrollWidth > I.clientWidth ? Math.round(I.scrollLeft / (I.scrollWidth - I.clientWidth) * 100) : 0);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
const v =
|
|
220
|
+
function A(I) {
|
|
221
|
+
const v = c.value;
|
|
222
222
|
v && (v.scrollLeft = (v.scrollWidth - v.clientWidth) * I / 100), s.value = I;
|
|
223
223
|
}
|
|
224
|
-
async function
|
|
225
|
-
await
|
|
226
|
-
const I =
|
|
224
|
+
async function T() {
|
|
225
|
+
await ce();
|
|
226
|
+
const I = c.value, v = t.selection;
|
|
227
227
|
if (!I || v?.pageIndex !== t.pageIndex) return;
|
|
228
|
-
const
|
|
229
|
-
if (!
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
const
|
|
233
|
-
|
|
228
|
+
const d = h.value.components[v.componentIndex];
|
|
229
|
+
if (!d) return;
|
|
230
|
+
const C = ye(d);
|
|
231
|
+
if (d.kind === "list" && t.columnIndex !== void 0 && t.columnIndex >= 0) {
|
|
232
|
+
const E = d;
|
|
233
|
+
C.leftMm += E.columns.slice(0, t.columnIndex).reduce((D, H) => D + H.widthMm, 0), C.widthMm = E.columns[t.columnIndex]?.widthMm ?? C.widthMm;
|
|
234
234
|
}
|
|
235
|
-
const
|
|
236
|
-
|
|
235
|
+
const S = C.leftMm * p.value, R = C.topMm * p.value, w = S + C.widthMm * p.value, _ = R + C.heightMm * p.value;
|
|
236
|
+
S < I.scrollLeft ? I.scrollLeft = S : w > I.scrollLeft + I.clientWidth - 40 && (I.scrollLeft = Math.max(0, Math.min(S, w - I.clientWidth + 40))), R < I.scrollTop ? I.scrollTop = R : _ > I.scrollTop + I.clientHeight - 40 && (I.scrollTop = Math.max(0, Math.min(R, _ - I.clientHeight + 40))), y();
|
|
237
237
|
}
|
|
238
238
|
return ee(() => [t.selection, t.columnIndex, t.pageIndex], () => {
|
|
239
|
-
|
|
240
|
-
}),
|
|
241
|
-
|
|
242
|
-
}),
|
|
239
|
+
T();
|
|
240
|
+
}), pt(() => {
|
|
241
|
+
y(), typeof ResizeObserver < "u" && c.value && (f = new ResizeObserver(y), f.observe(c.value));
|
|
242
|
+
}), Le(() => f?.disconnect()), { viewport: c, zoom: i, scale: p, page: h, wide: M, fraction: s, fit: m, sync: y, navigate: A };
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
const s = t.filter((o) => o !==
|
|
246
|
-
const p = o[i],
|
|
247
|
-
return [p, p +
|
|
244
|
+
function mt(t, c, i) {
|
|
245
|
+
const s = t.filter((o) => o !== c).flatMap((o) => {
|
|
246
|
+
const p = o[i], h = i === "leftMm" ? o.widthMm : at(o);
|
|
247
|
+
return [p, p + h / 2, p + h];
|
|
248
248
|
});
|
|
249
249
|
return [...new Set(s)].sort((o, p) => o - p);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Vt(t, c) {
|
|
252
252
|
if (!t.length) return;
|
|
253
253
|
let i = 0, s = t.length;
|
|
254
254
|
for (; i < s; ) {
|
|
255
|
-
const
|
|
256
|
-
t[
|
|
255
|
+
const h = i + s >>> 1;
|
|
256
|
+
t[h] < c ? i = h + 1 : s = h;
|
|
257
257
|
}
|
|
258
258
|
const o = t[Math.max(0, i - 1)], p = t[Math.min(t.length - 1, i)];
|
|
259
|
-
return Math.abs(o -
|
|
259
|
+
return Math.abs(o - c) < Math.abs(p - c) ? o : p;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function vt(t, c, i, s) {
|
|
262
262
|
let o = 1 / 0, p = {
|
|
263
263
|
value: Math.round(t * 2) / 2
|
|
264
264
|
};
|
|
265
|
-
for (const
|
|
266
|
-
const
|
|
267
|
-
if (
|
|
268
|
-
const f = Math.abs(
|
|
269
|
-
f <= s && f < o && (o = f, p = { value:
|
|
265
|
+
for (const h of [0, c / 2, c]) {
|
|
266
|
+
const M = Vt(i, t + h);
|
|
267
|
+
if (M === void 0) continue;
|
|
268
|
+
const f = Math.abs(M - t - h);
|
|
269
|
+
f <= s && f < o && (o = f, p = { value: M - h, guide: M });
|
|
270
270
|
}
|
|
271
271
|
return p;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
let
|
|
273
|
+
function jt(t) {
|
|
274
|
+
let c;
|
|
275
275
|
function i(s, o, p = !1) {
|
|
276
276
|
if (t.disabled() || s.button !== 0) return;
|
|
277
|
-
s.preventDefault(), s.stopPropagation(),
|
|
278
|
-
const
|
|
277
|
+
s.preventDefault(), s.stopPropagation(), c?.();
|
|
278
|
+
const h = s.currentTarget.closest(
|
|
279
279
|
"[data-canvas-component]"
|
|
280
|
-
),
|
|
281
|
-
let
|
|
282
|
-
const
|
|
283
|
-
let v,
|
|
284
|
-
const
|
|
285
|
-
for (const [G,
|
|
280
|
+
), M = ye(o), f = s.clientX, m = s.clientY;
|
|
281
|
+
let y = M, A = 0;
|
|
282
|
+
const T = t.scale.value, I = h.parentElement;
|
|
283
|
+
let v, d;
|
|
284
|
+
const C = () => {
|
|
285
|
+
for (const [G, U] of [
|
|
286
286
|
["x", v],
|
|
287
|
-
["y",
|
|
287
|
+
["y", d]
|
|
288
288
|
])
|
|
289
289
|
I.style.setProperty(
|
|
290
290
|
`--mr-canvas-guide-${G}-display`,
|
|
291
|
-
|
|
292
|
-
),
|
|
291
|
+
U === void 0 ? "none" : "block"
|
|
292
|
+
), U !== void 0 && I.style.setProperty(
|
|
293
293
|
`--mr-canvas-guide-${G}`,
|
|
294
|
-
`${
|
|
294
|
+
`${U * T}px`
|
|
295
295
|
);
|
|
296
|
-
},
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
leftMm:
|
|
300
|
-
topMm:
|
|
301
|
-
},
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
5 /
|
|
307
|
-
), n =
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
5 /
|
|
296
|
+
}, S = () => {
|
|
297
|
+
A = 0, C(), h.style.left = `${y.leftMm * T}px`, h.style.top = `${y.topMm * T}px`, h.style.width = `${y.widthMm * T}px`, h.style.height = `${y.heightMm * T}px`;
|
|
298
|
+
}, R = {
|
|
299
|
+
leftMm: mt(t.page().components, o, "leftMm"),
|
|
300
|
+
topMm: mt(t.page().components, o, "topMm")
|
|
301
|
+
}, w = (G) => {
|
|
302
|
+
const U = (G.clientX - f) / T, X = (G.clientY - m) / T, te = vt(
|
|
303
|
+
M.leftMm + U,
|
|
304
|
+
M.widthMm,
|
|
305
|
+
R.leftMm,
|
|
306
|
+
5 / T
|
|
307
|
+
), n = vt(
|
|
308
|
+
M.topMm + X,
|
|
309
|
+
M.heightMm,
|
|
310
|
+
R.topMm,
|
|
311
|
+
5 / T
|
|
312
312
|
);
|
|
313
|
-
v = p ? void 0 :
|
|
313
|
+
v = p ? void 0 : te.guide, d = p ? void 0 : n.guide, y = tt(
|
|
314
314
|
p ? {
|
|
315
|
-
...
|
|
316
|
-
widthMm: Math.round((
|
|
317
|
-
heightMm: Math.round((
|
|
318
|
-
} : { ...
|
|
315
|
+
...M,
|
|
316
|
+
widthMm: Math.round((M.widthMm + U) * 2) / 2,
|
|
317
|
+
heightMm: Math.round((M.heightMm + X) * 2) / 2
|
|
318
|
+
} : { ...M, leftMm: te.value, topMm: n.value },
|
|
319
319
|
t.page(),
|
|
320
320
|
o.kind === "list"
|
|
321
|
-
),
|
|
321
|
+
), A || (A = requestAnimationFrame(S));
|
|
322
322
|
}, _ = (G) => {
|
|
323
|
-
window.removeEventListener("pointermove",
|
|
324
|
-
},
|
|
323
|
+
window.removeEventListener("pointermove", w), window.removeEventListener("pointerup", E), window.removeEventListener("pointercancel", D), window.removeEventListener("keydown", H), A && cancelAnimationFrame(A), y = G ? y : M, v = void 0, d = void 0, S(), c = void 0, G && JSON.stringify(y) !== JSON.stringify(M) && t.commit(y);
|
|
324
|
+
}, E = () => _(!0), D = () => _(!1), H = (G) => {
|
|
325
325
|
G.key === "Escape" && (G.preventDefault(), D());
|
|
326
326
|
};
|
|
327
|
-
window.addEventListener("pointermove",
|
|
327
|
+
window.addEventListener("pointermove", w), window.addEventListener("pointerup", E), window.addEventListener("pointercancel", D), window.addEventListener("keydown", H), c = D;
|
|
328
328
|
}
|
|
329
329
|
return ee(t.disabled, (s) => {
|
|
330
|
-
s &&
|
|
331
|
-
}), ee(t.page, () =>
|
|
330
|
+
s && c?.();
|
|
331
|
+
}), ee(t.page, () => c?.()), Le(() => c?.()), { start: i };
|
|
332
332
|
}
|
|
333
|
-
const
|
|
333
|
+
const Ut = {
|
|
334
334
|
title: "报表模板设计器",
|
|
335
335
|
heading: "模板设计",
|
|
336
336
|
unpublished: "未发布",
|
|
@@ -363,7 +363,7 @@ const Ot = {
|
|
|
363
363
|
applyJson: "校验并应用 JSON",
|
|
364
364
|
note: "字段映射应与数据源契约一致。此编辑器维护模板属性;保存由接入方提供的版本服务处理。",
|
|
365
365
|
invalid: "请先修正模板错误,再预览或保存。"
|
|
366
|
-
},
|
|
366
|
+
}, Wt = {
|
|
367
367
|
repeatPage: "每页重复",
|
|
368
368
|
repeatNone: "不重复",
|
|
369
369
|
repeatHeader: "页眉",
|
|
@@ -424,6 +424,15 @@ const Ot = {
|
|
|
424
424
|
rulesTool: "计算与规则",
|
|
425
425
|
reviewTool: "发布检查",
|
|
426
426
|
toolsDescription: "按需绑定数据、定义规则并验证模板。",
|
|
427
|
+
unapplied: "待应用",
|
|
428
|
+
pendingToolsLabel: "待处理配置",
|
|
429
|
+
pendingToolsHint: "应用或恢复后可保存",
|
|
430
|
+
saveReadonly: "当前为只读,无法保存",
|
|
431
|
+
saveConfirmation: "请先处理修改确认",
|
|
432
|
+
saveUnchanged: "没有需要保存的修改",
|
|
433
|
+
saveInvalid: "模板有错误,请先修正",
|
|
434
|
+
saveJsonPending: "完整 JSON 待应用",
|
|
435
|
+
returnToConfiguration: "返回配置",
|
|
427
436
|
rulesNeedList: "请先在字段区域选择明细表。",
|
|
428
437
|
undo: "撤销",
|
|
429
438
|
redo: "重做",
|
|
@@ -466,7 +475,7 @@ const Ot = {
|
|
|
466
475
|
technicalDetails: "标识与修订",
|
|
467
476
|
fieldPosition: "当前字段",
|
|
468
477
|
previewFieldDirectory: "定位字段"
|
|
469
|
-
},
|
|
478
|
+
}, Je = {
|
|
470
479
|
fitWidth: "适宽",
|
|
471
480
|
fitPage: "适页",
|
|
472
481
|
fitSelection: "选区",
|
|
@@ -484,24 +493,24 @@ const Ot = {
|
|
|
484
493
|
unlockSelection: "解锁位置",
|
|
485
494
|
sessionLock: "位置锁定仅当前设计会话有效。",
|
|
486
495
|
toolsPending: "工具中还有未应用的配置,请先应用或恢复后再保存模板。",
|
|
487
|
-
...
|
|
488
|
-
...
|
|
489
|
-
},
|
|
496
|
+
...Ut,
|
|
497
|
+
...Wt
|
|
498
|
+
}, Kt = { class: "mr-canvas" }, Jt = { class: "mr-canvas-heading" }, qt = { class: "mr-canvas-view-tools" }, Xt = ["disabled"], Yt = ["aria-label"], Qt = ["value"], Zt = ["data-canvas-component", "aria-label", "aria-pressed", "tabindex", "onFocus", "onPointerdown", "onClick", "onKeydown"], en = { class: "mr-canvas-table" }, tn = {
|
|
490
499
|
key: 1,
|
|
491
500
|
class: "mr-canvas-table-row is-header"
|
|
492
|
-
},
|
|
501
|
+
}, nn = ["onPointerdown"], an = {
|
|
493
502
|
key: 2,
|
|
494
503
|
class: "mr-canvas-placeholder"
|
|
495
|
-
},
|
|
504
|
+
}, on = ["aria-label", "onPointerdown"], ln = {
|
|
496
505
|
key: 1,
|
|
497
506
|
class: "mr-canvas-static-grid"
|
|
498
|
-
},
|
|
507
|
+
}, sn = {
|
|
499
508
|
key: 0,
|
|
500
509
|
class: "mr-canvas-grid-limit"
|
|
501
|
-
},
|
|
510
|
+
}, rn = ["src"], dn = ["aria-label", "onPointerdown"], un = {
|
|
502
511
|
key: 0,
|
|
503
512
|
class: "mr-canvas-navigator"
|
|
504
|
-
},
|
|
513
|
+
}, cn = ["value", "aria-label"], mn = /* @__PURE__ */ Ge({
|
|
505
514
|
__name: "TemplateDesignCanvas",
|
|
506
515
|
props: {
|
|
507
516
|
document: {},
|
|
@@ -516,8 +525,8 @@ const Ot = {
|
|
|
516
525
|
messages: {}
|
|
517
526
|
},
|
|
518
527
|
emits: ["select", "geometry", "column", "width"],
|
|
519
|
-
setup(t, { emit:
|
|
520
|
-
const i = t, s =
|
|
528
|
+
setup(t, { emit: c }) {
|
|
529
|
+
const i = t, s = c, o = F(() => ({ ...Je, ...i.messages })), { viewport: p, zoom: h, scale: M, page: f, wide: m, fraction: y, fit: A, sync: T, navigate: I } = Bt({ get document() {
|
|
521
530
|
return i.document;
|
|
522
531
|
}, get pageIndex() {
|
|
523
532
|
return i.pageIndex;
|
|
@@ -525,134 +534,134 @@ const Ot = {
|
|
|
525
534
|
return i.selection;
|
|
526
535
|
}, get columnIndex() {
|
|
527
536
|
return i.activeColumnIndex;
|
|
528
|
-
} }), v =
|
|
529
|
-
function
|
|
530
|
-
return { width: `${
|
|
537
|
+
} }), v = F(() => i.disabled === !0 || i.geometryDisabled === !0 || !!f.value.flow), d = F(() => f.value.components.map((n) => n.kind === "list" ? Ht(n, i.datasets?.[n.dataset] ?? [], f.value.flow || n.cardinality === "record" ? 1 : 3) : []));
|
|
538
|
+
function C(n, x, k) {
|
|
539
|
+
return { width: `${x * M.value}px`, opacity: k ? 0.35 : 1, textAlign: n.style?.align, paddingLeft: n.indentMm ? `${n.indentMm * M.value}px` : void 0, color: n.style?.color, backgroundColor: n.style?.backgroundColor, fontWeight: n.style?.bold ? "700" : "400", fontSize: `${je(n.style).fontSizePx * h.value}px` };
|
|
531
540
|
}
|
|
532
|
-
function
|
|
541
|
+
function S(n) {
|
|
533
542
|
return i.locked?.({ pageIndex: i.pageIndex, componentIndex: n }) === !0;
|
|
534
543
|
}
|
|
535
|
-
function
|
|
536
|
-
s("select", { pageIndex: i.pageIndex, componentIndex:
|
|
544
|
+
function R(n, x) {
|
|
545
|
+
s("select", { pageIndex: i.pageIndex, componentIndex: x, additive: n.ctrlKey || n.metaKey || n.shiftKey }), !n.ctrlKey && !n.metaKey && !n.shiftKey && !S(x) && w.start(n, f.value.components[x]);
|
|
537
546
|
}
|
|
538
|
-
const
|
|
539
|
-
scale:
|
|
547
|
+
const w = jt({
|
|
548
|
+
scale: M,
|
|
540
549
|
page: () => f.value,
|
|
541
550
|
disabled: () => v.value,
|
|
542
551
|
commit: (n) => s("geometry", n)
|
|
543
552
|
});
|
|
544
553
|
function _(n) {
|
|
545
|
-
return (i.selections ?? (i.selection ? [i.selection] : [])).some((
|
|
554
|
+
return (i.selections ?? (i.selection ? [i.selection] : [])).some((x) => x.pageIndex === i.pageIndex && x.componentIndex === n);
|
|
546
555
|
}
|
|
547
|
-
function
|
|
548
|
-
const
|
|
556
|
+
function E(n) {
|
|
557
|
+
const x = f.value.components[n], k = x.kind === "list" ? x.id : x.nid, L = f.value.flow?.bands.find((P) => P.componentIds.includes(k ?? "")), $ = L && x.kind === "list" ? L.topMm + L.heightMm - x.topMm : at(x);
|
|
549
558
|
return {
|
|
550
|
-
left: `${
|
|
551
|
-
top: `${
|
|
552
|
-
width: `${
|
|
553
|
-
height: `${
|
|
559
|
+
left: `${x.leftMm * M.value}px`,
|
|
560
|
+
top: `${x.topMm * M.value}px`,
|
|
561
|
+
width: `${x.widthMm * M.value}px`,
|
|
562
|
+
height: `${$ * M.value}px`
|
|
554
563
|
};
|
|
555
564
|
}
|
|
556
|
-
function D(n,
|
|
557
|
-
const k = f.value.components[
|
|
558
|
-
if (v.value ||
|
|
559
|
-
const
|
|
565
|
+
function D(n, x) {
|
|
566
|
+
const k = f.value.components[x];
|
|
567
|
+
if (v.value || S(x) || !_(x)) return;
|
|
568
|
+
const L = {
|
|
560
569
|
ArrowLeft: [-1, 0],
|
|
561
570
|
ArrowRight: [1, 0],
|
|
562
571
|
ArrowUp: [0, -1],
|
|
563
572
|
ArrowDown: [0, 1]
|
|
564
|
-
},
|
|
565
|
-
if (
|
|
573
|
+
}, $ = L[n.key];
|
|
574
|
+
if (!$) return;
|
|
566
575
|
n.preventDefault(), n.stopPropagation();
|
|
567
|
-
const P =
|
|
568
|
-
P.leftMm +=
|
|
576
|
+
const P = ye(k), B = n.shiftKey ? 5 : 0.5;
|
|
577
|
+
P.leftMm += $[0] * B, P.topMm += $[1] * B, s("geometry", P);
|
|
569
578
|
}
|
|
570
579
|
function H(n) {
|
|
571
|
-
let
|
|
572
|
-
return n.columns.map((k) => (
|
|
580
|
+
let x = 0;
|
|
581
|
+
return n.columns.map((k) => (x += k.widthMm, x));
|
|
573
582
|
}
|
|
574
583
|
function G(n) {
|
|
575
|
-
return n.grid ?
|
|
584
|
+
return n.grid ? Se(
|
|
576
585
|
n.grid,
|
|
577
586
|
n.widthMm,
|
|
578
587
|
n.heightMm
|
|
579
588
|
).cells.slice(0, 2e3) : [];
|
|
580
589
|
}
|
|
581
|
-
function
|
|
582
|
-
return n.headerGrid ?
|
|
590
|
+
function U(n) {
|
|
591
|
+
return n.headerGrid ? Se(
|
|
583
592
|
n.headerGrid,
|
|
584
593
|
n.widthMm,
|
|
585
594
|
n.headerGrid.rowHeightsMm?.reduce(
|
|
586
|
-
(
|
|
595
|
+
(x, k) => x + k,
|
|
587
596
|
0
|
|
588
597
|
) ?? n.headerGrid.cells.length * 8
|
|
589
598
|
).cells : [];
|
|
590
599
|
}
|
|
591
|
-
let
|
|
600
|
+
let X;
|
|
592
601
|
ee(
|
|
593
602
|
() => v.value,
|
|
594
603
|
(n) => {
|
|
595
|
-
n &&
|
|
604
|
+
n && X?.();
|
|
596
605
|
}
|
|
597
606
|
), ee(
|
|
598
607
|
() => i.document,
|
|
599
|
-
() =>
|
|
600
|
-
),
|
|
601
|
-
function
|
|
608
|
+
() => X?.()
|
|
609
|
+
), Le(() => X?.());
|
|
610
|
+
function te(n, x, k) {
|
|
602
611
|
if (v.value || n.button !== 0) return;
|
|
603
|
-
n.preventDefault(), n.stopPropagation(),
|
|
604
|
-
const
|
|
605
|
-
let P =
|
|
606
|
-
const
|
|
612
|
+
n.preventDefault(), n.stopPropagation(), X?.();
|
|
613
|
+
const L = n.clientX, $ = x.columns[k].widthMm;
|
|
614
|
+
let P = $;
|
|
615
|
+
const B = n.currentTarget, Z = (oe) => {
|
|
607
616
|
P = Math.max(
|
|
608
617
|
2,
|
|
609
|
-
Math.round((
|
|
610
|
-
),
|
|
611
|
-
},
|
|
612
|
-
window.removeEventListener("pointermove", Z), window.removeEventListener("pointerup",
|
|
613
|
-
},
|
|
614
|
-
|
|
615
|
-
},
|
|
616
|
-
oe.key === "Escape" && (oe.preventDefault(),
|
|
618
|
+
Math.round(($ + (oe.clientX - L) / M.value) * 2) / 2
|
|
619
|
+
), B.style.transform = `translateX(${(P - $) * M.value}px)`;
|
|
620
|
+
}, he = () => {
|
|
621
|
+
window.removeEventListener("pointermove", Z), window.removeEventListener("pointerup", fe), window.removeEventListener("pointercancel", se), window.removeEventListener("keydown", me), B.style.transform = "", X = void 0;
|
|
622
|
+
}, fe = () => {
|
|
623
|
+
he(), P !== $ && s("width", k, P);
|
|
624
|
+
}, se = () => he(), me = (oe) => {
|
|
625
|
+
oe.key === "Escape" && (oe.preventDefault(), se());
|
|
617
626
|
};
|
|
618
|
-
window.addEventListener("pointermove", Z), window.addEventListener("pointerup",
|
|
627
|
+
window.addEventListener("pointermove", Z), window.addEventListener("pointerup", fe), window.addEventListener("pointercancel", se), window.addEventListener("keydown", me), X = se;
|
|
619
628
|
}
|
|
620
|
-
return (n,
|
|
621
|
-
a("div",
|
|
629
|
+
return (n, x) => (g(), b("div", Kt, [
|
|
630
|
+
a("div", Jt, [
|
|
622
631
|
a("span", null, l(o.value.canvasHint), 1),
|
|
623
|
-
a("nav",
|
|
632
|
+
a("nav", qt, [
|
|
624
633
|
a("button", {
|
|
625
634
|
type: "button",
|
|
626
|
-
onClick:
|
|
635
|
+
onClick: x[0] || (x[0] = (k) => e(A)("width"))
|
|
627
636
|
}, l(o.value.fitWidth), 1),
|
|
628
637
|
a("button", {
|
|
629
638
|
type: "button",
|
|
630
|
-
onClick:
|
|
639
|
+
onClick: x[1] || (x[1] = (k) => e(A)("page"))
|
|
631
640
|
}, l(o.value.fitPage), 1),
|
|
632
641
|
a("button", {
|
|
633
642
|
type: "button",
|
|
634
643
|
disabled: !t.selection,
|
|
635
|
-
onClick:
|
|
636
|
-
}, l(o.value.fitSelection), 9,
|
|
644
|
+
onClick: x[2] || (x[2] = (k) => e(A)("selection"))
|
|
645
|
+
}, l(o.value.fitSelection), 9, Xt)
|
|
637
646
|
]),
|
|
638
647
|
a("label", null, [
|
|
639
648
|
O(l(o.value.zoom), 1),
|
|
640
649
|
ue(a("select", {
|
|
641
|
-
"onUpdate:modelValue":
|
|
650
|
+
"onUpdate:modelValue": x[3] || (x[3] = (k) => Ve(h) ? h.value = k : null),
|
|
642
651
|
"aria-label": o.value.zoom
|
|
643
652
|
}, [
|
|
644
|
-
[0.5, 0.8, 1, 1.25].includes(e(
|
|
653
|
+
[0.5, 0.8, 1, 1.25].includes(e(h)) ? N("", !0) : (g(), b("option", {
|
|
645
654
|
key: 0,
|
|
646
|
-
value: e(
|
|
647
|
-
}, l(Math.round(e(
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
], 8,
|
|
655
|
+
value: e(h)
|
|
656
|
+
}, l(Math.round(e(h) * 100)) + "%", 9, Qt)),
|
|
657
|
+
x[6] || (x[6] = a("option", { value: 0.5 }, "50%", -1)),
|
|
658
|
+
x[7] || (x[7] = a("option", { value: 0.8 }, "80%", -1)),
|
|
659
|
+
x[8] || (x[8] = a("option", { value: 1 }, "100%", -1)),
|
|
660
|
+
x[9] || (x[9] = a("option", { value: 1.25 }, "125%", -1))
|
|
661
|
+
], 8, Yt), [
|
|
653
662
|
[
|
|
654
663
|
He,
|
|
655
|
-
e(
|
|
664
|
+
e(h),
|
|
656
665
|
void 0,
|
|
657
666
|
{ number: !0 }
|
|
658
667
|
]
|
|
@@ -663,152 +672,152 @@ const Ot = {
|
|
|
663
672
|
ref_key: "viewport",
|
|
664
673
|
ref: p,
|
|
665
674
|
class: "mr-canvas-scroll",
|
|
666
|
-
onScrollPassive:
|
|
667
|
-
(...k) => e(
|
|
675
|
+
onScrollPassive: x[4] || (x[4] = //@ts-ignore
|
|
676
|
+
(...k) => e(T) && e(T)(...k))
|
|
668
677
|
}, [
|
|
669
678
|
a("div", {
|
|
670
679
|
class: "mr-canvas-paper",
|
|
671
|
-
style:
|
|
672
|
-
width: `${e(f).widthMm * e(
|
|
673
|
-
height: `${e(f).heightMm * e(
|
|
680
|
+
style: be({
|
|
681
|
+
width: `${e(f).widthMm * e(M)}px`,
|
|
682
|
+
height: `${e(f).heightMm * e(M)}px`
|
|
674
683
|
})
|
|
675
684
|
}, [
|
|
676
|
-
(
|
|
677
|
-
key:
|
|
678
|
-
class: Pe(["mr-canvas-component", { "is-selected": _(
|
|
679
|
-
"data-canvas-component":
|
|
680
|
-
style:
|
|
685
|
+
(g(!0), b(q, null, Q(e(f).components, (k, L) => (g(), b("div", {
|
|
686
|
+
key: L,
|
|
687
|
+
class: Pe(["mr-canvas-component", { "is-selected": _(L), "is-locked": S(L) }]),
|
|
688
|
+
"data-canvas-component": L,
|
|
689
|
+
style: be(E(L)),
|
|
681
690
|
role: "button",
|
|
682
|
-
"aria-label": `${o.value.component} ${
|
|
683
|
-
"aria-pressed": _(
|
|
684
|
-
tabindex: _(
|
|
685
|
-
onFocus: (
|
|
686
|
-
onPointerdown: (
|
|
687
|
-
onClick: (
|
|
688
|
-
onKeydown: (
|
|
691
|
+
"aria-label": `${o.value.component} ${L + 1} ${k.kind}`,
|
|
692
|
+
"aria-pressed": _(L),
|
|
693
|
+
tabindex: _(L) ? 0 : -1,
|
|
694
|
+
onFocus: ($) => !_(L) && s("select", { pageIndex: t.pageIndex, componentIndex: L }),
|
|
695
|
+
onPointerdown: ($) => R($, L),
|
|
696
|
+
onClick: ($) => $.detail === 0 && !_(L) && s("select", { pageIndex: t.pageIndex, componentIndex: L }),
|
|
697
|
+
onKeydown: ($) => D($, L)
|
|
689
698
|
}, [
|
|
690
|
-
k.kind === "list" ? (
|
|
691
|
-
a("div",
|
|
692
|
-
k.header !== !1 && k.headerGrid ? (
|
|
699
|
+
k.kind === "list" ? (g(), b(q, { key: 0 }, [
|
|
700
|
+
a("div", en, [
|
|
701
|
+
k.header !== !1 && k.headerGrid ? (g(), b("div", {
|
|
693
702
|
key: 0,
|
|
694
703
|
class: "mr-canvas-merged",
|
|
695
|
-
style:
|
|
696
|
-
height: `${(k.headerGrid.rowHeightsMm?.reduce((
|
|
704
|
+
style: be({
|
|
705
|
+
height: `${(k.headerGrid.rowHeightsMm?.reduce(($, P) => $ + P, 0) ?? k.headerGrid.cells.length * 8) * e(M)}px`
|
|
697
706
|
})
|
|
698
707
|
}, [
|
|
699
|
-
(
|
|
708
|
+
(g(!0), b(q, null, Q(U(k), ($, P) => (g(), b("div", {
|
|
700
709
|
key: P,
|
|
701
|
-
style:
|
|
702
|
-
left: `${
|
|
703
|
-
top: `${
|
|
704
|
-
width: `${
|
|
705
|
-
height: `${
|
|
706
|
-
textAlign:
|
|
710
|
+
style: be({
|
|
711
|
+
left: `${$.xMm * e(M)}px`,
|
|
712
|
+
top: `${$.yMm * e(M)}px`,
|
|
713
|
+
width: `${$.widthMm * e(M)}px`,
|
|
714
|
+
height: `${$.heightMm * e(M)}px`,
|
|
715
|
+
textAlign: $.cell.style?.align ?? "center"
|
|
707
716
|
})
|
|
708
|
-
}, l(
|
|
709
|
-
], 4)) : k.header !== !1 ? (
|
|
710
|
-
(
|
|
717
|
+
}, l($.cell.text), 5))), 128))
|
|
718
|
+
], 4)) : k.header !== !1 ? (g(), b("div", tn, [
|
|
719
|
+
(g(!0), b(q, null, Q(k.columns, ($, P) => (g(), b("div", {
|
|
711
720
|
key: P,
|
|
712
|
-
style:
|
|
713
|
-
onPointerdown:
|
|
714
|
-
s("select", { pageIndex: t.pageIndex, componentIndex:
|
|
721
|
+
style: be(C({ text: $.header, style: e(At)(k, $) }, $.widthMm, $.hidden)),
|
|
722
|
+
onPointerdown: gt((B) => {
|
|
723
|
+
s("select", { pageIndex: t.pageIndex, componentIndex: L }), s("column", P);
|
|
715
724
|
}, ["stop"])
|
|
716
|
-
}, l(
|
|
717
|
-
])) :
|
|
718
|
-
(
|
|
725
|
+
}, l($.header), 45, nn))), 128))
|
|
726
|
+
])) : N("", !0),
|
|
727
|
+
(g(!0), b(q, null, Q(d.value[L], ($, P) => (g(), b("div", {
|
|
719
728
|
key: P,
|
|
720
729
|
class: "mr-canvas-table-row"
|
|
721
730
|
}, [
|
|
722
|
-
(
|
|
731
|
+
(g(!0), b(q, null, Q(k.columns, (B, Z) => (g(), b("div", {
|
|
723
732
|
key: Z,
|
|
724
|
-
style:
|
|
725
|
-
}, l(
|
|
733
|
+
style: be(C($[Z], B.widthMm, B.hidden))
|
|
734
|
+
}, l($[Z].text), 5))), 128))
|
|
726
735
|
]))), 128)),
|
|
727
|
-
|
|
736
|
+
d.value[L]?.length ? N("", !0) : (g(), b("div", an, l(k.dataset) + " · " + l(k.tree && t.datasets?.[k.dataset]?.length ? o.value.treeSampleHint : o.value.sampleRows), 1))
|
|
728
737
|
]),
|
|
729
|
-
_(
|
|
738
|
+
_(L) && !v.value && !S(L) ? (g(!0), b(q, { key: 0 }, Q(H(k), ($, P) => (g(), b("span", {
|
|
730
739
|
key: P,
|
|
731
740
|
class: "mr-canvas-column-handle",
|
|
732
741
|
"aria-label": `${o.value.resizeColumn} ${k.columns[P]?.header}`,
|
|
733
742
|
role: "separator",
|
|
734
743
|
"aria-orientation": "vertical",
|
|
735
|
-
style:
|
|
736
|
-
onPointerdown: (
|
|
737
|
-
}, null, 44,
|
|
738
|
-
], 64)) : k.grid ? (
|
|
739
|
-
(
|
|
744
|
+
style: be({ left: `${$ * e(M)}px` }),
|
|
745
|
+
onPointerdown: (B) => te(B, k, P)
|
|
746
|
+
}, null, 44, on))), 128)) : N("", !0)
|
|
747
|
+
], 64)) : k.grid ? (g(), b("div", ln, [
|
|
748
|
+
(g(!0), b(q, null, Q(G(k), ($, P) => (g(), b("div", {
|
|
740
749
|
key: P,
|
|
741
|
-
style:
|
|
742
|
-
left: `${
|
|
743
|
-
top: `${
|
|
744
|
-
width: `${
|
|
745
|
-
height: `${
|
|
746
|
-
backgroundColor:
|
|
747
|
-
color:
|
|
748
|
-
fontWeight:
|
|
749
|
-
fontSize: `${e(
|
|
750
|
-
textAlign:
|
|
750
|
+
style: be({
|
|
751
|
+
left: `${$.xMm * e(M)}px`,
|
|
752
|
+
top: `${$.yMm * e(M)}px`,
|
|
753
|
+
width: `${$.widthMm * e(M)}px`,
|
|
754
|
+
height: `${$.heightMm * e(M)}px`,
|
|
755
|
+
backgroundColor: $.cell.style?.backgroundColor,
|
|
756
|
+
color: $.cell.style?.color,
|
|
757
|
+
fontWeight: $.cell.style?.bold ? "700" : "400",
|
|
758
|
+
fontSize: `${e(je)($.cell.style).fontSizePx * e(h)}px`,
|
|
759
|
+
textAlign: $.cell.style?.align ?? "left"
|
|
751
760
|
})
|
|
752
|
-
}, l(
|
|
753
|
-
k.grid.cells.reduce((
|
|
754
|
-
])) : k.imageData ? (
|
|
761
|
+
}, l($.cell.text), 5))), 128)),
|
|
762
|
+
k.grid.cells.reduce(($, P) => $ + P.length, 0) > 2e3 ? (g(), b("span", sn, l(o.value.canvasGridLimited), 1)) : N("", !0)
|
|
763
|
+
])) : k.imageData ? (g(), b("img", {
|
|
755
764
|
key: 2,
|
|
756
765
|
src: k.imageData,
|
|
757
766
|
alt: "",
|
|
758
767
|
draggable: "false"
|
|
759
|
-
}, null, 8,
|
|
768
|
+
}, null, 8, rn)) : (g(), b("div", {
|
|
760
769
|
key: 3,
|
|
761
770
|
class: "mr-canvas-content",
|
|
762
|
-
style:
|
|
771
|
+
style: be({
|
|
763
772
|
color: k.style?.color,
|
|
764
773
|
backgroundColor: k.style?.backgroundColor,
|
|
765
774
|
fontWeight: k.style?.bold ? "700" : "400",
|
|
766
|
-
fontSize: `${e(
|
|
775
|
+
fontSize: `${e(je)(k.style).fontSizePx * e(h)}px`,
|
|
767
776
|
textAlign: k.style?.align
|
|
768
777
|
})
|
|
769
778
|
}, l(k.text ?? k.fallbackText ?? (k.kind === "rect" ? "" : k.kind)), 5)),
|
|
770
|
-
_(
|
|
779
|
+
_(L) && !v.value && !S(L) ? (g(), b("span", {
|
|
771
780
|
key: 4,
|
|
772
781
|
class: "mr-canvas-resize",
|
|
773
782
|
"aria-label": o.value.resizeComponent,
|
|
774
783
|
role: "separator",
|
|
775
|
-
onPointerdown: (
|
|
776
|
-
}, null, 40,
|
|
777
|
-
], 46,
|
|
784
|
+
onPointerdown: ($) => e(w).start($, k, !0)
|
|
785
|
+
}, null, 40, dn)) : N("", !0)
|
|
786
|
+
], 46, Zt))), 128))
|
|
778
787
|
], 4)
|
|
779
788
|
], 544),
|
|
780
|
-
e(m) ? (
|
|
789
|
+
e(m) ? (g(), b("footer", un, [
|
|
781
790
|
a("span", null, l(o.value.wideNavigation), 1),
|
|
782
791
|
a("input", {
|
|
783
792
|
type: "range",
|
|
784
793
|
min: "0",
|
|
785
794
|
max: "100",
|
|
786
|
-
value: e(
|
|
795
|
+
value: e(y),
|
|
787
796
|
"aria-label": o.value.wideNavigation,
|
|
788
|
-
onInput:
|
|
789
|
-
}, null, 40,
|
|
790
|
-
a("span", null, l(e(
|
|
791
|
-
])) :
|
|
797
|
+
onInput: x[5] || (x[5] = (k) => e(I)(Number(k.target.value)))
|
|
798
|
+
}, null, 40, cn),
|
|
799
|
+
a("span", null, l(e(y)) + "%", 1)
|
|
800
|
+
])) : N("", !0)
|
|
792
801
|
]));
|
|
793
802
|
}
|
|
794
|
-
}),
|
|
803
|
+
}), vn = /* @__PURE__ */ Fe(mn, [["__scopeId", "data-v-b9edde8c"]]), pn = ["aria-label"], gn = ["data-align", "aria-label", "title", "aria-checked", "tabindex", "onClick", "onKeydown"], hn = { key: 0 }, fn = {
|
|
795
804
|
key: 1,
|
|
796
805
|
viewBox: "0 0 20 20",
|
|
797
806
|
fill: "none",
|
|
798
807
|
"aria-hidden": "true"
|
|
799
|
-
},
|
|
808
|
+
}, bn = {
|
|
800
809
|
key: 0,
|
|
801
810
|
d: "M3 4h14M3 8h9M3 12h14M3 16h9"
|
|
802
|
-
},
|
|
811
|
+
}, yn = {
|
|
803
812
|
key: 1,
|
|
804
813
|
d: "M3 4h14M6 8h8M3 12h14M6 16h8"
|
|
805
|
-
},
|
|
814
|
+
}, wn = {
|
|
806
815
|
key: 2,
|
|
807
816
|
d: "M3 4h14M8 8h9M3 12h14M8 16h9"
|
|
808
|
-
},
|
|
817
|
+
}, xn = {
|
|
809
818
|
key: 3,
|
|
810
819
|
d: "M3 4h14M3 8h14M3 12h14M3 16h14"
|
|
811
|
-
},
|
|
820
|
+
}, Mn = /* @__PURE__ */ Ge({
|
|
812
821
|
__name: "AlignmentControl",
|
|
813
822
|
props: {
|
|
814
823
|
modelValue: {},
|
|
@@ -818,22 +827,22 @@ const Ot = {
|
|
|
818
827
|
allowAuto: { type: Boolean }
|
|
819
828
|
},
|
|
820
829
|
emits: ["update:modelValue"],
|
|
821
|
-
setup(t, { emit:
|
|
822
|
-
const i = t, s =
|
|
823
|
-
async function p(
|
|
824
|
-
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(
|
|
825
|
-
|
|
826
|
-
const m = o(),
|
|
827
|
-
s("update:modelValue", m[
|
|
828
|
-
const
|
|
829
|
-
await
|
|
830
|
+
setup(t, { emit: c }) {
|
|
831
|
+
const i = t, s = c, o = () => i.allowAuto ? ["auto", "left", "center", "right", "justify"] : ["left", "center", "right", "justify"];
|
|
832
|
+
async function p(h, M) {
|
|
833
|
+
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(h.key)) return;
|
|
834
|
+
h.preventDefault();
|
|
835
|
+
const m = o(), y = m.indexOf(M), A = h.key === "Home" ? 0 : h.key === "End" ? m.length - 1 : (y + (h.key === "ArrowRight" ? 1 : -1) + m.length) % m.length;
|
|
836
|
+
s("update:modelValue", m[A]);
|
|
837
|
+
const T = h.currentTarget.parentElement;
|
|
838
|
+
await ce(), T?.querySelector(`[data-align="${m[A]}"]`)?.focus();
|
|
830
839
|
}
|
|
831
|
-
return (
|
|
840
|
+
return (h, M) => (g(), b("div", {
|
|
832
841
|
class: "mr-designer-alignment",
|
|
833
842
|
role: "radiogroup",
|
|
834
843
|
"aria-label": t.label
|
|
835
844
|
}, [
|
|
836
|
-
(
|
|
845
|
+
(g(!0), b(q, null, Q(o(), (f) => (g(), b("button", {
|
|
837
846
|
key: f,
|
|
838
847
|
type: "button",
|
|
839
848
|
role: "radio",
|
|
@@ -845,19 +854,19 @@ const Ot = {
|
|
|
845
854
|
onClick: (m) => s("update:modelValue", f),
|
|
846
855
|
onKeydown: (m) => p(m, f)
|
|
847
856
|
}, [
|
|
848
|
-
f === "auto" ? (
|
|
849
|
-
f === "left" ? (
|
|
857
|
+
f === "auto" ? (g(), b("span", hn, l(t.autoLabel), 1)) : (g(), b("svg", fn, [
|
|
858
|
+
f === "left" ? (g(), b("path", bn)) : f === "center" ? (g(), b("path", yn)) : f === "right" ? (g(), b("path", wn)) : (g(), b("path", xn))
|
|
850
859
|
]))
|
|
851
|
-
], 40,
|
|
852
|
-
], 8,
|
|
860
|
+
], 40, gn))), 128))
|
|
861
|
+
], 8, pn));
|
|
853
862
|
}
|
|
854
|
-
}),
|
|
863
|
+
}), nt = /* @__PURE__ */ Fe(Mn, [["__scopeId", "data-v-c85770c4"]]), kn = ["disabled"], Cn = { class: "mr-component-dimensions" }, Sn = ["min", "value", "disabled", "onChange"], _n = { key: 0 }, In = ["value", "disabled"], $n = { value: "" }, En = { value: "header" }, Rn = { value: "footer" }, Tn = { key: 1 }, Ln = ["value"], Dn = ["value"], An = { class: "mr-component-upload" }, Pn = ["aria-label"], Hn = {
|
|
855
864
|
key: 0,
|
|
856
865
|
role: "alert"
|
|
857
|
-
},
|
|
866
|
+
}, Gn = {
|
|
858
867
|
key: 3,
|
|
859
868
|
class: "mr-component-type"
|
|
860
|
-
},
|
|
869
|
+
}, Fn = { class: "mr-component-dimensions" }, Nn = ["value"], zn = ["checked"], On = { class: "mr-component-dimensions" }, Bn = ["value"], Vn = ["value"], jn = { key: 4 }, Un = ["value"], Wn = /* @__PURE__ */ Ge({
|
|
861
870
|
__name: "CanvasComponentInspector",
|
|
862
871
|
props: {
|
|
863
872
|
component: {},
|
|
@@ -866,8 +875,8 @@ const Ot = {
|
|
|
866
875
|
messages: {}
|
|
867
876
|
},
|
|
868
877
|
emits: ["geometry", "patch"],
|
|
869
|
-
setup(t, { emit:
|
|
870
|
-
const i = t, s =
|
|
878
|
+
setup(t, { emit: c }) {
|
|
879
|
+
const i = t, s = c, o = F(() => ({ ...Je, ...i.messages })), p = z(""), h = ["leftMm", "topMm", "widthMm", "heightMm"], M = F(() => [
|
|
871
880
|
o.value.leftPosition,
|
|
872
881
|
o.value.topPosition,
|
|
873
882
|
o.value.componentWidth,
|
|
@@ -875,163 +884,163 @@ const Ot = {
|
|
|
875
884
|
]);
|
|
876
885
|
function f(I, v) {
|
|
877
886
|
if (i.disabled || i.geometryDisabled) return;
|
|
878
|
-
const
|
|
879
|
-
Number.isFinite(
|
|
887
|
+
const d = Number(v.target.value);
|
|
888
|
+
Number.isFinite(d) && s("geometry", { ...ye(i.component), [I]: d });
|
|
880
889
|
}
|
|
881
890
|
function m(I, v) {
|
|
882
891
|
if (i.component.kind === "list") return;
|
|
883
|
-
const
|
|
884
|
-
I === "fontSize" && delete
|
|
892
|
+
const d = { ...i.component.style, [I]: v };
|
|
893
|
+
I === "fontSize" && delete d.fontSizePx, s("patch", { style: d });
|
|
885
894
|
}
|
|
886
|
-
const
|
|
895
|
+
const y = F(() => ({
|
|
887
896
|
auto: o.value.auto,
|
|
888
897
|
left: o.value.left,
|
|
889
898
|
center: o.value.center,
|
|
890
899
|
right: o.value.right,
|
|
891
900
|
justify: o.value.justify
|
|
892
901
|
}));
|
|
893
|
-
function
|
|
902
|
+
function A(I) {
|
|
894
903
|
return I.target.value;
|
|
895
904
|
}
|
|
896
|
-
async function
|
|
897
|
-
const v = I.target,
|
|
898
|
-
if (!
|
|
905
|
+
async function T(I) {
|
|
906
|
+
const v = I.target, d = v.files?.[0];
|
|
907
|
+
if (!d) return;
|
|
899
908
|
p.value = "";
|
|
900
|
-
const
|
|
909
|
+
const C = i.component;
|
|
901
910
|
try {
|
|
902
|
-
if (
|
|
903
|
-
|
|
911
|
+
if (d.size > 4 * 1024 * 1024 || !["image/png", "image/jpeg", "image/webp", "image/svg+xml"].includes(
|
|
912
|
+
d.type
|
|
904
913
|
))
|
|
905
914
|
throw new Error(o.value.imageBudget);
|
|
906
|
-
const
|
|
907
|
-
|
|
915
|
+
const S = new FileReader(), R = await new Promise((w, _) => {
|
|
916
|
+
S.onload = () => w(String(S.result)), S.onerror = () => _(S.error), S.readAsDataURL(d);
|
|
908
917
|
});
|
|
909
|
-
!i.disabled && i.component ===
|
|
910
|
-
} catch (
|
|
911
|
-
p.value =
|
|
918
|
+
!i.disabled && i.component === C && s("patch", { imageData: R });
|
|
919
|
+
} catch (S) {
|
|
920
|
+
p.value = S instanceof Error ? S.message : String(S);
|
|
912
921
|
} finally {
|
|
913
922
|
v.value = "";
|
|
914
923
|
}
|
|
915
924
|
}
|
|
916
|
-
return (I, v) => (
|
|
925
|
+
return (I, v) => (g(), b("fieldset", {
|
|
917
926
|
class: "mr-component-properties",
|
|
918
927
|
disabled: t.disabled
|
|
919
928
|
}, [
|
|
920
929
|
a("h3", null, l(o.value.positionGroup), 1),
|
|
921
|
-
a("div",
|
|
922
|
-
(
|
|
923
|
-
(
|
|
924
|
-
), (
|
|
925
|
-
O(l(
|
|
930
|
+
a("div", Cn, [
|
|
931
|
+
(g(!0), b(q, null, Q(h.filter(
|
|
932
|
+
(d) => t.component.kind !== "list" || d !== "heightMm"
|
|
933
|
+
), (d, C) => (g(), b("label", { key: d }, [
|
|
934
|
+
O(l(M.value[C]), 1),
|
|
926
935
|
a("input", {
|
|
927
936
|
type: "number",
|
|
928
937
|
step: "0.5",
|
|
929
|
-
min:
|
|
930
|
-
value: e(
|
|
938
|
+
min: d === "widthMm" || d === "heightMm" ? 2 : 0,
|
|
939
|
+
value: e(ye)(t.component)[d],
|
|
931
940
|
disabled: t.geometryDisabled,
|
|
932
|
-
onChange: (
|
|
933
|
-
}, null, 40,
|
|
941
|
+
onChange: (S) => f(d, S)
|
|
942
|
+
}, null, 40, Sn)
|
|
934
943
|
]))), 128))
|
|
935
944
|
]),
|
|
936
|
-
t.component.kind !== "list" ? (
|
|
945
|
+
t.component.kind !== "list" ? (g(), b("label", _n, [
|
|
937
946
|
O(l(o.value.repeatPage), 1),
|
|
938
947
|
a("select", {
|
|
939
948
|
value: t.component.pageAnchor ?? "",
|
|
940
949
|
disabled: t.geometryDisabled,
|
|
941
|
-
onChange: v[0] || (v[0] = (
|
|
950
|
+
onChange: v[0] || (v[0] = (d) => s("patch", { pageAnchor: A(d) || void 0 }))
|
|
942
951
|
}, [
|
|
943
|
-
a("option",
|
|
944
|
-
a("option",
|
|
945
|
-
a("option",
|
|
946
|
-
], 40,
|
|
947
|
-
])) :
|
|
952
|
+
a("option", $n, l(o.value.repeatNone), 1),
|
|
953
|
+
a("option", En, l(o.value.repeatHeader), 1),
|
|
954
|
+
a("option", Rn, l(o.value.repeatFooter), 1)
|
|
955
|
+
], 40, In)
|
|
956
|
+
])) : N("", !0),
|
|
948
957
|
a("h3", null, l(o.value.componentContent), 1),
|
|
949
|
-
t.component.kind === "text" ? (
|
|
958
|
+
t.component.kind === "text" ? (g(), b("label", Tn, [
|
|
950
959
|
O(l(o.value.componentText), 1),
|
|
951
960
|
a("textarea", {
|
|
952
961
|
rows: "4",
|
|
953
962
|
value: t.component.text,
|
|
954
|
-
onChange: v[1] || (v[1] = (
|
|
955
|
-
}, null, 40,
|
|
956
|
-
])) :
|
|
957
|
-
t.component.kind === "image" ? (
|
|
963
|
+
onChange: v[1] || (v[1] = (d) => s("patch", { text: A(d) }))
|
|
964
|
+
}, null, 40, Ln)
|
|
965
|
+
])) : N("", !0),
|
|
966
|
+
t.component.kind === "image" ? (g(), b(q, { key: 2 }, [
|
|
958
967
|
a("label", null, [
|
|
959
968
|
O(l(o.value.imageSource), 1),
|
|
960
969
|
a("textarea", {
|
|
961
970
|
rows: "2",
|
|
962
971
|
value: t.component.imageData,
|
|
963
|
-
onChange: v[2] || (v[2] = (
|
|
964
|
-
}, null, 40,
|
|
972
|
+
onChange: v[2] || (v[2] = (d) => s("patch", { imageData: A(d) }))
|
|
973
|
+
}, null, 40, Dn)
|
|
965
974
|
]),
|
|
966
|
-
a("label",
|
|
975
|
+
a("label", An, [
|
|
967
976
|
O(l(o.value.imageUpload), 1),
|
|
968
977
|
a("input", {
|
|
969
978
|
type: "file",
|
|
970
979
|
accept: "image/png,image/jpeg,image/webp,image/svg+xml",
|
|
971
980
|
"aria-label": o.value.imageUpload,
|
|
972
|
-
onChange:
|
|
973
|
-
}, null, 40,
|
|
981
|
+
onChange: T
|
|
982
|
+
}, null, 40, Pn)
|
|
974
983
|
]),
|
|
975
|
-
p.value ? (
|
|
976
|
-
], 64)) :
|
|
977
|
-
t.component.kind === "text" ? (
|
|
984
|
+
p.value ? (g(), b("p", Hn, l(p.value), 1)) : N("", !0)
|
|
985
|
+
], 64)) : N("", !0),
|
|
986
|
+
t.component.kind === "text" ? (g(), b("div", Gn, [
|
|
978
987
|
a("h3", null, l(o.value.textFormat), 1),
|
|
979
|
-
a("div",
|
|
988
|
+
a("div", Fn, [
|
|
980
989
|
a("label", null, [
|
|
981
990
|
O(l(o.value.fontSize), 1),
|
|
982
991
|
a("input", {
|
|
983
992
|
type: "number",
|
|
984
993
|
min: "1",
|
|
985
994
|
max: "200",
|
|
986
|
-
value: e(
|
|
987
|
-
onChange: v[3] || (v[3] = (
|
|
988
|
-
}, null, 40,
|
|
995
|
+
value: e(je)(t.component.style).fontSizePt,
|
|
996
|
+
onChange: v[3] || (v[3] = (d) => m("fontSize", Number(A(d))))
|
|
997
|
+
}, null, 40, Nn)
|
|
989
998
|
]),
|
|
990
999
|
a("label", null, [
|
|
991
1000
|
O(l(o.value.fontBold), 1),
|
|
992
1001
|
a("input", {
|
|
993
1002
|
type: "checkbox",
|
|
994
1003
|
checked: t.component.style?.bold === !0,
|
|
995
|
-
onChange: v[4] || (v[4] = (
|
|
996
|
-
}, null, 40,
|
|
1004
|
+
onChange: v[4] || (v[4] = (d) => m("bold", d.target.checked))
|
|
1005
|
+
}, null, 40, zn)
|
|
997
1006
|
])
|
|
998
1007
|
]),
|
|
999
|
-
le(
|
|
1008
|
+
le(nt, {
|
|
1000
1009
|
"model-value": t.component.style?.align ?? "left",
|
|
1001
1010
|
label: o.value.bodyAlign,
|
|
1002
|
-
labels:
|
|
1011
|
+
labels: y.value,
|
|
1003
1012
|
"auto-label": o.value.autoShort,
|
|
1004
|
-
"onUpdate:modelValue": v[5] || (v[5] = (
|
|
1013
|
+
"onUpdate:modelValue": v[5] || (v[5] = (d) => m("align", d))
|
|
1005
1014
|
}, null, 8, ["model-value", "label", "labels", "auto-label"]),
|
|
1006
|
-
a("div",
|
|
1015
|
+
a("div", On, [
|
|
1007
1016
|
a("label", null, [
|
|
1008
1017
|
O(l(o.value.textColor), 1),
|
|
1009
1018
|
a("input", {
|
|
1010
1019
|
type: "color",
|
|
1011
1020
|
value: t.component.style?.color ?? "#233c5c",
|
|
1012
|
-
onChange: v[6] || (v[6] = (
|
|
1013
|
-
}, null, 40,
|
|
1021
|
+
onChange: v[6] || (v[6] = (d) => m("color", A(d)))
|
|
1022
|
+
}, null, 40, Bn)
|
|
1014
1023
|
]),
|
|
1015
1024
|
a("label", null, [
|
|
1016
1025
|
O(l(o.value.backgroundColor), 1),
|
|
1017
1026
|
a("input", {
|
|
1018
1027
|
type: "color",
|
|
1019
1028
|
value: t.component.style?.backgroundColor ?? "#ffffff",
|
|
1020
|
-
onChange: v[7] || (v[7] = (
|
|
1021
|
-
}, null, 40,
|
|
1029
|
+
onChange: v[7] || (v[7] = (d) => m("backgroundColor", A(d)))
|
|
1030
|
+
}, null, 40, Vn)
|
|
1022
1031
|
])
|
|
1023
1032
|
])
|
|
1024
|
-
])) :
|
|
1025
|
-
t.component.kind === "list" ? (
|
|
1033
|
+
])) : N("", !0),
|
|
1034
|
+
t.component.kind === "list" ? (g(), b("label", jn, [
|
|
1026
1035
|
O(l(o.value.listDataset), 1),
|
|
1027
1036
|
a("input", {
|
|
1028
1037
|
value: t.component.dataset,
|
|
1029
|
-
onChange: v[8] || (v[8] = (
|
|
1030
|
-
}, null, 40,
|
|
1031
|
-
])) :
|
|
1032
|
-
], 8,
|
|
1038
|
+
onChange: v[8] || (v[8] = (d) => s("patch", { dataset: A(d) }))
|
|
1039
|
+
}, null, 40, Un)
|
|
1040
|
+
])) : N("", !0)
|
|
1041
|
+
], 8, kn));
|
|
1033
1042
|
}
|
|
1034
|
-
}),
|
|
1043
|
+
}), Kn = /* @__PURE__ */ Fe(Wn, [["__scopeId", "data-v-5f04c2ed"]]), Jn = { class: "mr-header-editor" }, qn = ["disabled"], Xn = ["value"], Yn = ["value"], Qn = ["value"], Zn = ["disabled"], ea = /* @__PURE__ */ Ge({
|
|
1035
1044
|
__name: "HeaderStructureEditor",
|
|
1036
1045
|
props: {
|
|
1037
1046
|
list: {},
|
|
@@ -1039,14 +1048,14 @@ const Ot = {
|
|
|
1039
1048
|
messages: {}
|
|
1040
1049
|
},
|
|
1041
1050
|
emits: ["command"],
|
|
1042
|
-
setup(t, { emit:
|
|
1043
|
-
const i = t, s =
|
|
1051
|
+
setup(t, { emit: c }) {
|
|
1052
|
+
const i = t, s = c, o = F(() => ({ ...Je, ...i.messages })), p = z(0), h = z(0), M = z(Math.min(1, i.list.columns.length - 1));
|
|
1044
1053
|
return ee(
|
|
1045
1054
|
() => i.list.columns.length,
|
|
1046
1055
|
(f) => {
|
|
1047
|
-
|
|
1056
|
+
h.value = Math.min(h.value, f - 1), M.value = Math.min(M.value, f - 1);
|
|
1048
1057
|
}
|
|
1049
|
-
), (f, m) => (
|
|
1058
|
+
), (f, m) => (g(), b("details", Jn, [
|
|
1050
1059
|
a("summary", null, [
|
|
1051
1060
|
O(l(o.value.headerStructure), 1),
|
|
1052
1061
|
a("span", null, l(t.list.headerGrid?.cells.length ?? 1) + " " + l(o.value.headerRow), 1)
|
|
@@ -1055,12 +1064,12 @@ const Ot = {
|
|
|
1055
1064
|
a("label", null, [
|
|
1056
1065
|
O(l(o.value.headerRow), 1),
|
|
1057
1066
|
ue(a("select", {
|
|
1058
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
1067
|
+
"onUpdate:modelValue": m[0] || (m[0] = (y) => p.value = y)
|
|
1059
1068
|
}, [
|
|
1060
|
-
(
|
|
1061
|
-
key:
|
|
1062
|
-
value:
|
|
1063
|
-
}, l(
|
|
1069
|
+
(g(!0), b(q, null, Q(t.list.headerGrid?.cells.length ?? 1, (y) => (g(), b("option", {
|
|
1070
|
+
key: y,
|
|
1071
|
+
value: y - 1
|
|
1072
|
+
}, l(y), 9, Xn))), 128))
|
|
1064
1073
|
], 512), [
|
|
1065
1074
|
[
|
|
1066
1075
|
He,
|
|
@@ -1073,16 +1082,16 @@ const Ot = {
|
|
|
1073
1082
|
a("label", null, [
|
|
1074
1083
|
O(l(o.value.headerFirst), 1),
|
|
1075
1084
|
ue(a("select", {
|
|
1076
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
1085
|
+
"onUpdate:modelValue": m[1] || (m[1] = (y) => h.value = y)
|
|
1077
1086
|
}, [
|
|
1078
|
-
(
|
|
1079
|
-
key:
|
|
1080
|
-
value:
|
|
1081
|
-
}, l(
|
|
1087
|
+
(g(!0), b(q, null, Q(t.list.columns, (y, A) => (g(), b("option", {
|
|
1088
|
+
key: A,
|
|
1089
|
+
value: A
|
|
1090
|
+
}, l(A + 1) + " · " + l(y.header), 9, Yn))), 128))
|
|
1082
1091
|
], 512), [
|
|
1083
1092
|
[
|
|
1084
1093
|
He,
|
|
1085
|
-
|
|
1094
|
+
h.value,
|
|
1086
1095
|
void 0,
|
|
1087
1096
|
{ number: !0 }
|
|
1088
1097
|
]
|
|
@@ -1091,16 +1100,16 @@ const Ot = {
|
|
|
1091
1100
|
a("label", null, [
|
|
1092
1101
|
O(l(o.value.headerLast), 1),
|
|
1093
1102
|
ue(a("select", {
|
|
1094
|
-
"onUpdate:modelValue": m[2] || (m[2] = (
|
|
1103
|
+
"onUpdate:modelValue": m[2] || (m[2] = (y) => M.value = y)
|
|
1095
1104
|
}, [
|
|
1096
|
-
(
|
|
1097
|
-
key:
|
|
1098
|
-
value:
|
|
1099
|
-
}, l(
|
|
1105
|
+
(g(!0), b(q, null, Q(t.list.columns, (y, A) => (g(), b("option", {
|
|
1106
|
+
key: A,
|
|
1107
|
+
value: A
|
|
1108
|
+
}, l(A + 1) + " · " + l(y.header), 9, Qn))), 128))
|
|
1100
1109
|
], 512), [
|
|
1101
1110
|
[
|
|
1102
1111
|
He,
|
|
1103
|
-
|
|
1112
|
+
M.value,
|
|
1104
1113
|
void 0,
|
|
1105
1114
|
{ number: !0 }
|
|
1106
1115
|
]
|
|
@@ -1109,273 +1118,273 @@ const Ot = {
|
|
|
1109
1118
|
a("div", null, [
|
|
1110
1119
|
a("button", {
|
|
1111
1120
|
type: "button",
|
|
1112
|
-
onClick: m[3] || (m[3] = (
|
|
1121
|
+
onClick: m[3] || (m[3] = (y) => s("command", { action: "add", row: p.value, first: h.value, last: M.value }))
|
|
1113
1122
|
}, l(o.value.addHeaderRow), 1),
|
|
1114
1123
|
a("button", {
|
|
1115
1124
|
type: "button",
|
|
1116
|
-
disabled:
|
|
1117
|
-
onClick: m[4] || (m[4] = (
|
|
1118
|
-
}, l(o.value.mergeHeader), 9,
|
|
1125
|
+
disabled: h.value >= M.value,
|
|
1126
|
+
onClick: m[4] || (m[4] = (y) => s("command", { action: "merge", row: p.value, first: h.value, last: M.value }))
|
|
1127
|
+
}, l(o.value.mergeHeader), 9, Zn),
|
|
1119
1128
|
a("button", {
|
|
1120
1129
|
type: "button",
|
|
1121
|
-
onClick: m[5] || (m[5] = (
|
|
1130
|
+
onClick: m[5] || (m[5] = (y) => s("command", { action: "split", row: p.value, first: h.value, last: M.value }))
|
|
1122
1131
|
}, l(o.value.splitHeader), 1)
|
|
1123
1132
|
])
|
|
1124
|
-
], 8,
|
|
1133
|
+
], 8, qn)
|
|
1125
1134
|
]));
|
|
1126
1135
|
}
|
|
1127
|
-
}),
|
|
1128
|
-
function
|
|
1129
|
-
const s =
|
|
1136
|
+
}), ta = /* @__PURE__ */ Fe(ea, [["__scopeId", "data-v-acd607ef"]]), Ce = (t) => `${t.pageIndex}:${t.componentIndex}`;
|
|
1137
|
+
function na(t, c, i) {
|
|
1138
|
+
const s = z([]), o = z(/* @__PURE__ */ new Set());
|
|
1130
1139
|
ee(() => t.value.id, () => {
|
|
1131
1140
|
s.value = [], o.value = /* @__PURE__ */ new Set();
|
|
1132
1141
|
});
|
|
1133
|
-
const p = (
|
|
1134
|
-
function
|
|
1135
|
-
const I = { pageIndex:
|
|
1136
|
-
if (
|
|
1137
|
-
const v = s.value.some((
|
|
1138
|
-
s.value = v ? s.value.filter((
|
|
1142
|
+
const p = (T) => !!T && o.value.has(Ce(T));
|
|
1143
|
+
function h(T) {
|
|
1144
|
+
const I = { pageIndex: T.pageIndex, componentIndex: T.componentIndex };
|
|
1145
|
+
if (T.additive && s.value.every((v) => v.pageIndex === T.pageIndex)) {
|
|
1146
|
+
const v = s.value.some((d) => Ce(d) === Ce(T));
|
|
1147
|
+
s.value = v ? s.value.filter((d) => Ce(d) !== Ce(T)) : [...s.value, I], c.value = v ? s.value.at(-1) : I;
|
|
1139
1148
|
} else
|
|
1140
|
-
s.value = [I],
|
|
1149
|
+
s.value = [I], c.value = I;
|
|
1141
1150
|
}
|
|
1142
|
-
const
|
|
1151
|
+
const M = F(() => s.value.filter((T) => !p(T)));
|
|
1143
1152
|
function f() {
|
|
1144
|
-
const
|
|
1153
|
+
const T = new Set(o.value), I = s.value.every(p);
|
|
1145
1154
|
for (const v of s.value)
|
|
1146
|
-
I ?
|
|
1147
|
-
o.value =
|
|
1148
|
-
}
|
|
1149
|
-
function m(
|
|
1150
|
-
|
|
1151
|
-
const v =
|
|
1152
|
-
v.forEach((_,
|
|
1153
|
-
const D =
|
|
1154
|
-
|
|
1155
|
+
I ? T.delete(Ce(v)) : T.add(Ce(v));
|
|
1156
|
+
o.value = T;
|
|
1157
|
+
}
|
|
1158
|
+
function m(T) {
|
|
1159
|
+
M.value.length < 2 || i((I) => {
|
|
1160
|
+
const v = M.value.map((_) => Te(I, _)).filter(Boolean), d = v.map(ye), C = Math.min(...d.map((_) => _.leftMm)), S = Math.min(...d.map((_) => _.topMm)), R = Math.max(...d.map((_) => _.leftMm + _.widthMm)), w = Math.max(...d.map((_) => _.topMm + _.heightMm));
|
|
1161
|
+
v.forEach((_, E) => {
|
|
1162
|
+
const D = d[E], H = { left: C, center: (C + R - D.widthMm) / 2, right: R - D.widthMm }, G = { top: S, middle: (S + w - D.heightMm) / 2, bottom: w - D.heightMm };
|
|
1163
|
+
T in H ? D.leftMm = H[T] : D.topMm = G[T], Ue(_, D);
|
|
1155
1164
|
});
|
|
1156
1165
|
});
|
|
1157
1166
|
}
|
|
1158
|
-
function
|
|
1159
|
-
|
|
1160
|
-
const v =
|
|
1161
|
-
let _ =
|
|
1162
|
-
for (const
|
|
1163
|
-
|
|
1167
|
+
function y(T) {
|
|
1168
|
+
M.value.length < 3 || i((I) => {
|
|
1169
|
+
const v = T === "horizontal" ? "leftMm" : "topMm", d = T === "horizontal" ? "widthMm" : "heightMm", C = M.value.map((E) => ({ component: Te(I, E), box: ye(Te(I, E)) })).sort((E, D) => E.box[v] - D.box[v]), S = C[0].box[v], w = (Math.max(...C.map((E) => E.box[v] + E.box[d])) - S - C.reduce((E, D) => E + D.box[d], 0)) / (C.length - 1);
|
|
1170
|
+
let _ = S;
|
|
1171
|
+
for (const E of C)
|
|
1172
|
+
E.box[v] = _, Ue(E.component, E.box), _ += E.box[d] + w;
|
|
1164
1173
|
});
|
|
1165
1174
|
}
|
|
1166
|
-
function T
|
|
1167
|
-
function
|
|
1168
|
-
if (
|
|
1169
|
-
const
|
|
1170
|
-
return v === void 0 ?
|
|
1175
|
+
function A(T, I, v) {
|
|
1176
|
+
function d(C) {
|
|
1177
|
+
if (C.pageIndex !== T) return C;
|
|
1178
|
+
const S = C.componentIndex;
|
|
1179
|
+
return v === void 0 ? S === I ? void 0 : { ...C, componentIndex: S > I ? S - 1 : S } : { ...C, componentIndex: S === I ? v : S === v ? I : S };
|
|
1171
1180
|
}
|
|
1172
|
-
o.value = new Set([...o.value].flatMap((
|
|
1173
|
-
const [
|
|
1174
|
-
return
|
|
1175
|
-
})), s.value = s.value.flatMap((
|
|
1176
|
-
const
|
|
1177
|
-
return
|
|
1181
|
+
o.value = new Set([...o.value].flatMap((C) => {
|
|
1182
|
+
const [S, R] = C.split(":").map(Number), w = d({ pageIndex: S, componentIndex: R });
|
|
1183
|
+
return w ? [Ce(w)] : [];
|
|
1184
|
+
})), s.value = s.value.flatMap((C) => {
|
|
1185
|
+
const S = d(C);
|
|
1186
|
+
return S ? [S] : [];
|
|
1178
1187
|
});
|
|
1179
1188
|
}
|
|
1180
1189
|
return { clearLocks: () => {
|
|
1181
1190
|
o.value = /* @__PURE__ */ new Set();
|
|
1182
|
-
}, selections: s, locked: p, allLocked:
|
|
1191
|
+
}, selections: s, locked: p, allLocked: F(() => !!s.value.length && s.value.every(p)), toggleLock: f, align: m, distribute: y, select: h, remap: A };
|
|
1183
1192
|
}
|
|
1184
|
-
function
|
|
1185
|
-
const i =
|
|
1186
|
-
() =>
|
|
1193
|
+
function aa(t, c) {
|
|
1194
|
+
const i = z("preview"), s = z(), o = z(0), p = F(() => !!t.value.template.pages[s.value?.pageIndex ?? o.value]?.flow), h = na(t, s, (d) => p.value ? !1 : c(d)), M = F(
|
|
1195
|
+
() => Te(t.value, s.value)
|
|
1187
1196
|
);
|
|
1188
1197
|
ee(t, () => {
|
|
1189
|
-
|
|
1198
|
+
M.value || (s.value = void 0), t.value.template.pages[o.value] || (o.value = 0);
|
|
1190
1199
|
});
|
|
1191
|
-
function f(
|
|
1192
|
-
|
|
1193
|
-
}
|
|
1194
|
-
function m(
|
|
1195
|
-
const
|
|
1196
|
-
return !
|
|
1197
|
-
const
|
|
1198
|
-
|
|
1200
|
+
function f(d) {
|
|
1201
|
+
h.select(d), o.value = d.pageIndex;
|
|
1202
|
+
}
|
|
1203
|
+
function m(d) {
|
|
1204
|
+
const C = s.value;
|
|
1205
|
+
return !C || h.locked(C) ? !1 : c((S) => {
|
|
1206
|
+
const R = Te(S, C);
|
|
1207
|
+
R && d(R, S);
|
|
1199
1208
|
});
|
|
1200
1209
|
}
|
|
1201
|
-
function
|
|
1202
|
-
p.value || m((
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1210
|
+
function y(d) {
|
|
1211
|
+
p.value || m((C, S) => {
|
|
1212
|
+
const R = S.template.pages[s.value.pageIndex];
|
|
1213
|
+
Ue(
|
|
1214
|
+
C,
|
|
1215
|
+
tt(d, R, C.kind === "list")
|
|
1207
1216
|
);
|
|
1208
1217
|
});
|
|
1209
1218
|
}
|
|
1210
|
-
function
|
|
1219
|
+
function A(d) {
|
|
1211
1220
|
if (t.value.template.pages[o.value]?.flow) return;
|
|
1212
|
-
let
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1217
|
-
}) && f({ pageIndex:
|
|
1218
|
-
}
|
|
1219
|
-
function
|
|
1221
|
+
let C = -1;
|
|
1222
|
+
const S = o.value;
|
|
1223
|
+
c((R) => {
|
|
1224
|
+
const w = R.template.pages[S].components;
|
|
1225
|
+
w.push(Gt(d)), C = w.length - 1;
|
|
1226
|
+
}) && f({ pageIndex: S, componentIndex: C });
|
|
1227
|
+
}
|
|
1228
|
+
function T() {
|
|
1220
1229
|
if (p.value) return;
|
|
1221
|
-
const
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1230
|
+
const d = s.value;
|
|
1231
|
+
d && !h.locked(d) && c((C) => {
|
|
1232
|
+
C.template.pages[d.pageIndex].components.splice(
|
|
1233
|
+
d.componentIndex,
|
|
1225
1234
|
1
|
|
1226
1235
|
);
|
|
1227
|
-
}) && (
|
|
1236
|
+
}) && (h.remap(d.pageIndex, d.componentIndex), s.value = void 0);
|
|
1228
1237
|
}
|
|
1229
1238
|
function I() {
|
|
1230
1239
|
if (p.value) return;
|
|
1231
|
-
const
|
|
1232
|
-
if (!
|
|
1233
|
-
let
|
|
1234
|
-
|
|
1235
|
-
const
|
|
1236
|
-
_.leftMm += 4, _.topMm += 4,
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
),
|
|
1240
|
-
}) && f({ pageIndex:
|
|
1241
|
-
}
|
|
1242
|
-
function v(
|
|
1240
|
+
const d = s.value;
|
|
1241
|
+
if (!d) return;
|
|
1242
|
+
let C = -1;
|
|
1243
|
+
c((S) => {
|
|
1244
|
+
const R = S.template.pages[d.pageIndex], w = JSON.parse(JSON.stringify(Te(S, d))), _ = ye(w);
|
|
1245
|
+
_.leftMm += 4, _.topMm += 4, Ue(
|
|
1246
|
+
w,
|
|
1247
|
+
tt(_, R, w.kind === "list")
|
|
1248
|
+
), w.kind === "list" ? delete w.id : (delete w.nid, delete w.rkey), R.components.push(w), C = R.components.length - 1;
|
|
1249
|
+
}) && f({ pageIndex: d.pageIndex, componentIndex: C });
|
|
1250
|
+
}
|
|
1251
|
+
function v(d) {
|
|
1243
1252
|
if (p.value) return;
|
|
1244
|
-
const
|
|
1245
|
-
if (!
|
|
1246
|
-
const
|
|
1247
|
-
t.value.template.pages[
|
|
1248
|
-
const
|
|
1249
|
-
|
|
1250
|
-
}) && (
|
|
1253
|
+
const C = s.value;
|
|
1254
|
+
if (!C || h.locked(C)) return;
|
|
1255
|
+
const S = C.componentIndex + d;
|
|
1256
|
+
t.value.template.pages[C.pageIndex]?.components[S] && c((R) => {
|
|
1257
|
+
const w = R.template.pages[C.pageIndex].components;
|
|
1258
|
+
w.splice(S, 0, w.splice(C.componentIndex, 1)[0]);
|
|
1259
|
+
}) && (h.remap(C.pageIndex, C.componentIndex, S), f({ pageIndex: C.pageIndex, componentIndex: S }));
|
|
1251
1260
|
}
|
|
1252
1261
|
return {
|
|
1253
|
-
...
|
|
1262
|
+
...h,
|
|
1254
1263
|
mode: i,
|
|
1255
1264
|
selection: s,
|
|
1256
1265
|
pageIndex: o,
|
|
1257
|
-
active:
|
|
1266
|
+
active: M,
|
|
1258
1267
|
geometryDisabled: p,
|
|
1259
1268
|
select: f,
|
|
1260
1269
|
mutate: m,
|
|
1261
|
-
geometry:
|
|
1262
|
-
insert:
|
|
1263
|
-
remove:
|
|
1270
|
+
geometry: y,
|
|
1271
|
+
insert: A,
|
|
1272
|
+
remove: T,
|
|
1264
1273
|
duplicate: I,
|
|
1265
1274
|
reorder: v
|
|
1266
1275
|
};
|
|
1267
1276
|
}
|
|
1268
|
-
function
|
|
1269
|
-
const { draft: s, lists: o, selected: p, activeList:
|
|
1277
|
+
function oa(t, c, i) {
|
|
1278
|
+
const { draft: s, lists: o, selected: p, activeList: h, blocked: M, jsonPending: f, error: m } = t, { section: y, activeIndex: A } = c, T = aa(s, t.transaction), {
|
|
1270
1279
|
mode: I,
|
|
1271
1280
|
selection: v,
|
|
1272
|
-
pageIndex:
|
|
1273
|
-
active:
|
|
1274
|
-
} =
|
|
1275
|
-
ee([
|
|
1276
|
-
|
|
1277
|
-
}), ee(v, (
|
|
1278
|
-
if (!
|
|
1281
|
+
pageIndex: d,
|
|
1282
|
+
active: C
|
|
1283
|
+
} = T, S = z("excel"), R = z(/* @__PURE__ */ new Set());
|
|
1284
|
+
ee([y, S], () => {
|
|
1285
|
+
y.value === "tools" && (R.value = /* @__PURE__ */ new Set([...R.value, S.value]));
|
|
1286
|
+
}), ee(v, (x) => {
|
|
1287
|
+
if (!x) return;
|
|
1279
1288
|
const k = o.value.findIndex(
|
|
1280
|
-
(
|
|
1289
|
+
(L) => L.pageIndex === x.pageIndex && L.componentIndex === x.componentIndex
|
|
1281
1290
|
);
|
|
1282
1291
|
k >= 0 && (p.value = k);
|
|
1283
|
-
}), ee([
|
|
1284
|
-
if (I.value !== "design" ||
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1292
|
+
}), ee([A, p, I, y], () => {
|
|
1293
|
+
if (I.value !== "design" || y.value !== "fields") return;
|
|
1294
|
+
const x = o.value[p.value];
|
|
1295
|
+
x && (v.value?.pageIndex !== x.pageIndex || v.value.componentIndex !== x.componentIndex) && T.select({ pageIndex: x.pageIndex, componentIndex: x.componentIndex });
|
|
1287
1296
|
});
|
|
1288
|
-
const
|
|
1289
|
-
() => t.editingReadonly.value ||
|
|
1290
|
-
), _ =
|
|
1291
|
-
() => i()?.[
|
|
1297
|
+
const w = F(
|
|
1298
|
+
() => t.editingReadonly.value || M.value || f.value
|
|
1299
|
+
), _ = F(
|
|
1300
|
+
() => i()?.[h.value?.dataset ?? ""]
|
|
1292
1301
|
);
|
|
1293
|
-
function
|
|
1294
|
-
I.value =
|
|
1302
|
+
function E(x) {
|
|
1303
|
+
I.value = x, y.value === "tools" && (y.value = x === "design" ? "component" : "fields");
|
|
1295
1304
|
}
|
|
1296
|
-
function D(
|
|
1297
|
-
if (!s.value.template.pages[
|
|
1305
|
+
function D(x) {
|
|
1306
|
+
if (!s.value.template.pages[x.pageIndex]?.components[x.componentIndex])
|
|
1298
1307
|
return;
|
|
1299
|
-
if (
|
|
1300
|
-
const
|
|
1301
|
-
(
|
|
1308
|
+
if (T.select(x), s.value.template.pages[x.pageIndex]?.components[x.componentIndex]?.kind === "list") {
|
|
1309
|
+
const L = o.value.findIndex(
|
|
1310
|
+
($) => $.pageIndex === x.pageIndex && $.componentIndex === x.componentIndex
|
|
1302
1311
|
);
|
|
1303
|
-
|
|
1304
|
-
} else
|
|
1305
|
-
}
|
|
1306
|
-
function H(
|
|
1307
|
-
const k =
|
|
1308
|
-
k.value && (
|
|
1309
|
-
}
|
|
1310
|
-
function G(
|
|
1311
|
-
s.value.template.pages[
|
|
1312
|
-
if (k.kind !== "list" &&
|
|
1313
|
-
const P =
|
|
1314
|
-
|
|
1312
|
+
L >= 0 && (p.value = L), y.value = "fields";
|
|
1313
|
+
} else y.value = "component";
|
|
1314
|
+
}
|
|
1315
|
+
function H(x) {
|
|
1316
|
+
const k = x.target;
|
|
1317
|
+
k.value && (T.insert(k.value), I.value = "design", y.value = "component", k.value = "");
|
|
1318
|
+
}
|
|
1319
|
+
function G(x) {
|
|
1320
|
+
s.value.template.pages[d.value]?.flow && ["leftMm", "topMm", "widthMm", "heightMm", "pageAnchor", "grid"].some((k) => k in x) || T.mutate((k, L) => {
|
|
1321
|
+
if (k.kind !== "list" && x.pageAnchor !== k.pageAnchor) {
|
|
1322
|
+
const P = L.template.pages[v.value.pageIndex];
|
|
1323
|
+
x.pageAnchor === "header" && (k.topMm = P.marginTopMm ?? 0), x.pageAnchor === "footer" && (k.topMm = Math.max(
|
|
1315
1324
|
0,
|
|
1316
1325
|
P.heightMm - (P.marginBottomMm ?? 0) - k.heightMm
|
|
1317
1326
|
));
|
|
1318
1327
|
}
|
|
1319
|
-
const
|
|
1320
|
-
for (const [P,
|
|
1321
|
-
|
|
1328
|
+
const $ = k;
|
|
1329
|
+
for (const [P, B] of Object.entries(x))
|
|
1330
|
+
B === void 0 ? delete $[P] : $[P] = B;
|
|
1322
1331
|
});
|
|
1323
1332
|
}
|
|
1324
|
-
function
|
|
1333
|
+
function U(x) {
|
|
1325
1334
|
const k = o.value[p.value];
|
|
1326
|
-
k && t.transaction((
|
|
1327
|
-
|
|
1335
|
+
k && t.transaction((L) => {
|
|
1336
|
+
L.template.pages[k.pageIndex].components[k.componentIndex] = x;
|
|
1328
1337
|
});
|
|
1329
1338
|
}
|
|
1330
|
-
function
|
|
1331
|
-
const k =
|
|
1339
|
+
function X(x) {
|
|
1340
|
+
const k = h.value;
|
|
1332
1341
|
if (!k || s.value.template.pages[o.value[p.value]?.pageIndex ?? -1]?.flow) return;
|
|
1333
|
-
const
|
|
1342
|
+
const L = JSON.parse(JSON.stringify(k));
|
|
1334
1343
|
try {
|
|
1335
|
-
|
|
1336
|
-
} catch (
|
|
1337
|
-
m.value =
|
|
1344
|
+
Ft(L, A.value, A.value + x) && (U(L), c.activate(A.value + x));
|
|
1345
|
+
} catch ($) {
|
|
1346
|
+
m.value = $ instanceof Error ? $.message : String($);
|
|
1338
1347
|
}
|
|
1339
1348
|
}
|
|
1340
|
-
function
|
|
1349
|
+
function te(x) {
|
|
1341
1350
|
const k = o.value[p.value];
|
|
1342
|
-
!k || s.value.template.pages[k.pageIndex]?.flow || t.transaction((
|
|
1343
|
-
const
|
|
1344
|
-
|
|
1351
|
+
!k || s.value.template.pages[k.pageIndex]?.flow || t.transaction((L) => {
|
|
1352
|
+
const $ = L.template.pages[k.pageIndex].components[k.componentIndex];
|
|
1353
|
+
$?.kind === "list" && (x.action === "add" ? Nt($) : x.action === "merge" ? zt($, x.row, x.first, x.last) : Ot($, x.row, x.first));
|
|
1345
1354
|
});
|
|
1346
1355
|
}
|
|
1347
|
-
function n(
|
|
1348
|
-
const k = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(
|
|
1349
|
-
if (!(
|
|
1350
|
-
const P =
|
|
1351
|
-
(
|
|
1356
|
+
function n(x) {
|
|
1357
|
+
const k = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(x.path ?? ""), L = x.pageIndex ?? (k ? Number(k[1]) : void 0), $ = x.componentIndex ?? (k ? Number(k[2]) : void 0);
|
|
1358
|
+
if (!(L === void 0 || $ === void 0) && (I.value = "design", D({ pageIndex: L, componentIndex: $ }), x.field)) {
|
|
1359
|
+
const P = h.value?.columns.findIndex(
|
|
1360
|
+
(B) => B.field === x.field
|
|
1352
1361
|
);
|
|
1353
|
-
P !== void 0 && P >= 0 &&
|
|
1362
|
+
P !== void 0 && P >= 0 && c.activate(P);
|
|
1354
1363
|
}
|
|
1355
1364
|
}
|
|
1356
1365
|
return {
|
|
1357
1366
|
mode: I,
|
|
1358
|
-
setMode:
|
|
1367
|
+
setMode: E,
|
|
1359
1368
|
canvasSelection: v,
|
|
1360
|
-
canvasPage:
|
|
1361
|
-
canvasActive:
|
|
1362
|
-
tool:
|
|
1363
|
-
visitedTools:
|
|
1364
|
-
editDisabled:
|
|
1369
|
+
canvasPage: d,
|
|
1370
|
+
canvasActive: C,
|
|
1371
|
+
tool: S,
|
|
1372
|
+
visitedTools: R,
|
|
1373
|
+
editDisabled: w,
|
|
1365
1374
|
dataSchema: _,
|
|
1366
1375
|
chooseCanvas: D,
|
|
1367
1376
|
insertComponent: H,
|
|
1368
1377
|
patchCanvas: G,
|
|
1369
|
-
changeList:
|
|
1370
|
-
moveColumn:
|
|
1371
|
-
headerCommand:
|
|
1378
|
+
changeList: U,
|
|
1379
|
+
moveColumn: X,
|
|
1380
|
+
headerCommand: te,
|
|
1372
1381
|
locateReview: n,
|
|
1373
|
-
canvas:
|
|
1382
|
+
canvas: T
|
|
1374
1383
|
};
|
|
1375
1384
|
}
|
|
1376
|
-
function
|
|
1385
|
+
function la(t, c, i) {
|
|
1377
1386
|
if (!t.length) return;
|
|
1378
|
-
const s = Math.max(0, t.indexOf(
|
|
1387
|
+
const s = Math.max(0, t.indexOf(c)), p = {
|
|
1379
1388
|
ArrowDown: Math.min(s + 1, t.length - 1),
|
|
1380
1389
|
ArrowUp: Math.max(s - 1, 0),
|
|
1381
1390
|
Home: 0,
|
|
@@ -1383,159 +1392,159 @@ function na(t, d, i) {
|
|
|
1383
1392
|
}[i];
|
|
1384
1393
|
return p === void 0 ? void 0 : t[p];
|
|
1385
1394
|
}
|
|
1386
|
-
function
|
|
1387
|
-
const s =
|
|
1388
|
-
function m(
|
|
1389
|
-
const
|
|
1395
|
+
function ia(t, c, i) {
|
|
1396
|
+
const s = z(!1), o = z(t.activeIndex.value), p = z(null), h = z(null), M = z(null), f = z(null);
|
|
1397
|
+
function m(R = !1) {
|
|
1398
|
+
const w = f.value, _ = w?.querySelector(
|
|
1390
1399
|
`button[data-column-index="${o.value}"]`
|
|
1391
1400
|
);
|
|
1392
|
-
if (!
|
|
1393
|
-
|
|
1394
|
-
const
|
|
1395
|
-
D.top < H ?
|
|
1401
|
+
if (!w || !_) return;
|
|
1402
|
+
R && _.focus({ preventScroll: !0 });
|
|
1403
|
+
const E = w.getBoundingClientRect(), D = _.getBoundingClientRect(), H = E.top + w.clientTop, G = H + w.clientHeight;
|
|
1404
|
+
D.top < H ? w.scrollTop += D.top - H : D.bottom > G && (w.scrollTop += D.bottom - G);
|
|
1396
1405
|
}
|
|
1397
|
-
async function
|
|
1398
|
-
s.value && (s.value = !1,
|
|
1406
|
+
async function y(R = !1) {
|
|
1407
|
+
s.value && (s.value = !1, R && (await ce(), p.value?.focus({ preventScroll: !0 })));
|
|
1399
1408
|
}
|
|
1400
|
-
async function
|
|
1401
|
-
if (s.value) return
|
|
1402
|
-
const
|
|
1403
|
-
o.value =
|
|
1409
|
+
async function A() {
|
|
1410
|
+
if (s.value) return y(!0);
|
|
1411
|
+
const R = i.value.map((w) => w.index);
|
|
1412
|
+
o.value = R.includes(t.activeIndex.value) ? t.activeIndex.value : R[0] ?? -1, s.value = !0, await ce(), M.value?.focus({ preventScroll: !0 }), m();
|
|
1404
1413
|
}
|
|
1405
|
-
function R
|
|
1406
|
-
t.activate(
|
|
1414
|
+
function T(R) {
|
|
1415
|
+
t.activate(R), y(!0);
|
|
1407
1416
|
}
|
|
1408
|
-
function I(
|
|
1409
|
-
s.value && (
|
|
1417
|
+
function I(R) {
|
|
1418
|
+
s.value && (R.preventDefault(), R.stopPropagation(), y(!0));
|
|
1410
1419
|
}
|
|
1411
|
-
async function v(
|
|
1412
|
-
const
|
|
1420
|
+
async function v(R) {
|
|
1421
|
+
const w = la(
|
|
1413
1422
|
i.value.map((_) => _.index),
|
|
1414
1423
|
o.value,
|
|
1415
|
-
|
|
1424
|
+
R.key
|
|
1416
1425
|
);
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1419
|
-
async function
|
|
1420
|
-
if (!["ArrowDown", "ArrowUp", "Enter"].includes(
|
|
1421
|
-
|
|
1422
|
-
const
|
|
1423
|
-
if (
|
|
1424
|
-
if (
|
|
1425
|
-
|
|
1426
|
+
w !== void 0 && (o.value = w, R.preventDefault(), await ce(), m(!0));
|
|
1427
|
+
}
|
|
1428
|
+
async function d(R) {
|
|
1429
|
+
if (!["ArrowDown", "ArrowUp", "Enter"].includes(R.key)) return;
|
|
1430
|
+
R.preventDefault(), R.stopPropagation();
|
|
1431
|
+
const w = i.value.map((_) => _.index);
|
|
1432
|
+
if (w.length) {
|
|
1433
|
+
if (R.key === "Enter") {
|
|
1434
|
+
w.includes(o.value) && T(o.value);
|
|
1426
1435
|
return;
|
|
1427
1436
|
}
|
|
1428
|
-
|
|
1437
|
+
R.key === "ArrowUp" && (o.value = w.at(-1)), await ce(), m(!0);
|
|
1429
1438
|
}
|
|
1430
1439
|
}
|
|
1431
|
-
function
|
|
1432
|
-
const
|
|
1433
|
-
!s.value ||
|
|
1440
|
+
function C(R) {
|
|
1441
|
+
const w = R.target;
|
|
1442
|
+
!s.value || h.value?.contains(w) || p.value?.contains(w) || y();
|
|
1434
1443
|
}
|
|
1435
|
-
function
|
|
1436
|
-
const
|
|
1437
|
-
!
|
|
1444
|
+
function S(R) {
|
|
1445
|
+
const w = R.relatedTarget;
|
|
1446
|
+
!w || h.value?.contains(w) || p.value?.contains(w) || y();
|
|
1438
1447
|
}
|
|
1439
|
-
return ee(i, (
|
|
1440
|
-
|
|
1441
|
-
}), ee(
|
|
1442
|
-
|
|
1443
|
-
}),
|
|
1448
|
+
return ee(i, (R) => {
|
|
1449
|
+
R.some((w) => w.index === o.value) || (o.value = R[0]?.index ?? -1);
|
|
1450
|
+
}), ee(c, () => {
|
|
1451
|
+
y();
|
|
1452
|
+
}), pt(() => document.addEventListener("pointerdown", C)), Le(() => document.removeEventListener("pointerdown", C)), {
|
|
1444
1453
|
open: s,
|
|
1445
1454
|
cursor: o,
|
|
1446
1455
|
trigger: p,
|
|
1447
|
-
panel:
|
|
1448
|
-
search:
|
|
1456
|
+
panel: h,
|
|
1457
|
+
search: M,
|
|
1449
1458
|
list: f,
|
|
1450
|
-
toggle:
|
|
1451
|
-
close:
|
|
1452
|
-
choose:
|
|
1459
|
+
toggle: A,
|
|
1460
|
+
close: y,
|
|
1461
|
+
choose: T,
|
|
1453
1462
|
escape: I,
|
|
1454
1463
|
navigate: v,
|
|
1455
|
-
searchKeydown:
|
|
1456
|
-
leave:
|
|
1464
|
+
searchKeydown: d,
|
|
1465
|
+
leave: S
|
|
1457
1466
|
};
|
|
1458
1467
|
}
|
|
1459
|
-
function
|
|
1460
|
-
const o =
|
|
1468
|
+
function sa(t, c, i, s) {
|
|
1469
|
+
const o = z(0), p = z(""), h = z([]), M = F(
|
|
1461
1470
|
() => t.value.template.pages.flatMap(
|
|
1462
|
-
(
|
|
1463
|
-
(
|
|
1471
|
+
(w, _) => w.components.flatMap(
|
|
1472
|
+
(E, D) => E.kind === "list" ? [{ component: E, pageIndex: _, componentIndex: D }] : []
|
|
1464
1473
|
)
|
|
1465
1474
|
)
|
|
1466
|
-
), f =
|
|
1467
|
-
() =>
|
|
1468
|
-
), m =
|
|
1469
|
-
const
|
|
1470
|
-
if (!
|
|
1471
|
-
const _ =
|
|
1472
|
-
(
|
|
1475
|
+
), f = F(
|
|
1476
|
+
() => M.value[o.value]?.component
|
|
1477
|
+
), m = F(() => {
|
|
1478
|
+
const w = f.value;
|
|
1479
|
+
if (!w) return [];
|
|
1480
|
+
const _ = w.columns.map(
|
|
1481
|
+
(E) => E.headerStyle?.align ?? E.headerAlign ?? w.headerStyle?.align ?? w.headerAlign ?? E.style?.align ?? "center"
|
|
1473
1482
|
);
|
|
1474
|
-
if (
|
|
1475
|
-
for (const
|
|
1476
|
-
for (let D =
|
|
1477
|
-
_[D] =
|
|
1483
|
+
if (w.headerGrid && c())
|
|
1484
|
+
for (const E of Se(w.headerGrid, w.widthMm, 100).cells)
|
|
1485
|
+
for (let D = E.ci; D < E.ci + (E.cell.colSpan ?? 1); D++)
|
|
1486
|
+
_[D] = E.cell.style?.align ?? "left";
|
|
1478
1487
|
return _;
|
|
1479
|
-
}),
|
|
1480
|
-
const
|
|
1481
|
-
return (f.value?.columns ?? []).flatMap((_,
|
|
1488
|
+
}), y = F(() => {
|
|
1489
|
+
const w = p.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
|
|
1490
|
+
return (f.value?.columns ?? []).flatMap((_, E) => {
|
|
1482
1491
|
const D = `${_.header} ${_.field}`.toLocaleLowerCase();
|
|
1483
|
-
return
|
|
1492
|
+
return w.every((H) => D.includes(H)) ? [{ column: _, index: E }] : [];
|
|
1484
1493
|
});
|
|
1485
1494
|
});
|
|
1486
|
-
function
|
|
1487
|
-
|
|
1495
|
+
function A(w, _) {
|
|
1496
|
+
h.value = _ ? [.../* @__PURE__ */ new Set([...h.value, w])] : h.value.filter((E) => E !== w);
|
|
1488
1497
|
}
|
|
1489
|
-
function
|
|
1490
|
-
for (const _ of
|
|
1498
|
+
function T(w) {
|
|
1499
|
+
for (const _ of y.value) A(_.index, w);
|
|
1491
1500
|
}
|
|
1492
1501
|
function I() {
|
|
1493
|
-
|
|
1502
|
+
h.value = [];
|
|
1494
1503
|
}
|
|
1495
|
-
function v(
|
|
1504
|
+
function v(w, _, E) {
|
|
1496
1505
|
if (!i()) return;
|
|
1497
|
-
const D =
|
|
1506
|
+
const D = M.value[o.value];
|
|
1498
1507
|
if ((_ === "widthMm" || _ === "hidden") && D && t.value.template.pages[D.pageIndex]?.flow) return;
|
|
1499
|
-
const H = f.value?.columns[
|
|
1500
|
-
H && (_ === "hidden" &&
|
|
1501
|
-
(G,
|
|
1502
|
-
) || (Object.assign(H, { [_]: _ === "widthMm" ? Number(
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
), _ === "widthMm" &&
|
|
1506
|
-
}
|
|
1507
|
-
function
|
|
1508
|
-
const
|
|
1509
|
-
if (!
|
|
1510
|
-
const _ =
|
|
1511
|
-
_.headerGrid && (_.headerGrid.colWidthsMm = D),
|
|
1512
|
-
|
|
1508
|
+
const H = f.value?.columns[w];
|
|
1509
|
+
H && (_ === "hidden" && E === !0 && !f.value?.columns.some(
|
|
1510
|
+
(G, U) => U !== w && !G.hidden
|
|
1511
|
+
) || (Object.assign(H, { [_]: _ === "widthMm" ? Number(E) : E }), _ === "header" && C(w, String(E)), _ === "headerAlign" && S(
|
|
1512
|
+
w,
|
|
1513
|
+
E
|
|
1514
|
+
), _ === "widthMm" && d(), s()));
|
|
1515
|
+
}
|
|
1516
|
+
function d() {
|
|
1517
|
+
const w = M.value[o.value];
|
|
1518
|
+
if (!w) return;
|
|
1519
|
+
const _ = w.component, E = t.value.template.pages[w.pageIndex], D = _.columns.map((H) => H.widthMm);
|
|
1520
|
+
_.headerGrid && (_.headerGrid.colWidthsMm = D), E.layout === "wide" && D.every((H) => Number.isFinite(H) && H > 0) && (_.widthMm = D.reduce((H, G) => H + G, 0), E.widthMm = Math.max(
|
|
1521
|
+
...E.components.map(
|
|
1513
1522
|
(H) => H.leftMm + H.widthMm
|
|
1514
1523
|
)
|
|
1515
|
-
) + (
|
|
1524
|
+
) + (E.marginRightMm ?? 0));
|
|
1516
1525
|
}
|
|
1517
|
-
function
|
|
1518
|
-
const
|
|
1519
|
-
if (
|
|
1520
|
-
const H =
|
|
1521
|
-
H && (Object.assign(H.cell, { text: _, rawText: _, value: _ }),
|
|
1526
|
+
function C(w, _) {
|
|
1527
|
+
const E = f.value;
|
|
1528
|
+
if (!E?.headerGrid) return;
|
|
1529
|
+
const H = Se(E.headerGrid, E.widthMm, 100).cells.filter(({ ci: G, cell: U }) => G <= w && G + (U.colSpan ?? 1) > w).slice(-1)[0];
|
|
1530
|
+
H && (Object.assign(H.cell, { text: _, rawText: _, value: _ }), E.columns.slice(H.ci, H.ci + (H.cell.colSpan ?? 1)).forEach((G) => {
|
|
1522
1531
|
G.header = _;
|
|
1523
1532
|
}));
|
|
1524
1533
|
}
|
|
1525
|
-
function
|
|
1526
|
-
const
|
|
1527
|
-
if (D?.headerStyle?.align !== void 0 && (D.headerStyle = { ...D.headerStyle, align: _ }),
|
|
1528
|
-
const G =
|
|
1529
|
-
G && (G.cell.style = { ...G.cell.style, align: _ },
|
|
1530
|
-
|
|
1534
|
+
function S(w, _) {
|
|
1535
|
+
const E = f.value, D = E?.columns[w];
|
|
1536
|
+
if (D?.headerStyle?.align !== void 0 && (D.headerStyle = { ...D.headerStyle, align: _ }), !E?.headerGrid) return;
|
|
1537
|
+
const G = Se(E.headerGrid, E.widthMm, 100).cells.filter(({ ci: U, cell: X }) => U <= w && U + (X.colSpan ?? 1) > w).slice(-1)[0];
|
|
1538
|
+
G && (G.cell.style = { ...G.cell.style, align: _ }, E.columns.slice(G.ci, G.ci + (G.cell.colSpan ?? 1)).forEach((U) => {
|
|
1539
|
+
U.headerAlign = _, U.headerStyle?.align !== void 0 && (U.headerStyle = { ...U.headerStyle, align: _ });
|
|
1531
1540
|
}));
|
|
1532
1541
|
}
|
|
1533
|
-
function
|
|
1534
|
-
if (!(!i() ||
|
|
1535
|
-
for (const
|
|
1536
|
-
const D = f.value?.columns[
|
|
1537
|
-
D && (Object.assign(D, { [
|
|
1538
|
-
|
|
1542
|
+
function R(w, _) {
|
|
1543
|
+
if (!(!i() || w === "headerAlign" && _ === "auto")) {
|
|
1544
|
+
for (const E of h.value) {
|
|
1545
|
+
const D = f.value?.columns[E];
|
|
1546
|
+
D && (Object.assign(D, { [w]: _ }), w === "headerAlign" && S(
|
|
1547
|
+
E,
|
|
1539
1548
|
_
|
|
1540
1549
|
));
|
|
1541
1550
|
}
|
|
@@ -1545,108 +1554,108 @@ function oa(t, d, i, s) {
|
|
|
1545
1554
|
return {
|
|
1546
1555
|
selected: o,
|
|
1547
1556
|
query: p,
|
|
1548
|
-
selectedColumns:
|
|
1549
|
-
lists:
|
|
1557
|
+
selectedColumns: h,
|
|
1558
|
+
lists: M,
|
|
1550
1559
|
activeList: f,
|
|
1551
1560
|
headerAlignments: m,
|
|
1552
|
-
visibleColumns:
|
|
1553
|
-
toggleColumn:
|
|
1554
|
-
selectVisible:
|
|
1561
|
+
visibleColumns: y,
|
|
1562
|
+
toggleColumn: A,
|
|
1563
|
+
selectVisible: T,
|
|
1555
1564
|
clearSelection: I,
|
|
1556
1565
|
setColumn: v,
|
|
1557
|
-
alignColumns:
|
|
1566
|
+
alignColumns: R
|
|
1558
1567
|
};
|
|
1559
1568
|
}
|
|
1560
|
-
function
|
|
1569
|
+
function $e(t) {
|
|
1561
1570
|
return t.kind === "snapshot" ? t.value.length * 2 : (t.removed.length + t.inserted.length) * 2 + 16;
|
|
1562
1571
|
}
|
|
1563
|
-
function
|
|
1564
|
-
const s = { kind: "snapshot", value:
|
|
1572
|
+
function ra(t, c, i = !1) {
|
|
1573
|
+
const s = { kind: "snapshot", value: c };
|
|
1565
1574
|
if (i) return s;
|
|
1566
1575
|
let o = 0;
|
|
1567
|
-
const p = Math.min(t.length,
|
|
1568
|
-
for (; o < p && t.charCodeAt(o) ===
|
|
1569
|
-
let
|
|
1570
|
-
for (;
|
|
1571
|
-
|
|
1572
|
-
const f = { kind: "patch", start: o, removed: t.slice(o,
|
|
1573
|
-
return
|
|
1576
|
+
const p = Math.min(t.length, c.length);
|
|
1577
|
+
for (; o < p && t.charCodeAt(o) === c.charCodeAt(o); ) o++;
|
|
1578
|
+
let h = t.length, M = c.length;
|
|
1579
|
+
for (; h > o && M > o && t.charCodeAt(h - 1) === c.charCodeAt(M - 1); )
|
|
1580
|
+
h--, M--;
|
|
1581
|
+
const f = { kind: "patch", start: o, removed: t.slice(o, h), inserted: c.slice(o, M) };
|
|
1582
|
+
return $e(f) < $e(s) ? f : s;
|
|
1574
1583
|
}
|
|
1575
|
-
function Be(t,
|
|
1576
|
-
if (
|
|
1577
|
-
const s = i ?
|
|
1578
|
-
return t.slice(0,
|
|
1584
|
+
function Be(t, c, i = !1) {
|
|
1585
|
+
if (c.kind === "snapshot") return c.value;
|
|
1586
|
+
const s = i ? c.inserted : c.removed, o = i ? c.removed : c.inserted;
|
|
1587
|
+
return t.slice(0, c.start) + o + t.slice(c.start + s.length);
|
|
1579
1588
|
}
|
|
1580
|
-
function
|
|
1581
|
-
if (![
|
|
1582
|
-
const i =
|
|
1589
|
+
function da(t, c = { entries: 100, bytes: 16 * 1024 * 1024 }) {
|
|
1590
|
+
if (![c.entries, c.bytes].every((v) => Number.isSafeInteger(v) && v > 0)) throw new RangeError("History budgets must be positive safe integers");
|
|
1591
|
+
const i = ht([{ kind: "snapshot", value: t }]), s = z(0), o = z(t), p = F(() => s.value > 0), h = F(() => s.value + 1 < i.value.length), M = F(() => o.value), f = F(() => i.value.reduce((v, d) => v + $e(d), 0));
|
|
1583
1592
|
function m(v) {
|
|
1584
1593
|
i.value = [{ kind: "snapshot", value: v }], s.value = 0, o.value = v;
|
|
1585
1594
|
}
|
|
1586
|
-
function
|
|
1587
|
-
let
|
|
1588
|
-
for (;
|
|
1589
|
-
let
|
|
1590
|
-
for (;
|
|
1591
|
-
return
|
|
1592
|
-
}
|
|
1593
|
-
function
|
|
1594
|
-
let
|
|
1595
|
-
for (; v.length > 1 && (v.length >
|
|
1596
|
-
const
|
|
1597
|
-
|
|
1595
|
+
function y(v) {
|
|
1596
|
+
let d = v;
|
|
1597
|
+
for (; d > 0 && i.value[d].kind !== "snapshot"; ) d--;
|
|
1598
|
+
let C = "";
|
|
1599
|
+
for (; d <= v; d++) C = Be(C, i.value[d]);
|
|
1600
|
+
return C;
|
|
1601
|
+
}
|
|
1602
|
+
function A(v) {
|
|
1603
|
+
let d = v.reduce((C, S) => C + $e(S), 0);
|
|
1604
|
+
for (; v.length > 1 && (v.length > c.entries || d > c.bytes); ) {
|
|
1605
|
+
const C = v[0], S = v[1], R = { kind: "snapshot", value: Be(C.value, S) };
|
|
1606
|
+
d += $e(R) - $e(C) - $e(S), v.splice(0, 2, R);
|
|
1598
1607
|
}
|
|
1599
1608
|
return v;
|
|
1600
1609
|
}
|
|
1601
|
-
function
|
|
1610
|
+
function T(v) {
|
|
1602
1611
|
if (o.value === v) return;
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1612
|
+
const d = i.value.slice(0, s.value + 1);
|
|
1613
|
+
d.push(ra(o.value, v, d.length % 20 === 0)), i.value = A(d), s.value = i.value.length - 1, o.value = v;
|
|
1605
1614
|
}
|
|
1606
1615
|
function I(v) {
|
|
1607
|
-
if (v < 0 ? !p.value : !
|
|
1608
|
-
const
|
|
1609
|
-
return v < 0 &&
|
|
1616
|
+
if (v < 0 ? !p.value : !h.value) return;
|
|
1617
|
+
const d = i.value[s.value];
|
|
1618
|
+
return v < 0 && d.kind === "patch" ? o.value = Be(o.value, d, !0) : v > 0 ? o.value = Be(o.value, i.value[s.value + 1]) : o.value = y(s.value - 1), s.value += v, o.value;
|
|
1610
1619
|
}
|
|
1611
|
-
return { canUndo: p, canRedo:
|
|
1620
|
+
return { canUndo: p, canRedo: h, current: M, retainedBytes: f, reset: m, record: T, move: I };
|
|
1612
1621
|
}
|
|
1613
|
-
function
|
|
1614
|
-
const
|
|
1622
|
+
function ua(t) {
|
|
1623
|
+
const c = ht(null), i = z(!1);
|
|
1615
1624
|
let s, o = 0;
|
|
1616
1625
|
function p(f) {
|
|
1617
|
-
s?.(f), s = void 0,
|
|
1626
|
+
s?.(f), s = void 0, c.value = null;
|
|
1618
1627
|
}
|
|
1619
|
-
function
|
|
1628
|
+
function h() {
|
|
1620
1629
|
o++, p(!1), i.value = !1;
|
|
1621
1630
|
}
|
|
1622
|
-
async function
|
|
1623
|
-
|
|
1624
|
-
const m = o,
|
|
1631
|
+
async function M(f) {
|
|
1632
|
+
h();
|
|
1633
|
+
const m = o, y = t();
|
|
1625
1634
|
i.value = !0;
|
|
1626
1635
|
try {
|
|
1627
|
-
const
|
|
1628
|
-
if (s =
|
|
1629
|
-
|
|
1636
|
+
const A = await new Promise((T, I) => {
|
|
1637
|
+
if (s = T, !y) {
|
|
1638
|
+
c.value = f;
|
|
1630
1639
|
return;
|
|
1631
1640
|
}
|
|
1632
|
-
Promise.resolve().then(() => o === m ?
|
|
1641
|
+
Promise.resolve().then(() => o === m ? y(f) : !1).then((v) => {
|
|
1633
1642
|
o === m && p(v === !0);
|
|
1634
1643
|
}, (v) => {
|
|
1635
|
-
o === m && (s = void 0,
|
|
1644
|
+
o === m && (s = void 0, c.value = null, I(v));
|
|
1636
1645
|
});
|
|
1637
1646
|
});
|
|
1638
|
-
return o === m &&
|
|
1647
|
+
return o === m && A === !0;
|
|
1639
1648
|
} finally {
|
|
1640
1649
|
o === m && (i.value = !1);
|
|
1641
1650
|
}
|
|
1642
1651
|
}
|
|
1643
|
-
return
|
|
1652
|
+
return Le(h), { confirmation: c, pending: i, decide: p, request: M, cancel: h };
|
|
1644
1653
|
}
|
|
1645
|
-
function
|
|
1646
|
-
const i =
|
|
1647
|
-
...
|
|
1654
|
+
function ca(t, c) {
|
|
1655
|
+
const i = z(ae(t.modelValue)), s = z(ke(i.value)), o = z(ke(i.value)), p = z(""), h = z(!1), M = F(() => ({
|
|
1656
|
+
...Je,
|
|
1648
1657
|
...t.messages
|
|
1649
|
-
})), f =
|
|
1658
|
+
})), f = F(() => ({
|
|
1650
1659
|
showExport: !1,
|
|
1651
1660
|
showPrint: !1,
|
|
1652
1661
|
showPdfWindow: !1,
|
|
@@ -1665,39 +1674,39 @@ function ra(t, d) {
|
|
|
1665
1674
|
...t.preview?.theme
|
|
1666
1675
|
}
|
|
1667
1676
|
}));
|
|
1668
|
-
|
|
1677
|
+
Et({
|
|
1669
1678
|
get defaults() {
|
|
1670
1679
|
return f.value;
|
|
1671
1680
|
}
|
|
1672
1681
|
});
|
|
1673
|
-
let m,
|
|
1674
|
-
const
|
|
1675
|
-
() =>
|
|
1676
|
-
),
|
|
1682
|
+
let m, y = 0;
|
|
1683
|
+
const A = F(
|
|
1684
|
+
() => ct(i.value)
|
|
1685
|
+
), T = F(() => {
|
|
1677
1686
|
try {
|
|
1678
|
-
return
|
|
1687
|
+
return ke(i.value) !== s.value;
|
|
1679
1688
|
} catch {
|
|
1680
1689
|
return !0;
|
|
1681
1690
|
}
|
|
1682
|
-
}), I =
|
|
1683
|
-
function
|
|
1684
|
-
|
|
1691
|
+
}), I = z(o.value), v = F(() => o.value !== I.value), d = z({}), C = z(0), S = z(0), R = F(() => Object.values(d.value).some(Boolean)), w = F(() => Object.keys(d.value).filter((j) => d.value[j]));
|
|
1692
|
+
function _(j, W) {
|
|
1693
|
+
d.value = { ...d.value, [j]: W }, C.value++;
|
|
1685
1694
|
}
|
|
1686
|
-
const
|
|
1687
|
-
() =>
|
|
1688
|
-
),
|
|
1695
|
+
const E = F(
|
|
1696
|
+
() => T.value || o.value !== I.value || R.value
|
|
1697
|
+
), D = () => JSON.stringify({
|
|
1689
1698
|
document: i.value,
|
|
1690
1699
|
json: o.value,
|
|
1691
1700
|
appliedJson: I.value
|
|
1692
|
-
}),
|
|
1701
|
+
}), H = da(D()), G = ua(() => t.beforeDiscard), U = F(() => h.value || G.pending.value), X = () => !t.readonly && !U.value && !v.value, te = sa(
|
|
1693
1702
|
i,
|
|
1694
|
-
() =>
|
|
1695
|
-
|
|
1703
|
+
() => A.value.ok,
|
|
1704
|
+
X,
|
|
1696
1705
|
se
|
|
1697
|
-
), { selected:
|
|
1698
|
-
ee(
|
|
1699
|
-
const
|
|
1700
|
-
() =>
|
|
1706
|
+
), { selected: n, lists: x, activeList: k, headerAlignments: L, setColumn: $ } = te;
|
|
1707
|
+
ee(n, () => te.clearSelection());
|
|
1708
|
+
const P = F(
|
|
1709
|
+
() => A.value.ok ? Rt({
|
|
1701
1710
|
draft: {
|
|
1702
1711
|
template: i.value.template,
|
|
1703
1712
|
datasets: t.datasets ?? {},
|
|
@@ -1705,261 +1714,270 @@ function ra(t, d) {
|
|
|
1705
1714
|
}
|
|
1706
1715
|
}) : void 0
|
|
1707
1716
|
);
|
|
1708
|
-
function
|
|
1709
|
-
|
|
1717
|
+
function B() {
|
|
1718
|
+
y++, m?.abort(), m = void 0, h.value = !1;
|
|
1710
1719
|
}
|
|
1711
|
-
let
|
|
1712
|
-
async function
|
|
1713
|
-
if (!
|
|
1714
|
-
const Y =
|
|
1720
|
+
let Z = 0;
|
|
1721
|
+
async function he(j = "replace", W) {
|
|
1722
|
+
if (!E.value) return !0;
|
|
1723
|
+
const Y = D(), pe = C.value;
|
|
1715
1724
|
try {
|
|
1716
|
-
return await
|
|
1717
|
-
reason:
|
|
1725
|
+
return await G.request({
|
|
1726
|
+
reason: j,
|
|
1718
1727
|
document: JSON.parse(
|
|
1719
1728
|
JSON.stringify(i.value)
|
|
1720
1729
|
),
|
|
1721
|
-
replacement:
|
|
1730
|
+
replacement: W ? ae(W) : void 0,
|
|
1722
1731
|
pendingLocalChanges: !0
|
|
1723
|
-
}) && Y ===
|
|
1724
|
-
} catch (
|
|
1725
|
-
return p.value =
|
|
1732
|
+
}) && Y === D() && pe === C.value;
|
|
1733
|
+
} catch (J) {
|
|
1734
|
+
return p.value = J instanceof Error ? J.message : String(J), !1;
|
|
1726
1735
|
}
|
|
1727
1736
|
}
|
|
1728
|
-
function
|
|
1729
|
-
|
|
1737
|
+
function fe(j) {
|
|
1738
|
+
B(), i.value = j, s.value = ke(j), o.value = s.value, I.value = o.value, p.value = "", n.value = 0, te.clearSelection(), d.value = {}, C.value++, S.value++, H.reset(D());
|
|
1730
1739
|
}
|
|
1731
1740
|
ee(
|
|
1732
1741
|
() => t.modelValue,
|
|
1733
|
-
async (
|
|
1734
|
-
let
|
|
1742
|
+
async (j) => {
|
|
1743
|
+
let W;
|
|
1735
1744
|
try {
|
|
1736
|
-
|
|
1737
|
-
} catch (
|
|
1738
|
-
p.value =
|
|
1745
|
+
W = ae(j);
|
|
1746
|
+
} catch (pe) {
|
|
1747
|
+
p.value = pe instanceof Error ? pe.message : String(pe);
|
|
1739
1748
|
return;
|
|
1740
1749
|
}
|
|
1741
1750
|
try {
|
|
1742
|
-
if (
|
|
1751
|
+
if (ke(W) === ke(i.value))
|
|
1743
1752
|
return;
|
|
1744
1753
|
} catch {
|
|
1745
1754
|
}
|
|
1746
|
-
const Y = ++
|
|
1747
|
-
if (
|
|
1748
|
-
Y ===
|
|
1755
|
+
const Y = ++Z;
|
|
1756
|
+
if (B(), !await he("replace", W)) {
|
|
1757
|
+
Y === Z && A.value.ok && c("update:modelValue", ae(i.value));
|
|
1749
1758
|
return;
|
|
1750
1759
|
}
|
|
1751
|
-
Y ===
|
|
1760
|
+
Y === Z && fe(W);
|
|
1752
1761
|
}
|
|
1753
|
-
),
|
|
1754
|
-
|
|
1762
|
+
), Le(() => {
|
|
1763
|
+
Z++, B();
|
|
1755
1764
|
});
|
|
1756
1765
|
function se() {
|
|
1757
|
-
|
|
1766
|
+
G.cancel(), p.value = "", A.value.ok && (o.value = ke(i.value), I.value = o.value, c("update:modelValue", ae(i.value))), H.record(D());
|
|
1758
1767
|
}
|
|
1759
|
-
function
|
|
1760
|
-
if (!
|
|
1768
|
+
function me(j) {
|
|
1769
|
+
if (!X()) return !1;
|
|
1761
1770
|
try {
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1764
|
-
const Y =
|
|
1771
|
+
const W = ae(i.value);
|
|
1772
|
+
j(W);
|
|
1773
|
+
const Y = ct(W);
|
|
1765
1774
|
if (!Y.ok)
|
|
1766
1775
|
throw new Error(
|
|
1767
|
-
Y.errors.map((
|
|
1776
|
+
Y.errors.map((pe) => `${pe.path}: ${pe.message}`).join(`
|
|
1768
1777
|
`)
|
|
1769
1778
|
);
|
|
1770
|
-
return i.value =
|
|
1771
|
-
} catch (
|
|
1772
|
-
return p.value =
|
|
1779
|
+
return i.value = W, se(), !0;
|
|
1780
|
+
} catch (W) {
|
|
1781
|
+
return p.value = W instanceof Error ? W.message : String(W), !1;
|
|
1773
1782
|
}
|
|
1774
1783
|
}
|
|
1775
|
-
async function
|
|
1776
|
-
if (!
|
|
1784
|
+
async function oe(j) {
|
|
1785
|
+
if (!X()) return !1;
|
|
1777
1786
|
try {
|
|
1778
|
-
const
|
|
1779
|
-
return !await
|
|
1780
|
-
} catch (
|
|
1781
|
-
return p.value =
|
|
1787
|
+
const W = ae(j);
|
|
1788
|
+
return !await he("replace", W) || !X() ? !1 : (i.value = W, n.value = 0, te.clearSelection(), se(), !0);
|
|
1789
|
+
} catch (W) {
|
|
1790
|
+
return p.value = W instanceof Error ? W.message : String(W), !1;
|
|
1782
1791
|
}
|
|
1783
1792
|
}
|
|
1784
|
-
function
|
|
1785
|
-
|
|
1793
|
+
function we(j) {
|
|
1794
|
+
X() && (i.value.name = j, se());
|
|
1786
1795
|
}
|
|
1787
|
-
function
|
|
1788
|
-
|
|
1796
|
+
function ve(j) {
|
|
1797
|
+
X() && (i.value.description = j, se());
|
|
1789
1798
|
}
|
|
1790
|
-
function
|
|
1791
|
-
if (!(t.readonly ||
|
|
1799
|
+
function _e() {
|
|
1800
|
+
if (!(t.readonly || U.value))
|
|
1792
1801
|
try {
|
|
1793
|
-
const
|
|
1794
|
-
if (
|
|
1802
|
+
const j = ae(o.value);
|
|
1803
|
+
if (j.id !== i.value.id)
|
|
1795
1804
|
throw new Error("属性编辑不允许更换模板 ID,请另存为新模板");
|
|
1796
|
-
if (
|
|
1805
|
+
if (j.revision !== i.value.revision)
|
|
1797
1806
|
throw new Error("修订号由保存服务管理,不能在 JSON 中修改");
|
|
1798
|
-
i.value =
|
|
1799
|
-
} catch (
|
|
1800
|
-
p.value =
|
|
1807
|
+
i.value = j, n.value = 0, te.clearSelection(), se();
|
|
1808
|
+
} catch (j) {
|
|
1809
|
+
p.value = j instanceof Error ? j.message : String(j);
|
|
1801
1810
|
}
|
|
1802
1811
|
}
|
|
1803
|
-
async function
|
|
1804
|
-
|
|
1805
|
-
}
|
|
1806
|
-
function
|
|
1807
|
-
if (
|
|
1808
|
-
|
|
1809
|
-
const
|
|
1810
|
-
if (!
|
|
1811
|
-
|
|
1812
|
-
const Y = JSON.parse(
|
|
1813
|
-
i.value = Y.document, o.value = Y.json, I.value = Y.appliedJson, p.value = "",
|
|
1814
|
-
}
|
|
1815
|
-
async function
|
|
1816
|
-
if (!t.save || !
|
|
1817
|
-
if (
|
|
1818
|
-
p.value =
|
|
1812
|
+
async function ne() {
|
|
1813
|
+
U.value || t.readonly || !await he("reset") || (fe(ae(s.value)), c("update:modelValue", ae(i.value)));
|
|
1814
|
+
}
|
|
1815
|
+
function Ie(j) {
|
|
1816
|
+
if (U.value || t.readonly) return;
|
|
1817
|
+
H.record(D());
|
|
1818
|
+
const W = H.move(j);
|
|
1819
|
+
if (!W) return;
|
|
1820
|
+
G.cancel();
|
|
1821
|
+
const Y = JSON.parse(W);
|
|
1822
|
+
i.value = Y.document, o.value = Y.json, I.value = Y.appliedJson, p.value = "", n.value = 0, te.clearSelection(), A.value.ok && c("update:modelValue", ae(i.value));
|
|
1823
|
+
}
|
|
1824
|
+
async function qe() {
|
|
1825
|
+
if (!t.save || !X() || !A.value.ok) return;
|
|
1826
|
+
if (R.value) {
|
|
1827
|
+
p.value = M.value.toolsPending;
|
|
1819
1828
|
return;
|
|
1820
1829
|
}
|
|
1821
|
-
const
|
|
1822
|
-
m = new AbortController(),
|
|
1823
|
-
const
|
|
1830
|
+
const j = ++y;
|
|
1831
|
+
m = new AbortController(), h.value = !0, p.value = "";
|
|
1832
|
+
const W = ae(i.value);
|
|
1824
1833
|
try {
|
|
1825
|
-
const Y =
|
|
1826
|
-
await t.save(
|
|
1827
|
-
expectedRevision:
|
|
1834
|
+
const Y = ae(
|
|
1835
|
+
await t.save(W, {
|
|
1836
|
+
expectedRevision: W.revision,
|
|
1828
1837
|
signal: m.signal
|
|
1829
1838
|
})
|
|
1830
1839
|
);
|
|
1831
|
-
if (
|
|
1832
|
-
if (Y.id !==
|
|
1840
|
+
if (j !== y) return;
|
|
1841
|
+
if (Y.id !== W.id)
|
|
1833
1842
|
throw new Error("保存服务返回了其他模板的文档");
|
|
1834
|
-
i.value = Y, s.value =
|
|
1843
|
+
i.value = Y, s.value = ke(Y), o.value = s.value, I.value = o.value, H.reset(D()), c("saved", ae(Y)), c("update:modelValue", ae(Y));
|
|
1835
1844
|
} catch (Y) {
|
|
1836
|
-
|
|
1845
|
+
j === y && (p.value = Y instanceof Error ? Y.message : String(Y));
|
|
1837
1846
|
} finally {
|
|
1838
|
-
|
|
1847
|
+
j === y && (h.value = !1, m = void 0);
|
|
1839
1848
|
}
|
|
1840
1849
|
}
|
|
1841
|
-
const
|
|
1842
|
-
() =>
|
|
1843
|
-
),
|
|
1844
|
-
() =>
|
|
1850
|
+
const Ne = F(
|
|
1851
|
+
() => H.canUndo.value || D() !== H.current.value
|
|
1852
|
+
), Xe = F(
|
|
1853
|
+
() => H.canRedo.value && D() === H.current.value
|
|
1845
1854
|
);
|
|
1846
1855
|
return {
|
|
1847
|
-
...
|
|
1848
|
-
editingReadonly:
|
|
1849
|
-
transaction:
|
|
1850
|
-
replaceDocument:
|
|
1851
|
-
originalDocument:
|
|
1852
|
-
canUndo:
|
|
1853
|
-
canRedo:
|
|
1854
|
-
undo: () =>
|
|
1855
|
-
redo: () =>
|
|
1856
|
-
pendingLocalChanges:
|
|
1857
|
-
setToolPending:
|
|
1858
|
-
isToolPending: (
|
|
1859
|
-
toolEpoch:
|
|
1860
|
-
toolPending:
|
|
1856
|
+
...te,
|
|
1857
|
+
editingReadonly: F(() => t.readonly === !0),
|
|
1858
|
+
transaction: me,
|
|
1859
|
+
replaceDocument: oe,
|
|
1860
|
+
originalDocument: F(() => ae(s.value)),
|
|
1861
|
+
canUndo: Ne,
|
|
1862
|
+
canRedo: Xe,
|
|
1863
|
+
undo: () => Ie(-1),
|
|
1864
|
+
redo: () => Ie(1),
|
|
1865
|
+
pendingLocalChanges: E,
|
|
1866
|
+
setToolPending: _,
|
|
1867
|
+
isToolPending: (j) => d.value[j] === !0,
|
|
1868
|
+
toolEpoch: S,
|
|
1869
|
+
toolPending: R,
|
|
1870
|
+
pendingTools: w,
|
|
1861
1871
|
jsonPending: v,
|
|
1862
|
-
blocked:
|
|
1863
|
-
confirmation:
|
|
1864
|
-
decideDiscard:
|
|
1865
|
-
guardChanges:
|
|
1872
|
+
blocked: U,
|
|
1873
|
+
confirmation: G.confirmation,
|
|
1874
|
+
decideDiscard: G.decide,
|
|
1875
|
+
guardChanges: he,
|
|
1866
1876
|
draft: i,
|
|
1867
1877
|
json: o,
|
|
1868
|
-
selected:
|
|
1878
|
+
selected: n,
|
|
1869
1879
|
error: p,
|
|
1870
|
-
saving:
|
|
1871
|
-
dirty:
|
|
1872
|
-
validation:
|
|
1873
|
-
lists:
|
|
1874
|
-
activeList:
|
|
1875
|
-
headerAlignments:
|
|
1880
|
+
saving: h,
|
|
1881
|
+
dirty: T,
|
|
1882
|
+
validation: A,
|
|
1883
|
+
lists: x,
|
|
1884
|
+
activeList: k,
|
|
1885
|
+
headerAlignments: L,
|
|
1876
1886
|
previewOptions: f,
|
|
1877
|
-
fetcher:
|
|
1878
|
-
messages:
|
|
1879
|
-
setName:
|
|
1880
|
-
setDescription:
|
|
1881
|
-
setColumn:
|
|
1882
|
-
applyJson:
|
|
1883
|
-
reset:
|
|
1884
|
-
save:
|
|
1887
|
+
fetcher: P,
|
|
1888
|
+
messages: M,
|
|
1889
|
+
setName: we,
|
|
1890
|
+
setDescription: ve,
|
|
1891
|
+
setColumn: $,
|
|
1892
|
+
applyJson: _e,
|
|
1893
|
+
reset: ne,
|
|
1894
|
+
save: qe
|
|
1885
1895
|
};
|
|
1886
1896
|
}
|
|
1887
|
-
function
|
|
1888
|
-
const i =
|
|
1889
|
-
const f =
|
|
1897
|
+
function ma(t, c) {
|
|
1898
|
+
const i = z("fields"), s = () => c.value?.columns.length ? 0 : -1, o = z(s()), p = F(() => {
|
|
1899
|
+
const f = c.value?.columns[o.value];
|
|
1890
1900
|
return f ? { column: f, index: o.value } : void 0;
|
|
1891
1901
|
});
|
|
1892
1902
|
ee(t, () => {
|
|
1893
1903
|
o.value = s();
|
|
1894
|
-
}), ee(
|
|
1904
|
+
}), ee(c, (f) => {
|
|
1895
1905
|
f?.columns[o.value] || (o.value = s());
|
|
1896
1906
|
});
|
|
1897
|
-
function
|
|
1898
|
-
|
|
1907
|
+
function h(f) {
|
|
1908
|
+
c.value?.columns[f] && (o.value = f);
|
|
1899
1909
|
}
|
|
1900
|
-
function
|
|
1901
|
-
const m =
|
|
1910
|
+
function M(f) {
|
|
1911
|
+
const m = c.value?.columns.length ?? 0;
|
|
1902
1912
|
m && (o.value = Math.max(
|
|
1903
1913
|
0,
|
|
1904
1914
|
Math.min(m - 1, o.value + f)
|
|
1905
1915
|
));
|
|
1906
1916
|
}
|
|
1907
|
-
return { section: i, activeIndex: o, activeColumn: p, activate:
|
|
1917
|
+
return { section: i, activeIndex: o, activeColumn: p, activate: h, stepColumn: M };
|
|
1908
1918
|
}
|
|
1909
|
-
const
|
|
1919
|
+
const va = ["aria-label", "aria-busy"], pa = { class: "mr-designer-bar" }, ga = { class: "mr-designer-heading" }, ha = ["aria-label"], fa = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], ba = {
|
|
1920
|
+
key: 0,
|
|
1921
|
+
class: "mr-designer-pending-dot",
|
|
1922
|
+
"aria-hidden": "true"
|
|
1923
|
+
}, ya = ["aria-label"], wa = ["aria-pressed"], xa = ["aria-pressed"], Ma = { class: "mr-designer-actions" }, ka = { class: "mr-designer-history" }, Ca = ["aria-label", "title", "disabled"], Sa = ["aria-label", "title", "disabled"], _a = ["disabled"], Ia = ["title", "aria-describedby", "disabled"], $a = ["id"], Ea = ["id"], Ra = ["aria-label", "onClick"], Ta = ["aria-label"], La = ["aria-label"], Da = ["id", "aria-pressed", "aria-describedby", "onClick"], Aa = {
|
|
1924
|
+
key: 0,
|
|
1925
|
+
class: "mr-designer-pending-dot",
|
|
1926
|
+
"aria-hidden": "true"
|
|
1927
|
+
}, Pa = { class: "mr-designer-tool-content" }, Ha = {
|
|
1910
1928
|
key: 3,
|
|
1911
1929
|
class: "mr-designer-rule-workspace"
|
|
1912
|
-
},
|
|
1930
|
+
}, Ga = { key: 0 }, Fa = ["value"], Na = ["value"], za = {
|
|
1913
1931
|
key: 2,
|
|
1914
1932
|
class: "mr-designer-note"
|
|
1915
|
-
},
|
|
1933
|
+
}, Oa = {
|
|
1916
1934
|
key: 1,
|
|
1917
1935
|
class: "mr-designer-inspector"
|
|
1918
|
-
},
|
|
1936
|
+
}, Ba = ["id", "aria-labelledby"], Va = {
|
|
1919
1937
|
key: 0,
|
|
1920
1938
|
class: "mr-designer-flow-note"
|
|
1921
|
-
},
|
|
1939
|
+
}, ja = {
|
|
1922
1940
|
key: 0,
|
|
1923
1941
|
class: "mr-designer-area"
|
|
1924
|
-
},
|
|
1942
|
+
}, Ua = ["value"], Wa = ["value"], Ka = { class: "mr-designer-current" }, Ja = ["aria-expanded", "aria-controls"], qa = { class: "mr-designer-current-name" }, Xa = { class: "mr-designer-directory-entry" }, Ya = { class: "mr-designer-field-position" }, Qa = ["aria-label"], Za = ["aria-label", "title", "disabled"], eo = ["aria-label", "title", "disabled"], to = ["disabled", "aria-label"], no = { class: "mr-designer-property-group" }, ao = ["value"], oo = ["value", "list"], lo = ["id"], io = ["value"], so = { class: "mr-designer-property-group" }, ro = { class: "mr-designer-format-pair" }, uo = { class: "mr-designer-stacked" }, co = ["value", "disabled"], mo = { class: "mr-designer-stacked" }, vo = ["value"], po = { value: "identifier" }, go = { value: "dimension" }, ho = { value: "measure" }, fo = { value: "date" }, bo = { value: "text" }, yo = { class: "mr-designer-control-row" }, wo = { class: "mr-designer-control-row" }, xo = { class: "mr-designer-toggle" }, Mo = ["checked"], ko = { class: "mr-designer-column-structure" }, Co = ["aria-label", "title", "disabled"], So = ["aria-label", "title", "disabled"], _o = ["checked", "disabled"], Io = ["id", "aria-label"], $o = { class: "mr-designer-directory-heading" }, Eo = ["aria-label"], Ro = { class: "mr-designer-search" }, To = ["aria-label", "placeholder"], Lo = ["aria-label", "title"], Do = { class: "mr-designer-column-tools" }, Ao = ["disabled"], Po = {
|
|
1925
1943
|
key: 1,
|
|
1926
1944
|
role: "status"
|
|
1927
|
-
},
|
|
1945
|
+
}, Ho = { key: 2 }, Go = ["aria-label"], Fo = ["aria-label", "checked", "disabled", "onChange"], No = ["data-column-index", "aria-pressed", "tabindex", "onClick"], zo = { class: "mr-designer-column-number" }, Oo = { class: "mr-designer-column-name" }, Bo = {
|
|
1928
1946
|
key: 0,
|
|
1929
1947
|
role: "status",
|
|
1930
1948
|
class: "mr-designer-empty"
|
|
1931
|
-
},
|
|
1949
|
+
}, Vo = {
|
|
1932
1950
|
key: 0,
|
|
1933
1951
|
class: "mr-designer-batch"
|
|
1934
|
-
},
|
|
1952
|
+
}, jo = ["aria-label", "disabled"], Uo = { value: "" }, Wo = { value: "auto" }, Ko = { value: "left" }, Jo = { value: "center" }, qo = { value: "right" }, Xo = { value: "justify" }, Yo = ["aria-label", "disabled"], Qo = { value: "" }, Zo = { value: "left" }, el = { value: "center" }, tl = { value: "right" }, nl = { value: "justify" }, al = {
|
|
1935
1953
|
key: 2,
|
|
1936
1954
|
role: "status",
|
|
1937
1955
|
class: "mr-designer-empty"
|
|
1938
|
-
},
|
|
1956
|
+
}, ol = { class: "mr-designer-object-tools" }, ll = ["aria-label", "disabled"], il = { value: "" }, sl = { value: "text" }, rl = { value: "list" }, dl = { value: "image" }, ul = { value: "rect" }, cl = ["title", "aria-label", "disabled"], ml = ["title", "aria-label", "disabled"], vl = { key: 0 }, pl = ["value"], gl = { class: "mr-designer-stacked" }, hl = ["value"], fl = {
|
|
1939
1957
|
value: -1,
|
|
1940
1958
|
disabled: ""
|
|
1941
|
-
},
|
|
1959
|
+
}, bl = ["value"], yl = {
|
|
1942
1960
|
key: 1,
|
|
1943
1961
|
class: "mr-designer-arrange"
|
|
1944
|
-
},
|
|
1962
|
+
}, wl = ["disabled"], xl = ["aria-label", "disabled"], Ml = { value: "" }, kl = { value: "left" }, Cl = { value: "center" }, Sl = { value: "right" }, _l = { value: "top" }, Il = { value: "middle" }, $l = { value: "bottom" }, El = ["disabled"], Rl = ["disabled"], Tl = { key: 0 }, Ll = { class: "mr-designer-layer-tools" }, Dl = ["disabled"], Al = ["disabled"], Pl = {
|
|
1945
1963
|
key: 3,
|
|
1946
1964
|
class: "mr-designer-empty"
|
|
1947
|
-
},
|
|
1965
|
+
}, Hl = { class: "mr-designer-stacked" }, Gl = ["value", "disabled"], Fl = { class: "mr-designer-stacked" }, Nl = ["value", "disabled"], zl = { class: "mr-designer-technical" }, Ol = { class: "mr-designer-identity" }, Bl = { class: "mr-designer-stacked mr-designer-json-label" }, Vl = ["aria-label", "disabled"], jl = ["disabled"], Ul = {
|
|
1948
1966
|
key: 5,
|
|
1949
1967
|
role: "status",
|
|
1950
1968
|
class: "mr-designer-note mr-designer-pending"
|
|
1951
|
-
},
|
|
1969
|
+
}, Wl = ["aria-label"], Kl = {
|
|
1952
1970
|
key: 0,
|
|
1953
1971
|
role: "alert",
|
|
1954
1972
|
class: "mr-designer-error"
|
|
1955
|
-
},
|
|
1973
|
+
}, Jl = {
|
|
1956
1974
|
key: 1,
|
|
1957
1975
|
role: "alert",
|
|
1958
1976
|
class: "mr-designer-error"
|
|
1959
|
-
},
|
|
1977
|
+
}, ql = {
|
|
1960
1978
|
key: 4,
|
|
1961
1979
|
class: "mr-designer-note mr-designer-invalid"
|
|
1962
|
-
},
|
|
1980
|
+
}, Xl = /* @__PURE__ */ Ge({
|
|
1963
1981
|
__name: "ReportTemplateEditor",
|
|
1964
1982
|
props: {
|
|
1965
1983
|
modelValue: {},
|
|
@@ -1974,186 +1992,198 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
1974
1992
|
save: { type: Function }
|
|
1975
1993
|
},
|
|
1976
1994
|
emits: ["update:modelValue", "saved", "excel-bound"],
|
|
1977
|
-
setup(t, { expose:
|
|
1978
|
-
const s =
|
|
1979
|
-
() => import("./ExcelBindingWizard-
|
|
1980
|
-
), o =
|
|
1995
|
+
setup(t, { expose: c, emit: i }) {
|
|
1996
|
+
const s = ge(
|
|
1997
|
+
() => import("./ExcelBindingWizard-LWX6G1A2.js")
|
|
1998
|
+
), o = ge(() => import("./ParamEditor-BLaE5q5W.js")), p = ge(() => import("./RuleEditor-D9wQHrkf.js")), h = ge(
|
|
1981
1999
|
() => import("./TemplateReviewPanel-BKofGrV9.js")
|
|
1982
|
-
),
|
|
1983
|
-
f(
|
|
2000
|
+
), M = t, f = i, m = ca(M, (V, u) => {
|
|
2001
|
+
f(V === "saved" ? "saved" : "update:modelValue", u);
|
|
1984
2002
|
}), {
|
|
1985
|
-
draft:
|
|
1986
|
-
json:
|
|
1987
|
-
selected:
|
|
2003
|
+
draft: y,
|
|
2004
|
+
json: A,
|
|
2005
|
+
selected: T,
|
|
1988
2006
|
error: I,
|
|
1989
2007
|
saving: v,
|
|
1990
|
-
pendingLocalChanges:
|
|
1991
|
-
jsonPending:
|
|
1992
|
-
blocked:
|
|
1993
|
-
confirmation:
|
|
1994
|
-
canUndo:
|
|
2008
|
+
pendingLocalChanges: d,
|
|
2009
|
+
jsonPending: C,
|
|
2010
|
+
blocked: S,
|
|
2011
|
+
confirmation: R,
|
|
2012
|
+
canUndo: w,
|
|
1995
2013
|
canRedo: _,
|
|
1996
|
-
validation:
|
|
2014
|
+
validation: E,
|
|
1997
2015
|
lists: D,
|
|
1998
2016
|
activeList: H,
|
|
1999
2017
|
visibleColumns: G,
|
|
2000
|
-
query:
|
|
2001
|
-
selectedColumns:
|
|
2002
|
-
fetcher:
|
|
2018
|
+
query: U,
|
|
2019
|
+
selectedColumns: X,
|
|
2020
|
+
fetcher: te,
|
|
2003
2021
|
messages: n
|
|
2004
2022
|
} = m;
|
|
2005
|
-
function
|
|
2006
|
-
return m.transaction((
|
|
2007
|
-
|
|
2023
|
+
function x(V) {
|
|
2024
|
+
return m.transaction((u) => {
|
|
2025
|
+
u.template.params = V;
|
|
2008
2026
|
});
|
|
2009
2027
|
}
|
|
2010
|
-
const k =
|
|
2028
|
+
const k = ma(T, H), { section: L, activeIndex: $, activeColumn: P } = k, B = `mr-designer-${$t()?.uid ?? 0}`, Z = [
|
|
2011
2029
|
"fields",
|
|
2012
2030
|
"component",
|
|
2013
2031
|
"template",
|
|
2014
2032
|
"tools",
|
|
2015
2033
|
"advanced"
|
|
2016
|
-
],
|
|
2034
|
+
], he = oa(
|
|
2017
2035
|
m,
|
|
2018
2036
|
k,
|
|
2019
|
-
() =>
|
|
2037
|
+
() => M.dataSchemas
|
|
2020
2038
|
), {
|
|
2021
|
-
mode:
|
|
2022
|
-
setMode:
|
|
2023
|
-
canvasSelection:
|
|
2039
|
+
mode: fe,
|
|
2040
|
+
setMode: se,
|
|
2041
|
+
canvasSelection: me,
|
|
2024
2042
|
canvasPage: oe,
|
|
2025
|
-
canvasActive:
|
|
2026
|
-
tool:
|
|
2043
|
+
canvasActive: we,
|
|
2044
|
+
tool: ve,
|
|
2027
2045
|
visitedTools: _e,
|
|
2028
|
-
editDisabled:
|
|
2029
|
-
dataSchema:
|
|
2030
|
-
chooseCanvas:
|
|
2031
|
-
insertComponent:
|
|
2032
|
-
patchCanvas:
|
|
2046
|
+
editDisabled: ne,
|
|
2047
|
+
dataSchema: Ie,
|
|
2048
|
+
chooseCanvas: qe,
|
|
2049
|
+
insertComponent: Ne,
|
|
2050
|
+
patchCanvas: Xe,
|
|
2033
2051
|
changeList: j,
|
|
2034
|
-
moveColumn:
|
|
2035
|
-
headerCommand:
|
|
2036
|
-
locateReview:
|
|
2037
|
-
canvas:
|
|
2038
|
-
} =
|
|
2039
|
-
function
|
|
2040
|
-
|
|
2052
|
+
moveColumn: W,
|
|
2053
|
+
headerCommand: Y,
|
|
2054
|
+
locateReview: pe,
|
|
2055
|
+
canvas: J
|
|
2056
|
+
} = he, de = F(() => !!y.value.template.pages[oe.value]?.flow), De = F(() => !!y.value.template.pages[D.value[T.value]?.pageIndex ?? -1]?.flow);
|
|
2057
|
+
function ft() {
|
|
2058
|
+
L.value = "tools", ve.value = "excel";
|
|
2059
|
+
}
|
|
2060
|
+
const Ee = F(() => {
|
|
2061
|
+
const V = ["excel", "rules", "params"].filter((u) => m.pendingTools.value.includes(u)).map((u) => ({ target: u, label: n.value[`${u}Tool`] }));
|
|
2062
|
+
return C.value && V.push({ target: "json", label: n.value.json }), V;
|
|
2063
|
+
}), ze = F(() => v.value ? n.value.saving : M.readonly ? n.value.saveReadonly : S.value ? n.value.saveConfirmation : Ee.value.length ? Ee.value.map((V) => `${V.label} · ${n.value.unapplied}`).join(";") : E.value.ok ? d.value ? "" : n.value.saveUnchanged : n.value.saveInvalid);
|
|
2064
|
+
async function bt(V) {
|
|
2065
|
+
V === "json" ? L.value = "advanced" : (L.value = "tools", ve.value = V), await ce();
|
|
2066
|
+
const u = V === "json" ? `#${B}-panel-advanced textarea` : `#${B}-tool-${V}`;
|
|
2067
|
+
document.querySelector(u)?.focus({ preventScroll: !0 });
|
|
2041
2068
|
}
|
|
2042
|
-
const
|
|
2043
|
-
() => v.value ? n.value.saving :
|
|
2044
|
-
),
|
|
2045
|
-
open:
|
|
2046
|
-
cursor:
|
|
2047
|
-
trigger:
|
|
2048
|
-
panel:
|
|
2049
|
-
search:
|
|
2050
|
-
list:
|
|
2069
|
+
const yt = F(
|
|
2070
|
+
() => v.value ? n.value.saving : M.readonly ? n.value.readonly : d.value ? n.value.dirty : n.value.ready
|
|
2071
|
+
), ot = z(null), Ye = z(null), ie = ia(k, L, G), {
|
|
2072
|
+
open: lt,
|
|
2073
|
+
cursor: wt,
|
|
2074
|
+
trigger: xt,
|
|
2075
|
+
panel: Mt,
|
|
2076
|
+
search: kt,
|
|
2077
|
+
list: Ct
|
|
2051
2078
|
} = ie;
|
|
2052
|
-
ee(
|
|
2053
|
-
await
|
|
2079
|
+
ee(L, async () => {
|
|
2080
|
+
await ce(), Ye.value && (Ye.value.scrollTop = 0);
|
|
2054
2081
|
});
|
|
2055
|
-
const
|
|
2082
|
+
const it = F(() => ({
|
|
2056
2083
|
auto: n.value.auto,
|
|
2057
2084
|
left: n.value.left,
|
|
2058
2085
|
center: n.value.center,
|
|
2059
2086
|
right: n.value.right,
|
|
2060
2087
|
justify: n.value.justify
|
|
2061
2088
|
}));
|
|
2062
|
-
let
|
|
2063
|
-
ee(
|
|
2064
|
-
|
|
2065
|
-
}),
|
|
2089
|
+
let Oe = null;
|
|
2090
|
+
ee(R, async (V) => {
|
|
2091
|
+
V ? (Oe = document.activeElement, await ce(), ot.value?.focus()) : (await ce(), Oe?.isConnected && Oe.focus(), Oe = null);
|
|
2092
|
+
}), c({
|
|
2066
2093
|
get pendingLocalChanges() {
|
|
2067
|
-
return
|
|
2094
|
+
return d.value;
|
|
2068
2095
|
},
|
|
2069
2096
|
get saving() {
|
|
2070
2097
|
return v.value;
|
|
2071
2098
|
},
|
|
2072
2099
|
get blocked() {
|
|
2073
|
-
return
|
|
2100
|
+
return S.value;
|
|
2074
2101
|
},
|
|
2075
2102
|
guardChanges: m.guardChanges,
|
|
2076
2103
|
reset: m.reset,
|
|
2077
2104
|
save: m.save
|
|
2078
2105
|
});
|
|
2079
|
-
async function
|
|
2080
|
-
const
|
|
2081
|
-
if (
|
|
2082
|
-
const r =
|
|
2083
|
-
return f("excel-bound", { ...
|
|
2106
|
+
async function St(V) {
|
|
2107
|
+
const u = { ...V.document, id: y.value.id };
|
|
2108
|
+
if (y.value.revision === void 0 ? delete u.revision : u.revision = y.value.revision, !await m.replaceDocument(u)) return !1;
|
|
2109
|
+
const r = ae(m.draft.value);
|
|
2110
|
+
return f("excel-bound", { ...V, document: r, session: { ...V.session, identity: { id: r.id, name: r.name } } }), !0;
|
|
2084
2111
|
}
|
|
2085
|
-
async function
|
|
2086
|
-
const
|
|
2087
|
-
|
|
2112
|
+
async function st(V) {
|
|
2113
|
+
const u = D.value.findIndex((r) => r.pageIndex === V.pageIndex && r.componentIndex === V.componentIndex);
|
|
2114
|
+
u >= 0 && u !== T.value && m.isToolPending("rules") && !await m.guardChanges() || qe(V);
|
|
2088
2115
|
}
|
|
2089
|
-
async function
|
|
2090
|
-
const
|
|
2116
|
+
async function rt(V) {
|
|
2117
|
+
const u = V.target, r = Number(u.value);
|
|
2091
2118
|
if (m.isToolPending("rules") && !await m.guardChanges()) {
|
|
2092
|
-
|
|
2119
|
+
u.value = String(T.value);
|
|
2093
2120
|
return;
|
|
2094
2121
|
}
|
|
2095
|
-
|
|
2122
|
+
T.value = r;
|
|
2096
2123
|
}
|
|
2097
|
-
function
|
|
2098
|
-
return
|
|
2124
|
+
function xe(V) {
|
|
2125
|
+
return V.target.value;
|
|
2099
2126
|
}
|
|
2100
|
-
function
|
|
2101
|
-
return
|
|
2127
|
+
function Qe(V) {
|
|
2128
|
+
return V.target.checked;
|
|
2102
2129
|
}
|
|
2103
|
-
function
|
|
2104
|
-
const r =
|
|
2130
|
+
function dt(V, u) {
|
|
2131
|
+
const r = V.target;
|
|
2105
2132
|
m.alignColumns(
|
|
2106
|
-
|
|
2133
|
+
u,
|
|
2107
2134
|
r.value
|
|
2108
2135
|
), r.value = "";
|
|
2109
2136
|
}
|
|
2110
|
-
async function
|
|
2137
|
+
async function _t(V) {
|
|
2111
2138
|
const r = {
|
|
2112
2139
|
ArrowRight: 1,
|
|
2113
2140
|
ArrowLeft: -1,
|
|
2114
2141
|
Home: -Z.length,
|
|
2115
2142
|
End: Z.length
|
|
2116
|
-
}[
|
|
2143
|
+
}[V.key];
|
|
2117
2144
|
if (r === void 0) return;
|
|
2118
|
-
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2121
|
-
const
|
|
2122
|
-
await
|
|
2145
|
+
V.preventDefault();
|
|
2146
|
+
const K = Z.indexOf(L.value), Re = V.key === "Home" ? 0 : V.key === "End" ? Z.length - 1 : (K + r + Z.length) % Z.length;
|
|
2147
|
+
L.value = Z[Re];
|
|
2148
|
+
const It = V.currentTarget.parentElement;
|
|
2149
|
+
await ce(), It?.querySelector(`#${B}-tab-${L.value}`)?.focus();
|
|
2123
2150
|
}
|
|
2124
|
-
return (
|
|
2151
|
+
return (V, u) => (g(), b("section", {
|
|
2125
2152
|
class: "mr-designer",
|
|
2126
2153
|
"aria-label": e(n).title,
|
|
2127
2154
|
"aria-busy": e(v)
|
|
2128
2155
|
}, [
|
|
2129
|
-
a("header",
|
|
2130
|
-
a("div",
|
|
2156
|
+
a("header", pa, [
|
|
2157
|
+
a("div", ga, [
|
|
2131
2158
|
le(re, {
|
|
2132
2159
|
name: "columns",
|
|
2133
2160
|
size: 15
|
|
2134
2161
|
}),
|
|
2135
2162
|
a("strong", null, l(e(n).heading), 1),
|
|
2136
2163
|
a("span", {
|
|
2137
|
-
class: Pe({ "mr-designer-dirty": e(
|
|
2138
|
-
}, l(
|
|
2164
|
+
class: Pe({ "mr-designer-dirty": e(d) })
|
|
2165
|
+
}, l(yt.value), 3)
|
|
2139
2166
|
]),
|
|
2140
2167
|
a("nav", {
|
|
2141
2168
|
class: "mr-designer-tabs",
|
|
2142
2169
|
role: "tablist",
|
|
2143
2170
|
"aria-label": e(n).sectionsLabel
|
|
2144
2171
|
}, [
|
|
2145
|
-
(
|
|
2146
|
-
id: `${
|
|
2172
|
+
(g(), b(q, null, Q(Z, (r) => a("button", {
|
|
2173
|
+
id: `${B}-tab-${r}`,
|
|
2147
2174
|
key: r,
|
|
2148
2175
|
type: "button",
|
|
2149
2176
|
role: "tab",
|
|
2150
|
-
"aria-selected": e(
|
|
2151
|
-
"aria-controls": `${
|
|
2152
|
-
tabindex: e(
|
|
2153
|
-
onClick: (
|
|
2154
|
-
onKeydown:
|
|
2155
|
-
},
|
|
2156
|
-
|
|
2177
|
+
"aria-selected": e(L) === r,
|
|
2178
|
+
"aria-controls": `${B}-panel-${r}`,
|
|
2179
|
+
tabindex: e(L) === r ? 0 : -1,
|
|
2180
|
+
onClick: (K) => L.value = r,
|
|
2181
|
+
onKeydown: _t
|
|
2182
|
+
}, [
|
|
2183
|
+
O(l(e(n)[`${r}Section`]) + " ", 1),
|
|
2184
|
+
r === "tools" && e(m).toolPending.value || r === "advanced" && e(C) ? (g(), b("span", ba)) : N("", !0)
|
|
2185
|
+
], 40, fa)), 64))
|
|
2186
|
+
], 8, ha),
|
|
2157
2187
|
a("div", {
|
|
2158
2188
|
class: "mr-designer-mode",
|
|
2159
2189
|
role: "group",
|
|
@@ -2161,27 +2191,27 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2161
2191
|
}, [
|
|
2162
2192
|
a("button", {
|
|
2163
2193
|
type: "button",
|
|
2164
|
-
"aria-pressed": e(
|
|
2165
|
-
onClick:
|
|
2166
|
-
}, l(e(n).design), 9,
|
|
2194
|
+
"aria-pressed": e(fe) === "design",
|
|
2195
|
+
onClick: u[0] || (u[0] = (r) => e(se)("design"))
|
|
2196
|
+
}, l(e(n).design), 9, wa),
|
|
2167
2197
|
a("button", {
|
|
2168
2198
|
type: "button",
|
|
2169
|
-
"aria-pressed": e(
|
|
2170
|
-
onClick:
|
|
2171
|
-
}, l(e(n).preview), 9,
|
|
2172
|
-
], 8,
|
|
2173
|
-
a("div",
|
|
2174
|
-
a("div",
|
|
2199
|
+
"aria-pressed": e(fe) === "preview",
|
|
2200
|
+
onClick: u[1] || (u[1] = (r) => e(se)("preview"))
|
|
2201
|
+
}, l(e(n).preview), 9, xa)
|
|
2202
|
+
], 8, ya),
|
|
2203
|
+
a("div", Ma, [
|
|
2204
|
+
a("div", ka, [
|
|
2175
2205
|
a("button", {
|
|
2176
2206
|
type: "button",
|
|
2177
2207
|
class: "mr-designer-icon-button",
|
|
2178
2208
|
"aria-label": e(n).undo,
|
|
2179
2209
|
title: e(n).undo,
|
|
2180
|
-
disabled: t.readonly || e(
|
|
2181
|
-
onClick:
|
|
2182
|
-
e(
|
|
2210
|
+
disabled: t.readonly || e(S) || !e(w),
|
|
2211
|
+
onClick: u[2] || (u[2] = (r) => {
|
|
2212
|
+
e(J).clearLocks(), e(m).undo();
|
|
2183
2213
|
})
|
|
2184
|
-
}, [...
|
|
2214
|
+
}, [...u[53] || (u[53] = [
|
|
2185
2215
|
a("svg", {
|
|
2186
2216
|
viewBox: "0 0 24 24",
|
|
2187
2217
|
fill: "none",
|
|
@@ -2189,17 +2219,17 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2189
2219
|
}, [
|
|
2190
2220
|
a("path", { d: "M4 10h10a6 6 0 0 1 0 12M4 10l5-5M4 10l5 5" })
|
|
2191
2221
|
], -1)
|
|
2192
|
-
])], 8,
|
|
2222
|
+
])], 8, Ca),
|
|
2193
2223
|
a("button", {
|
|
2194
2224
|
type: "button",
|
|
2195
2225
|
class: "mr-designer-icon-button",
|
|
2196
2226
|
"aria-label": e(n).redo,
|
|
2197
2227
|
title: e(n).redo,
|
|
2198
|
-
disabled: t.readonly || e(
|
|
2199
|
-
onClick:
|
|
2200
|
-
e(
|
|
2228
|
+
disabled: t.readonly || e(S) || !e(_),
|
|
2229
|
+
onClick: u[3] || (u[3] = (r) => {
|
|
2230
|
+
e(J).clearLocks(), e(m).redo();
|
|
2201
2231
|
})
|
|
2202
|
-
}, [...
|
|
2232
|
+
}, [...u[54] || (u[54] = [
|
|
2203
2233
|
a("svg", {
|
|
2204
2234
|
viewBox: "0 0 24 24",
|
|
2205
2235
|
fill: "none",
|
|
@@ -2207,21 +2237,23 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2207
2237
|
}, [
|
|
2208
2238
|
a("path", { d: "M20 10H10a6 6 0 0 0 0 12m10-12-5-5m5 5-5 5" })
|
|
2209
2239
|
], -1)
|
|
2210
|
-
])], 8,
|
|
2240
|
+
])], 8, Sa)
|
|
2211
2241
|
]),
|
|
2212
2242
|
a("button", {
|
|
2213
2243
|
type: "button",
|
|
2214
2244
|
class: "mr-designer-reset",
|
|
2215
|
-
disabled: t.readonly || e(
|
|
2216
|
-
onClick:
|
|
2245
|
+
disabled: t.readonly || e(S) || !e(d),
|
|
2246
|
+
onClick: u[4] || (u[4] = //@ts-ignore
|
|
2217
2247
|
(...r) => e(m).reset && e(m).reset(...r))
|
|
2218
|
-
}, l(e(n).reset), 9,
|
|
2219
|
-
t.save ? (
|
|
2248
|
+
}, l(e(n).reset), 9, _a),
|
|
2249
|
+
t.save ? (g(), b("button", {
|
|
2220
2250
|
key: 0,
|
|
2221
2251
|
type: "button",
|
|
2222
2252
|
class: "mr-designer-save",
|
|
2223
|
-
|
|
2224
|
-
|
|
2253
|
+
title: ze.value || e(n).save,
|
|
2254
|
+
"aria-describedby": Ee.value.length ? `${B}-pending` : ze.value ? `${B}-save-reason` : void 0,
|
|
2255
|
+
disabled: t.readonly || e(S) || e(C) || e(m).toolPending.value || !e(E).ok || !e(d),
|
|
2256
|
+
onClick: u[5] || (u[5] = //@ts-ignore
|
|
2225
2257
|
(...r) => e(m).save && e(m).save(...r))
|
|
2226
2258
|
}, [
|
|
2227
2259
|
le(re, {
|
|
@@ -2229,15 +2261,38 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2229
2261
|
size: 13
|
|
2230
2262
|
}),
|
|
2231
2263
|
O(l(e(v) ? e(n).saving : e(n).save), 1)
|
|
2232
|
-
], 8,
|
|
2264
|
+
], 8, Ia)) : N("", !0),
|
|
2265
|
+
t.save && ze.value && !Ee.value.length ? (g(), b("span", {
|
|
2266
|
+
key: 1,
|
|
2267
|
+
id: `${B}-save-reason`,
|
|
2268
|
+
class: "mr-designer-save-reason"
|
|
2269
|
+
}, l(ze.value), 9, $a)) : N("", !0)
|
|
2233
2270
|
])
|
|
2234
2271
|
]),
|
|
2235
|
-
|
|
2272
|
+
Ee.value.length ? (g(), b("div", {
|
|
2236
2273
|
key: 0,
|
|
2274
|
+
id: `${B}-pending`,
|
|
2275
|
+
class: "mr-designer-pending",
|
|
2276
|
+
role: "status"
|
|
2277
|
+
}, [
|
|
2278
|
+
a("span", null, l(e(n).pendingToolsLabel), 1),
|
|
2279
|
+
(g(!0), b(q, null, Q(Ee.value, (r) => (g(), b("button", {
|
|
2280
|
+
key: r.target,
|
|
2281
|
+
type: "button",
|
|
2282
|
+
"aria-label": `${r.label} · ${e(n).unapplied} · ${e(n).returnToConfiguration}`,
|
|
2283
|
+
onClick: (K) => bt(r.target)
|
|
2284
|
+
}, [
|
|
2285
|
+
O(l(r.label), 1),
|
|
2286
|
+
a("span", null, l(e(n).unapplied) + " ↗", 1)
|
|
2287
|
+
], 8, Ra))), 128)),
|
|
2288
|
+
a("small", null, l(e(n).pendingToolsHint), 1)
|
|
2289
|
+
], 8, Ea)) : N("", !0),
|
|
2290
|
+
e(R) ? (g(), b("div", {
|
|
2291
|
+
key: 1,
|
|
2237
2292
|
role: "alertdialog",
|
|
2238
2293
|
"aria-label": e(n).discardTitle,
|
|
2239
2294
|
class: "mr-designer-confirm",
|
|
2240
|
-
onKeydown:
|
|
2295
|
+
onKeydown: u[8] || (u[8] = Ze(gt((r) => e(m).decideDiscard(!1), ["prevent", "stop"]), ["esc"]))
|
|
2241
2296
|
}, [
|
|
2242
2297
|
a("div", null, [
|
|
2243
2298
|
a("strong", null, l(e(n).discardTitle), 1),
|
|
@@ -2246,20 +2301,20 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2246
2301
|
a("div", null, [
|
|
2247
2302
|
a("button", {
|
|
2248
2303
|
ref_key: "keepButton",
|
|
2249
|
-
ref:
|
|
2304
|
+
ref: ot,
|
|
2250
2305
|
type: "button",
|
|
2251
|
-
onClick:
|
|
2306
|
+
onClick: u[6] || (u[6] = (r) => e(m).decideDiscard(!1))
|
|
2252
2307
|
}, l(e(n).keepEditing), 513),
|
|
2253
2308
|
a("button", {
|
|
2254
2309
|
type: "button",
|
|
2255
|
-
onClick:
|
|
2310
|
+
onClick: u[7] || (u[7] = (r) => e(m).decideDiscard(!0))
|
|
2256
2311
|
}, l(e(n).discard), 1)
|
|
2257
2312
|
])
|
|
2258
|
-
], 40,
|
|
2313
|
+
], 40, Ta)) : N("", !0),
|
|
2259
2314
|
a("div", {
|
|
2260
|
-
class: Pe(["mr-designer-body", { "is-tools": e(
|
|
2315
|
+
class: Pe(["mr-designer-body", { "is-tools": e(L) === "tools" }])
|
|
2261
2316
|
}, [
|
|
2262
|
-
e(_e).size ? ue((
|
|
2317
|
+
e(_e).size ? ue((g(), b("div", {
|
|
2263
2318
|
key: e(m).toolEpoch.value,
|
|
2264
2319
|
class: "mr-designer-tools"
|
|
2265
2320
|
}, [
|
|
@@ -2267,128 +2322,133 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2267
2322
|
class: "mr-designer-tool-tabs",
|
|
2268
2323
|
"aria-label": e(n).toolsSection
|
|
2269
2324
|
}, [
|
|
2270
|
-
(
|
|
2325
|
+
(g(), b(q, null, Q(["excel", "rules", "params", "review"], (r) => a("button", {
|
|
2271
2326
|
key: r,
|
|
2327
|
+
id: `${B}-tool-${r}`,
|
|
2272
2328
|
type: "button",
|
|
2273
|
-
"aria-pressed": e(
|
|
2274
|
-
|
|
2275
|
-
|
|
2329
|
+
"aria-pressed": e(ve) === r,
|
|
2330
|
+
"aria-describedby": e(m).isToolPending(r) ? `${B}-pending` : void 0,
|
|
2331
|
+
onClick: (K) => ve.value = r
|
|
2332
|
+
}, [
|
|
2333
|
+
O(l(e(n)[`${r}Tool`]) + " ", 1),
|
|
2334
|
+
e(m).isToolPending(r) ? (g(), b("span", Aa)) : N("", !0)
|
|
2335
|
+
], 8, Da)), 64)),
|
|
2276
2336
|
a("span", null, l(e(n).toolsDescription), 1)
|
|
2277
|
-
], 8,
|
|
2278
|
-
a("div",
|
|
2279
|
-
e(_e).has("params") ? ue((
|
|
2337
|
+
], 8, La),
|
|
2338
|
+
a("div", Pa, [
|
|
2339
|
+
e(_e).has("params") ? ue((g(), Me(e(o), {
|
|
2280
2340
|
key: 0,
|
|
2281
|
-
document: e(
|
|
2282
|
-
readonly: e(
|
|
2283
|
-
accept:
|
|
2284
|
-
onDirty:
|
|
2341
|
+
document: e(y),
|
|
2342
|
+
readonly: e(ne),
|
|
2343
|
+
accept: x,
|
|
2344
|
+
onDirty: u[9] || (u[9] = (r) => e(m).setToolPending("params", r))
|
|
2285
2345
|
}, null, 8, ["document", "readonly"])), [
|
|
2286
|
-
[
|
|
2287
|
-
]) :
|
|
2288
|
-
e(_e).has("excel") ? ue((
|
|
2346
|
+
[Ae, e(ve) === "params"]
|
|
2347
|
+
]) : N("", !0),
|
|
2348
|
+
e(_e).has("excel") ? ue((g(), Me(e(s), {
|
|
2289
2349
|
key: 1,
|
|
2290
2350
|
datasets: t.bindingDatasets ?? [],
|
|
2291
2351
|
session: t.bindingSession,
|
|
2292
|
-
identity: { id: e(
|
|
2352
|
+
identity: { id: e(y).id, name: e(y).name },
|
|
2293
2353
|
"lock-id": "",
|
|
2294
|
-
readonly: e(
|
|
2295
|
-
accept:
|
|
2296
|
-
onDirty:
|
|
2354
|
+
readonly: e(ne),
|
|
2355
|
+
accept: St,
|
|
2356
|
+
onDirty: u[10] || (u[10] = (r) => e(m).setToolPending("excel", r))
|
|
2297
2357
|
}, null, 8, ["datasets", "session", "identity", "readonly"])), [
|
|
2298
|
-
[
|
|
2299
|
-
]) :
|
|
2300
|
-
e(_e).has("review") ? ue((
|
|
2358
|
+
[Ae, e(ve) === "excel"]
|
|
2359
|
+
]) : N("", !0),
|
|
2360
|
+
e(_e).has("review") ? ue((g(), Me(e(h), {
|
|
2301
2361
|
key: 2,
|
|
2302
|
-
document: e(
|
|
2362
|
+
document: e(y),
|
|
2303
2363
|
previous: e(m).originalDocument.value,
|
|
2304
2364
|
datasets: t.datasets,
|
|
2305
2365
|
"data-schemas": t.dataSchemas,
|
|
2306
|
-
onLocate: e(
|
|
2366
|
+
onLocate: e(pe)
|
|
2307
2367
|
}, null, 8, ["document", "previous", "datasets", "data-schemas", "onLocate"])), [
|
|
2308
|
-
[
|
|
2309
|
-
]) :
|
|
2310
|
-
e(_e).has("rules") ? ue((
|
|
2311
|
-
e(D).length > 1 ? (
|
|
2368
|
+
[Ae, e(ve) === "review"]
|
|
2369
|
+
]) : N("", !0),
|
|
2370
|
+
e(_e).has("rules") ? ue((g(), b("div", Ha, [
|
|
2371
|
+
e(D).length > 1 ? (g(), b("label", Ga, [
|
|
2312
2372
|
O(l(e(n).area), 1),
|
|
2313
2373
|
a("select", {
|
|
2314
|
-
value: e(
|
|
2315
|
-
onChange:
|
|
2374
|
+
value: e(T),
|
|
2375
|
+
onChange: rt
|
|
2316
2376
|
}, [
|
|
2317
|
-
(
|
|
2318
|
-
key:
|
|
2319
|
-
value:
|
|
2320
|
-
}, l(r.component.title || r.component.dataset), 9,
|
|
2321
|
-
], 40,
|
|
2322
|
-
])) :
|
|
2323
|
-
e(H) ? (
|
|
2377
|
+
(g(!0), b(q, null, Q(e(D), (r, K) => (g(), b("option", {
|
|
2378
|
+
key: K,
|
|
2379
|
+
value: K
|
|
2380
|
+
}, l(r.component.title || r.component.dataset), 9, Na))), 128))
|
|
2381
|
+
], 40, Fa)
|
|
2382
|
+
])) : N("", !0),
|
|
2383
|
+
e(H) ? (g(), Me(e(p), {
|
|
2324
2384
|
key: 1,
|
|
2325
2385
|
list: e(H),
|
|
2326
2386
|
datasets: t.datasets,
|
|
2327
|
-
"dataset-schema": e(
|
|
2387
|
+
"dataset-schema": e(Ie),
|
|
2328
2388
|
"dataset-schemas": t.dataSchemas,
|
|
2329
|
-
readonly: e(
|
|
2389
|
+
readonly: e(ne),
|
|
2330
2390
|
onChange: e(j),
|
|
2331
|
-
onDirty:
|
|
2332
|
-
}, null, 8, ["list", "datasets", "dataset-schema", "dataset-schemas", "readonly", "onChange"])) : (
|
|
2391
|
+
onDirty: u[11] || (u[11] = (r) => e(m).setToolPending("rules", r))
|
|
2392
|
+
}, null, 8, ["list", "datasets", "dataset-schema", "dataset-schemas", "readonly", "onChange"])) : (g(), b("p", za, l(e(n).rulesNeedList), 1))
|
|
2333
2393
|
], 512)), [
|
|
2334
|
-
[
|
|
2335
|
-
]) :
|
|
2394
|
+
[Ae, e(ve) === "rules"]
|
|
2395
|
+
]) : N("", !0)
|
|
2336
2396
|
])
|
|
2337
2397
|
])), [
|
|
2338
|
-
[
|
|
2339
|
-
]) :
|
|
2340
|
-
e(
|
|
2398
|
+
[Ae, e(L) === "tools"]
|
|
2399
|
+
]) : N("", !0),
|
|
2400
|
+
e(L) !== "tools" ? (g(), b("aside", Oa, [
|
|
2341
2401
|
a("div", {
|
|
2342
2402
|
ref_key: "inspectorPanel",
|
|
2343
|
-
ref:
|
|
2344
|
-
id: `${
|
|
2345
|
-
class: Pe(["mr-designer-panel", { "is-advanced": e(
|
|
2403
|
+
ref: Ye,
|
|
2404
|
+
id: `${B}-panel-${e(L)}`,
|
|
2405
|
+
class: Pe(["mr-designer-panel", { "is-advanced": e(L) === "advanced" }]),
|
|
2346
2406
|
role: "tabpanel",
|
|
2347
|
-
"aria-labelledby": `${
|
|
2407
|
+
"aria-labelledby": `${B}-tab-${e(L)}`
|
|
2348
2408
|
}, [
|
|
2349
|
-
de.value || De.value ? (
|
|
2409
|
+
de.value || De.value ? (g(), b("div", Va, [
|
|
2350
2410
|
a("small", null, l(e(n).flowLayout), 1),
|
|
2351
2411
|
a("button", {
|
|
2352
2412
|
type: "button",
|
|
2353
|
-
onClick:
|
|
2413
|
+
onClick: ft
|
|
2354
2414
|
}, l(e(n).excelTool) + " ↗", 1)
|
|
2355
|
-
])) :
|
|
2356
|
-
e(
|
|
2357
|
-
e(D).length > 1 ? (
|
|
2415
|
+
])) : N("", !0),
|
|
2416
|
+
e(L) === "fields" ? (g(), b(q, { key: 1 }, [
|
|
2417
|
+
e(D).length > 1 ? (g(), b("label", ja, [
|
|
2358
2418
|
O(l(e(n).area), 1),
|
|
2359
2419
|
a("select", {
|
|
2360
|
-
value: e(
|
|
2361
|
-
onChange:
|
|
2420
|
+
value: e(T),
|
|
2421
|
+
onChange: rt
|
|
2362
2422
|
}, [
|
|
2363
|
-
(
|
|
2364
|
-
key:
|
|
2365
|
-
value:
|
|
2366
|
-
}, l(r.pageIndex + 1) + " " + l(e(n).page) + " · " + l(r.component.title || r.component.dataset), 9,
|
|
2367
|
-
], 40,
|
|
2368
|
-
])) :
|
|
2369
|
-
e(H) ? (
|
|
2370
|
-
a("div",
|
|
2423
|
+
(g(!0), b(q, null, Q(e(D), (r, K) => (g(), b("option", {
|
|
2424
|
+
key: K,
|
|
2425
|
+
value: K
|
|
2426
|
+
}, l(r.pageIndex + 1) + " " + l(e(n).page) + " · " + l(r.component.title || r.component.dataset), 9, Wa))), 128))
|
|
2427
|
+
], 40, Ua)
|
|
2428
|
+
])) : N("", !0),
|
|
2429
|
+
e(H) ? (g(), b(q, { key: 1 }, [
|
|
2430
|
+
a("div", Ka, [
|
|
2371
2431
|
a("button", {
|
|
2372
2432
|
ref_key: "directoryTrigger",
|
|
2373
|
-
ref:
|
|
2433
|
+
ref: xt,
|
|
2374
2434
|
type: "button",
|
|
2375
2435
|
class: "mr-designer-field-trigger",
|
|
2376
|
-
"aria-expanded": e(
|
|
2377
|
-
"aria-controls": `${
|
|
2436
|
+
"aria-expanded": e(lt),
|
|
2437
|
+
"aria-controls": `${B}-directory`,
|
|
2378
2438
|
"aria-haspopup": "dialog",
|
|
2379
|
-
onClick:
|
|
2439
|
+
onClick: u[12] || (u[12] = //@ts-ignore
|
|
2380
2440
|
(...r) => e(ie).toggle && e(ie).toggle(...r)),
|
|
2381
|
-
onKeydown:
|
|
2441
|
+
onKeydown: u[13] || (u[13] = Ze(
|
|
2382
2442
|
//@ts-ignore
|
|
2383
2443
|
(...r) => e(ie).escape && e(ie).escape(...r),
|
|
2384
2444
|
["esc"]
|
|
2385
2445
|
))
|
|
2386
2446
|
}, [
|
|
2387
|
-
a("span",
|
|
2447
|
+
a("span", qa, [
|
|
2388
2448
|
a("strong", null, l(e(P)?.column.header || e(n).noColumns), 1),
|
|
2389
2449
|
a("small", null, l(e(P)?.column.field || "—"), 1)
|
|
2390
2450
|
]),
|
|
2391
|
-
a("span",
|
|
2451
|
+
a("span", Xa, [
|
|
2392
2452
|
O(l(e(n).columnDirectory) + " ", 1),
|
|
2393
2453
|
a("b", null, l(e(H).columns.length), 1),
|
|
2394
2454
|
le(re, {
|
|
@@ -2396,88 +2456,88 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2396
2456
|
size: 13
|
|
2397
2457
|
})
|
|
2398
2458
|
])
|
|
2399
|
-
], 40,
|
|
2400
|
-
a("div",
|
|
2459
|
+
], 40, Ja),
|
|
2460
|
+
a("div", Ya, [
|
|
2401
2461
|
a("span", {
|
|
2402
2462
|
"aria-label": e(n).fieldPosition
|
|
2403
2463
|
}, [
|
|
2404
|
-
O(l(e(
|
|
2405
|
-
|
|
2464
|
+
O(l(e($) >= 0 ? e($) + 1 : 0), 1),
|
|
2465
|
+
u[55] || (u[55] = a("i", null, "/", -1)),
|
|
2406
2466
|
O(l(e(H).columns.length), 1)
|
|
2407
|
-
], 8,
|
|
2467
|
+
], 8, Qa),
|
|
2408
2468
|
a("button", {
|
|
2409
2469
|
type: "button",
|
|
2410
2470
|
class: "mr-designer-icon-button",
|
|
2411
2471
|
"aria-label": e(n).previousColumn,
|
|
2412
2472
|
title: e(n).previousColumn,
|
|
2413
|
-
disabled: e(
|
|
2414
|
-
onClick:
|
|
2473
|
+
disabled: e($) <= 0,
|
|
2474
|
+
onClick: u[14] || (u[14] = (r) => e(k).stepColumn(-1))
|
|
2415
2475
|
}, [
|
|
2416
2476
|
le(re, {
|
|
2417
2477
|
name: "chevron-left",
|
|
2418
2478
|
size: 14
|
|
2419
2479
|
})
|
|
2420
|
-
], 8,
|
|
2480
|
+
], 8, Za),
|
|
2421
2481
|
a("button", {
|
|
2422
2482
|
type: "button",
|
|
2423
2483
|
class: "mr-designer-icon-button",
|
|
2424
2484
|
"aria-label": e(n).nextColumn,
|
|
2425
2485
|
title: e(n).nextColumn,
|
|
2426
|
-
disabled: e(
|
|
2427
|
-
onClick:
|
|
2486
|
+
disabled: e($) >= e(H).columns.length - 1,
|
|
2487
|
+
onClick: u[15] || (u[15] = (r) => e(k).stepColumn(1))
|
|
2428
2488
|
}, [
|
|
2429
2489
|
le(re, {
|
|
2430
2490
|
name: "chevron-right",
|
|
2431
2491
|
size: 14
|
|
2432
2492
|
})
|
|
2433
|
-
], 8,
|
|
2493
|
+
], 8, eo)
|
|
2434
2494
|
])
|
|
2435
2495
|
]),
|
|
2436
|
-
e(P) ? (
|
|
2496
|
+
e(P) ? (g(), b("fieldset", {
|
|
2437
2497
|
key: 0,
|
|
2438
2498
|
class: "mr-designer-properties",
|
|
2439
|
-
disabled: t.readonly || e(
|
|
2499
|
+
disabled: t.readonly || e(S) || e(C),
|
|
2440
2500
|
"aria-label": e(n).columnProperties
|
|
2441
2501
|
}, [
|
|
2442
|
-
a("div",
|
|
2502
|
+
a("div", no, [
|
|
2443
2503
|
a("h3", null, l(e(n).contentGroup), 1),
|
|
2444
2504
|
a("label", null, [
|
|
2445
2505
|
O(l(e(n).header), 1),
|
|
2446
2506
|
a("input", {
|
|
2447
2507
|
value: e(P).column.header,
|
|
2448
|
-
onInput:
|
|
2508
|
+
onInput: u[16] || (u[16] = (r) => e(m).setColumn(
|
|
2449
2509
|
e(P).index,
|
|
2450
2510
|
"header",
|
|
2451
|
-
|
|
2511
|
+
xe(r)
|
|
2452
2512
|
))
|
|
2453
|
-
}, null, 40,
|
|
2513
|
+
}, null, 40, ao)
|
|
2454
2514
|
]),
|
|
2455
2515
|
a("label", null, [
|
|
2456
2516
|
O(l(e(n).field), 1),
|
|
2457
2517
|
a("input", {
|
|
2458
2518
|
value: e(P).column.field,
|
|
2459
|
-
list: e(
|
|
2460
|
-
onChange:
|
|
2519
|
+
list: e(Ie) ? `${B}-fields` : void 0,
|
|
2520
|
+
onChange: u[17] || (u[17] = (r) => e(m).setColumn(
|
|
2461
2521
|
e(P).index,
|
|
2462
2522
|
"field",
|
|
2463
|
-
|
|
2523
|
+
xe(r)
|
|
2464
2524
|
))
|
|
2465
|
-
}, null, 40,
|
|
2525
|
+
}, null, 40, oo)
|
|
2466
2526
|
]),
|
|
2467
|
-
e(
|
|
2527
|
+
e(Ie) ? (g(), b("datalist", {
|
|
2468
2528
|
key: 0,
|
|
2469
|
-
id: `${
|
|
2529
|
+
id: `${B}-fields`
|
|
2470
2530
|
}, [
|
|
2471
|
-
(
|
|
2531
|
+
(g(!0), b(q, null, Q(e(Ie).fields, (r) => (g(), b("option", {
|
|
2472
2532
|
key: r.field,
|
|
2473
2533
|
value: r.field
|
|
2474
|
-
}, l(r.label) + " · " + l(r.type) + " " + l(r.unit), 9,
|
|
2475
|
-
], 8,
|
|
2534
|
+
}, l(r.label) + " · " + l(r.type) + " " + l(r.unit), 9, io))), 128))
|
|
2535
|
+
], 8, lo)) : N("", !0)
|
|
2476
2536
|
]),
|
|
2477
|
-
a("div",
|
|
2537
|
+
a("div", so, [
|
|
2478
2538
|
a("h3", null, l(e(n).formatGroup), 1),
|
|
2479
|
-
a("div",
|
|
2480
|
-
a("label",
|
|
2539
|
+
a("div", ro, [
|
|
2540
|
+
a("label", uo, [
|
|
2481
2541
|
O(l(e(n).width), 1),
|
|
2482
2542
|
a("input", {
|
|
2483
2543
|
type: "number",
|
|
@@ -2485,50 +2545,50 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2485
2545
|
step: "0.5",
|
|
2486
2546
|
value: e(P).column.widthMm,
|
|
2487
2547
|
disabled: De.value,
|
|
2488
|
-
onChange:
|
|
2548
|
+
onChange: u[18] || (u[18] = (r) => e(m).setColumn(
|
|
2489
2549
|
e(P).index,
|
|
2490
2550
|
"widthMm",
|
|
2491
|
-
|
|
2551
|
+
xe(r)
|
|
2492
2552
|
))
|
|
2493
|
-
}, null, 40,
|
|
2553
|
+
}, null, 40, co)
|
|
2494
2554
|
]),
|
|
2495
|
-
a("label",
|
|
2555
|
+
a("label", mo, [
|
|
2496
2556
|
O(l(e(n).semantic), 1),
|
|
2497
2557
|
a("select", {
|
|
2498
2558
|
value: e(P).column.semanticRole || "text",
|
|
2499
|
-
onChange:
|
|
2559
|
+
onChange: u[19] || (u[19] = (r) => e(m).setColumn(
|
|
2500
2560
|
e(P).index,
|
|
2501
2561
|
"semanticRole",
|
|
2502
|
-
|
|
2562
|
+
xe(r)
|
|
2503
2563
|
))
|
|
2504
2564
|
}, [
|
|
2505
|
-
a("option",
|
|
2506
|
-
a("option",
|
|
2507
|
-
a("option",
|
|
2508
|
-
a("option",
|
|
2509
|
-
a("option",
|
|
2510
|
-
], 40,
|
|
2565
|
+
a("option", po, l(e(n).identifier), 1),
|
|
2566
|
+
a("option", go, l(e(n).dimension), 1),
|
|
2567
|
+
a("option", ho, l(e(n).measure), 1),
|
|
2568
|
+
a("option", fo, l(e(n).date), 1),
|
|
2569
|
+
a("option", bo, l(e(n).text), 1)
|
|
2570
|
+
], 40, vo)
|
|
2511
2571
|
])
|
|
2512
2572
|
]),
|
|
2513
|
-
a("div",
|
|
2573
|
+
a("div", yo, [
|
|
2514
2574
|
a("span", null, l(e(n).bodyAlign), 1),
|
|
2515
|
-
le(
|
|
2575
|
+
le(nt, {
|
|
2516
2576
|
"model-value": e(P).column.align ?? e(P).column.style?.align ?? e(H).align ?? "left",
|
|
2517
2577
|
label: e(n).bodyAlign,
|
|
2518
|
-
labels:
|
|
2578
|
+
labels: it.value,
|
|
2519
2579
|
"auto-label": e(n).autoShort,
|
|
2520
2580
|
"allow-auto": "",
|
|
2521
|
-
"onUpdate:modelValue":
|
|
2581
|
+
"onUpdate:modelValue": u[20] || (u[20] = (r) => e(m).setColumn(e(P).index, "align", r))
|
|
2522
2582
|
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
2523
2583
|
]),
|
|
2524
|
-
a("div",
|
|
2584
|
+
a("div", wo, [
|
|
2525
2585
|
a("span", null, l(e(n).headerAlign), 1),
|
|
2526
|
-
le(
|
|
2586
|
+
le(nt, {
|
|
2527
2587
|
"model-value": e(m).headerAlignments.value[e(P).index] || "left",
|
|
2528
2588
|
label: e(n).headerAlign,
|
|
2529
|
-
labels:
|
|
2589
|
+
labels: it.value,
|
|
2530
2590
|
"auto-label": e(n).autoShort,
|
|
2531
|
-
"onUpdate:modelValue":
|
|
2591
|
+
"onUpdate:modelValue": u[21] || (u[21] = (r) => e(m).setColumn(
|
|
2532
2592
|
e(P).index,
|
|
2533
2593
|
"headerAlign",
|
|
2534
2594
|
r
|
|
@@ -2536,77 +2596,77 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2536
2596
|
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
2537
2597
|
])
|
|
2538
2598
|
]),
|
|
2539
|
-
a("label",
|
|
2599
|
+
a("label", xo, [
|
|
2540
2600
|
O(l(e(n).editable), 1),
|
|
2541
2601
|
a("input", {
|
|
2542
2602
|
type: "checkbox",
|
|
2543
2603
|
role: "switch",
|
|
2544
2604
|
checked: e(P).column.editable === !0,
|
|
2545
|
-
onChange:
|
|
2605
|
+
onChange: u[22] || (u[22] = (r) => e(m).setColumn(
|
|
2546
2606
|
e(P).index,
|
|
2547
2607
|
"editable",
|
|
2548
|
-
|
|
2608
|
+
Qe(r)
|
|
2549
2609
|
))
|
|
2550
|
-
}, null, 40,
|
|
2610
|
+
}, null, 40, Mo)
|
|
2551
2611
|
]),
|
|
2552
|
-
a("div",
|
|
2612
|
+
a("div", ko, [
|
|
2553
2613
|
a("span", null, l(e(n).columnOrder), 1),
|
|
2554
2614
|
a("button", {
|
|
2555
2615
|
type: "button",
|
|
2556
2616
|
"aria-label": e(n).moveColumnLeft,
|
|
2557
2617
|
title: e(n).moveColumnLeft,
|
|
2558
|
-
disabled: De.value || e(
|
|
2559
|
-
onClick:
|
|
2618
|
+
disabled: De.value || e($) <= 0,
|
|
2619
|
+
onClick: u[23] || (u[23] = (r) => e(W)(-1))
|
|
2560
2620
|
}, [
|
|
2561
2621
|
le(re, {
|
|
2562
2622
|
name: "chevron-left",
|
|
2563
2623
|
size: 13
|
|
2564
2624
|
})
|
|
2565
|
-
], 8,
|
|
2625
|
+
], 8, Co),
|
|
2566
2626
|
a("button", {
|
|
2567
2627
|
type: "button",
|
|
2568
2628
|
"aria-label": e(n).moveColumnRight,
|
|
2569
2629
|
title: e(n).moveColumnRight,
|
|
2570
|
-
disabled: De.value || e(
|
|
2571
|
-
onClick:
|
|
2630
|
+
disabled: De.value || e($) >= e(H).columns.length - 1,
|
|
2631
|
+
onClick: u[24] || (u[24] = (r) => e(W)(1))
|
|
2572
2632
|
}, [
|
|
2573
2633
|
le(re, {
|
|
2574
2634
|
name: "chevron-right",
|
|
2575
2635
|
size: 13
|
|
2576
2636
|
})
|
|
2577
|
-
], 8,
|
|
2637
|
+
], 8, So),
|
|
2578
2638
|
a("label", null, [
|
|
2579
2639
|
O(l(e(n).columnVisible), 1),
|
|
2580
2640
|
a("input", {
|
|
2581
2641
|
type: "checkbox",
|
|
2582
2642
|
checked: e(P).column.hidden !== !0,
|
|
2583
2643
|
disabled: De.value || e(P).column.hidden !== !0 && e(H).columns.filter((r) => !r.hidden).length === 1,
|
|
2584
|
-
onChange:
|
|
2644
|
+
onChange: u[25] || (u[25] = (r) => e(m).setColumn(
|
|
2585
2645
|
e(P).index,
|
|
2586
2646
|
"hidden",
|
|
2587
|
-
!
|
|
2647
|
+
!Qe(r)
|
|
2588
2648
|
))
|
|
2589
|
-
}, null, 40,
|
|
2649
|
+
}, null, 40, _o)
|
|
2590
2650
|
])
|
|
2591
2651
|
])
|
|
2592
|
-
], 8,
|
|
2593
|
-
e(
|
|
2652
|
+
], 8, to)) : N("", !0),
|
|
2653
|
+
e(lt) ? (g(), b("div", {
|
|
2594
2654
|
key: 1,
|
|
2595
|
-
id: `${
|
|
2655
|
+
id: `${B}-directory`,
|
|
2596
2656
|
ref_key: "directoryPanel",
|
|
2597
|
-
ref:
|
|
2657
|
+
ref: Mt,
|
|
2598
2658
|
role: "dialog",
|
|
2599
2659
|
"aria-label": e(n).columnDirectory,
|
|
2600
2660
|
class: "mr-designer-directory",
|
|
2601
|
-
onKeydown:
|
|
2661
|
+
onKeydown: u[35] || (u[35] = Ze(
|
|
2602
2662
|
//@ts-ignore
|
|
2603
2663
|
(...r) => e(ie).escape && e(ie).escape(...r),
|
|
2604
2664
|
["esc"]
|
|
2605
2665
|
)),
|
|
2606
|
-
onFocusout:
|
|
2666
|
+
onFocusout: u[36] || (u[36] = //@ts-ignore
|
|
2607
2667
|
(...r) => e(ie).leave && e(ie).leave(...r))
|
|
2608
2668
|
}, [
|
|
2609
|
-
a("div",
|
|
2669
|
+
a("div", $o, [
|
|
2610
2670
|
a("strong", null, [
|
|
2611
2671
|
O(l(e(n).columnDirectory) + " ", 1),
|
|
2612
2672
|
a("span", null, l(e(H).columns.length), 1)
|
|
@@ -2615,184 +2675,184 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2615
2675
|
type: "button",
|
|
2616
2676
|
class: "mr-designer-icon-button",
|
|
2617
2677
|
"aria-label": e(n).closeDirectory,
|
|
2618
|
-
onClick:
|
|
2678
|
+
onClick: u[26] || (u[26] = (r) => e(ie).close(!0))
|
|
2619
2679
|
}, [
|
|
2620
2680
|
le(re, {
|
|
2621
2681
|
name: "close",
|
|
2622
2682
|
size: 15
|
|
2623
2683
|
})
|
|
2624
|
-
], 8,
|
|
2684
|
+
], 8, Eo)
|
|
2625
2685
|
]),
|
|
2626
|
-
a("div",
|
|
2686
|
+
a("div", Ro, [
|
|
2627
2687
|
le(re, {
|
|
2628
2688
|
name: "search",
|
|
2629
2689
|
size: 14
|
|
2630
2690
|
}),
|
|
2631
2691
|
ue(a("input", {
|
|
2632
2692
|
ref_key: "directorySearch",
|
|
2633
|
-
ref:
|
|
2634
|
-
"onUpdate:modelValue":
|
|
2693
|
+
ref: kt,
|
|
2694
|
+
"onUpdate:modelValue": u[27] || (u[27] = (r) => Ve(U) ? U.value = r : null),
|
|
2635
2695
|
type: "search",
|
|
2636
2696
|
"aria-label": e(n).columnsSearch,
|
|
2637
2697
|
placeholder: e(n).columnsSearch,
|
|
2638
|
-
onKeydown:
|
|
2698
|
+
onKeydown: u[28] || (u[28] = //@ts-ignore
|
|
2639
2699
|
(...r) => e(ie).searchKeydown && e(ie).searchKeydown(...r))
|
|
2640
|
-
}, null, 40,
|
|
2641
|
-
[
|
|
2700
|
+
}, null, 40, To), [
|
|
2701
|
+
[ut, e(U)]
|
|
2642
2702
|
]),
|
|
2643
|
-
e(
|
|
2703
|
+
e(U) ? (g(), b("button", {
|
|
2644
2704
|
key: 0,
|
|
2645
2705
|
type: "button",
|
|
2646
2706
|
class: "mr-designer-icon-button",
|
|
2647
2707
|
"aria-label": e(n).clearSearch,
|
|
2648
2708
|
title: e(n).clearSearch,
|
|
2649
|
-
onClick:
|
|
2709
|
+
onClick: u[29] || (u[29] = (r) => U.value = "")
|
|
2650
2710
|
}, [
|
|
2651
2711
|
le(re, {
|
|
2652
2712
|
name: "close",
|
|
2653
2713
|
size: 13
|
|
2654
2714
|
})
|
|
2655
|
-
], 8,
|
|
2715
|
+
], 8, Lo)) : N("", !0)
|
|
2656
2716
|
]),
|
|
2657
|
-
a("div",
|
|
2717
|
+
a("div", Do, [
|
|
2658
2718
|
a("button", {
|
|
2659
2719
|
type: "button",
|
|
2660
|
-
disabled: t.readonly || e(
|
|
2661
|
-
onClick:
|
|
2662
|
-
}, l(e(n).selectVisible), 9,
|
|
2663
|
-
e(
|
|
2720
|
+
disabled: t.readonly || e(S) || e(C) || !e(G).length,
|
|
2721
|
+
onClick: u[30] || (u[30] = (r) => e(m).selectVisible(!0))
|
|
2722
|
+
}, l(e(n).selectVisible), 9, Ao),
|
|
2723
|
+
e(X).length ? (g(), b("button", {
|
|
2664
2724
|
key: 0,
|
|
2665
2725
|
type: "button",
|
|
2666
|
-
onClick:
|
|
2726
|
+
onClick: u[31] || (u[31] = //@ts-ignore
|
|
2667
2727
|
(...r) => e(m).clearSelection && e(m).clearSelection(...r))
|
|
2668
|
-
}, l(e(n).clearSelection), 1)) :
|
|
2669
|
-
e(
|
|
2728
|
+
}, l(e(n).clearSelection), 1)) : N("", !0),
|
|
2729
|
+
e(X).length ? (g(), b("span", Po, l(e(n).columnsSelected) + " " + l(e(X).length), 1)) : (g(), b("span", Ho, l(e(G).length) + " / " + l(e(H).columns.length), 1))
|
|
2670
2730
|
]),
|
|
2671
2731
|
a("div", {
|
|
2672
2732
|
ref_key: "columnList",
|
|
2673
|
-
ref:
|
|
2733
|
+
ref: Ct,
|
|
2674
2734
|
class: "mr-designer-column-list",
|
|
2675
2735
|
"aria-label": e(n).columnDirectory,
|
|
2676
2736
|
role: "group"
|
|
2677
2737
|
}, [
|
|
2678
|
-
(
|
|
2679
|
-
key:
|
|
2680
|
-
class: Pe(["mr-designer-column-row", { "is-active": e(
|
|
2738
|
+
(g(!0), b(q, null, Q(e(G), ({ column: r, index: K }) => (g(), b("div", {
|
|
2739
|
+
key: K,
|
|
2740
|
+
class: Pe(["mr-designer-column-row", { "is-active": e($) === K }])
|
|
2681
2741
|
}, [
|
|
2682
2742
|
a("input", {
|
|
2683
2743
|
type: "checkbox",
|
|
2684
2744
|
"aria-label": `${e(n).selectColumn} ${r.header}`,
|
|
2685
|
-
checked: e(
|
|
2686
|
-
disabled: t.readonly || e(
|
|
2687
|
-
onChange: (
|
|
2688
|
-
}, null, 40,
|
|
2745
|
+
checked: e(X).includes(K),
|
|
2746
|
+
disabled: t.readonly || e(S) || e(C),
|
|
2747
|
+
onChange: (Re) => e(m).toggleColumn(K, Qe(Re))
|
|
2748
|
+
}, null, 40, Fo),
|
|
2689
2749
|
a("button", {
|
|
2690
2750
|
type: "button",
|
|
2691
|
-
"data-column-index":
|
|
2692
|
-
"aria-pressed": e(
|
|
2693
|
-
tabindex: e(
|
|
2694
|
-
onClick: (
|
|
2695
|
-
onKeydown:
|
|
2696
|
-
(...
|
|
2751
|
+
"data-column-index": K,
|
|
2752
|
+
"aria-pressed": e($) === K,
|
|
2753
|
+
tabindex: e(wt) === K ? 0 : -1,
|
|
2754
|
+
onClick: (Re) => e(ie).choose(K),
|
|
2755
|
+
onKeydown: u[32] || (u[32] = //@ts-ignore
|
|
2756
|
+
(...Re) => e(ie).navigate && e(ie).navigate(...Re))
|
|
2697
2757
|
}, [
|
|
2698
|
-
a("span",
|
|
2699
|
-
a("span",
|
|
2758
|
+
a("span", zo, l(K + 1), 1),
|
|
2759
|
+
a("span", Oo, [
|
|
2700
2760
|
a("strong", null, l(r.header), 1),
|
|
2701
2761
|
a("small", null, l(r.field), 1)
|
|
2702
2762
|
]),
|
|
2703
|
-
e(
|
|
2763
|
+
e($) === K ? (g(), Me(re, {
|
|
2704
2764
|
key: 0,
|
|
2705
2765
|
name: "chevron-right",
|
|
2706
2766
|
size: 13
|
|
2707
|
-
})) :
|
|
2708
|
-
], 40,
|
|
2767
|
+
})) : N("", !0)
|
|
2768
|
+
], 40, No)
|
|
2709
2769
|
], 2))), 128)),
|
|
2710
|
-
e(G).length ?
|
|
2770
|
+
e(G).length ? N("", !0) : (g(), b("p", Bo, [
|
|
2711
2771
|
le(re, {
|
|
2712
2772
|
name: "search",
|
|
2713
2773
|
size: 20
|
|
2714
2774
|
}),
|
|
2715
2775
|
O(l(e(n).noColumns), 1)
|
|
2716
2776
|
]))
|
|
2717
|
-
], 8,
|
|
2718
|
-
e(
|
|
2777
|
+
], 8, Go),
|
|
2778
|
+
e(X).length ? (g(), b("div", Vo, [
|
|
2719
2779
|
a("label", null, [
|
|
2720
2780
|
O(l(e(n).batchBody), 1),
|
|
2721
2781
|
a("select", {
|
|
2722
2782
|
"aria-label": e(n).batchBody,
|
|
2723
|
-
disabled: t.readonly || e(
|
|
2724
|
-
onChange:
|
|
2783
|
+
disabled: t.readonly || e(S) || e(C),
|
|
2784
|
+
onChange: u[33] || (u[33] = (r) => dt(r, "align"))
|
|
2725
2785
|
}, [
|
|
2726
|
-
a("option",
|
|
2727
|
-
a("option",
|
|
2728
|
-
a("option",
|
|
2729
|
-
a("option",
|
|
2730
|
-
a("option",
|
|
2731
|
-
a("option",
|
|
2732
|
-
], 40,
|
|
2786
|
+
a("option", Uo, l(e(n).chooseAlignment), 1),
|
|
2787
|
+
a("option", Wo, l(e(n).auto), 1),
|
|
2788
|
+
a("option", Ko, l(e(n).left), 1),
|
|
2789
|
+
a("option", Jo, l(e(n).center), 1),
|
|
2790
|
+
a("option", qo, l(e(n).right), 1),
|
|
2791
|
+
a("option", Xo, l(e(n).justify), 1)
|
|
2792
|
+
], 40, jo)
|
|
2733
2793
|
]),
|
|
2734
2794
|
a("label", null, [
|
|
2735
2795
|
O(l(e(n).batchHeader), 1),
|
|
2736
2796
|
a("select", {
|
|
2737
2797
|
"aria-label": e(n).batchHeader,
|
|
2738
|
-
disabled: t.readonly || e(
|
|
2739
|
-
onChange:
|
|
2798
|
+
disabled: t.readonly || e(S) || e(C),
|
|
2799
|
+
onChange: u[34] || (u[34] = (r) => dt(r, "headerAlign"))
|
|
2740
2800
|
}, [
|
|
2741
|
-
a("option",
|
|
2742
|
-
a("option",
|
|
2743
|
-
a("option",
|
|
2744
|
-
a("option",
|
|
2745
|
-
a("option",
|
|
2746
|
-
], 40,
|
|
2801
|
+
a("option", Qo, l(e(n).chooseAlignment), 1),
|
|
2802
|
+
a("option", Zo, l(e(n).left), 1),
|
|
2803
|
+
a("option", el, l(e(n).center), 1),
|
|
2804
|
+
a("option", tl, l(e(n).right), 1),
|
|
2805
|
+
a("option", nl, l(e(n).justify), 1)
|
|
2806
|
+
], 40, Yo)
|
|
2747
2807
|
])
|
|
2748
|
-
])) :
|
|
2749
|
-
], 40,
|
|
2750
|
-
], 64)) : (
|
|
2751
|
-
], 64)) : e(
|
|
2752
|
-
a("div",
|
|
2808
|
+
])) : N("", !0)
|
|
2809
|
+
], 40, Io)) : N("", !0)
|
|
2810
|
+
], 64)) : (g(), b("p", al, l(e(n).noColumns), 1))
|
|
2811
|
+
], 64)) : e(L) === "component" ? (g(), b(q, { key: 2 }, [
|
|
2812
|
+
a("div", ol, [
|
|
2753
2813
|
a("select", {
|
|
2754
2814
|
"aria-label": e(n).insertComponent,
|
|
2755
|
-
disabled: e(
|
|
2756
|
-
onChange:
|
|
2757
|
-
(...r) => e(
|
|
2815
|
+
disabled: e(ne) || de.value,
|
|
2816
|
+
onChange: u[37] || (u[37] = //@ts-ignore
|
|
2817
|
+
(...r) => e(Ne) && e(Ne)(...r))
|
|
2758
2818
|
}, [
|
|
2759
|
-
a("option",
|
|
2760
|
-
a("option",
|
|
2761
|
-
a("option",
|
|
2762
|
-
a("option",
|
|
2763
|
-
a("option",
|
|
2764
|
-
], 40,
|
|
2819
|
+
a("option", il, l(e(n).insertComponent), 1),
|
|
2820
|
+
a("option", sl, l(e(n).insertText), 1),
|
|
2821
|
+
a("option", rl, l(e(n).insertList), 1),
|
|
2822
|
+
a("option", dl, l(e(n).insertImage), 1),
|
|
2823
|
+
a("option", ul, l(e(n).insertRect), 1)
|
|
2824
|
+
], 40, ll),
|
|
2765
2825
|
a("button", {
|
|
2766
2826
|
type: "button",
|
|
2767
2827
|
title: e(n).duplicateComponent,
|
|
2768
2828
|
"aria-label": e(n).duplicateComponent,
|
|
2769
|
-
disabled: e(
|
|
2770
|
-
onClick:
|
|
2771
|
-
(...r) => e(
|
|
2772
|
-
}, " + ", 8,
|
|
2829
|
+
disabled: e(ne) || de.value || !e(we),
|
|
2830
|
+
onClick: u[38] || (u[38] = //@ts-ignore
|
|
2831
|
+
(...r) => e(J).duplicate && e(J).duplicate(...r))
|
|
2832
|
+
}, " + ", 8, cl),
|
|
2773
2833
|
a("button", {
|
|
2774
2834
|
type: "button",
|
|
2775
2835
|
title: e(n).removeComponent,
|
|
2776
2836
|
"aria-label": e(n).removeComponent,
|
|
2777
|
-
disabled: e(
|
|
2778
|
-
onClick:
|
|
2779
|
-
(...r) => e(
|
|
2837
|
+
disabled: e(ne) || de.value || !e(we),
|
|
2838
|
+
onClick: u[39] || (u[39] = //@ts-ignore
|
|
2839
|
+
(...r) => e(J).remove && e(J).remove(...r))
|
|
2780
2840
|
}, [
|
|
2781
2841
|
le(re, {
|
|
2782
2842
|
name: "close",
|
|
2783
2843
|
size: 14
|
|
2784
2844
|
})
|
|
2785
|
-
], 8,
|
|
2845
|
+
], 8, ml)
|
|
2786
2846
|
]),
|
|
2787
|
-
e(
|
|
2847
|
+
e(y).template.pages.length > 1 ? (g(), b("label", vl, [
|
|
2788
2848
|
O(l(e(n).page), 1),
|
|
2789
2849
|
ue(a("select", {
|
|
2790
|
-
"onUpdate:modelValue":
|
|
2850
|
+
"onUpdate:modelValue": u[40] || (u[40] = (r) => Ve(oe) ? oe.value = r : null)
|
|
2791
2851
|
}, [
|
|
2792
|
-
(
|
|
2793
|
-
key:
|
|
2794
|
-
value:
|
|
2795
|
-
}, l(
|
|
2852
|
+
(g(!0), b(q, null, Q(e(y).template.pages, (r, K) => (g(), b("option", {
|
|
2853
|
+
key: K,
|
|
2854
|
+
value: K
|
|
2855
|
+
}, l(K + 1), 9, pl))), 128))
|
|
2796
2856
|
], 512), [
|
|
2797
2857
|
[
|
|
2798
2858
|
He,
|
|
@@ -2801,170 +2861,170 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2801
2861
|
{ number: !0 }
|
|
2802
2862
|
]
|
|
2803
2863
|
])
|
|
2804
|
-
])) :
|
|
2805
|
-
a("label",
|
|
2864
|
+
])) : N("", !0),
|
|
2865
|
+
a("label", gl, [
|
|
2806
2866
|
O(l(e(n).components), 1),
|
|
2807
2867
|
a("select", {
|
|
2808
|
-
value: e(
|
|
2809
|
-
onChange:
|
|
2868
|
+
value: e(me)?.pageIndex === e(oe) ? e(me).componentIndex : -1,
|
|
2869
|
+
onChange: u[41] || (u[41] = (r) => st({
|
|
2810
2870
|
pageIndex: e(oe),
|
|
2811
|
-
componentIndex: Number(
|
|
2871
|
+
componentIndex: Number(xe(r))
|
|
2812
2872
|
}))
|
|
2813
2873
|
}, [
|
|
2814
|
-
a("option",
|
|
2815
|
-
(
|
|
2816
|
-
key:
|
|
2817
|
-
value:
|
|
2818
|
-
}, l(
|
|
2819
|
-
], 40,
|
|
2874
|
+
a("option", fl, l(e(n).noComponent), 1),
|
|
2875
|
+
(g(!0), b(q, null, Q(e(y).template.pages[e(oe)]?.components, (r, K) => (g(), b("option", {
|
|
2876
|
+
key: K,
|
|
2877
|
+
value: K
|
|
2878
|
+
}, l(K + 1) + " · " + l(r.kind === "list" ? r.title || r.dataset : r.text || r.kind), 9, bl))), 128))
|
|
2879
|
+
], 40, hl)
|
|
2820
2880
|
]),
|
|
2821
|
-
e(
|
|
2822
|
-
a("strong", null, l(e(
|
|
2881
|
+
e(J).selections.value.length ? (g(), b("div", yl, [
|
|
2882
|
+
a("strong", null, l(e(J).selections.value.length) + " " + l(e(n).component), 1),
|
|
2823
2883
|
a("button", {
|
|
2824
2884
|
type: "button",
|
|
2825
|
-
disabled: e(
|
|
2826
|
-
onClick:
|
|
2827
|
-
(...r) => e(
|
|
2828
|
-
}, l(e(
|
|
2885
|
+
disabled: e(ne),
|
|
2886
|
+
onClick: u[42] || (u[42] = //@ts-ignore
|
|
2887
|
+
(...r) => e(J).toggleLock && e(J).toggleLock(...r))
|
|
2888
|
+
}, l(e(J).allLocked.value ? e(n).unlockSelection : e(n).lockSelection), 9, wl),
|
|
2829
2889
|
a("select", {
|
|
2830
2890
|
"aria-label": e(n).alignSelection,
|
|
2831
|
-
disabled: e(
|
|
2832
|
-
onChange:
|
|
2833
|
-
e(
|
|
2891
|
+
disabled: e(ne) || de.value || e(J).selections.value.length < 2,
|
|
2892
|
+
onChange: u[43] || (u[43] = (r) => {
|
|
2893
|
+
e(J).align(xe(r)), r.target.value = "";
|
|
2834
2894
|
})
|
|
2835
2895
|
}, [
|
|
2836
|
-
a("option",
|
|
2837
|
-
a("option",
|
|
2838
|
-
a("option",
|
|
2839
|
-
a("option",
|
|
2840
|
-
a("option",
|
|
2841
|
-
a("option",
|
|
2842
|
-
a("option",
|
|
2843
|
-
], 40,
|
|
2896
|
+
a("option", Ml, l(e(n).alignSelection), 1),
|
|
2897
|
+
a("option", kl, l(e(n).leftEdges), 1),
|
|
2898
|
+
a("option", Cl, l(e(n).centers), 1),
|
|
2899
|
+
a("option", Sl, l(e(n).rightEdges), 1),
|
|
2900
|
+
a("option", _l, l(e(n).topEdges), 1),
|
|
2901
|
+
a("option", Il, l(e(n).middles), 1),
|
|
2902
|
+
a("option", $l, l(e(n).bottomEdges), 1)
|
|
2903
|
+
], 40, xl),
|
|
2844
2904
|
a("button", {
|
|
2845
2905
|
type: "button",
|
|
2846
|
-
disabled: e(
|
|
2847
|
-
onClick:
|
|
2848
|
-
}, l(e(n).horizontalSpacing), 9,
|
|
2906
|
+
disabled: e(ne) || de.value || e(J).selections.value.length < 3,
|
|
2907
|
+
onClick: u[44] || (u[44] = (r) => e(J).distribute("horizontal"))
|
|
2908
|
+
}, l(e(n).horizontalSpacing), 9, El),
|
|
2849
2909
|
a("button", {
|
|
2850
2910
|
type: "button",
|
|
2851
|
-
disabled: e(
|
|
2852
|
-
onClick:
|
|
2853
|
-
}, l(e(n).verticalSpacing), 9,
|
|
2854
|
-
e(
|
|
2855
|
-
])) :
|
|
2856
|
-
e(
|
|
2857
|
-
a("div",
|
|
2911
|
+
disabled: e(ne) || de.value || e(J).selections.value.length < 3,
|
|
2912
|
+
onClick: u[45] || (u[45] = (r) => e(J).distribute("vertical"))
|
|
2913
|
+
}, l(e(n).verticalSpacing), 9, Rl),
|
|
2914
|
+
e(J).allLocked.value ? (g(), b("small", Tl, l(e(n).sessionLock), 1)) : N("", !0)
|
|
2915
|
+
])) : N("", !0),
|
|
2916
|
+
e(we) ? (g(), b(q, { key: 2 }, [
|
|
2917
|
+
a("div", Ll, [
|
|
2858
2918
|
a("button", {
|
|
2859
2919
|
type: "button",
|
|
2860
|
-
disabled: e(
|
|
2861
|
-
onClick:
|
|
2862
|
-
}, l(e(n).backward), 9,
|
|
2920
|
+
disabled: e(ne) || de.value || e(me)?.componentIndex === 0,
|
|
2921
|
+
onClick: u[46] || (u[46] = (r) => e(J).reorder(-1))
|
|
2922
|
+
}, l(e(n).backward), 9, Dl),
|
|
2863
2923
|
a("button", {
|
|
2864
2924
|
type: "button",
|
|
2865
|
-
disabled: e(
|
|
2866
|
-
onClick:
|
|
2867
|
-
}, l(e(n).forward), 9,
|
|
2925
|
+
disabled: e(ne) || de.value || e(me)?.componentIndex === (e(y).template.pages[e(oe)]?.components.length ?? 0) - 1,
|
|
2926
|
+
onClick: u[47] || (u[47] = (r) => e(J).reorder(1))
|
|
2927
|
+
}, l(e(n).forward), 9, Al)
|
|
2868
2928
|
]),
|
|
2869
|
-
le(
|
|
2870
|
-
component: e(
|
|
2929
|
+
le(Kn, {
|
|
2930
|
+
component: e(we),
|
|
2871
2931
|
"geometry-disabled": de.value,
|
|
2872
|
-
disabled: e(
|
|
2932
|
+
disabled: e(ne) || e(J).locked(e(me)),
|
|
2873
2933
|
messages: e(n),
|
|
2874
|
-
onGeometry: e(
|
|
2875
|
-
onPatch: e(
|
|
2934
|
+
onGeometry: e(J).geometry,
|
|
2935
|
+
onPatch: e(Xe)
|
|
2876
2936
|
}, null, 8, ["component", "geometry-disabled", "disabled", "messages", "onGeometry", "onPatch"]),
|
|
2877
|
-
e(
|
|
2937
|
+
e(we).kind === "list" ? (g(), Me(ta, {
|
|
2878
2938
|
key: 0,
|
|
2879
|
-
list: e(
|
|
2880
|
-
disabled: e(
|
|
2939
|
+
list: e(we),
|
|
2940
|
+
disabled: e(ne) || de.value,
|
|
2881
2941
|
messages: e(n),
|
|
2882
|
-
onCommand: e(
|
|
2883
|
-
}, null, 8, ["list", "disabled", "messages", "onCommand"])) :
|
|
2884
|
-
], 64)) : (
|
|
2885
|
-
], 64)) : e(
|
|
2942
|
+
onCommand: e(Y)
|
|
2943
|
+
}, null, 8, ["list", "disabled", "messages", "onCommand"])) : N("", !0)
|
|
2944
|
+
], 64)) : (g(), b("p", Pl, l(e(n).noComponent), 1))
|
|
2945
|
+
], 64)) : e(L) === "template" ? (g(), b(q, { key: 3 }, [
|
|
2886
2946
|
a("h3", null, l(e(n).templateDetails), 1),
|
|
2887
|
-
a("label",
|
|
2947
|
+
a("label", Hl, [
|
|
2888
2948
|
O(l(e(n).name), 1),
|
|
2889
2949
|
a("input", {
|
|
2890
|
-
value: e(
|
|
2891
|
-
disabled: t.readonly || e(
|
|
2892
|
-
onInput:
|
|
2893
|
-
}, null, 40,
|
|
2950
|
+
value: e(y).name,
|
|
2951
|
+
disabled: t.readonly || e(S) || e(C),
|
|
2952
|
+
onInput: u[48] || (u[48] = (r) => e(m).setName(xe(r)))
|
|
2953
|
+
}, null, 40, Gl)
|
|
2894
2954
|
]),
|
|
2895
|
-
a("label",
|
|
2955
|
+
a("label", Fl, [
|
|
2896
2956
|
O(l(e(n).description), 1),
|
|
2897
2957
|
a("textarea", {
|
|
2898
2958
|
rows: "2",
|
|
2899
|
-
value: e(
|
|
2900
|
-
disabled: t.readonly || e(
|
|
2901
|
-
onInput:
|
|
2902
|
-
}, null, 40,
|
|
2959
|
+
value: e(y).description,
|
|
2960
|
+
disabled: t.readonly || e(S) || e(C),
|
|
2961
|
+
onInput: u[49] || (u[49] = (r) => e(m).setDescription(xe(r)))
|
|
2962
|
+
}, null, 40, Nl)
|
|
2903
2963
|
]),
|
|
2904
|
-
a("details",
|
|
2964
|
+
a("details", zl, [
|
|
2905
2965
|
a("summary", null, l(e(n).technicalDetails), 1),
|
|
2906
|
-
a("dl",
|
|
2966
|
+
a("dl", Ol, [
|
|
2907
2967
|
a("dt", null, l(e(n).templateIdentity), 1),
|
|
2908
|
-
a("dd", null, l(e(
|
|
2968
|
+
a("dd", null, l(e(y).id), 1),
|
|
2909
2969
|
a("dt", null, l(e(n).templateRevision), 1),
|
|
2910
|
-
a("dd", null, l(e(
|
|
2970
|
+
a("dd", null, l(e(y).revision || e(n).unpublished), 1)
|
|
2911
2971
|
])
|
|
2912
2972
|
])
|
|
2913
|
-
], 64)) : (
|
|
2973
|
+
], 64)) : (g(), b(q, { key: 4 }, [
|
|
2914
2974
|
a("h3", null, l(e(n).advancedTitle), 1),
|
|
2915
|
-
a("label",
|
|
2975
|
+
a("label", Bl, [
|
|
2916
2976
|
O(l(e(n).json), 1),
|
|
2917
2977
|
ue(a("textarea", {
|
|
2918
|
-
"onUpdate:modelValue":
|
|
2978
|
+
"onUpdate:modelValue": u[50] || (u[50] = (r) => Ve(A) ? A.value = r : null),
|
|
2919
2979
|
class: "mr-designer-json",
|
|
2920
2980
|
"aria-label": e(n).json,
|
|
2921
|
-
disabled: t.readonly || e(
|
|
2981
|
+
disabled: t.readonly || e(S),
|
|
2922
2982
|
spellcheck: "false"
|
|
2923
|
-
}, null, 8,
|
|
2924
|
-
[
|
|
2983
|
+
}, null, 8, Vl), [
|
|
2984
|
+
[ut, e(A)]
|
|
2925
2985
|
])
|
|
2926
2986
|
]),
|
|
2927
2987
|
a("button", {
|
|
2928
2988
|
type: "button",
|
|
2929
2989
|
class: "mr-designer-apply-json",
|
|
2930
|
-
disabled: t.readonly || e(
|
|
2931
|
-
onClick:
|
|
2990
|
+
disabled: t.readonly || e(S),
|
|
2991
|
+
onClick: u[51] || (u[51] = //@ts-ignore
|
|
2932
2992
|
(...r) => e(m).applyJson && e(m).applyJson(...r))
|
|
2933
|
-
}, l(e(n).applyJson), 9,
|
|
2993
|
+
}, l(e(n).applyJson), 9, jl)
|
|
2934
2994
|
], 64)),
|
|
2935
|
-
e(
|
|
2936
|
-
], 10,
|
|
2937
|
-
])) :
|
|
2938
|
-
e(
|
|
2995
|
+
e(C) ? (g(), b("p", Ul, l(e(n).jsonPending), 1)) : N("", !0)
|
|
2996
|
+
], 10, Ba)
|
|
2997
|
+
])) : N("", !0),
|
|
2998
|
+
e(L) !== "tools" ? (g(), b("div", {
|
|
2939
2999
|
key: 2,
|
|
2940
3000
|
class: "mr-designer-preview",
|
|
2941
3001
|
"aria-label": e(n).previewTitle
|
|
2942
3002
|
}, [
|
|
2943
|
-
e(I) ? (
|
|
2944
|
-
e(
|
|
2945
|
-
(
|
|
3003
|
+
e(I) ? (g(), b("div", Kl, l(e(I)), 1)) : N("", !0),
|
|
3004
|
+
e(E).ok ? N("", !0) : (g(), b("ul", Jl, [
|
|
3005
|
+
(g(!0), b(q, null, Q(e(E).errors, (r) => (g(), b("li", {
|
|
2946
3006
|
key: r.path
|
|
2947
3007
|
}, l(r.path) + ":" + l(r.message), 1))), 128))
|
|
2948
3008
|
])),
|
|
2949
|
-
e(
|
|
3009
|
+
e(fe) === "design" && e(E).ok ? (g(), Me(vn, {
|
|
2950
3010
|
key: 2,
|
|
2951
|
-
document: e(
|
|
2952
|
-
selection: e(
|
|
2953
|
-
selections: e(
|
|
2954
|
-
locked: e(
|
|
2955
|
-
"active-column-index": e(
|
|
3011
|
+
document: e(y),
|
|
3012
|
+
selection: e(me),
|
|
3013
|
+
selections: e(J).selections.value,
|
|
3014
|
+
locked: e(J).locked,
|
|
3015
|
+
"active-column-index": e($),
|
|
2956
3016
|
"page-index": e(oe),
|
|
2957
3017
|
datasets: t.datasets,
|
|
2958
|
-
disabled: e(
|
|
3018
|
+
disabled: e(ne) || de.value || e(m).isToolPending("rules"),
|
|
2959
3019
|
messages: e(n),
|
|
2960
|
-
onSelect:
|
|
2961
|
-
onGeometry: e(
|
|
3020
|
+
onSelect: st,
|
|
3021
|
+
onGeometry: e(J).geometry,
|
|
2962
3022
|
onColumn: e(k).activate,
|
|
2963
|
-
onWidth:
|
|
2964
|
-
}, null, 8, ["document", "selection", "selections", "locked", "active-column-index", "page-index", "datasets", "disabled", "messages", "onGeometry", "onColumn"])) : e(
|
|
3023
|
+
onWidth: u[52] || (u[52] = (r, K) => e(m).setColumn(r, "widthMm", String(K)))
|
|
3024
|
+
}, null, 8, ["document", "selection", "selections", "locked", "active-column-index", "page-index", "datasets", "disabled", "messages", "onGeometry", "onColumn"])) : e(te) && e(E).ok ? (g(), Me(e(Tt), {
|
|
2965
3025
|
key: 3,
|
|
2966
3026
|
"report-id": "draft",
|
|
2967
|
-
fetcher: e(
|
|
3027
|
+
fetcher: e(te),
|
|
2968
3028
|
messages: {
|
|
2969
3029
|
title: e(n).previewTitle,
|
|
2970
3030
|
columnDirectory: e(n).previewFieldDirectory
|
|
@@ -2973,12 +3033,12 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
2973
3033
|
editable: !1,
|
|
2974
3034
|
"excel-import": !1,
|
|
2975
3035
|
height: "100%"
|
|
2976
|
-
}, null, 8, ["fetcher", "messages"])) : (
|
|
2977
|
-
], 8,
|
|
3036
|
+
}, null, 8, ["fetcher", "messages"])) : (g(), b("p", ql, l(e(n).invalid), 1))
|
|
3037
|
+
], 8, Wl)) : N("", !0)
|
|
2978
3038
|
], 2)
|
|
2979
|
-
], 8,
|
|
3039
|
+
], 8, va));
|
|
2980
3040
|
}
|
|
2981
|
-
}),
|
|
3041
|
+
}), oi = /* @__PURE__ */ Fe(Xl, [["__scopeId", "data-v-af7ee097"]]), li = {
|
|
2982
3042
|
stale: "输入或验收范围已变化,旧结果已失效,请重新运行检查。",
|
|
2983
3043
|
scope: "上次实测范围",
|
|
2984
3044
|
datasets: "个数据集",
|
|
@@ -3011,13 +3071,32 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
3011
3071
|
checked: "检查结果对应本次样例,不代替服务端发布权限与全量数据校验。",
|
|
3012
3072
|
categories: { metadata: "信息", structure: "结构", binding: "字段", calculation: "计算", format: "样式" },
|
|
3013
3073
|
kinds: { added: "新增", removed: "删除", modified: "修改", moved: "调序" }
|
|
3014
|
-
},
|
|
3074
|
+
}, ii = {
|
|
3015
3075
|
tableMode: "传统整表",
|
|
3016
3076
|
multiRegions: "多区域绑定",
|
|
3017
3077
|
multiHint: "点击单元格选择起点,Shift 点击选择终点;每个动态区域选择一行原型。",
|
|
3018
3078
|
addRegion: "创建区域",
|
|
3019
3079
|
removeRegion: "删除区域",
|
|
3020
3080
|
regionProperties: "当前区域",
|
|
3081
|
+
regionReady: "就绪",
|
|
3082
|
+
regionPending: "待补齐",
|
|
3083
|
+
regionError: "需修正",
|
|
3084
|
+
locateIssue: "定位并修正",
|
|
3085
|
+
nextDataset: "下一步:选择业务数据集",
|
|
3086
|
+
nextRowKey: "下一步:选择稳定业务主键",
|
|
3087
|
+
nextField: "下一步:补齐或修正逐列字段映射",
|
|
3088
|
+
nextRange: "下一步:检查原型范围及区域重叠",
|
|
3089
|
+
nextRegion: "下一步:在原始模板中选择一行并创建区域",
|
|
3090
|
+
nextHeader: "下一步:选择整行并标记表头和明细",
|
|
3091
|
+
nextFooter: "下一步:检查重复页尾范围",
|
|
3092
|
+
nextContract: "下一步:检查数据集契约和样例",
|
|
3093
|
+
dataContract: "数据集契约",
|
|
3094
|
+
inspectIssues: "查看待修正项",
|
|
3095
|
+
previousIssues: "上一组问题",
|
|
3096
|
+
nextIssues: "下一组问题",
|
|
3097
|
+
noCellSelection: "请先点击单元格,Shift 点击选择一行范围",
|
|
3098
|
+
limitRegions: "最多创建 128 个区域",
|
|
3099
|
+
applying: "正在确认模板…",
|
|
3021
3100
|
regionCoordinates: "原型范围",
|
|
3022
3101
|
regionMode: "填充方式",
|
|
3023
3102
|
recordMode: "单记录",
|
|
@@ -3105,7 +3184,7 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
3105
3184
|
mappedTo: "绑定到",
|
|
3106
3185
|
sampleOnly: "仅契约样例",
|
|
3107
3186
|
schemaOnly: "契约字段,不执行接口查询"
|
|
3108
|
-
},
|
|
3187
|
+
}, si = {
|
|
3109
3188
|
restoreDraft: "恢复工具草稿",
|
|
3110
3189
|
catalog: "规则与字段",
|
|
3111
3190
|
searchFields: "搜索字段、类型或单位",
|
|
@@ -3252,7 +3331,7 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
3252
3331
|
sampleError: "验算未通过",
|
|
3253
3332
|
new: "新增",
|
|
3254
3333
|
enabled: "启用"
|
|
3255
|
-
},
|
|
3334
|
+
}, ri = {
|
|
3256
3335
|
paramsTool: "查询参数",
|
|
3257
3336
|
paramsDescription: "配置一次,预览与服务端使用同一份校验规则。",
|
|
3258
3337
|
paramsDirectory: "参数目录",
|
|
@@ -3283,6 +3362,11 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
3283
3362
|
paramPending: "尚未应用",
|
|
3284
3363
|
paramReady: "规则有效",
|
|
3285
3364
|
paramInvalid: "规则待修正",
|
|
3365
|
+
paramIssueCount: "待修正问题",
|
|
3366
|
+
paramLocateFirst: "定位首个问题",
|
|
3367
|
+
paramUnnamed: "未命名参数",
|
|
3368
|
+
paramRangeStart: "默认开始日期",
|
|
3369
|
+
paramRangeEnd: "默认结束日期",
|
|
3286
3370
|
paramConflict: "模板参数已在其他操作中变更。请先恢复参数草稿,再继续编辑。",
|
|
3287
3371
|
paramApplyFailed: "参数未应用,请检查模板校验信息。",
|
|
3288
3372
|
paramRenameHint: "参数标识决定接口取数键。新增、删除或改名后,请同步检查接入方的数据查询;插件不会修改外部接口。",
|
|
@@ -3299,25 +3383,32 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
3299
3383
|
paramYear: "年份",
|
|
3300
3384
|
paramDateRange: "日期范围",
|
|
3301
3385
|
paramSelect: "下拉选择"
|
|
3302
|
-
},
|
|
3386
|
+
}, di = {
|
|
3303
3387
|
batchTitle: "批量生成",
|
|
3304
3388
|
batchDescription: "每组参数独立生成;成功结果由接入方保存,当前页面仅保留回执。",
|
|
3305
3389
|
batchAdd: "添加一组",
|
|
3306
3390
|
batchDuplicate: "复制参数",
|
|
3391
|
+
batchDuplicateCompleted: "复制为新任务",
|
|
3307
3392
|
batchRemove: "删除参数组",
|
|
3308
|
-
batchRun: "
|
|
3393
|
+
batchRun: "生成待处理",
|
|
3394
|
+
batchContinue: "继续未完成",
|
|
3309
3395
|
batchRunning: "正在生成",
|
|
3310
3396
|
batchRetry: "仅重试失败项",
|
|
3311
3397
|
batchCancel: "取消剩余任务",
|
|
3312
3398
|
batchCancelling: "正在取消…",
|
|
3313
3399
|
batchPending: "待生成",
|
|
3314
3400
|
batchCompleted: "已完成",
|
|
3401
|
+
batchCompletedHint: "此组已生成并保留回执;需修改参数或再次生成,请复制为新任务。",
|
|
3315
3402
|
batchFailed: "失败",
|
|
3316
3403
|
batchCancelled: "已取消",
|
|
3317
3404
|
batchCase: "参数组",
|
|
3318
|
-
batchProgress: "
|
|
3405
|
+
batchProgress: "本轮已结束 {completed}/{total} · 失败 {failed} · 取消 {cancelled}",
|
|
3319
3406
|
batchInvalid: "请修正参数错误后再生成;本次未启动任何任务。",
|
|
3320
3407
|
batchEmpty: "添加一组参数开始批量生成",
|
|
3408
|
+
batchNoMatches: "当前状态没有参数组",
|
|
3409
|
+
batchFilter: "按生成状态筛选",
|
|
3410
|
+
batchAll: "全部",
|
|
3411
|
+
batchNextFailure: "下一失败项",
|
|
3321
3412
|
batchNoInstance: "已完成,接入方未返回可打开的实例标识。",
|
|
3322
3413
|
batchOpen: "打开报表实例",
|
|
3323
3414
|
batchLimit: "当前最多支持 {count} 组参数。",
|
|
@@ -3326,7 +3417,18 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
3326
3417
|
batchPrevious: "上一页",
|
|
3327
3418
|
batchNext: "下一页",
|
|
3328
3419
|
batchPage: "第 {page}/{pages} 页 · 共 {total} 组"
|
|
3329
|
-
},
|
|
3420
|
+
}, ui = {
|
|
3421
|
+
publicationChanged: "发布修订与目录不一致,请刷新目录后重新查看",
|
|
3422
|
+
continueDraft: "继续编辑草稿",
|
|
3423
|
+
viewPublished: "查看发布版",
|
|
3424
|
+
draft: "草稿",
|
|
3425
|
+
published: "已发布",
|
|
3426
|
+
draftPending: "草稿待发布",
|
|
3427
|
+
retrySearch: "重试目录查询",
|
|
3428
|
+
retryOpen: "重试打开模板",
|
|
3429
|
+
retryCopy: "重试创建副本",
|
|
3430
|
+
openingTarget: "正在打开 {name}…",
|
|
3431
|
+
creatingTarget: "正在创建 {name} 的副本…",
|
|
3330
3432
|
title: "模板库",
|
|
3331
3433
|
subtitle: "按业务分类查找、打开或复制模板",
|
|
3332
3434
|
search: "搜索名称、编号或标签",
|
|
@@ -3351,20 +3453,20 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
|
|
|
3351
3453
|
missing: "模板不存在或已不可访问",
|
|
3352
3454
|
stale: "目录返回了重复项或无效分页游标",
|
|
3353
3455
|
invalid: "模板目录响应格式无效"
|
|
3354
|
-
},
|
|
3456
|
+
}, ci = ge(() => import("./TemplateReviewPanel-BKofGrV9.js")), mi = ge(() => import("./ExcelBindingWizard-LWX6G1A2.js")), vi = ge(() => import("./RuleEditor-D9wQHrkf.js")), pi = ge(() => import("./ParamEditor-BLaE5q5W.js")), gi = ge(() => import("./ReportBatchPanel-B5ClP9tm.js")), hi = ge(() => import("./ReportTemplateLibrary-BZB-XWjj.js"));
|
|
3355
3457
|
export {
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3458
|
+
ii as EXCEL_BINDING_MESSAGES,
|
|
3459
|
+
mi as ExcelBindingWizard,
|
|
3460
|
+
ri as PARAM_EDITOR_MESSAGES,
|
|
3461
|
+
pi as ParamEditor,
|
|
3462
|
+
di as REPORT_BATCH_MESSAGES,
|
|
3463
|
+
si as RULE_EDITOR_MESSAGES,
|
|
3464
|
+
gi as ReportBatchPanel,
|
|
3465
|
+
oi as ReportTemplateEditor,
|
|
3466
|
+
hi as ReportTemplateLibrary,
|
|
3467
|
+
vi as RuleEditor,
|
|
3468
|
+
Je as TEMPLATE_EDITOR_MESSAGES,
|
|
3469
|
+
ui as TEMPLATE_LIBRARY_MESSAGES,
|
|
3470
|
+
li as TEMPLATE_REVIEW_MESSAGES,
|
|
3471
|
+
ci as TemplateReviewPanel
|
|
3370
3472
|
};
|