@agile-team/mach-report 2.6.1 → 2.7.0

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.
Files changed (61) hide show
  1. package/README.md +37 -4
  2. package/dist/ReportPreview-BdvoqdOd.cjs +6 -0
  3. package/dist/ReportPreview-COFkbeEM.js +3719 -0
  4. package/dist/{assets-NVA_sftu.js → assets-B9qJku3V.js} +54 -57
  5. package/dist/assets-RZan7EyL.cjs +1 -0
  6. package/dist/capabilities-joSutDF8.js +63 -0
  7. package/dist/capabilities-xGTpnPjJ.cjs +1 -0
  8. package/dist/designer.cjs +1 -1
  9. package/dist/designer.d.cts +869 -753
  10. package/dist/designer.d.ts +869 -753
  11. package/dist/designer.js +490 -234
  12. package/dist/index.cjs +8 -8
  13. package/dist/index.d.cts +86 -3
  14. package/dist/index.d.ts +86 -3
  15. package/dist/index.js +582 -508
  16. package/dist/pdf.cjs +30 -30
  17. package/dist/pdf.d.cts +11 -3
  18. package/dist/pdf.d.ts +11 -3
  19. package/dist/pdf.js +1501 -1500
  20. package/dist/{plugin-BqBkn_kI.cjs → plugin-9t_ZFwhz.cjs} +1 -1
  21. package/dist/{plugin-Ds10VnQO.js → plugin-s8Ay8kKk.js} +1 -1
  22. package/dist/progress-DD964VAB.js +102 -0
  23. package/dist/progress-KvhwXZ1Q.cjs +1 -0
  24. package/dist/{report-source-B9bENO0F.js → report-source-BXHNy_AD.js} +337 -332
  25. package/dist/report-source-CCAvFE3t.cjs +1 -0
  26. package/dist/server/node.d.cts +26 -3
  27. package/dist/server/node.d.ts +26 -3
  28. package/dist/server-node.cjs +1 -1
  29. package/dist/server-node.js +125 -92
  30. package/dist/server.cjs +1 -1
  31. package/dist/server.d.cts +28 -3
  32. package/dist/server.d.ts +28 -3
  33. package/dist/server.js +172 -164
  34. package/dist/style.css +1 -1
  35. package/dist/task-events-DQ276fn2.cjs +1 -0
  36. package/dist/task-events-Dpsvf_t2.js +47 -0
  37. package/dist/vue/async.d.cts +1507 -2083
  38. package/dist/vue/async.d.ts +1507 -2083
  39. package/dist/vue/index.d.cts +2376 -3310
  40. package/dist/vue/index.d.ts +2376 -3310
  41. package/dist/vue-async.cjs +1 -1
  42. package/dist/vue-async.js +3 -3
  43. package/dist/vue.cjs +1 -1
  44. package/dist/vue.js +131 -107
  45. package/dist/worker.cjs +1 -1
  46. package/dist/worker.d.cts +26 -3
  47. package/dist/worker.d.ts +26 -3
  48. package/dist/worker.js +110 -85
  49. package/dist/xlsx.cjs +14 -14
  50. package/dist/xlsx.d.cts +11 -3
  51. package/dist/xlsx.d.ts +11 -3
  52. package/dist/xlsx.js +656 -652
  53. package/package.json +2 -2
  54. package/dist/ReportPreview-Dk-28QAi.js +0 -2946
  55. package/dist/ReportPreview-FSvcBLjH.cjs +0 -6
  56. package/dist/assets-66UBlhES.cjs +0 -1
  57. package/dist/capabilities-CNjIirfo.js +0 -36
  58. package/dist/capabilities-D4xeVYSR.cjs +0 -1
  59. package/dist/grid-geometry-BNptEcMm.js +0 -65
  60. package/dist/grid-geometry-CZ_cYB6O.cjs +0 -1
  61. package/dist/report-source-BbNkkBDy.cjs +0 -1
