@agile-team/mach-report 2.26.0 → 2.26.1
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 +4 -2
- package/dist/{ExcelBindingWizard-B418l44t.js → ExcelBindingWizard-Bzndrp_z.js} +1 -1
- package/dist/{ExcelBindingWizard-C4FGVsY_.cjs → ExcelBindingWizard-D1LZxm93.cjs} +1 -1
- package/dist/{ParamEditor-BemJE8n8.cjs → ParamEditor-BTIx9UDt.cjs} +1 -1
- package/dist/{ParamEditor-XvMtf_XQ.js → ParamEditor-BrUrInJH.js} +1 -1
- package/dist/{ReportBatchPanel-Ds0R_uXn.js → ReportBatchPanel-2mXS1uol.js} +1 -1
- package/dist/{ReportBatchPanel-CbY4fvXD.cjs → ReportBatchPanel-CU2BbpBg.cjs} +1 -1
- package/dist/{ReportLabelStudio-ZFy79eRv.js → ReportLabelStudio-BUKNmYUY.js} +182 -182
- package/dist/ReportLabelStudio-BXKE0GVs.cjs +1 -0
- package/dist/{ReportTemplateLibrary-XJVoTDIz.js → ReportTemplateLibrary-ovj03u0F.js} +1 -1
- package/dist/{ReportTemplateLibrary-C6lByc69.cjs → ReportTemplateLibrary-tv1sNa78.cjs} +1 -1
- package/dist/{RuleEditor-CeNFPeOc.js → RuleEditor-4JTKq_N7.js} +1 -1
- package/dist/{RuleEditor-gggUkEwB.cjs → RuleEditor-CvyjPyR6.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-BWN4Y9iz.js → TemplateOutlinePanel-DfFRc91I.js} +1 -1
- package/dist/{TemplateOutlinePanel-B0e-umq2.cjs → TemplateOutlinePanel-hb8cKkKR.cjs} +1 -1
- package/dist/{TemplateReusePanel-Cthig1S1.cjs → TemplateReusePanel-CR5jF00y.cjs} +1 -1
- package/dist/{TemplateReusePanel-CR-4OHoU.js → TemplateReusePanel-CmX1rq69.js} +1 -1
- package/dist/{TemplateReviewPanel-BkWzyNL4.js → TemplateReviewPanel-BKMo7Qd7.js} +1 -1
- package/dist/{TemplateReviewPanel-D8o2gDaK.cjs → TemplateReviewPanel-BU35FHwG.cjs} +1 -1
- package/dist/artifact-integrity.json +26 -26
- package/dist/designer-CEMTZomv.cjs +2 -0
- package/dist/{designer-CT4mlrr0.js → designer-_IKm_n5N.js} +2050 -2045
- package/dist/designer.cjs +1 -1
- package/dist/designer.js +1 -1
- package/dist/sbom.cdx.json +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/ReportLabelStudio-DuTwN5er.cjs +0 -1
- package/dist/designer-COuSUxZ1.cjs +0 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as b, shallowRef as
|
|
1
|
+
import { computed as b, shallowRef as Le, ref as R, onMounted as vt, onScopeDispose as Ye, watch as ee, defineComponent as pt, markRaw as bt, nextTick as gt, openBlock as w, createElementBlock as k, unref as t, normalizeStyle as ht, normalizeClass as He, createElementVNode as r, createVNode as be, toDisplayString as c, createTextVNode as _, Fragment as ge, renderList as Te, createCommentVNode as E, withDirectives as G, isRef as se, vModelText as ke, vModelSelect as yt, withKeys as wt, withModifiers as St, createBlock as Ke, withCtx as Mt, vModelCheckbox as Ct, vShow as Ue, resolveDynamicComponent as kt } from "vue";
|
|
2
2
|
import { useMachReport as _t, provideMachReportConfig as Lt, ReportPreview as Rt } from "@agile-team/mach-report/vue";
|
|
3
3
|
import { a as he } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
4
|
-
import { L as Dt, g as Ft, u as Et, h as Nt } from "./designer-
|
|
5
|
-
import { defineReportTemplate as xt, createLabelTemplate as Tt, parseReportTemplate as T, serializeReportTemplate as
|
|
6
|
-
import { z as
|
|
4
|
+
import { L as Dt, g as Ft, u as Et, h as Nt } from "./designer-_IKm_n5N.js";
|
|
5
|
+
import { defineReportTemplate as xt, createLabelTemplate as Tt, parseReportTemplate as T, serializeReportTemplate as _e, createReportSource as Vt, defineLabelReport as Ot, inspectReportTemplateCompatibility as $t, imposeLabelSheets as It } from "@agile-team/mach-report";
|
|
6
|
+
import { z as je } from "./diagnostic-collector-C-JBA016.js";
|
|
7
7
|
function Pt() {
|
|
8
8
|
let e;
|
|
9
9
|
const s = () => e ??= import("@agile-team/mach-report/codes").then((i) => i.createCodeAssetRenderers()).catch((i) => {
|
|
10
10
|
throw e = void 0, i;
|
|
11
11
|
}), o = (i) => async (u) => {
|
|
12
|
-
|
|
12
|
+
je(u.signal);
|
|
13
13
|
const d = await s();
|
|
14
|
-
return
|
|
14
|
+
return je(u.signal), d[i](u);
|
|
15
15
|
};
|
|
16
16
|
return { assetRenderers: { barcode: o("barcode"), qrcode: o("qrcode") } };
|
|
17
17
|
}
|
|
@@ -22,15 +22,15 @@ function zt(e) {
|
|
|
22
22
|
if (!(o < 1 || i < 1 || o * i > 1e3))
|
|
23
23
|
return { paper: "a4", columns: o, rows: i, marginMm: 12, gapMm: 4, capacity: o * i };
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const Re = [
|
|
26
26
|
{ id: "material", widthMm: 80, heightMm: 55, faces: 1 },
|
|
27
27
|
{ id: "paired", widthMm: 80, heightMm: 55, faces: 2 },
|
|
28
28
|
{ id: "warehouse", widthMm: 100, heightMm: 60, faces: 1 }
|
|
29
29
|
];
|
|
30
|
-
function
|
|
30
|
+
function Ze(e, s) {
|
|
31
31
|
return s ?? e.fields.find((o) => o.semanticRole === "identifier" && o.field !== e.rowKey)?.field ?? e.rowKey ?? e.fields[0]?.field;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Fe(e, s, o) {
|
|
34
34
|
const i = e.fields.filter((a) => a.field !== s && a.field !== e.rowKey);
|
|
35
35
|
if (o === void 0)
|
|
36
36
|
return i.map((a, l) => ({ field: a, index: l, priority: Jt(a) })).sort((a, l) => a.priority - l.priority || a.index - l.index).slice(0, 5).map((a) => a.field);
|
|
@@ -46,9 +46,9 @@ function Jt(e) {
|
|
|
46
46
|
return /^(?:name|title|label|category)$/i.test(e.field) || /名称|品名|品类|类别/.test(e.label ?? "") ? 0 : e.semanticRole === "dimension" ? 1 : e.semanticRole === "measure" && e.unit ? 2 : e.semanticRole === "identifier" ? 3 : e.semanticRole === "date" ? 4 : 5;
|
|
47
47
|
}
|
|
48
48
|
function At(e = "paired") {
|
|
49
|
-
return
|
|
49
|
+
return Re.find((s) => s.id === e) ?? Re[1];
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const Oe = "#173450", Ee = "#586c82";
|
|
52
52
|
function B(e, s, o, i, u = 4, d = 7) {
|
|
53
53
|
return {
|
|
54
54
|
kind: "text",
|
|
@@ -57,10 +57,10 @@ function B(e, s, o, i, u = 4, d = 7) {
|
|
|
57
57
|
topMm: o,
|
|
58
58
|
widthMm: i,
|
|
59
59
|
heightMm: u,
|
|
60
|
-
style: { fontSize: d, lineHeight: 1.1, color:
|
|
60
|
+
style: { fontSize: d, lineHeight: 1.1, color: Oe, verticalAlign: "middle" }
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function $e(e, s) {
|
|
64
64
|
return {
|
|
65
65
|
kind: "line",
|
|
66
66
|
leftMm: 4,
|
|
@@ -70,7 +70,7 @@ function Oe(e, s) {
|
|
|
70
70
|
style: { lineColor: "#c9d7e5", lineWidthPt: 0.55 }
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function We(e, s, o) {
|
|
74
74
|
const i = [];
|
|
75
75
|
let u = 4;
|
|
76
76
|
if (o?.logoData) {
|
|
@@ -78,55 +78,55 @@ function Ze(e, s, o) {
|
|
|
78
78
|
throw new Error("标签Logo须使用PNG或JPEG图片数据");
|
|
79
79
|
i.push({ kind: "image", leftMm: 4, topMm: 3, widthMm: 12, heightMm: 7, imageData: o.logoData, meta: { labelBrandLogo: !0 } }), u = 19;
|
|
80
80
|
}
|
|
81
|
-
return i.push({ ...B(o?.name?.trim() || e, u, 3, s - u - 4, 5, 9), style: { fontSize: 9, color: "#205582" }, meta: { labelStudioRole: "brand-name" } }), o?.tagline?.trim() && i.push({ ...B(o.tagline.trim(), u, 8, s - u - 4, 3, 5.5), style: { fontSize: 5.5, color:
|
|
81
|
+
return i.push({ ...B(o?.name?.trim() || e, u, 3, s - u - 4, 5, 9), style: { fontSize: 9, color: "#205582" }, meta: { labelStudioRole: "brand-name" } }), o?.tagline?.trim() && i.push({ ...B(o.tagline.trim(), u, 8, s - u - 4, 3, 5.5), style: { fontSize: 5.5, color: Ee }, meta: { labelStudioRole: "brand-tagline" } }), i.push($e(12, s)), i;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Xe(e, s, o, i, u = 4.7) {
|
|
84
84
|
return e.flatMap((d, a) => {
|
|
85
85
|
const l = s + a * u;
|
|
86
86
|
return [
|
|
87
|
-
{ ...B(d.label ?? d.field, 4, l, o, 4, 6), style: { fontSize: 6, color:
|
|
87
|
+
{ ...B(d.label ?? d.field, 4, l, o, 4, 6), style: { fontSize: 6, color: Ee }, meta: { labelStudioRole: "field-label", labelStudioField: d.field } },
|
|
88
88
|
{ ...B("", 4 + o, l, i, 4, 7), binding: { field: d.field, ...d.format ? { format: d.format } : {} }, meta: { labelStudioRole: "field-value", labelStudioField: d.field } }
|
|
89
89
|
];
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
function qt(e, s) {
|
|
93
|
-
return e ? [{ ...B("", 4, 14, s, 7, 14), binding: { field: e }, style: { fontSize: 14, color:
|
|
93
|
+
return e ? [{ ...B("", 4, 14, s, 7, 14), binding: { field: e }, style: { fontSize: 14, color: Oe } }] : [];
|
|
94
94
|
}
|
|
95
95
|
function Bt(e, s, o, i) {
|
|
96
|
-
const u =
|
|
97
|
-
...
|
|
96
|
+
const u = Fe(e, o, i.fields), d = [
|
|
97
|
+
...We(s, 80, i.brand),
|
|
98
98
|
...qt(o, 71),
|
|
99
|
-
...
|
|
99
|
+
...Xe(u, 23, 21, 27)
|
|
100
100
|
];
|
|
101
|
-
o && d.push({ kind: "qrcode", leftMm: 55, topMm: 23, widthMm: 20, heightMm: 20, binding: { field: o }, code: { quietZoneModules: 4, errorCorrection: "M" } }), d.push(
|
|
101
|
+
o && d.push({ kind: "qrcode", leftMm: 55, topMm: 23, widthMm: 20, heightMm: 20, binding: { field: o }, code: { quietZoneModules: 4, errorCorrection: "M" } }), d.push($e(48, 80));
|
|
102
102
|
const a = e.fields.find((l) => l.field === o)?.label ?? s;
|
|
103
|
-
return d.push({ ...B(a, 4, 49, 71, 3, 5.8), style: { fontSize: 5.8, color:
|
|
103
|
+
return d.push({ ...B(a, 4, 49, 71, 3, 5.8), style: { fontSize: 5.8, color: Ee } }), d;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
const d =
|
|
107
|
-
o && (d.push({ ...B("", 4, 14, u - 8, 8, 16), binding: { field: o }, style: { fontSize: 16, align: "center", color:
|
|
108
|
-
const a =
|
|
105
|
+
function Ge(e, s, o, i, u = 80) {
|
|
106
|
+
const d = We(s, u, i.brand);
|
|
107
|
+
o && (d.push({ ...B("", 4, 14, u - 8, 8, 16), binding: { field: o }, style: { fontSize: 16, align: "center", color: Oe } }), d.push({ kind: "qrcode", leftMm: (u - 20) / 2, topMm: 23, widthMm: 20, heightMm: 20, binding: { field: o }, code: { quietZoneModules: 4, errorCorrection: "M" } })), d.push($e(44, u));
|
|
108
|
+
const a = Fe(e, o, i.fields);
|
|
109
109
|
return u === 100 ? a.forEach((l, S) => {
|
|
110
110
|
const h = S % 2 === 0 ? 4 : 52, v = 46 + Math.floor(S / 2) * 4.3;
|
|
111
|
-
d.push({ ...B(l.label ?? l.field, h, v, 19, 3.7, 5.8), style: { fontSize: 5.8, color:
|
|
112
|
-
}) : d.push(...
|
|
111
|
+
d.push({ ...B(l.label ?? l.field, h, v, 19, 3.7, 5.8), style: { fontSize: 5.8, color: Ee }, meta: { labelStudioRole: "field-label", labelStudioField: l.field } }), d.push({ ...B("", h + 19, v, 25, 3.7, 6.5), binding: { field: l.field, ...l.format ? { format: l.format } : {} }, meta: { labelStudioRole: "field-value", labelStudioField: l.field } });
|
|
112
|
+
}) : d.push(...Xe(a.slice(0, 1), 46, 24, u - 32, 5)), d;
|
|
113
113
|
}
|
|
114
114
|
function ye(e, s, o, i = {}, u) {
|
|
115
|
-
const d =
|
|
115
|
+
const d = Ze(e, o), a = At(i.preset), l = Object.fromEntries(["name", "tagline"].flatMap((g) => {
|
|
116
116
|
const M = i.brand?.[g];
|
|
117
117
|
return typeof M == "string" ? [[g, M]] : [];
|
|
118
|
-
})), S = { preset: a.id, brand: l, fields:
|
|
119
|
-
return a.faces === 2 && v.push({ widthMm: a.widthMm, heightMm: a.heightMm, meta: { title: `${s} · 2`, labelStudio: S }, components:
|
|
118
|
+
})), S = { preset: a.id, brand: l, fields: Fe(e, d, i.fields).map((g) => g.field) }, h = a.id === "warehouse" ? Ge(e, s, d, i, a.widthMm) : Bt(e, s, d, i), v = [{ widthMm: a.widthMm, heightMm: a.heightMm, meta: { title: `${s} · 1`, labelStudio: S }, components: h }];
|
|
119
|
+
return a.faces === 2 && v.push({ widthMm: a.widthMm, heightMm: a.heightMm, meta: { title: `${s} · 2`, labelStudio: S }, components: Ge(e, s, d, i) }), xt({ id: "record-label", name: s, template: { ...Tt({ dataset: "records", rowKey: e.rowKey, pages: v }), ...u ? { dataContract: u } : {} } });
|
|
120
120
|
}
|
|
121
|
-
const z = (e) => e.meta?.labelStudioRole,
|
|
122
|
-
function
|
|
121
|
+
const z = (e) => e.meta?.labelStudioRole, Ve = (e) => typeof z(e) == "string";
|
|
122
|
+
function De(e) {
|
|
123
123
|
const s = { ...e, ...e.meta ? { meta: { ...e.meta } } : {} };
|
|
124
124
|
return s.meta && (delete s.meta.labelStudioRole, delete s.meta.labelStudioField, Object.keys(s.meta).length || delete s.meta), s;
|
|
125
125
|
}
|
|
126
126
|
function Ht(e, s) {
|
|
127
|
-
for (const o of s.components.filter(
|
|
127
|
+
for (const o of s.components.filter(Ve)) {
|
|
128
128
|
if (e.components.some((u) => z(u) === z(o) && u.meta?.labelStudioField === o.meta?.labelStudioField)) continue;
|
|
129
|
-
const i = e.components.find((u) => !
|
|
129
|
+
const i = e.components.find((u) => !Ve(u) && JSON.stringify(De(u)) === JSON.stringify(De(o)));
|
|
130
130
|
i && (i.meta = { ...i.meta, ...o.meta });
|
|
131
131
|
}
|
|
132
132
|
}
|
|
@@ -142,7 +142,7 @@ function jt(e, s, o, i) {
|
|
|
142
142
|
const u = i.has("field-value");
|
|
143
143
|
Ht(e, s);
|
|
144
144
|
const d = new Set(e.components.filter((v) => z(v) === "field-label" || z(v) === "field-value")), a = [...d], l = /* @__PURE__ */ new Map(), S = [];
|
|
145
|
-
for (const v of o.components.filter(
|
|
145
|
+
for (const v of o.components.filter(Ve)) {
|
|
146
146
|
const g = z(v);
|
|
147
147
|
if (!i.has(String(g))) continue;
|
|
148
148
|
const M = g === "field-label" || g === "field-value" ? a.find((D) => z(D) === g && !l.has(D)) : e.components.find((D) => z(D) === g);
|
|
@@ -168,7 +168,7 @@ function Qt(e, s) {
|
|
|
168
168
|
const o = e.template.pages, i = s.template.pages;
|
|
169
169
|
return o.length !== i.length || o.some((u, d) => u.components.length !== i[d].components.length) ? !0 : o.some((u, d) => {
|
|
170
170
|
const a = i[d], l = { ...u, meta: void 0, components: void 0 }, S = { ...a, meta: void 0, components: void 0 };
|
|
171
|
-
return JSON.stringify(l) !== JSON.stringify(S) || u.components.some((h, v) => JSON.stringify(
|
|
171
|
+
return JSON.stringify(l) !== JSON.stringify(S) || u.components.some((h, v) => JSON.stringify(De(h)) !== JSON.stringify(De(a.components[v])));
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
function Yt(e, s, o, i, u) {
|
|
@@ -178,7 +178,7 @@ function Yt(e, s, o, i, u) {
|
|
|
178
178
|
function P(e) {
|
|
179
179
|
const s = e.template.pages[0]?.meta?.labelStudio;
|
|
180
180
|
if (!s || typeof s != "object") return;
|
|
181
|
-
const o = s, i =
|
|
181
|
+
const o = s, i = Re.find((l) => l.id === o.preset);
|
|
182
182
|
if (!i) return;
|
|
183
183
|
const u = Array.isArray(o.fields) ? o.fields.filter((l) => typeof l == "string") : void 0;
|
|
184
184
|
if (u && u.length > 5) return;
|
|
@@ -187,79 +187,79 @@ function P(e) {
|
|
|
187
187
|
typeof d[l] == "string" && (a[l] = d[l]);
|
|
188
188
|
return { preset: i.id, fields: u, brand: a };
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Qe(e, s, o) {
|
|
191
191
|
const i = new Set(e.fields.filter((d) => d.field !== s && d.field !== e.rowKey).map((d) => d.field)), u = o?.filter((d) => i.has(d));
|
|
192
|
-
return
|
|
192
|
+
return Fe(e, s, u).map((d) => d.field);
|
|
193
193
|
}
|
|
194
194
|
function Zt(e, s) {
|
|
195
|
-
const o = _t(), i = b(() => ({ ...Dt, ...e.messages })), u = b(() => e.title ?? i.value.title), d = { preset: e.preset, brand: e.brand, fields: e.fields }, a =
|
|
195
|
+
const o = _t(), i = b(() => ({ ...Dt, ...e.messages })), u = b(() => e.title ?? i.value.title), d = { preset: e.preset, brand: e.brand, fields: e.fields }, a = Le(e.modelValue ? T(e.modelValue) : ye(e.schema, u.value, e.identityField, d, e.dataContract)), l = Le(T(a.value)), S = R(!1), h = Le();
|
|
196
196
|
let v, g;
|
|
197
197
|
vt(() => {
|
|
198
198
|
e.modelValue || s(T(a.value));
|
|
199
199
|
});
|
|
200
|
-
const M = R("preview"), D = R("all"), J = R(1),
|
|
201
|
-
const n =
|
|
202
|
-
return
|
|
203
|
-
}),
|
|
200
|
+
const M = R("preview"), D = R("all"), J = R(1), $ = R(!1), oe = R(!1), y = R(), Q = Ft(() => e.beforeDiscard), H = b(() => oe.value || Q.pending.value || S.value && !y.value || y.value?.saving === !0 || y.value?.blocked === !0 || o.state.printing || o.state.exporting !== null), L = R(""), te = b(() => Ze(e.schema, e.identityField)), I = R(P(a.value)?.preset ?? (e.modelValue ? void 0 : e.preset ?? "paired")), Y = R(P(a.value)?.brand?.name ?? e.brand?.name ?? ""), V = R(P(a.value)?.brand?.tagline ?? e.brand?.tagline ?? ""), F = R(Qe(e.schema, te.value, P(a.value)?.fields ?? e.fields)), ae = R(""), le = b(() => e.schema.fields.filter((n) => n.field !== te.value && n.field !== e.schema.rowKey)), ne = b(() => F.value.map((n) => ({ field: n, label: e.schema.fields.find((p) => p.field === n)?.label ?? n }))), re = b(() => {
|
|
201
|
+
const n = ae.value.trim().toLocaleLowerCase();
|
|
202
|
+
return le.value.filter((p) => `${p.label ?? ""} ${p.field}`.toLocaleLowerCase().includes(n)).slice(0, 30);
|
|
203
|
+
}), Z = b(() => {
|
|
204
204
|
const n = a.value.template.pages[0]?.components.find((p) => p.kind === "image" && p.meta?.labelBrandLogo);
|
|
205
205
|
return n?.kind === "image" ? n.imageData : e.brand?.logoData;
|
|
206
206
|
}), ue = b(() => ({
|
|
207
|
-
preset:
|
|
208
|
-
fields:
|
|
209
|
-
brand: { ...e.brand, ...
|
|
207
|
+
preset: I.value,
|
|
208
|
+
fields: F.value,
|
|
209
|
+
brand: { ...e.brand, ...Z.value ? { logoData: Z.value } : {}, name: Y.value, tagline: V.value }
|
|
210
210
|
}));
|
|
211
211
|
let de = JSON.stringify(P(a.value));
|
|
212
212
|
const ce = b(() => {
|
|
213
213
|
const n = P(a.value);
|
|
214
214
|
if (!n) return !0;
|
|
215
215
|
try {
|
|
216
|
-
const p = ye(e.schema, u.value, e.identityField, { ...n, brand: { ...n.brand, ...
|
|
216
|
+
const p = ye(e.schema, u.value, e.identityField, { ...n, brand: { ...n.brand, ...Z.value ? { logoData: Z.value } : {} } });
|
|
217
217
|
return Qt(a.value, p);
|
|
218
218
|
} catch {
|
|
219
219
|
return !0;
|
|
220
220
|
}
|
|
221
|
-
}), A = R(!1),
|
|
221
|
+
}), A = R(!1), W = b(() => I.value !== P(a.value)?.preset), X = () => JSON.stringify({ preset: I.value, fields: F.value, name: Y.value, tagline: V.value }), fe = R(X()), q = b(() => X() !== fe.value), me = b(() => _e(a.value)), Ne = b(() => _e(l.value)), ie = b(() => me.value !== Ne.value), we = b(() => q.value || ie.value || y.value?.pendingLocalChanges === !0);
|
|
222
222
|
function ve() {
|
|
223
223
|
A.value = !1;
|
|
224
224
|
const n = P(a.value);
|
|
225
|
-
|
|
225
|
+
I.value = n?.preset, F.value = Qe(e.schema, te.value, n?.fields ?? e.fields), Y.value = n?.brand?.name ?? e.brand?.name ?? "", V.value = n?.brand?.tagline ?? e.brand?.tagline ?? "", de = JSON.stringify(n), fe.value = X();
|
|
226
226
|
}
|
|
227
227
|
function Se(n) {
|
|
228
228
|
const p = P(n), C = JSON.stringify(p);
|
|
229
229
|
C !== de && (de = C, ve());
|
|
230
230
|
}
|
|
231
|
-
let
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
let O = !1;
|
|
232
|
+
Ye(() => {
|
|
233
|
+
O = !0, g?.abort();
|
|
234
234
|
});
|
|
235
|
-
const
|
|
235
|
+
const K = Pt();
|
|
236
236
|
Lt({ get defaults() {
|
|
237
|
-
return { ...e.preview, assets: { ...
|
|
238
|
-
} }),
|
|
237
|
+
return { ...e.preview, assets: { ...K, ...e.preview?.assets, assetRenderers: { ...K.assetRenderers, ...e.preview?.assets?.assetRenderers } } };
|
|
238
|
+
} }), ee(y, (n) => {
|
|
239
239
|
const p = h.value;
|
|
240
240
|
if (!n || !p) return;
|
|
241
241
|
const C = a.value;
|
|
242
|
-
|
|
243
|
-
}, { flush: "post" }),
|
|
242
|
+
_e(p) !== me.value && n.applyTemplate?.(C.template), h.value = void 0, v = void 0;
|
|
243
|
+
}, { flush: "post" }), ee([I, F, Y, V], () => {
|
|
244
244
|
A.value = !1;
|
|
245
|
-
}),
|
|
246
|
-
n &&
|
|
247
|
-
}),
|
|
245
|
+
}), ee(() => e.modelValue, (n) => {
|
|
246
|
+
n && _e(n) !== me.value && (a.value = T(n), l.value = T(n), v = void 0, Se(n));
|
|
247
|
+
}), ee(() => e.rows, () => {
|
|
248
248
|
D.value = "all", J.value = 1;
|
|
249
249
|
});
|
|
250
|
-
function
|
|
250
|
+
function U(n) {
|
|
251
251
|
L.value = "", a.value = n, Se(n), s(n);
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
p &&
|
|
253
|
+
function Me(n, p) {
|
|
254
|
+
p && F.value.length < 5 && !F.value.includes(n) ? F.value = [...F.value, n] : p || (F.value = F.value.filter((C) => C !== n));
|
|
255
255
|
}
|
|
256
|
-
function
|
|
257
|
-
if (H.value ||
|
|
258
|
-
if (
|
|
256
|
+
function j(n = !1) {
|
|
257
|
+
if (H.value || O) return !1;
|
|
258
|
+
if (!I.value)
|
|
259
259
|
return L.value = i.value.choosePreset, !1;
|
|
260
260
|
if (y.value?.canApply === !1)
|
|
261
261
|
return L.value = y.value.saveReason || i.value.applyFirst, !1;
|
|
262
|
-
if (
|
|
262
|
+
if (W.value && !n)
|
|
263
263
|
return A.value = !0, !1;
|
|
264
264
|
try {
|
|
265
265
|
const p = P(a.value);
|
|
@@ -270,23 +270,23 @@ function Zt(e, s) {
|
|
|
270
270
|
if (!y.value.applyTemplate(C.template))
|
|
271
271
|
return L.value = i.value.saveFailed, !1;
|
|
272
272
|
} else
|
|
273
|
-
v = T(a.value),
|
|
274
|
-
return A.value = !1, fe.value =
|
|
273
|
+
v = T(a.value), U(C);
|
|
274
|
+
return A.value = !1, fe.value = X(), !0;
|
|
275
275
|
} catch (p) {
|
|
276
276
|
return L.value = p instanceof Error ? p.message : i.value.saveFailed, !1;
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
const
|
|
279
|
+
const N = b(() => D.value === "all" ? e.rows : Number.isSafeInteger(J.value) && e.rows[J.value - 1] ? [e.rows[J.value - 1]] : []), f = b(() => a.value.template.repeat?.dataset ?? "records"), m = b(() => ({ [f.value]: N.value })), pe = b(() => ({ [f.value]: N.value.slice(0, 3) })), et = b(() => ({ [f.value]: e.schema })), tt = b(() => [{ id: f.value, label: u.value, rowKey: e.schema.rowKey, fields: e.schema.fields }]), at = b(() => a.value.template.pages[0]), Ie = b(() => a.value.template.pages.length), lt = b(() => {
|
|
280
280
|
const n = a.value.template.repeat?.copies ?? 1;
|
|
281
281
|
return typeof n == "number" ? n : void 0;
|
|
282
282
|
}), nt = b(() => {
|
|
283
283
|
const n = a.value.template.repeat?.copies;
|
|
284
284
|
return typeof n == "object" ? n.field : void 0;
|
|
285
|
-
}),
|
|
285
|
+
}), Pe = b(() => {
|
|
286
286
|
const n = nt.value;
|
|
287
287
|
if (!n) return;
|
|
288
288
|
let p = 0;
|
|
289
|
-
for (const C of
|
|
289
|
+
for (const C of N.value) {
|
|
290
290
|
const x = Object.getOwnPropertyDescriptor(C, n)?.value;
|
|
291
291
|
if (typeof x != "number" || !Number.isSafeInteger(x) || x < 1 || x > 1e3) return;
|
|
292
292
|
p += x;
|
|
@@ -294,35 +294,35 @@ function Zt(e, s) {
|
|
|
294
294
|
return p;
|
|
295
295
|
}), it = b(() => {
|
|
296
296
|
const n = lt.value;
|
|
297
|
-
return n !== void 0 ? Number.isSafeInteger(n) && n >= 1 && n <= 1e3 ?
|
|
298
|
-
}),
|
|
299
|
-
const n =
|
|
297
|
+
return n !== void 0 ? Number.isSafeInteger(n) && n >= 1 && n <= 1e3 ? N.value.length * n * Ie.value : void 0 : Pe.value === void 0 ? void 0 : Pe.value * Ie.value;
|
|
298
|
+
}), Ce = b(() => zt(a.value.template)), st = b(() => {
|
|
299
|
+
const n = Ce.value;
|
|
300
300
|
return n ? i.value.sheetHint.replace("{columns}", String(n.columns)).replace("{rows}", String(n.rows)).replace("{capacity}", String(n.capacity)) : i.value.sheetUnavailable;
|
|
301
301
|
});
|
|
302
|
-
|
|
303
|
-
n || (
|
|
302
|
+
ee(Ce, (n) => {
|
|
303
|
+
n || ($.value = !1);
|
|
304
304
|
});
|
|
305
305
|
const ot = b(() => {
|
|
306
|
-
const n = Vt({ labels: Ot({ template: a.value.template, rows:
|
|
306
|
+
const n = Vt({ labels: Ot({ template: a.value.template, rows: N.value, dataSchema: e.schema }) }), p = $.value ? Ce.value : void 0, C = e.dataContract ? $t(a.value.template, e.dataContract) : void 0;
|
|
307
307
|
return async (x) => {
|
|
308
308
|
if (C && !C.ok) throw new Error(C.issues.map((mt) => mt.message).join(";"));
|
|
309
|
-
const
|
|
310
|
-
return p ? It(
|
|
309
|
+
const Be = await n(x);
|
|
310
|
+
return p ? It(Be, { ...p, signal: x.signal }) : Be;
|
|
311
311
|
};
|
|
312
|
-
}),
|
|
313
|
-
if (
|
|
312
|
+
}), ze = async (n, p) => {
|
|
313
|
+
if (O || p.signal.aborted) throw new DOMException("标签模板保存已取消", "AbortError");
|
|
314
314
|
const C = T(n), x = T(e.save ? await e.save(C, p) : C);
|
|
315
315
|
if (x.id !== n.id) throw new Error(i.value.invalidSavedTemplate);
|
|
316
|
-
if (
|
|
317
|
-
return l.value = T(x),
|
|
316
|
+
if (O || p.signal.aborted) throw new DOMException("标签模板保存已取消", "AbortError");
|
|
317
|
+
return l.value = T(x), U(x), x;
|
|
318
318
|
};
|
|
319
|
-
async function
|
|
320
|
-
if (!(H.value ||
|
|
321
|
-
if (q.value &&
|
|
319
|
+
async function Je() {
|
|
320
|
+
if (!(H.value || O)) {
|
|
321
|
+
if (q.value && W.value) {
|
|
322
322
|
L.value = i.value.applyLayoutFirst;
|
|
323
323
|
return;
|
|
324
324
|
}
|
|
325
|
-
if (!(q.value && !
|
|
325
|
+
if (!(q.value && !j())) {
|
|
326
326
|
oe.value = !0;
|
|
327
327
|
try {
|
|
328
328
|
if (y.value) {
|
|
@@ -334,60 +334,60 @@ function Zt(e, s) {
|
|
|
334
334
|
L.value = i.value.saveFailed;
|
|
335
335
|
return;
|
|
336
336
|
}
|
|
337
|
-
} else
|
|
338
|
-
if (!
|
|
337
|
+
} else ie.value && (g = new AbortController(), await ze(a.value, { expectedRevision: a.value.revision, signal: g.signal }), v = void 0);
|
|
338
|
+
if (!O)
|
|
339
339
|
return L.value = "", T(a.value);
|
|
340
340
|
} catch (n) {
|
|
341
|
-
|
|
341
|
+
O || (L.value = n instanceof Error ? n.message : i.value.saveFailed);
|
|
342
342
|
} finally {
|
|
343
343
|
oe.value = !1, g = void 0;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
async function
|
|
348
|
+
async function Ae(n) {
|
|
349
349
|
if (!(H.value || n === M.value))
|
|
350
350
|
if (n === "design" && !S.value) {
|
|
351
|
-
if (q.value &&
|
|
351
|
+
if (q.value && W.value) {
|
|
352
352
|
L.value = i.value.applyLayoutFirst;
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
|
-
if (q.value && !
|
|
355
|
+
if (q.value && !j()) return;
|
|
356
356
|
h.value = v, S.value = !0, M.value = n;
|
|
357
|
-
} else await
|
|
357
|
+
} else await Je() && (M.value = n);
|
|
358
358
|
}
|
|
359
359
|
function rt(n) {
|
|
360
360
|
S.value = !1, M.value = "preview", L.value = `${i.value.designLoadFailed} ${n instanceof Error ? n.message : String(n)}`;
|
|
361
361
|
}
|
|
362
|
-
let
|
|
363
|
-
const ut = (n) =>
|
|
362
|
+
let xe = !1;
|
|
363
|
+
const ut = (n) => xe || Q.request(n);
|
|
364
364
|
async function dt() {
|
|
365
365
|
if (H.value) return !1;
|
|
366
366
|
const n = y.value?.pendingLocalChanges === !0;
|
|
367
|
-
if (!n && !
|
|
368
|
-
if (!(n && y.value ? await y.value.guardChanges() : await
|
|
367
|
+
if (!n && !ie.value && !q.value) return !0;
|
|
368
|
+
if (!(n && y.value ? await y.value.guardChanges() : await Q.request({ reason: "replace", document: T(a.value), pendingLocalChanges: !0 })) || O) return !1;
|
|
369
369
|
if (n && y.value) {
|
|
370
|
-
|
|
370
|
+
xe = !0;
|
|
371
371
|
try {
|
|
372
372
|
await y.value.reset();
|
|
373
373
|
} finally {
|
|
374
|
-
|
|
374
|
+
xe = !1;
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
return
|
|
377
|
+
return U(T(l.value)), v = void 0, ve(), !0;
|
|
378
378
|
}
|
|
379
|
-
const
|
|
379
|
+
const qe = b(() => M.value === "preview" && !H.value && o.state.canPrint);
|
|
380
380
|
async function ct() {
|
|
381
|
-
return await
|
|
381
|
+
return await Ae("preview"), !O && M.value === "preview";
|
|
382
382
|
}
|
|
383
383
|
async function ft() {
|
|
384
|
-
|
|
384
|
+
qe.value && await o.print();
|
|
385
385
|
}
|
|
386
|
-
return { m: i, notice: L, title: u, document: a, mode: M, preview: o, showPreview: ct, print: ft, canPrint:
|
|
386
|
+
return { m: i, notice: L, title: u, document: a, mode: M, preview: o, showPreview: ct, print: ft, canPrint: qe, editorVisited: S, editorInitialDocument: h, failDesignLoad: rt, sheetLayout: Ce, sheetHint: st, rebuilding: A, layoutChanged: W, record: D, recordIndex: J, sheet: $, busy: H, editor: y, rows: N, datasets: m, designDatasets: pe, schemas: et, bindings: tt, paper: at, labelCount: it, fetcher: ot, update: U, save: ze, navigate: Ae, prepare: Je, guardChanges: dt, preset: I, presets: Re, brandName: Y, brandTagline: V, fields: F, fieldQuery: ae, selectedFields: ne, availableFields: re, fieldCount: b(() => le.value.length), configurationDirty: q, pendingLocalChanges: we, custom: ce, toggleField: Me, applyConfiguration: j, requestRebuild: () => {
|
|
387
387
|
A.value = !0;
|
|
388
388
|
}, cancelRebuild: () => {
|
|
389
389
|
A.value = !1;
|
|
390
|
-
}, restoreConfiguration: ve, beforeDiscard: ut, confirmation:
|
|
390
|
+
}, restoreConfiguration: ve, beforeDiscard: ut, confirmation: Q.confirmation, decideDiscard: Q.decide };
|
|
391
391
|
}
|
|
392
392
|
const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr-label-identity" }, ta = { class: "mr-label-spec" }, aa = ["disabled"], la = ["aria-label"], na = ["aria-pressed", "onClick"], ia = { class: "mr-label-fields" }, sa = {
|
|
393
393
|
key: 0,
|
|
@@ -433,33 +433,33 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
433
433
|
},
|
|
434
434
|
emits: ["update:modelValue"],
|
|
435
435
|
setup(e, { expose: s, emit: o }) {
|
|
436
|
-
const i = e, u = Et(() => i.preview?.theme), d = o, a = Zt(i, (
|
|
437
|
-
let
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
}),
|
|
441
|
-
if (!(!
|
|
436
|
+
const i = e, u = Et(() => i.preview?.theme), d = o, a = Zt(i, (N) => d("update:modelValue", N)), { m: l, notice: S, title: h, document: v, mode: g, record: M, recordIndex: D, sheet: J, busy: $, editor: oe, rows: y, designDatasets: Q, schemas: H, bindings: L, paper: te, labelCount: I, fetcher: Y, preset: V, presets: F, brandName: ae, brandTagline: le, fields: ne, fieldQuery: re, selectedFields: Z, availableFields: ue, fieldCount: de, configurationDirty: ce, pendingLocalChanges: A, custom: W, confirmation: X, editorVisited: fe, editorInitialDocument: q, sheetLayout: me, sheetHint: Ne, rebuilding: ie, layoutChanged: we } = a, { previewVisited: ve, visibleFetcher: Se, previewRefresh: O } = Nt(v, g, Y), K = Le();
|
|
437
|
+
let U = !1;
|
|
438
|
+
Ye(() => {
|
|
439
|
+
U = !0;
|
|
440
|
+
}), ee(a.editorVisited, async (N) => {
|
|
441
|
+
if (!(!N || K.value))
|
|
442
442
|
try {
|
|
443
|
-
const f = await import("./designer-
|
|
444
|
-
|
|
443
|
+
const f = await import("./designer-_IKm_n5N.js").then((m) => m.B);
|
|
444
|
+
U || (K.value = bt(f.default));
|
|
445
445
|
} catch (f) {
|
|
446
|
-
|
|
446
|
+
U || a.failDesignLoad(f);
|
|
447
447
|
}
|
|
448
448
|
});
|
|
449
|
-
const
|
|
450
|
-
let
|
|
451
|
-
return
|
|
452
|
-
|
|
449
|
+
const Me = R();
|
|
450
|
+
let j = null;
|
|
451
|
+
return ee(X, async (N) => {
|
|
452
|
+
N ? (j = window.document.activeElement, await gt(), Me.value?.focus()) : j?.isConnected && (j.focus(), j = null);
|
|
453
453
|
}), s({ guardChanges: a.guardChanges, prepare: a.prepare, preview: a.showPreview, print: a.print, get mode() {
|
|
454
454
|
return g.value;
|
|
455
455
|
}, get canPrint() {
|
|
456
456
|
return a.canPrint.value;
|
|
457
457
|
}, get busy() {
|
|
458
|
-
return
|
|
458
|
+
return $.value;
|
|
459
459
|
}, get pendingLocalChanges() {
|
|
460
460
|
return A.value;
|
|
461
|
-
} }), (
|
|
462
|
-
class:
|
|
461
|
+
} }), (N, f) => (w(), k("section", {
|
|
462
|
+
class: He(["mr-label-studio", { "is-design": t(g) === "design" }]),
|
|
463
463
|
style: ht(t(u)),
|
|
464
464
|
"aria-label": t(h)
|
|
465
465
|
}, [
|
|
@@ -470,33 +470,33 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
470
470
|
size: 18
|
|
471
471
|
}),
|
|
472
472
|
r("strong", null, c(t(h)), 1),
|
|
473
|
-
r("small", null, c(t(
|
|
473
|
+
r("small", null, c(t(W) ? t(l).customTemplate : t(l).readyTemplate), 1)
|
|
474
474
|
]),
|
|
475
475
|
r("div", ta, [
|
|
476
476
|
r("strong", null, [
|
|
477
|
-
_(c(t(
|
|
477
|
+
_(c(t(te)?.widthMm) + " ", 1),
|
|
478
478
|
f[16] || (f[16] = r("i", null, "×", -1)),
|
|
479
|
-
_(" " + c(t(
|
|
479
|
+
_(" " + c(t(te)?.heightMm), 1)
|
|
480
480
|
]),
|
|
481
481
|
r("span", null, "mm · " + c(t(v).template.pages.length) + " " + c(t(l).faces), 1)
|
|
482
482
|
]),
|
|
483
483
|
r("fieldset", {
|
|
484
484
|
class: "mr-label-quick",
|
|
485
|
-
disabled: t(
|
|
485
|
+
disabled: t($)
|
|
486
486
|
}, [
|
|
487
487
|
r("legend", null, c(t(l).layout), 1),
|
|
488
488
|
r("div", {
|
|
489
489
|
class: "mr-label-presets",
|
|
490
490
|
"aria-label": t(l).layout
|
|
491
491
|
}, [
|
|
492
|
-
(w(!0), k(ge, null,
|
|
492
|
+
(w(!0), k(ge, null, Te(t(F), (m) => (w(), k("button", {
|
|
493
493
|
key: m.id,
|
|
494
494
|
type: "button",
|
|
495
495
|
"aria-pressed": t(V) === m.id,
|
|
496
496
|
onClick: (pe) => V.value = m.id
|
|
497
497
|
}, [
|
|
498
498
|
r("span", {
|
|
499
|
-
class:
|
|
499
|
+
class: He(["mr-label-preset-art", `is-${m.id}`]),
|
|
500
500
|
"aria-hidden": "true"
|
|
501
501
|
}, [...f[17] || (f[17] = [
|
|
502
502
|
r("i", null, null, -1),
|
|
@@ -512,10 +512,10 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
512
512
|
r("details", ia, [
|
|
513
513
|
r("summary", null, [
|
|
514
514
|
_(c(t(l).fields) + " ", 1),
|
|
515
|
-
r("span", null, c(t(
|
|
515
|
+
r("span", null, c(t(ne).length) + " / 5", 1)
|
|
516
516
|
]),
|
|
517
|
-
t(
|
|
518
|
-
(w(!0), k(ge, null,
|
|
517
|
+
t(Z).length ? (w(), k("div", sa, [
|
|
518
|
+
(w(!0), k(ge, null, Te(t(Z), (m) => (w(), k("button", {
|
|
519
519
|
key: m.field,
|
|
520
520
|
type: "button",
|
|
521
521
|
"aria-label": `${t(l).removeField} ${m.label}`,
|
|
@@ -524,57 +524,57 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
524
524
|
_(c(m.label) + " ", 1),
|
|
525
525
|
f[18] || (f[18] = r("span", { "aria-hidden": "true" }, "×", -1))
|
|
526
526
|
], 8, oa))), 128))
|
|
527
|
-
])) :
|
|
527
|
+
])) : E("", !0),
|
|
528
528
|
r("label", ra, [
|
|
529
529
|
be(he, {
|
|
530
530
|
name: "search",
|
|
531
531
|
size: 13
|
|
532
532
|
}),
|
|
533
|
-
|
|
533
|
+
G(r("input", {
|
|
534
534
|
"onUpdate:modelValue": f[0] || (f[0] = (m) => se(re) ? re.value = m : null),
|
|
535
535
|
type: "search",
|
|
536
536
|
"aria-label": t(l).findField,
|
|
537
537
|
placeholder: t(l).findField
|
|
538
538
|
}, null, 8, ua), [
|
|
539
|
-
[
|
|
539
|
+
[ke, t(re)]
|
|
540
540
|
])
|
|
541
541
|
]),
|
|
542
542
|
r("div", da, [
|
|
543
|
-
(w(!0), k(ge, null,
|
|
543
|
+
(w(!0), k(ge, null, Te(t(ue), (m) => (w(), k("label", {
|
|
544
544
|
key: m.field
|
|
545
545
|
}, [
|
|
546
546
|
r("input", {
|
|
547
547
|
type: "checkbox",
|
|
548
|
-
checked: t(
|
|
549
|
-
disabled: !t(
|
|
548
|
+
checked: t(ne).includes(m.field),
|
|
549
|
+
disabled: !t(ne).includes(m.field) && t(ne).length >= 5,
|
|
550
550
|
onChange: (pe) => t(a).toggleField(m.field, pe.target.checked)
|
|
551
551
|
}, null, 40, ca),
|
|
552
552
|
r("span", null, c(m.label ?? m.field), 1)
|
|
553
553
|
]))), 128)),
|
|
554
|
-
t(ue).length ?
|
|
554
|
+
t(ue).length ? E("", !0) : (w(), k("p", fa, c(t(l).noFields), 1))
|
|
555
555
|
]),
|
|
556
556
|
r("small", null, c(t(l).fieldLimit), 1),
|
|
557
|
-
t(de) > 30 ? (w(), k("small", ma, c(t(l).fieldSearchHint), 1)) :
|
|
557
|
+
t(de) > 30 ? (w(), k("small", ma, c(t(l).fieldSearchHint), 1)) : E("", !0)
|
|
558
558
|
]),
|
|
559
559
|
r("details", va, [
|
|
560
560
|
r("summary", null, c(t(l).brand), 1),
|
|
561
561
|
r("label", null, [
|
|
562
562
|
_(c(t(l).brandName), 1),
|
|
563
|
-
|
|
564
|
-
"onUpdate:modelValue": f[1] || (f[1] = (m) => se(
|
|
563
|
+
G(r("input", {
|
|
564
|
+
"onUpdate:modelValue": f[1] || (f[1] = (m) => se(ae) ? ae.value = m : null),
|
|
565
565
|
maxlength: "80",
|
|
566
566
|
placeholder: t(h)
|
|
567
567
|
}, null, 8, pa), [
|
|
568
|
-
[
|
|
568
|
+
[ke, t(ae)]
|
|
569
569
|
])
|
|
570
570
|
]),
|
|
571
571
|
r("label", null, [
|
|
572
572
|
_(c(t(l).brandTagline), 1),
|
|
573
|
-
|
|
574
|
-
"onUpdate:modelValue": f[2] || (f[2] = (m) => se(
|
|
573
|
+
G(r("input", {
|
|
574
|
+
"onUpdate:modelValue": f[2] || (f[2] = (m) => se(le) ? le.value = m : null),
|
|
575
575
|
maxlength: "120"
|
|
576
576
|
}, null, 512), [
|
|
577
|
-
[
|
|
577
|
+
[ke, t(le)]
|
|
578
578
|
])
|
|
579
579
|
])
|
|
580
580
|
]),
|
|
@@ -590,14 +590,14 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
590
590
|
}),
|
|
591
591
|
_(c(t(we) ? t(l).applyLayout : t(l).applyContent), 1)
|
|
592
592
|
], 8, ba),
|
|
593
|
-
t(
|
|
593
|
+
t(W) && t(V) && !t(ie) ? (w(), k("button", {
|
|
594
594
|
key: 0,
|
|
595
595
|
class: "mr-label-reset-configuration mr-label-rebuild-current",
|
|
596
596
|
type: "button",
|
|
597
597
|
onClick: f[4] || (f[4] = //@ts-ignore
|
|
598
598
|
(...m) => t(a).requestRebuild && t(a).requestRebuild(...m))
|
|
599
|
-
}, c(t(l).rebuildCurrent), 1)) :
|
|
600
|
-
t(
|
|
599
|
+
}, c(t(l).rebuildCurrent), 1)) : E("", !0),
|
|
600
|
+
t(ie) ? (w(), k("div", ga, [
|
|
601
601
|
r("strong", null, c(t(l).rebuildTitle), 1),
|
|
602
602
|
r("p", null, c(t(l).rebuildDescription), 1),
|
|
603
603
|
r("div", null, [
|
|
@@ -611,22 +611,22 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
611
611
|
onClick: f[6] || (f[6] = (m) => t(a).applyConfiguration(!0))
|
|
612
612
|
}, c(t(l).confirmRebuild), 1)
|
|
613
613
|
])
|
|
614
|
-
])) :
|
|
614
|
+
])) : E("", !0),
|
|
615
615
|
t(ce) ? (w(), k("button", {
|
|
616
616
|
key: 2,
|
|
617
617
|
class: "mr-label-reset-configuration",
|
|
618
618
|
type: "button",
|
|
619
619
|
onClick: f[7] || (f[7] = //@ts-ignore
|
|
620
620
|
(...m) => t(a).restoreConfiguration && t(a).restoreConfiguration(...m))
|
|
621
|
-
}, c(t(l).restoreConfiguration), 1)) :
|
|
622
|
-
t(ce) && !t(V) ? (w(), k("p", ha, c(t(l).choosePreset), 1)) :
|
|
621
|
+
}, c(t(l).restoreConfiguration), 1)) : E("", !0),
|
|
622
|
+
t(ce) && !t(V) ? (w(), k("p", ha, c(t(l).choosePreset), 1)) : E("", !0),
|
|
623
623
|
r("p", ya, c(t(we) ? t(l).reflowHint : t(l).contentHint), 1)
|
|
624
624
|
], 8, aa),
|
|
625
625
|
r("label", wa, [
|
|
626
626
|
_(c(t(l).records), 1),
|
|
627
|
-
|
|
627
|
+
G(r("select", {
|
|
628
628
|
"onUpdate:modelValue": f[8] || (f[8] = (m) => se(M) ? M.value = m : null),
|
|
629
|
-
disabled: t(
|
|
629
|
+
disabled: t($) || !i.rows.length
|
|
630
630
|
}, [
|
|
631
631
|
r("option", Ma, c(t(l).all) + " · " + c(i.rows.length), 1),
|
|
632
632
|
r("option", Ca, c(t(l).single), 1)
|
|
@@ -636,30 +636,30 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
636
636
|
]),
|
|
637
637
|
t(M) === "single" ? (w(), k("label", ka, [
|
|
638
638
|
_(c(t(l).record), 1),
|
|
639
|
-
|
|
639
|
+
G(r("input", {
|
|
640
640
|
"onUpdate:modelValue": f[9] || (f[9] = (m) => se(D) ? D.value = m : null),
|
|
641
641
|
type: "number",
|
|
642
642
|
min: "1",
|
|
643
643
|
max: i.rows.length,
|
|
644
644
|
"aria-label": t(l).record,
|
|
645
|
-
disabled: t(
|
|
645
|
+
disabled: t($)
|
|
646
646
|
}, null, 8, _a), [
|
|
647
647
|
[
|
|
648
|
-
|
|
648
|
+
ke,
|
|
649
649
|
t(D),
|
|
650
650
|
void 0,
|
|
651
651
|
{ number: !0 }
|
|
652
652
|
]
|
|
653
653
|
]),
|
|
654
654
|
_(" / " + c(i.rows.length), 1)
|
|
655
|
-
])) :
|
|
655
|
+
])) : E("", !0),
|
|
656
656
|
r("p", La, [
|
|
657
657
|
r("strong", null, c(t(y).length), 1),
|
|
658
658
|
_(" " + c(t(l).count) + " ", 1),
|
|
659
659
|
f[19] || (f[19] = r("span", null, "→", -1)),
|
|
660
660
|
f[20] || (f[20] = _()),
|
|
661
|
-
t(
|
|
662
|
-
r("strong", null, c(t(
|
|
661
|
+
t(I) !== void 0 ? (w(), k(ge, { key: 0 }, [
|
|
662
|
+
r("strong", null, c(t(I)), 1),
|
|
663
663
|
_(" " + c(t(l).labels), 1)
|
|
664
664
|
], 64)) : (w(), k(ge, { key: 1 }, [
|
|
665
665
|
_(c(t(l).invalidCopies), 1)
|
|
@@ -677,7 +677,7 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
677
677
|
r("button", {
|
|
678
678
|
type: "button",
|
|
679
679
|
"aria-pressed": t(g) === "preview",
|
|
680
|
-
disabled: t(
|
|
680
|
+
disabled: t($),
|
|
681
681
|
onClick: f[10] || (f[10] = (m) => t(a).navigate("preview"))
|
|
682
682
|
}, [
|
|
683
683
|
be(he, {
|
|
@@ -689,7 +689,7 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
689
689
|
r("button", {
|
|
690
690
|
type: "button",
|
|
691
691
|
"aria-pressed": t(g) === "design",
|
|
692
|
-
disabled: t(
|
|
692
|
+
disabled: t($),
|
|
693
693
|
onClick: f[11] || (f[11] = (m) => t(a).navigate("design"))
|
|
694
694
|
}, [
|
|
695
695
|
be(he, {
|
|
@@ -701,8 +701,8 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
701
701
|
], 8, Ea),
|
|
702
702
|
r("span", null, c(t(g) === "design" ? t(l).designHint : t(l).flow), 1)
|
|
703
703
|
]),
|
|
704
|
-
t(S) ? (w(), k("p", Ta, c(t(S)), 1)) :
|
|
705
|
-
t(
|
|
704
|
+
t(S) ? (w(), k("p", Ta, c(t(S)), 1)) : E("", !0),
|
|
705
|
+
t(X) ? (w(), k("div", {
|
|
706
706
|
key: 1,
|
|
707
707
|
class: "mr-label-confirm",
|
|
708
708
|
role: "alertdialog",
|
|
@@ -715,7 +715,7 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
715
715
|
]),
|
|
716
716
|
r("button", {
|
|
717
717
|
ref_key: "keepEditingButton",
|
|
718
|
-
ref:
|
|
718
|
+
ref: Me,
|
|
719
719
|
type: "button",
|
|
720
720
|
onClick: f[12] || (f[12] = (m) => t(a).decideDiscard(!1))
|
|
721
721
|
}, c(t(l).keepEditing), 513),
|
|
@@ -723,13 +723,13 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
723
723
|
type: "button",
|
|
724
724
|
onClick: f[13] || (f[13] = (m) => t(a).decideDiscard(!0))
|
|
725
725
|
}, c(t(l).discard), 1)
|
|
726
|
-
], 40, Va)) :
|
|
727
|
-
t(ve) ?
|
|
726
|
+
], 40, Va)) : E("", !0),
|
|
727
|
+
t(ve) ? G((w(), Ke(t(Rt), {
|
|
728
728
|
key: t(v).id,
|
|
729
729
|
ref: t(a).preview.ref,
|
|
730
730
|
"report-id": "labels",
|
|
731
731
|
fetcher: t(Se),
|
|
732
|
-
refresh:
|
|
732
|
+
refresh: t(O),
|
|
733
733
|
"show-params": !1,
|
|
734
734
|
height: "100%",
|
|
735
735
|
toolbar: { exportFormats: ["pdf", "png", "html"], editing: !1, excelImport: !1 },
|
|
@@ -737,7 +737,7 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
737
737
|
}, {
|
|
738
738
|
settings: Mt(() => [
|
|
739
739
|
r("label", Oa, [
|
|
740
|
-
|
|
740
|
+
G(r("input", {
|
|
741
741
|
"onUpdate:modelValue": f[15] || (f[15] = (m) => se(J) ? J.value = m : null),
|
|
742
742
|
type: "checkbox",
|
|
743
743
|
disabled: !t(me)
|
|
@@ -745,16 +745,16 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
745
745
|
[Ct, t(J)]
|
|
746
746
|
]),
|
|
747
747
|
_(c(t(l).sheet), 1),
|
|
748
|
-
r("small", null, c(t(
|
|
748
|
+
r("small", null, c(t(Ne)), 1)
|
|
749
749
|
])
|
|
750
750
|
]),
|
|
751
751
|
_: 1
|
|
752
752
|
}, 8, ["fetcher", "refresh", "messages"])), [
|
|
753
|
-
[
|
|
754
|
-
]) :
|
|
755
|
-
t(fe) ?
|
|
756
|
-
|
|
757
|
-
|
|
753
|
+
[Ue, t(g) === "preview"]
|
|
754
|
+
]) : E("", !0),
|
|
755
|
+
t(fe) ? G((w(), k("div", Ia, [
|
|
756
|
+
K.value ? E("", !0) : (w(), k("p", Pa, c(t(l).designLoading), 1)),
|
|
757
|
+
K.value ? (w(), Ke(kt(K.value), {
|
|
758
758
|
key: 1,
|
|
759
759
|
ref_key: "editor",
|
|
760
760
|
ref: oe,
|
|
@@ -763,7 +763,7 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
763
763
|
"show-mode-switch": !1,
|
|
764
764
|
"show-save": e.showSave,
|
|
765
765
|
capabilities: { params: !1 },
|
|
766
|
-
datasets: t(
|
|
766
|
+
datasets: t(Q),
|
|
767
767
|
"data-schemas": t(H),
|
|
768
768
|
"binding-datasets": t(L),
|
|
769
769
|
"binding-data-contract": e.dataContract,
|
|
@@ -771,10 +771,10 @@ const Wt = ["aria-label"], Xt = { class: "mr-label-context" }, ea = { class: "mr
|
|
|
771
771
|
"before-discard": t(a).beforeDiscard,
|
|
772
772
|
preview: e.preview,
|
|
773
773
|
"onUpdate:modelValue": t(a).update
|
|
774
|
-
}, null, 8, ["model-value", "show-save", "datasets", "data-schemas", "binding-datasets", "binding-data-contract", "save", "before-discard", "preview", "onUpdate:modelValue"])) :
|
|
774
|
+
}, null, 8, ["model-value", "show-save", "datasets", "data-schemas", "binding-datasets", "binding-data-contract", "save", "before-discard", "preview", "onUpdate:modelValue"])) : E("", !0)
|
|
775
775
|
], 512)), [
|
|
776
|
-
[
|
|
777
|
-
]) :
|
|
776
|
+
[Ue, t(g) === "design"]
|
|
777
|
+
]) : E("", !0)
|
|
778
778
|
])
|
|
779
779
|
], 14, Wt));
|
|
780
780
|
}
|