@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/dist/designer.js CHANGED
@@ -1,122 +1,122 @@
1
- import { ref as $, computed as A, shallowRef as pe, onBeforeUnmount as he, watch as W, defineComponent as be, getCurrentInstance as ye, nextTick as te, openBlock as y, createElementBlock as k, unref as e, createElementVNode as n, createVNode as ne, toDisplayString as a, normalizeClass as me, createTextVNode as R, createCommentVNode as P, withKeys as _e, withModifiers as ke, Fragment as K, renderList as se, withDirectives as de, isRef as ue, vModelSelect as Ce, vModelText as fe, createBlock as ge } from "vue";
2
- import { provideMachReportConfig as we, createLocalFetcher as Se, ReportPreview as xe } from "@agile-team/mach-report/vue";
3
- import { _ as Y, a as Ee } from "./_plugin-vue_export-helper-DPbiz14D.js";
4
- import { resolveGridLayout as ce, parseReportTemplate as J, serializeReportTemplate as U, validateReportTemplateDocument as Me } from "@agile-team/mach-report";
5
- function Te(c, M, u, b) {
6
- const f = $(0), s = $(""), C = $([]), B = A(() => c.value.template.pages.flatMap((d, r) => d.components.flatMap((i, m) => i.kind === "list" ? [{ component: i, pageIndex: r, componentIndex: m }] : []))), w = A(() => B.value[f.value]?.component), p = A(() => {
7
- const d = w.value;
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 ce(d.headerGrid, d.widthMm, 100).cells)
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 (w.value?.columns ?? []).flatMap((r, i) => {
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 _(d, r) {
22
- C.value = r ? [.../* @__PURE__ */ new Set([...C.value, d])] : C.value.filter((i) => i !== d);
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) _(r.index, d);
25
+ for (const r of g.value) k(r.index, d);
26
26
  }
27
27
  function h() {
28
- C.value = [];
28
+ w.value = [];
29
29
  }
30
- function L(d, r, i) {
31
- if (!u()) return;
32
- const m = w.value?.columns[d];
33
- m && (Object.assign(m, { [r]: r === "widthMm" ? Number(i) : i }), r === "header" && I(d, String(i)), r === "headerAlign" && j(d, i), r === "widthMm" && Q(), b());
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 = B.value[f.value];
36
+ const d = $.value[f.value];
37
37
  if (!d) return;
38
- const r = d.component, i = c.value.template.pages[d.pageIndex], m = r.columns.map((x) => x.widthMm);
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 I(d, r) {
42
- const i = w.value;
41
+ function O(d, r) {
42
+ const i = S.value;
43
43
  if (!i?.headerGrid) return;
44
- const x = ce(i.headerGrid, i.widthMm, 100).cells.filter(({ ci: t, cell: V }) => t <= d && t + (V.colSpan ?? 1) > d).slice(-1)[0];
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 j(d, r) {
50
- const i = w.value, m = i?.columns[d];
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 = ce(i.headerGrid, i.widthMm, 100).cells.filter(({ ci: V, cell: O }) => V <= d && V + (O.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((V) => {
54
- V.headerAlign = r, V.headerStyle?.align !== void 0 && (V.headerStyle = { ...V.headerStyle, align: r });
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 H(d, r) {
58
- if (!(!u() || d === "headerAlign" && r === "auto")) {
59
- for (const i of C.value) {
60
- const m = w.value?.columns[i];
61
- m && (Object.assign(m, { [d]: r }), d === "headerAlign" && j(i, r));
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
- b();
63
+ y();
64
64
  }
65
65
  }
66
- return { selected: f, query: s, selectedColumns: C, lists: B, activeList: w, headerAlignments: p, visibleColumns: g, toggleColumn: _, selectVisible: T, clearSelection: h, setColumn: L, alignColumns: H };
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 Ae(c, M = { entries: 100, bytes: 16 * 1024 * 1024 }) {
69
- const u = $([c]), b = $(0), f = A(() => b.value > 0), s = A(() => b.value + 1 < u.value.length), C = A(() => u.value[b.value]);
70
- function B(g) {
71
- u.value = [g], b.value = 0;
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 w(g) {
74
- if (u.value[b.value] === g) return;
75
- const _ = u.value.slice(0, b.value + 1);
76
- _.push(g);
77
- let T = _.reduce((h, L) => h + L.length * 2, 0);
78
- for (; _.length > 1 && (_.length > M.entries || T > M.bytes); ) T -= _.shift().length * 2;
79
- u.value = _, b.value = u.value.length - 1;
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 b.value += g, u.value[b.value];
83
+ return y.value += g, c.value[y.value];
84
84
  }
85
- return { canUndo: f, canRedo: s, current: C, reset: B, record: w, move: p };
85
+ return { canUndo: f, canRedo: s, current: w, reset: $, record: S, move: p };
86
86
  }
87
- function De(c) {
88
- const M = pe(null), u = $(!1);
89
- let b, f = 0;
90
- function s(w) {
91
- b?.(w), b = void 0, M.value = null;
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 C() {
94
- f++, s(!1), u.value = !1;
93
+ function w() {
94
+ f++, s(!1), c.value = !1;
95
95
  }
96
- async function B(w) {
97
- C();
98
- const p = f, g = c();
99
- u.value = !0;
96
+ async function $(S) {
97
+ w();
98
+ const p = f, g = v();
99
+ c.value = !0;
100
100
  try {
101
- const _ = await new Promise((T, h) => {
102
- if (b = T, !g) {
103
- M.value = w;
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(w) : !1).then((L) => {
107
- f === p && s(L === !0);
108
- }, (L) => {
109
- f === p && (b = void 0, M.value = null, h(L));
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 && _ === !0;
112
+ return f === p && k === !0;
113
113
  } finally {
114
- f === p && (u.value = !1);
114
+ f === p && (c.value = !1);
115
115
  }
116
116
  }
117
- return he(C), { confirmation: M, pending: u, decide: s, request: B, cancel: C };
117
+ return pe(w), { confirmation: M, pending: c, decide: s, request: $, cancel: w };
118
118
  }
119
- const je = {
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
- }, Re = {
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
- }, $e = { ...je, ...Re };
186
- function Be(c, M) {
187
- const u = $(J(c.modelValue)), b = $(U(u.value)), f = $(U(u.value)), s = $(""), C = $(!1), B = A(() => ({ ...$e, ...c.messages })), w = A(() => ({
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
- ...c.preview,
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
- ...c.preview?.theme
203
+ ...v.preview?.theme
204
204
  }
205
205
  }));
206
- we({ get defaults() {
207
- return w.value;
206
+ Se({ get defaults() {
207
+ return S.value;
208
208
  } });
209
209
  let p, g = 0;
210
- const _ = A(() => Me(u.value)), T = A(() => {
210
+ const k = A(() => Te(c.value)), T = A(() => {
211
211
  try {
212
- return U(u.value) !== b.value;
212
+ return U(c.value) !== y.value;
213
213
  } catch {
214
214
  return !0;
215
215
  }
216
- }), h = $(f.value), L = A(() => f.value !== h.value), Q = A(() => T.value || f.value !== h.value), I = () => JSON.stringify({ document: u.value, json: f.value, appliedJson: h.value }), j = Ae(I()), H = De(() => c.beforeDiscard), d = A(() => C.value || H.pending.value), r = () => !c.readonly && !d.value && !L.value, i = Te(u, () => _.value.ok, r, q), { selected: m, lists: x, activeList: t, headerAlignments: V, setColumn: O } = i;
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(() => _.value.ok ? Se({ draft: { template: u.value.template, datasets: c.datasets ?? {}, params: [] } }) : void 0);
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, C.value = !1;
220
+ g++, p?.abort(), p = void 0, w.value = !1;
221
221
  }
222
- let G = 0;
223
- async function N(l = "replace", o) {
222
+ let H = 0;
223
+ async function J(u = "replace", o) {
224
224
  if (!Q.value) return !0;
225
- const v = I();
225
+ const l = O();
226
226
  try {
227
- return await H.request({
228
- reason: l,
229
- document: JSON.parse(JSON.stringify(u.value)),
230
- replacement: o ? J(o) : void 0,
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
- }) && v === I();
233
- } catch (D) {
234
- return s.value = D instanceof Error ? D.message : String(D), !1;
232
+ }) && l === O();
233
+ } catch (b) {
234
+ return s.value = b instanceof Error ? b.message : String(b), !1;
235
235
  }
236
236
  }
237
- function le(l) {
238
- E(), u.value = l, b.value = U(l), f.value = b.value, h.value = f.value, s.value = "", m.value = 0, i.clearSelection(), j.reset(I());
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(() => c.modelValue, async (l) => {
240
+ W(() => v.modelValue, async (u) => {
241
241
  let o;
242
242
  try {
243
- o = J(l);
244
- } catch (D) {
245
- s.value = D instanceof Error ? D.message : String(D);
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(u.value)) return;
249
+ if (U(o) === U(c.value)) return;
250
250
  } catch {
251
251
  }
252
- const v = ++G;
253
- if (E(), !await N("replace", o)) {
254
- v === G && _.value.ok && M("update:modelValue", J(u.value));
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
- v === G && le(o);
258
- }), he(() => {
259
- G++, E();
257
+ l === H && oe(o);
258
+ }), pe(() => {
259
+ H++, E();
260
260
  });
261
261
  function q() {
262
- H.cancel(), s.value = "", _.value.ok && (f.value = U(u.value), h.value = f.value, M("update:modelValue", J(u.value))), j.record(I());
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 oe(l) {
265
- r() && (u.value.name = l, q());
264
+ function ae(u) {
265
+ r() && (c.value.name = u, q());
266
266
  }
267
- function X(l) {
268
- r() && (u.value.description = l, q());
267
+ function Z(u) {
268
+ r() && (c.value.description = u, q());
269
269
  }
270
- function F() {
271
- if (!(c.readonly || d.value))
270
+ function X() {
271
+ if (!(v.readonly || d.value))
272
272
  try {
273
- const l = J(f.value);
274
- if (l.id !== u.value.id) throw new Error("属性编辑不允许更换模板 ID,请另存为新模板");
275
- if (l.revision !== u.value.revision) throw new Error("修订号由保存服务管理,不能在 JSON 中修改");
276
- u.value = l, m.value = 0, i.clearSelection(), q();
277
- } catch (l) {
278
- s.value = l instanceof Error ? l.message : String(l);
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 ae() {
282
- d.value || c.readonly || !await N("reset") || (le(J(b.value)), M("update:modelValue", J(u.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 Z(l) {
285
- if (d.value || c.readonly) return;
286
- j.record(I());
287
- const o = j.move(l);
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
- H.cancel();
290
- const v = JSON.parse(o);
291
- u.value = v.document, f.value = v.json, h.value = v.appliedJson, s.value = "", m.value = 0, i.clearSelection(), _.value.ok && M("update:modelValue", J(u.value));
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 ie() {
294
- if (!c.save || !r() || !_.value.ok) return;
295
- const l = ++g;
296
- p = new AbortController(), C.value = !0, s.value = "";
297
- const o = J(u.value);
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 v = J(await c.save(o, { expectedRevision: o.revision, signal: p.signal }));
300
- if (l !== g) return;
301
- if (v.id !== o.id) throw new Error("保存服务返回了其他模板的文档");
302
- u.value = v, b.value = U(v), f.value = b.value, h.value = f.value, j.reset(I()), M("saved", J(v)), M("update:modelValue", J(v));
303
- } catch (v) {
304
- l === g && (s.value = v instanceof Error ? v.message : String(v));
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
- l === g && (C.value = !1, p = void 0);
306
+ u === g && (w.value = !1, p = void 0);
307
307
  }
308
308
  }
309
- const re = A(() => j.canUndo.value || I() !== j.current.value), S = A(() => j.canRedo.value && I() === j.current.value);
310
- return { ...i, canUndo: re, canRedo: S, undo: () => Z(-1), redo: () => Z(1), pendingLocalChanges: Q, jsonPending: L, blocked: d, confirmation: H.confirmation, decideDiscard: H.decide, guardChanges: N, draft: u, json: f, selected: m, error: s, saving: C, dirty: T, validation: _, lists: x, activeList: t, headerAlignments: V, previewOptions: w, fetcher: z, messages: B, setName: oe, setDescription: X, setColumn: O, applyJson: F, reset: ae, save: ie };
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 Le(c, M, u, b) {
313
- const f = $("fields"), s = $(c.value[0]?.index ?? -1), C = A(() => {
314
- const p = u.value?.columns[s.value];
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(b, () => {
318
- c.value.some((p) => p.index === s.value) || (s.value = c.value[0]?.index ?? -1);
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 = c.value[0]?.index ?? -1;
321
- }), W(u, (p) => {
322
- p?.columns[s.value] || (s.value = c.value[0]?.index ?? -1);
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 B(p) {
325
- c.value.some((g) => g.index === p) && (s.value = p);
324
+ function $(p) {
325
+ v.value.some((g) => g.index === p) && (s.value = p);
326
326
  }
327
- function w(p) {
328
- const g = c.value;
327
+ function S(p) {
328
+ const g = v.value;
329
329
  if (!g.length) return;
330
- const _ = Math.max(
330
+ const k = Math.max(
331
331
  0,
332
- g.findIndex((L) => L.index === s.value)
332
+ g.findIndex((B) => B.index === s.value)
333
333
  ), h = {
334
- ArrowDown: Math.min(_ + 1, g.length - 1),
335
- ArrowUp: Math.max(_ - 1, 0),
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: C, activate: B, moveColumn: w };
342
+ return { section: f, activeIndex: s, activeColumn: w, activate: $, moveColumn: S };
343
343
  }
344
- const Ve = ["aria-label", "aria-busy"], Oe = { class: "mr-designer-bar" }, Ie = { class: "mr-designer-heading" }, Je = { class: "mr-designer-actions" }, Ne = { class: "mr-designer-history" }, Pe = ["aria-label", "title", "disabled"], He = ["aria-label", "title", "disabled"], Ge = ["disabled"], Fe = ["disabled"], Ue = ["aria-label"], ze = { class: "mr-designer-body" }, qe = { class: "mr-designer-inspector" }, Ke = ["aria-label"], We = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], Qe = ["id", "aria-labelledby"], Xe = {
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
- }, Ye = ["value"], Ze = {
347
+ }, Ze = ["value"], et = {
348
348
  key: 1,
349
349
  class: "mr-designer-columns"
350
- }, et = { class: "mr-designer-directory-heading" }, tt = { class: "mr-designer-search" }, nt = ["aria-label", "placeholder"], lt = ["aria-label", "title"], ot = { class: "mr-designer-column-tools" }, at = ["disabled"], st = {
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
- }, it = { key: 2 }, rt = ["aria-label"], dt = ["aria-label", "checked", "disabled", "onChange"], ut = ["data-column-index", "aria-pressed", "tabindex", "onClick"], ct = { class: "mr-designer-column-number" }, vt = { class: "mr-designer-column-name" }, mt = {
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
- }, ft = {
357
+ }, gt = {
358
358
  key: 0,
359
359
  class: "mr-designer-batch"
360
- }, gt = ["aria-label", "disabled"], ht = { value: "" }, pt = { value: "auto" }, bt = { value: "left" }, yt = { value: "center" }, _t = { value: "right" }, kt = { value: "justify" }, Ct = ["aria-label", "disabled"], wt = { value: "" }, St = { value: "left" }, xt = { value: "center" }, Et = { value: "right" }, Mt = { value: "justify" }, Tt = ["disabled"], At = ["value"], Dt = ["value"], jt = ["value"], Rt = ["value"], $t = { value: "identifier" }, Bt = { value: "dimension" }, Lt = { value: "measure" }, Vt = { value: "date" }, Ot = { value: "text" }, It = ["value"], Jt = { value: "auto" }, Nt = { value: "left" }, Pt = { value: "center" }, Ht = { value: "right" }, Gt = { value: "justify" }, Ft = ["value"], Ut = { value: "left" }, zt = { value: "center" }, qt = { value: "right" }, Kt = { value: "justify" }, Wt = { class: "mr-designer-toggle" }, Qt = ["checked"], Xt = {
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
- }, Yt = { class: "mr-designer-stacked" }, Zt = ["value", "disabled"], en = { class: "mr-designer-stacked" }, tn = ["value", "disabled"], nn = { class: "mr-designer-identity" }, ln = { class: "mr-designer-note" }, on = { class: "mr-designer-note" }, an = { class: "mr-designer-stacked" }, sn = ["aria-label", "disabled"], rn = ["disabled"], dn = {
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
- }, un = ["aria-label"], cn = {
368
+ }, cn = ["aria-label"], vn = {
369
369
  key: 0,
370
370
  role: "alert",
371
371
  class: "mr-designer-error"
372
- }, vn = {
372
+ }, mn = {
373
373
  key: 1,
374
374
  role: "alert",
375
375
  class: "mr-designer-error"
376
- }, mn = {
376
+ }, fn = {
377
377
  key: 3,
378
378
  class: "mr-designer-note mr-designer-invalid"
379
- }, fn = /* @__PURE__ */ be({
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(c, { expose: M, emit: u }) {
392
- const b = c, f = u, s = Be(b, (S, l) => {
393
- f(S === "saved" ? "saved" : "update:modelValue", l);
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: C,
396
- json: B,
397
- selected: w,
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: L,
403
+ confirmation: B,
404
404
  canUndo: Q,
405
- canRedo: I,
406
- validation: j,
407
- lists: H,
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, V = Le(
414
+ } = s, L = Ve(
415
415
  r,
416
- w,
416
+ S,
417
417
  d,
418
418
  i
419
- ), { section: O, activeIndex: z, activeColumn: E } = V, G = `mr-designer-${ye()?.uid ?? 0}`, N = ["fields", "template", "advanced"], le = A(
420
- () => g.value ? t.value.saving : b.readonly ? t.value.readonly : _.value ? t.value.dirty : t.value.ready
421
- ), q = $(null), oe = $(null);
422
- W(O, async (S) => {
423
- if (S !== "fields") return;
424
- await te();
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 (!l || !o) return;
429
- const v = l.getBoundingClientRect(), D = o.getBoundingClientRect(), ee = v.top + l.clientTop, ve = ee + l.clientHeight;
430
- D.top < ee ? l.scrollTop += D.top - ee : D.bottom > ve && (l.scrollTop += D.bottom - ve);
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(L, async (S) => {
434
- S ? (X = document.activeElement, await te(), q.value?.focus()) : (await te(), X?.isConnected && X.focus(), X = null);
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 _.value;
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 F(S) {
450
- return S.target.value;
448
+ function G(u) {
449
+ return u.target.value;
451
450
  }
452
- function ae(S) {
453
- return S.target.checked;
451
+ function ee(u) {
452
+ return u.target.checked;
454
453
  }
455
- function Z(S, l) {
456
- const o = S.target;
454
+ function se(u, o) {
455
+ const l = u.target;
457
456
  s.alignColumns(
458
- l,
459
- o.value
460
- ), o.value = "";
457
+ o,
458
+ l.value
459
+ ), l.value = "";
461
460
  }
462
- async function ie(S) {
463
- const l = V.moveColumn(S.key);
464
- if (l === void 0) return;
465
- S.preventDefault();
466
- const o = S.currentTarget.closest(
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 te();
470
- const v = o?.querySelector(
471
- `button[data-column-index="${l}"]`
468
+ await ne();
469
+ const b = l?.querySelector(
470
+ `button[data-column-index="${o}"]`
472
471
  );
473
- v?.focus({ preventScroll: !0 }), v?.scrollIntoView({ block: "nearest" });
472
+ b?.focus({ preventScroll: !0 }), b?.scrollIntoView({ block: "nearest" });
474
473
  }
475
- async function re(S) {
476
- const o = {
474
+ async function de(u) {
475
+ const l = {
477
476
  ArrowRight: 1,
478
477
  ArrowLeft: -1,
479
- Home: -N.length,
480
- End: N.length
481
- }[S.key];
482
- if (o === void 0) return;
483
- S.preventDefault();
484
- const v = N.indexOf(O.value), D = S.key === "Home" ? 0 : S.key === "End" ? N.length - 1 : (v + o + N.length) % N.length;
485
- O.value = N[D];
486
- const ee = S.currentTarget.parentElement;
487
- await te(), ee?.querySelector(`#${G}-tab-${O.value}`)?.focus();
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 (S, l) => (y(), k("section", {
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", Oe, [
495
- n("div", Ie, [
496
- ne(Y, {
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: me({ "mr-designer-dirty": e(_) })
504
- }, a(le.value), 3)
502
+ class: fe({ "mr-designer-dirty": e(k) })
503
+ }, a(oe.value), 3)
505
504
  ])
506
505
  ]),
507
- n("div", Je, [
508
- n("div", Ne, [
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: c.readonly || e(h) || !e(Q),
515
- onClick: l[0] || (l[0] = //@ts-ignore
516
- (...o) => e(s).undo && e(s).undo(...o))
517
- }, [...l[25] || (l[25] = [
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, Pe),
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: c.readonly || e(h) || !e(I),
532
- onClick: l[1] || (l[1] = //@ts-ignore
533
- (...o) => e(s).redo && e(s).redo(...o))
534
- }, [...l[26] || (l[26] = [
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, He)
541
+ ])], 8, Ge)
543
542
  ]),
544
543
  n("button", {
545
544
  type: "button",
546
545
  class: "mr-designer-reset",
547
- disabled: c.readonly || e(h) || !e(_),
548
- onClick: l[2] || (l[2] = //@ts-ignore
549
- (...o) => e(s).reset && e(s).reset(...o))
550
- }, a(e(t).reset), 9, Ge),
551
- c.save ? (y(), k("button", {
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: c.readonly || e(h) || e(T) || !e(j).ok || !e(_),
556
- onClick: l[3] || (l[3] = //@ts-ignore
557
- (...o) => e(s).save && e(s).save(...o))
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
- ne(Y, {
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, Fe)) : P("", !0)
563
+ ], 8, Ue)) : N("", !0)
565
564
  ])
566
565
  ]),
567
- e(L) ? (y(), k("div", {
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: l[6] || (l[6] = _e(ke((o) => e(s).decideDiscard(!1), ["prevent"]), ["esc"]))
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: l[4] || (l[4] = (o) => e(s).decideDiscard(!1))
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: l[5] || (l[5] = (o) => e(s).decideDiscard(!0))
586
+ onClick: o[5] || (o[5] = (l) => e(s).decideDiscard(!0))
588
587
  }, a(e(t).discard), 1)
589
588
  ])
590
- ], 40, Ue)) : P("", !0),
591
- n("div", ze, [
592
- n("aside", qe, [
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
- (y(), k(K, null, se(N, (o) => n("button", {
599
- id: `${G}-tab-${o}`,
600
- key: o,
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(O) === o,
604
- "aria-controls": `${G}-panel-${o}`,
605
- tabindex: e(O) === o ? 0 : -1,
606
- onClick: (v) => O.value = o,
607
- onKeydown: re
608
- }, a(e(t)[`${o}Section`]), 41, We)), 64))
609
- ], 8, Ke),
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
- id: `${G}-panel-${e(O)}`,
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": `${G}-tab-${e(O)}`
615
+ "aria-labelledby": `${H}-tab-${e(V)}`
615
616
  }, [
616
- e(O) === "fields" ? (y(), k(K, { key: 0 }, [
617
- e(H).length > 1 ? (y(), k("label", Xe, [
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
- de(n("select", {
620
- "onUpdate:modelValue": l[7] || (l[7] = (o) => ue(w) ? w.value = o : null)
620
+ ue(n("select", {
621
+ "onUpdate:modelValue": o[7] || (o[7] = (l) => ce(S) ? S.value = l : null)
621
622
  }, [
622
- (y(!0), k(K, null, se(e(H), (o, v) => (y(), k("option", {
623
- key: v,
624
- value: v
625
- }, a(o.pageIndex + 1) + " " + a(e(t).page) + " · " + a(o.component.title || o.component.dataset), 9, Ye))), 128))
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
- [Ce, e(w)]
628
+ [we, e(S)]
628
629
  ])
629
- ])) : P("", !0),
630
- e(d) ? (y(), k("div", Ze, [
631
- n("div", et, [
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", tt, [
636
- ne(Y, {
636
+ n("div", nt, [
637
+ le(Y, {
637
638
  name: "search",
638
639
  size: 15
639
640
  }),
640
- de(n("input", {
641
- "onUpdate:modelValue": l[8] || (l[8] = (o) => ue(i) ? i.value = o : null),
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, nt), [
646
- [fe, e(i)]
646
+ }, null, 8, lt), [
647
+ [ge, e(i)]
647
648
  ]),
648
- e(i) ? (y(), k("button", {
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: l[9] || (l[9] = (o) => i.value = "")
655
+ onClick: o[9] || (o[9] = (l) => i.value = "")
655
656
  }, [
656
- ne(Y, {
657
+ le(Y, {
657
658
  name: "close",
658
659
  size: 14
659
660
  })
660
- ], 8, lt)) : P("", !0)
661
+ ], 8, ot)) : N("", !0)
661
662
  ]),
662
- n("div", ot, [
663
+ n("div", at, [
663
664
  n("button", {
664
665
  type: "button",
665
- disabled: c.readonly || e(h) || e(T) || !e(r).length,
666
- onClick: l[10] || (l[10] = (o) => e(s).selectVisible(!0))
667
- }, a(e(t).selectVisible), 9, at),
668
- e(m).length ? (y(), k("button", {
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: l[11] || (l[11] = //@ts-ignore
672
- (...o) => e(s).clearSelection && e(s).clearSelection(...o))
673
- }, a(e(t).clearSelection), 1)) : P("", !0),
674
- e(m).length ? (y(), k("span", st, a(e(t).columnsSelected) + " " + a(e(m).length), 1)) : (y(), k("span", it, a(e(r).length) + " / " + a(e(d).columns.length), 1))
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: oe,
679
+ ref: ae,
679
680
  class: "mr-designer-column-list",
680
681
  "aria-label": e(t).columnDirectory,
681
682
  role: "group"
682
683
  }, [
683
- (y(!0), k(K, null, se(e(r), ({ column: o, index: v }) => (y(), k("div", {
684
- key: v,
685
- class: me(["mr-designer-column-row", { "is-active": e(z) === v }])
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} ${o.header}`,
690
- checked: e(m).includes(v),
691
- disabled: c.readonly || e(h) || e(T),
692
- onChange: (D) => e(s).toggleColumn(v, ae(D))
693
- }, null, 40, dt),
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": v,
697
- "aria-pressed": e(z) === v,
698
- tabindex: e(z) === v ? 0 : -1,
699
- onClick: (D) => e(V).activate(v),
700
- onKeydown: ie
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", ct, a(v + 1), 1),
703
- n("span", vt, [
704
- n("strong", null, a(o.header), 1),
705
- n("small", null, a(o.field), 1)
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) === v ? (y(), ge(Y, {
708
+ e(z) === b ? (_(), he(Y, {
708
709
  key: 0,
709
710
  name: "chevron-right",
710
711
  size: 14
711
- })) : P("", !0)
712
- ], 40, ut)
712
+ })) : N("", !0)
713
+ ], 40, ct)
713
714
  ], 2))), 128)),
714
- e(r).length ? P("", !0) : (y(), k("p", mt, [
715
- ne(Y, {
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, rt),
722
- e(m).length ? (y(), k("div", ft, [
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: c.readonly || e(h) || e(T),
728
- onChange: l[12] || (l[12] = (o) => Z(o, "align"))
728
+ disabled: v.readonly || e(h) || e(T),
729
+ onChange: o[12] || (o[12] = (l) => se(l, "align"))
729
730
  }, [
730
- n("option", ht, a(e(t).chooseAlignment), 1),
731
- n("option", pt, a(e(t).auto), 1),
732
- n("option", bt, a(e(t).left), 1),
733
- n("option", yt, a(e(t).center), 1),
734
- n("option", _t, a(e(t).right), 1),
735
- n("option", kt, a(e(t).justify), 1)
736
- ], 40, gt)
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: c.readonly || e(h) || e(T),
743
- onChange: l[13] || (l[13] = (o) => Z(o, "headerAlign"))
743
+ disabled: v.readonly || e(h) || e(T),
744
+ onChange: o[13] || (o[13] = (l) => se(l, "headerAlign"))
744
745
  }, [
745
- n("option", wt, a(e(t).chooseAlignment), 1),
746
- n("option", St, a(e(t).left), 1),
747
- n("option", xt, a(e(t).center), 1),
748
- n("option", Et, a(e(t).right), 1),
749
- n("option", Mt, a(e(t).justify), 1)
750
- ], 40, Ct)
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
- ])) : P("", !0),
753
- e(E) ? (y(), k("fieldset", {
753
+ ])) : N("", !0),
754
+ e(E) ? (_(), C("fieldset", {
754
755
  key: 1,
755
756
  class: "mr-designer-properties",
756
- disabled: c.readonly || e(h) || e(T)
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: l[14] || (l[14] = (o) => e(s).setColumn(
767
+ onInput: o[14] || (o[14] = (l) => e(s).setColumn(
767
768
  e(E).index,
768
769
  "header",
769
- F(o)
770
+ G(l)
770
771
  ))
771
- }, null, 40, At)
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: l[15] || (l[15] = (o) => e(s).setColumn(
778
+ onChange: o[15] || (o[15] = (l) => e(s).setColumn(
778
779
  e(E).index,
779
780
  "field",
780
- F(o)
781
+ G(l)
781
782
  ))
782
- }, null, 40, Dt)
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: l[16] || (l[16] = (o) => e(s).setColumn(
792
+ onChange: o[16] || (o[16] = (l) => e(s).setColumn(
792
793
  e(E).index,
793
794
  "widthMm",
794
- F(o)
795
+ G(l)
795
796
  ))
796
- }, null, 40, jt)
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: l[17] || (l[17] = (o) => e(s).setColumn(
803
+ onChange: o[17] || (o[17] = (l) => e(s).setColumn(
803
804
  e(E).index,
804
805
  "semanticRole",
805
- F(o)
806
+ G(l)
806
807
  ))
807
808
  }, [
808
- n("option", $t, a(e(t).identifier), 1),
809
- n("option", Bt, a(e(t).dimension), 1),
810
- n("option", Lt, a(e(t).measure), 1),
811
- n("option", Vt, a(e(t).date), 1),
812
- n("option", Ot, a(e(t).text), 1)
813
- ], 40, Rt)
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: l[18] || (l[18] = (o) => e(s).setColumn(
820
+ onChange: o[18] || (o[18] = (l) => e(s).setColumn(
820
821
  e(E).index,
821
822
  "align",
822
- F(o)
823
+ G(l)
823
824
  ))
824
825
  }, [
825
- n("option", Jt, a(e(t).auto), 1),
826
- n("option", Nt, a(e(t).left), 1),
827
- n("option", Pt, a(e(t).center), 1),
828
- n("option", Ht, a(e(t).right), 1),
829
- n("option", Gt, a(e(t).justify), 1)
830
- ], 40, It)
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: l[19] || (l[19] = (o) => e(s).setColumn(
837
+ onChange: o[19] || (o[19] = (l) => e(s).setColumn(
837
838
  e(E).index,
838
839
  "headerAlign",
839
- F(o)
840
+ G(l)
840
841
  ))
841
842
  }, [
842
- n("option", Ut, a(e(t).left), 1),
843
- n("option", zt, a(e(t).center), 1),
844
- n("option", qt, a(e(t).right), 1),
845
- n("option", Kt, a(e(t).justify), 1)
846
- ], 40, Ft)
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", Wt, [
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: l[20] || (l[20] = (o) => e(s).setColumn(
854
+ onChange: o[20] || (o[20] = (l) => e(s).setColumn(
854
855
  e(E).index,
855
856
  "editable",
856
- ae(o)
857
+ ee(l)
857
858
  ))
858
- }, null, 40, Qt)
859
+ }, null, 40, Xt)
859
860
  ])
860
- ], 8, Tt)) : P("", !0)
861
- ])) : (y(), k("p", Xt, a(e(t).noColumns), 1))
862
- ], 64)) : e(O) === "template" ? (y(), k(K, { key: 1 }, [
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", Yt, [
865
+ n("label", Zt, [
865
866
  R(a(e(t).name), 1),
866
867
  n("input", {
867
- value: e(C).name,
868
- disabled: c.readonly || e(h) || e(T),
869
- onInput: l[21] || (l[21] = (o) => e(s).setName(F(o)))
870
- }, null, 40, Zt)
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", en, [
873
+ n("label", tn, [
873
874
  R(a(e(t).description), 1),
874
875
  n("textarea", {
875
876
  rows: "4",
876
- value: e(C).description,
877
- disabled: c.readonly || e(h) || e(T),
878
- onInput: l[22] || (l[22] = (o) => e(s).setDescription(F(o)))
879
- }, null, 40, tn)
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", nn, [
882
+ n("dl", ln, [
882
883
  n("dt", null, a(e(t).templateIdentity), 1),
883
- n("dd", null, a(e(C).id), 1),
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(C).revision || e(t).unpublished), 1)
886
+ n("dd", null, a(e(w).revision || e(t).unpublished), 1)
886
887
  ]),
887
- n("p", ln, a(e(t).note), 1)
888
- ], 64)) : (y(), k(K, { key: 2 }, [
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", on, a(e(t).advancedDescription), 1),
891
- n("label", an, [
891
+ n("p", an, a(e(t).advancedDescription), 1),
892
+ n("label", sn, [
892
893
  R(a(e(t).json), 1),
893
- de(n("textarea", {
894
- "onUpdate:modelValue": l[23] || (l[23] = (o) => ue(B) ? B.value = o : null),
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: c.readonly || e(h),
898
+ disabled: v.readonly || e(h),
898
899
  spellcheck: "false"
899
- }, null, 8, sn), [
900
- [fe, e(B)]
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: c.readonly || e(h),
907
- onClick: l[24] || (l[24] = //@ts-ignore
908
- (...o) => e(s).applyJson && e(s).applyJson(...o))
909
- }, a(e(t).applyJson), 9, rn)
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) ? (y(), k("p", dn, a(e(t).jsonPending), 1)) : P("", !0)
912
- ], 8, Qe)
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) ? (y(), k("div", cn, a(e(p)), 1)) : P("", !0),
919
- e(j).ok ? P("", !0) : (y(), k("ul", vn, [
920
- (y(!0), k(K, null, se(e(j).errors, (o) => (y(), k("li", {
921
- key: o.path
922
- }, a(o.path) + ":" + a(o.message), 1))), 128))
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(j).ok ? (y(), ge(e(xe), {
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"])) : (y(), k("p", mn, a(e(t).invalid), 1))
933
- ], 8, un)
933
+ }, null, 8, ["fetcher"])) : (_(), C("p", fn, a(e(t).invalid), 1))
934
+ ], 8, cn)
934
935
  ])
935
- ], 8, Ve));
936
+ ], 8, Oe));
936
937
  }
937
- }), yn = /* @__PURE__ */ Ee(fn, [["__scopeId", "data-v-8bbff75e"]]);
938
+ }), _n = /* @__PURE__ */ Me(gn, [["__scopeId", "data-v-c4eab8e7"]]);
938
939
  export {
939
- yn as ReportTemplateEditor,
940
- $e as TEMPLATE_EDITOR_MESSAGES
940
+ _n as ReportTemplateEditor,
941
+ Be as TEMPLATE_EDITOR_MESSAGES
941
942
  };