package/dist/designer.js CHANGED
@@ -1,8 +1,122 @@
1
- import { ref as I, computed as B, watch as $, onBeforeUnmount as ee, defineComponent as te, openBlock as g, createElementBlock as b, unref as e, createElementVNode as t, toDisplayString as o, createTextVNode as C, createCommentVNode as F, withDirectives as U, isRef as W, Fragment as L, renderList as H, vModelSelect as le, vModelText as ae, createBlock as ne } from "vue";
2
- import { provideMachReportConfig as oe, createLocalFetcher as se, ReportPreview as ie } from "@agile-team/mach-report/vue";
3
- import { parseReportTemplate as A, serializeReportTemplate as G, validateReportTemplateDocument as re, resolveGridLayout as P } from "@agile-team/mach-report";
4
- import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const ue = {
1
+ import { ref as x, computed as V, shallowRef as ce, onBeforeUnmount as ae, watch as te, defineComponent as ve, nextTick as le, openBlock as S, createElementBlock as A, unref as e, createElementVNode as n, toDisplayString as l, createTextVNode as D, createCommentVNode as H, withKeys as fe, withModifiers as he, withDirectives as Q, isRef as X, Fragment as Y, renderList as Z, vModelSelect as me, vModelText as oe, createBlock as ge } from "vue";
2
+ import { provideMachReportConfig as pe, createLocalFetcher as be, ReportPreview as ye } from "@agile-team/mach-report/vue";
3
+ import { resolveGridLayout as ee, parseReportTemplate as P, serializeReportTemplate as q, validateReportTemplateDocument as _e } from "@agile-team/mach-report";
4
+ import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ function Se(c, w, u, h) {
6
+ const f = x(0), a = x(""), b = x([]), L = V(() => c.value.template.pages.flatMap((r, i) => r.components.flatMap((s, v) => s.kind === "list" ? [{ component: s, pageIndex: i, componentIndex: v }] : []))), _ = V(() => L.value[f.value]?.component), k = V(() => {
7
+ const r = _.value;
8
+ if (!r) return [];
9
+ const i = r.columns.map((s) => s.headerStyle?.align ?? s.headerAlign ?? r.headerStyle?.align ?? r.headerAlign ?? s.style?.align ?? "center");
10
+ if (r.headerGrid && w())
11
+ for (const s of ee(r.headerGrid, r.widthMm, 100).cells)
12
+ for (let v = s.ci; v < s.ci + (s.cell.colSpan ?? 1); v++) i[v] = s.cell.style?.align ?? "left";
13
+ return i;
14
+ }), C = V(() => {
15
+ const r = a.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
16
+ return (_.value?.columns ?? []).flatMap((i, s) => {
17
+ const v = `${i.header} ${i.field}`.toLocaleLowerCase();
18
+ return r.every((y) => v.includes(y)) ? [{ column: i, index: s }] : [];
19
+ });
20
+ });
21
+ function g(r, i) {
22
+ b.value = i ? [.../* @__PURE__ */ new Set([...b.value, r])] : b.value.filter((s) => s !== r);
23
+ }
24
+ function E(r) {
25
+ for (const i of C.value) g(i.index, r);
26
+ }
27
+ function m() {
28
+ b.value = [];
29
+ }
30
+ function N(r, i, s) {
31
+ if (!u()) return;
32
+ const v = _.value?.columns[r];
33
+ v && (Object.assign(v, { [i]: i === "widthMm" ? Number(s) : s }), i === "header" && G(r, String(s)), i === "headerAlign" && j(r, s), i === "widthMm" && K(), h());
34
+ }
35
+ function K() {
36
+ const r = L.value[f.value];
37
+ if (!r) return;
38
+ const i = r.component, s = c.value.template.pages[r.pageIndex], v = i.columns.map((y) => y.widthMm);
39
+ i.headerGrid && (i.headerGrid.colWidthsMm = v), s.layout === "wide" && v.every((y) => Number.isFinite(y) && y > 0) && (i.widthMm = v.reduce((y, t) => y + t, 0), s.widthMm = Math.max(...s.components.map((y) => y.leftMm + y.widthMm)) + (s.marginRightMm ?? 0));
40
+ }
41
+ function G(r, i) {
42
+ const s = _.value;
43
+ if (!s?.headerGrid) return;
44
+ const y = ee(s.headerGrid, s.widthMm, 100).cells.filter(({ ci: t, cell: B }) => t <= r && t + (B.colSpan ?? 1) > r).slice(-1)[0];
45
+ y && (Object.assign(y.cell, { text: i, rawText: i, value: i }), s.columns.slice(y.ci, y.ci + (y.cell.colSpan ?? 1)).forEach((t) => {
46
+ t.header = i;
47
+ }));
48
+ }
49
+ function j(r, i) {
50
+ const s = _.value, v = s?.columns[r];
51
+ if (v?.headerStyle?.align !== void 0 && (v.headerStyle = { ...v.headerStyle, align: i }), !s?.headerGrid) return;
52
+ const t = ee(s.headerGrid, s.widthMm, 100).cells.filter(({ ci: B, cell: U }) => B <= r && B + (U.colSpan ?? 1) > r).slice(-1)[0];
53
+ t && (t.cell.style = { ...t.cell.style, align: i }, s.columns.slice(t.ci, t.ci + (t.cell.colSpan ?? 1)).forEach((B) => {
54
+ B.headerAlign = i, B.headerStyle?.align !== void 0 && (B.headerStyle = { ...B.headerStyle, align: i });
55
+ }));
56
+ }
57
+ function I(r, i) {
58
+ if (!(!u() || r === "headerAlign" && i === "auto")) {
59
+ for (const s of b.value) {
60
+ const v = _.value?.columns[s];
61
+ v && (Object.assign(v, { [r]: i }), r === "headerAlign" && j(s, i));
62
+ }
63
+ h();
64
+ }
65
+ }
66
+ return { selected: f, query: a, selectedColumns: b, lists: L, activeList: _, headerAlignments: k, visibleColumns: C, toggleColumn: g, selectVisible: E, clearSelection: m, setColumn: N, alignColumns: I };
67
+ }
68
+ function we(c, w = { entries: 100, bytes: 16 * 1024 * 1024 }) {
69
+ const u = x([c]), h = x(0), f = V(() => h.value > 0), a = V(() => h.value + 1 < u.value.length), b = V(() => u.value[h.value]);
70
+ function L(C) {
71
+ u.value = [C], h.value = 0;
72
+ }
73
+ function _(C) {
74
+ if (u.value[h.value] === C) return;
75
+ const g = u.value.slice(0, h.value + 1);
76
+ g.push(C);
77
+ let E = g.reduce((m, N) => m + N.length * 2, 0);
78
+ for (; g.length > 1 && (g.length > w.entries || E > w.bytes); ) E -= g.shift().length * 2;
79
+ u.value = g, h.value = u.value.length - 1;
80
+ }
81
+ function k(C) {
82
+ if (!(C < 0 ? !f.value : !a.value))
83
+ return h.value += C, u.value[h.value];
84
+ }
85
+ return { canUndo: f, canRedo: a, current: b, reset: L, record: _, move: k };
86
+ }
87
+ function ke(c) {
88
+ const w = ce(null), u = x(!1);
89
+ let h, f = 0;
90
+ function a(_) {
91
+ h?.(_), h = void 0, w.value = null;
92
+ }
93
+ function b() {
94
+ f++, a(!1), u.value = !1;
95
+ }
96
+ async function L(_) {
97
+ b();
98
+ const k = f, C = c();
99
+ u.value = !0;
100
+ try {
101
+ const g = await new Promise((E, m) => {
102
+ if (h = E, !C) {
103
+ w.value = _;
104
+ return;
105
+ }
106
+ Promise.resolve().then(() => f === k ? C(_) : !1).then((N) => {
107
+ f === k && a(N === !0);
108
+ }, (N) => {
109
+ f === k && (h = void 0, w.value = null, m(N));
110
+ });
111
+ });
112
+ return f === k && g === !0;
113
+ } finally {
114
+ f === k && (u.value = !1);
115
+ }
116
+ }
117
+ return ae(b), { confirmation: w, pending: u, decide: a, request: L, cancel: b };
118
+ }
119
+ const Ee = {
6
120
  title: "报表模板属性编辑器",
7
121
  heading: "模板属性",
8
122
  unpublished: "未发布",
@@ -35,13 +149,29 @@ const ue = {
35
149
  applyJson: "校验并应用 JSON",
36
150
  note: "字段映射应与数据源契约一致。此编辑器维护模板属性;保存由接入方提供的版本服务处理。",
37
151
  invalid: "请先修正模板错误,再预览或保存。"
38
- };
39
- function ce(r, N) {
40
- const d = I(A(r.modelValue)), S = I(G(d.value)), u = I(0), _ = I(G(d.value)), w = I(""), p = I(!1), D = B(() => ({ ...ue, ...r.messages })), k = B(() => ({
152
+ }, Me = {
153
+ undo: "撤销",
154
+ redo: "重做",
155
+ columnsSearch: "搜索列名或字段",
156
+ columnsSelected: "已选列",
157
+ selectVisible: "选择当前结果",
158
+ clearSelection: "清除选择",
159
+ noColumns: "没有匹配的列",
160
+ batchBody: "批量正文对齐",
161
+ batchHeader: "批量表头对齐",
162
+ chooseAlignment: "选择对齐方式",
163
+ discardTitle: "保留当前修改?",
164
+ discardDescription: "当前包含未保存的属性或尚未应用的 JSON,继续将丢弃这些修改。",
165
+ keepEditing: "继续编辑",
166
+ discard: "丢弃修改并继续",
167
+ jsonPending: "JSON 尚未应用。请先校验并应用,或撤销 JSON 修改后继续属性编辑与保存。"
168
+ }, Ae = { ...Ee, ...Me };
169
+ function je(c, w) {
170
+ const u = x(P(c.modelValue)), h = x(q(u.value)), f = x(q(u.value)), a = x(""), b = x(!1), L = V(() => ({ ...Ae, ...c.messages })), _ = V(() => ({
41
171
  showExport: !1,
42
172
  showPrint: !1,
43
173
  showPdfWindow: !1,
44
- ...r.preview,
174
+ ...c.preview,
45
175
  theme: {
46
176
  shellBg: "#f1f5f9",
47
177
  shellFg: "#334155",
@@ -53,122 +183,140 @@ function ce(r, N) {
53
183
  btnHoverBg: "#eff6ff",
54
184
  btnHoverFg: "#1d4ed8",
55
185
  btnActiveBg: "#2563eb",
56
- ...r.preview?.theme
186
+ ...c.preview?.theme
57
187
  }
58
188
  }));
59
- oe({ get defaults() {
60
- return k.value;
189
+ pe({ get defaults() {
190
+ return _.value;
61
191
  } });
62
- let j, M = 0;
63
- const T = B(() => re(d.value)), J = B(() => {
192
+ let k, C = 0;
193
+ const g = V(() => _e(u.value)), E = V(() => {
64
194
  try {
65
- return G(d.value) !== S.value;
195
+ return q(u.value) !== h.value;
66
196
  } catch {
67
197
  return !0;
68
198
  }
69
- }), x = B(() => d.value.template.pages.flatMap((a, s) => a.components.flatMap((n, v) => n.kind === "list" ? [{ component: n, pageIndex: s, componentIndex: v }] : []))), l = B(() => x.value[u.value]?.component), E = B(() => {
70
- const a = l.value;
71
- if (!a) return [];
72
- const s = a.columns.map((n) => n.headerStyle?.align ?? n.headerAlign ?? a.headerStyle?.align ?? a.headerAlign ?? n.style?.align ?? "center");
73
- if (a.headerGrid && T.value.ok)
74
- for (const n of P(a.headerGrid, a.widthMm, 100).cells)
75
- for (let v = n.ci; v < n.ci + (n.cell.colSpan ?? 1); v++) s[v] = n.cell.style?.align ?? "left";
76
- return s;
77
- }), O = B(() => T.value.ok ? se({ draft: { template: d.value.template, datasets: r.datasets ?? {}, params: [] } }) : void 0);
78
- function R() {
79
- M++, j?.abort(), j = void 0, p.value = !1;
199
+ }), m = x(f.value), N = V(() => f.value !== m.value), K = V(() => E.value || f.value !== m.value), G = () => JSON.stringify({ document: u.value, json: f.value, appliedJson: m.value }), j = we(G()), I = ke(() => c.beforeDiscard), r = V(() => b.value || I.pending.value), i = () => !c.readonly && !r.value && !N.value, s = Se(u, () => g.value.ok, i, o), { selected: v, lists: y, activeList: t, headerAlignments: B, setColumn: U } = s;
200
+ te(v, () => s.clearSelection());
201
+ const F = V(() => g.value.ok ? be({ draft: { template: u.value.template, datasets: c.datasets ?? {}, params: [] } }) : void 0);
202
+ function z() {
203
+ C++, k?.abort(), k = void 0, b.value = !1;
80
204
  }
81
- $(() => r.modelValue, (a) => {
82
- const s = A(a);
205
+ let W = 0;
206
+ async function J(p = "replace", O) {
207
+ if (!K.value) return !0;
208
+ const M = G();
83
209
  try {
84
- if (G(s) === G(d.value)) return;
85
- } catch {
210
+ return await I.request({
211
+ reason: p,
212
+ document: JSON.parse(JSON.stringify(u.value)),
213
+ replacement: O ? P(O) : void 0,
214
+ pendingLocalChanges: !0
215
+ }) && M === G();
216
+ } catch ($) {
217
+ return a.value = $ instanceof Error ? $.message : String($), !1;
86
218
  }
87
- R(), d.value = s, S.value = G(s), _.value = S.value, w.value = "", u.value = 0;
88
- }), ee(R);
89
- function c() {
90
- w.value = "", T.value.ok && (_.value = G(d.value), N("update:modelValue", A(d.value)));
91
219
  }
92
- function i(a) {
93
- r.readonly || p.value || (d.value.name = a, c());
220
+ function d(p) {
221
+ z(), u.value = p, h.value = q(p), f.value = h.value, m.value = f.value, a.value = "", v.value = 0, s.clearSelection(), j.reset(G());
94
222
  }
95
- function f(a) {
96
- r.readonly || p.value || (d.value.description = a, c());
97
- }
98
- function m(a, s, n) {
99
- if (r.readonly || p.value) return;
100
- const v = l.value?.columns[a];
101
- v && (Object.assign(v, { [s]: s === "widthMm" ? Number(n) : n }), s === "header" && q(a, String(n)), s === "headerAlign" && K(a, n), s === "widthMm" && z(), c());
102
- }
103
- function z() {
104
- const a = x.value[u.value];
105
- if (!a) return;
106
- const s = a.component, n = d.value.template.pages[a.pageIndex], v = s.columns.map((h) => h.widthMm);
107
- s.headerGrid && (s.headerGrid.colWidthsMm = v), n.layout === "wide" && v.every((h) => Number.isFinite(h) && h > 0) && (s.widthMm = v.reduce((h, y) => h + y, 0), n.widthMm = Math.max(...n.components.map((h) => h.leftMm + h.widthMm)) + (n.marginRightMm ?? 0));
223
+ te(() => c.modelValue, async (p) => {
224
+ let O;
225
+ try {
226
+ O = P(p);
227
+ } catch ($) {
228
+ a.value = $ instanceof Error ? $.message : String($);
229
+ return;
230
+ }
231
+ try {
232
+ if (q(O) === q(u.value)) return;
233
+ } catch {
234
+ }
235
+ const M = ++W;
236
+ if (z(), !await J("replace", O)) {
237
+ M === W && g.value.ok && w("update:modelValue", P(u.value));
238
+ return;
239
+ }
240
+ M === W && d(O);
241
+ }), ae(() => {
242
+ W++, z();
243
+ });
244
+ function o() {
245
+ I.cancel(), a.value = "", g.value.ok && (f.value = q(u.value), m.value = f.value, w("update:modelValue", P(u.value))), j.record(G());
108
246
  }
109
- function q(a, s) {
110
- const n = l.value;
111
- if (!n?.headerGrid) return;
112
- const h = P(n.headerGrid, n.widthMm, 100).cells.filter(({ ci: y, cell: V }) => y <= a && y + (V.colSpan ?? 1) > a).slice(-1)[0];
113
- h && (Object.assign(h.cell, { text: s, rawText: s, value: s }), n.columns.slice(h.ci, h.ci + (h.cell.colSpan ?? 1)).forEach((y) => {
114
- y.header = s;
115
- }));
247
+ function T(p) {
248
+ i() && (u.value.name = p, o());
116
249
  }
117
- function K(a, s) {
118
- const n = l.value, v = n?.columns[a];
119
- if (v?.headerStyle?.align !== void 0 && (v.headerStyle = { ...v.headerStyle, align: s }), !n?.headerGrid) return;
120
- const y = P(n.headerGrid, n.widthMm, 100).cells.filter(({ ci: V, cell: Z }) => V <= a && V + (Z.colSpan ?? 1) > a).slice(-1)[0];
121
- y && (y.cell.style = { ...y.cell.style, align: s }, n.columns.slice(y.ci, y.ci + (y.cell.colSpan ?? 1)).forEach((V) => {
122
- V.headerAlign = s, V.headerStyle?.align !== void 0 && (V.headerStyle = { ...V.headerStyle, align: s });
123
- }));
250
+ function R(p) {
251
+ i() && (u.value.description = p, o());
124
252
  }
125
- function Q() {
126
- if (!(r.readonly || p.value))
253
+ function se() {
254
+ if (!(c.readonly || r.value))
127
255
  try {
128
- const a = A(_.value);
129
- if (a.id !== d.value.id) throw new Error("属性编辑不允许更换模板 ID,请另存为新模板");
130
- if (a.revision !== d.value.revision) throw new Error("修订号由保存服务管理,不能在 JSON 中修改");
131
- d.value = a, u.value = 0, c();
132
- } catch (a) {
133
- w.value = a instanceof Error ? a.message : String(a);
256
+ const p = P(f.value);
257
+ if (p.id !== u.value.id) throw new Error("属性编辑不允许更换模板 ID,请另存为新模板");
258
+ if (p.revision !== u.value.revision) throw new Error("修订号由保存服务管理,不能在 JSON 中修改");
259
+ u.value = p, v.value = 0, s.clearSelection(), o();
260
+ } catch (p) {
261
+ a.value = p instanceof Error ? p.message : String(p);
134
262
  }
135
263
  }
136
- function X() {
137
- p.value || r.readonly || (d.value = A(S.value), _.value = S.value, w.value = "", N("update:modelValue", A(d.value)));
264
+ async function ie() {
265
+ r.value || c.readonly || !await J("reset") || (d(P(h.value)), w("update:modelValue", P(u.value)));
266
+ }
267
+ function ne(p) {
268
+ if (r.value || c.readonly) return;
269
+ j.record(G());
270
+ const O = j.move(p);
271
+ if (!O) return;
272
+ I.cancel();
273
+ const M = JSON.parse(O);
274
+ u.value = M.document, f.value = M.json, m.value = M.appliedJson, a.value = "", v.value = 0, s.clearSelection(), g.value.ok && w("update:modelValue", P(u.value));
138
275
  }
139
- async function Y() {
140
- if (!r.save || r.readonly || p.value || !T.value.ok) return;
141
- const a = ++M;
142
- j = new AbortController(), p.value = !0, w.value = "";
143
- const s = A(d.value);
276
+ async function re() {
277
+ if (!c.save || !i() || !g.value.ok) return;
278
+ const p = ++C;
279
+ k = new AbortController(), b.value = !0, a.value = "";
280
+ const O = P(u.value);
144
281
  try {
145
- const n = A(await r.save(s, { expectedRevision: s.revision, signal: j.signal }));
146
- if (a !== M) return;
147
- if (n.id !== s.id) throw new Error("保存服务返回了其他模板的文档");
148
- d.value = n, S.value = G(n), _.value = S.value, N("saved", A(n)), N("update:modelValue", A(n));
149
- } catch (n) {
150
- a === M && (w.value = n instanceof Error ? n.message : String(n));
282
+ const M = P(await c.save(O, { expectedRevision: O.revision, signal: k.signal }));
283
+ if (p !== C) return;
284
+ if (M.id !== O.id) throw new Error("保存服务返回了其他模板的文档");
285
+ u.value = M, h.value = q(M), f.value = h.value, m.value = f.value, j.reset(G()), w("saved", P(M)), w("update:modelValue", P(M));
286
+ } catch (M) {
287
+ p === C && (a.value = M instanceof Error ? M.message : String(M));
151
288
  } finally {
152
- a === M && (p.value = !1, j = void 0);
289
+ p === C && (b.value = !1, k = void 0);
153
290
  }
154
291
  }
155
- return { draft: d, json: _, selected: u, error: w, saving: p, dirty: J, validation: T, lists: x, activeList: l, headerAlignments: E, previewOptions: k, fetcher: O, messages: D, setName: i, setDescription: f, setColumn: m, applyJson: Q, reset: X, save: Y };
292
+ const ue = V(() => j.canUndo.value || G() !== j.current.value), de = V(() => j.canRedo.value && G() === j.current.value);
293
+ return { ...s, canUndo: ue, canRedo: de, undo: () => ne(-1), redo: () => ne(1), pendingLocalChanges: K, jsonPending: N, blocked: r, confirmation: I.confirmation, decideDiscard: I.decide, guardChanges: J, draft: u, json: f, selected: v, error: a, saving: b, dirty: E, validation: g, lists: y, activeList: t, headerAlignments: B, previewOptions: _, fetcher: F, messages: L, setName: T, setDescription: R, setColumn: U, applyJson: se, reset: ie, save: re };
156
294
  }
157
- const ve = ["aria-label"], he = { class: "mr-designer-bar" }, fe = { key: 0 }, me = ["disabled"], ge = ["disabled"], pe = { class: "mr-designer-body" }, be = { class: "mr-designer-panel" }, ye = ["value", "disabled"], _e = ["value", "disabled"], we = { key: 0 }, ke = ["value"], Ce = {
295
+ const Te = ["aria-label"], Re = { class: "mr-designer-bar" }, Ve = { key: 0 }, De = ["disabled"], Be = ["disabled"], Je = ["disabled"], Oe = ["disabled"], Le = ["aria-label"], Ne = { class: "mr-designer-body" }, Ge = { class: "mr-designer-panel" }, Pe = ["value", "disabled"], xe = ["value", "disabled"], Ie = { key: 0 }, Fe = ["value"], He = {
158
296
  key: 1,
159
297
  class: "mr-designer-columns"
160
- }, Se = ["disabled"], Me = ["value", "onInput"], Ee = ["value", "onChange"], Ae = ["value", "onChange"], je = ["value", "onChange"], Re = { value: "identifier" }, Ve = { value: "dimension" }, Te = { value: "measure" }, Be = { value: "date" }, Ge = { value: "text" }, Ne = ["value", "onChange"], xe = { value: "auto" }, Ie = { value: "left" }, Fe = { value: "center" }, Je = { value: "right" }, De = { value: "justify" }, Oe = ["value", "onChange"], Le = { value: "left" }, He = { value: "center" }, Pe = { value: "right" }, Ue = { value: "justify" }, We = { class: "mr-designer-toggle" }, ze = ["checked", "onChange"], qe = ["aria-label", "disabled"], Ke = ["disabled"], Qe = { class: "mr-designer-note" }, Xe = { class: "mr-designer-preview" }, Ye = {
298
+ }, Ue = { class: "mr-designer-column-tools" }, $e = ["disabled"], qe = ["disabled"], We = { role: "status" }, Ke = {
299
+ key: 0,
300
+ class: "mr-designer-batch"
301
+ }, ze = ["aria-label", "disabled"], Qe = { value: "" }, Xe = { value: "auto" }, Ye = { value: "left" }, Ze = { value: "center" }, et = { value: "right" }, tt = { value: "justify" }, nt = ["aria-label", "disabled"], lt = { value: "" }, ot = { value: "left" }, at = { value: "center" }, st = { value: "right" }, it = { value: "justify" }, rt = {
302
+ key: 1,
303
+ role: "status"
304
+ }, ut = ["disabled"], dt = { class: "mr-designer-select-column" }, ct = ["checked", "onChange"], vt = ["value", "onInput"], ft = ["value", "onChange"], ht = ["value", "onChange"], mt = ["value", "onChange"], gt = { value: "identifier" }, pt = { value: "dimension" }, bt = { value: "measure" }, yt = { value: "date" }, _t = { value: "text" }, Ct = ["value", "onChange"], St = { value: "auto" }, wt = { value: "left" }, kt = { value: "center" }, Et = { value: "right" }, Mt = { value: "justify" }, At = ["value", "onChange"], jt = { value: "left" }, Tt = { value: "center" }, Rt = { value: "right" }, Vt = { value: "justify" }, Dt = { class: "mr-designer-toggle" }, Bt = ["checked", "onChange"], Jt = ["aria-label", "disabled"], Ot = ["disabled"], Lt = {
305
+ key: 2,
306
+ role: "status",
307
+ class: "mr-designer-note"
308
+ }, Nt = { class: "mr-designer-note" }, Gt = { class: "mr-designer-preview" }, Pt = {
161
309
  key: 0,
162
310
  role: "alert",
163
311
  class: "mr-designer-error"
164
- }, Ze = {
312
+ }, xt = {
165
313
  key: 1,
166
314
  role: "alert",
167
315
  class: "mr-designer-error"
168
- }, $e = {
316
+ }, It = {
169
317
  key: 3,
170
318
  class: "mr-designer-note"
171
- }, et = /* @__PURE__ */ te({
319
+ }, Ft = /* @__PURE__ */ ve({
172
320
  __name: "ReportTemplateEditor",
173
321
  props: {
174
322
  modelValue: {},
@@ -176,197 +324,305 @@ const ve = ["aria-label"], he = { class: "mr-designer-bar" }, fe = { key: 0 }, m
176
324
  readonly: { type: Boolean },
177
325
  messages: {},
178
326
  preview: {},
327
+ beforeDiscard: { type: Function },
179
328
  save: { type: Function }
180
329
  },
181
330
  emits: ["update:modelValue", "saved"],
182
- setup(r, { emit: N }) {
183
- const d = r, S = N, u = ce(d, (R, c) => {
184
- S(R === "saved" ? "saved" : "update:modelValue", c);
185
- }), { draft: _, json: w, selected: p, error: D, saving: k, dirty: j, validation: M, lists: T, activeList: J, fetcher: x, messages: l } = u;
186
- function E(R) {
187
- return R.target.value;
331
+ setup(c, { expose: w, emit: u }) {
332
+ const h = c, f = u, a = je(h, (J, d) => {
333
+ f(J === "saved" ? "saved" : "update:modelValue", d);
334
+ }), { draft: b, json: L, selected: _, error: k, saving: C, pendingLocalChanges: g, jsonPending: E, blocked: m, confirmation: N, canUndo: K, canRedo: G, validation: j, lists: I, activeList: r, visibleColumns: i, query: s, selectedColumns: v, fetcher: y, messages: t } = a, B = x(null);
335
+ let U = null;
336
+ te(N, async (J) => {
337
+ J ? (U = document.activeElement, await le(), B.value?.focus()) : (await le(), U?.isConnected && U.focus(), U = null);
338
+ }), w({ get pendingLocalChanges() {
339
+ return g.value;
340
+ }, guardChanges: a.guardChanges, reset: a.reset, save: a.save });
341
+ function F(J) {
342
+ return J.target.value;
188
343
  }
189
- function O(R) {
190
- return R.target.checked;
344
+ function z(J) {
345
+ return J.target.checked;
191
346
  }
192
- return (R, c) => (g(), b("section", {
347
+ function W(J, d) {
348
+ const o = J.target;
349
+ a.alignColumns(d, o.value), o.value = "";
350
+ }
351
+ return (J, d) => (S(), A("section", {
193
352
  class: "mr-designer",
194
- "aria-label": e(l).title
353
+ "aria-label": e(t).title
195
354
  }, [
196
- t("header", he, [
197
- t("div", null, [
198
- t("strong", null, o(e(l).heading), 1),
199
- t("span", null, [
200
- C(o(e(_).id) + " · " + o(e(_).revision || e(l).unpublished), 1),
201
- e(j) ? (g(), b("b", fe, " · " + o(e(l).dirty), 1)) : F("", !0)
355
+ n("header", Re, [
356
+ n("div", null, [
357
+ n("strong", null, l(e(t).heading), 1),
358
+ n("span", null, [
359
+ D(l(e(b).id) + " · " + l(e(b).revision || e(t).unpublished), 1),
360
+ e(g) ? (S(), A("b", Ve, " · " + l(e(t).dirty), 1)) : H("", !0)
202
361
  ])
203
362
  ]),
204
- t("div", null, [
205
- t("button", {
363
+ n("div", null, [
364
+ n("button", {
365
+ type: "button",
366
+ disabled: c.readonly || e(m) || !e(K),
367
+ onClick: d[0] || (d[0] = //@ts-ignore
368
+ (...o) => e(a).undo && e(a).undo(...o))
369
+ }, l(e(t).undo), 9, De),
370
+ n("button", {
206
371
  type: "button",
207
- disabled: r.readonly || e(k) || !e(j),
208
- onClick: c[0] || (c[0] = //@ts-ignore
209
- (...i) => e(u).reset && e(u).reset(...i))
210
- }, o(e(l).reset), 9, me),
211
- r.save ? (g(), b("button", {
372
+ disabled: c.readonly || e(m) || !e(G),
373
+ onClick: d[1] || (d[1] = //@ts-ignore
374
+ (...o) => e(a).redo && e(a).redo(...o))
375
+ }, l(e(t).redo), 9, Be),
376
+ n("button", {
377
+ type: "button",
378
+ disabled: c.readonly || e(m) || !e(g),
379
+ onClick: d[2] || (d[2] = //@ts-ignore
380
+ (...o) => e(a).reset && e(a).reset(...o))
381
+ }, l(e(t).reset), 9, Je),
382
+ c.save ? (S(), A("button", {
212
383
  key: 0,
213
384
  type: "button",
214
- disabled: r.readonly || e(k) || !e(M).ok || !e(j),
215
- onClick: c[1] || (c[1] = //@ts-ignore
216
- (...i) => e(u).save && e(u).save(...i))
217
- }, o(e(k) ? e(l).saving : e(l).save), 9, ge)) : F("", !0)
385
+ disabled: c.readonly || e(m) || e(E) || !e(j).ok || !e(g),
386
+ onClick: d[3] || (d[3] = //@ts-ignore
387
+ (...o) => e(a).save && e(a).save(...o))
388
+ }, l(e(C) ? e(t).saving : e(t).save), 9, Oe)) : H("", !0)
218
389
  ])
219
390
  ]),
220
- t("div", pe, [
221
- t("aside", be, [
222
- t("label", null, [
223
- C(o(e(l).name), 1),
224
- t("input", {
225
- value: e(_).name,
226
- disabled: r.readonly || e(k),
227
- onInput: c[2] || (c[2] = (i) => e(u).setName(E(i)))
228
- }, null, 40, ye)
391
+ e(N) ? (S(), A("div", {
392
+ key: 0,
393
+ role: "alertdialog",
394
+ "aria-label": e(t).discardTitle,
395
+ class: "mr-designer-confirm",
396
+ onKeydown: d[6] || (d[6] = fe(he((o) => e(a).decideDiscard(!1), ["prevent"]), ["esc"]))
397
+ }, [
398
+ n("strong", null, l(e(t).discardTitle), 1),
399
+ n("p", null, l(e(t).discardDescription), 1),
400
+ n("button", {
401
+ ref_key: "keepButton",
402
+ ref: B,
403
+ type: "button",
404
+ onClick: d[4] || (d[4] = (o) => e(a).decideDiscard(!1))
405
+ }, l(e(t).keepEditing), 513),
406
+ n("button", {
407
+ type: "button",
408
+ onClick: d[5] || (d[5] = (o) => e(a).decideDiscard(!0))
409
+ }, l(e(t).discard), 1)
410
+ ], 40, Le)) : H("", !0),
411
+ n("div", Ne, [
412
+ n("aside", Ge, [
413
+ n("label", null, [
414
+ D(l(e(t).name), 1),
415
+ n("input", {
416
+ value: e(b).name,
417
+ disabled: c.readonly || e(m) || e(E),
418
+ onInput: d[7] || (d[7] = (o) => e(a).setName(F(o)))
419
+ }, null, 40, Pe)
229
420
  ]),
230
- t("label", null, [
231
- C(o(e(l).description), 1),
232
- t("textarea", {
233
- value: e(_).description,
234
- disabled: r.readonly || e(k),
235
- onInput: c[3] || (c[3] = (i) => e(u).setDescription(E(i)))
236
- }, null, 40, _e)
421
+ n("label", null, [
422
+ D(l(e(t).description), 1),
423
+ n("textarea", {
424
+ value: e(b).description,
425
+ disabled: c.readonly || e(m) || e(E),
426
+ onInput: d[8] || (d[8] = (o) => e(a).setDescription(F(o)))
427
+ }, null, 40, xe)
237
428
  ]),
238
- e(T).length ? (g(), b("label", we, [
239
- C(o(e(l).area), 1),
240
- U(t("select", {
241
- "onUpdate:modelValue": c[4] || (c[4] = (i) => W(p) ? p.value = i : null)
429
+ e(I).length ? (S(), A("label", Ie, [
430
+ D(l(e(t).area), 1),
431
+ Q(n("select", {
432
+ "onUpdate:modelValue": d[9] || (d[9] = (o) => X(_) ? _.value = o : null)
242
433
  }, [
243
- (g(!0), b(L, null, H(e(T), (i, f) => (g(), b("option", {
244
- key: f,
245
- value: f
246
- }, o(i.pageIndex + 1) + " " + o(e(l).page) + " · " + o(i.component.title || i.component.dataset), 9, ke))), 128))
434
+ (S(!0), A(Y, null, Z(e(I), (o, T) => (S(), A("option", {
435
+ key: T,
436
+ value: T
437
+ }, l(o.pageIndex + 1) + " " + l(e(t).page) + " · " + l(o.component.title || o.component.dataset), 9, Fe))), 128))
247
438
  ], 512), [
248
- [le, e(p)]
439
+ [me, e(_)]
249
440
  ])
250
- ])) : F("", !0),
251
- e(J) ? (g(), b("div", Ce, [
252
- (g(!0), b(L, null, H(e(J).columns, (i, f) => (g(), b("fieldset", {
253
- key: f,
254
- disabled: r.readonly || e(k)
441
+ ])) : H("", !0),
442
+ e(r) ? (S(), A("div", He, [
443
+ n("label", null, [
444
+ D(l(e(t).columnsSearch), 1),
445
+ Q(n("input", {
446
+ "onUpdate:modelValue": d[10] || (d[10] = (o) => X(s) ? s.value = o : null),
447
+ type: "search"
448
+ }, null, 512), [
449
+ [oe, e(s)]
450
+ ])
451
+ ]),
452
+ n("div", Ue, [
453
+ n("button", {
454
+ type: "button",
455
+ disabled: c.readonly || e(m) || e(E) || !e(i).length,
456
+ onClick: d[11] || (d[11] = (o) => e(a).selectVisible(!0))
457
+ }, l(e(t).selectVisible), 9, $e),
458
+ n("button", {
459
+ type: "button",
460
+ disabled: !e(v).length,
461
+ onClick: d[12] || (d[12] = //@ts-ignore
462
+ (...o) => e(a).clearSelection && e(a).clearSelection(...o))
463
+ }, l(e(t).clearSelection), 9, qe),
464
+ n("span", We, l(e(t).columnsSelected) + " " + l(e(v).length) + " / " + l(e(r).columns.length), 1)
465
+ ]),
466
+ e(v).length ? (S(), A("div", Ke, [
467
+ n("label", null, [
468
+ D(l(e(t).batchBody), 1),
469
+ n("select", {
470
+ "aria-label": e(t).batchBody,
471
+ disabled: c.readonly || e(m) || e(E),
472
+ onChange: d[13] || (d[13] = (o) => W(o, "align"))
473
+ }, [
474
+ n("option", Qe, l(e(t).chooseAlignment), 1),
475
+ n("option", Xe, l(e(t).auto), 1),
476
+ n("option", Ye, l(e(t).left), 1),
477
+ n("option", Ze, l(e(t).center), 1),
478
+ n("option", et, l(e(t).right), 1),
479
+ n("option", tt, l(e(t).justify), 1)
480
+ ], 40, ze)
481
+ ]),
482
+ n("label", null, [
483
+ D(l(e(t).batchHeader), 1),
484
+ n("select", {
485
+ "aria-label": e(t).batchHeader,
486
+ disabled: c.readonly || e(m) || e(E),
487
+ onChange: d[14] || (d[14] = (o) => W(o, "headerAlign"))
488
+ }, [
489
+ n("option", lt, l(e(t).chooseAlignment), 1),
490
+ n("option", ot, l(e(t).left), 1),
491
+ n("option", at, l(e(t).center), 1),
492
+ n("option", st, l(e(t).right), 1),
493
+ n("option", it, l(e(t).justify), 1)
494
+ ], 40, nt)
495
+ ])
496
+ ])) : H("", !0),
497
+ e(i).length ? H("", !0) : (S(), A("p", rt, l(e(t).noColumns), 1)),
498
+ (S(!0), A(Y, null, Z(e(i), ({ column: o, index: T }) => (S(), A("fieldset", {
499
+ key: T,
500
+ disabled: c.readonly || e(m) || e(E)
255
501
  }, [
256
- t("legend", null, o(f + 1) + " · " + o(i.header), 1),
257
- t("label", null, [
258
- C(o(e(l).header), 1),
259
- t("input", {
260
- value: i.header,
261
- onInput: (m) => e(u).setColumn(f, "header", E(m))
262
- }, null, 40, Me)
502
+ n("legend", null, [
503
+ n("label", dt, [
504
+ n("input", {
505
+ type: "checkbox",
506
+ checked: e(v).includes(T),
507
+ onChange: (R) => e(a).toggleColumn(T, z(R))
508
+ }, null, 40, ct),
509
+ D(l(T + 1) + " · " + l(o.header), 1)
510
+ ])
511
+ ]),
512
+ n("label", null, [
513
+ D(l(e(t).header), 1),
514
+ n("input", {
515
+ value: o.header,
516
+ onInput: (R) => e(a).setColumn(T, "header", F(R))
517
+ }, null, 40, vt)
263
518
  ]),
264
- t("label", null, [
265
- C(o(e(l).field), 1),
266
- t("input", {
267
- value: i.field,
268
- onChange: (m) => e(u).setColumn(f, "field", E(m))
269
- }, null, 40, Ee)
519
+ n("label", null, [
520
+ D(l(e(t).field), 1),
521
+ n("input", {
522
+ value: o.field,
523
+ onChange: (R) => e(a).setColumn(T, "field", F(R))
524
+ }, null, 40, ft)
270
525
  ]),
271
- t("label", null, [
272
- C(o(e(l).width), 1),
273
- t("input", {
526
+ n("label", null, [
527
+ D(l(e(t).width), 1),
528
+ n("input", {
274
529
  type: "number",
275
530
  min: "0.1",
276
531
  step: "0.5",
277
- value: i.widthMm,
278
- onChange: (m) => e(u).setColumn(f, "widthMm", E(m))
279
- }, null, 40, Ae)
532
+ value: o.widthMm,
533
+ onChange: (R) => e(a).setColumn(T, "widthMm", F(R))
534
+ }, null, 40, ht)
280
535
  ]),
281
- t("label", null, [
282
- C(o(e(l).semantic), 1),
283
- t("select", {
284
- value: i.semanticRole || "text",
285
- onChange: (m) => e(u).setColumn(f, "semanticRole", E(m))
536
+ n("label", null, [
537
+ D(l(e(t).semantic), 1),
538
+ n("select", {
539
+ value: o.semanticRole || "text",
540
+ onChange: (R) => e(a).setColumn(T, "semanticRole", F(R))
286
541
  }, [
287
- t("option", Re, o(e(l).identifier), 1),
288
- t("option", Ve, o(e(l).dimension), 1),
289
- t("option", Te, o(e(l).measure), 1),
290
- t("option", Be, o(e(l).date), 1),
291
- t("option", Ge, o(e(l).text), 1)
292
- ], 40, je)
542
+ n("option", gt, l(e(t).identifier), 1),
543
+ n("option", pt, l(e(t).dimension), 1),
544
+ n("option", bt, l(e(t).measure), 1),
545
+ n("option", yt, l(e(t).date), 1),
546
+ n("option", _t, l(e(t).text), 1)
547
+ ], 40, mt)
293
548
  ]),
294
- t("label", null, [
295
- C(o(e(l).bodyAlign), 1),
296
- t("select", {
297
- value: i.align ?? i.style?.align ?? e(J).align ?? "left",
298
- onChange: (m) => e(u).setColumn(f, "align", E(m))
549
+ n("label", null, [
550
+ D(l(e(t).bodyAlign), 1),
551
+ n("select", {
552
+ value: o.align ?? o.style?.align ?? e(r).align ?? "left",
553
+ onChange: (R) => e(a).setColumn(T, "align", F(R))
299
554
  }, [
300
- t("option", xe, o(e(l).auto), 1),
301
- t("option", Ie, o(e(l).left), 1),
302
- t("option", Fe, o(e(l).center), 1),
303
- t("option", Je, o(e(l).right), 1),
304
- t("option", De, o(e(l).justify), 1)
305
- ], 40, Ne)
555
+ n("option", St, l(e(t).auto), 1),
556
+ n("option", wt, l(e(t).left), 1),
557
+ n("option", kt, l(e(t).center), 1),
558
+ n("option", Et, l(e(t).right), 1),
559
+ n("option", Mt, l(e(t).justify), 1)
560
+ ], 40, Ct)
306
561
  ]),
307
- t("label", null, [
308
- C(o(e(l).headerAlign), 1),
309
- t("select", {
310
- value: e(u).headerAlignments.value[f],
311
- onChange: (m) => e(u).setColumn(f, "headerAlign", E(m))
562
+ n("label", null, [
563
+ D(l(e(t).headerAlign), 1),
564
+ n("select", {
565
+ value: e(a).headerAlignments.value[T],
566
+ onChange: (R) => e(a).setColumn(T, "headerAlign", F(R))
312
567
  }, [
313
- t("option", Le, o(e(l).left), 1),
314
- t("option", He, o(e(l).center), 1),
315
- t("option", Pe, o(e(l).right), 1),
316
- t("option", Ue, o(e(l).justify), 1)
317
- ], 40, Oe)
568
+ n("option", jt, l(e(t).left), 1),
569
+ n("option", Tt, l(e(t).center), 1),
570
+ n("option", Rt, l(e(t).right), 1),
571
+ n("option", Vt, l(e(t).justify), 1)
572
+ ], 40, At)
318
573
  ]),
319
- t("label", We, [
320
- C(o(e(l).editable), 1),
321
- t("input", {
574
+ n("label", Dt, [
575
+ D(l(e(t).editable), 1),
576
+ n("input", {
322
577
  type: "checkbox",
323
- checked: i.editable === !0,
324
- onChange: (m) => e(u).setColumn(f, "editable", O(m))
325
- }, null, 40, ze)
578
+ checked: o.editable === !0,
579
+ onChange: (R) => e(a).setColumn(T, "editable", z(R))
580
+ }, null, 40, Bt)
326
581
  ])
327
- ], 8, Se))), 128))
328
- ])) : F("", !0),
329
- t("details", null, [
330
- t("summary", null, o(e(l).json), 1),
331
- U(t("textarea", {
332
- "onUpdate:modelValue": c[5] || (c[5] = (i) => W(w) ? w.value = i : null),
582
+ ], 8, ut))), 128))
583
+ ])) : H("", !0),
584
+ n("details", null, [
585
+ n("summary", null, l(e(t).json), 1),
586
+ Q(n("textarea", {
587
+ "onUpdate:modelValue": d[15] || (d[15] = (o) => X(L) ? L.value = o : null),
333
588
  class: "mr-designer-json",
334
- "aria-label": e(l).json,
335
- disabled: r.readonly || e(k),
589
+ "aria-label": e(t).json,
590
+ disabled: c.readonly || e(m),
336
591
  spellcheck: "false"
337
- }, null, 8, qe), [
338
- [ae, e(w)]
592
+ }, null, 8, Jt), [
593
+ [oe, e(L)]
339
594
  ]),
340
- t("button", {
595
+ n("button", {
341
596
  type: "button",
342
- disabled: r.readonly || e(k),
343
- onClick: c[6] || (c[6] = //@ts-ignore
344
- (...i) => e(u).applyJson && e(u).applyJson(...i))
345
- }, o(e(l).applyJson), 9, Ke)
597
+ disabled: c.readonly || e(m),
598
+ onClick: d[16] || (d[16] = //@ts-ignore
599
+ (...o) => e(a).applyJson && e(a).applyJson(...o))
600
+ }, l(e(t).applyJson), 9, Ot)
346
601
  ]),
347
- t("p", Qe, o(e(l).note), 1)
602
+ e(E) ? (S(), A("p", Lt, l(e(t).jsonPending), 1)) : H("", !0),
603
+ n("p", Nt, l(e(t).note), 1)
348
604
  ]),
349
- t("div", Xe, [
350
- e(D) ? (g(), b("div", Ye, o(e(D)), 1)) : F("", !0),
351
- e(M).ok ? F("", !0) : (g(), b("ul", Ze, [
352
- (g(!0), b(L, null, H(e(M).errors, (i) => (g(), b("li", {
353
- key: i.path
354
- }, o(i.path) + ":" + o(i.message), 1))), 128))
605
+ n("div", Gt, [
606
+ e(k) ? (S(), A("div", Pt, l(e(k)), 1)) : H("", !0),
607
+ e(j).ok ? H("", !0) : (S(), A("ul", xt, [
608
+ (S(!0), A(Y, null, Z(e(j).errors, (o) => (S(), A("li", {
609
+ key: o.path
610
+ }, l(o.path) + ":" + l(o.message), 1))), 128))
355
611
  ])),
356
- e(x) && e(M).ok ? (g(), ne(e(ie), {
612
+ e(y) && e(j).ok ? (S(), ge(e(ye), {
357
613
  key: 2,
358
614
  "report-id": "draft",
359
- fetcher: e(x),
615
+ fetcher: e(y),
360
616
  "show-params": !1,
361
617
  editable: !1,
362
618
  "excel-import": !1
363
- }, null, 8, ["fetcher"])) : (g(), b("p", $e, o(e(l).invalid), 1))
619
+ }, null, 8, ["fetcher"])) : (S(), A("p", It, l(e(t).invalid), 1))
364
620
  ])
365
621
  ])
366
- ], 8, ve));
622
+ ], 8, Te));
367
623
  }
368
- }), ot = /* @__PURE__ */ de(et, [["__scopeId", "data-v-5c39594b"]]);
624
+ }), Wt = /* @__PURE__ */ Ce(Ft, [["__scopeId", "data-v-e2d0e1d5"]]);
369
625
  export {
370
- ot as ReportTemplateEditor,
371
- ue as TEMPLATE_EDITOR_MESSAGES
626
+ Wt as ReportTemplateEditor,
627
+ Ae as TEMPLATE_EDITOR_MESSAGES
372
628
  };