@agile-team/mach-report 2.16.0 → 2.17.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 +10 -6
- package/dist/{ExcelBindingWizard-CP6h2x1f.cjs → ExcelBindingWizard-Bq6FYME6.cjs} +1 -1
- package/dist/{ExcelBindingWizard-HhB3hAJE.js → ExcelBindingWizard-Co1svTsw.js} +3 -3
- package/dist/{ParamEditor-CUQLgoxa.cjs → ParamEditor-B5UZRgxv.cjs} +1 -1
- package/dist/{ParamEditor-OKesP_nO.js → ParamEditor-DNNARyeB.js} +1 -1
- package/dist/{ReportBatchPanel-cZCAMAwH.cjs → ReportBatchPanel-Ctvs2t_9.cjs} +1 -1
- package/dist/{ReportBatchPanel-ruxcbfY6.js → ReportBatchPanel-uQh06usx.js} +1 -1
- package/dist/ReportPreview-BdQawRh0.js +4879 -0
- package/dist/ReportPreview-CJC_-j2I.cjs +6 -0
- package/dist/{ReportTemplateLibrary-BDlNT8JN.cjs → ReportTemplateLibrary-CnP7_1pH.cjs} +1 -1
- package/dist/{ReportTemplateLibrary-DcwrH-63.js → ReportTemplateLibrary-TIL_Oj2l.js} +1 -1
- package/dist/RuleEditor-DkRjOLlr.js +2141 -0
- package/dist/RuleEditor-h5anGsDB.cjs +1 -0
- package/dist/{TemplateOutlinePanel-CGrT5DFN.cjs → TemplateOutlinePanel-BlLxRrfu.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-SXCjaPKR.js → TemplateOutlinePanel-BouxsuqQ.js} +1 -1
- package/dist/{TemplateReusePanel-lHLOS9Wn.js → TemplateReusePanel-BEACLPaN.js} +2 -2
- package/dist/{TemplateReusePanel-6Z3wRFz8.cjs → TemplateReusePanel-yxsHSO40.cjs} +1 -1
- package/dist/{TemplateReviewPanel-CJ9PLc48.js → TemplateReviewPanel-B1OGRY2i.js} +1 -1
- package/dist/{TemplateReviewPanel-Dpk7sLcF.cjs → TemplateReviewPanel-D9Cx0m2N.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +63 -1
- package/dist/analytics.d.ts +63 -1
- package/dist/analytics.js +4 -4
- package/dist/artifact-integrity.json +86 -90
- package/dist/assets-BIMVwjQe.js +231 -0
- package/dist/assets-Dfs2ElxI.cjs +1 -0
- package/dist/{auto-YR7a4BtF.js → auto-BIOmtVhk.js} +14 -14
- package/dist/{auto-uVBjX1j5.cjs → auto-DDHflI9v.cjs} +1 -1
- package/dist/computed-BW5a8QFk.js +612 -0
- package/dist/computed-C2GD3XcE.cjs +1 -0
- package/dist/dataset-DL83majE.js +161 -0
- package/dist/dataset-IrlXbUvh.cjs +1 -0
- package/dist/{designer-BfQSahxq.js → designer-D9XAxqSc.js} +1194 -1179
- package/dist/designer-uCDo5XSK.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +125 -3
- package/dist/designer.d.ts +125 -3
- package/dist/designer.js +1 -1
- package/dist/{drill-CsdjgkRM.cjs → drill-ByN8COs_.cjs} +1 -1
- package/dist/{drill-DIGsZfyB.js → drill-CKW3Xtfa.js} +11 -11
- package/dist/{encoding-BYF9ZTl9.cjs → encoding-BFMFIc4r.cjs} +1 -1
- package/dist/{encoding-BOGq4qYL.js → encoding-DP_Eaf0A.js} +2 -2
- package/dist/{font-loader-EKLzOJxf.cjs → font-loader-7FWVlykp.cjs} +1 -1
- package/dist/{font-loader-CzI1GuBc.js → font-loader-CQZowp0I.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +173 -1
- package/dist/index.d.ts +173 -1
- package/dist/index.js +1205 -808
- package/dist/json-snapshot-D7PE1NsU.cjs +2 -0
- package/dist/{json-snapshot-D6ioHth9.js → json-snapshot-DYmEe3sO.js} +769 -692
- package/dist/matrix-JLAXlux-.js +302 -0
- package/dist/matrix-gTHpDTGm.cjs +1 -0
- package/dist/{pdf-ByVCb1i6.cjs → pdf-B8JouyYv.cjs} +47 -47
- package/dist/{pdf-DJ5S6ukC.js → pdf-l3ea86di.js} +13 -15
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +12 -0
- package/dist/pdf.d.ts +12 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-C2j5_mhx.js → plugin-BBp74CQZ.js} +1 -1
- package/dist/{plugin-Dr39GBRG.cjs → plugin-CtFX9PFG.cjs} +1 -1
- package/dist/{prepared-DqtpvRTn.js → prepared-CARicKYh.js} +1 -1
- package/dist/{prepared-DdrjLC7L.cjs → prepared-Ch1x_Gog.cjs} +1 -1
- package/dist/{protocol-BzwMP4Vw.cjs → protocol-B5A2uom4.cjs} +1 -1
- package/dist/{protocol-kt4Iy6-3.js → protocol-BaiWjq5w.js} +3 -3
- package/dist/{record-bindings-DUX1VMlR.cjs → record-bindings-B86Sur_y.cjs} +1 -1
- package/dist/{record-bindings-CZWBJ1fU.js → record-bindings-D4TuMzHs.js} +1 -1
- package/dist/{region-binding-workflow-CWNvIjkV.js → region-binding-workflow-BNasF5kz.js} +2 -2
- package/dist/{region-binding-workflow-CqSMxQ4p.cjs → region-binding-workflow-O2Cni3mF.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/runtime-DakRXui3.js +170 -0
- package/dist/runtime-dL5ygIfa.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +46 -0
- package/dist/server/node.d.ts +46 -0
- package/dist/server-node.cjs +4 -4
- package/dist/server-node.js +2540 -1911
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +174 -1
- package/dist/server.d.ts +174 -1
- package/dist/server.js +787 -544
- package/dist/style.css +1 -1
- package/dist/template-catalog-Dua8h9ZA.cjs +1 -0
- package/dist/{template-catalog-BtR2JmCL.js → template-catalog-wT1fNeAP.js} +4 -4
- package/dist/{template-fragments-BVsbxs4a.cjs → template-fragments-BajTajb4.cjs} +1 -1
- package/dist/{template-fragments-By0aZC1D.js → template-fragments-DmX5XK4N.js} +1 -1
- package/dist/{template-registry-C62vpv4a.cjs → template-registry-CpysHAxy.cjs} +1 -1
- package/dist/{template-registry-Cw3vRTX2.js → template-registry-u11fPd8D.js} +5 -5
- package/dist/{tree-BX380Rr7.cjs → tree-CLpxYbKa.cjs} +1 -1
- package/dist/{tree-CjVZLRw7.js → tree-DNJorJUf.js} +1 -1
- package/dist/vue/async.d.cts +108 -2
- package/dist/vue/async.d.ts +108 -2
- package/dist/vue/index.d.cts +130 -3
- package/dist/vue/index.d.ts +130 -3
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +4 -4
- package/dist/{workbook-session-BeSO8PFB.js → workbook-session-B8pNW24X.js} +1 -1
- package/dist/{workbook-session-Cbts-22R.cjs → workbook-session-DN5LSA5C.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +88 -2
- package/dist/xlsx.d.ts +88 -2
- package/dist/xlsx.js +232 -230
- package/package.json +1 -1
- package/dist/ReportPreview-BcDKCLiK.js +0 -4834
- package/dist/ReportPreview-Bk9nLfO9.cjs +0 -6
- package/dist/RuleEditor-BX5S8RSF.cjs +0 -1
- package/dist/RuleEditor-CGl9XY2s.js +0 -2037
- package/dist/assets-CqIbfbTr.js +0 -126
- package/dist/assets-e4YSke8n.cjs +0 -1
- package/dist/capabilities-DDwXr_cA.js +0 -103
- package/dist/capabilities-DNLyZdNw.cjs +0 -1
- package/dist/computed-C-4C2S5h.js +0 -521
- package/dist/computed-CGV2a809.cjs +0 -1
- package/dist/dataset-BkRmwgeJ.cjs +0 -1
- package/dist/dataset-H5pFuQGU.js +0 -121
- package/dist/designer-CPPdeM5_.cjs +0 -2
- package/dist/diagnostic-notification-B9K9We3h.cjs +0 -1
- package/dist/diagnostic-notification-qGAYZdkB.js +0 -7
- package/dist/json-snapshot-DknkjvxP.cjs +0 -2
- package/dist/matrix-CGRGkn5s.js +0 -112
- package/dist/matrix-gEO7ZM_u.cjs +0 -1
- package/dist/runtime-BjKBI530.js +0 -168
- package/dist/runtime-CBFEPKEs.cjs +0 -1
- package/dist/template-catalog-C2NLdrwB.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ref as z, computed as B, watch as le, nextTick as he, onMounted as Ct, onBeforeUnmount as Pe, defineComponent as Se, openBlock as
|
|
1
|
+
import { ref as z, computed as B, watch as le, nextTick as he, onMounted as Ct, onBeforeUnmount as Pe, defineComponent as Se, openBlock as v, createElementBlock as p, createElementVNode as a, unref as t, toDisplayString as l, createCommentVNode as O, createTextVNode as j, normalizeStyle as Re, Fragment as J, renderList as ne, normalizeClass as Ge, withModifiers as Wt, getCurrentInstance as $t, createBlock as xe, createVNode as de, withDirectives as we, vModelSelect as ot, inject as nn, provide as an, shallowRef as Ve, defineAsyncComponent as be, withKeys as ht, vShow as Be, isRef as bt, vModelText as Dt } from "vue";
|
|
2
2
|
import { provideMachReportConfig as on, createLocalFetcher as ln, ReportPreview as sn } from "@agile-team/mach-report/vue";
|
|
3
3
|
import { resolveGridLayout as He, parseReportTemplate as ae, serializeReportTemplate as ye, diffReportTemplates as _t, validateReportTemplateDocument as At } from "@agile-team/mach-report";
|
|
4
4
|
import { _ as Ie, a as fe } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
5
|
-
import { r as rn, a as dn, b as un, i as Ht, c as cn } from "./record-bindings-
|
|
6
|
-
import { c as mn } from "./tree-
|
|
5
|
+
import { r as rn, a as dn, b as un, i as Ht, c as cn } from "./record-bindings-D4TuMzHs.js";
|
|
6
|
+
import { c as mn } from "./tree-DNJorJUf.js";
|
|
7
7
|
import { r as lt } from "./style-67OqfNed.js";
|
|
8
8
|
import { i as vn } from "./template-outline-cnWfT_LK.js";
|
|
9
9
|
function gn(e, s, o = 3) {
|
|
@@ -137,12 +137,12 @@ function rt(e) {
|
|
|
137
137
|
function dt(e, s, o) {
|
|
138
138
|
const i = /* @__PURE__ */ new Set();
|
|
139
139
|
return { cells: e.map(
|
|
140
|
-
(r,
|
|
141
|
-
if (i.has(`${
|
|
140
|
+
(r, c) => r.flatMap((g, h) => {
|
|
141
|
+
if (i.has(`${c}:${h}`)) return [];
|
|
142
142
|
if (!g) return [null];
|
|
143
|
-
for (let C =
|
|
143
|
+
for (let C = c; C < c + (g.rowSpan ?? 1); C++)
|
|
144
144
|
for (let $ = h; $ < h + (g.colSpan ?? 1); $++)
|
|
145
|
-
(C !==
|
|
145
|
+
(C !== c || $ !== h) && i.add(`${C}:${$}`);
|
|
146
146
|
return [g];
|
|
147
147
|
})
|
|
148
148
|
), colWidthsMm: s, rowHeightsMm: o };
|
|
@@ -165,12 +165,12 @@ function bn(e, s, o, i) {
|
|
|
165
165
|
throw new Error("请选择同一行的至少两个连续表头。");
|
|
166
166
|
const n = rt(e), r = n[s];
|
|
167
167
|
if (!r) throw new Error("表头行不存在。");
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
168
|
+
const c = r.slice(o, i + 1);
|
|
169
|
+
if (c.some(
|
|
170
170
|
(h) => !h || (h.colSpan ?? 1) !== 1 || (h.rowSpan ?? 1) !== 1
|
|
171
171
|
))
|
|
172
172
|
throw new Error("选择包含合并区域,请先拆分,再重新合并。");
|
|
173
|
-
const g =
|
|
173
|
+
const g = c[0];
|
|
174
174
|
r[o] = { ...g, colSpan: i - o + 1 };
|
|
175
175
|
for (let h = o + 1; h <= i; h++) r[h] = null;
|
|
176
176
|
e.headerGrid = dt(
|
|
@@ -185,8 +185,8 @@ function yn(e, s, o) {
|
|
|
185
185
|
({ ri: C, ci: $, cell: f }) => s >= C && s < C + (f.rowSpan ?? 1) && o >= $ && o < $ + (f.colSpan ?? 1)
|
|
186
186
|
);
|
|
187
187
|
if (!n) return;
|
|
188
|
-
const r = rt(e), { ri:
|
|
189
|
-
for (let C =
|
|
188
|
+
const r = rt(e), { ri: c, ci: g, cell: h } = n;
|
|
189
|
+
for (let C = c; C < c + (h.rowSpan ?? 1); C++)
|
|
190
190
|
for (let $ = g; $ < g + (h.colSpan ?? 1); $++) {
|
|
191
191
|
const f = {
|
|
192
192
|
...h,
|
|
@@ -201,59 +201,59 @@ function yn(e, s, o) {
|
|
|
201
201
|
);
|
|
202
202
|
}
|
|
203
203
|
function wn(e) {
|
|
204
|
-
const s = z(), o = z(0.8), i = z(0), n = z(0), r = B(() => o.value * yt),
|
|
204
|
+
const s = z(), o = z(0.8), i = z(0), n = z(0), r = B(() => o.value * yt), c = B(() => e.document.template.pages[e.pageIndex]), g = B(() => c.value.widthMm * r.value > n.value - 40);
|
|
205
205
|
let h, C = !!e.document.template.repeat;
|
|
206
|
-
function $(
|
|
206
|
+
function $(u) {
|
|
207
207
|
const b = s.value;
|
|
208
208
|
if (!b || b.clientWidth <= 40 || b.clientHeight <= 40) return;
|
|
209
|
-
let
|
|
210
|
-
const A = e.selection?.pageIndex === e.pageIndex ?
|
|
211
|
-
|
|
212
|
-
const
|
|
213
|
-
o.value = Math.max(0.05, Math.min(2,
|
|
214
|
-
b.scrollLeft =
|
|
209
|
+
let R = { leftMm: 0, topMm: 0, widthMm: c.value.widthMm, heightMm: c.value.heightMm };
|
|
210
|
+
const A = e.selection?.pageIndex === e.pageIndex ? c.value.components[e.selection.componentIndex] : void 0;
|
|
211
|
+
u === "selection" && A && (R = Me(A));
|
|
212
|
+
const E = (b.clientWidth - 40) / (R.widthMm * yt), T = (b.clientHeight - 40) / (R.heightMm * yt);
|
|
213
|
+
o.value = Math.max(0.05, Math.min(2, u === "width" ? E : Math.min(E, T))), he(() => {
|
|
214
|
+
b.scrollLeft = R.leftMm * r.value, b.scrollTop = R.topMm * r.value;
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
|
-
function f(
|
|
218
|
-
C = !1, $(
|
|
217
|
+
function f(u) {
|
|
218
|
+
C = !1, $(u);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
Number.isFinite(
|
|
220
|
+
function w(u) {
|
|
221
|
+
Number.isFinite(u) && (C = !1, o.value = Math.max(0.05, Math.min(2, u)));
|
|
222
222
|
}
|
|
223
223
|
function S() {
|
|
224
|
-
const
|
|
225
|
-
|
|
224
|
+
const u = s.value;
|
|
225
|
+
u && (n.value = u.clientWidth, i.value = u.scrollWidth > u.clientWidth ? Math.round(u.scrollLeft / (u.scrollWidth - u.clientWidth) * 100) : 0);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function k(u) {
|
|
228
228
|
const b = s.value;
|
|
229
|
-
b && (b.scrollLeft = (b.scrollWidth - b.clientWidth) *
|
|
229
|
+
b && (b.scrollLeft = (b.scrollWidth - b.clientWidth) * u / 100), i.value = u;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function I() {
|
|
232
232
|
S(), C && e.document.template.repeat && $("page");
|
|
233
233
|
}
|
|
234
|
-
async function
|
|
234
|
+
async function M() {
|
|
235
235
|
await he();
|
|
236
|
-
const
|
|
237
|
-
if (!
|
|
238
|
-
const
|
|
239
|
-
if (!
|
|
240
|
-
const A = Me(
|
|
241
|
-
if (
|
|
242
|
-
const H =
|
|
236
|
+
const u = s.value, b = e.selection;
|
|
237
|
+
if (!u || b?.pageIndex !== e.pageIndex) return;
|
|
238
|
+
const R = c.value.components[b.componentIndex];
|
|
239
|
+
if (!R) return;
|
|
240
|
+
const A = Me(R);
|
|
241
|
+
if (R.kind === "list" && e.columnIndex !== void 0 && e.columnIndex >= 0) {
|
|
242
|
+
const H = R;
|
|
243
243
|
A.leftMm += H.columns.slice(0, e.columnIndex).reduce((W, Y) => W + Y.widthMm, 0), A.widthMm = H.columns[e.columnIndex]?.widthMm ?? A.widthMm;
|
|
244
244
|
}
|
|
245
|
-
const
|
|
246
|
-
|
|
245
|
+
const E = A.leftMm * r.value, T = A.topMm * r.value, x = E + A.widthMm * r.value, P = T + A.heightMm * r.value;
|
|
246
|
+
E < u.scrollLeft ? u.scrollLeft = E : x > u.scrollLeft + u.clientWidth - 40 && (u.scrollLeft = Math.max(0, Math.min(E, x - u.clientWidth + 40))), T < u.scrollTop ? u.scrollTop = T : P > u.scrollTop + u.clientHeight - 40 && (u.scrollTop = Math.max(0, Math.min(T, P - u.clientHeight + 40))), S();
|
|
247
247
|
}
|
|
248
248
|
return le(() => [e.selection, e.columnIndex, e.pageIndex], () => {
|
|
249
|
-
|
|
249
|
+
M();
|
|
250
250
|
}), le(() => e.document.id, () => {
|
|
251
|
-
C = !!e.document.template.repeat, he(
|
|
252
|
-
}), le(() => [!!e.document.template.repeat, e.pageIndex,
|
|
253
|
-
he(
|
|
251
|
+
C = !!e.document.template.repeat, he(I);
|
|
252
|
+
}), le(() => [!!e.document.template.repeat, e.pageIndex, c.value.widthMm, c.value.heightMm], () => {
|
|
253
|
+
he(I);
|
|
254
254
|
}), Ct(() => {
|
|
255
|
-
|
|
256
|
-
}), Pe(() => h?.disconnect()), { viewport: s, zoom: o, scale: r, page:
|
|
255
|
+
I(), typeof ResizeObserver < "u" && s.value && (h = new ResizeObserver(I), h.observe(s.value));
|
|
256
|
+
}), Pe(() => h?.disconnect()), { viewport: s, zoom: o, scale: r, page: c, wide: g, fraction: i, fit: f, setZoom: w, sync: S, navigate: k };
|
|
257
257
|
}
|
|
258
258
|
function kn(e, s, o) {
|
|
259
259
|
if (e.kind === "list") return { text: e.dataset };
|
|
@@ -264,15 +264,15 @@ function xn(e, s, o) {
|
|
|
264
264
|
const i = e.binding, n = s.template.repeat, r = n ? o?.[n.dataset]?.[0] : void 0;
|
|
265
265
|
if (!r) return { text: i.field, bound: !0 };
|
|
266
266
|
try {
|
|
267
|
-
const
|
|
268
|
-
return e.kind === "image" &&
|
|
269
|
-
} catch (
|
|
270
|
-
return { text: i.field, bound: !0, error:
|
|
267
|
+
const c = un(i, r, { dataset: n?.dataset, rowIndex: 0 });
|
|
268
|
+
return e.kind === "image" && c && !Ht(c) ? { text: i.field, bound: !0, error: "image-binding" } : { text: c, bound: !0, ...e.kind === "image" && Ht(c) ? { image: c } : {} };
|
|
269
|
+
} catch (c) {
|
|
270
|
+
return { text: i.field, bound: !0, error: c instanceof Error ? c.message : String(c) };
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
function Nt(e, s) {
|
|
274
274
|
const i = [1, 2, 5, 10, 20, 50, 100, 200, 500, 1e3].find((r) => r * s >= 36) ?? Math.max(1e3, Math.ceil(e / 200));
|
|
275
|
-
return Array.from({ length: Math.min(201, Math.floor(e / i) + 1) }, (r,
|
|
275
|
+
return Array.from({ length: Math.min(201, Math.floor(e / i) + 1) }, (r, c) => ({ mm: c * i, position: c * i * s }));
|
|
276
276
|
}
|
|
277
277
|
const wt = [
|
|
278
278
|
{ id: "label-80-55", widthMm: 80, heightMm: 55 },
|
|
@@ -291,19 +291,19 @@ function Jt(e) {
|
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
function Mn(e, s) {
|
|
294
|
-
const o = JSON.parse(JSON.stringify(e)), i = new Set(s.flatMap((
|
|
294
|
+
const o = JSON.parse(JSON.stringify(e)), i = new Set(s.flatMap((c) => c.components.map((g) => g.kind === "list" ? g.id : g.nid)).filter(Boolean)), n = /* @__PURE__ */ new Map();
|
|
295
295
|
let r = 0;
|
|
296
|
-
for (const
|
|
297
|
-
const g =
|
|
296
|
+
for (const c of o.components) {
|
|
297
|
+
const g = c.kind === "list" ? c.id : c.nid;
|
|
298
298
|
if (!g) continue;
|
|
299
299
|
let h;
|
|
300
300
|
do
|
|
301
301
|
h = `page-copy-${++r}`;
|
|
302
302
|
while (i.has(h));
|
|
303
|
-
i.add(h), n.set(g, h),
|
|
303
|
+
i.add(h), n.set(g, h), c.kind === "list" ? c.id = h : (c.nid = h, delete c.rkey);
|
|
304
304
|
}
|
|
305
|
-
return o.flow?.bands.forEach((
|
|
306
|
-
|
|
305
|
+
return o.flow?.bands.forEach((c) => {
|
|
306
|
+
c.componentIds = c.componentIds.map((g) => n.get(g) ?? g);
|
|
307
307
|
}), o;
|
|
308
308
|
}
|
|
309
309
|
function Cn(e, s, o) {
|
|
@@ -316,10 +316,10 @@ function Cn(e, s, o) {
|
|
|
316
316
|
const r = o.type === "duplicate" ? Mn(n, i) : JSON.parse(JSON.stringify(n));
|
|
317
317
|
return o.type === "add" && (r.components = [], delete r.flow, delete r.meta), i.splice(s + 1, 0, r), s + 1;
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function Ot(e, s, o) {
|
|
320
320
|
const i = e.filter((n) => n !== s).flatMap((n) => {
|
|
321
|
-
const r = n[o],
|
|
322
|
-
return [r, r +
|
|
321
|
+
const r = n[o], c = o === "leftMm" ? n.widthMm : st(n);
|
|
322
|
+
return [r, r + c / 2, r + c];
|
|
323
323
|
});
|
|
324
324
|
return [...new Set(i)].sort((n, r) => n - r);
|
|
325
325
|
}
|
|
@@ -327,21 +327,21 @@ function $n(e, s) {
|
|
|
327
327
|
if (!e.length) return;
|
|
328
328
|
let o = 0, i = e.length;
|
|
329
329
|
for (; o < i; ) {
|
|
330
|
-
const
|
|
331
|
-
e[
|
|
330
|
+
const c = o + i >>> 1;
|
|
331
|
+
e[c] < s ? o = c + 1 : i = c;
|
|
332
332
|
}
|
|
333
333
|
const n = e[Math.max(0, o - 1)], r = e[Math.min(e.length - 1, o)];
|
|
334
334
|
return Math.abs(n - s) < Math.abs(r - s) ? n : r;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Ft(e, s, o, i) {
|
|
337
337
|
let n = 1 / 0, r = {
|
|
338
338
|
value: Math.round(e * 2) / 2
|
|
339
339
|
};
|
|
340
|
-
for (const
|
|
341
|
-
const g = $n(o, e +
|
|
340
|
+
for (const c of [0, s / 2, s]) {
|
|
341
|
+
const g = $n(o, e + c);
|
|
342
342
|
if (g === void 0) continue;
|
|
343
|
-
const h = Math.abs(g - e -
|
|
344
|
-
h <= i && h < n && (n = h, r = { value: g -
|
|
343
|
+
const h = Math.abs(g - e - c);
|
|
344
|
+
h <= i && h < n && (n = h, r = { value: g - c, guide: g });
|
|
345
345
|
}
|
|
346
346
|
return r;
|
|
347
347
|
}
|
|
@@ -357,52 +357,52 @@ function In(e) {
|
|
|
357
357
|
function o(i, n, r = !1) {
|
|
358
358
|
if (e.disabled() || i.button !== 0) return;
|
|
359
359
|
i.preventDefault(), i.stopPropagation(), s?.();
|
|
360
|
-
const
|
|
360
|
+
const c = i.currentTarget.closest(
|
|
361
361
|
"[data-canvas-component]"
|
|
362
362
|
), g = Me(n), h = i.clientX, C = i.clientY;
|
|
363
363
|
let $ = g, f = 0;
|
|
364
|
-
const
|
|
365
|
-
let
|
|
366
|
-
const
|
|
367
|
-
for (const [
|
|
368
|
-
["x",
|
|
369
|
-
["y",
|
|
364
|
+
const w = e.scale.value, S = c.parentElement;
|
|
365
|
+
let k, I;
|
|
366
|
+
const M = () => {
|
|
367
|
+
for (const [P, H] of [
|
|
368
|
+
["x", k],
|
|
369
|
+
["y", I]
|
|
370
370
|
])
|
|
371
371
|
S.style.setProperty(
|
|
372
|
-
`--mr-canvas-guide-${
|
|
372
|
+
`--mr-canvas-guide-${P}-display`,
|
|
373
373
|
H === void 0 ? "none" : "block"
|
|
374
374
|
), H !== void 0 && S.style.setProperty(
|
|
375
|
-
`--mr-canvas-guide-${
|
|
376
|
-
`${H *
|
|
375
|
+
`--mr-canvas-guide-${P}`,
|
|
376
|
+
`${H * w}px`
|
|
377
377
|
);
|
|
378
|
-
},
|
|
379
|
-
f = 0,
|
|
378
|
+
}, u = () => {
|
|
379
|
+
f = 0, M(), c.style.left = `${$.leftMm * w}px`, c.style.top = `${$.topMm * w}px`, c.style.width = `${$.widthMm * w}px`, c.style.height = `${$.heightMm * w}px`;
|
|
380
380
|
}, b = {
|
|
381
|
-
leftMm:
|
|
382
|
-
topMm:
|
|
383
|
-
},
|
|
384
|
-
const H = (
|
|
381
|
+
leftMm: Ot(e.page().components, n, "leftMm"),
|
|
382
|
+
topMm: Ot(e.page().components, n, "topMm")
|
|
383
|
+
}, R = (P) => {
|
|
384
|
+
const H = (P.clientX - h) / w, W = (P.clientY - C) / w, Y = Ft(
|
|
385
385
|
g.leftMm + H,
|
|
386
386
|
g.widthMm,
|
|
387
387
|
b.leftMm,
|
|
388
|
-
5 /
|
|
389
|
-
), se =
|
|
388
|
+
5 / w
|
|
389
|
+
), se = Ft(
|
|
390
390
|
g.topMm + W,
|
|
391
391
|
g.heightMm,
|
|
392
392
|
b.topMm,
|
|
393
|
-
5 /
|
|
393
|
+
5 / w
|
|
394
394
|
);
|
|
395
|
-
|
|
395
|
+
k = r ? void 0 : Y.guide, I = r ? void 0 : se.guide, $ = it(
|
|
396
396
|
r ? Sn(g, H, W, n.kind === "qrcode") : { ...g, leftMm: Y.value, topMm: se.value },
|
|
397
397
|
e.page(),
|
|
398
398
|
n.kind === "list"
|
|
399
|
-
), r && n.kind === "qrcode" && ($.widthMm = $.heightMm = Math.min($.widthMm, $.heightMm)), f || (f = requestAnimationFrame(
|
|
400
|
-
}, A = (
|
|
401
|
-
window.removeEventListener("pointermove",
|
|
402
|
-
},
|
|
403
|
-
|
|
399
|
+
), r && n.kind === "qrcode" && ($.widthMm = $.heightMm = Math.min($.widthMm, $.heightMm)), f || (f = requestAnimationFrame(u));
|
|
400
|
+
}, A = (P) => {
|
|
401
|
+
window.removeEventListener("pointermove", R), window.removeEventListener("pointerup", E), window.removeEventListener("pointercancel", T), window.removeEventListener("keydown", x), f && cancelAnimationFrame(f), $ = P ? $ : g, k = void 0, I = void 0, u(), s = void 0, P && JSON.stringify($) !== JSON.stringify(g) && e.commit($);
|
|
402
|
+
}, E = () => A(!0), T = () => A(!1), x = (P) => {
|
|
403
|
+
P.key === "Escape" && (P.preventDefault(), T());
|
|
404
404
|
};
|
|
405
|
-
window.addEventListener("pointermove",
|
|
405
|
+
window.addEventListener("pointermove", R), window.addEventListener("pointerup", E), window.addEventListener("pointercancel", T), window.addEventListener("keydown", x), s = T;
|
|
406
406
|
}
|
|
407
407
|
return le(e.disabled, (i) => {
|
|
408
408
|
i && s?.();
|
|
@@ -636,7 +636,7 @@ const Tn = {
|
|
|
636
636
|
technicalDetails: "标识与修订",
|
|
637
637
|
fieldPosition: "当前字段",
|
|
638
638
|
previewFieldDirectory: "定位字段"
|
|
639
|
-
},
|
|
639
|
+
}, Oe = {
|
|
640
640
|
outlineTool: "结构大纲",
|
|
641
641
|
reuseTool: "片段与样式",
|
|
642
642
|
fitWidth: "适宽",
|
|
@@ -658,7 +658,7 @@ const Tn = {
|
|
|
658
658
|
toolsPending: "工具中还有未应用的配置,请先应用或恢复后再保存模板。",
|
|
659
659
|
...Tn,
|
|
660
660
|
...En
|
|
661
|
-
}, Rn = { class: "mr-canvas" }, Pn = { class: "mr-canvas-heading" }, Ln = { class: "mr-canvas-sheet-info" }, Dn = ["title"], _n = ["title"], An = { class: "mr-canvas-gesture-hint" }, Hn = { class: "mr-canvas-toolbar" }, Nn = { class: "mr-canvas-view-tools" },
|
|
661
|
+
}, Rn = { class: "mr-canvas" }, Pn = { class: "mr-canvas-heading" }, Ln = { class: "mr-canvas-sheet-info" }, Dn = ["title"], _n = ["title"], An = { class: "mr-canvas-gesture-hint" }, Hn = { class: "mr-canvas-toolbar" }, Nn = { class: "mr-canvas-view-tools" }, On = ["aria-pressed"], Fn = ["disabled"], Bn = ["value", "aria-label"], Gn = ["value"], jn = ["width", "aria-label"], zn = ["transform"], Vn = {
|
|
662
662
|
x: "3",
|
|
663
663
|
y: "9"
|
|
664
664
|
}, Wn = ["height"], Jn = ["transform"], Kn = {
|
|
@@ -695,7 +695,7 @@ const Tn = {
|
|
|
695
695
|
},
|
|
696
696
|
emits: ["select", "geometry", "column", "width"],
|
|
697
697
|
setup(e, { emit: s }) {
|
|
698
|
-
const o = e, i = s, n = B(() => ({ ...
|
|
698
|
+
const o = e, i = s, n = B(() => ({ ...Oe, ...o.messages })), { viewport: r, zoom: c, scale: g, page: h, wide: C, fraction: $, fit: f, setZoom: w, sync: S, navigate: k } = wn({ get document() {
|
|
699
699
|
return o.document;
|
|
700
700
|
}, get pageIndex() {
|
|
701
701
|
return o.pageIndex;
|
|
@@ -703,47 +703,47 @@ const Tn = {
|
|
|
703
703
|
return o.selection;
|
|
704
704
|
}, get columnIndex() {
|
|
705
705
|
return o.activeColumnIndex;
|
|
706
|
-
} }),
|
|
707
|
-
function
|
|
708
|
-
return { width: `${N * g.value}px`, opacity: D ? 0.35 : 1, textAlign: _.style?.align, paddingLeft: _.indentMm ? `${_.indentMm * g.value}px` : void 0, color: _.style?.color, backgroundColor: _.style?.backgroundColor, fontWeight: _.style?.bold ? "700" : "400", fontSize: `${lt(_.style).fontSizePx *
|
|
706
|
+
} }), I = B(() => o.disabled === !0 || o.geometryDisabled === !0 || !!h.value.flow), M = B(() => h.value.components.map((_) => _.kind === "list" ? gn(_, o.datasets?.[_.dataset] ?? [], h.value.flow || _.cardinality === "record" ? 1 : 3) : [])), u = B(() => h.value.components.map((_) => kn(_, o.document, o.datasets))), b = z(!0), R = B(() => Nt(h.value.widthMm, g.value)), A = B(() => Nt(h.value.heightMm, g.value));
|
|
707
|
+
function E(_, N, D) {
|
|
708
|
+
return { width: `${N * g.value}px`, opacity: D ? 0.35 : 1, textAlign: _.style?.align, paddingLeft: _.indentMm ? `${_.indentMm * g.value}px` : void 0, color: _.style?.color, backgroundColor: _.style?.backgroundColor, fontWeight: _.style?.bold ? "700" : "400", fontSize: `${lt(_.style).fontSizePx * c.value}px` };
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function T(_) {
|
|
711
711
|
return o.locked?.({ pageIndex: o.pageIndex, componentIndex: _ }) === !0;
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
i("select", { pageIndex: o.pageIndex, componentIndex: N, additive: _.ctrlKey || _.metaKey || _.shiftKey }), !_.ctrlKey && !_.metaKey && !_.shiftKey && !
|
|
713
|
+
function x(_, N) {
|
|
714
|
+
i("select", { pageIndex: o.pageIndex, componentIndex: N, additive: _.ctrlKey || _.metaKey || _.shiftKey }), !_.ctrlKey && !_.metaKey && !_.shiftKey && !T(N) && P.start(_, h.value.components[N]);
|
|
715
715
|
}
|
|
716
|
-
const
|
|
716
|
+
const P = In({
|
|
717
717
|
scale: g,
|
|
718
718
|
page: () => h.value,
|
|
719
|
-
disabled: () =>
|
|
719
|
+
disabled: () => I.value,
|
|
720
720
|
commit: (_) => i("geometry", _)
|
|
721
721
|
});
|
|
722
722
|
function H(_) {
|
|
723
723
|
return (o.selections ?? (o.selection ? [o.selection] : [])).some((N) => N.pageIndex === o.pageIndex && N.componentIndex === _);
|
|
724
724
|
}
|
|
725
725
|
function W(_) {
|
|
726
|
-
const N = h.value.components[_], D = N.kind === "list" ? N.id : N.nid, L = h.value.flow?.bands.find((U) => U.componentIds.includes(D ?? "")),
|
|
726
|
+
const N = h.value.components[_], D = N.kind === "list" ? N.id : N.nid, L = h.value.flow?.bands.find((U) => U.componentIds.includes(D ?? "")), F = L && N.kind === "list" ? L.topMm + L.heightMm - N.topMm : st(N);
|
|
727
727
|
return {
|
|
728
728
|
left: `${N.leftMm * g.value}px`,
|
|
729
729
|
top: `${N.topMm * g.value}px`,
|
|
730
730
|
width: `${N.widthMm * g.value}px`,
|
|
731
|
-
height: `${
|
|
731
|
+
height: `${F * g.value}px`
|
|
732
732
|
};
|
|
733
733
|
}
|
|
734
734
|
function Y(_, N) {
|
|
735
735
|
const D = h.value.components[N];
|
|
736
|
-
if (
|
|
736
|
+
if (I.value || T(N) || !H(N)) return;
|
|
737
737
|
const L = {
|
|
738
738
|
ArrowLeft: [-1, 0],
|
|
739
739
|
ArrowRight: [1, 0],
|
|
740
740
|
ArrowUp: [0, -1],
|
|
741
741
|
ArrowDown: [0, 1]
|
|
742
|
-
},
|
|
743
|
-
if (!
|
|
742
|
+
}, F = L[_.key];
|
|
743
|
+
if (!F) return;
|
|
744
744
|
_.preventDefault(), _.stopPropagation();
|
|
745
745
|
const U = Me(D), Z = _.shiftKey ? 5 : 0.5;
|
|
746
|
-
U.leftMm +=
|
|
746
|
+
U.leftMm += F[0] * Z, U.topMm += F[1] * Z, i("geometry", U);
|
|
747
747
|
}
|
|
748
748
|
function se(_) {
|
|
749
749
|
let N = 0;
|
|
@@ -768,7 +768,7 @@ const Tn = {
|
|
|
768
768
|
}
|
|
769
769
|
let q;
|
|
770
770
|
le(
|
|
771
|
-
() =>
|
|
771
|
+
() => I.value,
|
|
772
772
|
(_) => {
|
|
773
773
|
_ && q?.();
|
|
774
774
|
}
|
|
@@ -777,35 +777,35 @@ const Tn = {
|
|
|
777
777
|
() => q?.()
|
|
778
778
|
), Pe(() => q?.());
|
|
779
779
|
function X(_, N, D) {
|
|
780
|
-
if (
|
|
780
|
+
if (I.value || _.button !== 0) return;
|
|
781
781
|
_.preventDefault(), _.stopPropagation(), q?.();
|
|
782
|
-
const L = _.clientX,
|
|
783
|
-
let U =
|
|
782
|
+
const L = _.clientX, F = N.columns[D].widthMm;
|
|
783
|
+
let U = F;
|
|
784
784
|
const Z = _.currentTarget, Q = ($e) => {
|
|
785
785
|
U = Math.max(
|
|
786
786
|
2,
|
|
787
|
-
Math.round((
|
|
788
|
-
), Z.style.transform = `translateX(${(U -
|
|
787
|
+
Math.round((F + ($e.clientX - L) / g.value) * 2) / 2
|
|
788
|
+
), Z.style.transform = `translateX(${(U - F) * g.value}px)`;
|
|
789
789
|
}, ge = () => {
|
|
790
790
|
window.removeEventListener("pointermove", Q), window.removeEventListener("pointerup", me), window.removeEventListener("pointercancel", ve), window.removeEventListener("keydown", ie), Z.style.transform = "", q = void 0;
|
|
791
791
|
}, me = () => {
|
|
792
|
-
ge(), U !==
|
|
792
|
+
ge(), U !== F && i("width", D, U);
|
|
793
793
|
}, ve = () => ge(), ie = ($e) => {
|
|
794
794
|
$e.key === "Escape" && ($e.preventDefault(), ve());
|
|
795
795
|
};
|
|
796
796
|
window.addEventListener("pointermove", Q), window.addEventListener("pointerup", me), window.addEventListener("pointercancel", ve), window.addEventListener("keydown", ie), q = ve;
|
|
797
797
|
}
|
|
798
|
-
return (_, N) => (
|
|
798
|
+
return (_, N) => (v(), p("div", Rn, [
|
|
799
799
|
a("div", Pn, [
|
|
800
800
|
a("div", Ln, [
|
|
801
801
|
a("strong", {
|
|
802
802
|
title: t(Ue)(t(h), e.pageIndex, n.value.page)
|
|
803
803
|
}, l(t(Ue)(t(h), e.pageIndex, n.value.page)), 9, Dn),
|
|
804
804
|
a("span", null, l(t(h).widthMm) + " × " + l(t(h).heightMm) + " mm", 1),
|
|
805
|
-
e.document.template.repeat ? (
|
|
805
|
+
e.document.template.repeat ? (v(), p("small", {
|
|
806
806
|
key: 0,
|
|
807
807
|
title: e.document.template.repeat.dataset
|
|
808
|
-
}, l(n.value.designSample) + " · " + l(e.document.template.repeat.dataset), 9, _n)) :
|
|
808
|
+
}, l(n.value.designSample) + " · " + l(e.document.template.repeat.dataset), 9, _n)) : O("", !0)
|
|
809
809
|
]),
|
|
810
810
|
a("span", An, l(n.value.canvasHint), 1),
|
|
811
811
|
a("div", Hn, [
|
|
@@ -814,7 +814,7 @@ const Tn = {
|
|
|
814
814
|
type: "button",
|
|
815
815
|
"aria-pressed": b.value,
|
|
816
816
|
onClick: N[0] || (N[0] = (D) => b.value = !b.value)
|
|
817
|
-
}, l(n.value.rulerToggle), 9,
|
|
817
|
+
}, l(n.value.rulerToggle), 9, On),
|
|
818
818
|
a("button", {
|
|
819
819
|
type: "button",
|
|
820
820
|
onClick: N[1] || (N[1] = (D) => t(f)("width"))
|
|
@@ -827,19 +827,19 @@ const Tn = {
|
|
|
827
827
|
type: "button",
|
|
828
828
|
disabled: !e.selection,
|
|
829
829
|
onClick: N[3] || (N[3] = (D) => t(f)("selection"))
|
|
830
|
-
}, l(n.value.fitSelection), 9,
|
|
830
|
+
}, l(n.value.fitSelection), 9, Fn)
|
|
831
831
|
]),
|
|
832
832
|
a("label", null, [
|
|
833
833
|
j(l(n.value.zoom), 1),
|
|
834
834
|
a("select", {
|
|
835
|
-
value: t(
|
|
835
|
+
value: t(c),
|
|
836
836
|
"aria-label": n.value.zoom,
|
|
837
|
-
onChange: N[4] || (N[4] = (D) => t(
|
|
837
|
+
onChange: N[4] || (N[4] = (D) => t(w)(Number(D.target.value)))
|
|
838
838
|
}, [
|
|
839
|
-
[0.5, 0.8, 1, 1.25].includes(t(
|
|
839
|
+
[0.5, 0.8, 1, 1.25].includes(t(c)) ? O("", !0) : (v(), p("option", {
|
|
840
840
|
key: 0,
|
|
841
|
-
value: t(
|
|
842
|
-
}, l(Math.round(t(
|
|
841
|
+
value: t(c)
|
|
842
|
+
}, l(Math.round(t(c) * 100)) + "%", 9, Gn)),
|
|
843
843
|
N[7] || (N[7] = a("option", { value: 0.5 }, "50%", -1)),
|
|
844
844
|
N[8] || (N[8] = a("option", { value: 0.8 }, "80%", -1)),
|
|
845
845
|
N[9] || (N[9] = a("option", { value: 1 }, "100%", -1)),
|
|
@@ -862,7 +862,7 @@ const Tn = {
|
|
|
862
862
|
height: `${t(h).heightMm * t(g)}px`
|
|
863
863
|
})
|
|
864
864
|
}, [
|
|
865
|
-
b.value ? (
|
|
865
|
+
b.value ? (v(), p("svg", {
|
|
866
866
|
key: 0,
|
|
867
867
|
class: "mr-canvas-ruler is-horizontal",
|
|
868
868
|
width: t(h).widthMm * t(g),
|
|
@@ -870,7 +870,7 @@ const Tn = {
|
|
|
870
870
|
"aria-label": n.value.rulerLabel,
|
|
871
871
|
role: "img"
|
|
872
872
|
}, [
|
|
873
|
-
(
|
|
873
|
+
(v(!0), p(J, null, ne(R.value, (D) => (v(), p("g", {
|
|
874
874
|
key: D.mm,
|
|
875
875
|
transform: `translate(${D.position}, 0)`
|
|
876
876
|
}, [
|
|
@@ -880,15 +880,15 @@ const Tn = {
|
|
|
880
880
|
}, null, -1)),
|
|
881
881
|
a("text", Vn, l(D.mm), 1)
|
|
882
882
|
], 8, zn))), 128))
|
|
883
|
-
], 8, jn)) :
|
|
884
|
-
b.value ? (
|
|
883
|
+
], 8, jn)) : O("", !0),
|
|
884
|
+
b.value ? (v(), p("svg", {
|
|
885
885
|
key: 1,
|
|
886
886
|
class: "mr-canvas-ruler is-vertical",
|
|
887
887
|
width: "17",
|
|
888
888
|
height: t(h).heightMm * t(g),
|
|
889
889
|
"aria-hidden": "true"
|
|
890
890
|
}, [
|
|
891
|
-
(
|
|
891
|
+
(v(!0), p(J, null, ne(A.value, (D) => (v(), p("g", {
|
|
892
892
|
key: D.mm,
|
|
893
893
|
transform: `translate(0, ${D.position})`
|
|
894
894
|
}, [
|
|
@@ -898,89 +898,89 @@ const Tn = {
|
|
|
898
898
|
}, null, -1)),
|
|
899
899
|
a("text", Kn, l(D.mm), 1)
|
|
900
900
|
], 8, Jn))), 128))
|
|
901
|
-
], 8, Wn)) :
|
|
902
|
-
(
|
|
901
|
+
], 8, Wn)) : O("", !0),
|
|
902
|
+
(v(!0), p(J, null, ne(t(h).components, (D, L) => (v(), p("div", {
|
|
903
903
|
key: L,
|
|
904
|
-
class: Ge(["mr-canvas-component", { "is-selected": H(L), "is-locked":
|
|
904
|
+
class: Ge(["mr-canvas-component", { "is-selected": H(L), "is-locked": T(L) }]),
|
|
905
905
|
"data-canvas-component": L,
|
|
906
906
|
style: Re(W(L)),
|
|
907
907
|
role: "button",
|
|
908
908
|
"aria-label": `${n.value.component} ${L + 1} ${D.kind}`,
|
|
909
909
|
"aria-pressed": H(L),
|
|
910
910
|
tabindex: H(L) ? 0 : -1,
|
|
911
|
-
onFocus: (
|
|
912
|
-
onPointerdown: (
|
|
913
|
-
onClick: (
|
|
914
|
-
onKeydown: (
|
|
911
|
+
onFocus: (F) => !H(L) && i("select", { pageIndex: e.pageIndex, componentIndex: L }),
|
|
912
|
+
onPointerdown: (F) => x(F, L),
|
|
913
|
+
onClick: (F) => F.detail === 0 && !H(L) && i("select", { pageIndex: e.pageIndex, componentIndex: L }),
|
|
914
|
+
onKeydown: (F) => Y(F, L)
|
|
915
915
|
}, [
|
|
916
|
-
D.kind === "list" ? (
|
|
916
|
+
D.kind === "list" ? (v(), p(J, { key: 0 }, [
|
|
917
917
|
a("div", qn, [
|
|
918
|
-
D.header !== !1 && D.headerGrid ? (
|
|
918
|
+
D.header !== !1 && D.headerGrid ? (v(), p("div", {
|
|
919
919
|
key: 0,
|
|
920
920
|
class: "mr-canvas-merged",
|
|
921
921
|
style: Re({
|
|
922
|
-
height: `${(D.headerGrid.rowHeightsMm?.reduce((
|
|
922
|
+
height: `${(D.headerGrid.rowHeightsMm?.reduce((F, U) => F + U, 0) ?? D.headerGrid.cells.length * 8) * t(g)}px`
|
|
923
923
|
})
|
|
924
924
|
}, [
|
|
925
|
-
(
|
|
925
|
+
(v(!0), p(J, null, ne(d(D), (F, U) => (v(), p("div", {
|
|
926
926
|
key: U,
|
|
927
927
|
style: Re({
|
|
928
|
-
left: `${
|
|
929
|
-
top: `${
|
|
930
|
-
width: `${
|
|
931
|
-
height: `${
|
|
932
|
-
textAlign:
|
|
928
|
+
left: `${F.xMm * t(g)}px`,
|
|
929
|
+
top: `${F.yMm * t(g)}px`,
|
|
930
|
+
width: `${F.widthMm * t(g)}px`,
|
|
931
|
+
height: `${F.heightMm * t(g)}px`,
|
|
932
|
+
textAlign: F.cell.style?.align ?? "center"
|
|
933
933
|
})
|
|
934
|
-
}, l(
|
|
935
|
-
], 4)) : D.header !== !1 ? (
|
|
936
|
-
(
|
|
934
|
+
}, l(F.cell.text), 5))), 128))
|
|
935
|
+
], 4)) : D.header !== !1 ? (v(), p("div", Yn, [
|
|
936
|
+
(v(!0), p(J, null, ne(D.columns, (F, U) => (v(), p("div", {
|
|
937
937
|
key: U,
|
|
938
|
-
style: Re(
|
|
938
|
+
style: Re(E({ text: F.header, style: t(cn)(D, F) }, F.widthMm, F.hidden)),
|
|
939
939
|
onPointerdown: Wt((Z) => {
|
|
940
940
|
i("select", { pageIndex: e.pageIndex, componentIndex: L }), i("column", U);
|
|
941
941
|
}, ["stop"])
|
|
942
|
-
}, l(
|
|
943
|
-
])) :
|
|
944
|
-
(
|
|
942
|
+
}, l(F.header), 45, Xn))), 128))
|
|
943
|
+
])) : O("", !0),
|
|
944
|
+
(v(!0), p(J, null, ne(M.value[L], (F, U) => (v(), p("div", {
|
|
945
945
|
key: U,
|
|
946
946
|
class: "mr-canvas-table-row"
|
|
947
947
|
}, [
|
|
948
|
-
(
|
|
948
|
+
(v(!0), p(J, null, ne(D.columns, (Z, Q) => (v(), p("div", {
|
|
949
949
|
key: Q,
|
|
950
|
-
style: Re(
|
|
951
|
-
}, l(
|
|
950
|
+
style: Re(E(F[Q], Z.widthMm, Z.hidden))
|
|
951
|
+
}, l(F[Q].text), 5))), 128))
|
|
952
952
|
]))), 128)),
|
|
953
|
-
|
|
953
|
+
M.value[L]?.length ? O("", !0) : (v(), p("div", Zn, l(D.dataset) + " · " + l(D.tree && e.datasets?.[D.dataset]?.length ? n.value.treeSampleHint : n.value.sampleRows), 1))
|
|
954
954
|
]),
|
|
955
|
-
H(L) && !
|
|
955
|
+
H(L) && !I.value && !T(L) ? (v(!0), p(J, { key: 0 }, ne(se(D), (F, U) => (v(), p("span", {
|
|
956
956
|
key: U,
|
|
957
957
|
class: "mr-canvas-column-handle",
|
|
958
958
|
"aria-label": `${n.value.resizeColumn} ${D.columns[U]?.header}`,
|
|
959
959
|
role: "separator",
|
|
960
960
|
"aria-orientation": "vertical",
|
|
961
|
-
style: Re({ left: `${
|
|
961
|
+
style: Re({ left: `${F * t(g)}px` }),
|
|
962
962
|
onPointerdown: (Z) => X(Z, D, U)
|
|
963
|
-
}, null, 44, Qn))), 128)) :
|
|
964
|
-
], 64)) : D.grid ? (
|
|
965
|
-
(
|
|
963
|
+
}, null, 44, Qn))), 128)) : O("", !0)
|
|
964
|
+
], 64)) : D.grid ? (v(), p("div", ea, [
|
|
965
|
+
(v(!0), p(J, null, ne(G(D), (F, U) => (v(), p("div", {
|
|
966
966
|
key: U,
|
|
967
967
|
style: Re({
|
|
968
|
-
left: `${
|
|
969
|
-
top: `${
|
|
970
|
-
width: `${
|
|
971
|
-
height: `${
|
|
972
|
-
backgroundColor:
|
|
973
|
-
color:
|
|
974
|
-
fontWeight:
|
|
975
|
-
fontSize: `${t(lt)(
|
|
976
|
-
textAlign:
|
|
968
|
+
left: `${F.xMm * t(g)}px`,
|
|
969
|
+
top: `${F.yMm * t(g)}px`,
|
|
970
|
+
width: `${F.widthMm * t(g)}px`,
|
|
971
|
+
height: `${F.heightMm * t(g)}px`,
|
|
972
|
+
backgroundColor: F.cell.style?.backgroundColor,
|
|
973
|
+
color: F.cell.style?.color,
|
|
974
|
+
fontWeight: F.cell.style?.bold ? "700" : "400",
|
|
975
|
+
fontSize: `${t(lt)(F.cell.style).fontSizePx * t(c)}px`,
|
|
976
|
+
textAlign: F.cell.style?.align ?? "left"
|
|
977
977
|
})
|
|
978
|
-
}, l(
|
|
979
|
-
D.grid.cells.reduce((
|
|
980
|
-
])) : (D.kind === "barcode" || D.kind === "qrcode") && !
|
|
978
|
+
}, l(F.cell.text), 5))), 128)),
|
|
979
|
+
D.grid.cells.reduce((F, U) => F + U.length, 0) > 2e3 ? (v(), p("span", ta, l(n.value.canvasGridLimited), 1)) : O("", !0)
|
|
980
|
+
])) : (D.kind === "barcode" || D.kind === "qrcode") && !u.value[L]?.image ? (v(), p("div", {
|
|
981
981
|
key: 2,
|
|
982
|
-
class: Ge(["mr-canvas-code", { "is-error":
|
|
983
|
-
title:
|
|
982
|
+
class: Ge(["mr-canvas-code", { "is-error": u.value[L]?.error }]),
|
|
983
|
+
title: u.value[L]?.error ?? n.value.codePreviewHint
|
|
984
984
|
}, [
|
|
985
985
|
N[13] || (N[13] = a("svg", {
|
|
986
986
|
viewBox: "0 0 32 24",
|
|
@@ -996,37 +996,37 @@ const Tn = {
|
|
|
996
996
|
a("path", { d: "M10 8 6 12l4 4m12-8 4 4-4 4m-8 2 4-12" })
|
|
997
997
|
], -1)),
|
|
998
998
|
a("strong", null, l(D.kind === "qrcode" ? n.value.insertQrcode : (D.code?.symbology ?? "code128").toUpperCase()), 1),
|
|
999
|
-
a("span", null, l(
|
|
1000
|
-
|
|
1001
|
-
], 10, na)) :
|
|
999
|
+
a("span", null, l(u.value[L]?.text || n.value.codePlaceholder), 1),
|
|
1000
|
+
u.value[L]?.bound ? (v(), p("small", aa, l(D.binding?.field), 1)) : O("", !0)
|
|
1001
|
+
], 10, na)) : u.value[L]?.image ? (v(), p("img", {
|
|
1002
1002
|
key: 3,
|
|
1003
|
-
src:
|
|
1003
|
+
src: u.value[L]?.image,
|
|
1004
1004
|
alt: "",
|
|
1005
1005
|
draggable: "false"
|
|
1006
|
-
}, null, 8, oa)) : (
|
|
1006
|
+
}, null, 8, oa)) : (v(), p("div", {
|
|
1007
1007
|
key: 4,
|
|
1008
|
-
class: Ge(["mr-canvas-content", { "is-binding-error":
|
|
1009
|
-
title:
|
|
1008
|
+
class: Ge(["mr-canvas-content", { "is-binding-error": u.value[L]?.error, "is-bound-image": D.kind === "image" && D.binding }]),
|
|
1009
|
+
title: u.value[L]?.error === "image-binding" ? n.value.bindingImageHint : u.value[L]?.error,
|
|
1010
1010
|
style: Re({
|
|
1011
1011
|
color: D.style?.color,
|
|
1012
1012
|
backgroundColor: D.style?.backgroundColor,
|
|
1013
1013
|
fontWeight: D.style?.bold ? "700" : "400",
|
|
1014
|
-
fontSize: `${t(lt)(D.style).fontSizePx * t(
|
|
1014
|
+
fontSize: `${t(lt)(D.style).fontSizePx * t(c)}px`,
|
|
1015
1015
|
textAlign: D.style?.align,
|
|
1016
1016
|
justifyContent: D.style?.verticalAlign === "bottom" ? "flex-end" : D.style?.verticalAlign === "middle" ? "center" : "flex-start"
|
|
1017
1017
|
})
|
|
1018
|
-
}, l(
|
|
1019
|
-
H(L) && !
|
|
1018
|
+
}, l(u.value[L]?.text || (D.kind === "rect" ? "" : D.kind === "image" && D.binding ? n.value.boundImagePlaceholder : "")), 15, la)),
|
|
1019
|
+
H(L) && !I.value && !T(L) ? (v(), p("span", {
|
|
1020
1020
|
key: 5,
|
|
1021
1021
|
class: "mr-canvas-resize",
|
|
1022
1022
|
"aria-label": n.value.resizeComponent,
|
|
1023
1023
|
role: "separator",
|
|
1024
|
-
onPointerdown: (
|
|
1025
|
-
}, null, 40, ia)) :
|
|
1024
|
+
onPointerdown: (F) => t(P).start(F, D, !0)
|
|
1025
|
+
}, null, 40, ia)) : O("", !0)
|
|
1026
1026
|
], 46, Un))), 128))
|
|
1027
1027
|
], 4)
|
|
1028
1028
|
], 544),
|
|
1029
|
-
t(C) ? (
|
|
1029
|
+
t(C) ? (v(), p("footer", sa, [
|
|
1030
1030
|
a("span", null, l(n.value.wideNavigation), 1),
|
|
1031
1031
|
a("input", {
|
|
1032
1032
|
type: "range",
|
|
@@ -1034,10 +1034,10 @@ const Tn = {
|
|
|
1034
1034
|
max: "100",
|
|
1035
1035
|
value: t($),
|
|
1036
1036
|
"aria-label": n.value.wideNavigation,
|
|
1037
|
-
onInput: N[6] || (N[6] = (D) => t(
|
|
1037
|
+
onInput: N[6] || (N[6] = (D) => t(k)(Number(D.target.value)))
|
|
1038
1038
|
}, null, 40, ra),
|
|
1039
1039
|
a("span", null, l(t($)) + "%", 1)
|
|
1040
|
-
])) :
|
|
1040
|
+
])) : O("", !0)
|
|
1041
1041
|
]));
|
|
1042
1042
|
}
|
|
1043
1043
|
}), ua = /* @__PURE__ */ Ie(da, [["__scopeId", "data-v-c512529e"]]), ca = { class: "mr-component-binding" }, ma = ["value", "disabled"], va = { value: "static" }, ga = ["disabled"], pa = {
|
|
@@ -1057,26 +1057,26 @@ const Tn = {
|
|
|
1057
1057
|
},
|
|
1058
1058
|
emits: ["change"],
|
|
1059
1059
|
setup(e, { emit: s }) {
|
|
1060
|
-
const o = e, i = s, n = B(() => ({ ...
|
|
1061
|
-
function g(
|
|
1062
|
-
return
|
|
1060
|
+
const o = e, i = s, n = B(() => ({ ...Oe, ...o.messages })), r = B(() => o.component.binding), c = `mr-component-fields-${$t()?.uid ?? 0}`;
|
|
1061
|
+
function g(w) {
|
|
1062
|
+
return w.target.value;
|
|
1063
1063
|
}
|
|
1064
|
-
function h(
|
|
1065
|
-
!o.disabled && r.value && i("change", { ...r.value, ...
|
|
1064
|
+
function h(w) {
|
|
1065
|
+
!o.disabled && r.value && i("change", { ...r.value, ...w });
|
|
1066
1066
|
}
|
|
1067
|
-
function C(
|
|
1068
|
-
o.disabled || (g(
|
|
1067
|
+
function C(w) {
|
|
1068
|
+
o.disabled || (g(w) === "static" ? i("change", void 0) : o.repeat && i("change", { field: o.schema?.fields[0]?.field ?? "value" }));
|
|
1069
1069
|
}
|
|
1070
|
-
function $(
|
|
1070
|
+
function $(w) {
|
|
1071
1071
|
if (!r.value || o.disabled) return;
|
|
1072
|
-
const S = { ...r.value },
|
|
1073
|
-
|
|
1072
|
+
const S = { ...r.value }, k = g(w);
|
|
1073
|
+
k === "natural" ? delete S.format : S.format = k === "date" ? { kind: "date", pattern: "YYYY-MM-DD" } : { kind: k, digits: 2 }, i("change", S);
|
|
1074
1074
|
}
|
|
1075
|
-
function f(
|
|
1076
|
-
const S = g(
|
|
1077
|
-
S.trim() &&
|
|
1075
|
+
function f(w) {
|
|
1076
|
+
const S = g(w), k = r.value?.format;
|
|
1077
|
+
S.trim() && k && k.kind !== "date" && h({ format: { ...k, digits: Number(S) } });
|
|
1078
1078
|
}
|
|
1079
|
-
return (
|
|
1079
|
+
return (w, S) => (v(), p("div", ca, [
|
|
1080
1080
|
a("h3", null, l(n.value.componentContent), 1),
|
|
1081
1081
|
a("label", null, [
|
|
1082
1082
|
j(l(n.value.contentSource), 1),
|
|
@@ -1092,24 +1092,24 @@ const Tn = {
|
|
|
1092
1092
|
}, l(n.value.recordField), 9, ga)
|
|
1093
1093
|
], 40, ma)
|
|
1094
1094
|
]),
|
|
1095
|
-
e.repeat ?
|
|
1096
|
-
r.value ? (
|
|
1095
|
+
e.repeat ? O("", !0) : (v(), p("p", pa, l(n.value.bindingNeedsRepeat), 1)),
|
|
1096
|
+
r.value ? (v(), p(J, { key: 1 }, [
|
|
1097
1097
|
a("label", null, [
|
|
1098
1098
|
j(l(n.value.bindingField), 1),
|
|
1099
1099
|
a("input", {
|
|
1100
1100
|
value: r.value.field,
|
|
1101
|
-
list:
|
|
1101
|
+
list: c,
|
|
1102
1102
|
disabled: e.disabled,
|
|
1103
|
-
onChange: S[0] || (S[0] = (
|
|
1103
|
+
onChange: S[0] || (S[0] = (k) => g(k).trim() && h({ field: g(k).trim() }))
|
|
1104
1104
|
}, null, 40, fa)
|
|
1105
1105
|
]),
|
|
1106
|
-
a("datalist", { id:
|
|
1107
|
-
(
|
|
1108
|
-
key:
|
|
1109
|
-
value:
|
|
1110
|
-
}, l(
|
|
1106
|
+
a("datalist", { id: c }, [
|
|
1107
|
+
(v(!0), p(J, null, ne(e.schema?.fields ?? [], (k) => (v(), p("option", {
|
|
1108
|
+
key: k.field,
|
|
1109
|
+
value: k.field
|
|
1110
|
+
}, l(k.label), 9, ha))), 128))
|
|
1111
1111
|
]),
|
|
1112
|
-
e.component.kind === "text" ? (
|
|
1112
|
+
e.component.kind === "text" ? (v(), p("div", ba, [
|
|
1113
1113
|
a("label", null, [
|
|
1114
1114
|
j(l(n.value.valueFormat), 1),
|
|
1115
1115
|
a("select", {
|
|
@@ -1123,7 +1123,7 @@ const Tn = {
|
|
|
1123
1123
|
a("option", Ma, l(n.value.dateFormat), 1)
|
|
1124
1124
|
], 40, ya)
|
|
1125
1125
|
]),
|
|
1126
|
-
r.value.format && r.value.format.kind !== "date" ? (
|
|
1126
|
+
r.value.format && r.value.format.kind !== "date" ? (v(), p("label", Ca, [
|
|
1127
1127
|
j(l(n.value.decimalPlaces), 1),
|
|
1128
1128
|
a("input", {
|
|
1129
1129
|
type: "number",
|
|
@@ -1134,16 +1134,16 @@ const Tn = {
|
|
|
1134
1134
|
disabled: e.disabled,
|
|
1135
1135
|
onChange: f
|
|
1136
1136
|
}, null, 40, $a)
|
|
1137
|
-
])) : r.value.format?.kind === "date" ? (
|
|
1137
|
+
])) : r.value.format?.kind === "date" ? (v(), p("label", Sa, [
|
|
1138
1138
|
j(l(n.value.datePattern), 1),
|
|
1139
1139
|
a("input", {
|
|
1140
1140
|
value: r.value.format.pattern ?? "YYYY-MM-DD",
|
|
1141
1141
|
disabled: e.disabled,
|
|
1142
|
-
onChange: S[1] || (S[1] = (
|
|
1142
|
+
onChange: S[1] || (S[1] = (k) => h({ format: { kind: "date", pattern: g(k) } }))
|
|
1143
1143
|
}, null, 40, Ia)
|
|
1144
|
-
])) :
|
|
1145
|
-
])) :
|
|
1146
|
-
e.component.kind !== "image" ? (
|
|
1144
|
+
])) : O("", !0)
|
|
1145
|
+
])) : O("", !0),
|
|
1146
|
+
e.component.kind !== "image" ? (v(), p("details", Ta, [
|
|
1147
1147
|
a("summary", null, l(n.value.bindingDecoration), 1),
|
|
1148
1148
|
a("div", Ea, [
|
|
1149
1149
|
a("label", null, [
|
|
@@ -1151,7 +1151,7 @@ const Tn = {
|
|
|
1151
1151
|
a("input", {
|
|
1152
1152
|
value: r.value.prefix ?? "",
|
|
1153
1153
|
disabled: e.disabled,
|
|
1154
|
-
onChange: S[2] || (S[2] = (
|
|
1154
|
+
onChange: S[2] || (S[2] = (k) => h({ prefix: g(k) }))
|
|
1155
1155
|
}, null, 40, Ra)
|
|
1156
1156
|
]),
|
|
1157
1157
|
a("label", null, [
|
|
@@ -1159,7 +1159,7 @@ const Tn = {
|
|
|
1159
1159
|
a("input", {
|
|
1160
1160
|
value: r.value.suffix ?? "",
|
|
1161
1161
|
disabled: e.disabled,
|
|
1162
|
-
onChange: S[3] || (S[3] = (
|
|
1162
|
+
onChange: S[3] || (S[3] = (k) => h({ suffix: g(k) }))
|
|
1163
1163
|
}, null, 40, Pa)
|
|
1164
1164
|
])
|
|
1165
1165
|
]),
|
|
@@ -1168,15 +1168,15 @@ const Tn = {
|
|
|
1168
1168
|
a("input", {
|
|
1169
1169
|
value: r.value.emptyText ?? "",
|
|
1170
1170
|
disabled: e.disabled,
|
|
1171
|
-
onChange: S[4] || (S[4] = (
|
|
1171
|
+
onChange: S[4] || (S[4] = (k) => h({ emptyText: g(k) }))
|
|
1172
1172
|
}, null, 40, La)
|
|
1173
1173
|
])
|
|
1174
|
-
])) :
|
|
1174
|
+
])) : O("", !0),
|
|
1175
1175
|
a("p", Da, l(e.repeat?.dataset) + " · " + l(e.component.kind === "image" ? n.value.bindingImageHint : n.value.bindingRecordHint), 1)
|
|
1176
|
-
], 64)) :
|
|
1176
|
+
], 64)) : O("", !0)
|
|
1177
1177
|
]));
|
|
1178
1178
|
}
|
|
1179
|
-
}), Aa = /* @__PURE__ */ Ie(_a, [["__scopeId", "data-v-4558f265"]]), Ha = { class: "mr-code-properties" }, Na = { key: 0 },
|
|
1179
|
+
}), Aa = /* @__PURE__ */ Ie(_a, [["__scopeId", "data-v-4558f265"]]), Ha = { class: "mr-code-properties" }, Na = { key: 0 }, Oa = ["value", "disabled"], Fa = { key: 1 }, Ba = ["value", "disabled"], Ga = {
|
|
1180
1180
|
key: 2,
|
|
1181
1181
|
class: "mr-code-checkbox"
|
|
1182
1182
|
}, ja = ["checked", "disabled"], za = { class: "mr-code-advanced" }, Va = { class: "mr-code-grid" }, Wa = { key: 0 }, Ja = ["value", "disabled"], Ka = ["min", "value", "disabled"], Ua = { key: 0 }, qa = /* @__PURE__ */ Se({
|
|
@@ -1188,29 +1188,29 @@ const Tn = {
|
|
|
1188
1188
|
},
|
|
1189
1189
|
emits: ["change"],
|
|
1190
1190
|
setup(e, { emit: s }) {
|
|
1191
|
-
const o = e, i = s, n = B(() => ({ ...
|
|
1192
|
-
function
|
|
1191
|
+
const o = e, i = s, n = B(() => ({ ...Oe, ...o.messages })), r = B(() => o.component.kind === "qrcode" ? 4 : o.component.code?.symbology?.startsWith("ean") ? 11 : 10);
|
|
1192
|
+
function c(C) {
|
|
1193
1193
|
return C.target.value;
|
|
1194
1194
|
}
|
|
1195
1195
|
function g(C) {
|
|
1196
1196
|
o.disabled || i("change", { ...o.component.code, ...C });
|
|
1197
1197
|
}
|
|
1198
1198
|
function h(C) {
|
|
1199
|
-
const $ =
|
|
1199
|
+
const $ = c(C);
|
|
1200
1200
|
g({ symbology: $, quietZoneModules: $.startsWith("ean") ? 11 : 10 });
|
|
1201
1201
|
}
|
|
1202
|
-
return (C, $) => (
|
|
1202
|
+
return (C, $) => (v(), p("div", Ha, [
|
|
1203
1203
|
a("h3", null, l(n.value.codeSettings), 1),
|
|
1204
|
-
e.component.binding ?
|
|
1204
|
+
e.component.binding ? O("", !0) : (v(), p("label", Na, [
|
|
1205
1205
|
j(l(n.value.codeValue), 1),
|
|
1206
1206
|
a("textarea", {
|
|
1207
1207
|
rows: "2",
|
|
1208
1208
|
value: e.component.code?.value ?? e.component.fallbackText ?? e.component.text ?? "",
|
|
1209
1209
|
disabled: e.disabled,
|
|
1210
|
-
onChange: $[0] || ($[0] = (f) => g({ value:
|
|
1211
|
-
}, null, 40,
|
|
1210
|
+
onChange: $[0] || ($[0] = (f) => g({ value: c(f) }))
|
|
1211
|
+
}, null, 40, Oa)
|
|
1212
1212
|
])),
|
|
1213
|
-
e.component.kind === "barcode" ? (
|
|
1213
|
+
e.component.kind === "barcode" ? (v(), p("label", Fa, [
|
|
1214
1214
|
j(l(n.value.codeSymbology), 1),
|
|
1215
1215
|
a("select", {
|
|
1216
1216
|
value: e.component.code?.symbology ?? "code128",
|
|
@@ -1222,8 +1222,8 @@ const Tn = {
|
|
|
1222
1222
|
a("option", { value: "ean13" }, "EAN-13", -1),
|
|
1223
1223
|
a("option", { value: "ean8" }, "EAN-8", -1)
|
|
1224
1224
|
])], 40, Ba)
|
|
1225
|
-
])) :
|
|
1226
|
-
e.component.kind === "barcode" ? (
|
|
1225
|
+
])) : O("", !0),
|
|
1226
|
+
e.component.kind === "barcode" ? (v(), p("label", Ga, [
|
|
1227
1227
|
a("input", {
|
|
1228
1228
|
type: "checkbox",
|
|
1229
1229
|
checked: e.component.code?.showText === !0,
|
|
@@ -1231,23 +1231,23 @@ const Tn = {
|
|
|
1231
1231
|
onChange: $[1] || ($[1] = (f) => g({ showText: f.target.checked }))
|
|
1232
1232
|
}, null, 40, ja),
|
|
1233
1233
|
j(l(n.value.codeShowText), 1)
|
|
1234
|
-
])) :
|
|
1234
|
+
])) : O("", !0),
|
|
1235
1235
|
a("details", za, [
|
|
1236
1236
|
a("summary", null, l(n.value.codeAdvancedSettings), 1),
|
|
1237
1237
|
a("div", Va, [
|
|
1238
|
-
e.component.kind === "qrcode" ? (
|
|
1238
|
+
e.component.kind === "qrcode" ? (v(), p("label", Wa, [
|
|
1239
1239
|
j(l(n.value.codeCorrection), 1),
|
|
1240
1240
|
a("select", {
|
|
1241
1241
|
value: e.component.code?.errorCorrection ?? "M",
|
|
1242
1242
|
disabled: e.disabled,
|
|
1243
|
-
onChange: $[2] || ($[2] = (f) => g({ errorCorrection:
|
|
1243
|
+
onChange: $[2] || ($[2] = (f) => g({ errorCorrection: c(f) }))
|
|
1244
1244
|
}, [...$[5] || ($[5] = [
|
|
1245
1245
|
a("option", { value: "L" }, "L · 7%", -1),
|
|
1246
1246
|
a("option", { value: "M" }, "M · 15%", -1),
|
|
1247
1247
|
a("option", { value: "Q" }, "Q · 25%", -1),
|
|
1248
1248
|
a("option", { value: "H" }, "H · 30%", -1)
|
|
1249
1249
|
])], 40, Ja)
|
|
1250
|
-
])) :
|
|
1250
|
+
])) : O("", !0),
|
|
1251
1251
|
a("label", null, [
|
|
1252
1252
|
j(l(n.value.codeQuietZone), 1),
|
|
1253
1253
|
a("input", {
|
|
@@ -1257,11 +1257,11 @@ const Tn = {
|
|
|
1257
1257
|
step: "1",
|
|
1258
1258
|
value: e.component.code?.quietZoneModules ?? r.value,
|
|
1259
1259
|
disabled: e.disabled,
|
|
1260
|
-
onChange: $[3] || ($[3] = (f) =>
|
|
1260
|
+
onChange: $[3] || ($[3] = (f) => c(f).trim() && g({ quietZoneModules: Number(c(f)) }))
|
|
1261
1261
|
}, null, 40, Ka)
|
|
1262
1262
|
])
|
|
1263
1263
|
]),
|
|
1264
|
-
e.component.kind === "barcode" ? (
|
|
1264
|
+
e.component.kind === "barcode" ? (v(), p("p", Ua, l(e.component.code?.symbology?.startsWith("ean") ? n.value.eanContentHint : e.component.code?.symbology === "code39" ? n.value.code39ContentHint : n.value.code128ContentHint), 1)) : O("", !0),
|
|
1265
1265
|
a("p", null, l(n.value.codePreviewHint), 1)
|
|
1266
1266
|
])
|
|
1267
1267
|
]));
|
|
@@ -1295,20 +1295,20 @@ const Tn = {
|
|
|
1295
1295
|
emits: ["update:modelValue"],
|
|
1296
1296
|
setup(e, { emit: s }) {
|
|
1297
1297
|
const o = e, i = s, n = () => o.allowAuto ? ["auto", "left", "center", "right", "justify"] : ["left", "center", "right", "justify"];
|
|
1298
|
-
async function r(
|
|
1299
|
-
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(
|
|
1300
|
-
|
|
1301
|
-
const C = n(), $ = C.indexOf(g), f =
|
|
1298
|
+
async function r(c, g) {
|
|
1299
|
+
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(c.key)) return;
|
|
1300
|
+
c.preventDefault();
|
|
1301
|
+
const C = n(), $ = C.indexOf(g), f = c.key === "Home" ? 0 : c.key === "End" ? C.length - 1 : ($ + (c.key === "ArrowRight" ? 1 : -1) + C.length) % C.length;
|
|
1302
1302
|
i("update:modelValue", C[f]);
|
|
1303
|
-
const
|
|
1304
|
-
await he(),
|
|
1303
|
+
const w = c.currentTarget.parentElement;
|
|
1304
|
+
await he(), w?.querySelector(`[data-align="${C[f]}"]`)?.focus();
|
|
1305
1305
|
}
|
|
1306
|
-
return (
|
|
1306
|
+
return (c, g) => (v(), p("div", {
|
|
1307
1307
|
class: "mr-designer-alignment",
|
|
1308
1308
|
role: "radiogroup",
|
|
1309
1309
|
"aria-label": e.label
|
|
1310
1310
|
}, [
|
|
1311
|
-
(
|
|
1311
|
+
(v(!0), p(J, null, ne(n(), (h) => (v(), p("button", {
|
|
1312
1312
|
key: h,
|
|
1313
1313
|
type: "button",
|
|
1314
1314
|
role: "radio",
|
|
@@ -1320,8 +1320,8 @@ const Tn = {
|
|
|
1320
1320
|
onClick: (C) => i("update:modelValue", h),
|
|
1321
1321
|
onKeydown: (C) => r(C, h)
|
|
1322
1322
|
}, [
|
|
1323
|
-
h === "auto" ? (
|
|
1324
|
-
h === "left" ? (
|
|
1323
|
+
h === "auto" ? (v(), p("span", Qa, l(e.autoLabel), 1)) : (v(), p("svg", eo, [
|
|
1324
|
+
h === "left" ? (v(), p("path", to)) : h === "center" ? (v(), p("path", no)) : h === "right" ? (v(), p("path", ao)) : (v(), p("path", oo))
|
|
1325
1325
|
]))
|
|
1326
1326
|
], 40, Za))), 128))
|
|
1327
1327
|
], 8, Xa));
|
|
@@ -1344,23 +1344,23 @@ const Tn = {
|
|
|
1344
1344
|
},
|
|
1345
1345
|
emits: ["geometry", "patch"],
|
|
1346
1346
|
setup(e, { emit: s }) {
|
|
1347
|
-
const o = e, i = s, n = B(() => ({ ...
|
|
1347
|
+
const o = e, i = s, n = B(() => ({ ...Oe, ...o.messages })), r = z(""), c = ["leftMm", "topMm", "widthMm", "heightMm"], g = B(() => [
|
|
1348
1348
|
n.value.leftPosition,
|
|
1349
1349
|
n.value.topPosition,
|
|
1350
1350
|
n.value.componentWidth,
|
|
1351
1351
|
n.value.componentHeight
|
|
1352
1352
|
]);
|
|
1353
|
-
function h(S,
|
|
1353
|
+
function h(S, k) {
|
|
1354
1354
|
if (o.disabled || o.geometryDisabled) return;
|
|
1355
|
-
const
|
|
1356
|
-
if (!Number.isFinite(
|
|
1357
|
-
const
|
|
1358
|
-
o.component.kind === "qrcode" && (S === "widthMm" || S === "heightMm") && (
|
|
1355
|
+
const I = Number(k.target.value);
|
|
1356
|
+
if (!Number.isFinite(I)) return;
|
|
1357
|
+
const M = { ...Me(o.component), [S]: I };
|
|
1358
|
+
o.component.kind === "qrcode" && (S === "widthMm" || S === "heightMm") && (M.widthMm = M.heightMm = I), i("geometry", M);
|
|
1359
1359
|
}
|
|
1360
|
-
function C(S,
|
|
1360
|
+
function C(S, k) {
|
|
1361
1361
|
if (o.component.kind === "list") return;
|
|
1362
|
-
const
|
|
1363
|
-
S === "fontSize" && delete
|
|
1362
|
+
const I = { ...o.component.style, [S]: k };
|
|
1363
|
+
S === "fontSize" && delete I.fontSizePx, i("patch", { style: I });
|
|
1364
1364
|
}
|
|
1365
1365
|
const $ = B(() => ({
|
|
1366
1366
|
auto: n.value.auto,
|
|
@@ -1372,55 +1372,55 @@ const Tn = {
|
|
|
1372
1372
|
function f(S) {
|
|
1373
1373
|
return S.target.value;
|
|
1374
1374
|
}
|
|
1375
|
-
async function
|
|
1376
|
-
const
|
|
1377
|
-
if (!
|
|
1375
|
+
async function w(S) {
|
|
1376
|
+
const k = S.target, I = k.files?.[0];
|
|
1377
|
+
if (!I) return;
|
|
1378
1378
|
r.value = "";
|
|
1379
|
-
const
|
|
1379
|
+
const M = o.component;
|
|
1380
1380
|
try {
|
|
1381
|
-
if (
|
|
1382
|
-
|
|
1381
|
+
if (I.size > 4 * 1024 * 1024 || !["image/png", "image/jpeg", "image/webp", "image/svg+xml"].includes(
|
|
1382
|
+
I.type
|
|
1383
1383
|
))
|
|
1384
1384
|
throw new Error(n.value.imageBudget);
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1385
|
+
const u = new FileReader(), b = await new Promise((R, A) => {
|
|
1386
|
+
u.onload = () => R(String(u.result)), u.onerror = () => A(u.error), u.readAsDataURL(I);
|
|
1387
1387
|
});
|
|
1388
|
-
!o.disabled && o.component ===
|
|
1389
|
-
} catch (
|
|
1390
|
-
r.value =
|
|
1388
|
+
!o.disabled && o.component === M && i("patch", { imageData: b });
|
|
1389
|
+
} catch (u) {
|
|
1390
|
+
r.value = u instanceof Error ? u.message : String(u);
|
|
1391
1391
|
} finally {
|
|
1392
|
-
|
|
1392
|
+
k.value = "";
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
|
-
return (S,
|
|
1395
|
+
return (S, k) => (v(), p("fieldset", {
|
|
1396
1396
|
class: "mr-component-properties",
|
|
1397
1397
|
disabled: e.disabled
|
|
1398
1398
|
}, [
|
|
1399
1399
|
a("div", so, [
|
|
1400
|
-
["text", "image", "barcode", "qrcode"].includes(e.component.kind) && e.component.kind !== "list" && !e.component.grid ? (
|
|
1400
|
+
["text", "image", "barcode", "qrcode"].includes(e.component.kind) && e.component.kind !== "list" && !e.component.grid ? (v(), xe(Aa, {
|
|
1401
1401
|
key: 0,
|
|
1402
1402
|
component: e.component,
|
|
1403
1403
|
repeat: e.repeat,
|
|
1404
1404
|
schema: e.schema,
|
|
1405
1405
|
disabled: e.disabled,
|
|
1406
1406
|
messages: n.value,
|
|
1407
|
-
onChange:
|
|
1408
|
-
}, null, 8, ["component", "repeat", "schema", "disabled", "messages"])) :
|
|
1409
|
-
e.component.kind === "text" && !e.component.binding ? (
|
|
1407
|
+
onChange: k[0] || (k[0] = (I) => i("patch", { binding: I, ...["barcode", "qrcode"].includes(e.component.kind) ? { imageData: void 0 } : {} }))
|
|
1408
|
+
}, null, 8, ["component", "repeat", "schema", "disabled", "messages"])) : O("", !0),
|
|
1409
|
+
e.component.kind === "text" && !e.component.binding ? (v(), p("label", ro, [
|
|
1410
1410
|
j(l(n.value.componentText), 1),
|
|
1411
1411
|
a("textarea", {
|
|
1412
1412
|
rows: "3",
|
|
1413
1413
|
value: e.component.text,
|
|
1414
|
-
onChange:
|
|
1414
|
+
onChange: k[1] || (k[1] = (I) => i("patch", { text: f(I) }))
|
|
1415
1415
|
}, null, 40, uo)
|
|
1416
|
-
])) :
|
|
1417
|
-
e.component.kind === "image" && !e.component.binding ? (
|
|
1416
|
+
])) : O("", !0),
|
|
1417
|
+
e.component.kind === "image" && !e.component.binding ? (v(), p(J, { key: 2 }, [
|
|
1418
1418
|
a("label", null, [
|
|
1419
1419
|
j(l(n.value.imageSource), 1),
|
|
1420
1420
|
a("textarea", {
|
|
1421
1421
|
rows: "2",
|
|
1422
1422
|
value: e.component.imageData,
|
|
1423
|
-
onChange:
|
|
1423
|
+
onChange: k[2] || (k[2] = (I) => i("patch", { imageData: f(I) }))
|
|
1424
1424
|
}, null, 40, co)
|
|
1425
1425
|
]),
|
|
1426
1426
|
a("label", mo, [
|
|
@@ -1429,27 +1429,27 @@ const Tn = {
|
|
|
1429
1429
|
type: "file",
|
|
1430
1430
|
accept: "image/png,image/jpeg,image/webp,image/svg+xml",
|
|
1431
1431
|
"aria-label": n.value.imageUpload,
|
|
1432
|
-
onChange:
|
|
1432
|
+
onChange: w
|
|
1433
1433
|
}, null, 40, vo)
|
|
1434
1434
|
]),
|
|
1435
|
-
r.value ? (
|
|
1436
|
-
], 64)) :
|
|
1437
|
-
e.component.kind === "barcode" || e.component.kind === "qrcode" ? (
|
|
1435
|
+
r.value ? (v(), p("p", go, l(r.value), 1)) : O("", !0)
|
|
1436
|
+
], 64)) : O("", !0),
|
|
1437
|
+
e.component.kind === "barcode" || e.component.kind === "qrcode" ? (v(), xe(Ya, {
|
|
1438
1438
|
key: 3,
|
|
1439
1439
|
component: e.component,
|
|
1440
1440
|
disabled: e.disabled,
|
|
1441
1441
|
messages: n.value,
|
|
1442
|
-
onChange:
|
|
1443
|
-
}, null, 8, ["component", "disabled", "messages"])) :
|
|
1444
|
-
e.component.kind === "list" ? (
|
|
1442
|
+
onChange: k[3] || (k[3] = (I) => i("patch", { code: I, imageData: void 0 }))
|
|
1443
|
+
}, null, 8, ["component", "disabled", "messages"])) : O("", !0),
|
|
1444
|
+
e.component.kind === "list" ? (v(), p("label", po, [
|
|
1445
1445
|
j(l(n.value.listDataset), 1),
|
|
1446
1446
|
a("input", {
|
|
1447
1447
|
value: e.component.dataset,
|
|
1448
|
-
onChange:
|
|
1448
|
+
onChange: k[4] || (k[4] = (I) => i("patch", { dataset: f(I) }))
|
|
1449
1449
|
}, null, 40, fo)
|
|
1450
|
-
])) :
|
|
1450
|
+
])) : O("", !0)
|
|
1451
1451
|
]),
|
|
1452
|
-
e.component.kind === "text" ? (
|
|
1452
|
+
e.component.kind === "text" ? (v(), p("div", ho, [
|
|
1453
1453
|
a("h3", null, l(n.value.textFormat), 1),
|
|
1454
1454
|
a("div", bo, [
|
|
1455
1455
|
a("label", null, [
|
|
@@ -1459,7 +1459,7 @@ const Tn = {
|
|
|
1459
1459
|
min: "1",
|
|
1460
1460
|
max: "200",
|
|
1461
1461
|
value: t(lt)(e.component.style).fontSizePt,
|
|
1462
|
-
onChange:
|
|
1462
|
+
onChange: k[5] || (k[5] = (I) => C("fontSize", Number(f(I))))
|
|
1463
1463
|
}, null, 40, yo)
|
|
1464
1464
|
]),
|
|
1465
1465
|
a("label", null, [
|
|
@@ -1467,7 +1467,7 @@ const Tn = {
|
|
|
1467
1467
|
a("input", {
|
|
1468
1468
|
type: "checkbox",
|
|
1469
1469
|
checked: e.component.style?.bold === !0,
|
|
1470
|
-
onChange:
|
|
1470
|
+
onChange: k[6] || (k[6] = (I) => C("bold", I.target.checked))
|
|
1471
1471
|
}, null, 40, wo)
|
|
1472
1472
|
])
|
|
1473
1473
|
]),
|
|
@@ -1476,7 +1476,7 @@ const Tn = {
|
|
|
1476
1476
|
label: n.value.bodyAlign,
|
|
1477
1477
|
labels: $.value,
|
|
1478
1478
|
"auto-label": n.value.autoShort,
|
|
1479
|
-
"onUpdate:modelValue":
|
|
1479
|
+
"onUpdate:modelValue": k[7] || (k[7] = (I) => C("align", I))
|
|
1480
1480
|
}, null, 8, ["model-value", "label", "labels", "auto-label"]),
|
|
1481
1481
|
a("div", ko, [
|
|
1482
1482
|
a("label", null, [
|
|
@@ -1484,7 +1484,7 @@ const Tn = {
|
|
|
1484
1484
|
a("input", {
|
|
1485
1485
|
type: "color",
|
|
1486
1486
|
value: e.component.style?.color ?? "#233c5c",
|
|
1487
|
-
onChange:
|
|
1487
|
+
onChange: k[8] || (k[8] = (I) => C("color", f(I)))
|
|
1488
1488
|
}, null, 40, xo)
|
|
1489
1489
|
]),
|
|
1490
1490
|
a("label", null, [
|
|
@@ -1492,11 +1492,11 @@ const Tn = {
|
|
|
1492
1492
|
a("input", {
|
|
1493
1493
|
type: "color",
|
|
1494
1494
|
value: e.component.style?.backgroundColor ?? "#ffffff",
|
|
1495
|
-
onChange:
|
|
1495
|
+
onChange: k[9] || (k[9] = (I) => C("backgroundColor", f(I)))
|
|
1496
1496
|
}, null, 40, Mo)
|
|
1497
1497
|
])
|
|
1498
1498
|
])
|
|
1499
|
-
])) :
|
|
1499
|
+
])) : O("", !0),
|
|
1500
1500
|
a("details", {
|
|
1501
1501
|
class: "mr-component-position",
|
|
1502
1502
|
open: !e.repeat
|
|
@@ -1506,36 +1506,36 @@ const Tn = {
|
|
|
1506
1506
|
a("span", null, l(t(Me)(e.component).widthMm) + " × " + l(t(Me)(e.component).heightMm), 1)
|
|
1507
1507
|
]),
|
|
1508
1508
|
a("div", $o, [
|
|
1509
|
-
(
|
|
1510
|
-
(
|
|
1511
|
-
), (
|
|
1512
|
-
j(l(g.value[
|
|
1509
|
+
(v(!0), p(J, null, ne(c.filter(
|
|
1510
|
+
(I) => e.component.kind !== "list" || I !== "heightMm"
|
|
1511
|
+
), (I, M) => (v(), p("label", { key: I }, [
|
|
1512
|
+
j(l(g.value[M]), 1),
|
|
1513
1513
|
a("input", {
|
|
1514
1514
|
type: "number",
|
|
1515
1515
|
step: "0.5",
|
|
1516
|
-
min:
|
|
1517
|
-
value: t(Me)(e.component)[
|
|
1516
|
+
min: I === "widthMm" || I === "heightMm" ? 2 : 0,
|
|
1517
|
+
value: t(Me)(e.component)[I],
|
|
1518
1518
|
disabled: e.geometryDisabled,
|
|
1519
|
-
onChange: (
|
|
1519
|
+
onChange: (u) => h(I, u)
|
|
1520
1520
|
}, null, 40, So)
|
|
1521
1521
|
]))), 128))
|
|
1522
1522
|
]),
|
|
1523
|
-
e.component.kind !== "list" && !e.repeat ? (
|
|
1523
|
+
e.component.kind !== "list" && !e.repeat ? (v(), p("label", Io, [
|
|
1524
1524
|
j(l(n.value.repeatPage), 1),
|
|
1525
1525
|
a("select", {
|
|
1526
1526
|
value: e.component.pageAnchor ?? "",
|
|
1527
1527
|
disabled: e.geometryDisabled,
|
|
1528
|
-
onChange:
|
|
1528
|
+
onChange: k[10] || (k[10] = (I) => i("patch", { pageAnchor: f(I) || void 0 }))
|
|
1529
1529
|
}, [
|
|
1530
1530
|
a("option", Eo, l(n.value.repeatNone), 1),
|
|
1531
1531
|
a("option", Ro, l(n.value.repeatHeader), 1),
|
|
1532
1532
|
a("option", Po, l(n.value.repeatFooter), 1)
|
|
1533
1533
|
], 40, To)
|
|
1534
|
-
])) :
|
|
1534
|
+
])) : O("", !0)
|
|
1535
1535
|
], 8, Co)
|
|
1536
1536
|
], 8, io));
|
|
1537
1537
|
}
|
|
1538
|
-
}), Do = /* @__PURE__ */ Ie(Lo, [["__scopeId", "data-v-435b5126"]]), _o = ["disabled"], Ao = { class: "mr-page-section-heading" }, Ho = ["aria-label"], No = ["aria-pressed", "onClick"],
|
|
1538
|
+
}), Do = /* @__PURE__ */ Ie(Lo, [["__scopeId", "data-v-435b5126"]]), _o = ["disabled"], Ao = { class: "mr-page-section-heading" }, Ho = ["aria-label"], No = ["aria-pressed", "onClick"], Oo = { class: "mr-page-actions" }, Fo = ["disabled"], Bo = {
|
|
1539
1539
|
key: 0,
|
|
1540
1540
|
class: "mr-page-confirm",
|
|
1541
1541
|
role: "alert"
|
|
@@ -1553,26 +1553,26 @@ const Tn = {
|
|
|
1553
1553
|
},
|
|
1554
1554
|
emits: ["select", "command", "locate"],
|
|
1555
1555
|
setup(e, { emit: s }) {
|
|
1556
|
-
const o = e, i = s, n = B(() => ({ ...
|
|
1556
|
+
const o = e, i = s, n = B(() => ({ ...Oe, ...o.messages })), r = B(() => o.document.template.pages[o.pageIndex]), c = B(() => wt.find((M) => M.widthMm === r.value.widthMm && M.heightMm === r.value.heightMm)?.id ?? "custom"), g = B(() => Jt(r.value)), h = z(!1);
|
|
1557
1557
|
le(() => [o.pageIndex, o.document], () => {
|
|
1558
1558
|
h.value = !1;
|
|
1559
1559
|
});
|
|
1560
1560
|
const C = ["marginTopMm", "marginRightMm", "marginBottomMm", "marginLeftMm"], $ = B(() => [n.value.marginTop, n.value.marginRight, n.value.marginBottom, n.value.marginLeft]);
|
|
1561
|
-
function f(
|
|
1562
|
-
return
|
|
1561
|
+
function f(M) {
|
|
1562
|
+
return M.target.value;
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1565
|
-
o.disabled || i("command", { type: "patch", patch:
|
|
1564
|
+
function w(M) {
|
|
1565
|
+
o.disabled || i("command", { type: "patch", patch: M });
|
|
1566
1566
|
}
|
|
1567
|
-
function S(
|
|
1568
|
-
const
|
|
1569
|
-
|
|
1567
|
+
function S(M) {
|
|
1568
|
+
const u = wt.find((b) => b.id === f(M));
|
|
1569
|
+
u && w({ widthMm: u.widthMm, heightMm: u.heightMm, layout: "page" });
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1572
|
-
const b = f(
|
|
1573
|
-
b.trim() && Number.isFinite(Number(b)) &&
|
|
1571
|
+
function k(M, u) {
|
|
1572
|
+
const b = f(u);
|
|
1573
|
+
b.trim() && Number.isFinite(Number(b)) && w({ [M]: Number(b) });
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function I() {
|
|
1576
1576
|
if (!(o.disabled || o.document.template.pages.length <= 1)) {
|
|
1577
1577
|
if (r.value.components.length && !h.value) {
|
|
1578
1578
|
h.value = !0;
|
|
@@ -1581,7 +1581,7 @@ const Tn = {
|
|
|
1581
1581
|
i("command", { type: "remove" }), h.value = !1;
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
|
-
return (
|
|
1584
|
+
return (M, u) => (v(), p("fieldset", {
|
|
1585
1585
|
class: "mr-page-properties",
|
|
1586
1586
|
disabled: e.disabled
|
|
1587
1587
|
}, [
|
|
@@ -1593,59 +1593,59 @@ const Tn = {
|
|
|
1593
1593
|
class: "mr-page-list",
|
|
1594
1594
|
"aria-label": n.value.pageDirectory
|
|
1595
1595
|
}, [
|
|
1596
|
-
(
|
|
1597
|
-
key:
|
|
1596
|
+
(v(!0), p(J, null, ne(e.document.template.pages, (b, R) => (v(), p("button", {
|
|
1597
|
+
key: R,
|
|
1598
1598
|
type: "button",
|
|
1599
|
-
"aria-pressed": e.pageIndex ===
|
|
1600
|
-
onClick: (A) => i("select",
|
|
1599
|
+
"aria-pressed": e.pageIndex === R,
|
|
1600
|
+
onClick: (A) => i("select", R)
|
|
1601
1601
|
}, [
|
|
1602
|
-
a("span", null, l(
|
|
1603
|
-
a("strong", null, l(t(Ue)(b,
|
|
1602
|
+
a("span", null, l(R + 1), 1),
|
|
1603
|
+
a("strong", null, l(t(Ue)(b, R, n.value.page)), 1),
|
|
1604
1604
|
a("small", null, l(b.widthMm) + " × " + l(b.heightMm), 1)
|
|
1605
1605
|
], 8, No))), 128))
|
|
1606
1606
|
], 8, Ho),
|
|
1607
|
-
a("div",
|
|
1607
|
+
a("div", Oo, [
|
|
1608
1608
|
a("button", {
|
|
1609
1609
|
type: "button",
|
|
1610
|
-
onClick:
|
|
1610
|
+
onClick: u[0] || (u[0] = (b) => i("command", { type: "add" }))
|
|
1611
1611
|
}, "+ " + l(n.value.addPage), 1),
|
|
1612
1612
|
a("button", {
|
|
1613
1613
|
type: "button",
|
|
1614
|
-
onClick:
|
|
1614
|
+
onClick: u[1] || (u[1] = (b) => i("command", { type: "duplicate" }))
|
|
1615
1615
|
}, l(n.value.duplicatePage), 1),
|
|
1616
1616
|
a("button", {
|
|
1617
1617
|
type: "button",
|
|
1618
1618
|
disabled: e.disabled || e.document.template.pages.length <= 1,
|
|
1619
|
-
onClick:
|
|
1620
|
-
}, l(n.value.removePage), 9,
|
|
1619
|
+
onClick: I
|
|
1620
|
+
}, l(n.value.removePage), 9, Fo)
|
|
1621
1621
|
]),
|
|
1622
|
-
h.value ? (
|
|
1622
|
+
h.value ? (v(), p("div", Bo, [
|
|
1623
1623
|
a("span", null, l(n.value.removePageConfirm), 1),
|
|
1624
1624
|
a("button", {
|
|
1625
1625
|
type: "button",
|
|
1626
|
-
onClick:
|
|
1626
|
+
onClick: u[2] || (u[2] = (b) => h.value = !1)
|
|
1627
1627
|
}, l(n.value.keepEditing), 1),
|
|
1628
1628
|
a("button", {
|
|
1629
1629
|
type: "button",
|
|
1630
|
-
onClick:
|
|
1630
|
+
onClick: I
|
|
1631
1631
|
}, l(n.value.confirmRemovePage), 1)
|
|
1632
|
-
])) :
|
|
1632
|
+
])) : O("", !0),
|
|
1633
1633
|
a("label", null, [
|
|
1634
1634
|
j(l(n.value.pageName), 1),
|
|
1635
1635
|
a("input", {
|
|
1636
1636
|
value: r.value.meta?.title ?? "",
|
|
1637
1637
|
placeholder: `${n.value.page} ${e.pageIndex + 1}`,
|
|
1638
1638
|
maxlength: "120",
|
|
1639
|
-
onChange:
|
|
1639
|
+
onChange: u[3] || (u[3] = (b) => w({ meta: { ...r.value.meta, title: f(b) } }))
|
|
1640
1640
|
}, null, 40, Go)
|
|
1641
1641
|
]),
|
|
1642
1642
|
a("label", null, [
|
|
1643
1643
|
j(l(n.value.paperPreset), 1),
|
|
1644
1644
|
a("select", {
|
|
1645
|
-
value:
|
|
1645
|
+
value: c.value,
|
|
1646
1646
|
onChange: S
|
|
1647
1647
|
}, [
|
|
1648
|
-
(
|
|
1648
|
+
(v(!0), p(J, null, ne(t(wt), (b) => (v(), p("option", {
|
|
1649
1649
|
key: b.id,
|
|
1650
1650
|
value: b.id
|
|
1651
1651
|
}, l(b.id.startsWith("label") ? n.value.labelPaper : b.id.toUpperCase()) + " · " + l(b.widthMm) + " × " + l(b.heightMm) + " mm", 9, zo))), 128)),
|
|
@@ -1660,7 +1660,7 @@ const Tn = {
|
|
|
1660
1660
|
min: "1",
|
|
1661
1661
|
step: "0.5",
|
|
1662
1662
|
value: r.value.widthMm,
|
|
1663
|
-
onChange:
|
|
1663
|
+
onChange: u[4] || (u[4] = (b) => k("widthMm", b))
|
|
1664
1664
|
}, null, 40, Jo)
|
|
1665
1665
|
]),
|
|
1666
1666
|
a("label", null, [
|
|
@@ -1671,7 +1671,7 @@ const Tn = {
|
|
|
1671
1671
|
max: "4999",
|
|
1672
1672
|
step: "0.5",
|
|
1673
1673
|
value: r.value.heightMm,
|
|
1674
|
-
onChange:
|
|
1674
|
+
onChange: u[5] || (u[5] = (b) => k("heightMm", b))
|
|
1675
1675
|
}, null, 40, Ko)
|
|
1676
1676
|
])
|
|
1677
1677
|
]),
|
|
@@ -1679,7 +1679,7 @@ const Tn = {
|
|
|
1679
1679
|
j(l(n.value.pageLayout), 1),
|
|
1680
1680
|
a("select", {
|
|
1681
1681
|
value: r.value.layout ?? "page",
|
|
1682
|
-
onChange:
|
|
1682
|
+
onChange: u[6] || (u[6] = (b) => w({ layout: f(b) }))
|
|
1683
1683
|
}, [
|
|
1684
1684
|
a("option", qo, l(n.value.fixedPaper), 1),
|
|
1685
1685
|
a("option", {
|
|
@@ -1691,26 +1691,26 @@ const Tn = {
|
|
|
1691
1691
|
a("details", null, [
|
|
1692
1692
|
a("summary", null, l(n.value.pageMargins), 1),
|
|
1693
1693
|
a("div", Xo, [
|
|
1694
|
-
(
|
|
1695
|
-
j(l($.value[
|
|
1694
|
+
(v(), p(J, null, ne(C, (b, R) => a("label", { key: b }, [
|
|
1695
|
+
j(l($.value[R]), 1),
|
|
1696
1696
|
a("input", {
|
|
1697
1697
|
type: "number",
|
|
1698
1698
|
min: "0",
|
|
1699
1699
|
step: "0.5",
|
|
1700
1700
|
value: r.value[b] ?? 0,
|
|
1701
|
-
onChange: (A) =>
|
|
1701
|
+
onChange: (A) => k(b, A)
|
|
1702
1702
|
}, null, 40, Zo)
|
|
1703
1703
|
])), 64))
|
|
1704
1704
|
])
|
|
1705
1705
|
]),
|
|
1706
|
-
g.value.length ? (
|
|
1706
|
+
g.value.length ? (v(), p("div", Qo, [
|
|
1707
1707
|
a("strong", null, l(n.value.pageOverflow.replace("{count}", String(g.value.length))), 1),
|
|
1708
1708
|
a("p", null, l(n.value.pageOverflowHint), 1),
|
|
1709
1709
|
a("button", {
|
|
1710
1710
|
type: "button",
|
|
1711
|
-
onClick:
|
|
1711
|
+
onClick: u[7] || (u[7] = (b) => i("locate", g.value[0]))
|
|
1712
1712
|
}, l(n.value.locateOverflow), 1)
|
|
1713
|
-
])) :
|
|
1713
|
+
])) : O("", !0)
|
|
1714
1714
|
], 8, _o));
|
|
1715
1715
|
}
|
|
1716
1716
|
}), tl = /* @__PURE__ */ Ie(el, [["__scopeId", "data-v-da0b7ab6"]]), nl = ["disabled"], al = { class: "mr-repeat-toggle" }, ol = ["checked", "disabled"], ll = ["value", "list"], il = ["id"], sl = ["value"], rl = ["value"], dl = ["value"], ul = { class: "mr-repeat-grid" }, cl = ["value"], ml = { value: "fixed" }, vl = { value: "field" }, gl = { key: 0 }, pl = ["value"], fl = { key: 1 }, hl = ["value"], bl = { class: "mr-repeat-note" }, yl = /* @__PURE__ */ Se({
|
|
@@ -1724,25 +1724,25 @@ const Tn = {
|
|
|
1724
1724
|
},
|
|
1725
1725
|
emits: ["change"],
|
|
1726
1726
|
setup(e, { emit: s }) {
|
|
1727
|
-
const o = e, i = s, n = B(() => ({ ...
|
|
1728
|
-
function
|
|
1729
|
-
return
|
|
1727
|
+
const o = e, i = s, n = B(() => ({ ...Oe, ...o.messages })), r = B(() => o.document.template.repeat), c = B(() => o.schemas?.[r.value?.dataset ?? ""]?.fields ?? []), g = B(() => [.../* @__PURE__ */ new Set([...o.datasets ?? [], ...Object.keys(o.schemas ?? {}), ...r.value ? [r.value.dataset] : []])]), h = B(() => o.document.template.pages.some((u) => u.components.some((b) => b.kind !== "list" && b.binding))), C = B(() => o.document.template.pages.some((u) => u.layout === "wide" || !!u.flow || u.components.some((b) => b.kind === "list") || Jt(u).length > 0)), $ = B(() => typeof r.value?.copies == "object" ? "field" : "fixed"), f = `mr-repeat-fields-${$t()?.uid ?? 0}`;
|
|
1728
|
+
function w(u) {
|
|
1729
|
+
return u.target.value;
|
|
1730
1730
|
}
|
|
1731
|
-
function S(
|
|
1732
|
-
!o.disabled && r.value && i("change", { ...r.value, ...
|
|
1731
|
+
function S(u) {
|
|
1732
|
+
!o.disabled && r.value && i("change", { ...r.value, ...u });
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1735
|
-
o.disabled || (
|
|
1734
|
+
function k(u) {
|
|
1735
|
+
o.disabled || (u.target.checked ? C.value || i("change", { dataset: g.value[0] ?? "detail", copies: 1 }) : h.value || i("change", void 0));
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1737
|
+
function I(u) {
|
|
1738
1738
|
if (!r.value || o.disabled) return;
|
|
1739
|
-
const b = { ...r.value },
|
|
1740
|
-
|
|
1739
|
+
const b = { ...r.value }, R = w(u).trim();
|
|
1740
|
+
R ? b.rowKey = R : delete b.rowKey, i("change", b);
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1743
|
-
S({ copies:
|
|
1742
|
+
function M(u) {
|
|
1743
|
+
S({ copies: w(u) === "field" ? { field: c.value.find((b) => b.type === "number")?.field ?? "copies" } : 1 });
|
|
1744
1744
|
}
|
|
1745
|
-
return (
|
|
1745
|
+
return (u, b) => (v(), p("fieldset", {
|
|
1746
1746
|
class: "mr-repeat-properties",
|
|
1747
1747
|
disabled: e.disabled
|
|
1748
1748
|
}, [
|
|
@@ -1755,24 +1755,24 @@ const Tn = {
|
|
|
1755
1755
|
type: "checkbox",
|
|
1756
1756
|
checked: !!r.value,
|
|
1757
1757
|
disabled: e.disabled || !!r.value && h.value || !r.value && C.value,
|
|
1758
|
-
onChange:
|
|
1758
|
+
onChange: k
|
|
1759
1759
|
}, null, 40, ol)
|
|
1760
1760
|
]),
|
|
1761
|
-
r.value ? (
|
|
1761
|
+
r.value ? (v(), p(J, { key: 0 }, [
|
|
1762
1762
|
a("label", null, [
|
|
1763
1763
|
j(l(n.value.recordDataset), 1),
|
|
1764
1764
|
a("input", {
|
|
1765
1765
|
value: r.value.dataset,
|
|
1766
1766
|
list: `${f}-datasets`,
|
|
1767
|
-
onChange: b[0] || (b[0] = (
|
|
1767
|
+
onChange: b[0] || (b[0] = (R) => w(R).trim() && S({ dataset: w(R).trim() }))
|
|
1768
1768
|
}, null, 40, ll)
|
|
1769
1769
|
]),
|
|
1770
1770
|
a("datalist", {
|
|
1771
1771
|
id: `${f}-datasets`
|
|
1772
1772
|
}, [
|
|
1773
|
-
(
|
|
1774
|
-
key:
|
|
1775
|
-
value:
|
|
1773
|
+
(v(!0), p(J, null, ne(g.value, (R) => (v(), p("option", {
|
|
1774
|
+
key: R,
|
|
1775
|
+
value: R
|
|
1776
1776
|
}, null, 8, sl))), 128))
|
|
1777
1777
|
], 8, il),
|
|
1778
1778
|
a("label", null, [
|
|
@@ -1780,27 +1780,27 @@ const Tn = {
|
|
|
1780
1780
|
a("input", {
|
|
1781
1781
|
value: r.value.rowKey ?? "",
|
|
1782
1782
|
list: f,
|
|
1783
|
-
onChange:
|
|
1783
|
+
onChange: I
|
|
1784
1784
|
}, null, 40, rl)
|
|
1785
1785
|
]),
|
|
1786
1786
|
a("datalist", { id: f }, [
|
|
1787
|
-
(
|
|
1788
|
-
key:
|
|
1789
|
-
value:
|
|
1790
|
-
}, l(
|
|
1787
|
+
(v(!0), p(J, null, ne(c.value, (R) => (v(), p("option", {
|
|
1788
|
+
key: R.field,
|
|
1789
|
+
value: R.field
|
|
1790
|
+
}, l(R.label), 9, dl))), 128))
|
|
1791
1791
|
]),
|
|
1792
1792
|
a("div", ul, [
|
|
1793
1793
|
a("label", null, [
|
|
1794
1794
|
j(l(n.value.labelCopies), 1),
|
|
1795
1795
|
a("select", {
|
|
1796
1796
|
value: $.value,
|
|
1797
|
-
onChange:
|
|
1797
|
+
onChange: M
|
|
1798
1798
|
}, [
|
|
1799
1799
|
a("option", ml, l(n.value.fixedCopies), 1),
|
|
1800
1800
|
a("option", vl, l(n.value.fieldCopies), 1)
|
|
1801
1801
|
], 40, cl)
|
|
1802
1802
|
]),
|
|
1803
|
-
$.value === "fixed" ? (
|
|
1803
|
+
$.value === "fixed" ? (v(), p("label", gl, [
|
|
1804
1804
|
j(l(n.value.copiesPerRecord), 1),
|
|
1805
1805
|
a("input", {
|
|
1806
1806
|
type: "number",
|
|
@@ -1808,19 +1808,19 @@ const Tn = {
|
|
|
1808
1808
|
max: "1000",
|
|
1809
1809
|
step: "1",
|
|
1810
1810
|
value: r.value.copies ?? 1,
|
|
1811
|
-
onChange: b[1] || (b[1] = (
|
|
1811
|
+
onChange: b[1] || (b[1] = (R) => w(R).trim() && S({ copies: Number(w(R)) }))
|
|
1812
1812
|
}, null, 40, pl)
|
|
1813
|
-
])) : (
|
|
1813
|
+
])) : (v(), p("label", fl, [
|
|
1814
1814
|
j(l(n.value.copiesField), 1),
|
|
1815
1815
|
a("input", {
|
|
1816
1816
|
value: typeof r.value.copies == "object" ? r.value.copies.field : "",
|
|
1817
1817
|
list: f,
|
|
1818
|
-
onChange: b[2] || (b[2] = (
|
|
1818
|
+
onChange: b[2] || (b[2] = (R) => w(R).trim() && S({ copies: { field: w(R).trim() } }))
|
|
1819
1819
|
}, null, 40, hl)
|
|
1820
1820
|
]))
|
|
1821
1821
|
]),
|
|
1822
1822
|
a("p", bl, l(h.value ? n.value.repeatBoundHint : n.value.repeatOrderHint), 1)
|
|
1823
|
-
], 64)) :
|
|
1823
|
+
], 64)) : O("", !0)
|
|
1824
1824
|
], 8, nl));
|
|
1825
1825
|
}
|
|
1826
1826
|
}), wl = /* @__PURE__ */ Ie(yl, [["__scopeId", "data-v-de1ee031"]]), kl = {
|
|
@@ -1878,7 +1878,7 @@ const Tn = {
|
|
|
1878
1878
|
emits: ["confirm", "cancel", "locate"],
|
|
1879
1879
|
setup(e, { emit: s }) {
|
|
1880
1880
|
const o = e, i = s, n = B(() => ({ ...kl, ...o.messages }));
|
|
1881
|
-
return (r,
|
|
1881
|
+
return (r, c) => e.change ? (v(), p("section", {
|
|
1882
1882
|
key: 0,
|
|
1883
1883
|
class: "mr-impact",
|
|
1884
1884
|
role: "alertdialog",
|
|
@@ -1888,7 +1888,7 @@ const Tn = {
|
|
|
1888
1888
|
a("code", null, l(e.change.before) + " → " + l(e.change.after), 1),
|
|
1889
1889
|
a("p", null, l(n.value.renameHint), 1),
|
|
1890
1890
|
a("ol", null, [
|
|
1891
|
-
(
|
|
1891
|
+
(v(!0), p(J, null, ne(e.change.references.slice(0, 100), (g) => (v(), p("li", {
|
|
1892
1892
|
key: g.path
|
|
1893
1893
|
}, [
|
|
1894
1894
|
a("button", {
|
|
@@ -1901,15 +1901,15 @@ const Tn = {
|
|
|
1901
1901
|
a("button", {
|
|
1902
1902
|
type: "button",
|
|
1903
1903
|
disabled: e.disabled,
|
|
1904
|
-
onClick:
|
|
1904
|
+
onClick: c[0] || (c[0] = (g) => i("cancel"))
|
|
1905
1905
|
}, l(n.value.cancel), 9, Cl),
|
|
1906
1906
|
a("button", {
|
|
1907
1907
|
type: "button",
|
|
1908
1908
|
disabled: e.disabled,
|
|
1909
|
-
onClick:
|
|
1909
|
+
onClick: c[1] || (c[1] = (g) => i("confirm"))
|
|
1910
1910
|
}, l(n.value.continue), 9, $l)
|
|
1911
1911
|
])
|
|
1912
|
-
], 8, xl)) :
|
|
1912
|
+
], 8, xl)) : O("", !0);
|
|
1913
1913
|
}
|
|
1914
1914
|
}), Il = /* @__PURE__ */ Ie(Sl, [["__scopeId", "data-v-0813913f"]]), Tl = {
|
|
1915
1915
|
available: "发现未保存草稿",
|
|
@@ -1958,7 +1958,7 @@ const Tn = {
|
|
|
1958
1958
|
key: 3,
|
|
1959
1959
|
class: "mr-recovery-conflict",
|
|
1960
1960
|
open: ""
|
|
1961
|
-
}, Nl = { class: "mr-recovery-columns" },
|
|
1961
|
+
}, Nl = { class: "mr-recovery-columns" }, Ol = { key: 0 }, Fl = { key: 1 }, Bl = {
|
|
1962
1962
|
key: 0,
|
|
1963
1963
|
role: "alert"
|
|
1964
1964
|
}, Gl = {
|
|
@@ -1979,12 +1979,12 @@ const Tn = {
|
|
|
1979
1979
|
},
|
|
1980
1980
|
setup(e) {
|
|
1981
1981
|
const s = e, o = B(() => ({ ...Tl, ...s.messages }));
|
|
1982
|
-
return (i, n) => (
|
|
1983
|
-
e.recovery.available.value ? (
|
|
1982
|
+
return (i, n) => (v(), p(J, null, [
|
|
1983
|
+
e.recovery.available.value ? (v(), p("div", El, [
|
|
1984
1984
|
a("div", null, [
|
|
1985
1985
|
a("strong", null, l(o.value.available), 1),
|
|
1986
1986
|
a("small", null, l(e.recovery.available.value.savedAt) + " · " + l(o.value.revision) + " " + l(e.recovery.available.value.baseline.revision || o.value.unknown), 1),
|
|
1987
|
-
e.recovery.stale.value ? (
|
|
1987
|
+
e.recovery.stale.value ? (v(), p("p", Rl, l(o.value.stale), 1)) : O("", !0)
|
|
1988
1988
|
]),
|
|
1989
1989
|
a("div", Pl, [
|
|
1990
1990
|
a("button", {
|
|
@@ -1999,8 +1999,8 @@ const Tn = {
|
|
|
1999
1999
|
(...r) => e.recovery.discard && e.recovery.discard(...r))
|
|
2000
2000
|
}, l(o.value.discard), 1)
|
|
2001
2001
|
])
|
|
2002
|
-
])) :
|
|
2003
|
-
e.recovery.error.value ? (
|
|
2002
|
+
])) : O("", !0),
|
|
2003
|
+
e.recovery.error.value ? (v(), p("div", Dl, [
|
|
2004
2004
|
a("span", null, l(o.value.storageError) + ":" + l(e.recovery.error.value), 1),
|
|
2005
2005
|
a("div", _l, [
|
|
2006
2006
|
a("button", {
|
|
@@ -2009,17 +2009,17 @@ const Tn = {
|
|
|
2009
2009
|
(...r) => e.recovery.discard && e.recovery.discard(...r))
|
|
2010
2010
|
}, l(o.value.discard), 1)
|
|
2011
2011
|
])
|
|
2012
|
-
])) : e.recovery.status.value !== "idle" ? (
|
|
2013
|
-
e.conflict.active.value ? (
|
|
2012
|
+
])) : e.recovery.status.value !== "idle" ? (v(), p("small", Al, l(e.recovery.status.value === "saving" ? o.value.saving : o.value.autosaved), 1)) : O("", !0),
|
|
2013
|
+
e.conflict.active.value ? (v(), p("details", Hl, [
|
|
2014
2014
|
a("summary", null, l(o.value.conflict), 1),
|
|
2015
2015
|
a("p", null, l(o.value.conflictHint), 1),
|
|
2016
2016
|
a("div", Nl, [
|
|
2017
|
-
(
|
|
2017
|
+
(v(!0), p(J, null, ne([e.conflict.localChanges.value, e.conflict.remoteChanges.value], (r, c) => (v(), p("section", { key: c }, [
|
|
2018
2018
|
a("h4", null, [
|
|
2019
|
-
j(l(
|
|
2019
|
+
j(l(c ? o.value.remote : o.value.local) + " ", 1),
|
|
2020
2020
|
a("small", null, l(r?.totalChanges ?? "—") + " " + l(o.value.changes), 1)
|
|
2021
2021
|
]),
|
|
2022
|
-
r?.changes.length ? (
|
|
2022
|
+
r?.changes.length ? (v(), p("table", Ol, [
|
|
2023
2023
|
a("thead", null, [
|
|
2024
2024
|
a("tr", null, [
|
|
2025
2025
|
a("th", null, l(o.value.path), 1),
|
|
@@ -2028,7 +2028,7 @@ const Tn = {
|
|
|
2028
2028
|
])
|
|
2029
2029
|
]),
|
|
2030
2030
|
a("tbody", null, [
|
|
2031
|
-
(
|
|
2031
|
+
(v(!0), p(J, null, ne(r.changes, (g) => (v(), p("tr", {
|
|
2032
2032
|
key: `${g.kind}:${g.path}`
|
|
2033
2033
|
}, [
|
|
2034
2034
|
a("th", null, l(g.path), 1),
|
|
@@ -2036,42 +2036,42 @@ const Tn = {
|
|
|
2036
2036
|
a("td", null, l(g.after ?? "—"), 1)
|
|
2037
2037
|
]))), 128))
|
|
2038
2038
|
])
|
|
2039
|
-
])) : (
|
|
2039
|
+
])) : (v(), p("p", Fl, l(o.value.empty), 1))
|
|
2040
2040
|
]))), 128))
|
|
2041
2041
|
]),
|
|
2042
|
-
e.conflict.error.value ? (
|
|
2043
|
-
e.conflict.copied.value ? (
|
|
2042
|
+
e.conflict.error.value ? (v(), p("p", Bl, l(e.conflict.error.value), 1)) : O("", !0),
|
|
2043
|
+
e.conflict.copied.value ? (v(), p("p", Gl, l(o.value.copied), 1)) : O("", !0),
|
|
2044
2044
|
a("div", jl, [
|
|
2045
|
-
e.canLoad ? (
|
|
2045
|
+
e.canLoad ? (v(), p("button", {
|
|
2046
2046
|
key: 0,
|
|
2047
2047
|
type: "button",
|
|
2048
2048
|
disabled: e.conflict.busy.value,
|
|
2049
2049
|
onClick: n[3] || (n[3] = //@ts-ignore
|
|
2050
2050
|
(...r) => e.conflict.load && e.conflict.load(...r))
|
|
2051
|
-
}, l(o.value.loadLatest), 9, zl)) :
|
|
2052
|
-
e.canCopy ? (
|
|
2051
|
+
}, l(o.value.loadLatest), 9, zl)) : O("", !0),
|
|
2052
|
+
e.canCopy ? (v(), p("button", {
|
|
2053
2053
|
key: 1,
|
|
2054
2054
|
type: "button",
|
|
2055
2055
|
disabled: e.readonly || e.conflict.busy.value,
|
|
2056
2056
|
onClick: n[4] || (n[4] = //@ts-ignore
|
|
2057
2057
|
(...r) => e.conflict.keepCopy && e.conflict.keepCopy(...r))
|
|
2058
|
-
}, l(o.value.keepCopy), 9, Vl)) :
|
|
2059
|
-
e.conflict.latest.value ? (
|
|
2058
|
+
}, l(o.value.keepCopy), 9, Vl)) : O("", !0),
|
|
2059
|
+
e.conflict.latest.value ? (v(), p("button", {
|
|
2060
2060
|
key: 2,
|
|
2061
2061
|
type: "button",
|
|
2062
2062
|
disabled: e.readonly || e.conflict.busy.value,
|
|
2063
2063
|
onClick: n[5] || (n[5] = //@ts-ignore
|
|
2064
2064
|
(...r) => e.conflict.adoptLatest && e.conflict.adoptLatest(...r))
|
|
2065
|
-
}, l(o.value.adopt), 9, Wl)) :
|
|
2066
|
-
e.conflict.latest.value ? (
|
|
2065
|
+
}, l(o.value.adopt), 9, Wl)) : O("", !0),
|
|
2066
|
+
e.conflict.latest.value ? (v(), p("button", {
|
|
2067
2067
|
key: 3,
|
|
2068
2068
|
type: "button",
|
|
2069
2069
|
disabled: e.readonly || e.conflict.busy.value,
|
|
2070
2070
|
onClick: n[6] || (n[6] = //@ts-ignore
|
|
2071
2071
|
(...r) => e.conflict.toggleRebase && e.conflict.toggleRebase(...r))
|
|
2072
|
-
}, l(o.value.rebase), 9, Jl)) :
|
|
2072
|
+
}, l(o.value.rebase), 9, Jl)) : O("", !0)
|
|
2073
2073
|
]),
|
|
2074
|
-
e.conflict.confirmRebase.value ? (
|
|
2074
|
+
e.conflict.confirmRebase.value ? (v(), p("div", Kl, [
|
|
2075
2075
|
a("p", null, l(o.value.confirmHint), 1),
|
|
2076
2076
|
a("button", {
|
|
2077
2077
|
type: "button",
|
|
@@ -2079,8 +2079,8 @@ const Tn = {
|
|
|
2079
2079
|
onClick: n[7] || (n[7] = //@ts-ignore
|
|
2080
2080
|
(...r) => e.conflict.rebase && e.conflict.rebase(...r))
|
|
2081
2081
|
}, l(o.value.confirm), 9, Ul)
|
|
2082
|
-
])) :
|
|
2083
|
-
])) :
|
|
2082
|
+
])) : O("", !0)
|
|
2083
|
+
])) : O("", !0)
|
|
2084
2084
|
], 64));
|
|
2085
2085
|
}
|
|
2086
2086
|
}), Yl = /* @__PURE__ */ Ie(ql, [["__scopeId", "data-v-f02f2a53"]]), Xl = { class: "mr-header-editor" }, Zl = ["disabled"], Ql = ["value"], ei = ["value"], ti = ["value"], ni = ["disabled"], ai = /* @__PURE__ */ Se({
|
|
@@ -2092,13 +2092,13 @@ const Tn = {
|
|
|
2092
2092
|
},
|
|
2093
2093
|
emits: ["command"],
|
|
2094
2094
|
setup(e, { emit: s }) {
|
|
2095
|
-
const o = e, i = s, n = B(() => ({ ...
|
|
2095
|
+
const o = e, i = s, n = B(() => ({ ...Oe, ...o.messages })), r = z(0), c = z(0), g = z(Math.min(1, o.list.columns.length - 1));
|
|
2096
2096
|
return le(
|
|
2097
2097
|
() => o.list.columns.length,
|
|
2098
2098
|
(h) => {
|
|
2099
|
-
|
|
2099
|
+
c.value = Math.min(c.value, h - 1), g.value = Math.min(g.value, h - 1);
|
|
2100
2100
|
}
|
|
2101
|
-
), (h, C) => (
|
|
2101
|
+
), (h, C) => (v(), p("details", Xl, [
|
|
2102
2102
|
a("summary", null, [
|
|
2103
2103
|
j(l(n.value.headerStructure), 1),
|
|
2104
2104
|
a("span", null, l(e.list.headerGrid?.cells.length ?? 1) + " " + l(n.value.headerRow), 1)
|
|
@@ -2109,7 +2109,7 @@ const Tn = {
|
|
|
2109
2109
|
we(a("select", {
|
|
2110
2110
|
"onUpdate:modelValue": C[0] || (C[0] = ($) => r.value = $)
|
|
2111
2111
|
}, [
|
|
2112
|
-
(
|
|
2112
|
+
(v(!0), p(J, null, ne(e.list.headerGrid?.cells.length ?? 1, ($) => (v(), p("option", {
|
|
2113
2113
|
key: $,
|
|
2114
2114
|
value: $ - 1
|
|
2115
2115
|
}, l($), 9, Ql))), 128))
|
|
@@ -2125,16 +2125,16 @@ const Tn = {
|
|
|
2125
2125
|
a("label", null, [
|
|
2126
2126
|
j(l(n.value.headerFirst), 1),
|
|
2127
2127
|
we(a("select", {
|
|
2128
|
-
"onUpdate:modelValue": C[1] || (C[1] = ($) =>
|
|
2128
|
+
"onUpdate:modelValue": C[1] || (C[1] = ($) => c.value = $)
|
|
2129
2129
|
}, [
|
|
2130
|
-
(
|
|
2130
|
+
(v(!0), p(J, null, ne(e.list.columns, ($, f) => (v(), p("option", {
|
|
2131
2131
|
key: f,
|
|
2132
2132
|
value: f
|
|
2133
2133
|
}, l(f + 1) + " · " + l($.header), 9, ei))), 128))
|
|
2134
2134
|
], 512), [
|
|
2135
2135
|
[
|
|
2136
2136
|
ot,
|
|
2137
|
-
|
|
2137
|
+
c.value,
|
|
2138
2138
|
void 0,
|
|
2139
2139
|
{ number: !0 }
|
|
2140
2140
|
]
|
|
@@ -2145,7 +2145,7 @@ const Tn = {
|
|
|
2145
2145
|
we(a("select", {
|
|
2146
2146
|
"onUpdate:modelValue": C[2] || (C[2] = ($) => g.value = $)
|
|
2147
2147
|
}, [
|
|
2148
|
-
(
|
|
2148
|
+
(v(!0), p(J, null, ne(e.list.columns, ($, f) => (v(), p("option", {
|
|
2149
2149
|
key: f,
|
|
2150
2150
|
value: f
|
|
2151
2151
|
}, l(f + 1) + " · " + l($.header), 9, ti))), 128))
|
|
@@ -2161,16 +2161,16 @@ const Tn = {
|
|
|
2161
2161
|
a("div", null, [
|
|
2162
2162
|
a("button", {
|
|
2163
2163
|
type: "button",
|
|
2164
|
-
onClick: C[3] || (C[3] = ($) => i("command", { action: "add", row: r.value, first:
|
|
2164
|
+
onClick: C[3] || (C[3] = ($) => i("command", { action: "add", row: r.value, first: c.value, last: g.value }))
|
|
2165
2165
|
}, l(n.value.addHeaderRow), 1),
|
|
2166
2166
|
a("button", {
|
|
2167
2167
|
type: "button",
|
|
2168
|
-
disabled:
|
|
2169
|
-
onClick: C[4] || (C[4] = ($) => i("command", { action: "merge", row: r.value, first:
|
|
2168
|
+
disabled: c.value >= g.value,
|
|
2169
|
+
onClick: C[4] || (C[4] = ($) => i("command", { action: "merge", row: r.value, first: c.value, last: g.value }))
|
|
2170
2170
|
}, l(n.value.mergeHeader), 9, ni),
|
|
2171
2171
|
a("button", {
|
|
2172
2172
|
type: "button",
|
|
2173
|
-
onClick: C[5] || (C[5] = ($) => i("command", { action: "split", row: r.value, first:
|
|
2173
|
+
onClick: C[5] || (C[5] = ($) => i("command", { action: "split", row: r.value, first: c.value, last: g.value }))
|
|
2174
2174
|
}, l(n.value.splitHeader), 1)
|
|
2175
2175
|
])
|
|
2176
2176
|
], 8, Zl)
|
|
@@ -2178,58 +2178,58 @@ const Tn = {
|
|
|
2178
2178
|
}
|
|
2179
2179
|
}), oi = /* @__PURE__ */ Ie(ai, [["__scopeId", "data-v-acd607ef"]]);
|
|
2180
2180
|
function li(e, s, o, i) {
|
|
2181
|
-
const { lists: n, selected: r, jsonPending:
|
|
2181
|
+
const { lists: n, selected: r, jsonPending: c, saving: g, blocked: h, validation: C, pendingLocalChanges: $, messages: f } = e, { section: w } = o, { mode: S, tool: k, canvasPage: I, setMode: M, chooseCanvas: u, locateReview: b } = s, { id: R } = i, A = B(() => [
|
|
2182
2182
|
...n.value.length ? ["fields"] : [],
|
|
2183
2183
|
"component",
|
|
2184
2184
|
"template",
|
|
2185
2185
|
"tools",
|
|
2186
2186
|
"advanced"
|
|
2187
|
-
]),
|
|
2188
|
-
function
|
|
2189
|
-
|
|
2187
|
+
]), E = z(/* @__PURE__ */ new Set(["outline", "reuse"])), T = B(() => w.value === "tools" && E.value.has(k.value));
|
|
2188
|
+
function x(L) {
|
|
2189
|
+
T.value ? S.value = L : M(L);
|
|
2190
2190
|
}
|
|
2191
|
-
le([
|
|
2192
|
-
|
|
2191
|
+
le([w, k], () => {
|
|
2192
|
+
T.value && (S.value = "design");
|
|
2193
2193
|
});
|
|
2194
|
-
function
|
|
2195
|
-
const L = new Set(
|
|
2196
|
-
L.has(
|
|
2194
|
+
function P() {
|
|
2195
|
+
const L = new Set(E.value);
|
|
2196
|
+
L.has(k.value) ? L.delete(k.value) : L.add(k.value), E.value = L, L.has(k.value) && (S.value = "design");
|
|
2197
2197
|
}
|
|
2198
2198
|
function H(L) {
|
|
2199
|
-
const
|
|
2200
|
-
Number.isInteger(
|
|
2199
|
+
const F = Number(L.target.value);
|
|
2200
|
+
Number.isInteger(F) && F >= 0 && X({ pageIndex: I.value, componentIndex: F });
|
|
2201
2201
|
}
|
|
2202
2202
|
function W() {
|
|
2203
|
-
|
|
2203
|
+
w.value = "tools", k.value = "excel";
|
|
2204
2204
|
}
|
|
2205
2205
|
const Y = B(() => {
|
|
2206
|
-
const L = ["excel", "rules", "params"].filter((
|
|
2207
|
-
return
|
|
2206
|
+
const L = ["excel", "rules", "params"].filter((F) => e.pendingTools.value.includes(F)).map((F) => ({ target: F, label: f.value[`${F}Tool`] }));
|
|
2207
|
+
return c.value && L.push({ target: "json", label: f.value.json }), L;
|
|
2208
2208
|
}), se = B(() => g.value ? f.value.saving : i.readonly() ? f.value.saveReadonly : h.value ? f.value.saveConfirmation : Y.value.length ? Y.value.map((L) => `${L.label} · ${f.value.unapplied}`).join(";") : C.value.ok ? $.value ? "" : f.value.saveUnchanged : f.value.saveInvalid);
|
|
2209
2209
|
async function G(L) {
|
|
2210
|
-
L === "json" ?
|
|
2211
|
-
const
|
|
2212
|
-
document.querySelector(
|
|
2210
|
+
L === "json" ? w.value = "advanced" : (w.value = "tools", k.value = L), await he();
|
|
2211
|
+
const F = L === "json" ? `#${R}-panel-advanced textarea` : `#${R}-tool-${L}`;
|
|
2212
|
+
document.querySelector(F)?.focus({ preventScroll: !0 });
|
|
2213
2213
|
}
|
|
2214
2214
|
const d = B(
|
|
2215
2215
|
() => g.value ? f.value.saving : i.readonly() ? f.value.readonly : $.value ? f.value.dirty : f.value.ready
|
|
2216
2216
|
);
|
|
2217
2217
|
let q = 0;
|
|
2218
2218
|
async function X(L) {
|
|
2219
|
-
const
|
|
2220
|
-
Z >= 0 && Z !== r.value && e.isToolPending("rules") && !await e.guardChanges() ||
|
|
2219
|
+
const F = ++q, U = w.value === "tools", Z = n.value.findIndex((Q) => Q.pageIndex === L.pageIndex && Q.componentIndex === L.componentIndex);
|
|
2220
|
+
Z >= 0 && Z !== r.value && e.isToolPending("rules") && !await e.guardChanges() || F === q && (u(L), U && (w.value = "tools"));
|
|
2221
2221
|
}
|
|
2222
2222
|
async function _(L) {
|
|
2223
|
-
const
|
|
2224
|
-
me >= 0 && me !== r.value && e.isToolPending("rules") && !await e.guardChanges() ||
|
|
2223
|
+
const F = ++q, U = w.value === "tools" && k.value === "outline", Z = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(L.path ?? ""), Q = L.pageIndex ?? (Z ? Number(Z[1]) : void 0), ge = L.componentIndex ?? (Z ? Number(Z[2]) : void 0), me = n.value.findIndex((ve) => ve.pageIndex === Q && ve.componentIndex === ge);
|
|
2224
|
+
me >= 0 && me !== r.value && e.isToolPending("rules") && !await e.guardChanges() || F === q && (b(L), U && (w.value = "tools"));
|
|
2225
2225
|
}
|
|
2226
2226
|
async function N(L) {
|
|
2227
|
-
const
|
|
2227
|
+
const F = ++q, U = L.target, Z = Number(U.value);
|
|
2228
2228
|
if (e.isToolPending("rules") && !await e.guardChanges()) {
|
|
2229
2229
|
U.value = String(r.value);
|
|
2230
2230
|
return;
|
|
2231
2231
|
}
|
|
2232
|
-
|
|
2232
|
+
F === q && (r.value = Z);
|
|
2233
2233
|
}
|
|
2234
2234
|
async function D(L) {
|
|
2235
2235
|
if (L.isComposing || L.keyCode === 229) return;
|
|
@@ -2241,12 +2241,12 @@ function li(e, s, o, i) {
|
|
|
2241
2241
|
}[L.key];
|
|
2242
2242
|
if (U === void 0) return;
|
|
2243
2243
|
L.preventDefault();
|
|
2244
|
-
const Z = A.value.indexOf(
|
|
2245
|
-
|
|
2244
|
+
const Z = A.value.indexOf(w.value), Q = L.key === "Home" ? 0 : L.key === "End" ? A.value.length - 1 : (Z + U + A.value.length) % A.value.length;
|
|
2245
|
+
w.value = A.value[Q];
|
|
2246
2246
|
const ge = L.currentTarget.parentElement;
|
|
2247
|
-
await he(), ge?.querySelector(`#${
|
|
2247
|
+
await he(), ge?.querySelector(`#${R}-tab-${w.value}`)?.focus();
|
|
2248
2248
|
}
|
|
2249
|
-
return { sections: A, toolPreview:
|
|
2249
|
+
return { sections: A, toolPreview: T, setMode: x, toggleToolPreview: P, chooseToolComponent: H, openBinding: W, pendingConfigurations: Y, saveReason: se, openPending: G, headingStatus: d, chooseCanvas: X, locateReview: _, chooseRuleList: N, navigateSection: D };
|
|
2250
2250
|
}
|
|
2251
2251
|
const Ae = (e) => `${e.pageIndex}:${e.componentIndex}`;
|
|
2252
2252
|
function ii(e, s, o) {
|
|
@@ -2254,129 +2254,134 @@ function ii(e, s, o) {
|
|
|
2254
2254
|
le(() => e.value.id, () => {
|
|
2255
2255
|
i.value = [], n.value = /* @__PURE__ */ new Set();
|
|
2256
2256
|
});
|
|
2257
|
-
const r = (
|
|
2258
|
-
function
|
|
2259
|
-
const S = { pageIndex:
|
|
2260
|
-
if (
|
|
2261
|
-
const
|
|
2262
|
-
i.value =
|
|
2257
|
+
const r = (w) => !!w && n.value.has(Ae(w));
|
|
2258
|
+
function c(w) {
|
|
2259
|
+
const S = { pageIndex: w.pageIndex, componentIndex: w.componentIndex };
|
|
2260
|
+
if (w.additive && i.value.every((k) => k.pageIndex === w.pageIndex)) {
|
|
2261
|
+
const k = i.value.some((I) => Ae(I) === Ae(w));
|
|
2262
|
+
i.value = k ? i.value.filter((I) => Ae(I) !== Ae(w)) : [...i.value, S], s.value = k ? i.value.at(-1) : S;
|
|
2263
2263
|
} else
|
|
2264
2264
|
i.value = [S], s.value = S;
|
|
2265
2265
|
}
|
|
2266
|
-
const g = B(() => i.value.filter((
|
|
2266
|
+
const g = B(() => i.value.filter((w) => !r(w)));
|
|
2267
2267
|
function h() {
|
|
2268
|
-
const
|
|
2269
|
-
for (const
|
|
2270
|
-
S ?
|
|
2271
|
-
n.value =
|
|
2268
|
+
const w = new Set(n.value), S = i.value.every(r);
|
|
2269
|
+
for (const k of i.value)
|
|
2270
|
+
S ? w.delete(Ae(k)) : w.add(Ae(k));
|
|
2271
|
+
n.value = w;
|
|
2272
2272
|
}
|
|
2273
|
-
function C(
|
|
2273
|
+
function C(w) {
|
|
2274
2274
|
g.value.length < 2 || o((S) => {
|
|
2275
|
-
const
|
|
2276
|
-
|
|
2277
|
-
const
|
|
2278
|
-
|
|
2275
|
+
const k = g.value.map((A) => je(S, A)).filter(Boolean), I = k.map(Me), M = Math.min(...I.map((A) => A.leftMm)), u = Math.min(...I.map((A) => A.topMm)), b = Math.max(...I.map((A) => A.leftMm + A.widthMm)), R = Math.max(...I.map((A) => A.topMm + A.heightMm));
|
|
2276
|
+
k.forEach((A, E) => {
|
|
2277
|
+
const T = I[E], x = { left: M, center: (M + b - T.widthMm) / 2, right: b - T.widthMm }, P = { top: u, middle: (u + R - T.heightMm) / 2, bottom: R - T.heightMm };
|
|
2278
|
+
w in x ? T.leftMm = x[w] : T.topMm = P[w], Ke(A, T);
|
|
2279
2279
|
});
|
|
2280
2280
|
});
|
|
2281
2281
|
}
|
|
2282
|
-
function $(
|
|
2282
|
+
function $(w) {
|
|
2283
2283
|
g.value.length < 3 || o((S) => {
|
|
2284
|
-
const
|
|
2285
|
-
let A =
|
|
2286
|
-
for (const
|
|
2287
|
-
|
|
2284
|
+
const k = w === "horizontal" ? "leftMm" : "topMm", I = w === "horizontal" ? "widthMm" : "heightMm", M = g.value.map((E) => ({ component: je(S, E), box: Me(je(S, E)) })).sort((E, T) => E.box[k] - T.box[k]), u = M[0].box[k], R = (Math.max(...M.map((E) => E.box[k] + E.box[I])) - u - M.reduce((E, T) => E + T.box[I], 0)) / (M.length - 1);
|
|
2285
|
+
let A = u;
|
|
2286
|
+
for (const E of M)
|
|
2287
|
+
E.box[k] = A, Ke(E.component, E.box), A += E.box[I] + R;
|
|
2288
2288
|
});
|
|
2289
2289
|
}
|
|
2290
|
-
function f(
|
|
2291
|
-
function
|
|
2292
|
-
if (
|
|
2293
|
-
const
|
|
2294
|
-
return
|
|
2290
|
+
function f(w, S, k) {
|
|
2291
|
+
function I(M) {
|
|
2292
|
+
if (M.pageIndex !== w) return M;
|
|
2293
|
+
const u = M.componentIndex;
|
|
2294
|
+
return k === void 0 ? u === S ? void 0 : { ...M, componentIndex: u > S ? u - 1 : u } : { ...M, componentIndex: u === S ? k : u === k ? S : u };
|
|
2295
2295
|
}
|
|
2296
|
-
n.value = new Set([...n.value].flatMap((
|
|
2297
|
-
const [
|
|
2298
|
-
return
|
|
2299
|
-
})), i.value = i.value.flatMap((
|
|
2300
|
-
const
|
|
2301
|
-
return
|
|
2296
|
+
n.value = new Set([...n.value].flatMap((M) => {
|
|
2297
|
+
const [u, b] = M.split(":").map(Number), R = I({ pageIndex: u, componentIndex: b });
|
|
2298
|
+
return R ? [Ae(R)] : [];
|
|
2299
|
+
})), i.value = i.value.flatMap((M) => {
|
|
2300
|
+
const u = I(M);
|
|
2301
|
+
return u ? [u] : [];
|
|
2302
2302
|
});
|
|
2303
2303
|
}
|
|
2304
2304
|
return { clearLocks: () => {
|
|
2305
2305
|
n.value = /* @__PURE__ */ new Set();
|
|
2306
|
-
}, selections: i, locked: r, allLocked: B(() => !!i.value.length && i.value.every(r)), toggleLock: h, align: C, distribute: $, select:
|
|
2306
|
+
}, selections: i, locked: r, allLocked: B(() => !!i.value.length && i.value.every(r)), toggleLock: h, align: C, distribute: $, select: c, remap: f };
|
|
2307
2307
|
}
|
|
2308
2308
|
function si(e, s) {
|
|
2309
|
-
const o = z("preview"), i = z(), n = z(0), r = B(() => !!e.value.template.pages[i.value?.pageIndex ?? n.value]?.flow),
|
|
2309
|
+
const o = z("preview"), i = z(), n = z(0), r = B(() => !!e.value.template.pages[i.value?.pageIndex ?? n.value]?.flow), c = ii(e, i, (M) => r.value ? !1 : s(M)), g = B(
|
|
2310
2310
|
() => je(e.value, i.value)
|
|
2311
2311
|
);
|
|
2312
|
-
le(n, (
|
|
2313
|
-
i.value?.pageIndex !==
|
|
2312
|
+
le(n, (M) => {
|
|
2313
|
+
i.value?.pageIndex !== M && (i.value = void 0, c.selections.value = []);
|
|
2314
2314
|
}), le(e, () => {
|
|
2315
|
-
g.value || (i.value = void 0),
|
|
2315
|
+
g.value || (i.value = void 0), c.selections.value = c.selections.value.filter((M) => !!je(e.value, M)), e.value.template.pages[n.value] || (n.value = 0);
|
|
2316
2316
|
});
|
|
2317
|
-
function h(
|
|
2318
|
-
|
|
2317
|
+
function h(M) {
|
|
2318
|
+
c.select(M), n.value = M.pageIndex;
|
|
2319
2319
|
}
|
|
2320
|
-
function C(
|
|
2321
|
-
const
|
|
2322
|
-
return !
|
|
2323
|
-
const
|
|
2324
|
-
|
|
2320
|
+
function C(M) {
|
|
2321
|
+
const u = i.value;
|
|
2322
|
+
return !u || c.locked(u) ? !1 : s((b) => {
|
|
2323
|
+
const R = je(b, u);
|
|
2324
|
+
R && M(R, b);
|
|
2325
2325
|
});
|
|
2326
2326
|
}
|
|
2327
|
-
function $(
|
|
2328
|
-
r.value || C((
|
|
2329
|
-
const
|
|
2327
|
+
function $(M) {
|
|
2328
|
+
r.value || C((u, b) => {
|
|
2329
|
+
const R = b.template.pages[i.value.pageIndex];
|
|
2330
2330
|
Ke(
|
|
2331
|
-
|
|
2332
|
-
it(
|
|
2331
|
+
u,
|
|
2332
|
+
it(M, R, u.kind === "list")
|
|
2333
2333
|
);
|
|
2334
2334
|
});
|
|
2335
2335
|
}
|
|
2336
|
-
function f(
|
|
2337
|
-
|
|
2338
|
-
let I = -1;
|
|
2339
|
-
const v = n.value;
|
|
2340
|
-
s((b) => {
|
|
2341
|
-
const T = b.template.pages[v].components, A = pn(y);
|
|
2342
|
-
Ke(A, it(Me(A), b.template.pages[v], A.kind === "list")), A.kind === "qrcode" && (A.widthMm = A.heightMm = Math.min(A.widthMm, A.heightMm)), T.push(A), I = T.length - 1;
|
|
2343
|
-
}) && h({ pageIndex: v, componentIndex: I });
|
|
2336
|
+
function f(M) {
|
|
2337
|
+
w(pn(M));
|
|
2344
2338
|
}
|
|
2345
|
-
function
|
|
2339
|
+
function w(M) {
|
|
2340
|
+
if (e.value.template.pages[n.value]?.flow || M.kind === "list" && e.value.template.repeat) return !1;
|
|
2341
|
+
let u = -1;
|
|
2342
|
+
const b = n.value, R = s((A) => {
|
|
2343
|
+
const E = A.template.pages[b].components;
|
|
2344
|
+
E.push(M), u = E.length - 1;
|
|
2345
|
+
const T = ae(A).template.pages[b].components[u];
|
|
2346
|
+
Ke(T, it(Me(T), A.template.pages[b], T.kind === "list")), T.kind === "qrcode" && (T.widthMm = T.heightMm = Math.min(T.widthMm, T.heightMm)), E[u] = T;
|
|
2347
|
+
});
|
|
2348
|
+
return R && h({ pageIndex: b, componentIndex: u }), R;
|
|
2349
|
+
}
|
|
2350
|
+
function S() {
|
|
2346
2351
|
if (r.value) return;
|
|
2347
|
-
const
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2352
|
+
const M = i.value;
|
|
2353
|
+
M && !c.locked(M) && s((u) => {
|
|
2354
|
+
u.template.pages[M.pageIndex].components.splice(
|
|
2355
|
+
M.componentIndex,
|
|
2351
2356
|
1
|
|
2352
2357
|
);
|
|
2353
|
-
}) && (
|
|
2358
|
+
}) && (c.remap(M.pageIndex, M.componentIndex), i.value = void 0);
|
|
2354
2359
|
}
|
|
2355
|
-
function
|
|
2360
|
+
function k() {
|
|
2356
2361
|
if (r.value) return;
|
|
2357
|
-
const
|
|
2358
|
-
if (!
|
|
2359
|
-
let
|
|
2360
|
-
s((
|
|
2361
|
-
const
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
it(
|
|
2365
|
-
),
|
|
2366
|
-
}) && h({ pageIndex:
|
|
2362
|
+
const M = i.value;
|
|
2363
|
+
if (!M) return;
|
|
2364
|
+
let u = -1;
|
|
2365
|
+
s((b) => {
|
|
2366
|
+
const R = b.template.pages[M.pageIndex], A = JSON.parse(JSON.stringify(je(b, M))), E = Me(A);
|
|
2367
|
+
E.leftMm += 4, E.topMm += 4, Ke(
|
|
2368
|
+
A,
|
|
2369
|
+
it(E, R, A.kind === "list")
|
|
2370
|
+
), A.kind === "list" ? delete A.id : (delete A.nid, delete A.rkey), R.components.push(A), u = R.components.length - 1;
|
|
2371
|
+
}) && h({ pageIndex: M.pageIndex, componentIndex: u });
|
|
2367
2372
|
}
|
|
2368
|
-
function
|
|
2373
|
+
function I(M) {
|
|
2369
2374
|
if (r.value) return;
|
|
2370
|
-
const
|
|
2371
|
-
if (!
|
|
2372
|
-
const
|
|
2373
|
-
e.value.template.pages[
|
|
2374
|
-
const
|
|
2375
|
-
|
|
2376
|
-
}) && (
|
|
2375
|
+
const u = i.value;
|
|
2376
|
+
if (!u || c.locked(u)) return;
|
|
2377
|
+
const b = u.componentIndex + M;
|
|
2378
|
+
e.value.template.pages[u.pageIndex]?.components[b] && s((R) => {
|
|
2379
|
+
const A = R.template.pages[u.pageIndex].components;
|
|
2380
|
+
A.splice(b, 0, A.splice(u.componentIndex, 1)[0]);
|
|
2381
|
+
}) && (c.remap(u.pageIndex, u.componentIndex, b), h({ pageIndex: u.pageIndex, componentIndex: b }));
|
|
2377
2382
|
}
|
|
2378
2383
|
return {
|
|
2379
|
-
...
|
|
2384
|
+
...c,
|
|
2380
2385
|
mode: o,
|
|
2381
2386
|
selection: i,
|
|
2382
2387
|
pageIndex: n,
|
|
@@ -2386,28 +2391,29 @@ function si(e, s) {
|
|
|
2386
2391
|
mutate: C,
|
|
2387
2392
|
geometry: $,
|
|
2388
2393
|
insert: f,
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2394
|
+
insertComponent: w,
|
|
2395
|
+
remove: S,
|
|
2396
|
+
duplicate: k,
|
|
2397
|
+
reorder: I
|
|
2392
2398
|
};
|
|
2393
2399
|
}
|
|
2394
2400
|
function ri(e, s, o) {
|
|
2395
|
-
const { draft: i, lists: n, selected: r, activeList:
|
|
2401
|
+
const { draft: i, lists: n, selected: r, activeList: c, blocked: g, jsonPending: h, error: C } = e, { section: $, activeIndex: f } = s, w = si(i, e.transaction), {
|
|
2396
2402
|
mode: S,
|
|
2397
|
-
selection:
|
|
2398
|
-
pageIndex:
|
|
2399
|
-
active:
|
|
2400
|
-
} =
|
|
2403
|
+
selection: k,
|
|
2404
|
+
pageIndex: I,
|
|
2405
|
+
active: M
|
|
2406
|
+
} = w;
|
|
2401
2407
|
e.connectHistoryView({
|
|
2402
|
-
read: () => ({ pageIndex:
|
|
2408
|
+
read: () => ({ pageIndex: I.value, componentIndex: k.value?.pageIndex === I.value ? k.value.componentIndex : void 0 }),
|
|
2403
2409
|
restore: (G) => {
|
|
2404
|
-
|
|
2410
|
+
I.value = Math.max(0, Math.min(i.value.template.pages.length - 1, G.pageIndex)), w.selection.value = void 0, w.selections.value = [], G.componentIndex !== void 0 && i.value.template.pages[I.value]?.components[G.componentIndex] && w.select({ pageIndex: I.value, componentIndex: G.componentIndex });
|
|
2405
2411
|
}
|
|
2406
2412
|
}), le(e.historyViewRevision, () => e.captureHistoryView(), { flush: "post" });
|
|
2407
|
-
const
|
|
2408
|
-
le([$,
|
|
2409
|
-
$.value === "tools" && (b.value = /* @__PURE__ */ new Set([...b.value,
|
|
2410
|
-
}), le(
|
|
2413
|
+
const u = z("excel"), b = z(/* @__PURE__ */ new Set());
|
|
2414
|
+
le([$, u], () => {
|
|
2415
|
+
$.value === "tools" && (b.value = /* @__PURE__ */ new Set([...b.value, u.value]));
|
|
2416
|
+
}), le(k, (G) => {
|
|
2411
2417
|
if (!G) return;
|
|
2412
2418
|
const d = n.value.findIndex(
|
|
2413
2419
|
(q) => q.pageIndex === G.pageIndex && q.componentIndex === G.componentIndex
|
|
@@ -2416,34 +2422,34 @@ function ri(e, s, o) {
|
|
|
2416
2422
|
}), le([f, r, S, $], () => {
|
|
2417
2423
|
if (S.value !== "design" || $.value !== "fields") return;
|
|
2418
2424
|
const G = n.value[r.value];
|
|
2419
|
-
G && (
|
|
2425
|
+
G && (k.value?.pageIndex !== G.pageIndex || k.value.componentIndex !== G.componentIndex) && w.select({ pageIndex: G.pageIndex, componentIndex: G.componentIndex });
|
|
2420
2426
|
});
|
|
2421
|
-
const
|
|
2427
|
+
const R = B(
|
|
2422
2428
|
() => e.editingReadonly.value || g.value || h.value
|
|
2423
2429
|
), A = B(
|
|
2424
|
-
() => o()?.[
|
|
2430
|
+
() => o()?.[c.value?.dataset ?? ""]
|
|
2425
2431
|
);
|
|
2426
|
-
function
|
|
2432
|
+
function E(G) {
|
|
2427
2433
|
S.value = G, $.value === "tools" && ($.value = G === "design" || !n.value.length ? "component" : "fields");
|
|
2428
2434
|
}
|
|
2429
|
-
function
|
|
2435
|
+
function T(G) {
|
|
2430
2436
|
if (!i.value.template.pages[G.pageIndex]?.components[G.componentIndex])
|
|
2431
2437
|
return;
|
|
2432
|
-
if (
|
|
2438
|
+
if (w.select(G), i.value.template.pages[G.pageIndex]?.components[G.componentIndex]?.kind === "list") {
|
|
2433
2439
|
const q = n.value.findIndex(
|
|
2434
2440
|
(X) => X.pageIndex === G.pageIndex && X.componentIndex === G.componentIndex
|
|
2435
2441
|
);
|
|
2436
2442
|
q >= 0 && (r.value = q), $.value = "fields";
|
|
2437
2443
|
} else $.value = "component";
|
|
2438
2444
|
}
|
|
2439
|
-
function
|
|
2445
|
+
function x(G) {
|
|
2440
2446
|
const d = G.target;
|
|
2441
|
-
d.value && (
|
|
2447
|
+
d.value && (w.insert(d.value), S.value = "design", $.value = "component", d.value = "");
|
|
2442
2448
|
}
|
|
2443
|
-
function
|
|
2444
|
-
i.value.template.pages[
|
|
2449
|
+
function P(G) {
|
|
2450
|
+
i.value.template.pages[I.value]?.flow && ["leftMm", "topMm", "widthMm", "heightMm", "pageAnchor", "grid"].some((d) => d in G) || w.mutate((d, q) => {
|
|
2445
2451
|
if (d.kind !== "list" && G.pageAnchor !== d.pageAnchor) {
|
|
2446
|
-
const _ = q.template.pages[
|
|
2452
|
+
const _ = q.template.pages[k.value.pageIndex];
|
|
2447
2453
|
G.pageAnchor === "header" && (d.topMm = _.marginTopMm ?? 0), G.pageAnchor === "footer" && (d.topMm = Math.max(
|
|
2448
2454
|
0,
|
|
2449
2455
|
_.heightMm - (_.marginBottomMm ?? 0) - d.heightMm
|
|
@@ -2461,7 +2467,7 @@ function ri(e, s, o) {
|
|
|
2461
2467
|
});
|
|
2462
2468
|
}
|
|
2463
2469
|
function W(G) {
|
|
2464
|
-
const d =
|
|
2470
|
+
const d = c.value;
|
|
2465
2471
|
if (!d || i.value.template.pages[n.value[r.value]?.pageIndex ?? -1]?.flow) return;
|
|
2466
2472
|
const q = JSON.parse(JSON.stringify(d));
|
|
2467
2473
|
try {
|
|
@@ -2481,11 +2487,11 @@ function ri(e, s, o) {
|
|
|
2481
2487
|
const d = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(G.path ?? ""), q = G.pageIndex ?? (d ? Number(d[1]) : void 0), X = G.componentIndex ?? (d ? Number(d[2]) : void 0);
|
|
2482
2488
|
if (q !== void 0) {
|
|
2483
2489
|
if (X === void 0) {
|
|
2484
|
-
|
|
2490
|
+
I.value = q, $.value = "template", S.value = "design";
|
|
2485
2491
|
return;
|
|
2486
2492
|
}
|
|
2487
|
-
if (S.value = "design",
|
|
2488
|
-
const _ =
|
|
2493
|
+
if (S.value = "design", T({ pageIndex: q, componentIndex: X }), G.field) {
|
|
2494
|
+
const _ = c.value?.columns.findIndex(
|
|
2489
2495
|
(N) => N.field === G.field
|
|
2490
2496
|
);
|
|
2491
2497
|
_ !== void 0 && _ >= 0 && s.activate(_);
|
|
@@ -2494,22 +2500,22 @@ function ri(e, s, o) {
|
|
|
2494
2500
|
}
|
|
2495
2501
|
return {
|
|
2496
2502
|
mode: S,
|
|
2497
|
-
setMode:
|
|
2498
|
-
canvasSelection:
|
|
2499
|
-
canvasPage:
|
|
2500
|
-
canvasActive:
|
|
2501
|
-
tool:
|
|
2503
|
+
setMode: E,
|
|
2504
|
+
canvasSelection: k,
|
|
2505
|
+
canvasPage: I,
|
|
2506
|
+
canvasActive: M,
|
|
2507
|
+
tool: u,
|
|
2502
2508
|
visitedTools: b,
|
|
2503
|
-
editDisabled:
|
|
2509
|
+
editDisabled: R,
|
|
2504
2510
|
dataSchema: A,
|
|
2505
|
-
chooseCanvas:
|
|
2506
|
-
insertComponent:
|
|
2507
|
-
patchCanvas:
|
|
2511
|
+
chooseCanvas: T,
|
|
2512
|
+
insertComponent: x,
|
|
2513
|
+
patchCanvas: P,
|
|
2508
2514
|
changeList: H,
|
|
2509
2515
|
moveColumn: W,
|
|
2510
2516
|
headerCommand: Y,
|
|
2511
2517
|
locateReview: se,
|
|
2512
|
-
canvas:
|
|
2518
|
+
canvas: w
|
|
2513
2519
|
};
|
|
2514
2520
|
}
|
|
2515
2521
|
function di(e, s, o) {
|
|
@@ -2523,89 +2529,89 @@ function di(e, s, o) {
|
|
|
2523
2529
|
return r === void 0 ? void 0 : e[r];
|
|
2524
2530
|
}
|
|
2525
2531
|
function ui(e, s, o) {
|
|
2526
|
-
const i = z(!1), n = z(e.activeIndex.value), r = z(null),
|
|
2527
|
-
function
|
|
2528
|
-
const
|
|
2529
|
-
C.value = Math.floor(
|
|
2532
|
+
const i = z(!1), n = z(e.activeIndex.value), r = z(null), c = z(null), g = z(null), h = z(null), C = z(0), $ = 100, f = B(() => o.value.slice(C.value, C.value + $));
|
|
2533
|
+
function w() {
|
|
2534
|
+
const x = Math.max(0, o.value.findIndex((P) => P.index === n.value));
|
|
2535
|
+
C.value = Math.floor(x / $) * $;
|
|
2530
2536
|
}
|
|
2531
|
-
async function S(
|
|
2532
|
-
const
|
|
2533
|
-
n.value = o.value[
|
|
2537
|
+
async function S(x) {
|
|
2538
|
+
const P = Math.max(0, Math.min(Math.max(0, o.value.length - 1), C.value + x * $));
|
|
2539
|
+
n.value = o.value[P]?.index ?? -1, w(), await he(), k(!0);
|
|
2534
2540
|
}
|
|
2535
|
-
function x
|
|
2536
|
-
const
|
|
2541
|
+
function k(x = !1) {
|
|
2542
|
+
const P = h.value, H = P?.querySelector(
|
|
2537
2543
|
`button[data-column-index="${n.value}"]`
|
|
2538
2544
|
);
|
|
2539
|
-
if (!
|
|
2540
|
-
|
|
2541
|
-
const W =
|
|
2542
|
-
Y.top < se ?
|
|
2545
|
+
if (!P || !H) return;
|
|
2546
|
+
x && H.focus({ preventScroll: !0 });
|
|
2547
|
+
const W = P.getBoundingClientRect(), Y = H.getBoundingClientRect(), se = W.top + P.clientTop, G = se + P.clientHeight;
|
|
2548
|
+
Y.top < se ? P.scrollTop += Y.top - se : Y.bottom > G && (P.scrollTop += Y.bottom - G);
|
|
2543
2549
|
}
|
|
2544
|
-
async function
|
|
2545
|
-
i.value && (i.value = !1,
|
|
2550
|
+
async function I(x = !1) {
|
|
2551
|
+
i.value && (i.value = !1, x && (await he(), r.value?.focus({ preventScroll: !0 })));
|
|
2546
2552
|
}
|
|
2547
|
-
async function
|
|
2548
|
-
if (i.value) return
|
|
2549
|
-
const
|
|
2550
|
-
n.value =
|
|
2553
|
+
async function M() {
|
|
2554
|
+
if (i.value) return I(!0);
|
|
2555
|
+
const x = o.value.map((P) => P.index);
|
|
2556
|
+
n.value = x.includes(e.activeIndex.value) ? e.activeIndex.value : x[0] ?? -1, i.value = !0, w(), await he(), g.value?.focus({ preventScroll: !0 }), k();
|
|
2551
2557
|
}
|
|
2552
|
-
function
|
|
2553
|
-
e.activate(
|
|
2558
|
+
function u(x) {
|
|
2559
|
+
e.activate(x), I(!0);
|
|
2554
2560
|
}
|
|
2555
|
-
function b(
|
|
2556
|
-
!i.value ||
|
|
2561
|
+
function b(x) {
|
|
2562
|
+
!i.value || x.isComposing || x.keyCode === 229 || (x.preventDefault(), x.stopPropagation(), I(!0));
|
|
2557
2563
|
}
|
|
2558
|
-
async function
|
|
2559
|
-
if (
|
|
2560
|
-
const
|
|
2564
|
+
async function R(x) {
|
|
2565
|
+
if (x.isComposing || x.keyCode === 229) return;
|
|
2566
|
+
const P = di(
|
|
2561
2567
|
o.value.map((H) => H.index),
|
|
2562
2568
|
n.value,
|
|
2563
|
-
|
|
2569
|
+
x.key
|
|
2564
2570
|
);
|
|
2565
|
-
|
|
2571
|
+
P !== void 0 && (n.value = P, w(), x.preventDefault(), await he(), k(!0));
|
|
2566
2572
|
}
|
|
2567
|
-
async function A(
|
|
2568
|
-
if (
|
|
2569
|
-
|
|
2570
|
-
const
|
|
2571
|
-
if (
|
|
2572
|
-
if (
|
|
2573
|
-
|
|
2573
|
+
async function A(x) {
|
|
2574
|
+
if (x.isComposing || x.keyCode === 229 || !["ArrowDown", "ArrowUp", "Enter"].includes(x.key)) return;
|
|
2575
|
+
x.preventDefault(), x.stopPropagation();
|
|
2576
|
+
const P = o.value.map((H) => H.index);
|
|
2577
|
+
if (P.length) {
|
|
2578
|
+
if (x.key === "Enter") {
|
|
2579
|
+
P.includes(n.value) && u(n.value);
|
|
2574
2580
|
return;
|
|
2575
2581
|
}
|
|
2576
|
-
|
|
2582
|
+
x.key === "ArrowUp" && (n.value = P.at(-1)), w(), await he(), k(!0);
|
|
2577
2583
|
}
|
|
2578
2584
|
}
|
|
2579
|
-
function
|
|
2580
|
-
const
|
|
2581
|
-
!i.value ||
|
|
2585
|
+
function E(x) {
|
|
2586
|
+
const P = x.target;
|
|
2587
|
+
!i.value || c.value?.contains(P) || r.value?.contains(P) || I();
|
|
2582
2588
|
}
|
|
2583
|
-
function
|
|
2584
|
-
const
|
|
2585
|
-
!
|
|
2589
|
+
function T(x) {
|
|
2590
|
+
const P = x.relatedTarget;
|
|
2591
|
+
!P || c.value?.contains(P) || r.value?.contains(P) || I();
|
|
2586
2592
|
}
|
|
2587
|
-
return le(o, (
|
|
2588
|
-
|
|
2593
|
+
return le(o, (x) => {
|
|
2594
|
+
x.some((P) => P.index === n.value) || (n.value = x[0]?.index ?? -1), w();
|
|
2589
2595
|
}), le(s, () => {
|
|
2590
|
-
|
|
2591
|
-
}), Ct(() => document.addEventListener("pointerdown",
|
|
2596
|
+
I();
|
|
2597
|
+
}), Ct(() => document.addEventListener("pointerdown", E)), Pe(() => document.removeEventListener("pointerdown", E)), {
|
|
2592
2598
|
open: i,
|
|
2593
2599
|
cursor: n,
|
|
2594
2600
|
trigger: r,
|
|
2595
|
-
panel:
|
|
2601
|
+
panel: c,
|
|
2596
2602
|
search: g,
|
|
2597
2603
|
list: h,
|
|
2598
2604
|
windowColumns: f,
|
|
2599
2605
|
windowStart: C,
|
|
2600
2606
|
windowSize: $,
|
|
2601
2607
|
stepWindow: S,
|
|
2602
|
-
toggle:
|
|
2603
|
-
close:
|
|
2604
|
-
choose:
|
|
2608
|
+
toggle: M,
|
|
2609
|
+
close: I,
|
|
2610
|
+
choose: u,
|
|
2605
2611
|
escape: b,
|
|
2606
|
-
navigate:
|
|
2612
|
+
navigate: R,
|
|
2607
2613
|
searchKeydown: A,
|
|
2608
|
-
leave:
|
|
2614
|
+
leave: T
|
|
2609
2615
|
};
|
|
2610
2616
|
}
|
|
2611
2617
|
const Kt = /* @__PURE__ */ Symbol("mach-report:tool-drafts");
|
|
@@ -2614,16 +2620,16 @@ function ci(e) {
|
|
|
2614
2620
|
an(Kt, {
|
|
2615
2621
|
epoch: o,
|
|
2616
2622
|
read: (r) => s.value[r],
|
|
2617
|
-
write(r,
|
|
2623
|
+
write(r, c) {
|
|
2618
2624
|
const g = { ...s.value };
|
|
2619
|
-
|
|
2625
|
+
c ? g[r] = c : delete g[r], s.value = g;
|
|
2620
2626
|
const h = r.split(":")[0];
|
|
2621
2627
|
e(h, Object.keys(g).some((C) => C.split(":")[0] === h));
|
|
2622
2628
|
}
|
|
2623
2629
|
});
|
|
2624
2630
|
function n(r) {
|
|
2625
2631
|
s.value = JSON.parse(JSON.stringify(r));
|
|
2626
|
-
for (const
|
|
2632
|
+
for (const c of ["params", "rules", "excel"]) e(c, Object.keys(r).some((g) => g.split(":")[0] === c));
|
|
2627
2633
|
o.value++;
|
|
2628
2634
|
}
|
|
2629
2635
|
return { records: s, restore: n, clear: () => n({}) };
|
|
@@ -2654,10 +2660,10 @@ function mi(e, s, o) {
|
|
|
2654
2660
|
let i = xt.get(e);
|
|
2655
2661
|
i || (i = /* @__PURE__ */ new Map(), xt.set(e, i));
|
|
2656
2662
|
const n = i.get(s);
|
|
2657
|
-
let r,
|
|
2658
|
-
const g = new Promise((S,
|
|
2659
|
-
r = S,
|
|
2660
|
-
}), h = { run: o, resolve: r, reject:
|
|
2663
|
+
let r, c;
|
|
2664
|
+
const g = new Promise((S, k) => {
|
|
2665
|
+
r = S, c = k;
|
|
2666
|
+
}), h = { run: o, resolve: r, reject: c };
|
|
2661
2667
|
if (n)
|
|
2662
2668
|
return n.latest?.resolve(), n.latest = h, g;
|
|
2663
2669
|
let C;
|
|
@@ -2667,18 +2673,18 @@ function mi(e, s, o) {
|
|
|
2667
2673
|
i.set(s, $);
|
|
2668
2674
|
const f = () => {
|
|
2669
2675
|
const S = $.latest;
|
|
2670
|
-
$.latest = void 0, S ?
|
|
2671
|
-
},
|
|
2672
|
-
let
|
|
2676
|
+
$.latest = void 0, S ? w(S) : (i.delete(s), $.finish());
|
|
2677
|
+
}, w = (S) => {
|
|
2678
|
+
let k;
|
|
2673
2679
|
try {
|
|
2674
|
-
|
|
2675
|
-
} catch (
|
|
2676
|
-
S.reject(
|
|
2680
|
+
k = S.run();
|
|
2681
|
+
} catch (I) {
|
|
2682
|
+
S.reject(I), f();
|
|
2677
2683
|
return;
|
|
2678
2684
|
}
|
|
2679
|
-
Promise.resolve(
|
|
2685
|
+
Promise.resolve(k).then(S.resolve, S.reject).then(f);
|
|
2680
2686
|
};
|
|
2681
|
-
return
|
|
2687
|
+
return w(h), g;
|
|
2682
2688
|
}
|
|
2683
2689
|
async function vi(e, s) {
|
|
2684
2690
|
await xt.get(e)?.get(s)?.done;
|
|
@@ -2734,7 +2740,7 @@ function wi(e, s, o) {
|
|
|
2734
2740
|
const n = e === "params" ? pi(i) : e === "excel" ? yi(i) : e.split(":").length > 3 ? bi(i) : hi(i);
|
|
2735
2741
|
if (e === "params") {
|
|
2736
2742
|
const r = JSON.parse(o);
|
|
2737
|
-
if (!Ce(r) || !r.every((
|
|
2743
|
+
if (!Ce(r) || !r.every((c) => ue(c) && typeof c.field == "string")) throw new Error("Invalid stored parameter baseline");
|
|
2738
2744
|
}
|
|
2739
2745
|
if (!n) throw new Error(`Invalid stored ${e.split(":")[0]} draft`);
|
|
2740
2746
|
}
|
|
@@ -2770,238 +2776,238 @@ function Vt(e, s, o) {
|
|
|
2770
2776
|
}
|
|
2771
2777
|
function Mi(e) {
|
|
2772
2778
|
const s = z(!1), o = Ve(), i = z(""), n = z("idle"), r = B(() => !!o.value && ye(o.value.baseline) !== e.baseline());
|
|
2773
|
-
let
|
|
2774
|
-
function
|
|
2775
|
-
clearTimeout(
|
|
2779
|
+
let c, g = 0, h = !1, C = !1, $ = new AbortController(), f = new AbortController(), w = Promise.resolve(), S;
|
|
2780
|
+
function k() {
|
|
2781
|
+
clearTimeout(c), c = void 0, g++, $.abort(), f.abort(), $ = new AbortController(), f = new AbortController();
|
|
2776
2782
|
}
|
|
2777
|
-
function
|
|
2778
|
-
!h &&
|
|
2783
|
+
function I(T, x) {
|
|
2784
|
+
!h && x === g && (i.value = T instanceof Error ? T.message : String(T));
|
|
2779
2785
|
}
|
|
2780
|
-
async function
|
|
2781
|
-
|
|
2782
|
-
const
|
|
2786
|
+
async function M() {
|
|
2787
|
+
k();
|
|
2788
|
+
const T = g;
|
|
2783
2789
|
s.value = !0, C = !1, o.value = void 0, i.value = "", n.value = "idle", S = void 0;
|
|
2784
2790
|
try {
|
|
2785
|
-
const
|
|
2786
|
-
if (!
|
|
2787
|
-
const
|
|
2788
|
-
if (S = { storage:
|
|
2789
|
-
const H = await
|
|
2790
|
-
if (
|
|
2791
|
-
o.value = Vt(H,
|
|
2792
|
-
} catch (
|
|
2793
|
-
|
|
2791
|
+
const x = e.storage();
|
|
2792
|
+
if (!x) return;
|
|
2793
|
+
const P = e.id();
|
|
2794
|
+
if (S = { storage: x, key: ki(x.scope, P), ...xi(x) }, await vi(x.adapter, S.key), T !== g || h) return;
|
|
2795
|
+
const H = await x.adapter.read(S.key, { signal: f.signal });
|
|
2796
|
+
if (T !== g || h || H === null) return;
|
|
2797
|
+
o.value = Vt(H, P, S.maxBytes);
|
|
2798
|
+
} catch (x) {
|
|
2799
|
+
T === g && (C = !0), I(x, T);
|
|
2794
2800
|
} finally {
|
|
2795
|
-
|
|
2801
|
+
T === g && !h && (s.value = !1);
|
|
2796
2802
|
}
|
|
2797
2803
|
}
|
|
2798
|
-
function
|
|
2799
|
-
const
|
|
2800
|
-
if (!
|
|
2801
|
-
const
|
|
2804
|
+
function u(T) {
|
|
2805
|
+
const x = S;
|
|
2806
|
+
if (!x) return;
|
|
2807
|
+
const P = g, H = $.signal;
|
|
2802
2808
|
n.value = "saving";
|
|
2803
2809
|
const W = async () => {
|
|
2804
|
-
H.aborted || (
|
|
2810
|
+
H.aborted || (T === null ? await x.storage.adapter.remove(x.key, { signal: H }) : await x.storage.adapter.write(x.key, T, { signal: H }), !h && P === g && (n.value = T === null ? "idle" : "saved", i.value = ""));
|
|
2805
2811
|
};
|
|
2806
|
-
|
|
2812
|
+
w = mi(x.storage.adapter, x.key, W).catch((Y) => I(Y, P));
|
|
2807
2813
|
}
|
|
2808
2814
|
function b() {
|
|
2809
|
-
if (clearTimeout(
|
|
2815
|
+
if (clearTimeout(c), c = void 0, !(!S || o.value))
|
|
2810
2816
|
try {
|
|
2811
2817
|
if (!e.pending()) {
|
|
2812
|
-
C ||
|
|
2818
|
+
C || u(null);
|
|
2813
2819
|
return;
|
|
2814
2820
|
}
|
|
2815
|
-
const
|
|
2816
|
-
Vt(
|
|
2817
|
-
} catch (
|
|
2818
|
-
|
|
2821
|
+
const T = JSON.stringify(e.snapshot());
|
|
2822
|
+
Vt(T, e.id(), S.maxBytes), u(T);
|
|
2823
|
+
} catch (T) {
|
|
2824
|
+
I(T, g);
|
|
2819
2825
|
}
|
|
2820
2826
|
}
|
|
2821
|
-
function
|
|
2822
|
-
clearTimeout(
|
|
2827
|
+
function R() {
|
|
2828
|
+
clearTimeout(c), !(!S || o.value) && (c = setTimeout(b, S.debounceMs));
|
|
2823
2829
|
}
|
|
2824
2830
|
async function A() {
|
|
2825
|
-
o.value = void 0, C = !1,
|
|
2831
|
+
o.value = void 0, C = !1, u(null), await w, R();
|
|
2826
2832
|
}
|
|
2827
|
-
function
|
|
2833
|
+
function E() {
|
|
2828
2834
|
if (o.value)
|
|
2829
2835
|
try {
|
|
2830
|
-
e.restore(o.value), o.value = void 0,
|
|
2831
|
-
} catch (
|
|
2832
|
-
|
|
2836
|
+
e.restore(o.value), o.value = void 0, R();
|
|
2837
|
+
} catch (T) {
|
|
2838
|
+
I(T, g);
|
|
2833
2839
|
}
|
|
2834
2840
|
}
|
|
2835
2841
|
return le([e.id, () => e.storage()?.scope, () => e.storage()?.adapter, () => e.storage()?.maxBytes, () => e.storage()?.debounceMs], () => {
|
|
2836
|
-
|
|
2837
|
-
}, { immediate: !0 }), le([e.pending, e.changedSource],
|
|
2842
|
+
M();
|
|
2843
|
+
}, { immediate: !0 }), le([e.pending, e.changedSource], R, { deep: !0 }), Ct(() => {
|
|
2838
2844
|
globalThis.addEventListener?.("pagehide", b);
|
|
2839
2845
|
}), Pe(() => {
|
|
2840
|
-
globalThis.removeEventListener?.("pagehide", b), b(), h = !0, f.abort(), clearTimeout(
|
|
2841
|
-
}), { available: o, stale: r, error: i, status: n, checking: s, restore:
|
|
2846
|
+
globalThis.removeEventListener?.("pagehide", b), b(), h = !0, f.abort(), clearTimeout(c);
|
|
2847
|
+
}), { available: o, stale: r, error: i, status: n, checking: s, restore: E, discard: A, flush: b };
|
|
2842
2848
|
}
|
|
2843
2849
|
function Ci(e) {
|
|
2844
|
-
const s = z(!1), o = Ve(), i = z(!1), n = z(""), r = z(!1),
|
|
2850
|
+
const s = z(!1), o = Ve(), i = z(!1), n = z(""), r = z(!1), c = z(!1);
|
|
2845
2851
|
let g = 0, h;
|
|
2846
2852
|
const C = B(() => _t(e.baseline(), e.local(), { maxChanges: 100 })), $ = B(() => o.value ? _t(e.baseline(), o.value, { maxChanges: 100 }) : void 0);
|
|
2847
2853
|
function f() {
|
|
2848
2854
|
g++, h?.abort(), h = void 0, i.value = !1;
|
|
2849
2855
|
}
|
|
2850
|
-
function
|
|
2851
|
-
f(), s.value = !1, o.value = void 0, n.value = "", r.value = !1,
|
|
2856
|
+
function w() {
|
|
2857
|
+
f(), s.value = !1, o.value = void 0, n.value = "", r.value = !1, c.value = !1;
|
|
2852
2858
|
}
|
|
2853
2859
|
async function S() {
|
|
2854
2860
|
const b = e.configuration().loadLatest;
|
|
2855
2861
|
if (!b || i.value) return;
|
|
2856
2862
|
f();
|
|
2857
|
-
const
|
|
2863
|
+
const R = g, A = e.local().id;
|
|
2858
2864
|
h = new AbortController(), i.value = !0, n.value = "";
|
|
2859
2865
|
try {
|
|
2860
|
-
const
|
|
2861
|
-
if (
|
|
2862
|
-
if (
|
|
2863
|
-
o.value =
|
|
2864
|
-
} catch (
|
|
2865
|
-
|
|
2866
|
+
const E = ae(await b({ id: A, signal: h.signal }));
|
|
2867
|
+
if (R !== g) return;
|
|
2868
|
+
if (E.id !== A) throw new Error("Latest template identity does not match");
|
|
2869
|
+
o.value = E;
|
|
2870
|
+
} catch (E) {
|
|
2871
|
+
R === g && (n.value = E instanceof Error ? E.message : String(E));
|
|
2866
2872
|
} finally {
|
|
2867
|
-
|
|
2873
|
+
R === g && (i.value = !1);
|
|
2868
2874
|
}
|
|
2869
2875
|
}
|
|
2870
|
-
function
|
|
2871
|
-
|
|
2876
|
+
function k(b) {
|
|
2877
|
+
w(), s.value = !0, b ? o.value = ae(b) : S();
|
|
2872
2878
|
}
|
|
2873
|
-
async function
|
|
2874
|
-
!o.value || i.value || await e.applyLatest(ae(o.value)) &&
|
|
2879
|
+
async function I() {
|
|
2880
|
+
!o.value || i.value || await e.applyLatest(ae(o.value)) && w();
|
|
2875
2881
|
}
|
|
2876
|
-
function
|
|
2882
|
+
function M() {
|
|
2877
2883
|
if (!(!o.value || i.value || !r.value))
|
|
2878
2884
|
try {
|
|
2879
|
-
e.rebase(ae(o.value)),
|
|
2885
|
+
e.rebase(ae(o.value)), w();
|
|
2880
2886
|
} catch (b) {
|
|
2881
2887
|
n.value = b instanceof Error ? b.message : String(b);
|
|
2882
2888
|
}
|
|
2883
2889
|
}
|
|
2884
|
-
async function
|
|
2890
|
+
async function u() {
|
|
2885
2891
|
const b = e.configuration().keepCopy;
|
|
2886
2892
|
if (!b || i.value) return;
|
|
2887
2893
|
f();
|
|
2888
|
-
const
|
|
2894
|
+
const R = g, A = ae(e.local());
|
|
2889
2895
|
h = new AbortController(), i.value = !0, n.value = "";
|
|
2890
2896
|
try {
|
|
2891
|
-
await b(A, { id: A.id, sourceRevision: A.revision, signal: h.signal }),
|
|
2892
|
-
} catch (
|
|
2893
|
-
|
|
2897
|
+
await b(A, { id: A.id, sourceRevision: A.revision, signal: h.signal }), R === g && (c.value = !0);
|
|
2898
|
+
} catch (E) {
|
|
2899
|
+
R === g && (n.value = E instanceof Error ? E.message : String(E));
|
|
2894
2900
|
} finally {
|
|
2895
|
-
|
|
2901
|
+
R === g && (i.value = !1);
|
|
2896
2902
|
}
|
|
2897
2903
|
}
|
|
2898
|
-
return Pe(f), { active: s, latest: o, busy: i, error: n, confirmRebase: r, copied:
|
|
2904
|
+
return Pe(f), { active: s, latest: o, busy: i, error: n, confirmRebase: r, copied: c, localChanges: C, remoteChanges: $, begin: k, clear: w, load: S, adoptLatest: I, rebase: M, keepCopy: u, toggleRebase: () => {
|
|
2899
2905
|
r.value = !r.value;
|
|
2900
2906
|
} };
|
|
2901
2907
|
}
|
|
2902
2908
|
function $i(e, s, o, i) {
|
|
2903
|
-
const n = z(0), r = z(""),
|
|
2909
|
+
const n = z(0), r = z(""), c = z([]), g = z();
|
|
2904
2910
|
le(e, () => {
|
|
2905
2911
|
g.value = void 0;
|
|
2906
2912
|
}, { flush: "sync" });
|
|
2907
2913
|
const h = B(
|
|
2908
2914
|
() => e.value.template.pages.flatMap(
|
|
2909
|
-
(
|
|
2910
|
-
(
|
|
2915
|
+
(E, T) => E.components.flatMap(
|
|
2916
|
+
(x, P) => x.kind === "list" ? [{ component: x, pageIndex: T, componentIndex: P }] : []
|
|
2911
2917
|
)
|
|
2912
2918
|
)
|
|
2913
2919
|
), C = B(
|
|
2914
2920
|
() => h.value[n.value]?.component
|
|
2915
2921
|
), $ = B(() => {
|
|
2916
|
-
const
|
|
2917
|
-
if (!
|
|
2918
|
-
const
|
|
2919
|
-
(
|
|
2922
|
+
const E = C.value;
|
|
2923
|
+
if (!E) return [];
|
|
2924
|
+
const T = E.columns.map(
|
|
2925
|
+
(x) => x.headerStyle?.align ?? x.headerAlign ?? E.headerStyle?.align ?? E.headerAlign ?? x.style?.align ?? "center"
|
|
2920
2926
|
);
|
|
2921
|
-
if (
|
|
2922
|
-
for (const
|
|
2923
|
-
for (let
|
|
2924
|
-
|
|
2925
|
-
return
|
|
2927
|
+
if (E.headerGrid && s())
|
|
2928
|
+
for (const x of He(E.headerGrid, E.widthMm, 100).cells)
|
|
2929
|
+
for (let P = x.ci; P < x.ci + (x.cell.colSpan ?? 1); P++)
|
|
2930
|
+
T[P] = x.cell.style?.align ?? "left";
|
|
2931
|
+
return T;
|
|
2926
2932
|
}), f = B(() => {
|
|
2927
|
-
const
|
|
2928
|
-
return (C.value?.columns ?? []).flatMap((
|
|
2929
|
-
const
|
|
2930
|
-
return
|
|
2933
|
+
const E = r.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
|
|
2934
|
+
return (C.value?.columns ?? []).flatMap((T, x) => {
|
|
2935
|
+
const P = `${T.header} ${T.field}`.toLocaleLowerCase();
|
|
2936
|
+
return E.every((H) => P.includes(H)) ? [{ column: T, index: x }] : [];
|
|
2931
2937
|
});
|
|
2932
2938
|
});
|
|
2933
|
-
function
|
|
2934
|
-
|
|
2939
|
+
function w(E, T) {
|
|
2940
|
+
c.value = T ? [.../* @__PURE__ */ new Set([...c.value, E])] : c.value.filter((x) => x !== E);
|
|
2935
2941
|
}
|
|
2936
|
-
function S(
|
|
2937
|
-
const
|
|
2938
|
-
for (const { index:
|
|
2939
|
-
|
|
2940
|
-
|
|
2942
|
+
function S(E) {
|
|
2943
|
+
const T = new Set(c.value);
|
|
2944
|
+
for (const { index: x } of f.value)
|
|
2945
|
+
E ? T.add(x) : T.delete(x);
|
|
2946
|
+
c.value = [...T];
|
|
2941
2947
|
}
|
|
2942
|
-
function
|
|
2943
|
-
|
|
2948
|
+
function k() {
|
|
2949
|
+
c.value = [];
|
|
2944
2950
|
}
|
|
2945
|
-
function
|
|
2951
|
+
function I(E, T, x) {
|
|
2946
2952
|
if (!o()) return;
|
|
2947
|
-
const
|
|
2948
|
-
if ((
|
|
2949
|
-
const H = C.value?.columns[
|
|
2953
|
+
const P = h.value[n.value];
|
|
2954
|
+
if ((T === "widthMm" || T === "hidden") && P && e.value.template.pages[P.pageIndex]?.flow) return;
|
|
2955
|
+
const H = C.value?.columns[E];
|
|
2950
2956
|
if (H) {
|
|
2951
|
-
if (
|
|
2952
|
-
const W = C.value.dataset, Y = `$.template.pages[${
|
|
2957
|
+
if (T === "field" && x !== H.field) {
|
|
2958
|
+
const W = C.value.dataset, Y = `$.template.pages[${P.pageIndex}].components[${P.componentIndex}].columns[${E}].field`, se = vn(e.value.template, W, H.field).filter((G) => G.path !== Y);
|
|
2953
2959
|
if (se.length) {
|
|
2954
|
-
g.value = { index:
|
|
2960
|
+
g.value = { index: E, listIndex: n.value, before: H.field, after: String(x), references: se };
|
|
2955
2961
|
return;
|
|
2956
2962
|
}
|
|
2957
2963
|
}
|
|
2958
|
-
|
|
2959
|
-
(W, Y) => Y !==
|
|
2960
|
-
) || (Object.assign(H, { [
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
),
|
|
2964
|
+
T === "hidden" && x === !0 && !C.value?.columns.some(
|
|
2965
|
+
(W, Y) => Y !== E && !W.hidden
|
|
2966
|
+
) || (Object.assign(H, { [T]: T === "widthMm" ? Number(x) : x }), T === "header" && b(E, String(x)), T === "headerAlign" && R(
|
|
2967
|
+
E,
|
|
2968
|
+
x
|
|
2969
|
+
), T === "widthMm" && u(), i());
|
|
2964
2970
|
}
|
|
2965
2971
|
}
|
|
2966
|
-
function
|
|
2967
|
-
const
|
|
2968
|
-
if (!
|
|
2969
|
-
const
|
|
2970
|
-
g.value = void 0, !(!
|
|
2972
|
+
function M() {
|
|
2973
|
+
const E = g.value;
|
|
2974
|
+
if (!E || !o()) return;
|
|
2975
|
+
const T = h.value[E.listIndex]?.component.columns[E.index];
|
|
2976
|
+
g.value = void 0, !(!T || T.field !== E.before) && (T.field = E.after, i());
|
|
2971
2977
|
}
|
|
2972
|
-
function
|
|
2973
|
-
const
|
|
2974
|
-
if (!
|
|
2975
|
-
const
|
|
2976
|
-
|
|
2977
|
-
...
|
|
2978
|
+
function u() {
|
|
2979
|
+
const E = h.value[n.value];
|
|
2980
|
+
if (!E) return;
|
|
2981
|
+
const T = E.component, x = e.value.template.pages[E.pageIndex], P = T.columns.map((H) => H.widthMm);
|
|
2982
|
+
T.headerGrid && (T.headerGrid.colWidthsMm = P), x.layout === "wide" && P.every((H) => Number.isFinite(H) && H > 0) && (T.widthMm = P.reduce((H, W) => H + W, 0), x.widthMm = Math.max(
|
|
2983
|
+
...x.components.map(
|
|
2978
2984
|
(H) => H.leftMm + H.widthMm
|
|
2979
2985
|
)
|
|
2980
|
-
) + (
|
|
2986
|
+
) + (x.marginRightMm ?? 0));
|
|
2981
2987
|
}
|
|
2982
|
-
function b(
|
|
2983
|
-
const
|
|
2984
|
-
if (!
|
|
2985
|
-
const H = He(
|
|
2986
|
-
H && (Object.assign(H.cell, { text:
|
|
2987
|
-
W.header =
|
|
2988
|
+
function b(E, T) {
|
|
2989
|
+
const x = C.value;
|
|
2990
|
+
if (!x?.headerGrid) return;
|
|
2991
|
+
const H = He(x.headerGrid, x.widthMm, 100).cells.filter(({ ci: W, cell: Y }) => W <= E && W + (Y.colSpan ?? 1) > E).slice(-1)[0];
|
|
2992
|
+
H && (Object.assign(H.cell, { text: T, rawText: T, value: T }), x.columns.slice(H.ci, H.ci + (H.cell.colSpan ?? 1)).forEach((W) => {
|
|
2993
|
+
W.header = T;
|
|
2988
2994
|
}));
|
|
2989
2995
|
}
|
|
2990
|
-
function
|
|
2991
|
-
const
|
|
2992
|
-
if (
|
|
2993
|
-
const W = He(
|
|
2994
|
-
W && (W.cell.style = { ...W.cell.style, align:
|
|
2995
|
-
Y.headerAlign =
|
|
2996
|
+
function R(E, T) {
|
|
2997
|
+
const x = C.value, P = x?.columns[E];
|
|
2998
|
+
if (P?.headerStyle?.align !== void 0 && (P.headerStyle = { ...P.headerStyle, align: T }), !x?.headerGrid) return;
|
|
2999
|
+
const W = He(x.headerGrid, x.widthMm, 100).cells.filter(({ ci: Y, cell: se }) => Y <= E && Y + (se.colSpan ?? 1) > E).slice(-1)[0];
|
|
3000
|
+
W && (W.cell.style = { ...W.cell.style, align: T }, x.columns.slice(W.ci, W.ci + (W.cell.colSpan ?? 1)).forEach((Y) => {
|
|
3001
|
+
Y.headerAlign = T, Y.headerStyle?.align !== void 0 && (Y.headerStyle = { ...Y.headerStyle, align: T });
|
|
2996
3002
|
}));
|
|
2997
3003
|
}
|
|
2998
|
-
function A(
|
|
2999
|
-
if (!(!o() ||
|
|
3000
|
-
for (const
|
|
3001
|
-
const
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3004
|
+
function A(E, T) {
|
|
3005
|
+
if (!(!o() || E === "headerAlign" && T === "auto")) {
|
|
3006
|
+
for (const x of c.value) {
|
|
3007
|
+
const P = C.value?.columns[x];
|
|
3008
|
+
P && (Object.assign(P, { [E]: T }), E === "headerAlign" && R(
|
|
3009
|
+
x,
|
|
3010
|
+
T
|
|
3005
3011
|
));
|
|
3006
3012
|
}
|
|
3007
3013
|
i();
|
|
@@ -3010,20 +3016,20 @@ function $i(e, s, o, i) {
|
|
|
3010
3016
|
return {
|
|
3011
3017
|
selected: n,
|
|
3012
3018
|
query: r,
|
|
3013
|
-
selectedColumns:
|
|
3019
|
+
selectedColumns: c,
|
|
3014
3020
|
lists: h,
|
|
3015
3021
|
activeList: C,
|
|
3016
3022
|
headerAlignments: $,
|
|
3017
3023
|
visibleColumns: f,
|
|
3018
|
-
toggleColumn:
|
|
3024
|
+
toggleColumn: w,
|
|
3019
3025
|
selectVisible: S,
|
|
3020
|
-
clearSelection:
|
|
3026
|
+
clearSelection: k,
|
|
3021
3027
|
fieldChange: g,
|
|
3022
|
-
confirmFieldChange:
|
|
3028
|
+
confirmFieldChange: M,
|
|
3023
3029
|
cancelFieldChange: () => {
|
|
3024
3030
|
g.value = void 0;
|
|
3025
3031
|
},
|
|
3026
|
-
setColumn:
|
|
3032
|
+
setColumn: I,
|
|
3027
3033
|
alignColumns: A
|
|
3028
3034
|
};
|
|
3029
3035
|
}
|
|
@@ -3036,10 +3042,10 @@ function Si(e, s, o = !1) {
|
|
|
3036
3042
|
let n = 0;
|
|
3037
3043
|
const r = Math.min(e.length, s.length);
|
|
3038
3044
|
for (; n < r && e.charCodeAt(n) === s.charCodeAt(n); ) n++;
|
|
3039
|
-
let
|
|
3040
|
-
for (;
|
|
3041
|
-
|
|
3042
|
-
const h = { kind: "patch", start: n, removed: e.slice(n,
|
|
3045
|
+
let c = e.length, g = s.length;
|
|
3046
|
+
for (; c > n && g > n && e.charCodeAt(c - 1) === s.charCodeAt(g - 1); )
|
|
3047
|
+
c--, g--;
|
|
3048
|
+
const h = { kind: "patch", start: n, removed: e.slice(n, c), inserted: s.slice(n, g) };
|
|
3043
3049
|
return Mt(h) < Mt(i) ? h : i;
|
|
3044
3050
|
}
|
|
3045
3051
|
function nt(e, s, o = !1) {
|
|
@@ -3049,42 +3055,42 @@ function nt(e, s, o = !1) {
|
|
|
3049
3055
|
}
|
|
3050
3056
|
const Je = (e) => Mt(e) + (e.view ? 64 : 0), at = (e, s) => s ? { ...e, view: { before: { ...s }, after: { ...s } } } : e;
|
|
3051
3057
|
function Ii(e, s = { entries: 100, bytes: 16 * 1024 * 1024 }) {
|
|
3052
|
-
if (![s.entries, s.bytes].every((
|
|
3053
|
-
const o = Ve([{ kind: "snapshot", value: e }]), i = z(0), n = z(e), r = B(() => i.value > 0),
|
|
3054
|
-
function $(
|
|
3055
|
-
o.value = [at({ kind: "snapshot", value:
|
|
3058
|
+
if (![s.entries, s.bytes].every((M) => Number.isSafeInteger(M) && M > 0)) throw new RangeError("History budgets must be positive safe integers");
|
|
3059
|
+
const o = Ve([{ kind: "snapshot", value: e }]), i = z(0), n = z(e), r = B(() => i.value > 0), c = B(() => i.value + 1 < o.value.length), g = B(() => n.value), h = B(() => o.value.reduce((M, u) => M + Je(u), 0)), C = Ve();
|
|
3060
|
+
function $(M, u) {
|
|
3061
|
+
o.value = [at({ kind: "snapshot", value: M }, u)], i.value = 0, n.value = M, C.value = u;
|
|
3056
3062
|
}
|
|
3057
|
-
function f(
|
|
3058
|
-
let
|
|
3059
|
-
for (;
|
|
3063
|
+
function f(M) {
|
|
3064
|
+
let u = M;
|
|
3065
|
+
for (; u > 0 && o.value[u].kind !== "snapshot"; ) u--;
|
|
3060
3066
|
let b = "";
|
|
3061
|
-
for (;
|
|
3067
|
+
for (; u <= M; u++) b = nt(b, o.value[u]);
|
|
3062
3068
|
return b;
|
|
3063
3069
|
}
|
|
3064
|
-
function
|
|
3065
|
-
let
|
|
3066
|
-
for (;
|
|
3067
|
-
const b =
|
|
3068
|
-
|
|
3070
|
+
function w(M) {
|
|
3071
|
+
let u = M.reduce((b, R) => b + Je(R), 0);
|
|
3072
|
+
for (; M.length > 1 && (M.length > s.entries || u > s.bytes); ) {
|
|
3073
|
+
const b = M[0], R = M[1], A = at({ kind: "snapshot", value: nt(b.value, R) }, R.view?.after);
|
|
3074
|
+
u += Je(A) - Je(b) - Je(R), M.splice(0, 2, A);
|
|
3069
3075
|
}
|
|
3070
|
-
return
|
|
3076
|
+
return M;
|
|
3071
3077
|
}
|
|
3072
|
-
function S(
|
|
3073
|
-
if (!
|
|
3074
|
-
const
|
|
3075
|
-
|
|
3078
|
+
function S(M) {
|
|
3079
|
+
if (!M) return;
|
|
3080
|
+
const u = o.value.slice(), b = u[i.value];
|
|
3081
|
+
u[i.value] = b.view ? { ...b, view: { before: b.view.before, after: { ...M } } } : at(b, M), o.value = u;
|
|
3076
3082
|
}
|
|
3077
|
-
function
|
|
3078
|
-
if (n.value ===
|
|
3083
|
+
function k(M, u) {
|
|
3084
|
+
if (n.value === M) return !1;
|
|
3079
3085
|
const b = o.value.slice(0, i.value + 1);
|
|
3080
|
-
return b.push(at(Si(n.value,
|
|
3086
|
+
return b.push(at(Si(n.value, M, b.length % 20 === 0), u)), o.value = w(b), i.value = o.value.length - 1, n.value = M, !0;
|
|
3081
3087
|
}
|
|
3082
|
-
function
|
|
3083
|
-
if (
|
|
3084
|
-
const
|
|
3085
|
-
return C.value =
|
|
3088
|
+
function I(M) {
|
|
3089
|
+
if (M < 0 ? !r.value : !c.value) return;
|
|
3090
|
+
const u = o.value[i.value];
|
|
3091
|
+
return C.value = M < 0 ? u.view?.before : o.value[i.value + 1]?.view?.after, M < 0 && u.kind === "patch" ? n.value = nt(n.value, u, !0) : M > 0 ? n.value = nt(n.value, o.value[i.value + 1]) : n.value = f(i.value - 1), i.value += M, n.value;
|
|
3086
3092
|
}
|
|
3087
|
-
return { canUndo: r, canRedo:
|
|
3093
|
+
return { canUndo: r, canRedo: c, current: g, context: C, retainedBytes: h, reset: $, record: k, move: I, annotate: S };
|
|
3088
3094
|
}
|
|
3089
3095
|
function Ti(e) {
|
|
3090
3096
|
const s = Ve(null), o = z(!1);
|
|
@@ -3092,23 +3098,23 @@ function Ti(e) {
|
|
|
3092
3098
|
function r(h) {
|
|
3093
3099
|
i?.(h), i = void 0, s.value = null;
|
|
3094
3100
|
}
|
|
3095
|
-
function
|
|
3101
|
+
function c() {
|
|
3096
3102
|
n++, r(!1), o.value = !1;
|
|
3097
3103
|
}
|
|
3098
3104
|
async function g(h) {
|
|
3099
|
-
|
|
3105
|
+
c();
|
|
3100
3106
|
const C = n, $ = e();
|
|
3101
3107
|
o.value = !0;
|
|
3102
3108
|
try {
|
|
3103
|
-
const f = await new Promise((
|
|
3104
|
-
if (i =
|
|
3109
|
+
const f = await new Promise((w, S) => {
|
|
3110
|
+
if (i = w, !$) {
|
|
3105
3111
|
s.value = h;
|
|
3106
3112
|
return;
|
|
3107
3113
|
}
|
|
3108
|
-
Promise.resolve().then(() => n === C ? $(h) : !1).then((
|
|
3109
|
-
n === C && r(
|
|
3110
|
-
}, (
|
|
3111
|
-
n === C && (i = void 0, s.value = null, S(
|
|
3114
|
+
Promise.resolve().then(() => n === C ? $(h) : !1).then((k) => {
|
|
3115
|
+
n === C && r(k === !0);
|
|
3116
|
+
}, (k) => {
|
|
3117
|
+
n === C && (i = void 0, s.value = null, S(k));
|
|
3112
3118
|
});
|
|
3113
3119
|
});
|
|
3114
3120
|
return n === C && f === !0;
|
|
@@ -3116,11 +3122,11 @@ function Ti(e) {
|
|
|
3116
3122
|
n === C && (o.value = !1);
|
|
3117
3123
|
}
|
|
3118
3124
|
}
|
|
3119
|
-
return Pe(
|
|
3125
|
+
return Pe(c), { confirmation: s, pending: o, decide: r, request: g, cancel: c };
|
|
3120
3126
|
}
|
|
3121
3127
|
function Ei(e, s) {
|
|
3122
|
-
const o = z(ae(e.modelValue)), i = z(ye(o.value)), n = z(ye(o.value)), r = z(""),
|
|
3123
|
-
...
|
|
3128
|
+
const o = z(ae(e.modelValue)), i = z(ye(o.value)), n = z(ye(o.value)), r = z(""), c = z(!1), g = B(() => ({
|
|
3129
|
+
...Oe,
|
|
3124
3130
|
...e.messages
|
|
3125
3131
|
})), h = B(() => ({
|
|
3126
3132
|
showExport: !1,
|
|
@@ -3149,36 +3155,36 @@ function Ei(e, s) {
|
|
|
3149
3155
|
let C, $ = 0;
|
|
3150
3156
|
const f = B(
|
|
3151
3157
|
() => At(o.value)
|
|
3152
|
-
),
|
|
3158
|
+
), w = B(() => {
|
|
3153
3159
|
try {
|
|
3154
3160
|
return ye(o.value) !== i.value;
|
|
3155
3161
|
} catch {
|
|
3156
3162
|
return !0;
|
|
3157
3163
|
}
|
|
3158
|
-
}), S = z(n.value),
|
|
3164
|
+
}), S = z(n.value), k = B(() => n.value !== S.value), I = z({}), M = z(0), u = z(0), b = B(() => Object.values(I.value).some(Boolean)), R = B(() => Object.keys(I.value).filter((V) => I.value[V]));
|
|
3159
3165
|
function A(V, K) {
|
|
3160
|
-
|
|
3166
|
+
I.value = { ...I.value, [V]: K }, M.value++;
|
|
3161
3167
|
}
|
|
3162
|
-
const
|
|
3163
|
-
() =>
|
|
3164
|
-
),
|
|
3168
|
+
const E = ci(A), T = B(
|
|
3169
|
+
() => w.value || n.value !== S.value || b.value || !!X.fieldChange.value
|
|
3170
|
+
), x = () => JSON.stringify({
|
|
3165
3171
|
document: o.value,
|
|
3166
3172
|
json: n.value,
|
|
3167
3173
|
appliedJson: S.value
|
|
3168
|
-
}),
|
|
3174
|
+
}), P = Ii(x()), H = z(0);
|
|
3169
3175
|
let W;
|
|
3170
3176
|
function Y(V) {
|
|
3171
|
-
W = V,
|
|
3177
|
+
W = V, P.annotate(V.read());
|
|
3172
3178
|
}
|
|
3173
3179
|
function se() {
|
|
3174
|
-
|
|
3180
|
+
P.annotate(W?.read());
|
|
3175
3181
|
}
|
|
3176
|
-
const G = Ti(() => e.beforeDiscard), d = B(() =>
|
|
3182
|
+
const G = Ti(() => e.beforeDiscard), d = B(() => c.value || G.pending.value || Te.active.value || Le.checking.value || !!Le.available.value), q = () => !e.readonly && !d.value && !k.value, X = $i(
|
|
3177
3183
|
o,
|
|
3178
3184
|
() => f.value.ok,
|
|
3179
3185
|
q,
|
|
3180
3186
|
ie
|
|
3181
|
-
), { selected: _, lists: N, activeList: D, headerAlignments: L, setColumn:
|
|
3187
|
+
), { selected: _, lists: N, activeList: D, headerAlignments: L, setColumn: F } = X;
|
|
3182
3188
|
le(_, () => X.clearSelection());
|
|
3183
3189
|
const U = Ve();
|
|
3184
3190
|
le([() => o.value.template, () => e.datasets], () => {
|
|
@@ -3190,12 +3196,12 @@ function Ei(e, s) {
|
|
|
3190
3196
|
}, { deep: !0, immediate: !0 });
|
|
3191
3197
|
const Z = B(() => f.value.ok ? U.value : void 0);
|
|
3192
3198
|
function Q() {
|
|
3193
|
-
$++, C?.abort(), C = void 0,
|
|
3199
|
+
$++, C?.abort(), C = void 0, c.value = !1;
|
|
3194
3200
|
}
|
|
3195
3201
|
let ge = 0;
|
|
3196
3202
|
async function me(V = "replace", K) {
|
|
3197
|
-
if (!
|
|
3198
|
-
const ee =
|
|
3203
|
+
if (!T.value) return !0;
|
|
3204
|
+
const ee = x(), pe = M.value;
|
|
3199
3205
|
try {
|
|
3200
3206
|
return await G.request({
|
|
3201
3207
|
reason: V,
|
|
@@ -3204,13 +3210,13 @@ function Ei(e, s) {
|
|
|
3204
3210
|
),
|
|
3205
3211
|
replacement: K ? ae(K) : void 0,
|
|
3206
3212
|
pendingLocalChanges: !0
|
|
3207
|
-
}) && ee ===
|
|
3213
|
+
}) && ee === x() && pe === M.value;
|
|
3208
3214
|
} catch (Ee) {
|
|
3209
3215
|
return r.value = Ee instanceof Error ? Ee.message : String(Ee), !1;
|
|
3210
3216
|
}
|
|
3211
3217
|
}
|
|
3212
3218
|
function ve(V) {
|
|
3213
|
-
Q(), Te.clear(),
|
|
3219
|
+
Q(), Te.clear(), E.clear(), o.value = V, i.value = ye(V), n.value = i.value, S.value = n.value, r.value = "", _.value = 0, X.clearSelection(), X.cancelFieldChange(), I.value = {}, M.value++, u.value++, P.reset(x(), W?.read());
|
|
3214
3220
|
}
|
|
3215
3221
|
le(
|
|
3216
3222
|
() => e.modelValue,
|
|
@@ -3238,7 +3244,7 @@ function Ei(e, s) {
|
|
|
3238
3244
|
ge++, Q();
|
|
3239
3245
|
});
|
|
3240
3246
|
function ie() {
|
|
3241
|
-
G.cancel(), r.value = "", f.value.ok && (n.value = ye(o.value), S.value = n.value, s("update:modelValue", ae(o.value))),
|
|
3247
|
+
G.cancel(), r.value = "", f.value.ok && (n.value = ye(o.value), S.value = n.value, s("update:modelValue", ae(o.value))), P.record(x(), W?.read()) && H.value++;
|
|
3242
3248
|
}
|
|
3243
3249
|
function $e(V) {
|
|
3244
3250
|
if (!q()) return !1;
|
|
@@ -3289,12 +3295,12 @@ function Ei(e, s) {
|
|
|
3289
3295
|
}
|
|
3290
3296
|
function oe(V) {
|
|
3291
3297
|
if (d.value || e.readonly) return;
|
|
3292
|
-
|
|
3293
|
-
const K =
|
|
3298
|
+
P.record(x(), W?.read());
|
|
3299
|
+
const K = P.move(V);
|
|
3294
3300
|
if (!K) return;
|
|
3295
3301
|
G.cancel();
|
|
3296
3302
|
const ee = JSON.parse(K);
|
|
3297
|
-
o.value = ee.document, n.value = ee.json, S.value = ee.appliedJson, r.value = "", _.value = 0, X.clearSelection(),
|
|
3303
|
+
o.value = ee.document, n.value = ee.json, S.value = ee.appliedJson, r.value = "", _.value = 0, X.clearSelection(), P.context.value && W?.restore(P.context.value), f.value.ok && s("update:modelValue", ae(o.value));
|
|
3298
3304
|
}
|
|
3299
3305
|
async function vt() {
|
|
3300
3306
|
if (!e.save || !q() || !f.value.ok) return;
|
|
@@ -3303,7 +3309,7 @@ function Ei(e, s) {
|
|
|
3303
3309
|
return;
|
|
3304
3310
|
}
|
|
3305
3311
|
const V = ++$;
|
|
3306
|
-
C = new AbortController(),
|
|
3312
|
+
C = new AbortController(), c.value = !0, r.value = "";
|
|
3307
3313
|
const K = ae(o.value);
|
|
3308
3314
|
try {
|
|
3309
3315
|
const ee = ae(
|
|
@@ -3315,11 +3321,11 @@ function Ei(e, s) {
|
|
|
3315
3321
|
if (V !== $) return;
|
|
3316
3322
|
if (ee.id !== K.id)
|
|
3317
3323
|
throw new Error("保存服务返回了其他模板的文档");
|
|
3318
|
-
o.value = ee, i.value = ye(ee), n.value = i.value, S.value = n.value,
|
|
3324
|
+
o.value = ee, i.value = ye(ee), n.value = i.value, S.value = n.value, P.reset(x(), W?.read()), E.clear(), Le.flush(), s("saved", ae(ee)), s("update:modelValue", ae(ee));
|
|
3319
3325
|
} catch (ee) {
|
|
3320
3326
|
V === $ && (r.value = ee instanceof Error ? ee.message : String(ee), ee && typeof ee == "object" && "code" in ee && ee.code === "conflict" && Te.begin());
|
|
3321
3327
|
} finally {
|
|
3322
|
-
V === $ && (
|
|
3328
|
+
V === $ && (c.value = !1, C = void 0);
|
|
3323
3329
|
}
|
|
3324
3330
|
}
|
|
3325
3331
|
const Te = Ci({
|
|
@@ -3332,31 +3338,31 @@ function Ei(e, s) {
|
|
|
3332
3338
|
rebase(V) {
|
|
3333
3339
|
const K = ae(o.value);
|
|
3334
3340
|
V.revision === void 0 ? delete K.revision : K.revision = V.revision;
|
|
3335
|
-
const ee = ye(K), pe = ye(V), Ee =
|
|
3336
|
-
K.revision === void 0 ? delete o.value.revision : o.value.revision = K.revision, i.value = pe, Ee || (n.value = ee), S.value = ee,
|
|
3341
|
+
const ee = ye(K), pe = ye(V), Ee = k.value;
|
|
3342
|
+
K.revision === void 0 ? delete o.value.revision : o.value.revision = K.revision, i.value = pe, Ee || (n.value = ee), S.value = ee, P.reset(x(), W?.read()), s("update:modelValue", ae(o.value));
|
|
3337
3343
|
}
|
|
3338
3344
|
}), Le = Mi({
|
|
3339
3345
|
storage: () => e.draftStorage,
|
|
3340
3346
|
id: () => o.value.id,
|
|
3341
3347
|
baseline: () => i.value,
|
|
3342
|
-
pending: () =>
|
|
3343
|
-
changedSource: () => [o.value, i.value, n.value, S.value,
|
|
3344
|
-
snapshot: () => ({ version: 1, templateId: o.value.id, savedAt: (/* @__PURE__ */ new Date()).toISOString(), baseline: ae(i.value), document: JSON.parse(JSON.stringify(o.value)), json: n.value, appliedJson: S.value, tools:
|
|
3348
|
+
pending: () => T.value,
|
|
3349
|
+
changedSource: () => [o.value, i.value, n.value, S.value, E.records.value],
|
|
3350
|
+
snapshot: () => ({ version: 1, templateId: o.value.id, savedAt: (/* @__PURE__ */ new Date()).toISOString(), baseline: ae(i.value), document: JSON.parse(JSON.stringify(o.value)), json: n.value, appliedJson: S.value, tools: E.records.value }),
|
|
3345
3351
|
restore(V) {
|
|
3346
|
-
if (e.readonly ||
|
|
3352
|
+
if (e.readonly || c.value) return;
|
|
3347
3353
|
const K = ae(e.modelValue);
|
|
3348
|
-
o.value = ae(V.document), i.value = ye(V.baseline), n.value = V.json, S.value = V.appliedJson,
|
|
3354
|
+
o.value = ae(V.document), i.value = ye(V.baseline), n.value = V.json, S.value = V.appliedJson, u.value++, E.restore(V.tools);
|
|
3349
3355
|
const ee = Object.keys(V.tools).find((pe) => pe.startsWith("rules:"));
|
|
3350
3356
|
if (ee) {
|
|
3351
|
-
const [, pe, Ee] = ee.split(":"),
|
|
3352
|
-
|
|
3357
|
+
const [, pe, Ee] = ee.split(":"), Fe = N.value.findIndex((ze) => ze.pageIndex === Number(pe) && ze.componentIndex === Number(Ee));
|
|
3358
|
+
Fe >= 0 && (_.value = Fe);
|
|
3353
3359
|
}
|
|
3354
|
-
|
|
3360
|
+
P.reset(x(), W?.read()), ye(K) !== i.value && Te.begin(K), s("update:modelValue", ae(o.value));
|
|
3355
3361
|
}
|
|
3356
3362
|
}), Ze = B(
|
|
3357
|
-
() =>
|
|
3363
|
+
() => P.canUndo.value || x() !== P.current.value
|
|
3358
3364
|
), Qe = B(
|
|
3359
|
-
() =>
|
|
3365
|
+
() => P.canRedo.value && x() === P.current.value
|
|
3360
3366
|
);
|
|
3361
3367
|
return {
|
|
3362
3368
|
...X,
|
|
@@ -3373,13 +3379,13 @@ function Ei(e, s) {
|
|
|
3373
3379
|
canRedo: Qe,
|
|
3374
3380
|
undo: () => oe(-1),
|
|
3375
3381
|
redo: () => oe(1),
|
|
3376
|
-
pendingLocalChanges:
|
|
3382
|
+
pendingLocalChanges: T,
|
|
3377
3383
|
setToolPending: A,
|
|
3378
|
-
isToolPending: (V) =>
|
|
3379
|
-
toolEpoch:
|
|
3384
|
+
isToolPending: (V) => I.value[V] === !0,
|
|
3385
|
+
toolEpoch: u,
|
|
3380
3386
|
toolPending: b,
|
|
3381
|
-
pendingTools:
|
|
3382
|
-
jsonPending:
|
|
3387
|
+
pendingTools: R,
|
|
3388
|
+
jsonPending: k,
|
|
3383
3389
|
blocked: d,
|
|
3384
3390
|
confirmation: G.confirmation,
|
|
3385
3391
|
decideDiscard: G.decide,
|
|
@@ -3388,8 +3394,8 @@ function Ei(e, s) {
|
|
|
3388
3394
|
json: n,
|
|
3389
3395
|
selected: _,
|
|
3390
3396
|
error: r,
|
|
3391
|
-
saving:
|
|
3392
|
-
dirty:
|
|
3397
|
+
saving: c,
|
|
3398
|
+
dirty: w,
|
|
3393
3399
|
validation: f,
|
|
3394
3400
|
lists: N,
|
|
3395
3401
|
activeList: D,
|
|
@@ -3399,7 +3405,7 @@ function Ei(e, s) {
|
|
|
3399
3405
|
messages: g,
|
|
3400
3406
|
setName: ut,
|
|
3401
3407
|
setDescription: ct,
|
|
3402
|
-
setColumn:
|
|
3408
|
+
setColumn: F,
|
|
3403
3409
|
applyJson: Xe,
|
|
3404
3410
|
reset: mt,
|
|
3405
3411
|
save: vt
|
|
@@ -3415,7 +3421,7 @@ function Ri(e, s) {
|
|
|
3415
3421
|
}), le(s, (h) => {
|
|
3416
3422
|
h?.columns[n.value] || (n.value = i()), !h && o.value === "fields" && (o.value = "component");
|
|
3417
3423
|
});
|
|
3418
|
-
function
|
|
3424
|
+
function c(h) {
|
|
3419
3425
|
s.value?.columns[h] && (n.value = h);
|
|
3420
3426
|
}
|
|
3421
3427
|
function g(h) {
|
|
@@ -3425,13 +3431,13 @@ function Ri(e, s) {
|
|
|
3425
3431
|
Math.min(C - 1, n.value + h)
|
|
3426
3432
|
));
|
|
3427
3433
|
}
|
|
3428
|
-
return { section: o, activeIndex: n, activeColumn: r, activate:
|
|
3434
|
+
return { section: o, activeIndex: n, activeColumn: r, activate: c, stepColumn: g };
|
|
3429
3435
|
}
|
|
3430
3436
|
const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di = { class: "mr-designer-heading" }, _i = ["aria-label"], Ai = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], Hi = {
|
|
3431
3437
|
key: 0,
|
|
3432
3438
|
class: "mr-designer-pending-dot",
|
|
3433
3439
|
"aria-hidden": "true"
|
|
3434
|
-
}, Ni = ["aria-label"],
|
|
3440
|
+
}, Ni = ["aria-label"], Oi = ["aria-pressed"], Fi = ["aria-pressed"], Bi = { class: "mr-designer-actions" }, Gi = { class: "mr-designer-history" }, ji = ["aria-label", "title", "disabled"], zi = ["aria-label", "title", "disabled"], Vi = ["disabled"], Wi = ["title", "aria-describedby", "disabled"], Ji = ["id"], Ki = ["id"], Ui = ["aria-label", "onClick"], qi = ["aria-label"], Yi = ["id", "aria-labelledby"], Xi = ["aria-label"], Zi = ["id", "aria-pressed", "aria-describedby", "onClick"], Qi = {
|
|
3435
3441
|
key: 0,
|
|
3436
3442
|
class: "mr-designer-pending-dot",
|
|
3437
3443
|
"aria-hidden": "true"
|
|
@@ -3453,7 +3459,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3453
3459
|
}, fs = {
|
|
3454
3460
|
key: 0,
|
|
3455
3461
|
class: "mr-designer-area"
|
|
3456
|
-
}, hs = ["value"], bs = ["value"], ys = { class: "mr-designer-current" }, ws = ["aria-expanded", "aria-controls"], ks = { class: "mr-designer-current-name" }, xs = { class: "mr-designer-directory-entry" }, Ms = { class: "mr-designer-field-position" }, Cs = ["aria-label"], $s = ["aria-label", "title", "disabled"], Ss = ["aria-label", "title", "disabled"], Is = ["disabled", "aria-label"], Ts = { class: "mr-designer-property-group" }, Es = ["value"], Rs = ["value", "list"], Ps = ["id"], Ls = ["value"], Ds = { class: "mr-designer-property-group" }, _s = { class: "mr-designer-format-pair" }, As = { class: "mr-designer-stacked" }, Hs = ["value", "disabled"], Ns = { class: "mr-designer-stacked" },
|
|
3462
|
+
}, hs = ["value"], bs = ["value"], ys = { class: "mr-designer-current" }, ws = ["aria-expanded", "aria-controls"], ks = { class: "mr-designer-current-name" }, xs = { class: "mr-designer-directory-entry" }, Ms = { class: "mr-designer-field-position" }, Cs = ["aria-label"], $s = ["aria-label", "title", "disabled"], Ss = ["aria-label", "title", "disabled"], Is = ["disabled", "aria-label"], Ts = { class: "mr-designer-property-group" }, Es = ["value"], Rs = ["value", "list"], Ps = ["id"], Ls = ["value"], Ds = { class: "mr-designer-property-group" }, _s = { class: "mr-designer-format-pair" }, As = { class: "mr-designer-stacked" }, Hs = ["value", "disabled"], Ns = { class: "mr-designer-stacked" }, Os = ["value"], Fs = { value: "identifier" }, Bs = { value: "dimension" }, Gs = { value: "measure" }, js = { value: "date" }, zs = { value: "text" }, Vs = { class: "mr-designer-control-row" }, Ws = { class: "mr-designer-control-row" }, Js = { class: "mr-designer-toggle" }, Ks = ["checked"], Us = { class: "mr-designer-column-structure" }, qs = ["aria-label", "title", "disabled"], Ys = ["aria-label", "title", "disabled"], Xs = ["checked", "disabled"], Zs = ["id", "aria-label"], Qs = { class: "mr-designer-directory-heading" }, er = ["aria-label"], tr = { class: "mr-designer-search" }, nr = ["aria-label", "placeholder"], ar = ["aria-label", "title"], or = { class: "mr-designer-column-tools" }, lr = ["disabled"], ir = {
|
|
3457
3463
|
key: 1,
|
|
3458
3464
|
role: "status"
|
|
3459
3465
|
}, sr = { key: 2 }, rr = ["aria-label"], dr = ["aria-label", "checked", "disabled", "onChange"], ur = ["data-column-index", "aria-pressed", "tabindex", "onClick"], cr = { class: "mr-designer-column-number" }, mr = { class: "mr-designer-column-name" }, vr = {
|
|
@@ -3467,7 +3473,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3467
3473
|
key: 2,
|
|
3468
3474
|
role: "status",
|
|
3469
3475
|
class: "mr-designer-empty"
|
|
3470
|
-
}, Lr = { class: "mr-designer-object-tools" }, Dr = ["aria-label", "disabled"], _r = { value: "" }, Ar = { value: "text" }, Hr = ["disabled"], Nr = { value: "image" },
|
|
3476
|
+
}, Lr = { class: "mr-designer-object-tools" }, Dr = ["aria-label", "disabled"], _r = { value: "" }, Ar = { value: "text" }, Hr = ["disabled"], Nr = { value: "image" }, Or = { value: "rect" }, Fr = { value: "qrcode" }, Br = { value: "barcode" }, Gr = ["title", "aria-label", "disabled"], jr = ["title", "aria-label", "disabled"], zr = { key: 0 }, Vr = ["value"], Wr = { class: "mr-designer-stacked" }, Jr = ["value"], Kr = {
|
|
3471
3477
|
value: -1,
|
|
3472
3478
|
disabled: ""
|
|
3473
3479
|
}, Ur = ["value"], qr = {
|
|
@@ -3517,25 +3523,25 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3517
3523
|
emits: ["update:modelValue", "saved", "excel-bound"],
|
|
3518
3524
|
setup(e, { expose: s, emit: o }) {
|
|
3519
3525
|
const i = be(
|
|
3520
|
-
() => import("./ExcelBindingWizard-
|
|
3521
|
-
), n = be(() => import("./ParamEditor-
|
|
3522
|
-
() => import("./TemplateReviewPanel-
|
|
3523
|
-
), C = e, $ = o, f = Ei(C, (ce,
|
|
3524
|
-
$(ce === "saved" ? "saved" : "update:modelValue",
|
|
3526
|
+
() => import("./ExcelBindingWizard-Co1svTsw.js")
|
|
3527
|
+
), n = be(() => import("./ParamEditor-DNNARyeB.js")), r = be(() => import("./RuleEditor-DkRjOLlr.js")), c = be(() => import("./TemplateOutlinePanel-BouxsuqQ.js")), g = be(() => import("./TemplateReusePanel-BEACLPaN.js")), h = be(
|
|
3528
|
+
() => import("./TemplateReviewPanel-B1OGRY2i.js")
|
|
3529
|
+
), C = e, $ = o, f = Ei(C, (ce, y) => {
|
|
3530
|
+
$(ce === "saved" ? "saved" : "update:modelValue", y);
|
|
3525
3531
|
}), {
|
|
3526
|
-
draft:
|
|
3532
|
+
draft: w,
|
|
3527
3533
|
json: S,
|
|
3528
|
-
selected:
|
|
3529
|
-
error:
|
|
3530
|
-
saving:
|
|
3531
|
-
pendingLocalChanges:
|
|
3534
|
+
selected: k,
|
|
3535
|
+
error: I,
|
|
3536
|
+
saving: M,
|
|
3537
|
+
pendingLocalChanges: u,
|
|
3532
3538
|
jsonPending: b,
|
|
3533
|
-
blocked:
|
|
3539
|
+
blocked: R,
|
|
3534
3540
|
confirmation: A,
|
|
3535
|
-
canUndo:
|
|
3536
|
-
canRedo:
|
|
3537
|
-
validation:
|
|
3538
|
-
lists:
|
|
3541
|
+
canUndo: E,
|
|
3542
|
+
canRedo: T,
|
|
3543
|
+
validation: x,
|
|
3544
|
+
lists: P,
|
|
3539
3545
|
activeList: H,
|
|
3540
3546
|
visibleColumns: W,
|
|
3541
3547
|
query: Y,
|
|
@@ -3544,11 +3550,11 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3544
3550
|
messages: d
|
|
3545
3551
|
} = f;
|
|
3546
3552
|
function q(ce) {
|
|
3547
|
-
return f.transaction((
|
|
3548
|
-
|
|
3553
|
+
return f.transaction((y) => {
|
|
3554
|
+
y.template.params = ce;
|
|
3549
3555
|
});
|
|
3550
3556
|
}
|
|
3551
|
-
const X = Ri(
|
|
3557
|
+
const X = Ri(k, H), { section: _, activeIndex: N, activeColumn: D } = X, L = `mr-designer-${$t()?.uid ?? 0}`, F = ri(
|
|
3552
3558
|
f,
|
|
3553
3559
|
X,
|
|
3554
3560
|
() => C.dataSchemas
|
|
@@ -3567,7 +3573,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3567
3573
|
moveColumn: Xe,
|
|
3568
3574
|
headerCommand: mt,
|
|
3569
3575
|
canvas: oe
|
|
3570
|
-
} =
|
|
3576
|
+
} = F, {
|
|
3571
3577
|
sections: vt,
|
|
3572
3578
|
toolPreview: Te,
|
|
3573
3579
|
setMode: Le,
|
|
@@ -3578,24 +3584,24 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3578
3584
|
saveReason: ee,
|
|
3579
3585
|
openPending: pe,
|
|
3580
3586
|
headingStatus: Ee,
|
|
3581
|
-
chooseCanvas:
|
|
3587
|
+
chooseCanvas: Fe,
|
|
3582
3588
|
locateReview: ze,
|
|
3583
3589
|
chooseRuleList: et,
|
|
3584
3590
|
navigateSection: St
|
|
3585
|
-
} = li(f,
|
|
3586
|
-
const ce = { text: d.value.insertText, list: d.value.insertList, image: d.value.insertImage, rect: d.value.insertRect, qrcode: d.value.insertQrcode, barcode: d.value.insertBarcode, chart: d.value.chartComponent, line: d.value.lineComponent, ellipse: d.value.ellipseComponent },
|
|
3587
|
-
return
|
|
3588
|
-
const _e = ce[
|
|
3591
|
+
} = li(f, F, X, { id: L, readonly: () => C.readonly === !0 }), ke = B(() => !!w.value.template.pages[Q.value]?.flow), It = B(() => C.dataSchemas?.[w.value.template.repeat?.dataset ?? ""]), Tt = B(() => {
|
|
3592
|
+
const ce = { text: d.value.insertText, list: d.value.insertList, image: d.value.insertImage, rect: d.value.insertRect, qrcode: d.value.insertQrcode, barcode: d.value.insertBarcode, chart: d.value.chartComponent, line: d.value.lineComponent, ellipse: d.value.ellipseComponent }, y = new Map(It.value?.fields.map((m) => [m.field, m.label || m.field]));
|
|
3593
|
+
return w.value.template.pages[Q.value]?.components.map((m, te) => {
|
|
3594
|
+
const _e = ce[m.kind], ft = (m.kind === "list" ? m.title || m.dataset : m.binding ? y.get(m.binding.field) || m.binding.field : m.text)?.replace(/\s+/g, " ").trim().slice(0, 60);
|
|
3589
3595
|
return { index: te, name: ft && ft !== _e ? `${_e} · ${ft}` : _e };
|
|
3590
3596
|
}) ?? [];
|
|
3591
3597
|
});
|
|
3592
3598
|
function qt(ce) {
|
|
3593
|
-
let
|
|
3594
|
-
f.transaction((
|
|
3595
|
-
|
|
3596
|
-
}) && (ce.type !== "patch" && (oe.clearLocks(), oe.selection.value = void 0, oe.selections.value = []), Q.value =
|
|
3599
|
+
let y = Q.value;
|
|
3600
|
+
f.transaction((m) => {
|
|
3601
|
+
y = Cn(m, Q.value, ce);
|
|
3602
|
+
}) && (ce.type !== "patch" && (oe.clearLocks(), oe.selection.value = void 0, oe.selections.value = []), Q.value = y);
|
|
3597
3603
|
}
|
|
3598
|
-
const We = B(() => !!
|
|
3604
|
+
const We = B(() => !!w.value.template.pages[P.value[k.value]?.pageIndex ?? -1]?.flow), Et = z(null), gt = z(null), re = ui(X, _, W), {
|
|
3599
3605
|
open: Rt,
|
|
3600
3606
|
cursor: Yt,
|
|
3601
3607
|
trigger: Xt,
|
|
@@ -3618,23 +3624,24 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3618
3624
|
ce ? (tt = document.activeElement, await he(), Et.value?.focus()) : (await he(), tt?.isConnected && tt.focus(), tt = null);
|
|
3619
3625
|
}), s({
|
|
3620
3626
|
get pendingLocalChanges() {
|
|
3621
|
-
return
|
|
3627
|
+
return u.value;
|
|
3622
3628
|
},
|
|
3623
3629
|
get saving() {
|
|
3624
|
-
return
|
|
3630
|
+
return M.value;
|
|
3625
3631
|
},
|
|
3626
3632
|
get blocked() {
|
|
3627
|
-
return
|
|
3633
|
+
return R.value;
|
|
3628
3634
|
},
|
|
3629
3635
|
guardChanges: f.guardChanges,
|
|
3630
3636
|
reset: f.reset,
|
|
3631
|
-
save: f.save
|
|
3637
|
+
save: f.save,
|
|
3638
|
+
insertComponent: oe.insertComponent
|
|
3632
3639
|
});
|
|
3633
3640
|
async function tn(ce) {
|
|
3634
|
-
const
|
|
3635
|
-
if (
|
|
3636
|
-
const
|
|
3637
|
-
return $("excel-bound", { ...ce, document:
|
|
3641
|
+
const y = { ...ce.document, id: w.value.id };
|
|
3642
|
+
if (w.value.revision === void 0 ? delete y.revision : y.revision = w.value.revision, !await f.replaceDocument(y)) return !1;
|
|
3643
|
+
const m = ae(f.draft.value);
|
|
3644
|
+
return $("excel-bound", { ...ce, document: m, session: { ...ce.session, identity: { id: m.id, name: m.name } } }), !0;
|
|
3638
3645
|
}
|
|
3639
3646
|
function De(ce) {
|
|
3640
3647
|
return ce.target.value;
|
|
@@ -3642,17 +3649,17 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3642
3649
|
function pt(ce) {
|
|
3643
3650
|
return ce.target.checked;
|
|
3644
3651
|
}
|
|
3645
|
-
function Lt(ce,
|
|
3646
|
-
const
|
|
3652
|
+
function Lt(ce, y) {
|
|
3653
|
+
const m = ce.target;
|
|
3647
3654
|
f.alignColumns(
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
),
|
|
3655
|
+
y,
|
|
3656
|
+
m.value
|
|
3657
|
+
), m.value = "";
|
|
3651
3658
|
}
|
|
3652
|
-
return (ce,
|
|
3659
|
+
return (ce, y) => (v(), p("section", {
|
|
3653
3660
|
class: "mr-designer",
|
|
3654
3661
|
"aria-label": t(d).title,
|
|
3655
|
-
"aria-busy": t(
|
|
3662
|
+
"aria-busy": t(M)
|
|
3656
3663
|
}, [
|
|
3657
3664
|
a("header", Li, [
|
|
3658
3665
|
a("div", Di, [
|
|
@@ -3662,7 +3669,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3662
3669
|
}),
|
|
3663
3670
|
a("strong", null, l(t(d).heading), 1),
|
|
3664
3671
|
a("span", {
|
|
3665
|
-
class: Ge({ "mr-designer-dirty": t(
|
|
3672
|
+
class: Ge({ "mr-designer-dirty": t(u) })
|
|
3666
3673
|
}, l(t(Ee)), 3)
|
|
3667
3674
|
]),
|
|
3668
3675
|
a("nav", {
|
|
@@ -3670,20 +3677,20 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3670
3677
|
role: "tablist",
|
|
3671
3678
|
"aria-label": t(d).sectionsLabel
|
|
3672
3679
|
}, [
|
|
3673
|
-
(
|
|
3674
|
-
id: `${L}-tab-${
|
|
3675
|
-
key:
|
|
3680
|
+
(v(!0), p(J, null, ne(t(vt), (m) => (v(), p("button", {
|
|
3681
|
+
id: `${L}-tab-${m}`,
|
|
3682
|
+
key: m,
|
|
3676
3683
|
type: "button",
|
|
3677
3684
|
role: "tab",
|
|
3678
|
-
"aria-selected": t(_) ===
|
|
3679
|
-
"aria-controls": `${L}-panel-${
|
|
3680
|
-
tabindex: t(_) ===
|
|
3681
|
-
onClick: (te) => _.value =
|
|
3682
|
-
onKeydown:
|
|
3685
|
+
"aria-selected": t(_) === m,
|
|
3686
|
+
"aria-controls": `${L}-panel-${m}`,
|
|
3687
|
+
tabindex: t(_) === m ? 0 : -1,
|
|
3688
|
+
onClick: (te) => _.value = m,
|
|
3689
|
+
onKeydown: y[0] || (y[0] = //@ts-ignore
|
|
3683
3690
|
(...te) => t(St) && t(St)(...te))
|
|
3684
3691
|
}, [
|
|
3685
|
-
j(l(t(d)[`${
|
|
3686
|
-
|
|
3692
|
+
j(l(t(d)[`${m}Section`]) + " ", 1),
|
|
3693
|
+
m === "tools" && t(f).toolPending.value || m === "advanced" && t(b) ? (v(), p("span", Hi)) : O("", !0)
|
|
3687
3694
|
], 40, Ai))), 128))
|
|
3688
3695
|
], 8, _i),
|
|
3689
3696
|
a("div", {
|
|
@@ -3694,13 +3701,13 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3694
3701
|
a("button", {
|
|
3695
3702
|
type: "button",
|
|
3696
3703
|
"aria-pressed": t(U) === "design",
|
|
3697
|
-
onClick:
|
|
3698
|
-
}, l(t(d).design), 9,
|
|
3704
|
+
onClick: y[1] || (y[1] = (m) => t(Le)("design"))
|
|
3705
|
+
}, l(t(d).design), 9, Oi),
|
|
3699
3706
|
a("button", {
|
|
3700
3707
|
type: "button",
|
|
3701
3708
|
"aria-pressed": t(U) === "preview",
|
|
3702
|
-
onClick:
|
|
3703
|
-
}, l(t(d).preview), 9,
|
|
3709
|
+
onClick: y[2] || (y[2] = (m) => t(Le)("preview"))
|
|
3710
|
+
}, l(t(d).preview), 9, Fi)
|
|
3704
3711
|
], 8, Ni),
|
|
3705
3712
|
a("div", Bi, [
|
|
3706
3713
|
a("div", Gi, [
|
|
@@ -3709,11 +3716,11 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3709
3716
|
class: "mr-designer-icon-button",
|
|
3710
3717
|
"aria-label": t(d).undo,
|
|
3711
3718
|
title: t(d).undo,
|
|
3712
|
-
disabled: e.readonly || t(
|
|
3713
|
-
onClick:
|
|
3719
|
+
disabled: e.readonly || t(R) || !t(E),
|
|
3720
|
+
onClick: y[3] || (y[3] = (m) => {
|
|
3714
3721
|
t(oe).clearLocks(), t(f).undo();
|
|
3715
3722
|
})
|
|
3716
|
-
}, [...
|
|
3723
|
+
}, [...y[65] || (y[65] = [
|
|
3717
3724
|
a("svg", {
|
|
3718
3725
|
viewBox: "0 0 24 24",
|
|
3719
3726
|
fill: "none",
|
|
@@ -3727,11 +3734,11 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3727
3734
|
class: "mr-designer-icon-button",
|
|
3728
3735
|
"aria-label": t(d).redo,
|
|
3729
3736
|
title: t(d).redo,
|
|
3730
|
-
disabled: e.readonly || t(
|
|
3731
|
-
onClick:
|
|
3737
|
+
disabled: e.readonly || t(R) || !t(T),
|
|
3738
|
+
onClick: y[4] || (y[4] = (m) => {
|
|
3732
3739
|
t(oe).clearLocks(), t(f).redo();
|
|
3733
3740
|
})
|
|
3734
|
-
}, [...
|
|
3741
|
+
}, [...y[66] || (y[66] = [
|
|
3735
3742
|
a("svg", {
|
|
3736
3743
|
viewBox: "0 0 24 24",
|
|
3737
3744
|
fill: "none",
|
|
@@ -3744,31 +3751,31 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3744
3751
|
a("button", {
|
|
3745
3752
|
type: "button",
|
|
3746
3753
|
class: "mr-designer-reset",
|
|
3747
|
-
disabled: e.readonly || t(
|
|
3748
|
-
onClick:
|
|
3749
|
-
(...
|
|
3754
|
+
disabled: e.readonly || t(R) || !t(u),
|
|
3755
|
+
onClick: y[5] || (y[5] = //@ts-ignore
|
|
3756
|
+
(...m) => t(f).reset && t(f).reset(...m))
|
|
3750
3757
|
}, l(t(d).reset), 9, Vi),
|
|
3751
|
-
e.save ? (
|
|
3758
|
+
e.save ? (v(), p("button", {
|
|
3752
3759
|
key: 0,
|
|
3753
3760
|
type: "button",
|
|
3754
3761
|
class: "mr-designer-save",
|
|
3755
3762
|
title: t(ee) || t(d).save,
|
|
3756
3763
|
"aria-describedby": t(K).length ? `${L}-pending` : t(ee) ? `${L}-save-reason` : void 0,
|
|
3757
|
-
disabled: e.readonly || t(
|
|
3758
|
-
onClick:
|
|
3759
|
-
(...
|
|
3764
|
+
disabled: e.readonly || t(R) || t(b) || t(f).toolPending.value || !!t(f).fieldChange.value || !t(x).ok || !t(u),
|
|
3765
|
+
onClick: y[6] || (y[6] = //@ts-ignore
|
|
3766
|
+
(...m) => t(f).save && t(f).save(...m))
|
|
3760
3767
|
}, [
|
|
3761
3768
|
de(fe, {
|
|
3762
3769
|
name: "file",
|
|
3763
3770
|
size: 13
|
|
3764
3771
|
}),
|
|
3765
|
-
j(l(t(
|
|
3766
|
-
], 8, Wi)) :
|
|
3767
|
-
e.save && t(ee) && !t(K).length ? (
|
|
3772
|
+
j(l(t(M) ? t(d).saving : t(d).save), 1)
|
|
3773
|
+
], 8, Wi)) : O("", !0),
|
|
3774
|
+
e.save && t(ee) && !t(K).length ? (v(), p("span", {
|
|
3768
3775
|
key: 1,
|
|
3769
3776
|
id: `${L}-save-reason`,
|
|
3770
3777
|
class: "mr-designer-save-reason"
|
|
3771
|
-
}, l(t(ee)), 9, Ji)) :
|
|
3778
|
+
}, l(t(ee)), 9, Ji)) : O("", !0)
|
|
3772
3779
|
])
|
|
3773
3780
|
]),
|
|
3774
3781
|
de(Yl, {
|
|
@@ -3787,30 +3794,30 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3787
3794
|
onCancel: t(f).cancelFieldChange,
|
|
3788
3795
|
onLocate: t(ze)
|
|
3789
3796
|
}, null, 8, ["messages", "change", "disabled", "onConfirm", "onCancel", "onLocate"]),
|
|
3790
|
-
t(K).length ? (
|
|
3797
|
+
t(K).length ? (v(), p("div", {
|
|
3791
3798
|
key: 0,
|
|
3792
3799
|
id: `${L}-pending`,
|
|
3793
3800
|
class: "mr-designer-pending",
|
|
3794
3801
|
role: "status"
|
|
3795
3802
|
}, [
|
|
3796
3803
|
a("span", null, l(t(d).pendingToolsLabel), 1),
|
|
3797
|
-
(
|
|
3798
|
-
key:
|
|
3804
|
+
(v(!0), p(J, null, ne(t(K), (m) => (v(), p("button", {
|
|
3805
|
+
key: m.target,
|
|
3799
3806
|
type: "button",
|
|
3800
|
-
"aria-label": `${
|
|
3801
|
-
onClick: (te) => t(pe)(
|
|
3807
|
+
"aria-label": `${m.label} · ${t(d).unapplied} · ${t(d).returnToConfiguration}`,
|
|
3808
|
+
onClick: (te) => t(pe)(m.target)
|
|
3802
3809
|
}, [
|
|
3803
|
-
j(l(
|
|
3810
|
+
j(l(m.label), 1),
|
|
3804
3811
|
a("span", null, l(t(d).unapplied) + " ↗", 1)
|
|
3805
3812
|
], 8, Ui))), 128)),
|
|
3806
3813
|
a("small", null, l(t(d).pendingToolsHint), 1)
|
|
3807
|
-
], 8, Ki)) :
|
|
3808
|
-
t(A) ? (
|
|
3814
|
+
], 8, Ki)) : O("", !0),
|
|
3815
|
+
t(A) ? (v(), p("div", {
|
|
3809
3816
|
key: 1,
|
|
3810
3817
|
role: "alertdialog",
|
|
3811
3818
|
"aria-label": t(d).discardTitle,
|
|
3812
3819
|
class: "mr-designer-confirm",
|
|
3813
|
-
onKeydown:
|
|
3820
|
+
onKeydown: y[9] || (y[9] = ht(Wt((m) => t(f).decideDiscard(!1), ["prevent", "stop"]), ["esc"]))
|
|
3814
3821
|
}, [
|
|
3815
3822
|
a("div", null, [
|
|
3816
3823
|
a("strong", null, l(t(d).discardTitle), 1),
|
|
@@ -3821,18 +3828,18 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3821
3828
|
ref_key: "keepButton",
|
|
3822
3829
|
ref: Et,
|
|
3823
3830
|
type: "button",
|
|
3824
|
-
onClick:
|
|
3831
|
+
onClick: y[7] || (y[7] = (m) => t(f).decideDiscard(!1))
|
|
3825
3832
|
}, l(t(d).keepEditing), 513),
|
|
3826
3833
|
a("button", {
|
|
3827
3834
|
type: "button",
|
|
3828
|
-
onClick:
|
|
3835
|
+
onClick: y[8] || (y[8] = (m) => t(f).decideDiscard(!0))
|
|
3829
3836
|
}, l(t(d).discard), 1)
|
|
3830
3837
|
])
|
|
3831
|
-
], 40, qi)) :
|
|
3838
|
+
], 40, qi)) : O("", !0),
|
|
3832
3839
|
a("div", {
|
|
3833
3840
|
class: Ge(["mr-designer-body", { "is-tools": t(_) === "tools", "is-docked": t(Te) }])
|
|
3834
3841
|
}, [
|
|
3835
|
-
t(ve).size ? we((
|
|
3842
|
+
t(ve).size ? we((v(), p("div", {
|
|
3836
3843
|
key: t(f).toolEpoch.value,
|
|
3837
3844
|
class: "mr-designer-tools",
|
|
3838
3845
|
id: `${L}-panel-tools`,
|
|
@@ -3843,16 +3850,16 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3843
3850
|
class: "mr-designer-tool-tabs",
|
|
3844
3851
|
"aria-label": t(d).toolsSection
|
|
3845
3852
|
}, [
|
|
3846
|
-
(
|
|
3847
|
-
key:
|
|
3848
|
-
id: `${L}-tool-${
|
|
3853
|
+
(v(), p(J, null, ne(["outline", "reuse", "excel", "rules", "params", "review"], (m) => a("button", {
|
|
3854
|
+
key: m,
|
|
3855
|
+
id: `${L}-tool-${m}`,
|
|
3849
3856
|
type: "button",
|
|
3850
|
-
"aria-pressed": t(me) ===
|
|
3851
|
-
"aria-describedby": t(f).isToolPending(
|
|
3852
|
-
onClick: (te) => me.value =
|
|
3857
|
+
"aria-pressed": t(me) === m,
|
|
3858
|
+
"aria-describedby": t(f).isToolPending(m) ? `${L}-pending` : void 0,
|
|
3859
|
+
onClick: (te) => me.value = m
|
|
3853
3860
|
}, [
|
|
3854
|
-
j(l(t(d)[`${
|
|
3855
|
-
t(f).isToolPending(
|
|
3861
|
+
j(l(t(d)[`${m}Tool`]) + " ", 1),
|
|
3862
|
+
t(f).isToolPending(m) ? (v(), p("span", Qi)) : O("", !0)
|
|
3856
3863
|
], 8, Zi)), 64))
|
|
3857
3864
|
], 8, Xi),
|
|
3858
3865
|
a("div", es, [
|
|
@@ -3861,31 +3868,31 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3861
3868
|
a("select", {
|
|
3862
3869
|
value: t(Q),
|
|
3863
3870
|
"aria-label": t(d).pageDirectory,
|
|
3864
|
-
onChange:
|
|
3871
|
+
onChange: y[10] || (y[10] = (m) => Q.value = Number(m.target.value))
|
|
3865
3872
|
}, [
|
|
3866
|
-
(
|
|
3873
|
+
(v(!0), p(J, null, ne(t(w).template.pages, (m, te) => (v(), p("option", {
|
|
3867
3874
|
key: te,
|
|
3868
3875
|
value: te
|
|
3869
|
-
}, l(t(Ue)(
|
|
3876
|
+
}, l(t(Ue)(m, te, t(d).page)), 9, ns))), 128))
|
|
3870
3877
|
], 40, ts)
|
|
3871
3878
|
]),
|
|
3872
3879
|
a("select", {
|
|
3873
3880
|
value: t(Z)?.pageIndex === t(Q) ? t(Z).componentIndex : -1,
|
|
3874
3881
|
"aria-label": t(d).toolChooseComponent,
|
|
3875
|
-
onChange:
|
|
3876
|
-
(...
|
|
3882
|
+
onChange: y[11] || (y[11] = //@ts-ignore
|
|
3883
|
+
(...m) => t(Qe) && t(Qe)(...m))
|
|
3877
3884
|
}, [
|
|
3878
3885
|
a("option", os, l(t(d).toolChooseComponent), 1),
|
|
3879
|
-
(
|
|
3880
|
-
key:
|
|
3881
|
-
value:
|
|
3882
|
-
}, l(
|
|
3886
|
+
(v(!0), p(J, null, ne(Tt.value, (m) => (v(), p("option", {
|
|
3887
|
+
key: m.index,
|
|
3888
|
+
value: m.index
|
|
3889
|
+
}, l(m.name), 9, ls))), 128))
|
|
3883
3890
|
], 40, as),
|
|
3884
3891
|
a("button", {
|
|
3885
3892
|
type: "button",
|
|
3886
3893
|
"aria-pressed": t(Te),
|
|
3887
|
-
onClick:
|
|
3888
|
-
(...
|
|
3894
|
+
onClick: y[12] || (y[12] = //@ts-ignore
|
|
3895
|
+
(...m) => t(Ze) && t(Ze)(...m))
|
|
3889
3896
|
}, [
|
|
3890
3897
|
de(fe, {
|
|
3891
3898
|
name: "columns",
|
|
@@ -3895,53 +3902,53 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3895
3902
|
], 8, is)
|
|
3896
3903
|
]),
|
|
3897
3904
|
a("div", ss, [
|
|
3898
|
-
t(ve).has("outline") ? we((
|
|
3905
|
+
t(ve).has("outline") ? we((v(), xe(t(c), {
|
|
3899
3906
|
key: 0,
|
|
3900
3907
|
messages: e.productMessages,
|
|
3901
|
-
document: t(
|
|
3908
|
+
document: t(w),
|
|
3902
3909
|
selection: t(Z),
|
|
3903
3910
|
onLocate: t(ze)
|
|
3904
3911
|
}, null, 8, ["messages", "document", "selection", "onLocate"])), [
|
|
3905
3912
|
[Be, t(me) === "outline"]
|
|
3906
|
-
]) :
|
|
3907
|
-
t(ve).has("reuse") ? we((
|
|
3913
|
+
]) : O("", !0),
|
|
3914
|
+
t(ve).has("reuse") ? we((v(), xe(t(g), {
|
|
3908
3915
|
key: 1,
|
|
3909
3916
|
messages: e.productMessages,
|
|
3910
|
-
document: t(
|
|
3917
|
+
document: t(w),
|
|
3911
3918
|
"page-index": t(Q),
|
|
3912
3919
|
selection: t(Z),
|
|
3913
3920
|
fragments: e.fragments,
|
|
3914
3921
|
styles: e.documentStyles,
|
|
3915
3922
|
disabled: t(ie),
|
|
3916
3923
|
accept: t(f).transaction,
|
|
3917
|
-
onSelect: t(
|
|
3924
|
+
onSelect: t(Fe)
|
|
3918
3925
|
}, null, 8, ["messages", "document", "page-index", "selection", "fragments", "styles", "disabled", "accept", "onSelect"])), [
|
|
3919
3926
|
[Be, t(me) === "reuse"]
|
|
3920
|
-
]) :
|
|
3921
|
-
t(ve).has("params") ? we((
|
|
3927
|
+
]) : O("", !0),
|
|
3928
|
+
t(ve).has("params") ? we((v(), xe(t(n), {
|
|
3922
3929
|
key: 2,
|
|
3923
|
-
document: t(
|
|
3930
|
+
document: t(w),
|
|
3924
3931
|
readonly: t(ie),
|
|
3925
3932
|
accept: q,
|
|
3926
|
-
onDirty:
|
|
3933
|
+
onDirty: y[13] || (y[13] = (m) => t(f).setToolPending("params", m))
|
|
3927
3934
|
}, null, 8, ["document", "readonly"])), [
|
|
3928
3935
|
[Be, t(me) === "params"]
|
|
3929
|
-
]) :
|
|
3930
|
-
t(ve).has("excel") ? we((
|
|
3936
|
+
]) : O("", !0),
|
|
3937
|
+
t(ve).has("excel") ? we((v(), xe(t(i), {
|
|
3931
3938
|
key: 3,
|
|
3932
3939
|
datasets: e.bindingDatasets ?? [],
|
|
3933
3940
|
session: e.bindingSession,
|
|
3934
|
-
identity: { id: t(
|
|
3941
|
+
identity: { id: t(w).id, name: t(w).name },
|
|
3935
3942
|
"lock-id": "",
|
|
3936
3943
|
readonly: t(ie),
|
|
3937
3944
|
accept: tn,
|
|
3938
|
-
onDirty:
|
|
3945
|
+
onDirty: y[14] || (y[14] = (m) => t(f).setToolPending("excel", m))
|
|
3939
3946
|
}, null, 8, ["datasets", "session", "identity", "readonly"])), [
|
|
3940
3947
|
[Be, t(me) === "excel"]
|
|
3941
|
-
]) :
|
|
3942
|
-
t(ve).has("review") ? we((
|
|
3948
|
+
]) : O("", !0),
|
|
3949
|
+
t(ve).has("review") ? we((v(), xe(t(h), {
|
|
3943
3950
|
key: 4,
|
|
3944
|
-
document: t(
|
|
3951
|
+
document: t(w),
|
|
3945
3952
|
previous: t(f).originalDocument.value,
|
|
3946
3953
|
fixtures: e.reviewFixtures,
|
|
3947
3954
|
messages: e.reviewMessages,
|
|
@@ -3950,40 +3957,40 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3950
3957
|
onLocate: t(ze)
|
|
3951
3958
|
}, null, 8, ["document", "previous", "fixtures", "messages", "datasets", "data-schemas", "onLocate"])), [
|
|
3952
3959
|
[Be, t(me) === "review"]
|
|
3953
|
-
]) :
|
|
3954
|
-
t(ve).has("rules") ? we((
|
|
3955
|
-
t(
|
|
3960
|
+
]) : O("", !0),
|
|
3961
|
+
t(ve).has("rules") ? we((v(), p("div", rs, [
|
|
3962
|
+
t(P).length > 1 ? (v(), p("label", ds, [
|
|
3956
3963
|
j(l(t(d).area), 1),
|
|
3957
3964
|
a("select", {
|
|
3958
|
-
value: t(
|
|
3959
|
-
onChange:
|
|
3960
|
-
(...
|
|
3965
|
+
value: t(k),
|
|
3966
|
+
onChange: y[15] || (y[15] = //@ts-ignore
|
|
3967
|
+
(...m) => t(et) && t(et)(...m))
|
|
3961
3968
|
}, [
|
|
3962
|
-
(
|
|
3969
|
+
(v(!0), p(J, null, ne(t(P), (m, te) => (v(), p("option", {
|
|
3963
3970
|
key: te,
|
|
3964
3971
|
value: te
|
|
3965
|
-
}, l(
|
|
3972
|
+
}, l(m.component.title || m.component.dataset), 9, cs))), 128))
|
|
3966
3973
|
], 40, us)
|
|
3967
|
-
])) :
|
|
3968
|
-
t(H) ? (
|
|
3974
|
+
])) : O("", !0),
|
|
3975
|
+
t(H) ? (v(), xe(t(r), {
|
|
3969
3976
|
key: 1,
|
|
3970
3977
|
list: t(H),
|
|
3971
|
-
"recovery-key": `rules:${t(
|
|
3978
|
+
"recovery-key": `rules:${t(P)[t(k)]?.pageIndex ?? 0}:${t(P)[t(k)]?.componentIndex ?? 0}`,
|
|
3972
3979
|
datasets: e.datasets,
|
|
3973
3980
|
"dataset-schema": t($e),
|
|
3974
3981
|
"dataset-schemas": e.dataSchemas,
|
|
3975
3982
|
readonly: t(ie),
|
|
3976
3983
|
onChange: t(ct),
|
|
3977
|
-
onDirty:
|
|
3978
|
-
}, null, 8, ["list", "recovery-key", "datasets", "dataset-schema", "dataset-schemas", "readonly", "onChange"])) : (
|
|
3984
|
+
onDirty: y[16] || (y[16] = (m) => t(f).setToolPending("rules", m))
|
|
3985
|
+
}, null, 8, ["list", "recovery-key", "datasets", "dataset-schema", "dataset-schemas", "readonly", "onChange"])) : (v(), p("p", ms, l(t(d).rulesNeedList), 1))
|
|
3979
3986
|
], 512)), [
|
|
3980
3987
|
[Be, t(me) === "rules"]
|
|
3981
|
-
]) :
|
|
3988
|
+
]) : O("", !0)
|
|
3982
3989
|
])
|
|
3983
3990
|
], 8, Yi)), [
|
|
3984
3991
|
[Be, t(_) === "tools"]
|
|
3985
|
-
]) :
|
|
3986
|
-
t(_) !== "tools" ? (
|
|
3992
|
+
]) : O("", !0),
|
|
3993
|
+
t(_) !== "tools" ? (v(), p("aside", vs, [
|
|
3987
3994
|
a("div", {
|
|
3988
3995
|
ref_key: "inspectorPanel",
|
|
3989
3996
|
ref: gt,
|
|
@@ -3992,29 +3999,29 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
3992
3999
|
role: "tabpanel",
|
|
3993
4000
|
"aria-labelledby": `${L}-tab-${t(_)}`
|
|
3994
4001
|
}, [
|
|
3995
|
-
ke.value || We.value ? (
|
|
4002
|
+
ke.value || We.value ? (v(), p("div", ps, [
|
|
3996
4003
|
a("small", null, l(t(d).flowLayout), 1),
|
|
3997
4004
|
a("button", {
|
|
3998
4005
|
type: "button",
|
|
3999
|
-
onClick:
|
|
4000
|
-
(...
|
|
4006
|
+
onClick: y[17] || (y[17] = //@ts-ignore
|
|
4007
|
+
(...m) => t(V) && t(V)(...m))
|
|
4001
4008
|
}, l(t(d).excelTool) + " ↗", 1)
|
|
4002
|
-
])) :
|
|
4003
|
-
t(_) === "fields" ? (
|
|
4004
|
-
t(
|
|
4009
|
+
])) : O("", !0),
|
|
4010
|
+
t(_) === "fields" ? (v(), p(J, { key: 1 }, [
|
|
4011
|
+
t(P).length > 1 ? (v(), p("label", fs, [
|
|
4005
4012
|
j(l(t(d).area), 1),
|
|
4006
4013
|
a("select", {
|
|
4007
|
-
value: t(
|
|
4008
|
-
onChange:
|
|
4009
|
-
(...
|
|
4014
|
+
value: t(k),
|
|
4015
|
+
onChange: y[18] || (y[18] = //@ts-ignore
|
|
4016
|
+
(...m) => t(et) && t(et)(...m))
|
|
4010
4017
|
}, [
|
|
4011
|
-
(
|
|
4018
|
+
(v(!0), p(J, null, ne(t(P), (m, te) => (v(), p("option", {
|
|
4012
4019
|
key: te,
|
|
4013
4020
|
value: te
|
|
4014
|
-
}, l(
|
|
4021
|
+
}, l(m.pageIndex + 1) + " " + l(t(d).page) + " · " + l(m.component.title || m.component.dataset), 9, bs))), 128))
|
|
4015
4022
|
], 40, hs)
|
|
4016
|
-
])) :
|
|
4017
|
-
t(H) ? (
|
|
4023
|
+
])) : O("", !0),
|
|
4024
|
+
t(H) ? (v(), p(J, { key: 1 }, [
|
|
4018
4025
|
a("div", ys, [
|
|
4019
4026
|
a("button", {
|
|
4020
4027
|
ref_key: "directoryTrigger",
|
|
@@ -4024,11 +4031,11 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4024
4031
|
"aria-expanded": t(Rt),
|
|
4025
4032
|
"aria-controls": `${L}-directory`,
|
|
4026
4033
|
"aria-haspopup": "dialog",
|
|
4027
|
-
onClick:
|
|
4028
|
-
(...
|
|
4029
|
-
onKeydown:
|
|
4034
|
+
onClick: y[19] || (y[19] = //@ts-ignore
|
|
4035
|
+
(...m) => t(re).toggle && t(re).toggle(...m)),
|
|
4036
|
+
onKeydown: y[20] || (y[20] = ht(
|
|
4030
4037
|
//@ts-ignore
|
|
4031
|
-
(...
|
|
4038
|
+
(...m) => t(re).escape && t(re).escape(...m),
|
|
4032
4039
|
["esc"]
|
|
4033
4040
|
))
|
|
4034
4041
|
}, [
|
|
@@ -4050,7 +4057,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4050
4057
|
"aria-label": t(d).fieldPosition
|
|
4051
4058
|
}, [
|
|
4052
4059
|
j(l(t(N) >= 0 ? t(N) + 1 : 0), 1),
|
|
4053
|
-
|
|
4060
|
+
y[67] || (y[67] = a("i", null, "/", -1)),
|
|
4054
4061
|
j(l(t(H).columns.length), 1)
|
|
4055
4062
|
], 8, Cs),
|
|
4056
4063
|
a("button", {
|
|
@@ -4059,7 +4066,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4059
4066
|
"aria-label": t(d).previousColumn,
|
|
4060
4067
|
title: t(d).previousColumn,
|
|
4061
4068
|
disabled: t(N) <= 0,
|
|
4062
|
-
onClick:
|
|
4069
|
+
onClick: y[21] || (y[21] = (m) => t(X).stepColumn(-1))
|
|
4063
4070
|
}, [
|
|
4064
4071
|
de(fe, {
|
|
4065
4072
|
name: "chevron-left",
|
|
@@ -4072,7 +4079,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4072
4079
|
"aria-label": t(d).nextColumn,
|
|
4073
4080
|
title: t(d).nextColumn,
|
|
4074
4081
|
disabled: t(N) >= t(H).columns.length - 1,
|
|
4075
|
-
onClick:
|
|
4082
|
+
onClick: y[22] || (y[22] = (m) => t(X).stepColumn(1))
|
|
4076
4083
|
}, [
|
|
4077
4084
|
de(fe, {
|
|
4078
4085
|
name: "chevron-right",
|
|
@@ -4081,10 +4088,10 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4081
4088
|
], 8, Ss)
|
|
4082
4089
|
])
|
|
4083
4090
|
]),
|
|
4084
|
-
t(D) ? (
|
|
4091
|
+
t(D) ? (v(), p("fieldset", {
|
|
4085
4092
|
key: 0,
|
|
4086
4093
|
class: "mr-designer-properties",
|
|
4087
|
-
disabled: e.readonly || t(
|
|
4094
|
+
disabled: e.readonly || t(R) || t(b),
|
|
4088
4095
|
"aria-label": t(d).columnProperties
|
|
4089
4096
|
}, [
|
|
4090
4097
|
a("div", Ts, [
|
|
@@ -4093,10 +4100,10 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4093
4100
|
j(l(t(d).header), 1),
|
|
4094
4101
|
a("input", {
|
|
4095
4102
|
value: t(D).column.header,
|
|
4096
|
-
onInput:
|
|
4103
|
+
onInput: y[23] || (y[23] = (m) => t(f).setColumn(
|
|
4097
4104
|
t(D).index,
|
|
4098
4105
|
"header",
|
|
4099
|
-
De(
|
|
4106
|
+
De(m)
|
|
4100
4107
|
))
|
|
4101
4108
|
}, null, 40, Es)
|
|
4102
4109
|
]),
|
|
@@ -4105,22 +4112,22 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4105
4112
|
a("input", {
|
|
4106
4113
|
value: t(D).column.field,
|
|
4107
4114
|
list: t($e) ? `${L}-fields` : void 0,
|
|
4108
|
-
onChange:
|
|
4115
|
+
onChange: y[24] || (y[24] = (m) => t(f).setColumn(
|
|
4109
4116
|
t(D).index,
|
|
4110
4117
|
"field",
|
|
4111
|
-
De(
|
|
4118
|
+
De(m)
|
|
4112
4119
|
))
|
|
4113
4120
|
}, null, 40, Rs)
|
|
4114
4121
|
]),
|
|
4115
|
-
t($e) ? (
|
|
4122
|
+
t($e) ? (v(), p("datalist", {
|
|
4116
4123
|
key: 0,
|
|
4117
4124
|
id: `${L}-fields`
|
|
4118
4125
|
}, [
|
|
4119
|
-
(
|
|
4120
|
-
key:
|
|
4121
|
-
value:
|
|
4122
|
-
}, l(
|
|
4123
|
-
], 8, Ps)) :
|
|
4126
|
+
(v(!0), p(J, null, ne(t($e).fields, (m) => (v(), p("option", {
|
|
4127
|
+
key: m.field,
|
|
4128
|
+
value: m.field
|
|
4129
|
+
}, l(m.label) + " · " + l(m.type) + " " + l(m.unit), 9, Ls))), 128))
|
|
4130
|
+
], 8, Ps)) : O("", !0)
|
|
4124
4131
|
]),
|
|
4125
4132
|
a("div", Ds, [
|
|
4126
4133
|
a("h3", null, l(t(d).formatGroup), 1),
|
|
@@ -4133,10 +4140,10 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4133
4140
|
step: "0.5",
|
|
4134
4141
|
value: t(D).column.widthMm,
|
|
4135
4142
|
disabled: We.value,
|
|
4136
|
-
onChange:
|
|
4143
|
+
onChange: y[25] || (y[25] = (m) => t(f).setColumn(
|
|
4137
4144
|
t(D).index,
|
|
4138
4145
|
"widthMm",
|
|
4139
|
-
De(
|
|
4146
|
+
De(m)
|
|
4140
4147
|
))
|
|
4141
4148
|
}, null, 40, Hs)
|
|
4142
4149
|
]),
|
|
@@ -4144,18 +4151,18 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4144
4151
|
j(l(t(d).semantic), 1),
|
|
4145
4152
|
a("select", {
|
|
4146
4153
|
value: t(D).column.semanticRole || "text",
|
|
4147
|
-
onChange:
|
|
4154
|
+
onChange: y[26] || (y[26] = (m) => t(f).setColumn(
|
|
4148
4155
|
t(D).index,
|
|
4149
4156
|
"semanticRole",
|
|
4150
|
-
De(
|
|
4157
|
+
De(m)
|
|
4151
4158
|
))
|
|
4152
4159
|
}, [
|
|
4153
|
-
a("option",
|
|
4160
|
+
a("option", Fs, l(t(d).identifier), 1),
|
|
4154
4161
|
a("option", Bs, l(t(d).dimension), 1),
|
|
4155
4162
|
a("option", Gs, l(t(d).measure), 1),
|
|
4156
4163
|
a("option", js, l(t(d).date), 1),
|
|
4157
4164
|
a("option", zs, l(t(d).text), 1)
|
|
4158
|
-
], 40,
|
|
4165
|
+
], 40, Os)
|
|
4159
4166
|
])
|
|
4160
4167
|
]),
|
|
4161
4168
|
a("div", Vs, [
|
|
@@ -4166,7 +4173,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4166
4173
|
labels: Pt.value,
|
|
4167
4174
|
"auto-label": t(d).autoShort,
|
|
4168
4175
|
"allow-auto": "",
|
|
4169
|
-
"onUpdate:modelValue":
|
|
4176
|
+
"onUpdate:modelValue": y[27] || (y[27] = (m) => t(f).setColumn(t(D).index, "align", m))
|
|
4170
4177
|
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
4171
4178
|
]),
|
|
4172
4179
|
a("div", Ws, [
|
|
@@ -4176,10 +4183,10 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4176
4183
|
label: t(d).headerAlign,
|
|
4177
4184
|
labels: Pt.value,
|
|
4178
4185
|
"auto-label": t(d).autoShort,
|
|
4179
|
-
"onUpdate:modelValue":
|
|
4186
|
+
"onUpdate:modelValue": y[28] || (y[28] = (m) => t(f).setColumn(
|
|
4180
4187
|
t(D).index,
|
|
4181
4188
|
"headerAlign",
|
|
4182
|
-
|
|
4189
|
+
m
|
|
4183
4190
|
))
|
|
4184
4191
|
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
4185
4192
|
])
|
|
@@ -4190,10 +4197,10 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4190
4197
|
type: "checkbox",
|
|
4191
4198
|
role: "switch",
|
|
4192
4199
|
checked: t(D).column.editable === !0,
|
|
4193
|
-
onChange:
|
|
4200
|
+
onChange: y[29] || (y[29] = (m) => t(f).setColumn(
|
|
4194
4201
|
t(D).index,
|
|
4195
4202
|
"editable",
|
|
4196
|
-
pt(
|
|
4203
|
+
pt(m)
|
|
4197
4204
|
))
|
|
4198
4205
|
}, null, 40, Ks)
|
|
4199
4206
|
]),
|
|
@@ -4204,7 +4211,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4204
4211
|
"aria-label": t(d).moveColumnLeft,
|
|
4205
4212
|
title: t(d).moveColumnLeft,
|
|
4206
4213
|
disabled: We.value || t(N) <= 0,
|
|
4207
|
-
onClick:
|
|
4214
|
+
onClick: y[30] || (y[30] = (m) => t(Xe)(-1))
|
|
4208
4215
|
}, [
|
|
4209
4216
|
de(fe, {
|
|
4210
4217
|
name: "chevron-left",
|
|
@@ -4216,7 +4223,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4216
4223
|
"aria-label": t(d).moveColumnRight,
|
|
4217
4224
|
title: t(d).moveColumnRight,
|
|
4218
4225
|
disabled: We.value || t(N) >= t(H).columns.length - 1,
|
|
4219
|
-
onClick:
|
|
4226
|
+
onClick: y[31] || (y[31] = (m) => t(Xe)(1))
|
|
4220
4227
|
}, [
|
|
4221
4228
|
de(fe, {
|
|
4222
4229
|
name: "chevron-right",
|
|
@@ -4228,17 +4235,17 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4228
4235
|
a("input", {
|
|
4229
4236
|
type: "checkbox",
|
|
4230
4237
|
checked: t(D).column.hidden !== !0,
|
|
4231
|
-
disabled: We.value || t(D).column.hidden !== !0 && t(H).columns.filter((
|
|
4232
|
-
onChange:
|
|
4238
|
+
disabled: We.value || t(D).column.hidden !== !0 && t(H).columns.filter((m) => !m.hidden).length === 1,
|
|
4239
|
+
onChange: y[32] || (y[32] = (m) => t(f).setColumn(
|
|
4233
4240
|
t(D).index,
|
|
4234
4241
|
"hidden",
|
|
4235
|
-
!pt(
|
|
4242
|
+
!pt(m)
|
|
4236
4243
|
))
|
|
4237
4244
|
}, null, 40, Xs)
|
|
4238
4245
|
])
|
|
4239
4246
|
])
|
|
4240
|
-
], 8, Is)) :
|
|
4241
|
-
t(Rt) ? (
|
|
4247
|
+
], 8, Is)) : O("", !0),
|
|
4248
|
+
t(Rt) ? (v(), p("div", {
|
|
4242
4249
|
key: 1,
|
|
4243
4250
|
id: `${L}-directory`,
|
|
4244
4251
|
ref_key: "directoryPanel",
|
|
@@ -4246,13 +4253,13 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4246
4253
|
role: "dialog",
|
|
4247
4254
|
"aria-label": t(d).columnDirectory,
|
|
4248
4255
|
class: "mr-designer-directory",
|
|
4249
|
-
onKeydown:
|
|
4256
|
+
onKeydown: y[44] || (y[44] = ht(
|
|
4250
4257
|
//@ts-ignore
|
|
4251
|
-
(...
|
|
4258
|
+
(...m) => t(re).escape && t(re).escape(...m),
|
|
4252
4259
|
["esc"]
|
|
4253
4260
|
)),
|
|
4254
|
-
onFocusout:
|
|
4255
|
-
(...
|
|
4261
|
+
onFocusout: y[45] || (y[45] = //@ts-ignore
|
|
4262
|
+
(...m) => t(re).leave && t(re).leave(...m))
|
|
4256
4263
|
}, [
|
|
4257
4264
|
a("div", Qs, [
|
|
4258
4265
|
a("strong", null, [
|
|
@@ -4263,7 +4270,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4263
4270
|
type: "button",
|
|
4264
4271
|
class: "mr-designer-icon-button",
|
|
4265
4272
|
"aria-label": t(d).closeDirectory,
|
|
4266
|
-
onClick:
|
|
4273
|
+
onClick: y[33] || (y[33] = (m) => t(re).close(!0))
|
|
4267
4274
|
}, [
|
|
4268
4275
|
de(fe, {
|
|
4269
4276
|
name: "close",
|
|
@@ -4279,42 +4286,42 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4279
4286
|
we(a("input", {
|
|
4280
4287
|
ref_key: "directorySearch",
|
|
4281
4288
|
ref: Qt,
|
|
4282
|
-
"onUpdate:modelValue":
|
|
4289
|
+
"onUpdate:modelValue": y[34] || (y[34] = (m) => bt(Y) ? Y.value = m : null),
|
|
4283
4290
|
type: "search",
|
|
4284
4291
|
"aria-label": t(d).columnsSearch,
|
|
4285
4292
|
placeholder: t(d).columnsSearch,
|
|
4286
|
-
onKeydown:
|
|
4287
|
-
(...
|
|
4293
|
+
onKeydown: y[35] || (y[35] = //@ts-ignore
|
|
4294
|
+
(...m) => t(re).searchKeydown && t(re).searchKeydown(...m))
|
|
4288
4295
|
}, null, 40, nr), [
|
|
4289
4296
|
[Dt, t(Y)]
|
|
4290
4297
|
]),
|
|
4291
|
-
t(Y) ? (
|
|
4298
|
+
t(Y) ? (v(), p("button", {
|
|
4292
4299
|
key: 0,
|
|
4293
4300
|
type: "button",
|
|
4294
4301
|
class: "mr-designer-icon-button",
|
|
4295
4302
|
"aria-label": t(d).clearSearch,
|
|
4296
4303
|
title: t(d).clearSearch,
|
|
4297
|
-
onClick:
|
|
4304
|
+
onClick: y[36] || (y[36] = (m) => Y.value = "")
|
|
4298
4305
|
}, [
|
|
4299
4306
|
de(fe, {
|
|
4300
4307
|
name: "close",
|
|
4301
4308
|
size: 13
|
|
4302
4309
|
})
|
|
4303
|
-
], 8, ar)) :
|
|
4310
|
+
], 8, ar)) : O("", !0)
|
|
4304
4311
|
]),
|
|
4305
4312
|
a("div", or, [
|
|
4306
4313
|
a("button", {
|
|
4307
4314
|
type: "button",
|
|
4308
|
-
disabled: e.readonly || t(
|
|
4309
|
-
onClick:
|
|
4315
|
+
disabled: e.readonly || t(R) || t(b) || !t(W).length,
|
|
4316
|
+
onClick: y[37] || (y[37] = (m) => t(f).selectVisible(!0))
|
|
4310
4317
|
}, l(t(d).selectVisible), 9, lr),
|
|
4311
|
-
t(se).length ? (
|
|
4318
|
+
t(se).length ? (v(), p("button", {
|
|
4312
4319
|
key: 0,
|
|
4313
4320
|
type: "button",
|
|
4314
|
-
onClick:
|
|
4315
|
-
(...
|
|
4316
|
-
}, l(t(d).clearSelection), 1)) :
|
|
4317
|
-
t(se).length ? (
|
|
4321
|
+
onClick: y[38] || (y[38] = //@ts-ignore
|
|
4322
|
+
(...m) => t(f).clearSelection && t(f).clearSelection(...m))
|
|
4323
|
+
}, l(t(d).clearSelection), 1)) : O("", !0),
|
|
4324
|
+
t(se).length ? (v(), p("span", ir, l(t(d).columnsSelected) + " " + l(t(se).length), 1)) : (v(), p("span", sr, l(t(W).length) + " / " + l(t(H).columns.length), 1))
|
|
4318
4325
|
]),
|
|
4319
4326
|
a("div", {
|
|
4320
4327
|
ref_key: "columnList",
|
|
@@ -4323,15 +4330,15 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4323
4330
|
"aria-label": t(d).columnDirectory,
|
|
4324
4331
|
role: "group"
|
|
4325
4332
|
}, [
|
|
4326
|
-
(
|
|
4333
|
+
(v(!0), p(J, null, ne(t(re).windowColumns.value, ({ column: m, index: te }) => (v(), p("div", {
|
|
4327
4334
|
key: te,
|
|
4328
4335
|
class: Ge(["mr-designer-column-row", { "is-active": t(N) === te }])
|
|
4329
4336
|
}, [
|
|
4330
4337
|
a("input", {
|
|
4331
4338
|
type: "checkbox",
|
|
4332
|
-
"aria-label": `${t(d).selectColumn} ${
|
|
4339
|
+
"aria-label": `${t(d).selectColumn} ${m.header}`,
|
|
4333
4340
|
checked: t(se).includes(te),
|
|
4334
|
-
disabled: e.readonly || t(
|
|
4341
|
+
disabled: e.readonly || t(R) || t(b),
|
|
4335
4342
|
onChange: (_e) => t(f).toggleColumn(te, pt(_e))
|
|
4336
4343
|
}, null, 40, dr),
|
|
4337
4344
|
a("button", {
|
|
@@ -4340,22 +4347,22 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4340
4347
|
"aria-pressed": t(N) === te,
|
|
4341
4348
|
tabindex: t(Yt) === te ? 0 : -1,
|
|
4342
4349
|
onClick: (_e) => t(re).choose(te),
|
|
4343
|
-
onKeydown:
|
|
4350
|
+
onKeydown: y[39] || (y[39] = //@ts-ignore
|
|
4344
4351
|
(..._e) => t(re).navigate && t(re).navigate(..._e))
|
|
4345
4352
|
}, [
|
|
4346
4353
|
a("span", cr, l(te + 1), 1),
|
|
4347
4354
|
a("span", mr, [
|
|
4348
|
-
a("strong", null, l(
|
|
4349
|
-
a("small", null, l(
|
|
4355
|
+
a("strong", null, l(m.header), 1),
|
|
4356
|
+
a("small", null, l(m.field), 1)
|
|
4350
4357
|
]),
|
|
4351
|
-
t(N) === te ? (
|
|
4358
|
+
t(N) === te ? (v(), xe(fe, {
|
|
4352
4359
|
key: 0,
|
|
4353
4360
|
name: "chevron-right",
|
|
4354
4361
|
size: 13
|
|
4355
|
-
})) :
|
|
4362
|
+
})) : O("", !0)
|
|
4356
4363
|
], 40, ur)
|
|
4357
4364
|
], 2))), 128)),
|
|
4358
|
-
t(W).length ?
|
|
4365
|
+
t(W).length ? O("", !0) : (v(), p("p", vr, [
|
|
4359
4366
|
de(fe, {
|
|
4360
4367
|
name: "search",
|
|
4361
4368
|
size: 20
|
|
@@ -4363,7 +4370,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4363
4370
|
j(l(t(d).noColumns), 1)
|
|
4364
4371
|
]))
|
|
4365
4372
|
], 8, rr),
|
|
4366
|
-
t(W).length > t(re).windowSize ? (
|
|
4373
|
+
t(W).length > t(re).windowSize ? (v(), p("nav", {
|
|
4367
4374
|
key: 0,
|
|
4368
4375
|
class: "mr-designer-directory-pages",
|
|
4369
4376
|
"aria-label": t(d).columnDirectory
|
|
@@ -4372,7 +4379,7 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4372
4379
|
type: "button",
|
|
4373
4380
|
disabled: t(re).windowStart.value === 0,
|
|
4374
4381
|
"aria-label": t(d).previousColumns,
|
|
4375
|
-
onClick:
|
|
4382
|
+
onClick: y[40] || (y[40] = (m) => t(re).stepWindow(-1))
|
|
4376
4383
|
}, [
|
|
4377
4384
|
de(fe, {
|
|
4378
4385
|
name: "chevron-left",
|
|
@@ -4384,21 +4391,21 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4384
4391
|
type: "button",
|
|
4385
4392
|
disabled: t(re).windowStart.value + t(re).windowSize >= t(W).length,
|
|
4386
4393
|
"aria-label": t(d).nextColumns,
|
|
4387
|
-
onClick:
|
|
4394
|
+
onClick: y[41] || (y[41] = (m) => t(re).stepWindow(1))
|
|
4388
4395
|
}, [
|
|
4389
4396
|
de(fe, {
|
|
4390
4397
|
name: "chevron-right",
|
|
4391
4398
|
size: 14
|
|
4392
4399
|
})
|
|
4393
4400
|
], 8, fr)
|
|
4394
|
-
], 8, gr)) :
|
|
4395
|
-
t(se).length ? (
|
|
4401
|
+
], 8, gr)) : O("", !0),
|
|
4402
|
+
t(se).length ? (v(), p("div", hr, [
|
|
4396
4403
|
a("label", null, [
|
|
4397
4404
|
j(l(t(d).batchBody), 1),
|
|
4398
4405
|
a("select", {
|
|
4399
4406
|
"aria-label": t(d).batchBody,
|
|
4400
|
-
disabled: e.readonly || t(
|
|
4401
|
-
onChange:
|
|
4407
|
+
disabled: e.readonly || t(R) || t(b),
|
|
4408
|
+
onChange: y[42] || (y[42] = (m) => Lt(m, "align"))
|
|
4402
4409
|
}, [
|
|
4403
4410
|
a("option", yr, l(t(d).chooseAlignment), 1),
|
|
4404
4411
|
a("option", wr, l(t(d).auto), 1),
|
|
@@ -4412,8 +4419,8 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4412
4419
|
j(l(t(d).batchHeader), 1),
|
|
4413
4420
|
a("select", {
|
|
4414
4421
|
"aria-label": t(d).batchHeader,
|
|
4415
|
-
disabled: e.readonly || t(
|
|
4416
|
-
onChange:
|
|
4422
|
+
disabled: e.readonly || t(R) || t(b),
|
|
4423
|
+
onChange: y[43] || (y[43] = (m) => Lt(m, "headerAlign"))
|
|
4417
4424
|
}, [
|
|
4418
4425
|
a("option", Sr, l(t(d).chooseAlignment), 1),
|
|
4419
4426
|
a("option", Ir, l(t(d).left), 1),
|
|
@@ -4422,26 +4429,26 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4422
4429
|
a("option", Rr, l(t(d).justify), 1)
|
|
4423
4430
|
], 40, $r)
|
|
4424
4431
|
])
|
|
4425
|
-
])) :
|
|
4426
|
-
], 40, Zs)) :
|
|
4427
|
-
], 64)) : (
|
|
4428
|
-
], 64)) : t(_) === "component" ? (
|
|
4432
|
+
])) : O("", !0)
|
|
4433
|
+
], 40, Zs)) : O("", !0)
|
|
4434
|
+
], 64)) : (v(), p("p", Pr, l(t(d).noColumns), 1))
|
|
4435
|
+
], 64)) : t(_) === "component" ? (v(), p(J, { key: 2 }, [
|
|
4429
4436
|
a("div", Lr, [
|
|
4430
4437
|
a("select", {
|
|
4431
4438
|
"aria-label": t(d).insertComponent,
|
|
4432
4439
|
disabled: t(ie) || ke.value,
|
|
4433
|
-
onChange:
|
|
4434
|
-
(...
|
|
4440
|
+
onChange: y[46] || (y[46] = //@ts-ignore
|
|
4441
|
+
(...m) => t(Ye) && t(Ye)(...m))
|
|
4435
4442
|
}, [
|
|
4436
4443
|
a("option", _r, l(t(d).insertComponent), 1),
|
|
4437
4444
|
a("option", Ar, l(t(d).insertText), 1),
|
|
4438
4445
|
a("option", {
|
|
4439
4446
|
value: "list",
|
|
4440
|
-
disabled: !!t(
|
|
4447
|
+
disabled: !!t(w).template.repeat
|
|
4441
4448
|
}, l(t(d).insertList), 9, Hr),
|
|
4442
4449
|
a("option", Nr, l(t(d).insertImage), 1),
|
|
4443
|
-
a("option",
|
|
4444
|
-
a("option",
|
|
4450
|
+
a("option", Or, l(t(d).insertRect), 1),
|
|
4451
|
+
a("option", Fr, l(t(d).insertQrcode), 1),
|
|
4445
4452
|
a("option", Br, l(t(d).insertBarcode), 1)
|
|
4446
4453
|
], 40, Dr),
|
|
4447
4454
|
a("button", {
|
|
@@ -4449,16 +4456,16 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4449
4456
|
title: t(d).duplicateComponent,
|
|
4450
4457
|
"aria-label": t(d).duplicateComponent,
|
|
4451
4458
|
disabled: t(ie) || ke.value || !t(ge),
|
|
4452
|
-
onClick:
|
|
4453
|
-
(...
|
|
4459
|
+
onClick: y[47] || (y[47] = //@ts-ignore
|
|
4460
|
+
(...m) => t(oe).duplicate && t(oe).duplicate(...m))
|
|
4454
4461
|
}, " + ", 8, Gr),
|
|
4455
4462
|
a("button", {
|
|
4456
4463
|
type: "button",
|
|
4457
4464
|
title: t(d).removeComponent,
|
|
4458
4465
|
"aria-label": t(d).removeComponent,
|
|
4459
4466
|
disabled: t(ie) || ke.value || !t(ge),
|
|
4460
|
-
onClick:
|
|
4461
|
-
(...
|
|
4467
|
+
onClick: y[48] || (y[48] = //@ts-ignore
|
|
4468
|
+
(...m) => t(oe).remove && t(oe).remove(...m))
|
|
4462
4469
|
}, [
|
|
4463
4470
|
de(fe, {
|
|
4464
4471
|
name: "close",
|
|
@@ -4466,15 +4473,15 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4466
4473
|
})
|
|
4467
4474
|
], 8, jr)
|
|
4468
4475
|
]),
|
|
4469
|
-
t(
|
|
4476
|
+
t(w).template.pages.length > 1 ? (v(), p("label", zr, [
|
|
4470
4477
|
j(l(t(d).page), 1),
|
|
4471
4478
|
we(a("select", {
|
|
4472
|
-
"onUpdate:modelValue":
|
|
4479
|
+
"onUpdate:modelValue": y[49] || (y[49] = (m) => bt(Q) ? Q.value = m : null)
|
|
4473
4480
|
}, [
|
|
4474
|
-
(
|
|
4481
|
+
(v(!0), p(J, null, ne(t(w).template.pages, (m, te) => (v(), p("option", {
|
|
4475
4482
|
key: te,
|
|
4476
4483
|
value: te
|
|
4477
|
-
}, l(t(Ue)(
|
|
4484
|
+
}, l(t(Ue)(m, te, t(d).page)), 9, Vr))), 128))
|
|
4478
4485
|
], 512), [
|
|
4479
4486
|
[
|
|
4480
4487
|
ot,
|
|
@@ -4483,36 +4490,36 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4483
4490
|
{ number: !0 }
|
|
4484
4491
|
]
|
|
4485
4492
|
])
|
|
4486
|
-
])) :
|
|
4493
|
+
])) : O("", !0),
|
|
4487
4494
|
a("label", Wr, [
|
|
4488
4495
|
j(l(t(d).components), 1),
|
|
4489
4496
|
a("select", {
|
|
4490
4497
|
value: t(Z) && t(Z).pageIndex === t(Q) ? t(Z).componentIndex : -1,
|
|
4491
|
-
onChange:
|
|
4498
|
+
onChange: y[50] || (y[50] = (m) => t(Fe)({
|
|
4492
4499
|
pageIndex: t(Q),
|
|
4493
|
-
componentIndex: Number(De(
|
|
4500
|
+
componentIndex: Number(De(m))
|
|
4494
4501
|
}))
|
|
4495
4502
|
}, [
|
|
4496
4503
|
a("option", Kr, l(t(d).noComponent), 1),
|
|
4497
|
-
(
|
|
4498
|
-
key:
|
|
4499
|
-
value:
|
|
4500
|
-
}, l(
|
|
4504
|
+
(v(!0), p(J, null, ne(Tt.value, (m) => (v(), p("option", {
|
|
4505
|
+
key: m.index,
|
|
4506
|
+
value: m.index
|
|
4507
|
+
}, l(m.index + 1) + " · " + l(m.name), 9, Ur))), 128))
|
|
4501
4508
|
], 40, Jr)
|
|
4502
4509
|
]),
|
|
4503
|
-
t(oe).selections.value.length ? (
|
|
4510
|
+
t(oe).selections.value.length ? (v(), p("div", qr, [
|
|
4504
4511
|
a("strong", null, l(t(oe).selections.value.length) + " " + l(t(d).component), 1),
|
|
4505
4512
|
a("button", {
|
|
4506
4513
|
type: "button",
|
|
4507
4514
|
disabled: t(ie),
|
|
4508
|
-
onClick:
|
|
4509
|
-
(...
|
|
4515
|
+
onClick: y[51] || (y[51] = //@ts-ignore
|
|
4516
|
+
(...m) => t(oe).toggleLock && t(oe).toggleLock(...m))
|
|
4510
4517
|
}, l(t(oe).allLocked.value ? t(d).unlockSelection : t(d).lockSelection), 9, Yr),
|
|
4511
4518
|
a("select", {
|
|
4512
4519
|
"aria-label": t(d).alignSelection,
|
|
4513
4520
|
disabled: t(ie) || ke.value || t(oe).selections.value.length < 2,
|
|
4514
|
-
onChange:
|
|
4515
|
-
t(oe).align(De(
|
|
4521
|
+
onChange: y[52] || (y[52] = (m) => {
|
|
4522
|
+
t(oe).align(De(m)), m.target.value = "";
|
|
4516
4523
|
})
|
|
4517
4524
|
}, [
|
|
4518
4525
|
a("option", Zr, l(t(d).alignSelection), 1),
|
|
@@ -4526,26 +4533,26 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4526
4533
|
a("button", {
|
|
4527
4534
|
type: "button",
|
|
4528
4535
|
disabled: t(ie) || ke.value || t(oe).selections.value.length < 3,
|
|
4529
|
-
onClick:
|
|
4536
|
+
onClick: y[53] || (y[53] = (m) => t(oe).distribute("horizontal"))
|
|
4530
4537
|
}, l(t(d).horizontalSpacing), 9, ld),
|
|
4531
4538
|
a("button", {
|
|
4532
4539
|
type: "button",
|
|
4533
4540
|
disabled: t(ie) || ke.value || t(oe).selections.value.length < 3,
|
|
4534
|
-
onClick:
|
|
4541
|
+
onClick: y[54] || (y[54] = (m) => t(oe).distribute("vertical"))
|
|
4535
4542
|
}, l(t(d).verticalSpacing), 9, id),
|
|
4536
|
-
t(oe).allLocked.value ? (
|
|
4537
|
-
])) :
|
|
4538
|
-
t(ge) ? (
|
|
4543
|
+
t(oe).allLocked.value ? (v(), p("small", sd, l(t(d).sessionLock), 1)) : O("", !0)
|
|
4544
|
+
])) : O("", !0),
|
|
4545
|
+
t(ge) ? (v(), p(J, { key: 2 }, [
|
|
4539
4546
|
a("div", rd, [
|
|
4540
4547
|
a("button", {
|
|
4541
4548
|
type: "button",
|
|
4542
4549
|
disabled: t(ie) || ke.value || t(Z)?.componentIndex === 0,
|
|
4543
|
-
onClick:
|
|
4550
|
+
onClick: y[55] || (y[55] = (m) => t(oe).reorder(-1))
|
|
4544
4551
|
}, l(t(d).backward), 9, dd),
|
|
4545
4552
|
a("button", {
|
|
4546
4553
|
type: "button",
|
|
4547
|
-
disabled: t(ie) || ke.value || t(Z)?.componentIndex === (t(
|
|
4548
|
-
onClick:
|
|
4554
|
+
disabled: t(ie) || ke.value || t(Z)?.componentIndex === (t(w).template.pages[t(Q)]?.components.length ?? 0) - 1,
|
|
4555
|
+
onClick: y[56] || (y[56] = (m) => t(oe).reorder(1))
|
|
4549
4556
|
}, l(t(d).forward), 9, ud)
|
|
4550
4557
|
]),
|
|
4551
4558
|
de(Do, {
|
|
@@ -4553,58 +4560,58 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4553
4560
|
"geometry-disabled": ke.value,
|
|
4554
4561
|
disabled: t(ie) || t(oe).locked(t(Z)),
|
|
4555
4562
|
messages: t(d),
|
|
4556
|
-
repeat: t(
|
|
4563
|
+
repeat: t(w).template.repeat,
|
|
4557
4564
|
schema: It.value,
|
|
4558
4565
|
onGeometry: t(oe).geometry,
|
|
4559
4566
|
onPatch: t(ut)
|
|
4560
4567
|
}, null, 8, ["component", "geometry-disabled", "disabled", "messages", "repeat", "schema", "onGeometry", "onPatch"]),
|
|
4561
|
-
t(ge).kind === "list" ? (
|
|
4568
|
+
t(ge).kind === "list" ? (v(), xe(oi, {
|
|
4562
4569
|
key: 0,
|
|
4563
4570
|
list: t(ge),
|
|
4564
4571
|
disabled: t(ie) || ke.value,
|
|
4565
4572
|
messages: t(d),
|
|
4566
4573
|
onCommand: t(mt)
|
|
4567
|
-
}, null, 8, ["list", "disabled", "messages", "onCommand"])) :
|
|
4568
|
-
], 64)) : (
|
|
4569
|
-
], 64)) : t(_) === "template" ? (
|
|
4574
|
+
}, null, 8, ["list", "disabled", "messages", "onCommand"])) : O("", !0)
|
|
4575
|
+
], 64)) : (v(), p("p", cd, l(t(d).noComponent), 1))
|
|
4576
|
+
], 64)) : t(_) === "template" ? (v(), p(J, { key: 3 }, [
|
|
4570
4577
|
a("h3", null, l(t(d).templateDetails), 1),
|
|
4571
4578
|
a("label", md, [
|
|
4572
4579
|
j(l(t(d).name), 1),
|
|
4573
4580
|
a("input", {
|
|
4574
|
-
value: t(
|
|
4575
|
-
disabled: e.readonly || t(
|
|
4576
|
-
onInput:
|
|
4581
|
+
value: t(w).name,
|
|
4582
|
+
disabled: e.readonly || t(R) || t(b),
|
|
4583
|
+
onInput: y[57] || (y[57] = (m) => t(f).setName(De(m)))
|
|
4577
4584
|
}, null, 40, vd)
|
|
4578
4585
|
]),
|
|
4579
4586
|
a("label", gd, [
|
|
4580
4587
|
j(l(t(d).description), 1),
|
|
4581
4588
|
a("textarea", {
|
|
4582
4589
|
rows: "2",
|
|
4583
|
-
value: t(
|
|
4584
|
-
disabled: e.readonly || t(
|
|
4585
|
-
onInput:
|
|
4590
|
+
value: t(w).description,
|
|
4591
|
+
disabled: e.readonly || t(R) || t(b),
|
|
4592
|
+
onInput: y[58] || (y[58] = (m) => t(f).setDescription(De(m)))
|
|
4586
4593
|
}, null, 40, pd)
|
|
4587
4594
|
]),
|
|
4588
4595
|
de(tl, {
|
|
4589
|
-
document: t(
|
|
4596
|
+
document: t(w),
|
|
4590
4597
|
"page-index": t(Q),
|
|
4591
4598
|
disabled: t(ie),
|
|
4592
4599
|
messages: t(d),
|
|
4593
|
-
onSelect:
|
|
4600
|
+
onSelect: y[59] || (y[59] = (m) => Q.value = m),
|
|
4594
4601
|
onCommand: qt,
|
|
4595
|
-
onLocate:
|
|
4596
|
-
t(
|
|
4602
|
+
onLocate: y[60] || (y[60] = (m) => {
|
|
4603
|
+
t(Fe)({ pageIndex: t(Q), componentIndex: m }), t(Le)("design");
|
|
4597
4604
|
})
|
|
4598
4605
|
}, null, 8, ["document", "page-index", "disabled", "messages"]),
|
|
4599
4606
|
de(wl, {
|
|
4600
|
-
document: t(
|
|
4607
|
+
document: t(w),
|
|
4601
4608
|
datasets: Object.keys(e.datasets ?? {}),
|
|
4602
4609
|
schemas: e.dataSchemas,
|
|
4603
4610
|
disabled: t(ie),
|
|
4604
4611
|
messages: t(d),
|
|
4605
|
-
onChange:
|
|
4612
|
+
onChange: y[61] || (y[61] = (m) => {
|
|
4606
4613
|
t(f).transaction((te) => {
|
|
4607
|
-
|
|
4614
|
+
m ? te.template.repeat = m : delete te.template.repeat;
|
|
4608
4615
|
});
|
|
4609
4616
|
})
|
|
4610
4617
|
}, null, 8, ["document", "datasets", "schemas", "disabled", "messages"]),
|
|
@@ -4612,20 +4619,20 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4612
4619
|
a("summary", null, l(t(d).technicalDetails), 1),
|
|
4613
4620
|
a("dl", hd, [
|
|
4614
4621
|
a("dt", null, l(t(d).templateIdentity), 1),
|
|
4615
|
-
a("dd", null, l(t(
|
|
4622
|
+
a("dd", null, l(t(w).id), 1),
|
|
4616
4623
|
a("dt", null, l(t(d).templateRevision), 1),
|
|
4617
|
-
a("dd", null, l(t(
|
|
4624
|
+
a("dd", null, l(t(w).revision || t(d).unpublished), 1)
|
|
4618
4625
|
])
|
|
4619
4626
|
])
|
|
4620
|
-
], 64)) : (
|
|
4627
|
+
], 64)) : (v(), p(J, { key: 4 }, [
|
|
4621
4628
|
a("h3", null, l(t(d).advancedTitle), 1),
|
|
4622
4629
|
a("label", bd, [
|
|
4623
4630
|
j(l(t(d).json), 1),
|
|
4624
4631
|
we(a("textarea", {
|
|
4625
|
-
"onUpdate:modelValue":
|
|
4632
|
+
"onUpdate:modelValue": y[62] || (y[62] = (m) => bt(S) ? S.value = m : null),
|
|
4626
4633
|
class: "mr-designer-json",
|
|
4627
4634
|
"aria-label": t(d).json,
|
|
4628
|
-
disabled: e.readonly || t(
|
|
4635
|
+
disabled: e.readonly || t(R),
|
|
4629
4636
|
spellcheck: "false"
|
|
4630
4637
|
}, null, 8, yd), [
|
|
4631
4638
|
[Dt, t(S)]
|
|
@@ -4634,28 +4641,28 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4634
4641
|
a("button", {
|
|
4635
4642
|
type: "button",
|
|
4636
4643
|
class: "mr-designer-apply-json",
|
|
4637
|
-
disabled: e.readonly || t(
|
|
4638
|
-
onClick:
|
|
4639
|
-
(...
|
|
4644
|
+
disabled: e.readonly || t(R),
|
|
4645
|
+
onClick: y[63] || (y[63] = //@ts-ignore
|
|
4646
|
+
(...m) => t(f).applyJson && t(f).applyJson(...m))
|
|
4640
4647
|
}, l(t(d).applyJson), 9, wd)
|
|
4641
4648
|
], 64)),
|
|
4642
|
-
t(b) ? (
|
|
4649
|
+
t(b) ? (v(), p("p", kd, l(t(d).jsonPending), 1)) : O("", !0)
|
|
4643
4650
|
], 10, gs)
|
|
4644
|
-
])) :
|
|
4645
|
-
t(_) !== "tools" || t(Te) ? (
|
|
4651
|
+
])) : O("", !0),
|
|
4652
|
+
t(_) !== "tools" || t(Te) ? (v(), p("div", {
|
|
4646
4653
|
key: 2,
|
|
4647
4654
|
class: "mr-designer-preview",
|
|
4648
4655
|
"aria-label": t(d).previewTitle
|
|
4649
4656
|
}, [
|
|
4650
|
-
t(
|
|
4651
|
-
t(
|
|
4652
|
-
(
|
|
4653
|
-
key:
|
|
4654
|
-
}, l(
|
|
4657
|
+
t(I) ? (v(), p("div", Md, l(t(I)), 1)) : O("", !0),
|
|
4658
|
+
t(x).ok ? O("", !0) : (v(), p("ul", Cd, [
|
|
4659
|
+
(v(!0), p(J, null, ne(t(x).errors, (m) => (v(), p("li", {
|
|
4660
|
+
key: m.path
|
|
4661
|
+
}, l(m.path) + ":" + l(m.message), 1))), 128))
|
|
4655
4662
|
])),
|
|
4656
|
-
t(U) === "design" && t(
|
|
4663
|
+
t(U) === "design" && t(x).ok ? (v(), xe(ua, {
|
|
4657
4664
|
key: 2,
|
|
4658
|
-
document: t(
|
|
4665
|
+
document: t(w),
|
|
4659
4666
|
selection: t(Z),
|
|
4660
4667
|
selections: t(oe).selections.value,
|
|
4661
4668
|
locked: t(oe).locked,
|
|
@@ -4664,11 +4671,11 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4664
4671
|
datasets: e.datasets,
|
|
4665
4672
|
disabled: t(ie) || ke.value || t(f).isToolPending("rules"),
|
|
4666
4673
|
messages: t(d),
|
|
4667
|
-
onSelect: t(
|
|
4674
|
+
onSelect: t(Fe),
|
|
4668
4675
|
onGeometry: t(oe).geometry,
|
|
4669
4676
|
onColumn: t(X).activate,
|
|
4670
|
-
onWidth:
|
|
4671
|
-
}, null, 8, ["document", "selection", "selections", "locked", "active-column-index", "page-index", "datasets", "disabled", "messages", "onSelect", "onGeometry", "onColumn"])) : t(G) && t(
|
|
4677
|
+
onWidth: y[64] || (y[64] = (m, te) => t(f).setColumn(m, "widthMm", String(te)))
|
|
4678
|
+
}, null, 8, ["document", "selection", "selections", "locked", "active-column-index", "page-index", "datasets", "disabled", "messages", "onSelect", "onGeometry", "onColumn"])) : t(G) && t(x).ok ? (v(), xe(t(sn), {
|
|
4672
4679
|
key: 3,
|
|
4673
4680
|
"report-id": "draft",
|
|
4674
4681
|
fetcher: t(G),
|
|
@@ -4680,12 +4687,12 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4680
4687
|
editable: !1,
|
|
4681
4688
|
"excel-import": !1,
|
|
4682
4689
|
height: "100%"
|
|
4683
|
-
}, null, 8, ["fetcher", "messages"])) : (
|
|
4684
|
-
], 8, xd)) :
|
|
4690
|
+
}, null, 8, ["fetcher", "messages"])) : (v(), p("p", $d, l(t(d).invalid), 1))
|
|
4691
|
+
], 8, xd)) : O("", !0)
|
|
4685
4692
|
], 2)
|
|
4686
4693
|
], 8, Pi));
|
|
4687
4694
|
}
|
|
4688
|
-
}),
|
|
4695
|
+
}), Od = /* @__PURE__ */ Ie(Sd, [["__scopeId", "data-v-e7f26b87"]]), Fd = {
|
|
4689
4696
|
cancel: "取消检查",
|
|
4690
4697
|
cancelled: "本次检查已取消,没有替换上次结果。",
|
|
4691
4698
|
progress: "组样例已检查",
|
|
@@ -4878,6 +4885,14 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
4878
4885
|
pending: "未应用配置",
|
|
4879
4886
|
detail: "主从",
|
|
4880
4887
|
matrix: "矩阵",
|
|
4888
|
+
matrixHierarchy: "层级维度与小计",
|
|
4889
|
+
matrixHierarchyHint: "分列展示行维度,生成合并列标题。小计直接统计原始样本;空值与空字符串分别保留。",
|
|
4890
|
+
matrixSort: "同级排序",
|
|
4891
|
+
matrixSourceOrder: "来源顺序",
|
|
4892
|
+
matrixAscending: "升序",
|
|
4893
|
+
matrixDescending: "降序",
|
|
4894
|
+
matrixPrefixSubtotal: "此级小计",
|
|
4895
|
+
matrixEmptyLabel: "空维度显示",
|
|
4881
4896
|
tree: "树形",
|
|
4882
4897
|
treeInput: "输入结构",
|
|
4883
4898
|
treeFlat: "扁平父子表",
|
|
@@ -5138,22 +5153,22 @@ const Pi = ["aria-label", "aria-busy"], Li = { class: "mr-designer-bar" }, Di =
|
|
|
5138
5153
|
missing: "模板不存在或已不可访问",
|
|
5139
5154
|
stale: "目录返回了重复项或无效分页游标",
|
|
5140
5155
|
invalid: "模板目录响应格式无效"
|
|
5141
|
-
}, Wd = be(() => import("./TemplateReviewPanel-
|
|
5156
|
+
}, Wd = be(() => import("./TemplateReviewPanel-B1OGRY2i.js")), Jd = be(() => import("./ExcelBindingWizard-Co1svTsw.js")), Kd = be(() => import("./RuleEditor-DkRjOLlr.js")), Ud = be(() => import("./ParamEditor-DNNARyeB.js")), qd = be(() => import("./ReportBatchPanel-uQh06usx.js")), Yd = be(() => import("./ReportTemplateLibrary-TIL_Oj2l.js")), Xd = be(() => import("./TemplateOutlinePanel-BouxsuqQ.js")), Zd = be(() => import("./TemplateReusePanel-BEACLPaN.js"));
|
|
5142
5157
|
export {
|
|
5143
5158
|
Gd as D,
|
|
5144
5159
|
Bd as E,
|
|
5145
5160
|
jd as P,
|
|
5146
5161
|
zd as R,
|
|
5147
|
-
|
|
5162
|
+
Fd as T,
|
|
5148
5163
|
Vd as a,
|
|
5149
5164
|
kl as b,
|
|
5150
5165
|
Jd as c,
|
|
5151
5166
|
Ud as d,
|
|
5152
5167
|
qd as e,
|
|
5153
|
-
|
|
5168
|
+
Od as f,
|
|
5154
5169
|
Yd as g,
|
|
5155
5170
|
Kd as h,
|
|
5156
|
-
|
|
5171
|
+
Oe as i,
|
|
5157
5172
|
Tl as j,
|
|
5158
5173
|
Xd as k,
|
|
5159
5174
|
Zd as l,
|