@agile-team/mach-report 2.8.2 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/designer.cjs +1 -1
- package/dist/designer.js +427 -426
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/designer.js
CHANGED
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { provideMachReportConfig as
|
|
3
|
-
import { _ as Y, a as
|
|
4
|
-
import { resolveGridLayout as
|
|
5
|
-
function
|
|
6
|
-
const f =
|
|
7
|
-
const d =
|
|
1
|
+
import { ref as j, computed as A, shallowRef as be, onBeforeUnmount as pe, watch as W, defineComponent as ye, getCurrentInstance as _e, nextTick as ne, openBlock as _, createElementBlock as C, unref as e, createElementVNode as n, createVNode as le, toDisplayString as a, normalizeClass as fe, createTextVNode as R, createCommentVNode as N, withKeys as ke, withModifiers as Ce, Fragment as K, renderList as ie, withDirectives as ue, isRef as ce, vModelSelect as we, vModelText as ge, createBlock as he } from "vue";
|
|
2
|
+
import { provideMachReportConfig as Se, createLocalFetcher as xe, ReportPreview as Ee } from "@agile-team/mach-report/vue";
|
|
3
|
+
import { _ as Y, a as Me } from "./_plugin-vue_export-helper-DPbiz14D.js";
|
|
4
|
+
import { resolveGridLayout as ve, parseReportTemplate as I, serializeReportTemplate as U, validateReportTemplateDocument as Te } from "@agile-team/mach-report";
|
|
5
|
+
function Ae(v, M, c, y) {
|
|
6
|
+
const f = j(0), s = j(""), w = j([]), $ = A(() => v.value.template.pages.flatMap((d, r) => d.components.flatMap((i, m) => i.kind === "list" ? [{ component: i, pageIndex: r, componentIndex: m }] : []))), S = A(() => $.value[f.value]?.component), p = A(() => {
|
|
7
|
+
const d = S.value;
|
|
8
8
|
if (!d) return [];
|
|
9
9
|
const r = d.columns.map((i) => i.headerStyle?.align ?? i.headerAlign ?? d.headerStyle?.align ?? d.headerAlign ?? i.style?.align ?? "center");
|
|
10
10
|
if (d.headerGrid && M())
|
|
11
|
-
for (const i of
|
|
11
|
+
for (const i of ve(d.headerGrid, d.widthMm, 100).cells)
|
|
12
12
|
for (let m = i.ci; m < i.ci + (i.cell.colSpan ?? 1); m++) r[m] = i.cell.style?.align ?? "left";
|
|
13
13
|
return r;
|
|
14
14
|
}), g = A(() => {
|
|
15
15
|
const d = s.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
|
|
16
|
-
return (
|
|
16
|
+
return (S.value?.columns ?? []).flatMap((r, i) => {
|
|
17
17
|
const m = `${r.header} ${r.field}`.toLocaleLowerCase();
|
|
18
18
|
return d.every((x) => m.includes(x)) ? [{ column: r, index: i }] : [];
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
-
function
|
|
22
|
-
|
|
21
|
+
function k(d, r) {
|
|
22
|
+
w.value = r ? [.../* @__PURE__ */ new Set([...w.value, d])] : w.value.filter((i) => i !== d);
|
|
23
23
|
}
|
|
24
24
|
function T(d) {
|
|
25
|
-
for (const r of g.value)
|
|
25
|
+
for (const r of g.value) k(r.index, d);
|
|
26
26
|
}
|
|
27
27
|
function h() {
|
|
28
|
-
|
|
28
|
+
w.value = [];
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
if (!
|
|
32
|
-
const m =
|
|
33
|
-
m && (Object.assign(m, { [r]: r === "widthMm" ? Number(i) : i }), r === "header" &&
|
|
30
|
+
function B(d, r, i) {
|
|
31
|
+
if (!c()) return;
|
|
32
|
+
const m = S.value?.columns[d];
|
|
33
|
+
m && (Object.assign(m, { [r]: r === "widthMm" ? Number(i) : i }), r === "header" && O(d, String(i)), r === "headerAlign" && D(d, i), r === "widthMm" && Q(), y());
|
|
34
34
|
}
|
|
35
35
|
function Q() {
|
|
36
|
-
const d =
|
|
36
|
+
const d = $.value[f.value];
|
|
37
37
|
if (!d) return;
|
|
38
|
-
const r = d.component, i =
|
|
38
|
+
const r = d.component, i = v.value.template.pages[d.pageIndex], m = r.columns.map((x) => x.widthMm);
|
|
39
39
|
r.headerGrid && (r.headerGrid.colWidthsMm = m), i.layout === "wide" && m.every((x) => Number.isFinite(x) && x > 0) && (r.widthMm = m.reduce((x, t) => x + t, 0), i.widthMm = Math.max(...i.components.map((x) => x.leftMm + x.widthMm)) + (i.marginRightMm ?? 0));
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const i =
|
|
41
|
+
function O(d, r) {
|
|
42
|
+
const i = S.value;
|
|
43
43
|
if (!i?.headerGrid) return;
|
|
44
|
-
const x =
|
|
44
|
+
const x = ve(i.headerGrid, i.widthMm, 100).cells.filter(({ ci: t, cell: L }) => t <= d && t + (L.colSpan ?? 1) > d).slice(-1)[0];
|
|
45
45
|
x && (Object.assign(x.cell, { text: r, rawText: r, value: r }), i.columns.slice(x.ci, x.ci + (x.cell.colSpan ?? 1)).forEach((t) => {
|
|
46
46
|
t.header = r;
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const i =
|
|
49
|
+
function D(d, r) {
|
|
50
|
+
const i = S.value, m = i?.columns[d];
|
|
51
51
|
if (m?.headerStyle?.align !== void 0 && (m.headerStyle = { ...m.headerStyle, align: r }), !i?.headerGrid) return;
|
|
52
|
-
const t =
|
|
53
|
-
t && (t.cell.style = { ...t.cell.style, align: r }, i.columns.slice(t.ci, t.ci + (t.cell.colSpan ?? 1)).forEach((
|
|
54
|
-
|
|
52
|
+
const t = ve(i.headerGrid, i.widthMm, 100).cells.filter(({ ci: L, cell: V }) => L <= d && L + (V.colSpan ?? 1) > d).slice(-1)[0];
|
|
53
|
+
t && (t.cell.style = { ...t.cell.style, align: r }, i.columns.slice(t.ci, t.ci + (t.cell.colSpan ?? 1)).forEach((L) => {
|
|
54
|
+
L.headerAlign = r, L.headerStyle?.align !== void 0 && (L.headerStyle = { ...L.headerStyle, align: r });
|
|
55
55
|
}));
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
if (!(!
|
|
59
|
-
for (const i of
|
|
60
|
-
const m =
|
|
61
|
-
m && (Object.assign(m, { [d]: r }), d === "headerAlign" &&
|
|
57
|
+
function P(d, r) {
|
|
58
|
+
if (!(!c() || d === "headerAlign" && r === "auto")) {
|
|
59
|
+
for (const i of w.value) {
|
|
60
|
+
const m = S.value?.columns[i];
|
|
61
|
+
m && (Object.assign(m, { [d]: r }), d === "headerAlign" && D(i, r));
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
y();
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
return { selected: f, query: s, selectedColumns:
|
|
66
|
+
return { selected: f, query: s, selectedColumns: w, lists: $, activeList: S, headerAlignments: p, visibleColumns: g, toggleColumn: k, selectVisible: T, clearSelection: h, setColumn: B, alignColumns: P };
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
function
|
|
71
|
-
|
|
68
|
+
function De(v, M = { entries: 100, bytes: 16 * 1024 * 1024 }) {
|
|
69
|
+
const c = j([v]), y = j(0), f = A(() => y.value > 0), s = A(() => y.value + 1 < c.value.length), w = A(() => c.value[y.value]);
|
|
70
|
+
function $(g) {
|
|
71
|
+
c.value = [g], y.value = 0;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
if (
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
let T =
|
|
78
|
-
for (;
|
|
79
|
-
|
|
73
|
+
function S(g) {
|
|
74
|
+
if (c.value[y.value] === g) return;
|
|
75
|
+
const k = c.value.slice(0, y.value + 1);
|
|
76
|
+
k.push(g);
|
|
77
|
+
let T = k.reduce((h, B) => h + B.length * 2, 0);
|
|
78
|
+
for (; k.length > 1 && (k.length > M.entries || T > M.bytes); ) T -= k.shift().length * 2;
|
|
79
|
+
c.value = k, y.value = c.value.length - 1;
|
|
80
80
|
}
|
|
81
81
|
function p(g) {
|
|
82
82
|
if (!(g < 0 ? !f.value : !s.value))
|
|
83
|
-
return
|
|
83
|
+
return y.value += g, c.value[y.value];
|
|
84
84
|
}
|
|
85
|
-
return { canUndo: f, canRedo: s, current:
|
|
85
|
+
return { canUndo: f, canRedo: s, current: w, reset: $, record: S, move: p };
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
const M =
|
|
89
|
-
let
|
|
90
|
-
function s(
|
|
91
|
-
|
|
87
|
+
function je(v) {
|
|
88
|
+
const M = be(null), c = j(!1);
|
|
89
|
+
let y, f = 0;
|
|
90
|
+
function s(S) {
|
|
91
|
+
y?.(S), y = void 0, M.value = null;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
f++, s(!1),
|
|
93
|
+
function w() {
|
|
94
|
+
f++, s(!1), c.value = !1;
|
|
95
95
|
}
|
|
96
|
-
async function
|
|
97
|
-
|
|
98
|
-
const p = f, g =
|
|
99
|
-
|
|
96
|
+
async function $(S) {
|
|
97
|
+
w();
|
|
98
|
+
const p = f, g = v();
|
|
99
|
+
c.value = !0;
|
|
100
100
|
try {
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
103
|
-
M.value =
|
|
101
|
+
const k = await new Promise((T, h) => {
|
|
102
|
+
if (y = T, !g) {
|
|
103
|
+
M.value = S;
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
Promise.resolve().then(() => f === p ? g(
|
|
107
|
-
f === p && s(
|
|
108
|
-
}, (
|
|
109
|
-
f === p && (
|
|
106
|
+
Promise.resolve().then(() => f === p ? g(S) : !1).then((B) => {
|
|
107
|
+
f === p && s(B === !0);
|
|
108
|
+
}, (B) => {
|
|
109
|
+
f === p && (y = void 0, M.value = null, h(B));
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
|
-
return f === p &&
|
|
112
|
+
return f === p && k === !0;
|
|
113
113
|
} finally {
|
|
114
|
-
f === p && (
|
|
114
|
+
f === p && (c.value = !1);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
return
|
|
117
|
+
return pe(w), { confirmation: M, pending: c, decide: s, request: $, cancel: w };
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const Re = {
|
|
120
120
|
title: "报表模板属性编辑器",
|
|
121
121
|
heading: "模板属性",
|
|
122
122
|
unpublished: "未发布",
|
|
@@ -149,7 +149,7 @@ const je = {
|
|
|
149
149
|
applyJson: "校验并应用 JSON",
|
|
150
150
|
note: "字段映射应与数据源契约一致。此编辑器维护模板属性;保存由接入方提供的版本服务处理。",
|
|
151
151
|
invalid: "请先修正模板错误,再预览或保存。"
|
|
152
|
-
},
|
|
152
|
+
}, $e = {
|
|
153
153
|
undo: "撤销",
|
|
154
154
|
redo: "重做",
|
|
155
155
|
columnsSearch: "搜索列名或字段",
|
|
@@ -182,13 +182,13 @@ const je = {
|
|
|
182
182
|
readonly: "只读",
|
|
183
183
|
ready: "可编辑",
|
|
184
184
|
previewTitle: "实时预览"
|
|
185
|
-
},
|
|
186
|
-
function
|
|
187
|
-
const
|
|
185
|
+
}, Be = { ...Re, ...$e };
|
|
186
|
+
function Le(v, M) {
|
|
187
|
+
const c = j(I(v.modelValue)), y = j(U(c.value)), f = j(U(c.value)), s = j(""), w = j(!1), $ = A(() => ({ ...Be, ...v.messages })), S = A(() => ({
|
|
188
188
|
showExport: !1,
|
|
189
189
|
showPrint: !1,
|
|
190
190
|
showPdfWindow: !1,
|
|
191
|
-
...
|
|
191
|
+
...v.preview,
|
|
192
192
|
theme: {
|
|
193
193
|
shellBg: "#f1f5f9",
|
|
194
194
|
shellFg: "#334155",
|
|
@@ -200,183 +200,183 @@ function Be(c, M) {
|
|
|
200
200
|
btnHoverBg: "#eff6ff",
|
|
201
201
|
btnHoverFg: "#1d4ed8",
|
|
202
202
|
btnActiveBg: "#2563eb",
|
|
203
|
-
...
|
|
203
|
+
...v.preview?.theme
|
|
204
204
|
}
|
|
205
205
|
}));
|
|
206
|
-
|
|
207
|
-
return
|
|
206
|
+
Se({ get defaults() {
|
|
207
|
+
return S.value;
|
|
208
208
|
} });
|
|
209
209
|
let p, g = 0;
|
|
210
|
-
const
|
|
210
|
+
const k = A(() => Te(c.value)), T = A(() => {
|
|
211
211
|
try {
|
|
212
|
-
return U(
|
|
212
|
+
return U(c.value) !== y.value;
|
|
213
213
|
} catch {
|
|
214
214
|
return !0;
|
|
215
215
|
}
|
|
216
|
-
}), h =
|
|
216
|
+
}), h = j(f.value), B = A(() => f.value !== h.value), Q = A(() => T.value || f.value !== h.value), O = () => JSON.stringify({ document: c.value, json: f.value, appliedJson: h.value }), D = De(O()), P = je(() => v.beforeDiscard), d = A(() => w.value || P.pending.value), r = () => !v.readonly && !d.value && !B.value, i = Ae(c, () => k.value.ok, r, q), { selected: m, lists: x, activeList: t, headerAlignments: L, setColumn: V } = i;
|
|
217
217
|
W(m, () => i.clearSelection());
|
|
218
|
-
const z = A(() =>
|
|
218
|
+
const z = A(() => k.value.ok ? xe({ draft: { template: c.value.template, datasets: v.datasets ?? {}, params: [] } }) : void 0);
|
|
219
219
|
function E() {
|
|
220
|
-
g++, p?.abort(), p = void 0,
|
|
220
|
+
g++, p?.abort(), p = void 0, w.value = !1;
|
|
221
221
|
}
|
|
222
|
-
let
|
|
223
|
-
async function
|
|
222
|
+
let H = 0;
|
|
223
|
+
async function J(u = "replace", o) {
|
|
224
224
|
if (!Q.value) return !0;
|
|
225
|
-
const
|
|
225
|
+
const l = O();
|
|
226
226
|
try {
|
|
227
|
-
return await
|
|
228
|
-
reason:
|
|
229
|
-
document: JSON.parse(JSON.stringify(
|
|
230
|
-
replacement: o ?
|
|
227
|
+
return await P.request({
|
|
228
|
+
reason: u,
|
|
229
|
+
document: JSON.parse(JSON.stringify(c.value)),
|
|
230
|
+
replacement: o ? I(o) : void 0,
|
|
231
231
|
pendingLocalChanges: !0
|
|
232
|
-
}) &&
|
|
233
|
-
} catch (
|
|
234
|
-
return s.value =
|
|
232
|
+
}) && l === O();
|
|
233
|
+
} catch (b) {
|
|
234
|
+
return s.value = b instanceof Error ? b.message : String(b), !1;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
E(),
|
|
237
|
+
function oe(u) {
|
|
238
|
+
E(), c.value = u, y.value = U(u), f.value = y.value, h.value = f.value, s.value = "", m.value = 0, i.clearSelection(), D.reset(O());
|
|
239
239
|
}
|
|
240
|
-
W(() =>
|
|
240
|
+
W(() => v.modelValue, async (u) => {
|
|
241
241
|
let o;
|
|
242
242
|
try {
|
|
243
|
-
o =
|
|
244
|
-
} catch (
|
|
245
|
-
s.value =
|
|
243
|
+
o = I(u);
|
|
244
|
+
} catch (b) {
|
|
245
|
+
s.value = b instanceof Error ? b.message : String(b);
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
248
|
try {
|
|
249
|
-
if (U(o) === U(
|
|
249
|
+
if (U(o) === U(c.value)) return;
|
|
250
250
|
} catch {
|
|
251
251
|
}
|
|
252
|
-
const
|
|
253
|
-
if (E(), !await
|
|
254
|
-
|
|
252
|
+
const l = ++H;
|
|
253
|
+
if (E(), !await J("replace", o)) {
|
|
254
|
+
l === H && k.value.ok && M("update:modelValue", I(c.value));
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
|
|
258
|
-
}),
|
|
259
|
-
|
|
257
|
+
l === H && oe(o);
|
|
258
|
+
}), pe(() => {
|
|
259
|
+
H++, E();
|
|
260
260
|
});
|
|
261
261
|
function q() {
|
|
262
|
-
|
|
262
|
+
P.cancel(), s.value = "", k.value.ok && (f.value = U(c.value), h.value = f.value, M("update:modelValue", I(c.value))), D.record(O());
|
|
263
263
|
}
|
|
264
|
-
function
|
|
265
|
-
r() && (
|
|
264
|
+
function ae(u) {
|
|
265
|
+
r() && (c.value.name = u, q());
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
r() && (
|
|
267
|
+
function Z(u) {
|
|
268
|
+
r() && (c.value.description = u, q());
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
if (!(
|
|
270
|
+
function X() {
|
|
271
|
+
if (!(v.readonly || d.value))
|
|
272
272
|
try {
|
|
273
|
-
const
|
|
274
|
-
if (
|
|
275
|
-
if (
|
|
276
|
-
|
|
277
|
-
} catch (
|
|
278
|
-
s.value =
|
|
273
|
+
const u = I(f.value);
|
|
274
|
+
if (u.id !== c.value.id) throw new Error("属性编辑不允许更换模板 ID,请另存为新模板");
|
|
275
|
+
if (u.revision !== c.value.revision) throw new Error("修订号由保存服务管理,不能在 JSON 中修改");
|
|
276
|
+
c.value = u, m.value = 0, i.clearSelection(), q();
|
|
277
|
+
} catch (u) {
|
|
278
|
+
s.value = u instanceof Error ? u.message : String(u);
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
async function
|
|
282
|
-
d.value ||
|
|
281
|
+
async function G() {
|
|
282
|
+
d.value || v.readonly || !await J("reset") || (oe(I(y.value)), M("update:modelValue", I(c.value)));
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
if (d.value ||
|
|
286
|
-
|
|
287
|
-
const o =
|
|
284
|
+
function ee(u) {
|
|
285
|
+
if (d.value || v.readonly) return;
|
|
286
|
+
D.record(O());
|
|
287
|
+
const o = D.move(u);
|
|
288
288
|
if (!o) return;
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
|
|
289
|
+
P.cancel();
|
|
290
|
+
const l = JSON.parse(o);
|
|
291
|
+
c.value = l.document, f.value = l.json, h.value = l.appliedJson, s.value = "", m.value = 0, i.clearSelection(), k.value.ok && M("update:modelValue", I(c.value));
|
|
292
292
|
}
|
|
293
|
-
async function
|
|
294
|
-
if (!
|
|
295
|
-
const
|
|
296
|
-
p = new AbortController(),
|
|
297
|
-
const o =
|
|
293
|
+
async function se() {
|
|
294
|
+
if (!v.save || !r() || !k.value.ok) return;
|
|
295
|
+
const u = ++g;
|
|
296
|
+
p = new AbortController(), w.value = !0, s.value = "";
|
|
297
|
+
const o = I(c.value);
|
|
298
298
|
try {
|
|
299
|
-
const
|
|
300
|
-
if (
|
|
301
|
-
if (
|
|
302
|
-
|
|
303
|
-
} catch (
|
|
304
|
-
|
|
299
|
+
const l = I(await v.save(o, { expectedRevision: o.revision, signal: p.signal }));
|
|
300
|
+
if (u !== g) return;
|
|
301
|
+
if (l.id !== o.id) throw new Error("保存服务返回了其他模板的文档");
|
|
302
|
+
c.value = l, y.value = U(l), f.value = y.value, h.value = f.value, D.reset(O()), M("saved", I(l)), M("update:modelValue", I(l));
|
|
303
|
+
} catch (l) {
|
|
304
|
+
u === g && (s.value = l instanceof Error ? l.message : String(l));
|
|
305
305
|
} finally {
|
|
306
|
-
|
|
306
|
+
u === g && (w.value = !1, p = void 0);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
const re = A(() =>
|
|
310
|
-
return { ...i, canUndo: re, canRedo:
|
|
309
|
+
const re = A(() => D.canUndo.value || O() !== D.current.value), de = A(() => D.canRedo.value && O() === D.current.value);
|
|
310
|
+
return { ...i, canUndo: re, canRedo: de, undo: () => ee(-1), redo: () => ee(1), pendingLocalChanges: Q, jsonPending: B, blocked: d, confirmation: P.confirmation, decideDiscard: P.decide, guardChanges: J, draft: c, json: f, selected: m, error: s, saving: w, dirty: T, validation: k, lists: x, activeList: t, headerAlignments: L, previewOptions: S, fetcher: z, messages: $, setName: ae, setDescription: Z, setColumn: V, applyJson: X, reset: G, save: se };
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
const f =
|
|
314
|
-
const p =
|
|
312
|
+
function Ve(v, M, c, y) {
|
|
313
|
+
const f = j("fields"), s = j(v.value[0]?.index ?? -1), w = A(() => {
|
|
314
|
+
const p = c.value?.columns[s.value];
|
|
315
315
|
return p ? { column: p, index: s.value } : void 0;
|
|
316
316
|
});
|
|
317
|
-
W(
|
|
318
|
-
|
|
317
|
+
W(y, () => {
|
|
318
|
+
v.value.some((p) => p.index === s.value) || (s.value = v.value[0]?.index ?? -1);
|
|
319
319
|
}), W(M, () => {
|
|
320
|
-
s.value =
|
|
321
|
-
}), W(
|
|
322
|
-
p?.columns[s.value] || (s.value =
|
|
320
|
+
s.value = v.value[0]?.index ?? -1;
|
|
321
|
+
}), W(c, (p) => {
|
|
322
|
+
p?.columns[s.value] || (s.value = v.value[0]?.index ?? -1);
|
|
323
323
|
});
|
|
324
|
-
function
|
|
325
|
-
|
|
324
|
+
function $(p) {
|
|
325
|
+
v.value.some((g) => g.index === p) && (s.value = p);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
const g =
|
|
327
|
+
function S(p) {
|
|
328
|
+
const g = v.value;
|
|
329
329
|
if (!g.length) return;
|
|
330
|
-
const
|
|
330
|
+
const k = Math.max(
|
|
331
331
|
0,
|
|
332
|
-
g.findIndex((
|
|
332
|
+
g.findIndex((B) => B.index === s.value)
|
|
333
333
|
), h = {
|
|
334
|
-
ArrowDown: Math.min(
|
|
335
|
-
ArrowUp: Math.max(
|
|
334
|
+
ArrowDown: Math.min(k + 1, g.length - 1),
|
|
335
|
+
ArrowUp: Math.max(k - 1, 0),
|
|
336
336
|
Home: 0,
|
|
337
337
|
End: g.length - 1
|
|
338
338
|
}[p];
|
|
339
339
|
if (h !== void 0)
|
|
340
340
|
return s.value = g[h].index, s.value;
|
|
341
341
|
}
|
|
342
|
-
return { section: f, activeIndex: s, activeColumn:
|
|
342
|
+
return { section: f, activeIndex: s, activeColumn: w, activate: $, moveColumn: S };
|
|
343
343
|
}
|
|
344
|
-
const
|
|
344
|
+
const Oe = ["aria-label", "aria-busy"], Ie = { class: "mr-designer-bar" }, Je = { class: "mr-designer-heading" }, Ne = { class: "mr-designer-actions" }, Pe = { class: "mr-designer-history" }, He = ["aria-label", "title", "disabled"], Ge = ["aria-label", "title", "disabled"], Fe = ["disabled"], Ue = ["disabled"], ze = ["aria-label"], qe = { class: "mr-designer-body" }, Ke = { class: "mr-designer-inspector" }, We = ["aria-label"], Qe = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], Xe = ["id", "aria-labelledby"], Ye = {
|
|
345
345
|
key: 0,
|
|
346
346
|
class: "mr-designer-area"
|
|
347
|
-
},
|
|
347
|
+
}, Ze = ["value"], et = {
|
|
348
348
|
key: 1,
|
|
349
349
|
class: "mr-designer-columns"
|
|
350
|
-
},
|
|
350
|
+
}, tt = { class: "mr-designer-directory-heading" }, nt = { class: "mr-designer-search" }, lt = ["aria-label", "placeholder"], ot = ["aria-label", "title"], at = { class: "mr-designer-column-tools" }, st = ["disabled"], it = {
|
|
351
351
|
key: 1,
|
|
352
352
|
role: "status"
|
|
353
|
-
},
|
|
353
|
+
}, rt = { key: 2 }, dt = ["aria-label"], ut = ["aria-label", "checked", "disabled", "onChange"], ct = ["data-column-index", "aria-pressed", "tabindex", "onClick"], vt = { class: "mr-designer-column-number" }, mt = { class: "mr-designer-column-name" }, ft = {
|
|
354
354
|
key: 0,
|
|
355
355
|
role: "status",
|
|
356
356
|
class: "mr-designer-empty"
|
|
357
|
-
},
|
|
357
|
+
}, gt = {
|
|
358
358
|
key: 0,
|
|
359
359
|
class: "mr-designer-batch"
|
|
360
|
-
},
|
|
360
|
+
}, ht = ["aria-label", "disabled"], pt = { value: "" }, bt = { value: "auto" }, yt = { value: "left" }, _t = { value: "center" }, kt = { value: "right" }, Ct = { value: "justify" }, wt = ["aria-label", "disabled"], St = { value: "" }, xt = { value: "left" }, Et = { value: "center" }, Mt = { value: "right" }, Tt = { value: "justify" }, At = ["disabled"], Dt = ["value"], jt = ["value"], Rt = ["value"], $t = ["value"], Bt = { value: "identifier" }, Lt = { value: "dimension" }, Vt = { value: "measure" }, Ot = { value: "date" }, It = { value: "text" }, Jt = ["value"], Nt = { value: "auto" }, Pt = { value: "left" }, Ht = { value: "center" }, Gt = { value: "right" }, Ft = { value: "justify" }, Ut = ["value"], zt = { value: "left" }, qt = { value: "center" }, Kt = { value: "right" }, Wt = { value: "justify" }, Qt = { class: "mr-designer-toggle" }, Xt = ["checked"], Yt = {
|
|
361
361
|
key: 2,
|
|
362
362
|
role: "status",
|
|
363
363
|
class: "mr-designer-empty"
|
|
364
|
-
},
|
|
364
|
+
}, Zt = { class: "mr-designer-stacked" }, en = ["value", "disabled"], tn = { class: "mr-designer-stacked" }, nn = ["value", "disabled"], ln = { class: "mr-designer-identity" }, on = { class: "mr-designer-note" }, an = { class: "mr-designer-note" }, sn = { class: "mr-designer-stacked" }, rn = ["aria-label", "disabled"], dn = ["disabled"], un = {
|
|
365
365
|
key: 3,
|
|
366
366
|
role: "status",
|
|
367
367
|
class: "mr-designer-note mr-designer-pending"
|
|
368
|
-
},
|
|
368
|
+
}, cn = ["aria-label"], vn = {
|
|
369
369
|
key: 0,
|
|
370
370
|
role: "alert",
|
|
371
371
|
class: "mr-designer-error"
|
|
372
|
-
},
|
|
372
|
+
}, mn = {
|
|
373
373
|
key: 1,
|
|
374
374
|
role: "alert",
|
|
375
375
|
class: "mr-designer-error"
|
|
376
|
-
},
|
|
376
|
+
}, fn = {
|
|
377
377
|
key: 3,
|
|
378
378
|
class: "mr-designer-note mr-designer-invalid"
|
|
379
|
-
},
|
|
379
|
+
}, gn = /* @__PURE__ */ ye({
|
|
380
380
|
__name: "ReportTemplateEditor",
|
|
381
381
|
props: {
|
|
382
382
|
modelValue: {},
|
|
@@ -388,53 +388,52 @@ const Ve = ["aria-label", "aria-busy"], Oe = { class: "mr-designer-bar" }, Ie =
|
|
|
388
388
|
save: { type: Function }
|
|
389
389
|
},
|
|
390
390
|
emits: ["update:modelValue", "saved"],
|
|
391
|
-
setup(
|
|
392
|
-
const
|
|
393
|
-
f(
|
|
391
|
+
setup(v, { expose: M, emit: c }) {
|
|
392
|
+
const y = v, f = c, s = Le(y, (u, o) => {
|
|
393
|
+
f(u === "saved" ? "saved" : "update:modelValue", o);
|
|
394
394
|
}), {
|
|
395
|
-
draft:
|
|
396
|
-
json:
|
|
397
|
-
selected:
|
|
395
|
+
draft: w,
|
|
396
|
+
json: $,
|
|
397
|
+
selected: S,
|
|
398
398
|
error: p,
|
|
399
399
|
saving: g,
|
|
400
|
-
pendingLocalChanges:
|
|
400
|
+
pendingLocalChanges: k,
|
|
401
401
|
jsonPending: T,
|
|
402
402
|
blocked: h,
|
|
403
|
-
confirmation:
|
|
403
|
+
confirmation: B,
|
|
404
404
|
canUndo: Q,
|
|
405
|
-
canRedo:
|
|
406
|
-
validation:
|
|
407
|
-
lists:
|
|
405
|
+
canRedo: O,
|
|
406
|
+
validation: D,
|
|
407
|
+
lists: P,
|
|
408
408
|
activeList: d,
|
|
409
409
|
visibleColumns: r,
|
|
410
410
|
query: i,
|
|
411
411
|
selectedColumns: m,
|
|
412
412
|
fetcher: x,
|
|
413
413
|
messages: t
|
|
414
|
-
} = s,
|
|
414
|
+
} = s, L = Ve(
|
|
415
415
|
r,
|
|
416
|
-
|
|
416
|
+
S,
|
|
417
417
|
d,
|
|
418
418
|
i
|
|
419
|
-
), { section:
|
|
420
|
-
() => g.value ? t.value.saving :
|
|
421
|
-
), q =
|
|
422
|
-
W(
|
|
423
|
-
if (
|
|
424
|
-
|
|
425
|
-
const l = oe.value, o = l?.querySelector(
|
|
419
|
+
), { section: V, activeIndex: z, activeColumn: E } = L, H = `mr-designer-${_e()?.uid ?? 0}`, J = ["fields", "template", "advanced"], oe = A(
|
|
420
|
+
() => g.value ? t.value.saving : y.readonly ? t.value.readonly : k.value ? t.value.dirty : t.value.ready
|
|
421
|
+
), q = j(null), ae = j(null), Z = j(null);
|
|
422
|
+
W(V, async (u) => {
|
|
423
|
+
if (await ne(), Z.value && (Z.value.scrollTop = 0), u !== "fields") return;
|
|
424
|
+
const o = ae.value, l = o?.querySelector(
|
|
426
425
|
`button[data-column-index="${z.value}"]`
|
|
427
426
|
);
|
|
428
|
-
if (!
|
|
429
|
-
const
|
|
430
|
-
|
|
427
|
+
if (!o || !l) return;
|
|
428
|
+
const b = o.getBoundingClientRect(), F = l.getBoundingClientRect(), te = b.top + o.clientTop, me = te + o.clientHeight;
|
|
429
|
+
F.top < te ? o.scrollTop += F.top - te : F.bottom > me && (o.scrollTop += F.bottom - me);
|
|
431
430
|
});
|
|
432
431
|
let X = null;
|
|
433
|
-
W(
|
|
434
|
-
|
|
432
|
+
W(B, async (u) => {
|
|
433
|
+
u ? (X = document.activeElement, await ne(), q.value?.focus()) : (await ne(), X?.isConnected && X.focus(), X = null);
|
|
435
434
|
}), M({
|
|
436
435
|
get pendingLocalChanges() {
|
|
437
|
-
return
|
|
436
|
+
return k.value;
|
|
438
437
|
},
|
|
439
438
|
get saving() {
|
|
440
439
|
return g.value;
|
|
@@ -446,75 +445,75 @@ const Ve = ["aria-label", "aria-busy"], Oe = { class: "mr-designer-bar" }, Ie =
|
|
|
446
445
|
reset: s.reset,
|
|
447
446
|
save: s.save
|
|
448
447
|
});
|
|
449
|
-
function
|
|
450
|
-
return
|
|
448
|
+
function G(u) {
|
|
449
|
+
return u.target.value;
|
|
451
450
|
}
|
|
452
|
-
function
|
|
453
|
-
return
|
|
451
|
+
function ee(u) {
|
|
452
|
+
return u.target.checked;
|
|
454
453
|
}
|
|
455
|
-
function
|
|
456
|
-
const
|
|
454
|
+
function se(u, o) {
|
|
455
|
+
const l = u.target;
|
|
457
456
|
s.alignColumns(
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
),
|
|
457
|
+
o,
|
|
458
|
+
l.value
|
|
459
|
+
), l.value = "";
|
|
461
460
|
}
|
|
462
|
-
async function
|
|
463
|
-
const
|
|
464
|
-
if (
|
|
465
|
-
|
|
466
|
-
const
|
|
461
|
+
async function re(u) {
|
|
462
|
+
const o = L.moveColumn(u.key);
|
|
463
|
+
if (o === void 0) return;
|
|
464
|
+
u.preventDefault();
|
|
465
|
+
const l = u.currentTarget.closest(
|
|
467
466
|
".mr-designer-column-list"
|
|
468
467
|
);
|
|
469
|
-
await
|
|
470
|
-
const
|
|
471
|
-
`button[data-column-index="${
|
|
468
|
+
await ne();
|
|
469
|
+
const b = l?.querySelector(
|
|
470
|
+
`button[data-column-index="${o}"]`
|
|
472
471
|
);
|
|
473
|
-
|
|
472
|
+
b?.focus({ preventScroll: !0 }), b?.scrollIntoView({ block: "nearest" });
|
|
474
473
|
}
|
|
475
|
-
async function
|
|
476
|
-
const
|
|
474
|
+
async function de(u) {
|
|
475
|
+
const l = {
|
|
477
476
|
ArrowRight: 1,
|
|
478
477
|
ArrowLeft: -1,
|
|
479
|
-
Home: -
|
|
480
|
-
End:
|
|
481
|
-
}[
|
|
482
|
-
if (
|
|
483
|
-
|
|
484
|
-
const
|
|
485
|
-
|
|
486
|
-
const
|
|
487
|
-
await
|
|
478
|
+
Home: -J.length,
|
|
479
|
+
End: J.length
|
|
480
|
+
}[u.key];
|
|
481
|
+
if (l === void 0) return;
|
|
482
|
+
u.preventDefault();
|
|
483
|
+
const b = J.indexOf(V.value), F = u.key === "Home" ? 0 : u.key === "End" ? J.length - 1 : (b + l + J.length) % J.length;
|
|
484
|
+
V.value = J[F];
|
|
485
|
+
const te = u.currentTarget.parentElement;
|
|
486
|
+
await ne(), te?.querySelector(`#${H}-tab-${V.value}`)?.focus();
|
|
488
487
|
}
|
|
489
|
-
return (
|
|
488
|
+
return (u, o) => (_(), C("section", {
|
|
490
489
|
class: "mr-designer",
|
|
491
490
|
"aria-label": e(t).title,
|
|
492
491
|
"aria-busy": e(g)
|
|
493
492
|
}, [
|
|
494
|
-
n("header",
|
|
495
|
-
n("div",
|
|
496
|
-
|
|
493
|
+
n("header", Ie, [
|
|
494
|
+
n("div", Je, [
|
|
495
|
+
le(Y, {
|
|
497
496
|
name: "columns",
|
|
498
497
|
size: 18
|
|
499
498
|
}),
|
|
500
499
|
n("div", null, [
|
|
501
500
|
n("strong", null, a(e(t).heading), 1),
|
|
502
501
|
n("span", {
|
|
503
|
-
class:
|
|
504
|
-
}, a(
|
|
502
|
+
class: fe({ "mr-designer-dirty": e(k) })
|
|
503
|
+
}, a(oe.value), 3)
|
|
505
504
|
])
|
|
506
505
|
]),
|
|
507
|
-
n("div",
|
|
508
|
-
n("div",
|
|
506
|
+
n("div", Ne, [
|
|
507
|
+
n("div", Pe, [
|
|
509
508
|
n("button", {
|
|
510
509
|
type: "button",
|
|
511
510
|
class: "mr-designer-icon-button",
|
|
512
511
|
"aria-label": e(t).undo,
|
|
513
512
|
title: e(t).undo,
|
|
514
|
-
disabled:
|
|
515
|
-
onClick:
|
|
516
|
-
(...
|
|
517
|
-
}, [...
|
|
513
|
+
disabled: v.readonly || e(h) || !e(Q),
|
|
514
|
+
onClick: o[0] || (o[0] = //@ts-ignore
|
|
515
|
+
(...l) => e(s).undo && e(s).undo(...l))
|
|
516
|
+
}, [...o[25] || (o[25] = [
|
|
518
517
|
n("svg", {
|
|
519
518
|
viewBox: "0 0 24 24",
|
|
520
519
|
fill: "none",
|
|
@@ -522,16 +521,16 @@ const Ve = ["aria-label", "aria-busy"], Oe = { class: "mr-designer-bar" }, Ie =
|
|
|
522
521
|
}, [
|
|
523
522
|
n("path", { d: "M4 10h10a6 6 0 0 1 0 12M4 10l5-5M4 10l5 5" })
|
|
524
523
|
], -1)
|
|
525
|
-
])], 8,
|
|
524
|
+
])], 8, He),
|
|
526
525
|
n("button", {
|
|
527
526
|
type: "button",
|
|
528
527
|
class: "mr-designer-icon-button",
|
|
529
528
|
"aria-label": e(t).redo,
|
|
530
529
|
title: e(t).redo,
|
|
531
|
-
disabled:
|
|
532
|
-
onClick:
|
|
533
|
-
(...
|
|
534
|
-
}, [...
|
|
530
|
+
disabled: v.readonly || e(h) || !e(O),
|
|
531
|
+
onClick: o[1] || (o[1] = //@ts-ignore
|
|
532
|
+
(...l) => e(s).redo && e(s).redo(...l))
|
|
533
|
+
}, [...o[26] || (o[26] = [
|
|
535
534
|
n("svg", {
|
|
536
535
|
viewBox: "0 0 24 24",
|
|
537
536
|
fill: "none",
|
|
@@ -539,37 +538,37 @@ const Ve = ["aria-label", "aria-busy"], Oe = { class: "mr-designer-bar" }, Ie =
|
|
|
539
538
|
}, [
|
|
540
539
|
n("path", { d: "M20 10H10a6 6 0 0 0 0 12m10-12-5-5m5 5-5 5" })
|
|
541
540
|
], -1)
|
|
542
|
-
])], 8,
|
|
541
|
+
])], 8, Ge)
|
|
543
542
|
]),
|
|
544
543
|
n("button", {
|
|
545
544
|
type: "button",
|
|
546
545
|
class: "mr-designer-reset",
|
|
547
|
-
disabled:
|
|
548
|
-
onClick:
|
|
549
|
-
(...
|
|
550
|
-
}, a(e(t).reset), 9,
|
|
551
|
-
|
|
546
|
+
disabled: v.readonly || e(h) || !e(k),
|
|
547
|
+
onClick: o[2] || (o[2] = //@ts-ignore
|
|
548
|
+
(...l) => e(s).reset && e(s).reset(...l))
|
|
549
|
+
}, a(e(t).reset), 9, Fe),
|
|
550
|
+
v.save ? (_(), C("button", {
|
|
552
551
|
key: 0,
|
|
553
552
|
type: "button",
|
|
554
553
|
class: "mr-designer-save",
|
|
555
|
-
disabled:
|
|
556
|
-
onClick:
|
|
557
|
-
(...
|
|
554
|
+
disabled: v.readonly || e(h) || e(T) || !e(D).ok || !e(k),
|
|
555
|
+
onClick: o[3] || (o[3] = //@ts-ignore
|
|
556
|
+
(...l) => e(s).save && e(s).save(...l))
|
|
558
557
|
}, [
|
|
559
|
-
|
|
558
|
+
le(Y, {
|
|
560
559
|
name: "file",
|
|
561
560
|
size: 14
|
|
562
561
|
}),
|
|
563
562
|
R(a(e(g) ? e(t).saving : e(t).save), 1)
|
|
564
|
-
], 8,
|
|
563
|
+
], 8, Ue)) : N("", !0)
|
|
565
564
|
])
|
|
566
565
|
]),
|
|
567
|
-
e(
|
|
566
|
+
e(B) ? (_(), C("div", {
|
|
568
567
|
key: 0,
|
|
569
568
|
role: "alertdialog",
|
|
570
569
|
"aria-label": e(t).discardTitle,
|
|
571
570
|
class: "mr-designer-confirm",
|
|
572
|
-
onKeydown:
|
|
571
|
+
onKeydown: o[6] || (o[6] = ke(Ce((l) => e(s).decideDiscard(!1), ["prevent"]), ["esc"]))
|
|
573
572
|
}, [
|
|
574
573
|
n("div", null, [
|
|
575
574
|
n("strong", null, a(e(t).discardTitle), 1),
|
|
@@ -580,180 +579,182 @@ const Ve = ["aria-label", "aria-busy"], Oe = { class: "mr-designer-bar" }, Ie =
|
|
|
580
579
|
ref_key: "keepButton",
|
|
581
580
|
ref: q,
|
|
582
581
|
type: "button",
|
|
583
|
-
onClick:
|
|
582
|
+
onClick: o[4] || (o[4] = (l) => e(s).decideDiscard(!1))
|
|
584
583
|
}, a(e(t).keepEditing), 513),
|
|
585
584
|
n("button", {
|
|
586
585
|
type: "button",
|
|
587
|
-
onClick:
|
|
586
|
+
onClick: o[5] || (o[5] = (l) => e(s).decideDiscard(!0))
|
|
588
587
|
}, a(e(t).discard), 1)
|
|
589
588
|
])
|
|
590
|
-
], 40,
|
|
591
|
-
n("div",
|
|
592
|
-
n("aside",
|
|
589
|
+
], 40, ze)) : N("", !0),
|
|
590
|
+
n("div", qe, [
|
|
591
|
+
n("aside", Ke, [
|
|
593
592
|
n("nav", {
|
|
594
593
|
class: "mr-designer-tabs",
|
|
595
594
|
role: "tablist",
|
|
596
595
|
"aria-label": e(t).sectionsLabel
|
|
597
596
|
}, [
|
|
598
|
-
(
|
|
599
|
-
id: `${
|
|
600
|
-
key:
|
|
597
|
+
(_(), C(K, null, ie(J, (l) => n("button", {
|
|
598
|
+
id: `${H}-tab-${l}`,
|
|
599
|
+
key: l,
|
|
601
600
|
type: "button",
|
|
602
601
|
role: "tab",
|
|
603
|
-
"aria-selected": e(
|
|
604
|
-
"aria-controls": `${
|
|
605
|
-
tabindex: e(
|
|
606
|
-
onClick: (
|
|
607
|
-
onKeydown:
|
|
608
|
-
}, a(e(t)[`${
|
|
609
|
-
], 8,
|
|
602
|
+
"aria-selected": e(V) === l,
|
|
603
|
+
"aria-controls": `${H}-panel-${l}`,
|
|
604
|
+
tabindex: e(V) === l ? 0 : -1,
|
|
605
|
+
onClick: (b) => V.value = l,
|
|
606
|
+
onKeydown: de
|
|
607
|
+
}, a(e(t)[`${l}Section`]), 41, Qe)), 64))
|
|
608
|
+
], 8, We),
|
|
610
609
|
n("div", {
|
|
611
|
-
|
|
610
|
+
ref_key: "inspectorPanel",
|
|
611
|
+
ref: Z,
|
|
612
|
+
id: `${H}-panel-${e(V)}`,
|
|
612
613
|
class: "mr-designer-panel",
|
|
613
614
|
role: "tabpanel",
|
|
614
|
-
"aria-labelledby": `${
|
|
615
|
+
"aria-labelledby": `${H}-tab-${e(V)}`
|
|
615
616
|
}, [
|
|
616
|
-
e(
|
|
617
|
-
e(
|
|
617
|
+
e(V) === "fields" ? (_(), C(K, { key: 0 }, [
|
|
618
|
+
e(P).length > 1 ? (_(), C("label", Ye, [
|
|
618
619
|
R(a(e(t).area), 1),
|
|
619
|
-
|
|
620
|
-
"onUpdate:modelValue":
|
|
620
|
+
ue(n("select", {
|
|
621
|
+
"onUpdate:modelValue": o[7] || (o[7] = (l) => ce(S) ? S.value = l : null)
|
|
621
622
|
}, [
|
|
622
|
-
(
|
|
623
|
-
key:
|
|
624
|
-
value:
|
|
625
|
-
}, a(
|
|
623
|
+
(_(!0), C(K, null, ie(e(P), (l, b) => (_(), C("option", {
|
|
624
|
+
key: b,
|
|
625
|
+
value: b
|
|
626
|
+
}, a(l.pageIndex + 1) + " " + a(e(t).page) + " · " + a(l.component.title || l.component.dataset), 9, Ze))), 128))
|
|
626
627
|
], 512), [
|
|
627
|
-
[
|
|
628
|
+
[we, e(S)]
|
|
628
629
|
])
|
|
629
|
-
])) :
|
|
630
|
-
e(d) ? (
|
|
631
|
-
n("div",
|
|
630
|
+
])) : N("", !0),
|
|
631
|
+
e(d) ? (_(), C("div", et, [
|
|
632
|
+
n("div", tt, [
|
|
632
633
|
n("strong", null, a(e(t).columnDirectory), 1),
|
|
633
634
|
n("span", null, a(e(d).columns.length) + " " + a(e(t).fieldsCount), 1)
|
|
634
635
|
]),
|
|
635
|
-
n("div",
|
|
636
|
-
|
|
636
|
+
n("div", nt, [
|
|
637
|
+
le(Y, {
|
|
637
638
|
name: "search",
|
|
638
639
|
size: 15
|
|
639
640
|
}),
|
|
640
|
-
|
|
641
|
-
"onUpdate:modelValue":
|
|
641
|
+
ue(n("input", {
|
|
642
|
+
"onUpdate:modelValue": o[8] || (o[8] = (l) => ce(i) ? i.value = l : null),
|
|
642
643
|
type: "search",
|
|
643
644
|
"aria-label": e(t).columnsSearch,
|
|
644
645
|
placeholder: e(t).columnsSearch
|
|
645
|
-
}, null, 8,
|
|
646
|
-
[
|
|
646
|
+
}, null, 8, lt), [
|
|
647
|
+
[ge, e(i)]
|
|
647
648
|
]),
|
|
648
|
-
e(i) ? (
|
|
649
|
+
e(i) ? (_(), C("button", {
|
|
649
650
|
key: 0,
|
|
650
651
|
type: "button",
|
|
651
652
|
class: "mr-designer-icon-button",
|
|
652
653
|
"aria-label": e(t).clearSearch,
|
|
653
654
|
title: e(t).clearSearch,
|
|
654
|
-
onClick:
|
|
655
|
+
onClick: o[9] || (o[9] = (l) => i.value = "")
|
|
655
656
|
}, [
|
|
656
|
-
|
|
657
|
+
le(Y, {
|
|
657
658
|
name: "close",
|
|
658
659
|
size: 14
|
|
659
660
|
})
|
|
660
|
-
], 8,
|
|
661
|
+
], 8, ot)) : N("", !0)
|
|
661
662
|
]),
|
|
662
|
-
n("div",
|
|
663
|
+
n("div", at, [
|
|
663
664
|
n("button", {
|
|
664
665
|
type: "button",
|
|
665
|
-
disabled:
|
|
666
|
-
onClick:
|
|
667
|
-
}, a(e(t).selectVisible), 9,
|
|
668
|
-
e(m).length ? (
|
|
666
|
+
disabled: v.readonly || e(h) || e(T) || !e(r).length,
|
|
667
|
+
onClick: o[10] || (o[10] = (l) => e(s).selectVisible(!0))
|
|
668
|
+
}, a(e(t).selectVisible), 9, st),
|
|
669
|
+
e(m).length ? (_(), C("button", {
|
|
669
670
|
key: 0,
|
|
670
671
|
type: "button",
|
|
671
|
-
onClick:
|
|
672
|
-
(...
|
|
673
|
-
}, a(e(t).clearSelection), 1)) :
|
|
674
|
-
e(m).length ? (
|
|
672
|
+
onClick: o[11] || (o[11] = //@ts-ignore
|
|
673
|
+
(...l) => e(s).clearSelection && e(s).clearSelection(...l))
|
|
674
|
+
}, a(e(t).clearSelection), 1)) : N("", !0),
|
|
675
|
+
e(m).length ? (_(), C("span", it, a(e(t).columnsSelected) + " " + a(e(m).length), 1)) : (_(), C("span", rt, a(e(r).length) + " / " + a(e(d).columns.length), 1))
|
|
675
676
|
]),
|
|
676
677
|
n("div", {
|
|
677
678
|
ref_key: "columnList",
|
|
678
|
-
ref:
|
|
679
|
+
ref: ae,
|
|
679
680
|
class: "mr-designer-column-list",
|
|
680
681
|
"aria-label": e(t).columnDirectory,
|
|
681
682
|
role: "group"
|
|
682
683
|
}, [
|
|
683
|
-
(
|
|
684
|
-
key:
|
|
685
|
-
class:
|
|
684
|
+
(_(!0), C(K, null, ie(e(r), ({ column: l, index: b }) => (_(), C("div", {
|
|
685
|
+
key: b,
|
|
686
|
+
class: fe(["mr-designer-column-row", { "is-active": e(z) === b }])
|
|
686
687
|
}, [
|
|
687
688
|
n("input", {
|
|
688
689
|
type: "checkbox",
|
|
689
|
-
"aria-label": `${e(t).selectColumn} ${
|
|
690
|
-
checked: e(m).includes(
|
|
691
|
-
disabled:
|
|
692
|
-
onChange: (
|
|
693
|
-
}, null, 40,
|
|
690
|
+
"aria-label": `${e(t).selectColumn} ${l.header}`,
|
|
691
|
+
checked: e(m).includes(b),
|
|
692
|
+
disabled: v.readonly || e(h) || e(T),
|
|
693
|
+
onChange: (F) => e(s).toggleColumn(b, ee(F))
|
|
694
|
+
}, null, 40, ut),
|
|
694
695
|
n("button", {
|
|
695
696
|
type: "button",
|
|
696
|
-
"data-column-index":
|
|
697
|
-
"aria-pressed": e(z) ===
|
|
698
|
-
tabindex: e(z) ===
|
|
699
|
-
onClick: (
|
|
700
|
-
onKeydown:
|
|
697
|
+
"data-column-index": b,
|
|
698
|
+
"aria-pressed": e(z) === b,
|
|
699
|
+
tabindex: e(z) === b ? 0 : -1,
|
|
700
|
+
onClick: (F) => e(L).activate(b),
|
|
701
|
+
onKeydown: re
|
|
701
702
|
}, [
|
|
702
|
-
n("span",
|
|
703
|
-
n("span",
|
|
704
|
-
n("strong", null, a(
|
|
705
|
-
n("small", null, a(
|
|
703
|
+
n("span", vt, a(b + 1), 1),
|
|
704
|
+
n("span", mt, [
|
|
705
|
+
n("strong", null, a(l.header), 1),
|
|
706
|
+
n("small", null, a(l.field), 1)
|
|
706
707
|
]),
|
|
707
|
-
e(z) ===
|
|
708
|
+
e(z) === b ? (_(), he(Y, {
|
|
708
709
|
key: 0,
|
|
709
710
|
name: "chevron-right",
|
|
710
711
|
size: 14
|
|
711
|
-
})) :
|
|
712
|
-
], 40,
|
|
712
|
+
})) : N("", !0)
|
|
713
|
+
], 40, ct)
|
|
713
714
|
], 2))), 128)),
|
|
714
|
-
e(r).length ?
|
|
715
|
-
|
|
715
|
+
e(r).length ? N("", !0) : (_(), C("p", ft, [
|
|
716
|
+
le(Y, {
|
|
716
717
|
name: "search",
|
|
717
718
|
size: 20
|
|
718
719
|
}),
|
|
719
720
|
R(a(e(t).noColumns), 1)
|
|
720
721
|
]))
|
|
721
|
-
], 8,
|
|
722
|
-
e(m).length ? (
|
|
722
|
+
], 8, dt),
|
|
723
|
+
e(m).length ? (_(), C("div", gt, [
|
|
723
724
|
n("label", null, [
|
|
724
725
|
R(a(e(t).batchBody), 1),
|
|
725
726
|
n("select", {
|
|
726
727
|
"aria-label": e(t).batchBody,
|
|
727
|
-
disabled:
|
|
728
|
-
onChange:
|
|
728
|
+
disabled: v.readonly || e(h) || e(T),
|
|
729
|
+
onChange: o[12] || (o[12] = (l) => se(l, "align"))
|
|
729
730
|
}, [
|
|
730
|
-
n("option",
|
|
731
|
-
n("option",
|
|
732
|
-
n("option",
|
|
733
|
-
n("option",
|
|
734
|
-
n("option",
|
|
735
|
-
n("option",
|
|
736
|
-
], 40,
|
|
731
|
+
n("option", pt, a(e(t).chooseAlignment), 1),
|
|
732
|
+
n("option", bt, a(e(t).auto), 1),
|
|
733
|
+
n("option", yt, a(e(t).left), 1),
|
|
734
|
+
n("option", _t, a(e(t).center), 1),
|
|
735
|
+
n("option", kt, a(e(t).right), 1),
|
|
736
|
+
n("option", Ct, a(e(t).justify), 1)
|
|
737
|
+
], 40, ht)
|
|
737
738
|
]),
|
|
738
739
|
n("label", null, [
|
|
739
740
|
R(a(e(t).batchHeader), 1),
|
|
740
741
|
n("select", {
|
|
741
742
|
"aria-label": e(t).batchHeader,
|
|
742
|
-
disabled:
|
|
743
|
-
onChange:
|
|
743
|
+
disabled: v.readonly || e(h) || e(T),
|
|
744
|
+
onChange: o[13] || (o[13] = (l) => se(l, "headerAlign"))
|
|
744
745
|
}, [
|
|
745
|
-
n("option",
|
|
746
|
-
n("option",
|
|
747
|
-
n("option",
|
|
748
|
-
n("option",
|
|
749
|
-
n("option",
|
|
750
|
-
], 40,
|
|
746
|
+
n("option", St, a(e(t).chooseAlignment), 1),
|
|
747
|
+
n("option", xt, a(e(t).left), 1),
|
|
748
|
+
n("option", Et, a(e(t).center), 1),
|
|
749
|
+
n("option", Mt, a(e(t).right), 1),
|
|
750
|
+
n("option", Tt, a(e(t).justify), 1)
|
|
751
|
+
], 40, wt)
|
|
751
752
|
])
|
|
752
|
-
])) :
|
|
753
|
-
e(E) ? (
|
|
753
|
+
])) : N("", !0),
|
|
754
|
+
e(E) ? (_(), C("fieldset", {
|
|
754
755
|
key: 1,
|
|
755
756
|
class: "mr-designer-properties",
|
|
756
|
-
disabled:
|
|
757
|
+
disabled: v.readonly || e(h) || e(T)
|
|
757
758
|
}, [
|
|
758
759
|
n("legend", null, [
|
|
759
760
|
R(a(e(t).columnProperties) + " ", 1),
|
|
@@ -763,23 +764,23 @@ const Ve = ["aria-label", "aria-busy"], Oe = { class: "mr-designer-bar" }, Ie =
|
|
|
763
764
|
R(a(e(t).header), 1),
|
|
764
765
|
n("input", {
|
|
765
766
|
value: e(E).column.header,
|
|
766
|
-
onInput:
|
|
767
|
+
onInput: o[14] || (o[14] = (l) => e(s).setColumn(
|
|
767
768
|
e(E).index,
|
|
768
769
|
"header",
|
|
769
|
-
|
|
770
|
+
G(l)
|
|
770
771
|
))
|
|
771
|
-
}, null, 40,
|
|
772
|
+
}, null, 40, Dt)
|
|
772
773
|
]),
|
|
773
774
|
n("label", null, [
|
|
774
775
|
R(a(e(t).field), 1),
|
|
775
776
|
n("input", {
|
|
776
777
|
value: e(E).column.field,
|
|
777
|
-
onChange:
|
|
778
|
+
onChange: o[15] || (o[15] = (l) => e(s).setColumn(
|
|
778
779
|
e(E).index,
|
|
779
780
|
"field",
|
|
780
|
-
|
|
781
|
+
G(l)
|
|
781
782
|
))
|
|
782
|
-
}, null, 40,
|
|
783
|
+
}, null, 40, jt)
|
|
783
784
|
]),
|
|
784
785
|
n("label", null, [
|
|
785
786
|
R(a(e(t).width), 1),
|
|
@@ -788,140 +789,140 @@ const Ve = ["aria-label", "aria-busy"], Oe = { class: "mr-designer-bar" }, Ie =
|
|
|
788
789
|
min: "0.1",
|
|
789
790
|
step: "0.5",
|
|
790
791
|
value: e(E).column.widthMm,
|
|
791
|
-
onChange:
|
|
792
|
+
onChange: o[16] || (o[16] = (l) => e(s).setColumn(
|
|
792
793
|
e(E).index,
|
|
793
794
|
"widthMm",
|
|
794
|
-
|
|
795
|
+
G(l)
|
|
795
796
|
))
|
|
796
|
-
}, null, 40,
|
|
797
|
+
}, null, 40, Rt)
|
|
797
798
|
]),
|
|
798
799
|
n("label", null, [
|
|
799
800
|
R(a(e(t).semantic), 1),
|
|
800
801
|
n("select", {
|
|
801
802
|
value: e(E).column.semanticRole || "text",
|
|
802
|
-
onChange:
|
|
803
|
+
onChange: o[17] || (o[17] = (l) => e(s).setColumn(
|
|
803
804
|
e(E).index,
|
|
804
805
|
"semanticRole",
|
|
805
|
-
|
|
806
|
+
G(l)
|
|
806
807
|
))
|
|
807
808
|
}, [
|
|
808
|
-
n("option",
|
|
809
|
-
n("option",
|
|
810
|
-
n("option",
|
|
811
|
-
n("option",
|
|
812
|
-
n("option",
|
|
813
|
-
], 40,
|
|
809
|
+
n("option", Bt, a(e(t).identifier), 1),
|
|
810
|
+
n("option", Lt, a(e(t).dimension), 1),
|
|
811
|
+
n("option", Vt, a(e(t).measure), 1),
|
|
812
|
+
n("option", Ot, a(e(t).date), 1),
|
|
813
|
+
n("option", It, a(e(t).text), 1)
|
|
814
|
+
], 40, $t)
|
|
814
815
|
]),
|
|
815
816
|
n("label", null, [
|
|
816
817
|
R(a(e(t).bodyAlign), 1),
|
|
817
818
|
n("select", {
|
|
818
819
|
value: e(E).column.align ?? e(E).column.style?.align ?? e(d).align ?? "left",
|
|
819
|
-
onChange:
|
|
820
|
+
onChange: o[18] || (o[18] = (l) => e(s).setColumn(
|
|
820
821
|
e(E).index,
|
|
821
822
|
"align",
|
|
822
|
-
|
|
823
|
+
G(l)
|
|
823
824
|
))
|
|
824
825
|
}, [
|
|
825
|
-
n("option",
|
|
826
|
-
n("option",
|
|
827
|
-
n("option",
|
|
828
|
-
n("option",
|
|
829
|
-
n("option",
|
|
830
|
-
], 40,
|
|
826
|
+
n("option", Nt, a(e(t).auto), 1),
|
|
827
|
+
n("option", Pt, a(e(t).left), 1),
|
|
828
|
+
n("option", Ht, a(e(t).center), 1),
|
|
829
|
+
n("option", Gt, a(e(t).right), 1),
|
|
830
|
+
n("option", Ft, a(e(t).justify), 1)
|
|
831
|
+
], 40, Jt)
|
|
831
832
|
]),
|
|
832
833
|
n("label", null, [
|
|
833
834
|
R(a(e(t).headerAlign), 1),
|
|
834
835
|
n("select", {
|
|
835
836
|
value: e(s).headerAlignments.value[e(E).index],
|
|
836
|
-
onChange:
|
|
837
|
+
onChange: o[19] || (o[19] = (l) => e(s).setColumn(
|
|
837
838
|
e(E).index,
|
|
838
839
|
"headerAlign",
|
|
839
|
-
|
|
840
|
+
G(l)
|
|
840
841
|
))
|
|
841
842
|
}, [
|
|
842
|
-
n("option",
|
|
843
|
-
n("option",
|
|
844
|
-
n("option",
|
|
845
|
-
n("option",
|
|
846
|
-
], 40,
|
|
843
|
+
n("option", zt, a(e(t).left), 1),
|
|
844
|
+
n("option", qt, a(e(t).center), 1),
|
|
845
|
+
n("option", Kt, a(e(t).right), 1),
|
|
846
|
+
n("option", Wt, a(e(t).justify), 1)
|
|
847
|
+
], 40, Ut)
|
|
847
848
|
]),
|
|
848
|
-
n("label",
|
|
849
|
+
n("label", Qt, [
|
|
849
850
|
R(a(e(t).editable), 1),
|
|
850
851
|
n("input", {
|
|
851
852
|
type: "checkbox",
|
|
852
853
|
checked: e(E).column.editable === !0,
|
|
853
|
-
onChange:
|
|
854
|
+
onChange: o[20] || (o[20] = (l) => e(s).setColumn(
|
|
854
855
|
e(E).index,
|
|
855
856
|
"editable",
|
|
856
|
-
|
|
857
|
+
ee(l)
|
|
857
858
|
))
|
|
858
|
-
}, null, 40,
|
|
859
|
+
}, null, 40, Xt)
|
|
859
860
|
])
|
|
860
|
-
], 8,
|
|
861
|
-
])) : (
|
|
862
|
-
], 64)) : e(
|
|
861
|
+
], 8, At)) : N("", !0)
|
|
862
|
+
])) : (_(), C("p", Yt, a(e(t).noColumns), 1))
|
|
863
|
+
], 64)) : e(V) === "template" ? (_(), C(K, { key: 1 }, [
|
|
863
864
|
n("h3", null, a(e(t).templateDetails), 1),
|
|
864
|
-
n("label",
|
|
865
|
+
n("label", Zt, [
|
|
865
866
|
R(a(e(t).name), 1),
|
|
866
867
|
n("input", {
|
|
867
|
-
value: e(
|
|
868
|
-
disabled:
|
|
869
|
-
onInput:
|
|
870
|
-
}, null, 40,
|
|
868
|
+
value: e(w).name,
|
|
869
|
+
disabled: v.readonly || e(h) || e(T),
|
|
870
|
+
onInput: o[21] || (o[21] = (l) => e(s).setName(G(l)))
|
|
871
|
+
}, null, 40, en)
|
|
871
872
|
]),
|
|
872
|
-
n("label",
|
|
873
|
+
n("label", tn, [
|
|
873
874
|
R(a(e(t).description), 1),
|
|
874
875
|
n("textarea", {
|
|
875
876
|
rows: "4",
|
|
876
|
-
value: e(
|
|
877
|
-
disabled:
|
|
878
|
-
onInput:
|
|
879
|
-
}, null, 40,
|
|
877
|
+
value: e(w).description,
|
|
878
|
+
disabled: v.readonly || e(h) || e(T),
|
|
879
|
+
onInput: o[22] || (o[22] = (l) => e(s).setDescription(G(l)))
|
|
880
|
+
}, null, 40, nn)
|
|
880
881
|
]),
|
|
881
|
-
n("dl",
|
|
882
|
+
n("dl", ln, [
|
|
882
883
|
n("dt", null, a(e(t).templateIdentity), 1),
|
|
883
|
-
n("dd", null, a(e(
|
|
884
|
+
n("dd", null, a(e(w).id), 1),
|
|
884
885
|
n("dt", null, a(e(t).templateRevision), 1),
|
|
885
|
-
n("dd", null, a(e(
|
|
886
|
+
n("dd", null, a(e(w).revision || e(t).unpublished), 1)
|
|
886
887
|
]),
|
|
887
|
-
n("p",
|
|
888
|
-
], 64)) : (
|
|
888
|
+
n("p", on, a(e(t).note), 1)
|
|
889
|
+
], 64)) : (_(), C(K, { key: 2 }, [
|
|
889
890
|
n("h3", null, a(e(t).advancedTitle), 1),
|
|
890
|
-
n("p",
|
|
891
|
-
n("label",
|
|
891
|
+
n("p", an, a(e(t).advancedDescription), 1),
|
|
892
|
+
n("label", sn, [
|
|
892
893
|
R(a(e(t).json), 1),
|
|
893
|
-
|
|
894
|
-
"onUpdate:modelValue":
|
|
894
|
+
ue(n("textarea", {
|
|
895
|
+
"onUpdate:modelValue": o[23] || (o[23] = (l) => ce($) ? $.value = l : null),
|
|
895
896
|
class: "mr-designer-json",
|
|
896
897
|
"aria-label": e(t).json,
|
|
897
|
-
disabled:
|
|
898
|
+
disabled: v.readonly || e(h),
|
|
898
899
|
spellcheck: "false"
|
|
899
|
-
}, null, 8,
|
|
900
|
-
[
|
|
900
|
+
}, null, 8, rn), [
|
|
901
|
+
[ge, e($)]
|
|
901
902
|
])
|
|
902
903
|
]),
|
|
903
904
|
n("button", {
|
|
904
905
|
type: "button",
|
|
905
906
|
class: "mr-designer-apply-json",
|
|
906
|
-
disabled:
|
|
907
|
-
onClick:
|
|
908
|
-
(...
|
|
909
|
-
}, a(e(t).applyJson), 9,
|
|
907
|
+
disabled: v.readonly || e(h),
|
|
908
|
+
onClick: o[24] || (o[24] = //@ts-ignore
|
|
909
|
+
(...l) => e(s).applyJson && e(s).applyJson(...l))
|
|
910
|
+
}, a(e(t).applyJson), 9, dn)
|
|
910
911
|
], 64)),
|
|
911
|
-
e(T) ? (
|
|
912
|
-
], 8,
|
|
912
|
+
e(T) ? (_(), C("p", un, a(e(t).jsonPending), 1)) : N("", !0)
|
|
913
|
+
], 8, Xe)
|
|
913
914
|
]),
|
|
914
915
|
n("div", {
|
|
915
916
|
class: "mr-designer-preview",
|
|
916
917
|
"aria-label": e(t).previewTitle
|
|
917
918
|
}, [
|
|
918
|
-
e(p) ? (
|
|
919
|
-
e(
|
|
920
|
-
(
|
|
921
|
-
key:
|
|
922
|
-
}, a(
|
|
919
|
+
e(p) ? (_(), C("div", vn, a(e(p)), 1)) : N("", !0),
|
|
920
|
+
e(D).ok ? N("", !0) : (_(), C("ul", mn, [
|
|
921
|
+
(_(!0), C(K, null, ie(e(D).errors, (l) => (_(), C("li", {
|
|
922
|
+
key: l.path
|
|
923
|
+
}, a(l.path) + ":" + a(l.message), 1))), 128))
|
|
923
924
|
])),
|
|
924
|
-
e(x) && e(
|
|
925
|
+
e(x) && e(D).ok ? (_(), he(e(Ee), {
|
|
925
926
|
key: 2,
|
|
926
927
|
"report-id": "draft",
|
|
927
928
|
fetcher: e(x),
|
|
@@ -929,13 +930,13 @@ const Ve = ["aria-label", "aria-busy"], Oe = { class: "mr-designer-bar" }, Ie =
|
|
|
929
930
|
editable: !1,
|
|
930
931
|
"excel-import": !1,
|
|
931
932
|
height: "100%"
|
|
932
|
-
}, null, 8, ["fetcher"])) : (
|
|
933
|
-
], 8,
|
|
933
|
+
}, null, 8, ["fetcher"])) : (_(), C("p", fn, a(e(t).invalid), 1))
|
|
934
|
+
], 8, cn)
|
|
934
935
|
])
|
|
935
|
-
], 8,
|
|
936
|
+
], 8, Oe));
|
|
936
937
|
}
|
|
937
|
-
}),
|
|
938
|
+
}), _n = /* @__PURE__ */ Me(gn, [["__scopeId", "data-v-c4eab8e7"]]);
|
|
938
939
|
export {
|
|
939
|
-
|
|
940
|
-
|
|
940
|
+
_n as ReportTemplateEditor,
|
|
941
|
+
Be as TEMPLATE_EDITOR_MESSAGES
|
|
941
942
|
};
|