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