@agile-team/mach-report 2.21.0 → 2.21.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 +2 -2
- package/dist/{ExcelBindingWizard-B2xXBOJu.cjs → ExcelBindingWizard-Bu0LUlzl.cjs} +1 -1
- package/dist/{ExcelBindingWizard-CixTPQAL.js → ExcelBindingWizard-mnAO2qOX.js} +1 -1
- package/dist/{ParamEditor-DhHlNxai.cjs → ParamEditor-38ZfNrPU.cjs} +1 -1
- package/dist/{ParamEditor-gKhvEsnr.js → ParamEditor-C8l0EC8m.js} +1 -1
- package/dist/{ReportBatchPanel-D-lyWKyf.js → ReportBatchPanel-CfUVhvkO.js} +1 -1
- package/dist/{ReportBatchPanel-BUdUfTdm.cjs → ReportBatchPanel-nCC06Nfp.cjs} +1 -1
- package/dist/ReportLabelStudio-CaEvYuSK.cjs +1 -0
- package/dist/{ReportLabelStudio-N2w6DdaZ.js → ReportLabelStudio-DQPBmh4v.js} +164 -163
- package/dist/{ReportTemplateLibrary-WZl-AK-2.js → ReportTemplateLibrary-B5t_EcIs.js} +1 -1
- package/dist/{ReportTemplateLibrary-Cs9WKneQ.cjs → ReportTemplateLibrary-DVlsf72p.cjs} +1 -1
- package/dist/{RuleEditor-DGpmjCko.js → RuleEditor-kT1JsZ9f.js} +1 -1
- package/dist/{RuleEditor-Dtcq-7LO.cjs → RuleEditor-xFkCVlii.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-cxp95OT9.js → TemplateOutlinePanel-BesgGR1P.js} +1 -1
- package/dist/{TemplateOutlinePanel-CkCh506f.cjs → TemplateOutlinePanel-CDI6mfWx.cjs} +1 -1
- package/dist/{TemplateReusePanel-CwttuSta.cjs → TemplateReusePanel-BG9Or5-P.cjs} +1 -1
- package/dist/{TemplateReusePanel-BZ8VTtrO.js → TemplateReusePanel-BNFU6V-W.js} +1 -1
- package/dist/{TemplateReviewPanel-C2YjiaEC.cjs → TemplateReviewPanel-BmBrjt6P.cjs} +1 -1
- package/dist/{TemplateReviewPanel-C9cTvsRs.js → TemplateReviewPanel-CwvwyCSs.js} +1 -1
- package/dist/artifact-integrity.json +25 -25
- package/dist/{designer-CDqok4S5.cjs → designer-DU3yDWgs.cjs} +1 -1
- package/dist/{designer-CIDHt5xz.js → designer-HQi-03R6.js} +4 -4
- 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/package.json +1 -1
- package/dist/ReportLabelStudio-BcjQt73a.cjs +0 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { computed as p, shallowRef as Ce, ref as R, onMounted as
|
|
2
|
-
import { provideMachReportConfig as
|
|
1
|
+
import { computed as p, shallowRef as Ce, ref as R, onMounted as ot, onScopeDispose as Be, watch as X, defineComponent as rt, markRaw as ut, nextTick as dt, openBlock as S, createElementBlock as M, unref as t, normalizeClass as ze, createElementVNode as r, createVNode as ve, toDisplayString as d, createTextVNode as _, Fragment as be, renderList as Ne, createCommentVNode as N, withDirectives as W, isRef as se, vModelText as Se, vModelSelect as ct, withKeys as ft, withModifiers as mt, createBlock as Je, withCtx as vt, vModelCheckbox as bt, resolveDynamicComponent as pt, vShow as gt } from "vue";
|
|
2
|
+
import { provideMachReportConfig as ht, ReportPreview as yt } from "@agile-team/mach-report/vue";
|
|
3
3
|
import { a as pe } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
4
|
-
import { defineReportTemplate as
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { defineReportTemplate as wt, createLabelTemplate as St, parseReportTemplate as x, serializeReportTemplate as Me, createReportSource as Mt, defineLabelReport as Ct, imposeLabelSheets as kt } from "@agile-team/mach-report";
|
|
5
|
+
import { b as Ae } from "./progress-Hc2vxoCs.js";
|
|
6
|
+
import { L as _t, c as Lt } from "./designer-HQi-03R6.js";
|
|
7
|
+
function Rt() {
|
|
7
8
|
let e;
|
|
8
9
|
const s = () => e ??= import("@agile-team/mach-report/codes").then((o) => o.createCodeAssetRenderers()).catch((o) => {
|
|
9
10
|
throw e = void 0, o;
|
|
10
11
|
}), n = (o) => async (u) => {
|
|
11
|
-
u.signal
|
|
12
|
+
Ae(u.signal);
|
|
12
13
|
const l = await s();
|
|
13
|
-
return u.signal
|
|
14
|
+
return Ae(u.signal), l[o](u);
|
|
14
15
|
};
|
|
15
16
|
return { assetRenderers: { barcode: n("barcode"), qrcode: n("qrcode") } };
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function Dt(e) {
|
|
18
19
|
const s = e.pages[0];
|
|
19
20
|
if (!s || e.pages.some((u) => u.layout === "wide" || u.widthMm !== s.widthMm || u.heightMm !== s.heightMm)) return;
|
|
20
21
|
const n = Math.floor(190 / (s.widthMm + 4)), o = Math.floor(277 / (s.heightMm + 4));
|
|
@@ -26,13 +27,13 @@ const ke = [
|
|
|
26
27
|
{ id: "paired", widthMm: 80, heightMm: 55, faces: 2 },
|
|
27
28
|
{ id: "warehouse", widthMm: 100, heightMm: 60, faces: 1 }
|
|
28
29
|
];
|
|
29
|
-
function
|
|
30
|
+
function He(e, s) {
|
|
30
31
|
return s ?? e.fields.find((n) => n.semanticRole === "identifier" && n.field !== e.rowKey)?.field ?? e.rowKey ?? e.fields[0]?.field;
|
|
31
32
|
}
|
|
32
33
|
function Le(e, s, n) {
|
|
33
34
|
const o = e.fields.filter((a) => a.field !== s && a.field !== e.rowKey);
|
|
34
35
|
if (n === void 0)
|
|
35
|
-
return o.map((a, f) => ({ field: a, index: f, priority:
|
|
36
|
+
return o.map((a, f) => ({ field: a, index: f, priority: Ft(a) })).sort((a, f) => a.priority - f.priority || a.index - f.index).slice(0, 5).map((a) => a.field);
|
|
36
37
|
const u = new Map(o.map((a) => [a.field, a])), l = [...new Set(n)];
|
|
37
38
|
if (l.length > 5) throw new Error("成品标签最多显示 5 个字段,请先精简显示字段");
|
|
38
39
|
return l.map((a) => {
|
|
@@ -41,10 +42,10 @@ function Le(e, s, n) {
|
|
|
41
42
|
return f;
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function Ft(e) {
|
|
45
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;
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function Nt(e = "paired") {
|
|
48
49
|
return ke.find((s) => s.id === e) ?? ke[1];
|
|
49
50
|
}
|
|
50
51
|
const xe = "#173450", Re = "#586c82";
|
|
@@ -69,7 +70,7 @@ function Te(e, s) {
|
|
|
69
70
|
style: { lineColor: "#c9d7e5", lineWidthPt: 0.55 }
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
+
function Ke(e, s, n) {
|
|
73
74
|
const o = [];
|
|
74
75
|
let u = 4;
|
|
75
76
|
if (n?.logoData) {
|
|
@@ -79,7 +80,7 @@ function He(e, s, n) {
|
|
|
79
80
|
}
|
|
80
81
|
return o.push({ ...H(n?.name?.trim() || e, u, 3, s - u - 4, 5, 9), style: { fontSize: 9, color: "#205582" }, meta: { labelStudioRole: "brand-name" } }), n?.tagline?.trim() && o.push({ ...H(n.tagline.trim(), u, 8, s - u - 4, 3, 5.5), style: { fontSize: 5.5, color: Re }, meta: { labelStudioRole: "brand-tagline" } }), o.push(Te(12, s)), o;
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
+
function Ue(e, s, n, o, u = 4.7) {
|
|
83
84
|
return e.flatMap((l, a) => {
|
|
84
85
|
const f = s + a * u;
|
|
85
86
|
return [
|
|
@@ -88,93 +89,93 @@ function Ke(e, s, n, o, u = 4.7) {
|
|
|
88
89
|
];
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function Et(e, s) {
|
|
92
93
|
return e ? [{ ...H("", 4, 14, s, 7, 14), binding: { field: e }, style: { fontSize: 14, color: xe } }] : [];
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
+
function xt(e, s, n, o) {
|
|
95
96
|
const u = Le(e, n, o.fields), l = [
|
|
96
|
-
...
|
|
97
|
-
...
|
|
98
|
-
...
|
|
97
|
+
...Ke(s, 80, o.brand),
|
|
98
|
+
...Et(n, 71),
|
|
99
|
+
...Ue(u, 23, 21, 27)
|
|
99
100
|
];
|
|
100
101
|
n && l.push({ kind: "qrcode", leftMm: 55, topMm: 23, widthMm: 20, heightMm: 20, binding: { field: n }, code: { quietZoneModules: 4, errorCorrection: "M" } }), l.push(Te(48, 80));
|
|
101
102
|
const a = e.fields.find((f) => f.field === n)?.label ?? s;
|
|
102
103
|
return l.push({ ...H(a, 4, 49, 71, 3, 5.8), style: { fontSize: 5.8, color: Re } }), l;
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
-
const l =
|
|
105
|
+
function Pe(e, s, n, o, u = 80) {
|
|
106
|
+
const l = Ke(s, u, o.brand);
|
|
106
107
|
n && (l.push({ ...H("", 4, 14, u - 8, 8, 16), binding: { field: n }, style: { fontSize: 16, align: "center", color: xe } }), l.push({ kind: "qrcode", leftMm: (u - 20) / 2, topMm: 23, widthMm: 20, heightMm: 20, binding: { field: n }, code: { quietZoneModules: 4, errorCorrection: "M" } })), l.push(Te(44, u));
|
|
107
108
|
const a = Le(e, n, o.fields);
|
|
108
109
|
return u === 100 ? a.forEach((f, y) => {
|
|
109
110
|
const g = y % 2 === 0 ? 4 : 52, v = 46 + Math.floor(y / 2) * 4.3;
|
|
110
111
|
l.push({ ...H(f.label ?? f.field, g, v, 19, 3.7, 5.8), style: { fontSize: 5.8, color: Re }, meta: { labelStudioRole: "field-label", labelStudioField: f.field } }), l.push({ ...H("", g + 19, v, 25, 3.7, 6.5), binding: { field: f.field, ...f.format ? { format: f.format } : {} }, meta: { labelStudioRole: "field-value", labelStudioField: f.field } });
|
|
111
|
-
}) : l.push(...
|
|
112
|
+
}) : l.push(...Ue(a.slice(0, 1), 46, 24, u - 32, 5)), l;
|
|
112
113
|
}
|
|
113
114
|
function ge(e, s, n, o = {}) {
|
|
114
|
-
const u =
|
|
115
|
+
const u = He(e, n), l = Nt(o.preset), a = Object.fromEntries(["name", "tagline"].flatMap((v) => {
|
|
115
116
|
const h = o.brand?.[v];
|
|
116
117
|
return typeof h == "string" ? [[v, h]] : [];
|
|
117
|
-
})), f = { preset: l.id, brand: a, fields: Le(e, u, o.fields).map((v) => v.field) }, y = l.id === "warehouse" ?
|
|
118
|
-
return l.faces === 2 && g.push({ widthMm: l.widthMm, heightMm: l.heightMm, meta: { title: `${s} · 2`, labelStudio: f }, components:
|
|
118
|
+
})), f = { preset: l.id, brand: a, fields: Le(e, u, o.fields).map((v) => v.field) }, y = l.id === "warehouse" ? Pe(e, s, u, o, l.widthMm) : xt(e, s, u, o), g = [{ widthMm: l.widthMm, heightMm: l.heightMm, meta: { title: `${s} · 1`, labelStudio: f }, components: y }];
|
|
119
|
+
return l.faces === 2 && g.push({ widthMm: l.widthMm, heightMm: l.heightMm, meta: { title: `${s} · 2`, labelStudio: f }, components: Pe(e, s, u, o) }), wt({ id: "record-label", name: s, template: St({ dataset: "records", rowKey: e.rowKey, pages: g }) });
|
|
119
120
|
}
|
|
120
|
-
const
|
|
121
|
+
const A = (e) => e.meta?.labelStudioRole, Ee = (e) => typeof A(e) == "string";
|
|
121
122
|
function _e(e) {
|
|
122
123
|
const s = { ...e, ...e.meta ? { meta: { ...e.meta } } : {} };
|
|
123
124
|
return s.meta && (delete s.meta.labelStudioRole, delete s.meta.labelStudioField, Object.keys(s.meta).length || delete s.meta), s;
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
+
function Tt(e, s) {
|
|
126
127
|
for (const n of s.components.filter(Ee)) {
|
|
127
|
-
if (e.components.some((u) =>
|
|
128
|
+
if (e.components.some((u) => A(u) === A(n) && u.meta?.labelStudioField === n.meta?.labelStudioField)) continue;
|
|
128
129
|
const o = e.components.find((u) => !Ee(u) && JSON.stringify(_e(u)) === JSON.stringify(_e(n)));
|
|
129
130
|
o && (o.meta = { ...o.meta, ...n.meta });
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
|
-
function
|
|
133
|
+
function Vt(e, s) {
|
|
133
134
|
const n = e.kind === "list" ? Number.POSITIVE_INFINITY : e.heightMm, o = s.kind === "list" ? Number.POSITIVE_INFINITY : s.heightMm;
|
|
134
135
|
return e.leftMm < s.leftMm + s.widthMm && e.leftMm + e.widthMm > s.leftMm && e.topMm < s.topMm + o && e.topMm + n > s.topMm;
|
|
135
136
|
}
|
|
136
|
-
function
|
|
137
|
+
function Ot(e, s) {
|
|
137
138
|
const n = { ...e, meta: { ...e.meta, ...s.meta } };
|
|
138
|
-
return n.kind === "text" && s.kind === "text" && (n.text = s.text, s.binding ? n.binding =
|
|
139
|
+
return n.kind === "text" && s.kind === "text" && (n.text = s.text, s.binding ? n.binding = s.binding : delete n.binding), n;
|
|
139
140
|
}
|
|
140
|
-
function
|
|
141
|
+
function $t(e, s, n, o) {
|
|
141
142
|
const u = o.has("field-value");
|
|
142
|
-
|
|
143
|
-
const l = new Set(e.components.filter((v) =>
|
|
143
|
+
Tt(e, s);
|
|
144
|
+
const l = new Set(e.components.filter((v) => A(v) === "field-label" || A(v) === "field-value")), a = [...l], f = /* @__PURE__ */ new Map(), y = [];
|
|
144
145
|
for (const v of n.components.filter(Ee)) {
|
|
145
|
-
const h =
|
|
146
|
+
const h = A(v);
|
|
146
147
|
if (!o.has(String(h))) continue;
|
|
147
|
-
const D = h === "field-label" || h === "field-value" ? a.find((k) =>
|
|
148
|
-
D ? f.set(D,
|
|
148
|
+
const D = h === "field-label" || h === "field-value" ? a.find((k) => A(k) === h && !f.has(k)) : e.components.find((k) => A(k) === h);
|
|
149
|
+
D ? f.set(D, Ot(D, v)) : y.push(v);
|
|
149
150
|
}
|
|
150
|
-
const g = e.components.filter((v) => (!u || !l.has(v) || f.has(v)) && (!o.has("brand-tagline") ||
|
|
151
|
+
const g = e.components.filter((v) => (!u || !l.has(v) || f.has(v)) && (!o.has("brand-tagline") || A(v) !== "brand-tagline" || n.components.some((h) => A(h) === "brand-tagline"))).map((v) => f.get(v) ?? v);
|
|
151
152
|
for (const v of y) {
|
|
152
|
-
if (g.some((h) =>
|
|
153
|
+
if (g.some((h) => Vt(h, v))) return !1;
|
|
153
154
|
g.push(v);
|
|
154
155
|
}
|
|
155
156
|
return e.components = g, e.meta = { ...e.meta, labelStudio: n.meta?.labelStudio }, !0;
|
|
156
157
|
}
|
|
157
|
-
function
|
|
158
|
+
function It(e, s, n, o, u, l) {
|
|
158
159
|
const a = ge(s, n, o, u), f = ge(s, n, o, l), y = x(e), g = /* @__PURE__ */ new Set();
|
|
159
160
|
JSON.stringify(u.fields) !== JSON.stringify(l.fields) && (g.add("field-label"), g.add("field-value")), (u.brand?.name ?? "").trim() !== (l.brand?.name ?? "").trim() && g.add("brand-name"), (u.brand?.tagline ?? "").trim() !== (l.brand?.tagline ?? "").trim() && g.add("brand-tagline");
|
|
160
161
|
for (const [v, h] of y.template.pages.entries()) {
|
|
161
162
|
const D = a.template.pages[v], k = f.template.pages[v];
|
|
162
|
-
if (D && k &&
|
|
163
|
+
if (D && k && !$t(h, D, k, g)) return;
|
|
163
164
|
}
|
|
164
165
|
return y;
|
|
165
166
|
}
|
|
166
|
-
function
|
|
167
|
+
function zt(e, s) {
|
|
167
168
|
const n = e.template.pages, o = s.template.pages;
|
|
168
169
|
return n.length !== o.length || n.some((u, l) => u.components.length !== o[l].components.length) ? !0 : n.some((u, l) => {
|
|
169
170
|
const a = o[l], f = { ...u, meta: void 0, components: void 0 }, y = { ...a, meta: void 0, components: void 0 };
|
|
170
171
|
return JSON.stringify(f) !== JSON.stringify(y) || u.components.some((g, v) => JSON.stringify(_e(g)) !== JSON.stringify(_e(a.components[v])));
|
|
171
172
|
});
|
|
172
173
|
}
|
|
173
|
-
function
|
|
174
|
+
function Jt(e, s, n, o, u) {
|
|
174
175
|
const l = { ...e, template: ge(s, n, o, u).template }, a = e.template.repeat;
|
|
175
176
|
return a?.copies !== void 0 && l.template.repeat && (l.template.repeat.copies = a.copies), l;
|
|
176
177
|
}
|
|
177
|
-
function
|
|
178
|
+
function J(e) {
|
|
178
179
|
const s = e.template.pages[0]?.meta?.labelStudio;
|
|
179
180
|
if (!s || typeof s != "object") return;
|
|
180
181
|
const n = s, o = ke.find((f) => f.id === n.preset);
|
|
@@ -186,67 +187,67 @@ function A(e) {
|
|
|
186
187
|
typeof l[f] == "string" && (a[f] = l[f]);
|
|
187
188
|
return { preset: o.id, fields: u, brand: a };
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
+
function qe(e, s, n) {
|
|
190
191
|
const o = new Set(e.fields.filter((l) => l.field !== s && l.field !== e.rowKey).map((l) => l.field)), u = n?.filter((l) => o.has(l));
|
|
191
192
|
return Le(e, s, u).map((l) => l.field);
|
|
192
193
|
}
|
|
193
194
|
function At(e, s) {
|
|
194
|
-
const n = p(() => ({ ...
|
|
195
|
+
const n = p(() => ({ ..._t, ...e.messages })), o = p(() => e.title ?? n.value.title), u = { preset: e.preset, brand: e.brand, fields: e.fields }, l = Ce(e.modelValue ? x(e.modelValue) : ge(e.schema, o.value, e.identityField, u)), a = Ce(x(l.value)), f = R(!1), y = Ce();
|
|
195
196
|
let g, v;
|
|
196
|
-
|
|
197
|
+
ot(() => {
|
|
197
198
|
e.modelValue || s(x(l.value));
|
|
198
199
|
});
|
|
199
|
-
const h = R("preview"), D = R("all"), k = R(1),
|
|
200
|
+
const h = R("preview"), D = R("all"), k = R(1), $ = R(!1), oe = R(!1), w = R(), K = Lt(() => e.beforeDiscard), U = p(() => oe.value || K.pending.value || f.value && !w.value || w.value?.saving === !0 || w.value?.blocked === !0), L = R(""), ee = p(() => He(e.schema, e.identityField)), I = R(J(l.value)?.preset ?? (e.modelValue ? void 0 : e.preset ?? "paired")), j = R(J(l.value)?.brand?.name ?? e.brand?.name ?? ""), T = R(J(l.value)?.brand?.tagline ?? e.brand?.tagline ?? ""), F = R(qe(e.schema, ee.value, J(l.value)?.fields ?? e.fields)), te = R(""), le = p(() => e.schema.fields.filter((i) => i.field !== ee.value && i.field !== e.schema.rowKey)), ae = p(() => F.value.map((i) => ({ field: i, label: e.schema.fields.find((b) => b.field === i)?.label ?? i }))), re = p(() => {
|
|
200
201
|
const i = te.value.trim().toLocaleLowerCase();
|
|
201
202
|
return le.value.filter((b) => `${b.label ?? ""} ${b.field}`.toLocaleLowerCase().includes(i)).slice(0, 30);
|
|
202
203
|
}), G = p(() => {
|
|
203
204
|
const i = l.value.template.pages[0]?.components.find((b) => b.kind === "image" && b.meta?.labelBrandLogo);
|
|
204
205
|
return i?.kind === "image" ? i.imageData : e.brand?.logoData;
|
|
205
206
|
}), ue = p(() => ({
|
|
206
|
-
preset:
|
|
207
|
+
preset: I.value,
|
|
207
208
|
fields: F.value,
|
|
208
209
|
brand: { ...e.brand, ...G.value ? { logoData: G.value } : {}, name: j.value, tagline: T.value }
|
|
209
210
|
}));
|
|
210
|
-
let de = JSON.stringify(
|
|
211
|
+
let de = JSON.stringify(J(l.value));
|
|
211
212
|
const ce = p(() => {
|
|
212
|
-
const i =
|
|
213
|
+
const i = J(l.value);
|
|
213
214
|
if (!i) return !0;
|
|
214
215
|
try {
|
|
215
216
|
const b = ge(e.schema, o.value, e.identityField, { ...i, brand: { ...i.brand, ...G.value ? { logoData: G.value } : {} } });
|
|
216
|
-
return
|
|
217
|
+
return zt(l.value, b);
|
|
217
218
|
} catch {
|
|
218
219
|
return !0;
|
|
219
220
|
}
|
|
220
|
-
}), P = R(!1), Q = p(() =>
|
|
221
|
+
}), P = R(!1), Q = p(() => I.value !== J(l.value)?.preset), Y = () => JSON.stringify({ preset: I.value, fields: F.value, name: j.value, tagline: T.value }), fe = R(Y()), q = p(() => Y() !== fe.value), me = p(() => Me(l.value)), De = p(() => Me(a.value)), ne = p(() => me.value !== De.value), he = p(() => q.value || ne.value || w.value?.pendingLocalChanges === !0);
|
|
221
222
|
function B() {
|
|
222
223
|
P.value = !1;
|
|
223
|
-
const i =
|
|
224
|
-
|
|
224
|
+
const i = J(l.value);
|
|
225
|
+
I.value = i?.preset, F.value = qe(e.schema, ee.value, i?.fields ?? e.fields), j.value = i?.brand?.name ?? e.brand?.name ?? "", T.value = i?.brand?.tagline ?? e.brand?.tagline ?? "", de = JSON.stringify(i), fe.value = Y();
|
|
225
226
|
}
|
|
226
227
|
function ie(i) {
|
|
227
|
-
const b =
|
|
228
|
+
const b = J(i), C = JSON.stringify(b);
|
|
228
229
|
C !== de && (de = C, B());
|
|
229
230
|
}
|
|
230
231
|
let V = !1;
|
|
231
|
-
|
|
232
|
+
Be(() => {
|
|
232
233
|
V = !0, v?.abort();
|
|
233
234
|
});
|
|
234
|
-
const Z =
|
|
235
|
-
|
|
235
|
+
const Z = Rt();
|
|
236
|
+
ht({ get defaults() {
|
|
236
237
|
return { ...e.preview, assets: { ...Z, ...e.preview?.assets, assetRenderers: { ...Z.assetRenderers, ...e.preview?.assets?.assetRenderers } } };
|
|
237
238
|
} }), X(w, (i) => {
|
|
238
239
|
const b = y.value;
|
|
239
240
|
if (!i || !b) return;
|
|
240
241
|
const C = l.value;
|
|
241
242
|
Me(b) !== me.value && i.applyTemplate?.(C.template), y.value = void 0, g = void 0;
|
|
242
|
-
}, { flush: "post" }), X([
|
|
243
|
+
}, { flush: "post" }), X([I, F, j, T], () => {
|
|
243
244
|
P.value = !1;
|
|
244
245
|
}), X(() => e.modelValue, (i) => {
|
|
245
246
|
i && Me(i) !== me.value && (l.value = x(i), a.value = x(i), g = void 0, ie(i));
|
|
246
247
|
}), X(() => e.rows, () => {
|
|
247
248
|
D.value = "all", k.value = 1;
|
|
248
249
|
});
|
|
249
|
-
function
|
|
250
|
+
function O(i) {
|
|
250
251
|
L.value = "", l.value = i, ie(i), s(i);
|
|
251
252
|
}
|
|
252
253
|
function m(i, b) {
|
|
@@ -254,35 +255,35 @@ function At(e, s) {
|
|
|
254
255
|
}
|
|
255
256
|
function c(i = !1) {
|
|
256
257
|
if (U.value || V) return !1;
|
|
257
|
-
if (
|
|
258
|
+
if (!I.value)
|
|
258
259
|
return L.value = n.value.choosePreset, !1;
|
|
259
260
|
if (w.value?.canApply === !1)
|
|
260
261
|
return L.value = w.value.saveReason || n.value.applyFirst, !1;
|
|
261
262
|
if (Q.value && !i)
|
|
262
263
|
return P.value = !0, !1;
|
|
263
264
|
try {
|
|
264
|
-
const b =
|
|
265
|
+
const b = J(l.value);
|
|
265
266
|
let C;
|
|
266
|
-
if (i ? C =
|
|
267
|
+
if (i ? C = Jt(l.value, e.schema, o.value, e.identityField, ue.value) : b && (C = It(l.value, e.schema, o.value, e.identityField, b, ue.value)), !C)
|
|
267
268
|
return L.value = n.value.contentNeedsDesign, !1;
|
|
268
269
|
if (w.value?.applyTemplate) {
|
|
269
270
|
if (!w.value.applyTemplate(C.template))
|
|
270
271
|
return L.value = n.value.saveFailed, !1;
|
|
271
272
|
} else
|
|
272
|
-
g = x(l.value),
|
|
273
|
+
g = x(l.value), O(C);
|
|
273
274
|
return P.value = !1, fe.value = Y(), !0;
|
|
274
275
|
} catch (b) {
|
|
275
276
|
return L.value = b instanceof Error ? b.message : n.value.saveFailed, !1;
|
|
276
277
|
}
|
|
277
278
|
}
|
|
278
|
-
const z = p(() => D.value === "all" ? e.rows : Number.isSafeInteger(k.value) && e.rows[k.value - 1] ? [e.rows[k.value - 1]] : []), ye = p(() => l.value.template.repeat?.dataset ?? "records"),
|
|
279
|
+
const z = p(() => D.value === "all" ? e.rows : Number.isSafeInteger(k.value) && e.rows[k.value - 1] ? [e.rows[k.value - 1]] : []), ye = p(() => l.value.template.repeat?.dataset ?? "records"), je = p(() => ({ [ye.value]: z.value })), Ge = p(() => ({ [ye.value]: z.value.slice(0, 3) })), Qe = p(() => ({ [ye.value]: e.schema })), Ye = p(() => [{ id: ye.value, label: o.value, rowKey: e.schema.rowKey, fields: e.schema.fields }]), Ze = p(() => l.value.template.pages[0]), Ve = p(() => l.value.template.pages.length), We = p(() => {
|
|
279
280
|
const i = l.value.template.repeat?.copies ?? 1;
|
|
280
281
|
return typeof i == "number" ? i : void 0;
|
|
281
|
-
}),
|
|
282
|
+
}), Xe = p(() => {
|
|
282
283
|
const i = l.value.template.repeat?.copies;
|
|
283
284
|
return typeof i == "object" ? i.field : void 0;
|
|
284
|
-
}),
|
|
285
|
-
const i =
|
|
285
|
+
}), Oe = p(() => {
|
|
286
|
+
const i = Xe.value;
|
|
286
287
|
if (!i) return;
|
|
287
288
|
let b = 0;
|
|
288
289
|
for (const C of z.value) {
|
|
@@ -291,30 +292,30 @@ function At(e, s) {
|
|
|
291
292
|
b += E;
|
|
292
293
|
}
|
|
293
294
|
return b;
|
|
294
|
-
}),
|
|
295
|
-
const i =
|
|
296
|
-
return i !== void 0 ? Number.isSafeInteger(i) && i >= 1 && i <= 1e3 ? z.value.length * i * Ve.value : void 0 :
|
|
297
|
-
}), we = p(() =>
|
|
295
|
+
}), et = p(() => {
|
|
296
|
+
const i = We.value;
|
|
297
|
+
return i !== void 0 ? Number.isSafeInteger(i) && i >= 1 && i <= 1e3 ? z.value.length * i * Ve.value : void 0 : Oe.value === void 0 ? void 0 : Oe.value * Ve.value;
|
|
298
|
+
}), we = p(() => Dt(l.value.template)), tt = p(() => {
|
|
298
299
|
const i = we.value;
|
|
299
300
|
return i ? n.value.sheetHint.replace("{columns}", String(i.columns)).replace("{rows}", String(i.rows)).replace("{capacity}", String(i.capacity)) : n.value.sheetUnavailable;
|
|
300
301
|
});
|
|
301
302
|
X(we, (i) => {
|
|
302
|
-
i || (
|
|
303
|
+
i || ($.value = !1);
|
|
303
304
|
});
|
|
304
|
-
const
|
|
305
|
-
const i =
|
|
305
|
+
const lt = p(() => {
|
|
306
|
+
const i = Mt({ labels: Ct({ template: l.value.template, rows: z.value, dataSchema: e.schema }) }), b = $.value ? we.value : void 0;
|
|
306
307
|
return async (C) => {
|
|
307
308
|
const E = await i(C);
|
|
308
|
-
return b ?
|
|
309
|
+
return b ? kt(E, { ...b, signal: C.signal }) : E;
|
|
309
310
|
};
|
|
310
|
-
}),
|
|
311
|
+
}), $e = async (i, b) => {
|
|
311
312
|
if (V || b.signal.aborted) throw new DOMException("标签模板保存已取消", "AbortError");
|
|
312
313
|
const C = x(i), E = x(e.save ? await e.save(C, b) : C);
|
|
313
314
|
if (E.id !== i.id) throw new Error(n.value.invalidSavedTemplate);
|
|
314
315
|
if (V || b.signal.aborted) throw new DOMException("标签模板保存已取消", "AbortError");
|
|
315
|
-
return a.value = x(E),
|
|
316
|
+
return a.value = x(E), O(E), E;
|
|
316
317
|
};
|
|
317
|
-
async function
|
|
318
|
+
async function Ie() {
|
|
318
319
|
if (!(U.value || V)) {
|
|
319
320
|
if (q.value && Q.value) {
|
|
320
321
|
L.value = n.value.applyLayoutFirst;
|
|
@@ -332,7 +333,7 @@ function At(e, s) {
|
|
|
332
333
|
L.value = n.value.saveFailed;
|
|
333
334
|
return;
|
|
334
335
|
}
|
|
335
|
-
} else ne.value && (v = new AbortController(), await
|
|
336
|
+
} else ne.value && (v = new AbortController(), await $e(l.value, { expectedRevision: l.value.revision, signal: v.signal }), g = void 0);
|
|
336
337
|
if (!V)
|
|
337
338
|
return L.value = "", x(l.value);
|
|
338
339
|
} catch (i) {
|
|
@@ -343,7 +344,7 @@ function At(e, s) {
|
|
|
343
344
|
}
|
|
344
345
|
}
|
|
345
346
|
}
|
|
346
|
-
async function
|
|
347
|
+
async function at(i) {
|
|
347
348
|
if (!(U.value || i === h.value))
|
|
348
349
|
if (i === "design" && !f.value) {
|
|
349
350
|
if (q.value && Q.value) {
|
|
@@ -352,14 +353,14 @@ function At(e, s) {
|
|
|
352
353
|
}
|
|
353
354
|
if (q.value && !c()) return;
|
|
354
355
|
y.value = g, f.value = !0, h.value = i;
|
|
355
|
-
} else await
|
|
356
|
+
} else await Ie() && (h.value = i);
|
|
356
357
|
}
|
|
357
|
-
function
|
|
358
|
+
function nt(i) {
|
|
358
359
|
f.value = !1, h.value = "preview", L.value = `${n.value.designLoadFailed} ${i instanceof Error ? i.message : String(i)}`;
|
|
359
360
|
}
|
|
360
361
|
let Fe = !1;
|
|
361
|
-
const
|
|
362
|
-
async function
|
|
362
|
+
const it = (i) => Fe || K.request(i);
|
|
363
|
+
async function st() {
|
|
363
364
|
if (U.value) return !1;
|
|
364
365
|
const i = w.value?.pendingLocalChanges === !0;
|
|
365
366
|
if (!i && !ne.value && !q.value) return !0;
|
|
@@ -372,39 +373,39 @@ function At(e, s) {
|
|
|
372
373
|
Fe = !1;
|
|
373
374
|
}
|
|
374
375
|
}
|
|
375
|
-
return
|
|
376
|
+
return O(x(a.value)), g = void 0, B(), !0;
|
|
376
377
|
}
|
|
377
|
-
return { m: n, notice: L, title: o, document: l, mode: h, editorVisited: f, editorInitialDocument: y, failDesignLoad:
|
|
378
|
+
return { m: n, notice: L, title: o, document: l, mode: h, editorVisited: f, editorInitialDocument: y, failDesignLoad: nt, sheetLayout: we, sheetHint: tt, rebuilding: P, layoutChanged: Q, record: D, recordIndex: k, sheet: $, busy: U, editor: w, rows: z, datasets: je, designDatasets: Ge, schemas: Qe, bindings: Ye, paper: Ze, labelCount: et, fetcher: lt, update: O, save: $e, navigate: at, prepare: Ie, guardChanges: st, preset: I, presets: ke, brandName: j, brandTagline: T, fields: F, fieldQuery: te, selectedFields: ae, availableFields: re, fieldCount: p(() => le.value.length), configurationDirty: q, pendingLocalChanges: he, custom: ce, toggleField: m, applyConfiguration: c, requestRebuild: () => {
|
|
378
379
|
P.value = !0;
|
|
379
380
|
}, cancelRebuild: () => {
|
|
380
381
|
P.value = !1;
|
|
381
|
-
}, restoreConfiguration: B, beforeDiscard:
|
|
382
|
+
}, restoreConfiguration: B, beforeDiscard: it, confirmation: K.confirmation, decideDiscard: K.decide };
|
|
382
383
|
}
|
|
383
|
-
const
|
|
384
|
+
const Pt = ["aria-label"], qt = { class: "mr-label-context" }, Bt = { class: "mr-label-identity" }, Ht = { class: "mr-label-spec" }, Kt = ["disabled"], Ut = ["aria-label"], jt = ["aria-pressed", "onClick"], Gt = { class: "mr-label-fields" }, Qt = {
|
|
384
385
|
key: 0,
|
|
385
386
|
class: "mr-label-selected-fields"
|
|
386
|
-
},
|
|
387
|
+
}, Yt = ["aria-label", "onClick"], Zt = { class: "mr-label-field-search" }, Wt = ["aria-label", "placeholder"], Xt = { class: "mr-label-field-options" }, el = ["checked", "disabled", "onChange"], tl = { key: 0 }, ll = { key: 1 }, al = { class: "mr-label-brand" }, nl = ["placeholder"], il = ["disabled"], sl = {
|
|
387
388
|
key: 1,
|
|
388
389
|
class: "mr-label-rebuild",
|
|
389
390
|
role: "alert"
|
|
390
|
-
},
|
|
391
|
+
}, ol = {
|
|
391
392
|
key: 3,
|
|
392
393
|
class: "mr-label-reflow-hint"
|
|
393
|
-
},
|
|
394
|
+
}, rl = { class: "mr-label-reflow-hint" }, ul = { class: "mr-label-record" }, dl = ["disabled"], cl = { value: "all" }, fl = { value: "single" }, ml = {
|
|
394
395
|
key: 0,
|
|
395
396
|
class: "mr-label-record-index"
|
|
396
|
-
},
|
|
397
|
+
}, vl = ["max", "aria-label", "disabled"], bl = { class: "mr-label-count" }, pl = { class: "mr-label-help" }, gl = { class: "mr-label-main" }, hl = { class: "mr-label-bar" }, yl = ["aria-label"], wl = ["aria-pressed", "disabled"], Sl = ["aria-pressed", "disabled"], Ml = {
|
|
397
398
|
key: 0,
|
|
398
399
|
class: "mr-label-notice",
|
|
399
400
|
role: "status"
|
|
400
|
-
},
|
|
401
|
+
}, Cl = ["aria-label"], kl = { class: "mr-label-imposition" }, _l = ["disabled"], Ll = {
|
|
401
402
|
key: 3,
|
|
402
403
|
class: "mr-label-editor"
|
|
403
|
-
},
|
|
404
|
+
}, Rl = {
|
|
404
405
|
key: 0,
|
|
405
406
|
class: "mr-label-editor-loading",
|
|
406
407
|
role: "status"
|
|
407
|
-
},
|
|
408
|
+
}, Vl = /* @__PURE__ */ rt({
|
|
408
409
|
__name: "ReportLabelStudio",
|
|
409
410
|
props: {
|
|
410
411
|
showSave: { type: Boolean, default: !0 },
|
|
@@ -423,33 +424,33 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
423
424
|
},
|
|
424
425
|
emits: ["update:modelValue"],
|
|
425
426
|
setup(e, { expose: s, emit: n }) {
|
|
426
|
-
const o = e, u = n, l = At(o, (
|
|
427
|
+
const o = e, u = n, l = At(o, (O) => u("update:modelValue", O)), { m: a, notice: f, title: y, document: g, mode: v, record: h, recordIndex: D, sheet: k, busy: $, editor: oe, rows: w, designDatasets: K, schemas: U, bindings: L, paper: ee, labelCount: I, fetcher: j, preset: T, presets: F, brandName: te, brandTagline: le, fields: ae, fieldQuery: re, selectedFields: G, availableFields: ue, fieldCount: de, configurationDirty: ce, pendingLocalChanges: P, custom: Q, confirmation: Y, editorVisited: fe, editorInitialDocument: q, sheetLayout: me, sheetHint: De, rebuilding: ne, layoutChanged: he } = l, B = Ce();
|
|
427
428
|
let ie = !1;
|
|
428
|
-
|
|
429
|
+
Be(() => {
|
|
429
430
|
ie = !0;
|
|
430
|
-
}), X(l.editorVisited, async (
|
|
431
|
-
if (!(!
|
|
431
|
+
}), X(l.editorVisited, async (O) => {
|
|
432
|
+
if (!(!O || B.value))
|
|
432
433
|
try {
|
|
433
|
-
const m = await import("./designer-
|
|
434
|
-
ie || (B.value =
|
|
434
|
+
const m = await import("./designer-HQi-03R6.js").then((c) => c.t);
|
|
435
|
+
ie || (B.value = ut(m.default));
|
|
435
436
|
} catch (m) {
|
|
436
437
|
ie || l.failDesignLoad(m);
|
|
437
438
|
}
|
|
438
439
|
});
|
|
439
440
|
const V = R();
|
|
440
441
|
let Z = null;
|
|
441
|
-
return X(Y, async (
|
|
442
|
-
|
|
442
|
+
return X(Y, async (O) => {
|
|
443
|
+
O ? (Z = window.document.activeElement, await dt(), V.value?.focus()) : Z?.isConnected && (Z.focus(), Z = null);
|
|
443
444
|
}), s({ guardChanges: l.guardChanges, prepare: l.prepare, get busy() {
|
|
444
|
-
return
|
|
445
|
+
return $.value;
|
|
445
446
|
}, get pendingLocalChanges() {
|
|
446
447
|
return P.value;
|
|
447
|
-
} }), (
|
|
448
|
+
} }), (O, m) => (S(), M("section", {
|
|
448
449
|
class: ze(["mr-label-studio", { "is-design": t(v) === "design" }]),
|
|
449
450
|
"aria-label": t(y)
|
|
450
451
|
}, [
|
|
451
|
-
r("aside",
|
|
452
|
-
r("div",
|
|
452
|
+
r("aside", qt, [
|
|
453
|
+
r("div", Bt, [
|
|
453
454
|
ve(pe, {
|
|
454
455
|
name: "file",
|
|
455
456
|
size: 18
|
|
@@ -457,7 +458,7 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
457
458
|
r("strong", null, d(t(y)), 1),
|
|
458
459
|
r("small", null, d(t(Q) ? t(a).customTemplate : t(a).readyTemplate), 1)
|
|
459
460
|
]),
|
|
460
|
-
r("div",
|
|
461
|
+
r("div", Ht, [
|
|
461
462
|
r("strong", null, [
|
|
462
463
|
_(d(t(ee)?.widthMm) + " ", 1),
|
|
463
464
|
m[16] || (m[16] = r("i", null, "×", -1)),
|
|
@@ -467,7 +468,7 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
467
468
|
]),
|
|
468
469
|
r("fieldset", {
|
|
469
470
|
class: "mr-label-quick",
|
|
470
|
-
disabled: t(
|
|
471
|
+
disabled: t($)
|
|
471
472
|
}, [
|
|
472
473
|
r("legend", null, d(t(a).layout), 1),
|
|
473
474
|
r("div", {
|
|
@@ -492,14 +493,14 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
492
493
|
r("strong", null, d(t(a)[`${c.id}Preset`]), 1),
|
|
493
494
|
r("small", null, d(c.widthMm) + " × " + d(c.heightMm) + " · " + d(c.faces) + " " + d(t(a).faces), 1)
|
|
494
495
|
])
|
|
495
|
-
], 8,
|
|
496
|
-
], 8,
|
|
497
|
-
r("details",
|
|
496
|
+
], 8, jt))), 128))
|
|
497
|
+
], 8, Ut),
|
|
498
|
+
r("details", Gt, [
|
|
498
499
|
r("summary", null, [
|
|
499
500
|
_(d(t(a).fields) + " ", 1),
|
|
500
501
|
r("span", null, d(t(ae).length) + " / 5", 1)
|
|
501
502
|
]),
|
|
502
|
-
t(G).length ? (S(), M("div",
|
|
503
|
+
t(G).length ? (S(), M("div", Qt, [
|
|
503
504
|
(S(!0), M(be, null, Ne(t(G), (c) => (S(), M("button", {
|
|
504
505
|
key: c.field,
|
|
505
506
|
type: "button",
|
|
@@ -508,9 +509,9 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
508
509
|
}, [
|
|
509
510
|
_(d(c.label) + " ", 1),
|
|
510
511
|
m[18] || (m[18] = r("span", { "aria-hidden": "true" }, "×", -1))
|
|
511
|
-
], 8,
|
|
512
|
+
], 8, Yt))), 128))
|
|
512
513
|
])) : N("", !0),
|
|
513
|
-
r("label",
|
|
514
|
+
r("label", Zt, [
|
|
514
515
|
ve(pe, {
|
|
515
516
|
name: "search",
|
|
516
517
|
size: 13
|
|
@@ -520,11 +521,11 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
520
521
|
type: "search",
|
|
521
522
|
"aria-label": t(a).findField,
|
|
522
523
|
placeholder: t(a).findField
|
|
523
|
-
}, null, 8,
|
|
524
|
+
}, null, 8, Wt), [
|
|
524
525
|
[Se, t(re)]
|
|
525
526
|
])
|
|
526
527
|
]),
|
|
527
|
-
r("div",
|
|
528
|
+
r("div", Xt, [
|
|
528
529
|
(S(!0), M(be, null, Ne(t(ue), (c) => (S(), M("label", {
|
|
529
530
|
key: c.field
|
|
530
531
|
}, [
|
|
@@ -533,15 +534,15 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
533
534
|
checked: t(ae).includes(c.field),
|
|
534
535
|
disabled: !t(ae).includes(c.field) && t(ae).length >= 5,
|
|
535
536
|
onChange: (z) => t(l).toggleField(c.field, z.target.checked)
|
|
536
|
-
}, null, 40,
|
|
537
|
+
}, null, 40, el),
|
|
537
538
|
r("span", null, d(c.label ?? c.field), 1)
|
|
538
539
|
]))), 128)),
|
|
539
|
-
t(ue).length ? N("", !0) : (S(), M("p",
|
|
540
|
+
t(ue).length ? N("", !0) : (S(), M("p", tl, d(t(a).noFields), 1))
|
|
540
541
|
]),
|
|
541
542
|
r("small", null, d(t(a).fieldLimit), 1),
|
|
542
|
-
t(de) > 30 ? (S(), M("small",
|
|
543
|
+
t(de) > 30 ? (S(), M("small", ll, d(t(a).fieldSearchHint), 1)) : N("", !0)
|
|
543
544
|
]),
|
|
544
|
-
r("details",
|
|
545
|
+
r("details", al, [
|
|
545
546
|
r("summary", null, d(t(a).brand), 1),
|
|
546
547
|
r("label", null, [
|
|
547
548
|
_(d(t(a).brandName), 1),
|
|
@@ -549,7 +550,7 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
549
550
|
"onUpdate:modelValue": m[1] || (m[1] = (c) => se(te) ? te.value = c : null),
|
|
550
551
|
maxlength: "80",
|
|
551
552
|
placeholder: t(y)
|
|
552
|
-
}, null, 8,
|
|
553
|
+
}, null, 8, nl), [
|
|
553
554
|
[Se, t(te)]
|
|
554
555
|
])
|
|
555
556
|
]),
|
|
@@ -574,7 +575,7 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
574
575
|
size: 13
|
|
575
576
|
}),
|
|
576
577
|
_(d(t(he) ? t(a).applyLayout : t(a).applyContent), 1)
|
|
577
|
-
], 8,
|
|
578
|
+
], 8, il),
|
|
578
579
|
t(Q) && t(T) && !t(ne) ? (S(), M("button", {
|
|
579
580
|
key: 0,
|
|
580
581
|
class: "mr-label-reset-configuration mr-label-rebuild-current",
|
|
@@ -582,7 +583,7 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
582
583
|
onClick: m[4] || (m[4] = //@ts-ignore
|
|
583
584
|
(...c) => t(l).requestRebuild && t(l).requestRebuild(...c))
|
|
584
585
|
}, d(t(a).rebuildCurrent), 1)) : N("", !0),
|
|
585
|
-
t(ne) ? (S(), M("div",
|
|
586
|
+
t(ne) ? (S(), M("div", sl, [
|
|
586
587
|
r("strong", null, d(t(a).rebuildTitle), 1),
|
|
587
588
|
r("p", null, d(t(a).rebuildDescription), 1),
|
|
588
589
|
r("div", null, [
|
|
@@ -604,22 +605,22 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
604
605
|
onClick: m[7] || (m[7] = //@ts-ignore
|
|
605
606
|
(...c) => t(l).restoreConfiguration && t(l).restoreConfiguration(...c))
|
|
606
607
|
}, d(t(a).restoreConfiguration), 1)) : N("", !0),
|
|
607
|
-
t(ce) && !t(T) ? (S(), M("p",
|
|
608
|
-
r("p",
|
|
609
|
-
], 8,
|
|
610
|
-
r("label",
|
|
608
|
+
t(ce) && !t(T) ? (S(), M("p", ol, d(t(a).choosePreset), 1)) : N("", !0),
|
|
609
|
+
r("p", rl, d(t(he) ? t(a).reflowHint : t(a).contentHint), 1)
|
|
610
|
+
], 8, Kt),
|
|
611
|
+
r("label", ul, [
|
|
611
612
|
_(d(t(a).records), 1),
|
|
612
613
|
W(r("select", {
|
|
613
614
|
"onUpdate:modelValue": m[8] || (m[8] = (c) => se(h) ? h.value = c : null),
|
|
614
|
-
disabled: t(
|
|
615
|
+
disabled: t($) || !o.rows.length
|
|
615
616
|
}, [
|
|
616
|
-
r("option",
|
|
617
|
-
r("option",
|
|
618
|
-
], 8,
|
|
619
|
-
[
|
|
617
|
+
r("option", cl, d(t(a).all) + " · " + d(o.rows.length), 1),
|
|
618
|
+
r("option", fl, d(t(a).single), 1)
|
|
619
|
+
], 8, dl), [
|
|
620
|
+
[ct, t(h)]
|
|
620
621
|
])
|
|
621
622
|
]),
|
|
622
|
-
t(h) === "single" ? (S(), M("label",
|
|
623
|
+
t(h) === "single" ? (S(), M("label", ml, [
|
|
623
624
|
_(d(t(a).record), 1),
|
|
624
625
|
W(r("input", {
|
|
625
626
|
"onUpdate:modelValue": m[9] || (m[9] = (c) => se(D) ? D.value = c : null),
|
|
@@ -627,8 +628,8 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
627
628
|
min: "1",
|
|
628
629
|
max: o.rows.length,
|
|
629
630
|
"aria-label": t(a).record,
|
|
630
|
-
disabled: t(
|
|
631
|
-
}, null, 8,
|
|
631
|
+
disabled: t($)
|
|
632
|
+
}, null, 8, vl), [
|
|
632
633
|
[
|
|
633
634
|
Se,
|
|
634
635
|
t(D),
|
|
@@ -638,31 +639,31 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
638
639
|
]),
|
|
639
640
|
_(" / " + d(o.rows.length), 1)
|
|
640
641
|
])) : N("", !0),
|
|
641
|
-
r("p",
|
|
642
|
+
r("p", bl, [
|
|
642
643
|
r("strong", null, d(t(w).length), 1),
|
|
643
644
|
_(" " + d(t(a).count) + " ", 1),
|
|
644
645
|
m[19] || (m[19] = r("span", null, "→", -1)),
|
|
645
646
|
m[20] || (m[20] = _()),
|
|
646
|
-
t(
|
|
647
|
-
r("strong", null, d(t(
|
|
647
|
+
t(I) !== void 0 ? (S(), M(be, { key: 0 }, [
|
|
648
|
+
r("strong", null, d(t(I)), 1),
|
|
648
649
|
_(" " + d(t(a).labels), 1)
|
|
649
650
|
], 64)) : (S(), M(be, { key: 1 }, [
|
|
650
651
|
_(d(t(a).invalidCopies), 1)
|
|
651
652
|
], 64))
|
|
652
653
|
]),
|
|
653
|
-
r("details",
|
|
654
|
+
r("details", pl, [
|
|
654
655
|
r("summary", null, d(t(a).guide), 1),
|
|
655
656
|
r("p", null, d(t(a).help), 1),
|
|
656
657
|
r("p", null, d(t(a).printHint), 1)
|
|
657
658
|
])
|
|
658
659
|
]),
|
|
659
|
-
r("div",
|
|
660
|
-
r("header",
|
|
660
|
+
r("div", gl, [
|
|
661
|
+
r("header", hl, [
|
|
661
662
|
r("nav", { "aria-label": t(y) }, [
|
|
662
663
|
r("button", {
|
|
663
664
|
type: "button",
|
|
664
665
|
"aria-pressed": t(v) === "preview",
|
|
665
|
-
disabled: t(
|
|
666
|
+
disabled: t($),
|
|
666
667
|
onClick: m[10] || (m[10] = (c) => t(l).navigate("preview"))
|
|
667
668
|
}, [
|
|
668
669
|
ve(pe, {
|
|
@@ -670,11 +671,11 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
670
671
|
size: 14
|
|
671
672
|
}),
|
|
672
673
|
_(d(t(a).preview), 1)
|
|
673
|
-
], 8,
|
|
674
|
+
], 8, wl),
|
|
674
675
|
r("button", {
|
|
675
676
|
type: "button",
|
|
676
677
|
"aria-pressed": t(v) === "design",
|
|
677
|
-
disabled: t(
|
|
678
|
+
disabled: t($),
|
|
678
679
|
onClick: m[11] || (m[11] = (c) => t(l).navigate("design"))
|
|
679
680
|
}, [
|
|
680
681
|
ve(pe, {
|
|
@@ -682,17 +683,17 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
682
683
|
size: 14
|
|
683
684
|
}),
|
|
684
685
|
_(d(t(a).design), 1)
|
|
685
|
-
], 8,
|
|
686
|
-
], 8,
|
|
686
|
+
], 8, Sl)
|
|
687
|
+
], 8, yl),
|
|
687
688
|
r("span", null, d(t(v) === "design" ? t(a).designHint : t(a).flow), 1)
|
|
688
689
|
]),
|
|
689
|
-
t(f) ? (S(), M("p",
|
|
690
|
+
t(f) ? (S(), M("p", Ml, d(t(f)), 1)) : N("", !0),
|
|
690
691
|
t(Y) ? (S(), M("div", {
|
|
691
692
|
key: 1,
|
|
692
693
|
class: "mr-label-confirm",
|
|
693
694
|
role: "alertdialog",
|
|
694
695
|
"aria-label": t(a).discardTitle,
|
|
695
|
-
onKeydown: m[14] || (m[14] =
|
|
696
|
+
onKeydown: m[14] || (m[14] = ft(mt((c) => t(l).decideDiscard(!1), ["prevent", "stop"]), ["esc"]))
|
|
696
697
|
}, [
|
|
697
698
|
r("div", null, [
|
|
698
699
|
r("strong", null, d(t(a).discardTitle), 1),
|
|
@@ -708,8 +709,8 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
708
709
|
type: "button",
|
|
709
710
|
onClick: m[13] || (m[13] = (c) => t(l).decideDiscard(!0))
|
|
710
711
|
}, d(t(a).discard), 1)
|
|
711
|
-
], 40,
|
|
712
|
-
t(v) === "preview" ? (S(),
|
|
712
|
+
], 40, Cl)) : N("", !0),
|
|
713
|
+
t(v) === "preview" ? (S(), Je(t(yt), {
|
|
713
714
|
key: 2,
|
|
714
715
|
"report-id": "labels",
|
|
715
716
|
fetcher: t(j),
|
|
@@ -718,14 +719,14 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
718
719
|
toolbar: { exportFormats: ["pdf", "png", "html"], editing: !1, excelImport: !1 },
|
|
719
720
|
messages: { title: t(y), empty: t(a).empty }
|
|
720
721
|
}, {
|
|
721
|
-
settings:
|
|
722
|
-
r("label",
|
|
722
|
+
settings: vt(() => [
|
|
723
|
+
r("label", kl, [
|
|
723
724
|
W(r("input", {
|
|
724
725
|
"onUpdate:modelValue": m[15] || (m[15] = (c) => se(k) ? k.value = c : null),
|
|
725
726
|
type: "checkbox",
|
|
726
727
|
disabled: !t(me)
|
|
727
|
-
}, null, 8,
|
|
728
|
-
[
|
|
728
|
+
}, null, 8, _l), [
|
|
729
|
+
[bt, t(k)]
|
|
729
730
|
]),
|
|
730
731
|
_(d(t(a).sheet), 1),
|
|
731
732
|
r("small", null, d(t(De)), 1)
|
|
@@ -733,9 +734,9 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
733
734
|
]),
|
|
734
735
|
_: 1
|
|
735
736
|
}, 8, ["fetcher", "messages"])) : N("", !0),
|
|
736
|
-
t(fe) ? W((S(), M("div",
|
|
737
|
-
B.value ? N("", !0) : (S(), M("p",
|
|
738
|
-
B.value ? (S(),
|
|
737
|
+
t(fe) ? W((S(), M("div", Ll, [
|
|
738
|
+
B.value ? N("", !0) : (S(), M("p", Rl, d(t(a).designLoading), 1)),
|
|
739
|
+
B.value ? (S(), Je(pt(B.value), {
|
|
739
740
|
key: 1,
|
|
740
741
|
ref_key: "editor",
|
|
741
742
|
ref: oe,
|
|
@@ -753,12 +754,12 @@ const Jt = ["aria-label"], Pt = { class: "mr-label-context" }, qt = { class: "mr
|
|
|
753
754
|
"onUpdate:modelValue": t(l).update
|
|
754
755
|
}, null, 8, ["model-value", "show-save", "datasets", "data-schemas", "binding-datasets", "save", "before-discard", "preview", "onUpdate:modelValue"])) : N("", !0)
|
|
755
756
|
], 512)), [
|
|
756
|
-
[
|
|
757
|
+
[gt, t(v) === "design"]
|
|
757
758
|
]) : N("", !0)
|
|
758
759
|
])
|
|
759
|
-
], 10,
|
|
760
|
+
], 10, Pt));
|
|
760
761
|
}
|
|
761
762
|
});
|
|
762
763
|
export {
|
|
763
|
-
|
|
764
|
+
Vl as default
|
|
764
765
|
};
|