@agile-team/mach-report 2.8.3 → 2.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/{ReportPreview-DRBAUkxj.js → ReportPreview-DTWiCH5a.js} +2 -2
- package/dist/{_plugin-vue_export-helper-DPbiz14D.js → _plugin-vue_export-helper-8SL1F89S.js} +2 -2
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +18 -0
- package/dist/designer.d.ts +18 -0
- package/dist/designer.js +865 -630
- package/dist/{plugin-BurDDMcd.js → plugin-CQmJXNcA.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.js +4 -4
- package/package.json +1 -1
package/dist/designer.js
CHANGED
|
@@ -1,122 +1,266 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { provideMachReportConfig as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { resolveGridLayout as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { defineComponent as Ce, openBlock as p, createElementBlock as y, Fragment as X, renderList as oe, toDisplayString as s, nextTick as Y, ref as D, watch as te, onMounted as Ee, onBeforeUnmount as be, computed as j, shallowRef as Ae, getCurrentInstance as Te, unref as e, createElementVNode as n, createVNode as q, normalizeClass as me, createTextVNode as P, createCommentVNode as H, withKeys as ge, withModifiers as De, withDirectives as fe, isRef as he, vModelSelect as $e, vModelText as _e, createBlock as ke } from "vue";
|
|
2
|
+
import { provideMachReportConfig as je, createLocalFetcher as Ve, ReportPreview as Le } from "@agile-team/mach-report/vue";
|
|
3
|
+
import { _ as Se, a as W } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
4
|
+
import { resolveGridLayout as pe, parseReportTemplate as U, serializeReportTemplate as ee, validateReportTemplateDocument as Re } from "@agile-team/mach-report";
|
|
5
|
+
const Be = ["aria-label"], Pe = ["data-align", "aria-label", "title", "aria-checked", "tabindex", "onClick", "onKeydown"], Oe = { key: 0 }, Ie = {
|
|
6
|
+
key: 1,
|
|
7
|
+
viewBox: "0 0 20 20",
|
|
8
|
+
fill: "none",
|
|
9
|
+
"aria-hidden": "true"
|
|
10
|
+
}, Je = {
|
|
11
|
+
key: 0,
|
|
12
|
+
d: "M3 4h14M3 8h9M3 12h14M3 16h9"
|
|
13
|
+
}, Ne = {
|
|
14
|
+
key: 1,
|
|
15
|
+
d: "M3 4h14M6 8h8M3 12h14M6 16h8"
|
|
16
|
+
}, Ge = {
|
|
17
|
+
key: 2,
|
|
18
|
+
d: "M3 4h14M8 8h9M3 12h14M8 16h9"
|
|
19
|
+
}, He = {
|
|
20
|
+
key: 3,
|
|
21
|
+
d: "M3 4h14M3 8h14M3 12h14M3 16h14"
|
|
22
|
+
}, Ue = /* @__PURE__ */ Ce({
|
|
23
|
+
__name: "AlignmentControl",
|
|
24
|
+
props: {
|
|
25
|
+
modelValue: {},
|
|
26
|
+
label: {},
|
|
27
|
+
labels: {},
|
|
28
|
+
autoLabel: {},
|
|
29
|
+
allowAuto: { type: Boolean }
|
|
30
|
+
},
|
|
31
|
+
emits: ["update:modelValue"],
|
|
32
|
+
setup(r, { emit: w }) {
|
|
33
|
+
const c = r, g = w, u = () => c.allowAuto ? ["auto", "left", "center", "right", "justify"] : ["left", "center", "right", "justify"];
|
|
34
|
+
async function i(b, $) {
|
|
35
|
+
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(b.key)) return;
|
|
36
|
+
b.preventDefault();
|
|
37
|
+
const _ = u(), k = _.indexOf($), C = b.key === "Home" ? 0 : b.key === "End" ? _.length - 1 : (k + (b.key === "ArrowRight" ? 1 : -1) + _.length) % _.length;
|
|
38
|
+
g("update:modelValue", _[C]);
|
|
39
|
+
const A = b.currentTarget.parentElement;
|
|
40
|
+
await Y(), A?.querySelector(`[data-align="${_[C]}"]`)?.focus();
|
|
41
|
+
}
|
|
42
|
+
return (b, $) => (p(), y("div", {
|
|
43
|
+
class: "mr-designer-alignment",
|
|
44
|
+
role: "radiogroup",
|
|
45
|
+
"aria-label": r.label
|
|
46
|
+
}, [
|
|
47
|
+
(p(!0), y(X, null, oe(u(), (m) => (p(), y("button", {
|
|
48
|
+
key: m,
|
|
49
|
+
type: "button",
|
|
50
|
+
role: "radio",
|
|
51
|
+
"data-align": m,
|
|
52
|
+
"aria-label": r.labels[m],
|
|
53
|
+
title: r.labels[m],
|
|
54
|
+
"aria-checked": r.modelValue === m,
|
|
55
|
+
tabindex: r.modelValue === m ? 0 : -1,
|
|
56
|
+
onClick: (_) => g("update:modelValue", m),
|
|
57
|
+
onKeydown: (_) => i(_, m)
|
|
58
|
+
}, [
|
|
59
|
+
m === "auto" ? (p(), y("span", Oe, s(r.autoLabel), 1)) : (p(), y("svg", Ie, [
|
|
60
|
+
m === "left" ? (p(), y("path", Je)) : m === "center" ? (p(), y("path", Ne)) : m === "right" ? (p(), y("path", Ge)) : (p(), y("path", He))
|
|
61
|
+
]))
|
|
62
|
+
], 40, Pe))), 128))
|
|
63
|
+
], 8, Be));
|
|
64
|
+
}
|
|
65
|
+
}), we = /* @__PURE__ */ Se(Ue, [["__scopeId", "data-v-c85770c4"]]);
|
|
66
|
+
function Fe(r, w, c) {
|
|
67
|
+
if (!r.length) return;
|
|
68
|
+
const g = Math.max(0, r.indexOf(w)), i = {
|
|
69
|
+
ArrowDown: Math.min(g + 1, r.length - 1),
|
|
70
|
+
ArrowUp: Math.max(g - 1, 0),
|
|
71
|
+
Home: 0,
|
|
72
|
+
End: r.length - 1
|
|
73
|
+
}[c];
|
|
74
|
+
return i === void 0 ? void 0 : r[i];
|
|
75
|
+
}
|
|
76
|
+
function ze(r, w, c) {
|
|
77
|
+
const g = D(!1), u = D(r.activeIndex.value), i = D(null), b = D(null), $ = D(null), m = D(null);
|
|
78
|
+
function _(f = !1) {
|
|
79
|
+
const o = m.value, d = o?.querySelector(
|
|
80
|
+
`button[data-column-index="${u.value}"]`
|
|
81
|
+
);
|
|
82
|
+
if (!o || !d) return;
|
|
83
|
+
f && d.focus({ preventScroll: !0 });
|
|
84
|
+
const v = o.getBoundingClientRect(), h = d.getBoundingClientRect(), x = v.top + o.clientTop, t = x + o.clientHeight;
|
|
85
|
+
h.top < x ? o.scrollTop += h.top - x : h.bottom > t && (o.scrollTop += h.bottom - t);
|
|
86
|
+
}
|
|
87
|
+
async function k(f = !1) {
|
|
88
|
+
g.value && (g.value = !1, f && (await Y(), i.value?.focus({ preventScroll: !0 })));
|
|
89
|
+
}
|
|
90
|
+
async function C() {
|
|
91
|
+
if (g.value) return k(!0);
|
|
92
|
+
const f = c.value.map((o) => o.index);
|
|
93
|
+
u.value = f.includes(r.activeIndex.value) ? r.activeIndex.value : f[0] ?? -1, g.value = !0, await Y(), $.value?.focus({ preventScroll: !0 }), _();
|
|
94
|
+
}
|
|
95
|
+
function A(f) {
|
|
96
|
+
r.activate(f), k(!0);
|
|
97
|
+
}
|
|
98
|
+
function S(f) {
|
|
99
|
+
g.value && (f.preventDefault(), f.stopPropagation(), k(!0));
|
|
100
|
+
}
|
|
101
|
+
async function G(f) {
|
|
102
|
+
const o = Fe(
|
|
103
|
+
c.value.map((d) => d.index),
|
|
104
|
+
u.value,
|
|
105
|
+
f.key
|
|
106
|
+
);
|
|
107
|
+
o !== void 0 && (u.value = o, f.preventDefault(), await Y(), _(!0));
|
|
108
|
+
}
|
|
109
|
+
async function Z(f) {
|
|
110
|
+
if (!["ArrowDown", "ArrowUp", "Enter"].includes(f.key)) return;
|
|
111
|
+
f.preventDefault(), f.stopPropagation();
|
|
112
|
+
const o = c.value.map((d) => d.index);
|
|
113
|
+
if (o.length) {
|
|
114
|
+
if (f.key === "Enter") {
|
|
115
|
+
o.includes(u.value) && A(u.value);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
f.key === "ArrowUp" && (u.value = o.at(-1)), await Y(), _(!0);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function O(f) {
|
|
122
|
+
const o = f.target;
|
|
123
|
+
!g.value || b.value?.contains(o) || i.value?.contains(o) || k();
|
|
124
|
+
}
|
|
125
|
+
function V(f) {
|
|
126
|
+
const o = f.relatedTarget;
|
|
127
|
+
!o || b.value?.contains(o) || i.value?.contains(o) || k();
|
|
128
|
+
}
|
|
129
|
+
return te(c, (f) => {
|
|
130
|
+
f.some((o) => o.index === u.value) || (u.value = f[0]?.index ?? -1);
|
|
131
|
+
}), te(w, () => {
|
|
132
|
+
k();
|
|
133
|
+
}), Ee(() => document.addEventListener("pointerdown", O)), be(() => document.removeEventListener("pointerdown", O)), {
|
|
134
|
+
open: g,
|
|
135
|
+
cursor: u,
|
|
136
|
+
trigger: i,
|
|
137
|
+
panel: b,
|
|
138
|
+
search: $,
|
|
139
|
+
list: m,
|
|
140
|
+
toggle: C,
|
|
141
|
+
close: k,
|
|
142
|
+
choose: A,
|
|
143
|
+
escape: S,
|
|
144
|
+
navigate: G,
|
|
145
|
+
searchKeydown: Z,
|
|
146
|
+
leave: V
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function Ke(r, w, c, g) {
|
|
150
|
+
const u = D(0), i = D(""), b = D([]), $ = j(() => r.value.template.pages.flatMap((o, d) => o.components.flatMap((v, h) => v.kind === "list" ? [{ component: v, pageIndex: d, componentIndex: h }] : []))), m = j(() => $.value[u.value]?.component), _ = j(() => {
|
|
151
|
+
const o = m.value;
|
|
152
|
+
if (!o) return [];
|
|
153
|
+
const d = o.columns.map((v) => v.headerStyle?.align ?? v.headerAlign ?? o.headerStyle?.align ?? o.headerAlign ?? v.style?.align ?? "center");
|
|
154
|
+
if (o.headerGrid && w())
|
|
155
|
+
for (const v of pe(o.headerGrid, o.widthMm, 100).cells)
|
|
156
|
+
for (let h = v.ci; h < v.ci + (v.cell.colSpan ?? 1); h++) d[h] = v.cell.style?.align ?? "left";
|
|
157
|
+
return d;
|
|
158
|
+
}), k = j(() => {
|
|
159
|
+
const o = i.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
|
|
160
|
+
return (m.value?.columns ?? []).flatMap((d, v) => {
|
|
161
|
+
const h = `${d.header} ${d.field}`.toLocaleLowerCase();
|
|
162
|
+
return o.every((x) => h.includes(x)) ? [{ column: d, index: v }] : [];
|
|
19
163
|
});
|
|
20
164
|
});
|
|
21
|
-
function
|
|
22
|
-
|
|
165
|
+
function C(o, d) {
|
|
166
|
+
b.value = d ? [.../* @__PURE__ */ new Set([...b.value, o])] : b.value.filter((v) => v !== o);
|
|
23
167
|
}
|
|
24
|
-
function
|
|
25
|
-
for (const
|
|
168
|
+
function A(o) {
|
|
169
|
+
for (const d of k.value) C(d.index, o);
|
|
26
170
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
171
|
+
function S() {
|
|
172
|
+
b.value = [];
|
|
29
173
|
}
|
|
30
|
-
function
|
|
174
|
+
function G(o, d, v) {
|
|
31
175
|
if (!c()) return;
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
function O(
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
44
|
-
const x =
|
|
45
|
-
x && (Object.assign(x.cell, { text:
|
|
46
|
-
t.header =
|
|
176
|
+
const h = m.value?.columns[o];
|
|
177
|
+
h && (Object.assign(h, { [d]: d === "widthMm" ? Number(v) : v }), d === "header" && O(o, String(v)), d === "headerAlign" && V(o, v), d === "widthMm" && Z(), g());
|
|
178
|
+
}
|
|
179
|
+
function Z() {
|
|
180
|
+
const o = $.value[u.value];
|
|
181
|
+
if (!o) return;
|
|
182
|
+
const d = o.component, v = r.value.template.pages[o.pageIndex], h = d.columns.map((x) => x.widthMm);
|
|
183
|
+
d.headerGrid && (d.headerGrid.colWidthsMm = h), v.layout === "wide" && h.every((x) => Number.isFinite(x) && x > 0) && (d.widthMm = h.reduce((x, t) => x + t, 0), v.widthMm = Math.max(...v.components.map((x) => x.leftMm + x.widthMm)) + (v.marginRightMm ?? 0));
|
|
184
|
+
}
|
|
185
|
+
function O(o, d) {
|
|
186
|
+
const v = m.value;
|
|
187
|
+
if (!v?.headerGrid) return;
|
|
188
|
+
const x = pe(v.headerGrid, v.widthMm, 100).cells.filter(({ ci: t, cell: I }) => t <= o && t + (I.colSpan ?? 1) > o).slice(-1)[0];
|
|
189
|
+
x && (Object.assign(x.cell, { text: d, rawText: d, value: d }), v.columns.slice(x.ci, x.ci + (x.cell.colSpan ?? 1)).forEach((t) => {
|
|
190
|
+
t.header = d;
|
|
47
191
|
}));
|
|
48
192
|
}
|
|
49
|
-
function
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
const t =
|
|
53
|
-
t && (t.cell.style = { ...t.cell.style, align:
|
|
54
|
-
|
|
193
|
+
function V(o, d) {
|
|
194
|
+
const v = m.value, h = v?.columns[o];
|
|
195
|
+
if (h?.headerStyle?.align !== void 0 && (h.headerStyle = { ...h.headerStyle, align: d }), !v?.headerGrid) return;
|
|
196
|
+
const t = pe(v.headerGrid, v.widthMm, 100).cells.filter(({ ci: I, cell: R }) => I <= o && I + (R.colSpan ?? 1) > o).slice(-1)[0];
|
|
197
|
+
t && (t.cell.style = { ...t.cell.style, align: d }, v.columns.slice(t.ci, t.ci + (t.cell.colSpan ?? 1)).forEach((I) => {
|
|
198
|
+
I.headerAlign = d, I.headerStyle?.align !== void 0 && (I.headerStyle = { ...I.headerStyle, align: d });
|
|
55
199
|
}));
|
|
56
200
|
}
|
|
57
|
-
function
|
|
58
|
-
if (!(!c() ||
|
|
59
|
-
for (const
|
|
60
|
-
const
|
|
61
|
-
|
|
201
|
+
function f(o, d) {
|
|
202
|
+
if (!(!c() || o === "headerAlign" && d === "auto")) {
|
|
203
|
+
for (const v of b.value) {
|
|
204
|
+
const h = m.value?.columns[v];
|
|
205
|
+
h && (Object.assign(h, { [o]: d }), o === "headerAlign" && V(v, d));
|
|
62
206
|
}
|
|
63
|
-
|
|
207
|
+
g();
|
|
64
208
|
}
|
|
65
209
|
}
|
|
66
|
-
return { selected:
|
|
210
|
+
return { selected: u, query: i, selectedColumns: b, lists: $, activeList: m, headerAlignments: _, visibleColumns: k, toggleColumn: C, selectVisible: A, clearSelection: S, setColumn: G, alignColumns: f };
|
|
67
211
|
}
|
|
68
|
-
function
|
|
69
|
-
const c =
|
|
70
|
-
function $(
|
|
71
|
-
c.value = [
|
|
72
|
-
}
|
|
73
|
-
function
|
|
74
|
-
if (c.value[
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
let
|
|
78
|
-
for (;
|
|
79
|
-
c.value =
|
|
80
|
-
}
|
|
81
|
-
function
|
|
82
|
-
if (!(
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
return { canUndo:
|
|
212
|
+
function qe(r, w = { entries: 100, bytes: 16 * 1024 * 1024 }) {
|
|
213
|
+
const c = D([r]), g = D(0), u = j(() => g.value > 0), i = j(() => g.value + 1 < c.value.length), b = j(() => c.value[g.value]);
|
|
214
|
+
function $(k) {
|
|
215
|
+
c.value = [k], g.value = 0;
|
|
216
|
+
}
|
|
217
|
+
function m(k) {
|
|
218
|
+
if (c.value[g.value] === k) return;
|
|
219
|
+
const C = c.value.slice(0, g.value + 1);
|
|
220
|
+
C.push(k);
|
|
221
|
+
let A = C.reduce((S, G) => S + G.length * 2, 0);
|
|
222
|
+
for (; C.length > 1 && (C.length > w.entries || A > w.bytes); ) A -= C.shift().length * 2;
|
|
223
|
+
c.value = C, g.value = c.value.length - 1;
|
|
224
|
+
}
|
|
225
|
+
function _(k) {
|
|
226
|
+
if (!(k < 0 ? !u.value : !i.value))
|
|
227
|
+
return g.value += k, c.value[g.value];
|
|
228
|
+
}
|
|
229
|
+
return { canUndo: u, canRedo: i, current: b, reset: $, record: m, move: _ };
|
|
86
230
|
}
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
let
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
async function $(
|
|
97
|
-
|
|
98
|
-
const
|
|
231
|
+
function We(r) {
|
|
232
|
+
const w = Ae(null), c = D(!1);
|
|
233
|
+
let g, u = 0;
|
|
234
|
+
function i(m) {
|
|
235
|
+
g?.(m), g = void 0, w.value = null;
|
|
236
|
+
}
|
|
237
|
+
function b() {
|
|
238
|
+
u++, i(!1), c.value = !1;
|
|
239
|
+
}
|
|
240
|
+
async function $(m) {
|
|
241
|
+
b();
|
|
242
|
+
const _ = u, k = r();
|
|
99
243
|
c.value = !0;
|
|
100
244
|
try {
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
103
|
-
|
|
245
|
+
const C = await new Promise((A, S) => {
|
|
246
|
+
if (g = A, !k) {
|
|
247
|
+
w.value = m;
|
|
104
248
|
return;
|
|
105
249
|
}
|
|
106
|
-
Promise.resolve().then(() =>
|
|
107
|
-
|
|
108
|
-
}, (
|
|
109
|
-
|
|
250
|
+
Promise.resolve().then(() => u === _ ? k(m) : !1).then((G) => {
|
|
251
|
+
u === _ && i(G === !0);
|
|
252
|
+
}, (G) => {
|
|
253
|
+
u === _ && (g = void 0, w.value = null, S(G));
|
|
110
254
|
});
|
|
111
255
|
});
|
|
112
|
-
return
|
|
256
|
+
return u === _ && C === !0;
|
|
113
257
|
} finally {
|
|
114
|
-
|
|
258
|
+
u === _ && (c.value = !1);
|
|
115
259
|
}
|
|
116
260
|
}
|
|
117
|
-
return
|
|
261
|
+
return be(b), { confirmation: w, pending: c, decide: i, request: $, cancel: b };
|
|
118
262
|
}
|
|
119
|
-
const
|
|
263
|
+
const Qe = {
|
|
120
264
|
title: "报表模板属性编辑器",
|
|
121
265
|
heading: "模板属性",
|
|
122
266
|
unpublished: "未发布",
|
|
@@ -149,7 +293,7 @@ const Re = {
|
|
|
149
293
|
applyJson: "校验并应用 JSON",
|
|
150
294
|
note: "字段映射应与数据源契约一致。此编辑器维护模板属性;保存由接入方提供的版本服务处理。",
|
|
151
295
|
invalid: "请先修正模板错误,再预览或保存。"
|
|
152
|
-
},
|
|
296
|
+
}, Xe = {
|
|
153
297
|
undo: "撤销",
|
|
154
298
|
redo: "重做",
|
|
155
299
|
columnsSearch: "搜索列名或字段",
|
|
@@ -181,14 +325,26 @@ const Re = {
|
|
|
181
325
|
templateRevision: "当前修订",
|
|
182
326
|
readonly: "只读",
|
|
183
327
|
ready: "可编辑",
|
|
184
|
-
previewTitle: "实时预览"
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
328
|
+
previewTitle: "实时预览",
|
|
329
|
+
contentGroup: "内容",
|
|
330
|
+
formatGroup: "格式",
|
|
331
|
+
autoShort: "自动",
|
|
332
|
+
previousColumn: "上一字段",
|
|
333
|
+
nextColumn: "下一字段",
|
|
334
|
+
closeDirectory: "关闭字段目录",
|
|
335
|
+
technicalDetails: "标识与修订",
|
|
336
|
+
fieldPosition: "当前字段",
|
|
337
|
+
previewFieldDirectory: "定位字段"
|
|
338
|
+
}, Ye = {
|
|
339
|
+
...Qe,
|
|
340
|
+
...Xe
|
|
341
|
+
};
|
|
342
|
+
function Ze(r, w) {
|
|
343
|
+
const c = D(U(r.modelValue)), g = D(ee(c.value)), u = D(ee(c.value)), i = D(""), b = D(!1), $ = j(() => ({ ...Ye, ...r.messages })), m = j(() => ({
|
|
188
344
|
showExport: !1,
|
|
189
345
|
showPrint: !1,
|
|
190
346
|
showPdfWindow: !1,
|
|
191
|
-
...
|
|
347
|
+
...r.preview,
|
|
192
348
|
theme: {
|
|
193
349
|
shellBg: "#f1f5f9",
|
|
194
350
|
shellFg: "#334155",
|
|
@@ -200,183 +356,170 @@ function Le(v, M) {
|
|
|
200
356
|
btnHoverBg: "#eff6ff",
|
|
201
357
|
btnHoverFg: "#1d4ed8",
|
|
202
358
|
btnActiveBg: "#2563eb",
|
|
203
|
-
...
|
|
359
|
+
...r.preview?.theme
|
|
204
360
|
}
|
|
205
361
|
}));
|
|
206
|
-
|
|
207
|
-
return
|
|
362
|
+
je({ get defaults() {
|
|
363
|
+
return m.value;
|
|
208
364
|
} });
|
|
209
|
-
let
|
|
210
|
-
const
|
|
365
|
+
let _, k = 0;
|
|
366
|
+
const C = j(() => Re(c.value)), A = j(() => {
|
|
211
367
|
try {
|
|
212
|
-
return
|
|
368
|
+
return ee(c.value) !== g.value;
|
|
213
369
|
} catch {
|
|
214
370
|
return !0;
|
|
215
371
|
}
|
|
216
|
-
}),
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
function
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
let
|
|
223
|
-
async function
|
|
224
|
-
if (!
|
|
225
|
-
const
|
|
372
|
+
}), S = D(u.value), G = j(() => u.value !== S.value), Z = j(() => A.value || u.value !== S.value), O = () => JSON.stringify({ document: c.value, json: u.value, appliedJson: S.value }), V = qe(O()), f = We(() => r.beforeDiscard), o = j(() => b.value || f.pending.value), d = () => !r.readonly && !o.value && !G.value, v = Ke(c, () => C.value.ok, d, ne), { selected: h, lists: x, activeList: t, headerAlignments: I, setColumn: R } = v;
|
|
373
|
+
te(h, () => v.clearSelection());
|
|
374
|
+
const Q = j(() => C.value.ok ? Ve({ draft: { template: c.value.template, datasets: r.datasets ?? {}, params: [] } }) : void 0);
|
|
375
|
+
function T() {
|
|
376
|
+
k++, _?.abort(), _ = void 0, b.value = !1;
|
|
377
|
+
}
|
|
378
|
+
let F = 0;
|
|
379
|
+
async function z(M = "replace", L) {
|
|
380
|
+
if (!Z.value) return !0;
|
|
381
|
+
const E = O();
|
|
226
382
|
try {
|
|
227
|
-
return await
|
|
228
|
-
reason:
|
|
383
|
+
return await f.request({
|
|
384
|
+
reason: M,
|
|
229
385
|
document: JSON.parse(JSON.stringify(c.value)),
|
|
230
|
-
replacement:
|
|
386
|
+
replacement: L ? U(L) : void 0,
|
|
231
387
|
pendingLocalChanges: !0
|
|
232
|
-
}) &&
|
|
233
|
-
} catch (
|
|
234
|
-
return
|
|
388
|
+
}) && E === O();
|
|
389
|
+
} catch (K) {
|
|
390
|
+
return i.value = K instanceof Error ? K.message : String(K), !1;
|
|
235
391
|
}
|
|
236
392
|
}
|
|
237
|
-
function
|
|
238
|
-
|
|
393
|
+
function se(M) {
|
|
394
|
+
T(), c.value = M, g.value = ee(M), u.value = g.value, S.value = u.value, i.value = "", h.value = 0, v.clearSelection(), V.reset(O());
|
|
239
395
|
}
|
|
240
|
-
|
|
241
|
-
let
|
|
396
|
+
te(() => r.modelValue, async (M) => {
|
|
397
|
+
let L;
|
|
242
398
|
try {
|
|
243
|
-
|
|
244
|
-
} catch (
|
|
245
|
-
|
|
399
|
+
L = U(M);
|
|
400
|
+
} catch (K) {
|
|
401
|
+
i.value = K instanceof Error ? K.message : String(K);
|
|
246
402
|
return;
|
|
247
403
|
}
|
|
248
404
|
try {
|
|
249
|
-
if (
|
|
405
|
+
if (ee(L) === ee(c.value)) return;
|
|
250
406
|
} catch {
|
|
251
407
|
}
|
|
252
|
-
const
|
|
253
|
-
if (
|
|
254
|
-
|
|
408
|
+
const E = ++F;
|
|
409
|
+
if (T(), !await z("replace", L)) {
|
|
410
|
+
E === F && C.value.ok && w("update:modelValue", U(c.value));
|
|
255
411
|
return;
|
|
256
412
|
}
|
|
257
|
-
|
|
258
|
-
}),
|
|
259
|
-
|
|
413
|
+
E === F && se(L);
|
|
414
|
+
}), be(() => {
|
|
415
|
+
F++, T();
|
|
260
416
|
});
|
|
261
|
-
function
|
|
262
|
-
|
|
417
|
+
function ne() {
|
|
418
|
+
f.cancel(), i.value = "", C.value.ok && (u.value = ee(c.value), S.value = u.value, w("update:modelValue", U(c.value))), V.record(O());
|
|
263
419
|
}
|
|
264
|
-
function ae(
|
|
265
|
-
|
|
420
|
+
function ae(M) {
|
|
421
|
+
d() && (c.value.name = M, ne());
|
|
266
422
|
}
|
|
267
|
-
function
|
|
268
|
-
|
|
423
|
+
function B(M) {
|
|
424
|
+
d() && (c.value.description = M, ne());
|
|
269
425
|
}
|
|
270
|
-
function
|
|
271
|
-
if (!(
|
|
426
|
+
function ie() {
|
|
427
|
+
if (!(r.readonly || o.value))
|
|
272
428
|
try {
|
|
273
|
-
const
|
|
274
|
-
if (
|
|
275
|
-
if (
|
|
276
|
-
c.value =
|
|
277
|
-
} catch (
|
|
278
|
-
|
|
429
|
+
const M = U(u.value);
|
|
430
|
+
if (M.id !== c.value.id) throw new Error("属性编辑不允许更换模板 ID,请另存为新模板");
|
|
431
|
+
if (M.revision !== c.value.revision) throw new Error("修订号由保存服务管理,不能在 JSON 中修改");
|
|
432
|
+
c.value = M, h.value = 0, v.clearSelection(), ne();
|
|
433
|
+
} catch (M) {
|
|
434
|
+
i.value = M instanceof Error ? M.message : String(M);
|
|
279
435
|
}
|
|
280
436
|
}
|
|
281
|
-
async function
|
|
282
|
-
|
|
437
|
+
async function ue() {
|
|
438
|
+
o.value || r.readonly || !await z("reset") || (se(U(g.value)), w("update:modelValue", U(c.value)));
|
|
283
439
|
}
|
|
284
|
-
function
|
|
285
|
-
if (
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
if (!
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
c.value =
|
|
292
|
-
}
|
|
293
|
-
async function
|
|
294
|
-
if (!
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
const
|
|
440
|
+
function re(M) {
|
|
441
|
+
if (o.value || r.readonly) return;
|
|
442
|
+
V.record(O());
|
|
443
|
+
const L = V.move(M);
|
|
444
|
+
if (!L) return;
|
|
445
|
+
f.cancel();
|
|
446
|
+
const E = JSON.parse(L);
|
|
447
|
+
c.value = E.document, u.value = E.json, S.value = E.appliedJson, i.value = "", h.value = 0, v.clearSelection(), C.value.ok && w("update:modelValue", U(c.value));
|
|
448
|
+
}
|
|
449
|
+
async function de() {
|
|
450
|
+
if (!r.save || !d() || !C.value.ok) return;
|
|
451
|
+
const M = ++k;
|
|
452
|
+
_ = new AbortController(), b.value = !0, i.value = "";
|
|
453
|
+
const L = U(c.value);
|
|
298
454
|
try {
|
|
299
|
-
const
|
|
300
|
-
if (
|
|
301
|
-
if (
|
|
302
|
-
c.value =
|
|
303
|
-
} catch (
|
|
304
|
-
|
|
455
|
+
const E = U(await r.save(L, { expectedRevision: L.revision, signal: _.signal }));
|
|
456
|
+
if (M !== k) return;
|
|
457
|
+
if (E.id !== L.id) throw new Error("保存服务返回了其他模板的文档");
|
|
458
|
+
c.value = E, g.value = ee(E), u.value = g.value, S.value = u.value, V.reset(O()), w("saved", U(E)), w("update:modelValue", U(E));
|
|
459
|
+
} catch (E) {
|
|
460
|
+
M === k && (i.value = E instanceof Error ? E.message : String(E));
|
|
305
461
|
} finally {
|
|
306
|
-
|
|
462
|
+
M === k && (b.value = !1, _ = void 0);
|
|
307
463
|
}
|
|
308
464
|
}
|
|
309
|
-
const
|
|
310
|
-
return { ...
|
|
465
|
+
const ce = j(() => V.canUndo.value || O() !== V.current.value), ve = j(() => V.canRedo.value && O() === V.current.value);
|
|
466
|
+
return { ...v, canUndo: ce, canRedo: ve, undo: () => re(-1), redo: () => re(1), pendingLocalChanges: Z, jsonPending: G, blocked: o, confirmation: f.confirmation, decideDiscard: f.decide, guardChanges: z, draft: c, json: u, selected: h, error: i, saving: b, dirty: A, validation: C, lists: x, activeList: t, headerAlignments: I, previewOptions: m, fetcher: Q, messages: $, setName: ae, setDescription: B, setColumn: R, applyJson: ie, reset: ue, save: de };
|
|
311
467
|
}
|
|
312
|
-
function
|
|
313
|
-
const
|
|
314
|
-
const
|
|
315
|
-
return
|
|
468
|
+
function et(r, w) {
|
|
469
|
+
const c = D("fields"), g = () => w.value?.columns.length ? 0 : -1, u = D(g()), i = j(() => {
|
|
470
|
+
const m = w.value?.columns[u.value];
|
|
471
|
+
return m ? { column: m, index: u.value } : void 0;
|
|
316
472
|
});
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}),
|
|
320
|
-
|
|
321
|
-
}), W(c, (p) => {
|
|
322
|
-
p?.columns[s.value] || (s.value = v.value[0]?.index ?? -1);
|
|
473
|
+
te(r, () => {
|
|
474
|
+
u.value = g();
|
|
475
|
+
}), te(w, (m) => {
|
|
476
|
+
m?.columns[u.value] || (u.value = g());
|
|
323
477
|
});
|
|
324
|
-
function
|
|
325
|
-
|
|
478
|
+
function b(m) {
|
|
479
|
+
w.value?.columns[m] && (u.value = m);
|
|
326
480
|
}
|
|
327
|
-
function
|
|
328
|
-
const
|
|
329
|
-
|
|
330
|
-
const k = Math.max(
|
|
481
|
+
function $(m) {
|
|
482
|
+
const _ = w.value?.columns.length ?? 0;
|
|
483
|
+
_ && (u.value = Math.max(
|
|
331
484
|
0,
|
|
332
|
-
|
|
333
|
-
)
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
Home: 0,
|
|
337
|
-
End: g.length - 1
|
|
338
|
-
}[p];
|
|
339
|
-
if (h !== void 0)
|
|
340
|
-
return s.value = g[h].index, s.value;
|
|
341
|
-
}
|
|
342
|
-
return { section: f, activeIndex: s, activeColumn: w, activate: $, moveColumn: S };
|
|
485
|
+
Math.min(_ - 1, u.value + m)
|
|
486
|
+
));
|
|
487
|
+
}
|
|
488
|
+
return { section: c, activeIndex: u, activeColumn: i, activate: b, stepColumn: $ };
|
|
343
489
|
}
|
|
344
|
-
const
|
|
490
|
+
const tt = ["aria-label", "aria-busy"], nt = { class: "mr-designer-bar" }, lt = { class: "mr-designer-heading" }, at = ["aria-label"], ot = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], st = { class: "mr-designer-actions" }, it = { class: "mr-designer-history" }, rt = ["aria-label", "title", "disabled"], ut = ["aria-label", "title", "disabled"], dt = ["disabled"], ct = ["disabled"], vt = ["aria-label"], mt = { class: "mr-designer-body" }, gt = { class: "mr-designer-inspector" }, ft = ["id", "aria-labelledby"], ht = {
|
|
345
491
|
key: 0,
|
|
346
492
|
class: "mr-designer-area"
|
|
347
|
-
},
|
|
348
|
-
key: 1,
|
|
349
|
-
class: "mr-designer-columns"
|
|
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 = {
|
|
493
|
+
}, pt = ["value"], bt = { class: "mr-designer-current" }, yt = ["aria-expanded", "aria-controls"], _t = { class: "mr-designer-current-name" }, kt = { class: "mr-designer-directory-entry" }, wt = { class: "mr-designer-field-position" }, Ct = ["aria-label"], St = ["aria-label", "title", "disabled"], xt = ["aria-label", "title", "disabled"], Mt = ["disabled", "aria-label"], Et = { class: "mr-designer-property-group" }, At = ["value"], Tt = ["value"], Dt = { class: "mr-designer-property-group" }, $t = { class: "mr-designer-format-pair" }, jt = { class: "mr-designer-stacked" }, Vt = ["value"], Lt = { class: "mr-designer-stacked" }, Rt = ["value"], Bt = { value: "identifier" }, Pt = { value: "dimension" }, Ot = { value: "measure" }, It = { value: "date" }, Jt = { value: "text" }, Nt = { class: "mr-designer-control-row" }, Gt = { class: "mr-designer-control-row" }, Ht = { class: "mr-designer-toggle" }, Ut = ["checked"], Ft = ["id", "aria-label"], zt = { class: "mr-designer-directory-heading" }, Kt = ["aria-label"], qt = { class: "mr-designer-search" }, Wt = ["aria-label", "placeholder"], Qt = ["aria-label", "title"], Xt = { class: "mr-designer-column-tools" }, Yt = ["disabled"], Zt = {
|
|
351
494
|
key: 1,
|
|
352
495
|
role: "status"
|
|
353
|
-
},
|
|
496
|
+
}, en = { key: 2 }, tn = ["aria-label"], nn = ["aria-label", "checked", "disabled", "onChange"], ln = ["data-column-index", "aria-pressed", "tabindex", "onClick"], an = { class: "mr-designer-column-number" }, on = { class: "mr-designer-column-name" }, sn = {
|
|
354
497
|
key: 0,
|
|
355
498
|
role: "status",
|
|
356
499
|
class: "mr-designer-empty"
|
|
357
|
-
},
|
|
500
|
+
}, rn = {
|
|
358
501
|
key: 0,
|
|
359
502
|
class: "mr-designer-batch"
|
|
360
|
-
},
|
|
503
|
+
}, un = ["aria-label", "disabled"], dn = { value: "" }, cn = { value: "auto" }, vn = { value: "left" }, mn = { value: "center" }, gn = { value: "right" }, fn = { value: "justify" }, hn = ["aria-label", "disabled"], pn = { value: "" }, bn = { value: "left" }, yn = { value: "center" }, _n = { value: "right" }, kn = { value: "justify" }, wn = {
|
|
361
504
|
key: 2,
|
|
362
505
|
role: "status",
|
|
363
506
|
class: "mr-designer-empty"
|
|
364
|
-
},
|
|
507
|
+
}, Cn = { class: "mr-designer-stacked" }, Sn = ["value", "disabled"], xn = { class: "mr-designer-stacked" }, Mn = ["value", "disabled"], En = { class: "mr-designer-technical" }, An = { class: "mr-designer-identity" }, Tn = { class: "mr-designer-stacked mr-designer-json-label" }, Dn = ["aria-label", "disabled"], $n = ["disabled"], jn = {
|
|
365
508
|
key: 3,
|
|
366
509
|
role: "status",
|
|
367
510
|
class: "mr-designer-note mr-designer-pending"
|
|
368
|
-
},
|
|
511
|
+
}, Vn = ["aria-label"], Ln = {
|
|
369
512
|
key: 0,
|
|
370
513
|
role: "alert",
|
|
371
514
|
class: "mr-designer-error"
|
|
372
|
-
},
|
|
515
|
+
}, Rn = {
|
|
373
516
|
key: 1,
|
|
374
517
|
role: "alert",
|
|
375
518
|
class: "mr-designer-error"
|
|
376
|
-
},
|
|
519
|
+
}, Bn = {
|
|
377
520
|
key: 3,
|
|
378
521
|
class: "mr-designer-note mr-designer-invalid"
|
|
379
|
-
},
|
|
522
|
+
}, Pn = /* @__PURE__ */ Ce({
|
|
380
523
|
__name: "ReportTemplateEditor",
|
|
381
524
|
props: {
|
|
382
525
|
modelValue: {},
|
|
@@ -388,132 +531,137 @@ const Oe = ["aria-label", "aria-busy"], Ie = { class: "mr-designer-bar" }, Je =
|
|
|
388
531
|
save: { type: Function }
|
|
389
532
|
},
|
|
390
533
|
emits: ["update:modelValue", "saved"],
|
|
391
|
-
setup(
|
|
392
|
-
const
|
|
393
|
-
|
|
534
|
+
setup(r, { expose: w, emit: c }) {
|
|
535
|
+
const g = r, u = c, i = Ze(g, (J, a) => {
|
|
536
|
+
u(J === "saved" ? "saved" : "update:modelValue", a);
|
|
394
537
|
}), {
|
|
395
|
-
draft:
|
|
538
|
+
draft: b,
|
|
396
539
|
json: $,
|
|
397
|
-
selected:
|
|
398
|
-
error:
|
|
399
|
-
saving:
|
|
400
|
-
pendingLocalChanges:
|
|
401
|
-
jsonPending:
|
|
402
|
-
blocked:
|
|
403
|
-
confirmation:
|
|
404
|
-
canUndo:
|
|
540
|
+
selected: m,
|
|
541
|
+
error: _,
|
|
542
|
+
saving: k,
|
|
543
|
+
pendingLocalChanges: C,
|
|
544
|
+
jsonPending: A,
|
|
545
|
+
blocked: S,
|
|
546
|
+
confirmation: G,
|
|
547
|
+
canUndo: Z,
|
|
405
548
|
canRedo: O,
|
|
406
|
-
validation:
|
|
407
|
-
lists:
|
|
408
|
-
activeList:
|
|
409
|
-
visibleColumns:
|
|
410
|
-
query:
|
|
411
|
-
selectedColumns:
|
|
549
|
+
validation: V,
|
|
550
|
+
lists: f,
|
|
551
|
+
activeList: o,
|
|
552
|
+
visibleColumns: d,
|
|
553
|
+
query: v,
|
|
554
|
+
selectedColumns: h,
|
|
412
555
|
fetcher: x,
|
|
413
556
|
messages: t
|
|
414
|
-
} =
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
);
|
|
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);
|
|
557
|
+
} = i, I = et(m, o), { section: R, activeIndex: Q, activeColumn: T } = I, F = `mr-designer-${Te()?.uid ?? 0}`, z = ["fields", "template", "advanced"], se = j(
|
|
558
|
+
() => k.value ? t.value.saving : g.readonly ? t.value.readonly : C.value ? t.value.dirty : t.value.ready
|
|
559
|
+
), ne = D(null), ae = D(null), B = ze(I, R, d), {
|
|
560
|
+
open: ie,
|
|
561
|
+
cursor: ue,
|
|
562
|
+
trigger: re,
|
|
563
|
+
panel: de,
|
|
564
|
+
search: ce,
|
|
565
|
+
list: ve
|
|
566
|
+
} = B;
|
|
567
|
+
te(R, async () => {
|
|
568
|
+
await Y(), ae.value && (ae.value.scrollTop = 0);
|
|
430
569
|
});
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
570
|
+
const M = j(() => ({
|
|
571
|
+
auto: t.value.auto,
|
|
572
|
+
left: t.value.left,
|
|
573
|
+
center: t.value.center,
|
|
574
|
+
right: t.value.right,
|
|
575
|
+
justify: t.value.justify
|
|
576
|
+
}));
|
|
577
|
+
let L = null;
|
|
578
|
+
te(G, async (J) => {
|
|
579
|
+
J ? (L = document.activeElement, await Y(), ne.value?.focus()) : (await Y(), L?.isConnected && L.focus(), L = null);
|
|
580
|
+
}), w({
|
|
435
581
|
get pendingLocalChanges() {
|
|
436
|
-
return
|
|
582
|
+
return C.value;
|
|
437
583
|
},
|
|
438
584
|
get saving() {
|
|
439
|
-
return
|
|
585
|
+
return k.value;
|
|
440
586
|
},
|
|
441
587
|
get blocked() {
|
|
442
|
-
return
|
|
588
|
+
return S.value;
|
|
443
589
|
},
|
|
444
|
-
guardChanges:
|
|
445
|
-
reset:
|
|
446
|
-
save:
|
|
590
|
+
guardChanges: i.guardChanges,
|
|
591
|
+
reset: i.reset,
|
|
592
|
+
save: i.save
|
|
447
593
|
});
|
|
448
|
-
function
|
|
449
|
-
return
|
|
594
|
+
function E(J) {
|
|
595
|
+
return J.target.value;
|
|
450
596
|
}
|
|
451
|
-
function
|
|
452
|
-
return
|
|
597
|
+
function K(J) {
|
|
598
|
+
return J.target.checked;
|
|
453
599
|
}
|
|
454
|
-
function
|
|
455
|
-
const l =
|
|
456
|
-
|
|
457
|
-
|
|
600
|
+
function ye(J, a) {
|
|
601
|
+
const l = J.target;
|
|
602
|
+
i.alignColumns(
|
|
603
|
+
a,
|
|
458
604
|
l.value
|
|
459
605
|
), l.value = "";
|
|
460
606
|
}
|
|
461
|
-
async function
|
|
462
|
-
const o = L.moveColumn(u.key);
|
|
463
|
-
if (o === void 0) return;
|
|
464
|
-
u.preventDefault();
|
|
465
|
-
const l = u.currentTarget.closest(
|
|
466
|
-
".mr-designer-column-list"
|
|
467
|
-
);
|
|
468
|
-
await ne();
|
|
469
|
-
const b = l?.querySelector(
|
|
470
|
-
`button[data-column-index="${o}"]`
|
|
471
|
-
);
|
|
472
|
-
b?.focus({ preventScroll: !0 }), b?.scrollIntoView({ block: "nearest" });
|
|
473
|
-
}
|
|
474
|
-
async function de(u) {
|
|
607
|
+
async function xe(J) {
|
|
475
608
|
const l = {
|
|
476
609
|
ArrowRight: 1,
|
|
477
610
|
ArrowLeft: -1,
|
|
478
|
-
Home: -
|
|
479
|
-
End:
|
|
480
|
-
}[
|
|
611
|
+
Home: -z.length,
|
|
612
|
+
End: z.length
|
|
613
|
+
}[J.key];
|
|
481
614
|
if (l === void 0) return;
|
|
482
|
-
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
await
|
|
615
|
+
J.preventDefault();
|
|
616
|
+
const N = z.indexOf(R.value), le = J.key === "Home" ? 0 : J.key === "End" ? z.length - 1 : (N + l + z.length) % z.length;
|
|
617
|
+
R.value = z[le];
|
|
618
|
+
const Me = J.currentTarget.parentElement;
|
|
619
|
+
await Y(), Me?.querySelector(`#${F}-tab-${R.value}`)?.focus();
|
|
487
620
|
}
|
|
488
|
-
return (
|
|
621
|
+
return (J, a) => (p(), y("section", {
|
|
489
622
|
class: "mr-designer",
|
|
490
623
|
"aria-label": e(t).title,
|
|
491
|
-
"aria-busy": e(
|
|
624
|
+
"aria-busy": e(k)
|
|
492
625
|
}, [
|
|
493
|
-
n("header",
|
|
494
|
-
n("div",
|
|
495
|
-
|
|
626
|
+
n("header", nt, [
|
|
627
|
+
n("div", lt, [
|
|
628
|
+
q(W, {
|
|
496
629
|
name: "columns",
|
|
497
|
-
size:
|
|
630
|
+
size: 15
|
|
498
631
|
}),
|
|
499
|
-
n("
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
}, a(oe.value), 3)
|
|
504
|
-
])
|
|
632
|
+
n("strong", null, s(e(t).heading), 1),
|
|
633
|
+
n("span", {
|
|
634
|
+
class: me({ "mr-designer-dirty": e(C) })
|
|
635
|
+
}, s(se.value), 3)
|
|
505
636
|
]),
|
|
506
|
-
n("
|
|
507
|
-
|
|
637
|
+
n("nav", {
|
|
638
|
+
class: "mr-designer-tabs",
|
|
639
|
+
role: "tablist",
|
|
640
|
+
"aria-label": e(t).sectionsLabel
|
|
641
|
+
}, [
|
|
642
|
+
(p(), y(X, null, oe(z, (l) => n("button", {
|
|
643
|
+
id: `${F}-tab-${l}`,
|
|
644
|
+
key: l,
|
|
645
|
+
type: "button",
|
|
646
|
+
role: "tab",
|
|
647
|
+
"aria-selected": e(R) === l,
|
|
648
|
+
"aria-controls": `${F}-panel-${l}`,
|
|
649
|
+
tabindex: e(R) === l ? 0 : -1,
|
|
650
|
+
onClick: (N) => R.value = l,
|
|
651
|
+
onKeydown: xe
|
|
652
|
+
}, s(e(t)[`${l}Section`]), 41, ot)), 64))
|
|
653
|
+
], 8, at),
|
|
654
|
+
n("div", st, [
|
|
655
|
+
n("div", it, [
|
|
508
656
|
n("button", {
|
|
509
657
|
type: "button",
|
|
510
658
|
class: "mr-designer-icon-button",
|
|
511
659
|
"aria-label": e(t).undo,
|
|
512
660
|
title: e(t).undo,
|
|
513
|
-
disabled:
|
|
514
|
-
onClick:
|
|
515
|
-
(...l) => e(
|
|
516
|
-
}, [...
|
|
661
|
+
disabled: r.readonly || e(S) || !e(Z),
|
|
662
|
+
onClick: a[0] || (a[0] = //@ts-ignore
|
|
663
|
+
(...l) => e(i).undo && e(i).undo(...l))
|
|
664
|
+
}, [...a[34] || (a[34] = [
|
|
517
665
|
n("svg", {
|
|
518
666
|
viewBox: "0 0 24 24",
|
|
519
667
|
fill: "none",
|
|
@@ -521,16 +669,16 @@ const Oe = ["aria-label", "aria-busy"], Ie = { class: "mr-designer-bar" }, Je =
|
|
|
521
669
|
}, [
|
|
522
670
|
n("path", { d: "M4 10h10a6 6 0 0 1 0 12M4 10l5-5M4 10l5 5" })
|
|
523
671
|
], -1)
|
|
524
|
-
])], 8,
|
|
672
|
+
])], 8, rt),
|
|
525
673
|
n("button", {
|
|
526
674
|
type: "button",
|
|
527
675
|
class: "mr-designer-icon-button",
|
|
528
676
|
"aria-label": e(t).redo,
|
|
529
677
|
title: e(t).redo,
|
|
530
|
-
disabled:
|
|
531
|
-
onClick:
|
|
532
|
-
(...l) => e(
|
|
533
|
-
}, [...
|
|
678
|
+
disabled: r.readonly || e(S) || !e(O),
|
|
679
|
+
onClick: a[1] || (a[1] = //@ts-ignore
|
|
680
|
+
(...l) => e(i).redo && e(i).redo(...l))
|
|
681
|
+
}, [...a[35] || (a[35] = [
|
|
534
682
|
n("svg", {
|
|
535
683
|
viewBox: "0 0 24 24",
|
|
536
684
|
fill: "none",
|
|
@@ -538,405 +686,492 @@ const Oe = ["aria-label", "aria-busy"], Ie = { class: "mr-designer-bar" }, Je =
|
|
|
538
686
|
}, [
|
|
539
687
|
n("path", { d: "M20 10H10a6 6 0 0 0 0 12m10-12-5-5m5 5-5 5" })
|
|
540
688
|
], -1)
|
|
541
|
-
])], 8,
|
|
689
|
+
])], 8, ut)
|
|
542
690
|
]),
|
|
543
691
|
n("button", {
|
|
544
692
|
type: "button",
|
|
545
693
|
class: "mr-designer-reset",
|
|
546
|
-
disabled:
|
|
547
|
-
onClick:
|
|
548
|
-
(...l) => e(
|
|
549
|
-
},
|
|
550
|
-
|
|
694
|
+
disabled: r.readonly || e(S) || !e(C),
|
|
695
|
+
onClick: a[2] || (a[2] = //@ts-ignore
|
|
696
|
+
(...l) => e(i).reset && e(i).reset(...l))
|
|
697
|
+
}, s(e(t).reset), 9, dt),
|
|
698
|
+
r.save ? (p(), y("button", {
|
|
551
699
|
key: 0,
|
|
552
700
|
type: "button",
|
|
553
701
|
class: "mr-designer-save",
|
|
554
|
-
disabled:
|
|
555
|
-
onClick:
|
|
556
|
-
(...l) => e(
|
|
702
|
+
disabled: r.readonly || e(S) || e(A) || !e(V).ok || !e(C),
|
|
703
|
+
onClick: a[3] || (a[3] = //@ts-ignore
|
|
704
|
+
(...l) => e(i).save && e(i).save(...l))
|
|
557
705
|
}, [
|
|
558
|
-
|
|
706
|
+
q(W, {
|
|
559
707
|
name: "file",
|
|
560
|
-
size:
|
|
708
|
+
size: 13
|
|
561
709
|
}),
|
|
562
|
-
|
|
563
|
-
], 8,
|
|
710
|
+
P(s(e(k) ? e(t).saving : e(t).save), 1)
|
|
711
|
+
], 8, ct)) : H("", !0)
|
|
564
712
|
])
|
|
565
713
|
]),
|
|
566
|
-
e(
|
|
714
|
+
e(G) ? (p(), y("div", {
|
|
567
715
|
key: 0,
|
|
568
716
|
role: "alertdialog",
|
|
569
717
|
"aria-label": e(t).discardTitle,
|
|
570
718
|
class: "mr-designer-confirm",
|
|
571
|
-
onKeydown:
|
|
719
|
+
onKeydown: a[6] || (a[6] = ge(De((l) => e(i).decideDiscard(!1), ["prevent", "stop"]), ["esc"]))
|
|
572
720
|
}, [
|
|
573
721
|
n("div", null, [
|
|
574
|
-
n("strong", null,
|
|
575
|
-
n("p", null,
|
|
722
|
+
n("strong", null, s(e(t).discardTitle), 1),
|
|
723
|
+
n("p", null, s(e(t).discardDescription), 1)
|
|
576
724
|
]),
|
|
577
725
|
n("div", null, [
|
|
578
726
|
n("button", {
|
|
579
727
|
ref_key: "keepButton",
|
|
580
|
-
ref:
|
|
728
|
+
ref: ne,
|
|
581
729
|
type: "button",
|
|
582
|
-
onClick:
|
|
583
|
-
},
|
|
730
|
+
onClick: a[4] || (a[4] = (l) => e(i).decideDiscard(!1))
|
|
731
|
+
}, s(e(t).keepEditing), 513),
|
|
584
732
|
n("button", {
|
|
585
733
|
type: "button",
|
|
586
|
-
onClick:
|
|
587
|
-
},
|
|
734
|
+
onClick: a[5] || (a[5] = (l) => e(i).decideDiscard(!0))
|
|
735
|
+
}, s(e(t).discard), 1)
|
|
588
736
|
])
|
|
589
|
-
], 40,
|
|
590
|
-
n("div",
|
|
591
|
-
n("aside",
|
|
592
|
-
n("nav", {
|
|
593
|
-
class: "mr-designer-tabs",
|
|
594
|
-
role: "tablist",
|
|
595
|
-
"aria-label": e(t).sectionsLabel
|
|
596
|
-
}, [
|
|
597
|
-
(_(), C(K, null, ie(J, (l) => n("button", {
|
|
598
|
-
id: `${H}-tab-${l}`,
|
|
599
|
-
key: l,
|
|
600
|
-
type: "button",
|
|
601
|
-
role: "tab",
|
|
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),
|
|
737
|
+
], 40, vt)) : H("", !0),
|
|
738
|
+
n("div", mt, [
|
|
739
|
+
n("aside", gt, [
|
|
609
740
|
n("div", {
|
|
610
741
|
ref_key: "inspectorPanel",
|
|
611
|
-
ref:
|
|
612
|
-
id: `${
|
|
613
|
-
class: "mr-designer-panel",
|
|
742
|
+
ref: ae,
|
|
743
|
+
id: `${F}-panel-${e(R)}`,
|
|
744
|
+
class: me(["mr-designer-panel", { "is-advanced": e(R) === "advanced" }]),
|
|
614
745
|
role: "tabpanel",
|
|
615
|
-
"aria-labelledby": `${
|
|
746
|
+
"aria-labelledby": `${F}-tab-${e(R)}`
|
|
616
747
|
}, [
|
|
617
|
-
e(
|
|
618
|
-
e(
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
"onUpdate:modelValue":
|
|
748
|
+
e(R) === "fields" ? (p(), y(X, { key: 0 }, [
|
|
749
|
+
e(f).length > 1 ? (p(), y("label", ht, [
|
|
750
|
+
P(s(e(t).area), 1),
|
|
751
|
+
fe(n("select", {
|
|
752
|
+
"onUpdate:modelValue": a[7] || (a[7] = (l) => he(m) ? m.value = l : null)
|
|
622
753
|
}, [
|
|
623
|
-
(
|
|
624
|
-
key:
|
|
625
|
-
value:
|
|
626
|
-
},
|
|
754
|
+
(p(!0), y(X, null, oe(e(f), (l, N) => (p(), y("option", {
|
|
755
|
+
key: N,
|
|
756
|
+
value: N
|
|
757
|
+
}, s(l.pageIndex + 1) + " " + s(e(t).page) + " · " + s(l.component.title || l.component.dataset), 9, pt))), 128))
|
|
627
758
|
], 512), [
|
|
628
|
-
[
|
|
759
|
+
[$e, e(m)]
|
|
629
760
|
])
|
|
630
|
-
])) :
|
|
631
|
-
e(
|
|
632
|
-
n("div",
|
|
633
|
-
n("strong", null, a(e(t).columnDirectory), 1),
|
|
634
|
-
n("span", null, a(e(d).columns.length) + " " + a(e(t).fieldsCount), 1)
|
|
635
|
-
]),
|
|
636
|
-
n("div", nt, [
|
|
637
|
-
le(Y, {
|
|
638
|
-
name: "search",
|
|
639
|
-
size: 15
|
|
640
|
-
}),
|
|
641
|
-
ue(n("input", {
|
|
642
|
-
"onUpdate:modelValue": o[8] || (o[8] = (l) => ce(i) ? i.value = l : null),
|
|
643
|
-
type: "search",
|
|
644
|
-
"aria-label": e(t).columnsSearch,
|
|
645
|
-
placeholder: e(t).columnsSearch
|
|
646
|
-
}, null, 8, lt), [
|
|
647
|
-
[ge, e(i)]
|
|
648
|
-
]),
|
|
649
|
-
e(i) ? (_(), C("button", {
|
|
650
|
-
key: 0,
|
|
651
|
-
type: "button",
|
|
652
|
-
class: "mr-designer-icon-button",
|
|
653
|
-
"aria-label": e(t).clearSearch,
|
|
654
|
-
title: e(t).clearSearch,
|
|
655
|
-
onClick: o[9] || (o[9] = (l) => i.value = "")
|
|
656
|
-
}, [
|
|
657
|
-
le(Y, {
|
|
658
|
-
name: "close",
|
|
659
|
-
size: 14
|
|
660
|
-
})
|
|
661
|
-
], 8, ot)) : N("", !0)
|
|
662
|
-
]),
|
|
663
|
-
n("div", at, [
|
|
761
|
+
])) : H("", !0),
|
|
762
|
+
e(o) ? (p(), y(X, { key: 1 }, [
|
|
763
|
+
n("div", bt, [
|
|
664
764
|
n("button", {
|
|
765
|
+
ref_key: "directoryTrigger",
|
|
766
|
+
ref: re,
|
|
665
767
|
type: "button",
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
n("div", {
|
|
678
|
-
ref_key: "columnList",
|
|
679
|
-
ref: ae,
|
|
680
|
-
class: "mr-designer-column-list",
|
|
681
|
-
"aria-label": e(t).columnDirectory,
|
|
682
|
-
role: "group"
|
|
683
|
-
}, [
|
|
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 }])
|
|
768
|
+
class: "mr-designer-field-trigger",
|
|
769
|
+
"aria-expanded": e(ie),
|
|
770
|
+
"aria-controls": `${F}-directory`,
|
|
771
|
+
"aria-haspopup": "dialog",
|
|
772
|
+
onClick: a[8] || (a[8] = //@ts-ignore
|
|
773
|
+
(...l) => e(B).toggle && e(B).toggle(...l)),
|
|
774
|
+
onKeydown: a[9] || (a[9] = ge(
|
|
775
|
+
//@ts-ignore
|
|
776
|
+
(...l) => e(B).escape && e(B).escape(...l),
|
|
777
|
+
["esc"]
|
|
778
|
+
))
|
|
687
779
|
}, [
|
|
688
|
-
n("
|
|
689
|
-
|
|
690
|
-
"
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
780
|
+
n("span", _t, [
|
|
781
|
+
n("strong", null, s(e(T)?.column.header || e(t).noColumns), 1),
|
|
782
|
+
n("small", null, s(e(T)?.column.field || "—"), 1)
|
|
783
|
+
]),
|
|
784
|
+
n("span", kt, [
|
|
785
|
+
P(s(e(t).columnDirectory) + " ", 1),
|
|
786
|
+
n("b", null, s(e(o).columns.length), 1),
|
|
787
|
+
q(W, {
|
|
788
|
+
name: "chevron-down",
|
|
789
|
+
size: 13
|
|
790
|
+
})
|
|
791
|
+
])
|
|
792
|
+
], 40, yt),
|
|
793
|
+
n("div", wt, [
|
|
794
|
+
n("span", {
|
|
795
|
+
"aria-label": e(t).fieldPosition
|
|
796
|
+
}, [
|
|
797
|
+
P(s(e(Q) >= 0 ? e(Q) + 1 : 0), 1),
|
|
798
|
+
a[36] || (a[36] = n("i", null, "/", -1)),
|
|
799
|
+
P(s(e(o).columns.length), 1)
|
|
800
|
+
], 8, Ct),
|
|
695
801
|
n("button", {
|
|
696
802
|
type: "button",
|
|
697
|
-
"
|
|
698
|
-
"aria-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
803
|
+
class: "mr-designer-icon-button",
|
|
804
|
+
"aria-label": e(t).previousColumn,
|
|
805
|
+
title: e(t).previousColumn,
|
|
806
|
+
disabled: e(Q) <= 0,
|
|
807
|
+
onClick: a[10] || (a[10] = (l) => e(I).stepColumn(-1))
|
|
702
808
|
}, [
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
n("strong", null, a(l.header), 1),
|
|
706
|
-
n("small", null, a(l.field), 1)
|
|
707
|
-
]),
|
|
708
|
-
e(z) === b ? (_(), he(Y, {
|
|
709
|
-
key: 0,
|
|
710
|
-
name: "chevron-right",
|
|
809
|
+
q(W, {
|
|
810
|
+
name: "chevron-left",
|
|
711
811
|
size: 14
|
|
712
|
-
})
|
|
713
|
-
],
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
]))
|
|
722
|
-
], 8, dt),
|
|
723
|
-
e(m).length ? (_(), C("div", gt, [
|
|
724
|
-
n("label", null, [
|
|
725
|
-
R(a(e(t).batchBody), 1),
|
|
726
|
-
n("select", {
|
|
727
|
-
"aria-label": e(t).batchBody,
|
|
728
|
-
disabled: v.readonly || e(h) || e(T),
|
|
729
|
-
onChange: o[12] || (o[12] = (l) => se(l, "align"))
|
|
730
|
-
}, [
|
|
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)
|
|
738
|
-
]),
|
|
739
|
-
n("label", null, [
|
|
740
|
-
R(a(e(t).batchHeader), 1),
|
|
741
|
-
n("select", {
|
|
742
|
-
"aria-label": e(t).batchHeader,
|
|
743
|
-
disabled: v.readonly || e(h) || e(T),
|
|
744
|
-
onChange: o[13] || (o[13] = (l) => se(l, "headerAlign"))
|
|
812
|
+
})
|
|
813
|
+
], 8, St),
|
|
814
|
+
n("button", {
|
|
815
|
+
type: "button",
|
|
816
|
+
class: "mr-designer-icon-button",
|
|
817
|
+
"aria-label": e(t).nextColumn,
|
|
818
|
+
title: e(t).nextColumn,
|
|
819
|
+
disabled: e(Q) >= e(o).columns.length - 1,
|
|
820
|
+
onClick: a[11] || (a[11] = (l) => e(I).stepColumn(1))
|
|
745
821
|
}, [
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
], 40, wt)
|
|
822
|
+
q(W, {
|
|
823
|
+
name: "chevron-right",
|
|
824
|
+
size: 14
|
|
825
|
+
})
|
|
826
|
+
], 8, xt)
|
|
752
827
|
])
|
|
753
|
-
])
|
|
754
|
-
e(
|
|
755
|
-
key:
|
|
828
|
+
]),
|
|
829
|
+
e(T) ? (p(), y("fieldset", {
|
|
830
|
+
key: 0,
|
|
756
831
|
class: "mr-designer-properties",
|
|
757
|
-
disabled:
|
|
832
|
+
disabled: r.readonly || e(S) || e(A),
|
|
833
|
+
"aria-label": e(t).columnProperties
|
|
758
834
|
}, [
|
|
759
|
-
n("
|
|
760
|
-
|
|
761
|
-
n("
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
835
|
+
n("div", Et, [
|
|
836
|
+
n("h3", null, s(e(t).contentGroup), 1),
|
|
837
|
+
n("label", null, [
|
|
838
|
+
P(s(e(t).header), 1),
|
|
839
|
+
n("input", {
|
|
840
|
+
value: e(T).column.header,
|
|
841
|
+
onInput: a[12] || (a[12] = (l) => e(i).setColumn(
|
|
842
|
+
e(T).index,
|
|
843
|
+
"header",
|
|
844
|
+
E(l)
|
|
845
|
+
))
|
|
846
|
+
}, null, 40, At)
|
|
847
|
+
]),
|
|
848
|
+
n("label", null, [
|
|
849
|
+
P(s(e(t).field), 1),
|
|
850
|
+
n("input", {
|
|
851
|
+
value: e(T).column.field,
|
|
852
|
+
onChange: a[13] || (a[13] = (l) => e(i).setColumn(
|
|
853
|
+
e(T).index,
|
|
854
|
+
"field",
|
|
855
|
+
E(l)
|
|
856
|
+
))
|
|
857
|
+
}, null, 40, Tt)
|
|
858
|
+
])
|
|
773
859
|
]),
|
|
774
|
-
n("
|
|
775
|
-
|
|
776
|
-
n("
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
860
|
+
n("div", Dt, [
|
|
861
|
+
n("h3", null, s(e(t).formatGroup), 1),
|
|
862
|
+
n("div", $t, [
|
|
863
|
+
n("label", jt, [
|
|
864
|
+
P(s(e(t).width), 1),
|
|
865
|
+
n("input", {
|
|
866
|
+
type: "number",
|
|
867
|
+
min: "0.1",
|
|
868
|
+
step: "0.5",
|
|
869
|
+
value: e(T).column.widthMm,
|
|
870
|
+
onChange: a[14] || (a[14] = (l) => e(i).setColumn(
|
|
871
|
+
e(T).index,
|
|
872
|
+
"widthMm",
|
|
873
|
+
E(l)
|
|
874
|
+
))
|
|
875
|
+
}, null, 40, Vt)
|
|
876
|
+
]),
|
|
877
|
+
n("label", Lt, [
|
|
878
|
+
P(s(e(t).semantic), 1),
|
|
879
|
+
n("select", {
|
|
880
|
+
value: e(T).column.semanticRole || "text",
|
|
881
|
+
onChange: a[15] || (a[15] = (l) => e(i).setColumn(
|
|
882
|
+
e(T).index,
|
|
883
|
+
"semanticRole",
|
|
884
|
+
E(l)
|
|
885
|
+
))
|
|
886
|
+
}, [
|
|
887
|
+
n("option", Bt, s(e(t).identifier), 1),
|
|
888
|
+
n("option", Pt, s(e(t).dimension), 1),
|
|
889
|
+
n("option", Ot, s(e(t).measure), 1),
|
|
890
|
+
n("option", It, s(e(t).date), 1),
|
|
891
|
+
n("option", Jt, s(e(t).text), 1)
|
|
892
|
+
], 40, Rt)
|
|
893
|
+
])
|
|
894
|
+
]),
|
|
895
|
+
n("div", Nt, [
|
|
896
|
+
n("span", null, s(e(t).bodyAlign), 1),
|
|
897
|
+
q(we, {
|
|
898
|
+
"model-value": e(T).column.align ?? e(T).column.style?.align ?? e(o).align ?? "left",
|
|
899
|
+
label: e(t).bodyAlign,
|
|
900
|
+
labels: M.value,
|
|
901
|
+
"auto-label": e(t).autoShort,
|
|
902
|
+
"allow-auto": "",
|
|
903
|
+
"onUpdate:modelValue": a[16] || (a[16] = (l) => e(i).setColumn(e(T).index, "align", l))
|
|
904
|
+
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
905
|
+
]),
|
|
906
|
+
n("div", Gt, [
|
|
907
|
+
n("span", null, s(e(t).headerAlign), 1),
|
|
908
|
+
q(we, {
|
|
909
|
+
"model-value": e(i).headerAlignments.value[e(T).index] || "left",
|
|
910
|
+
label: e(t).headerAlign,
|
|
911
|
+
labels: M.value,
|
|
912
|
+
"auto-label": e(t).autoShort,
|
|
913
|
+
"onUpdate:modelValue": a[17] || (a[17] = (l) => e(i).setColumn(
|
|
914
|
+
e(T).index,
|
|
915
|
+
"headerAlign",
|
|
916
|
+
l
|
|
917
|
+
))
|
|
918
|
+
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
919
|
+
])
|
|
784
920
|
]),
|
|
785
|
-
n("label",
|
|
786
|
-
|
|
921
|
+
n("label", Ht, [
|
|
922
|
+
P(s(e(t).editable), 1),
|
|
787
923
|
n("input", {
|
|
788
|
-
type: "
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
G(l)
|
|
796
|
-
))
|
|
797
|
-
}, null, 40, Rt)
|
|
798
|
-
]),
|
|
799
|
-
n("label", null, [
|
|
800
|
-
R(a(e(t).semantic), 1),
|
|
801
|
-
n("select", {
|
|
802
|
-
value: e(E).column.semanticRole || "text",
|
|
803
|
-
onChange: o[17] || (o[17] = (l) => e(s).setColumn(
|
|
804
|
-
e(E).index,
|
|
805
|
-
"semanticRole",
|
|
806
|
-
G(l)
|
|
924
|
+
type: "checkbox",
|
|
925
|
+
role: "switch",
|
|
926
|
+
checked: e(T).column.editable === !0,
|
|
927
|
+
onChange: a[18] || (a[18] = (l) => e(i).setColumn(
|
|
928
|
+
e(T).index,
|
|
929
|
+
"editable",
|
|
930
|
+
K(l)
|
|
807
931
|
))
|
|
932
|
+
}, null, 40, Ut)
|
|
933
|
+
])
|
|
934
|
+
], 8, Mt)) : H("", !0),
|
|
935
|
+
e(ie) ? (p(), y("div", {
|
|
936
|
+
key: 1,
|
|
937
|
+
id: `${F}-directory`,
|
|
938
|
+
ref_key: "directoryPanel",
|
|
939
|
+
ref: de,
|
|
940
|
+
role: "dialog",
|
|
941
|
+
"aria-label": e(t).columnDirectory,
|
|
942
|
+
class: "mr-designer-directory",
|
|
943
|
+
onKeydown: a[28] || (a[28] = ge(
|
|
944
|
+
//@ts-ignore
|
|
945
|
+
(...l) => e(B).escape && e(B).escape(...l),
|
|
946
|
+
["esc"]
|
|
947
|
+
)),
|
|
948
|
+
onFocusout: a[29] || (a[29] = //@ts-ignore
|
|
949
|
+
(...l) => e(B).leave && e(B).leave(...l))
|
|
950
|
+
}, [
|
|
951
|
+
n("div", zt, [
|
|
952
|
+
n("strong", null, [
|
|
953
|
+
P(s(e(t).columnDirectory) + " ", 1),
|
|
954
|
+
n("span", null, s(e(o).columns.length), 1)
|
|
955
|
+
]),
|
|
956
|
+
n("button", {
|
|
957
|
+
type: "button",
|
|
958
|
+
class: "mr-designer-icon-button",
|
|
959
|
+
"aria-label": e(t).closeDirectory,
|
|
960
|
+
onClick: a[19] || (a[19] = (l) => e(B).close(!0))
|
|
808
961
|
}, [
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
], 40, $t)
|
|
962
|
+
q(W, {
|
|
963
|
+
name: "close",
|
|
964
|
+
size: 15
|
|
965
|
+
})
|
|
966
|
+
], 8, Kt)
|
|
815
967
|
]),
|
|
816
|
-
n("
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
))
|
|
968
|
+
n("div", qt, [
|
|
969
|
+
q(W, {
|
|
970
|
+
name: "search",
|
|
971
|
+
size: 14
|
|
972
|
+
}),
|
|
973
|
+
fe(n("input", {
|
|
974
|
+
ref_key: "directorySearch",
|
|
975
|
+
ref: ce,
|
|
976
|
+
"onUpdate:modelValue": a[20] || (a[20] = (l) => he(v) ? v.value = l : null),
|
|
977
|
+
type: "search",
|
|
978
|
+
"aria-label": e(t).columnsSearch,
|
|
979
|
+
placeholder: e(t).columnsSearch,
|
|
980
|
+
onKeydown: a[21] || (a[21] = //@ts-ignore
|
|
981
|
+
(...l) => e(B).searchKeydown && e(B).searchKeydown(...l))
|
|
982
|
+
}, null, 40, Wt), [
|
|
983
|
+
[_e, e(v)]
|
|
984
|
+
]),
|
|
985
|
+
e(v) ? (p(), y("button", {
|
|
986
|
+
key: 0,
|
|
987
|
+
type: "button",
|
|
988
|
+
class: "mr-designer-icon-button",
|
|
989
|
+
"aria-label": e(t).clearSearch,
|
|
990
|
+
title: e(t).clearSearch,
|
|
991
|
+
onClick: a[22] || (a[22] = (l) => v.value = "")
|
|
825
992
|
}, [
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
], 40, Jt)
|
|
993
|
+
q(W, {
|
|
994
|
+
name: "close",
|
|
995
|
+
size: 13
|
|
996
|
+
})
|
|
997
|
+
], 8, Qt)) : H("", !0)
|
|
832
998
|
]),
|
|
833
|
-
n("
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
n("option", Wt, a(e(t).justify), 1)
|
|
847
|
-
], 40, Ut)
|
|
999
|
+
n("div", Xt, [
|
|
1000
|
+
n("button", {
|
|
1001
|
+
type: "button",
|
|
1002
|
+
disabled: r.readonly || e(S) || e(A) || !e(d).length,
|
|
1003
|
+
onClick: a[23] || (a[23] = (l) => e(i).selectVisible(!0))
|
|
1004
|
+
}, s(e(t).selectVisible), 9, Yt),
|
|
1005
|
+
e(h).length ? (p(), y("button", {
|
|
1006
|
+
key: 0,
|
|
1007
|
+
type: "button",
|
|
1008
|
+
onClick: a[24] || (a[24] = //@ts-ignore
|
|
1009
|
+
(...l) => e(i).clearSelection && e(i).clearSelection(...l))
|
|
1010
|
+
}, s(e(t).clearSelection), 1)) : H("", !0),
|
|
1011
|
+
e(h).length ? (p(), y("span", Zt, s(e(t).columnsSelected) + " " + s(e(h).length), 1)) : (p(), y("span", en, s(e(d).length) + " / " + s(e(o).columns.length), 1))
|
|
848
1012
|
]),
|
|
849
|
-
n("
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
))
|
|
859
|
-
},
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
1013
|
+
n("div", {
|
|
1014
|
+
ref_key: "columnList",
|
|
1015
|
+
ref: ve,
|
|
1016
|
+
class: "mr-designer-column-list",
|
|
1017
|
+
"aria-label": e(t).columnDirectory,
|
|
1018
|
+
role: "group"
|
|
1019
|
+
}, [
|
|
1020
|
+
(p(!0), y(X, null, oe(e(d), ({ column: l, index: N }) => (p(), y("div", {
|
|
1021
|
+
key: N,
|
|
1022
|
+
class: me(["mr-designer-column-row", { "is-active": e(Q) === N }])
|
|
1023
|
+
}, [
|
|
1024
|
+
n("input", {
|
|
1025
|
+
type: "checkbox",
|
|
1026
|
+
"aria-label": `${e(t).selectColumn} ${l.header}`,
|
|
1027
|
+
checked: e(h).includes(N),
|
|
1028
|
+
disabled: r.readonly || e(S) || e(A),
|
|
1029
|
+
onChange: (le) => e(i).toggleColumn(N, K(le))
|
|
1030
|
+
}, null, 40, nn),
|
|
1031
|
+
n("button", {
|
|
1032
|
+
type: "button",
|
|
1033
|
+
"data-column-index": N,
|
|
1034
|
+
"aria-pressed": e(Q) === N,
|
|
1035
|
+
tabindex: e(ue) === N ? 0 : -1,
|
|
1036
|
+
onClick: (le) => e(B).choose(N),
|
|
1037
|
+
onKeydown: a[25] || (a[25] = //@ts-ignore
|
|
1038
|
+
(...le) => e(B).navigate && e(B).navigate(...le))
|
|
1039
|
+
}, [
|
|
1040
|
+
n("span", an, s(N + 1), 1),
|
|
1041
|
+
n("span", on, [
|
|
1042
|
+
n("strong", null, s(l.header), 1),
|
|
1043
|
+
n("small", null, s(l.field), 1)
|
|
1044
|
+
]),
|
|
1045
|
+
e(Q) === N ? (p(), ke(W, {
|
|
1046
|
+
key: 0,
|
|
1047
|
+
name: "chevron-right",
|
|
1048
|
+
size: 13
|
|
1049
|
+
})) : H("", !0)
|
|
1050
|
+
], 40, ln)
|
|
1051
|
+
], 2))), 128)),
|
|
1052
|
+
e(d).length ? H("", !0) : (p(), y("p", sn, [
|
|
1053
|
+
q(W, {
|
|
1054
|
+
name: "search",
|
|
1055
|
+
size: 20
|
|
1056
|
+
}),
|
|
1057
|
+
P(s(e(t).noColumns), 1)
|
|
1058
|
+
]))
|
|
1059
|
+
], 8, tn),
|
|
1060
|
+
e(h).length ? (p(), y("div", rn, [
|
|
1061
|
+
n("label", null, [
|
|
1062
|
+
P(s(e(t).batchBody), 1),
|
|
1063
|
+
n("select", {
|
|
1064
|
+
"aria-label": e(t).batchBody,
|
|
1065
|
+
disabled: r.readonly || e(S) || e(A),
|
|
1066
|
+
onChange: a[26] || (a[26] = (l) => ye(l, "align"))
|
|
1067
|
+
}, [
|
|
1068
|
+
n("option", dn, s(e(t).chooseAlignment), 1),
|
|
1069
|
+
n("option", cn, s(e(t).auto), 1),
|
|
1070
|
+
n("option", vn, s(e(t).left), 1),
|
|
1071
|
+
n("option", mn, s(e(t).center), 1),
|
|
1072
|
+
n("option", gn, s(e(t).right), 1),
|
|
1073
|
+
n("option", fn, s(e(t).justify), 1)
|
|
1074
|
+
], 40, un)
|
|
1075
|
+
]),
|
|
1076
|
+
n("label", null, [
|
|
1077
|
+
P(s(e(t).batchHeader), 1),
|
|
1078
|
+
n("select", {
|
|
1079
|
+
"aria-label": e(t).batchHeader,
|
|
1080
|
+
disabled: r.readonly || e(S) || e(A),
|
|
1081
|
+
onChange: a[27] || (a[27] = (l) => ye(l, "headerAlign"))
|
|
1082
|
+
}, [
|
|
1083
|
+
n("option", pn, s(e(t).chooseAlignment), 1),
|
|
1084
|
+
n("option", bn, s(e(t).left), 1),
|
|
1085
|
+
n("option", yn, s(e(t).center), 1),
|
|
1086
|
+
n("option", _n, s(e(t).right), 1),
|
|
1087
|
+
n("option", kn, s(e(t).justify), 1)
|
|
1088
|
+
], 40, hn)
|
|
1089
|
+
])
|
|
1090
|
+
])) : H("", !0)
|
|
1091
|
+
], 40, Ft)) : H("", !0)
|
|
1092
|
+
], 64)) : (p(), y("p", wn, s(e(t).noColumns), 1))
|
|
1093
|
+
], 64)) : e(R) === "template" ? (p(), y(X, { key: 1 }, [
|
|
1094
|
+
n("h3", null, s(e(t).templateDetails), 1),
|
|
1095
|
+
n("label", Cn, [
|
|
1096
|
+
P(s(e(t).name), 1),
|
|
867
1097
|
n("input", {
|
|
868
|
-
value: e(
|
|
869
|
-
disabled:
|
|
870
|
-
onInput:
|
|
871
|
-
}, null, 40,
|
|
1098
|
+
value: e(b).name,
|
|
1099
|
+
disabled: r.readonly || e(S) || e(A),
|
|
1100
|
+
onInput: a[30] || (a[30] = (l) => e(i).setName(E(l)))
|
|
1101
|
+
}, null, 40, Sn)
|
|
872
1102
|
]),
|
|
873
|
-
n("label",
|
|
874
|
-
|
|
1103
|
+
n("label", xn, [
|
|
1104
|
+
P(s(e(t).description), 1),
|
|
875
1105
|
n("textarea", {
|
|
876
|
-
rows: "
|
|
877
|
-
value: e(
|
|
878
|
-
disabled:
|
|
879
|
-
onInput:
|
|
880
|
-
}, null, 40,
|
|
881
|
-
]),
|
|
882
|
-
n("dl", ln, [
|
|
883
|
-
n("dt", null, a(e(t).templateIdentity), 1),
|
|
884
|
-
n("dd", null, a(e(w).id), 1),
|
|
885
|
-
n("dt", null, a(e(t).templateRevision), 1),
|
|
886
|
-
n("dd", null, a(e(w).revision || e(t).unpublished), 1)
|
|
1106
|
+
rows: "2",
|
|
1107
|
+
value: e(b).description,
|
|
1108
|
+
disabled: r.readonly || e(S) || e(A),
|
|
1109
|
+
onInput: a[31] || (a[31] = (l) => e(i).setDescription(E(l)))
|
|
1110
|
+
}, null, 40, Mn)
|
|
887
1111
|
]),
|
|
888
|
-
n("
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
1112
|
+
n("details", En, [
|
|
1113
|
+
n("summary", null, s(e(t).technicalDetails), 1),
|
|
1114
|
+
n("dl", An, [
|
|
1115
|
+
n("dt", null, s(e(t).templateIdentity), 1),
|
|
1116
|
+
n("dd", null, s(e(b).id), 1),
|
|
1117
|
+
n("dt", null, s(e(t).templateRevision), 1),
|
|
1118
|
+
n("dd", null, s(e(b).revision || e(t).unpublished), 1)
|
|
1119
|
+
])
|
|
1120
|
+
])
|
|
1121
|
+
], 64)) : (p(), y(X, { key: 2 }, [
|
|
1122
|
+
n("h3", null, s(e(t).advancedTitle), 1),
|
|
1123
|
+
n("label", Tn, [
|
|
1124
|
+
P(s(e(t).json), 1),
|
|
1125
|
+
fe(n("textarea", {
|
|
1126
|
+
"onUpdate:modelValue": a[32] || (a[32] = (l) => he($) ? $.value = l : null),
|
|
896
1127
|
class: "mr-designer-json",
|
|
897
1128
|
"aria-label": e(t).json,
|
|
898
|
-
disabled:
|
|
1129
|
+
disabled: r.readonly || e(S),
|
|
899
1130
|
spellcheck: "false"
|
|
900
|
-
}, null, 8,
|
|
901
|
-
[
|
|
1131
|
+
}, null, 8, Dn), [
|
|
1132
|
+
[_e, e($)]
|
|
902
1133
|
])
|
|
903
1134
|
]),
|
|
904
1135
|
n("button", {
|
|
905
1136
|
type: "button",
|
|
906
1137
|
class: "mr-designer-apply-json",
|
|
907
|
-
disabled:
|
|
908
|
-
onClick:
|
|
909
|
-
(...l) => e(
|
|
910
|
-
},
|
|
1138
|
+
disabled: r.readonly || e(S),
|
|
1139
|
+
onClick: a[33] || (a[33] = //@ts-ignore
|
|
1140
|
+
(...l) => e(i).applyJson && e(i).applyJson(...l))
|
|
1141
|
+
}, s(e(t).applyJson), 9, $n)
|
|
911
1142
|
], 64)),
|
|
912
|
-
e(
|
|
913
|
-
],
|
|
1143
|
+
e(A) ? (p(), y("p", jn, s(e(t).jsonPending), 1)) : H("", !0)
|
|
1144
|
+
], 10, ft)
|
|
914
1145
|
]),
|
|
915
1146
|
n("div", {
|
|
916
1147
|
class: "mr-designer-preview",
|
|
917
1148
|
"aria-label": e(t).previewTitle
|
|
918
1149
|
}, [
|
|
919
|
-
e(
|
|
920
|
-
e(
|
|
921
|
-
(
|
|
1150
|
+
e(_) ? (p(), y("div", Ln, s(e(_)), 1)) : H("", !0),
|
|
1151
|
+
e(V).ok ? H("", !0) : (p(), y("ul", Rn, [
|
|
1152
|
+
(p(!0), y(X, null, oe(e(V).errors, (l) => (p(), y("li", {
|
|
922
1153
|
key: l.path
|
|
923
|
-
},
|
|
1154
|
+
}, s(l.path) + ":" + s(l.message), 1))), 128))
|
|
924
1155
|
])),
|
|
925
|
-
e(x) && e(
|
|
1156
|
+
e(x) && e(V).ok ? (p(), ke(e(Le), {
|
|
926
1157
|
key: 2,
|
|
927
1158
|
"report-id": "draft",
|
|
928
1159
|
fetcher: e(x),
|
|
1160
|
+
messages: {
|
|
1161
|
+
title: e(t).previewTitle,
|
|
1162
|
+
columnDirectory: e(t).previewFieldDirectory
|
|
1163
|
+
},
|
|
929
1164
|
"show-params": !1,
|
|
930
1165
|
editable: !1,
|
|
931
1166
|
"excel-import": !1,
|
|
932
1167
|
height: "100%"
|
|
933
|
-
}, null, 8, ["fetcher"])) : (
|
|
934
|
-
], 8,
|
|
1168
|
+
}, null, 8, ["fetcher", "messages"])) : (p(), y("p", Bn, s(e(t).invalid), 1))
|
|
1169
|
+
], 8, Vn)
|
|
935
1170
|
])
|
|
936
|
-
], 8,
|
|
1171
|
+
], 8, tt));
|
|
937
1172
|
}
|
|
938
|
-
}),
|
|
1173
|
+
}), Gn = /* @__PURE__ */ Se(Pn, [["__scopeId", "data-v-10c10f4e"]]);
|
|
939
1174
|
export {
|
|
940
|
-
|
|
941
|
-
|
|
1175
|
+
Gn as ReportTemplateEditor,
|
|
1176
|
+
Ye as TEMPLATE_EDITOR_MESSAGES
|
|
942
1177
|
};
|