@agile-team/mach-report 2.23.0 → 2.24.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 +9 -2
- package/dist/ExcelBindingWizard-BV12hGiK.cjs +1 -0
- package/dist/ExcelBindingWizard-Cy_lPjWV.js +1486 -0
- package/dist/ParamEditor-DenKjvKu.cjs +1 -0
- package/dist/ParamEditor-PyOqHzzw.js +750 -0
- package/dist/ReportBatchPanel-8EFtMrKk.js +351 -0
- package/dist/ReportBatchPanel-pQ6d0yqJ.cjs +1 -0
- package/dist/ReportLabelStudio-B_KF3Zc_.cjs +1 -0
- package/dist/ReportLabelStudio-HUeo2TsU.js +784 -0
- package/dist/ReportParamPanel-8xR85nz-.cjs +1 -0
- package/dist/{ReportParamPanel-Dgmqro1Y.js → ReportParamPanel-DA-YpkvC.js} +342 -307
- package/dist/ReportPreview-CyUXJSVX.cjs +6 -0
- package/dist/ReportPreview-_wTJnsG1.js +7120 -0
- package/dist/ReportTemplateLibrary-CjArKxRG.cjs +1 -0
- package/dist/ReportTemplateLibrary-DH8jl9IF.js +312 -0
- package/dist/RuleEditor-Bmj98oC4.cjs +1 -0
- package/dist/RuleEditor-GDydlEHz.js +2354 -0
- package/dist/TemplateOutlinePanel-B554_qk1.cjs +1 -0
- package/dist/TemplateOutlinePanel-DjPqzU9h.js +97 -0
- package/dist/TemplateReusePanel-D0628OYc.cjs +1 -0
- package/dist/TemplateReusePanel-DtYbCN7U.js +389 -0
- package/dist/TemplateReviewPanel-CSwvCz3f.cjs +1 -0
- package/dist/TemplateReviewPanel-D_FR4ISq.js +602 -0
- package/dist/artifact-integrity.json +94 -94
- package/dist/assets-B4AJIOTB.cjs +1 -0
- package/dist/assets-D0FbszhB.js +137 -0
- package/dist/{auto-CTIJ6PnR.js → auto-BksreoKc.js} +5 -5
- package/dist/auto-C3mGqzJ8.cjs +1 -0
- package/dist/capabilities-CTwlcl8q.cjs +1 -0
- package/dist/capabilities-lqDEZSq5.js +121 -0
- package/dist/data-bar-2NLRzOCQ.cjs +1 -0
- package/dist/{data-bar-IkI6VvMQ.js → data-bar-BnGtnJ82.js} +1 -1
- package/dist/designer-BNf7NWd6.js +7589 -0
- package/dist/designer-DWnZZ_ej.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +144 -4
- package/dist/designer.d.ts +144 -4
- package/dist/designer.js +6 -6
- package/dist/diagnostic-collector-1sqd7DQP.js +355 -0
- package/dist/diagnostic-collector-D3rlvxm3.cjs +1 -0
- package/dist/{dom-JWrchIre.js → dom-C90cTM6Y.js} +4 -4
- package/dist/dom-CxOkm_Sy.cjs +1 -0
- package/dist/{encoding-BefcaHdp.cjs → encoding-CkziAnZI.cjs} +1 -1
- package/dist/{encoding-CL6rXEkR.js → encoding-DSc9zv2F.js} +2 -2
- package/dist/{font-loader-Ga51c2VC.cjs → font-loader-D-znWNWS.cjs} +1 -1
- package/dist/{font-loader-BT5baV-o.js → font-loader-i7lZbqH_.js} +1 -1
- package/dist/{grid-strokes-EoY66L2f.js → grid-strokes-BPiV1WHe.js} +1 -1
- package/dist/grid-strokes-DYf-6DMl.cjs +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +46 -7
- package/dist/index.d.ts +46 -7
- package/dist/index.js +69 -68
- package/dist/{json-snapshot-OqkPyUk5.js → json-snapshot-BJWZNryO.js} +919 -791
- package/dist/json-snapshot-C7QZrRBf.cjs +2 -0
- package/dist/{pdf-aobetCsy.js → pdf-0_5XiTCx.js} +2499 -2492
- package/dist/{pdf-HiEeXe9H.cjs → pdf-DWuq6uxx.cjs} +31 -31
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -0
- package/dist/pdf.d.ts +18 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-DeYYAL6F.js → plugin-B1ydqEmS.js} +1 -1
- package/dist/{plugin-BFANt-i8.cjs → plugin-BQBz2vLG.cjs} +1 -1
- package/dist/prefill-2p9wrpn9.cjs +1 -0
- package/dist/{prefill-Dk4C6S5R.js → prefill-Cuzh1wxf.js} +13 -13
- package/dist/prepared-CVbgO9KR.js +128 -0
- package/dist/prepared-DAwe8Il2.cjs +1 -0
- package/dist/protocol-BOri9qJL.js +105 -0
- package/dist/protocol-DD5dHSz-.cjs +1 -0
- package/dist/record-bindings-CAyM5tGg.cjs +1 -0
- package/dist/{record-bindings-DatJZv_e.js → record-bindings-fhav-NLG.js} +1 -1
- package/dist/{region-binding-workflow-DjrXuR1q.js → region-binding-workflow-Cm4mqhih.js} +2 -2
- package/dist/{region-binding-workflow-l7NGfagJ.cjs → region-binding-workflow-DWCUgjZl.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/rich-text-layout-X9YOz1JD.cjs +3 -0
- package/dist/{rich-text-layout-Ciwa6D2o.js → rich-text-layout-YJHtCWQI.js} +1 -1
- package/dist/runtime-BpSAgOw1.js +201 -0
- package/dist/runtime-Cd2UTnwe.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +55 -7
- package/dist/server/node.d.ts +55 -7
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +2710 -2418
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +47 -12
- package/dist/server.d.ts +47 -12
- package/dist/server.js +8 -8
- package/dist/style.css +1 -1
- package/dist/{template-catalog-CoT7jm_6.cjs → template-catalog--yBX169M.cjs} +1 -1
- package/dist/{template-catalog--cjxzgH7.js → template-catalog-Bu7s7ReF.js} +3 -3
- package/dist/template-fragments-5EzVn7bm.cjs +1 -0
- package/dist/{template-fragments-CPpGpQoz.js → template-fragments-Di2vDFnx.js} +2 -2
- package/dist/{template-registry-O0hNIOfB.js → template-registry-BCBF2b8j.js} +10 -10
- package/dist/template-registry-Bnh5aEYf.cjs +1 -0
- package/dist/textwrap-BPFxhpOw.cjs +4 -0
- package/dist/textwrap-CmVkhMhx.js +111 -0
- package/dist/vue/async.d.cts +104 -18
- package/dist/vue/async.d.ts +104 -18
- package/dist/vue/index.d.cts +134 -28
- package/dist/vue/index.d.ts +134 -28
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +192 -162
- package/dist/{workbook-session-C9ZmCBwY.js → workbook-session-B6P_-5a4.js} +2 -2
- package/dist/{workbook-session-C6-SrnCT.cjs → workbook-session-BnPK3T58.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +55 -7
- package/dist/worker.d.ts +55 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +18 -1
- package/dist/xlsx.d.ts +18 -1
- package/dist/xlsx.js +279 -272
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-D4FLind-.js +0 -1485
- package/dist/ExcelBindingWizard-D4RS5Bpg.cjs +0 -1
- package/dist/ParamEditor-C-6C9rd2.cjs +0 -1
- package/dist/ParamEditor-CASZt-Ma.js +0 -732
- package/dist/ReportBatchPanel-Bq7t8a5r.js +0 -350
- package/dist/ReportBatchPanel-YVj5IO5y.cjs +0 -1
- package/dist/ReportLabelStudio-Cqhita1b.cjs +0 -1
- package/dist/ReportLabelStudio-Dj7GXhuv.js +0 -783
- package/dist/ReportParamPanel-DZbFVmDL.cjs +0 -1
- package/dist/ReportPreview-DeWzG8jQ.js +0 -6257
- package/dist/ReportPreview-FFIryrIr.cjs +0 -6
- package/dist/ReportTemplateLibrary-BaWodmpm.cjs +0 -1
- package/dist/ReportTemplateLibrary-DdAAAD2I.js +0 -311
- package/dist/RuleEditor-D2UwQGF6.js +0 -2341
- package/dist/RuleEditor-DcT9xI1v.cjs +0 -1
- package/dist/TemplateOutlinePanel-CUHFFiNM.cjs +0 -1
- package/dist/TemplateOutlinePanel-DrT7XN0m.js +0 -96
- package/dist/TemplateReusePanel-4eejkNqi.js +0 -388
- package/dist/TemplateReusePanel-DZMyiX5I.cjs +0 -1
- package/dist/TemplateReviewPanel-BIhNLeNw.js +0 -592
- package/dist/TemplateReviewPanel-DnYImiXu.cjs +0 -1
- package/dist/assets-D2gHc4Mz.cjs +0 -1
- package/dist/assets-T_gDeFaz.js +0 -132
- package/dist/auto-4pK9HePf.cjs +0 -1
- package/dist/capabilities-DiBj4Qgl.cjs +0 -1
- package/dist/capabilities-pg7j7VLT.js +0 -106
- package/dist/data-bar-CeZuFmYl.cjs +0 -1
- package/dist/designer-DhrE7jzw.js +0 -7169
- package/dist/designer-IAZu6kBX.cjs +0 -2
- package/dist/dom-ChE5D-L-.cjs +0 -1
- package/dist/grid-strokes-Be24LGuV.cjs +0 -1
- package/dist/json-snapshot-1tvQNzQE.cjs +0 -2
- package/dist/prefill-DsUD5OoK.cjs +0 -1
- package/dist/prepared-DCIxhKFo.js +0 -94
- package/dist/prepared-Dv-XM3i1.cjs +0 -1
- package/dist/progress-ByiOxUD3.js +0 -250
- package/dist/progress-WomPRP3B.cjs +0 -1
- package/dist/protocol-B9YgfQ_d.cjs +0 -1
- package/dist/protocol-DxeUKGYG.js +0 -90
- package/dist/record-bindings-MBxbeBsi.cjs +0 -1
- package/dist/rich-text-layout-DK7A_a5r.cjs +0 -3
- package/dist/runtime-75Y5Oq5B.js +0 -171
- package/dist/runtime-DKlGd_D4.cjs +0 -1
- package/dist/template-fragments-GVjpew_q.cjs +0 -1
- package/dist/template-registry-DI59PXVK.cjs +0 -1
- package/dist/textwrap-BIjtEWmq.js +0 -110
- package/dist/textwrap-Cy7o1hIR.cjs +0 -4
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
import { shallowRef as W, ref as E, computed as $, watch as K, onBeforeUnmount as ue, toRaw as ie, defineComponent as re, openBlock as r, createElementBlock as n, toDisplayString as t, createCommentVNode as p, Fragment as P, createElementVNode as a, createVNode as ee, unref as l, normalizeStyle as ce, createTextVNode as M, withDirectives as B, isRef as G, vModelSelect as de, renderList as L, vModelText as te, vModelCheckbox as le, normalizeClass as X, createBlock as ve } from "vue";
|
|
2
|
+
import { reviewReportTemplateAsync as me, paginateTemplate as pe } from "@agile-team/mach-report";
|
|
3
|
+
import { T as Y, u as fe, r as he } from "./designer-BNf7NWd6.js";
|
|
4
|
+
import { ReportPreview as se } from "@agile-team/mach-report/vue";
|
|
5
|
+
import { b as ge } from "./template-serialization-CWmHq7lX.js";
|
|
6
|
+
import { _ as ne } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
7
|
+
function we(o, v = () => o.fixtures) {
|
|
8
|
+
const i = W(), u = W([]), c = E("20"), e = E(!1), g = E(!1), m = E(!1), k = E(""), b = W(), d = E(!1), R = W(), U = $(
|
|
9
|
+
() => new Set(
|
|
10
|
+
o.document.template.pages.flatMap((h) => h.components).flatMap(
|
|
11
|
+
(h) => h.kind === "list" && h.tree ? [h.dataset] : []
|
|
12
|
+
)
|
|
13
|
+
)
|
|
14
|
+
), y = $(() => U.value.size > 0);
|
|
15
|
+
let x = 0, _;
|
|
16
|
+
function w() {
|
|
17
|
+
x++, _?.abort(), _ = void 0, g.value = !1, d.value = !1, b.value = void 0, m.value = !!i.value, k.value = "";
|
|
18
|
+
}
|
|
19
|
+
for (const h of [() => o.document, () => o.previous])
|
|
20
|
+
K(
|
|
21
|
+
h,
|
|
22
|
+
() => {
|
|
23
|
+
e.value = !1, w();
|
|
24
|
+
},
|
|
25
|
+
{ deep: !0, flush: "sync" }
|
|
26
|
+
);
|
|
27
|
+
for (const h of [
|
|
28
|
+
() => o.datasets,
|
|
29
|
+
() => o.dataSchemas,
|
|
30
|
+
() => o.formats,
|
|
31
|
+
v
|
|
32
|
+
])
|
|
33
|
+
K(h, w, { deep: !0, flush: "sync" });
|
|
34
|
+
K([c, e], w, { flush: "sync" }), ue(() => {
|
|
35
|
+
x++, _?.abort();
|
|
36
|
+
});
|
|
37
|
+
const F = $(
|
|
38
|
+
() => i.value?.issues.filter((h) => h.severity === "error").length ?? 0
|
|
39
|
+
);
|
|
40
|
+
function H() {
|
|
41
|
+
_?.abort(), _ = new AbortController();
|
|
42
|
+
const h = ++x, N = _;
|
|
43
|
+
g.value = !0, k.value = "", d.value = !1, b.value = void 0, O(h, N);
|
|
44
|
+
}
|
|
45
|
+
async function O(h, N) {
|
|
46
|
+
try {
|
|
47
|
+
const S = Number(c.value), q = Object.fromEntries(
|
|
48
|
+
Object.entries(o.datasets ?? {}).map(([T, D]) => [
|
|
49
|
+
T,
|
|
50
|
+
S < 0 || U.value.has(T) ? D : D.slice(0, S)
|
|
51
|
+
])
|
|
52
|
+
), z = v(), A = z?.length ? [...z] : S === 0 ? [] : [{ name: c.value, datasets: q }], V = await me(o.document, {
|
|
53
|
+
previous: o.previous,
|
|
54
|
+
dataSchemas: o.dataSchemas,
|
|
55
|
+
formats: o.formats,
|
|
56
|
+
allowBreakingChanges: e.value,
|
|
57
|
+
...!z?.length && y.value && S > 0 ? { maxSampleRows: S } : {},
|
|
58
|
+
fixtures: A,
|
|
59
|
+
signal: N.signal,
|
|
60
|
+
onProgress: (T) => {
|
|
61
|
+
h === x && (b.value = T);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
if (h !== x) return;
|
|
65
|
+
i.value = V, m.value = !1, u.value = A, R.value = {
|
|
66
|
+
requested: c.value,
|
|
67
|
+
rows: V.samples.reduce((T, D) => T + D.rows, 0),
|
|
68
|
+
datasets: new Set(
|
|
69
|
+
A.flatMap((T) => Object.keys(T.datasets))
|
|
70
|
+
).size,
|
|
71
|
+
formats: [...o.formats ?? []]
|
|
72
|
+
};
|
|
73
|
+
} catch (S) {
|
|
74
|
+
h === x && !N.signal.aborted && (k.value = S instanceof Error ? S.message : String(S));
|
|
75
|
+
} finally {
|
|
76
|
+
h === x && (g.value = !1, _ = void 0);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function Q() {
|
|
80
|
+
x++, _?.abort(), _ = void 0, g.value = !1, d.value = !0, b.value = void 0;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
report: i,
|
|
84
|
+
sampleSize: c,
|
|
85
|
+
acknowledged: e,
|
|
86
|
+
running: g,
|
|
87
|
+
stale: m,
|
|
88
|
+
failure: k,
|
|
89
|
+
checkedScope: R,
|
|
90
|
+
checkedFixtures: u,
|
|
91
|
+
hasTree: y,
|
|
92
|
+
errors: F,
|
|
93
|
+
run: H,
|
|
94
|
+
cancel: Q,
|
|
95
|
+
progress: b,
|
|
96
|
+
cancelled: d
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function ye(o) {
|
|
100
|
+
const v = Object.getPrototypeOf(o);
|
|
101
|
+
if (v !== Object.prototype && v !== Array.prototype && v !== null)
|
|
102
|
+
throw new Error("Sample data must contain plain JSON objects");
|
|
103
|
+
if (Object.getOwnPropertySymbols(o).length)
|
|
104
|
+
throw new Error("Sample data must not contain symbols");
|
|
105
|
+
if (Array.isArray(o) && Object.keys(o).length !== o.length)
|
|
106
|
+
throw new Error("Sample arrays must not contain holes or extra properties");
|
|
107
|
+
}
|
|
108
|
+
function be(o) {
|
|
109
|
+
let v = 0, i = 0;
|
|
110
|
+
const u = /* @__PURE__ */ new Set();
|
|
111
|
+
function c(e, g) {
|
|
112
|
+
if (++v > 1e5 || g > 32)
|
|
113
|
+
throw new RangeError("Sample data exceeds the capture budget");
|
|
114
|
+
if (typeof e == "string") {
|
|
115
|
+
if (i += e.length, i > 2e6)
|
|
116
|
+
throw new RangeError("Sample text exceeds the capture budget");
|
|
117
|
+
return e;
|
|
118
|
+
}
|
|
119
|
+
if (e === null || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e)) return e;
|
|
120
|
+
if (!e || typeof e != "object")
|
|
121
|
+
throw new Error("Sample data must contain plain JSON values");
|
|
122
|
+
const m = ie(e);
|
|
123
|
+
if (u.has(m))
|
|
124
|
+
throw new Error("Sample data must not contain cycles");
|
|
125
|
+
ye(m), u.add(m);
|
|
126
|
+
const k = Array.isArray(m) ? [] : /* @__PURE__ */ Object.create(null);
|
|
127
|
+
for (const b of Object.keys(m)) {
|
|
128
|
+
const d = Object.getOwnPropertyDescriptor(m, b);
|
|
129
|
+
if (d.get || d.set || ["__proto__", "constructor", "prototype"].includes(b))
|
|
130
|
+
throw new Error("Sample data must not contain getters or unsafe keys");
|
|
131
|
+
k[b] = c(
|
|
132
|
+
d.value,
|
|
133
|
+
g + 1
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
return u.delete(m), k;
|
|
137
|
+
}
|
|
138
|
+
return c(o, 0);
|
|
139
|
+
}
|
|
140
|
+
function _e(o, v = () => Y) {
|
|
141
|
+
const i = E([]), u = E(""), c = E(!1), e = E(""), g = E({}), m = $(() => [...o.fixtures ?? [], ...i.value]);
|
|
142
|
+
function k() {
|
|
143
|
+
e.value = "";
|
|
144
|
+
try {
|
|
145
|
+
if (!c.value) throw new Error(v().sampleConsentMissing);
|
|
146
|
+
if (!u.value.trim()) throw new Error(v().sampleNameMissing);
|
|
147
|
+
if (m.value.length >= 20) throw new Error(v().sampleLimit);
|
|
148
|
+
if (m.value.some((R) => R.name === u.value.trim()))
|
|
149
|
+
throw new Error(v().sampleNameDuplicate);
|
|
150
|
+
const d = be(o.datasets ?? {});
|
|
151
|
+
if (Object.values(d).reduce((R, U) => R + U.length, 0) > 1e3)
|
|
152
|
+
throw new Error(v().sampleRowsLimit);
|
|
153
|
+
i.value.push({
|
|
154
|
+
name: u.value.trim(),
|
|
155
|
+
datasets: d,
|
|
156
|
+
...Object.keys(g.value).length ? { params: { ...g.value } } : {}
|
|
157
|
+
}), u.value = "", c.value = !1;
|
|
158
|
+
} catch (d) {
|
|
159
|
+
e.value = d instanceof Error ? d.message : String(d);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function b(d) {
|
|
163
|
+
i.value.splice(d, 1);
|
|
164
|
+
}
|
|
165
|
+
return { fixtures: i, name: u, consent: c, failure: e, params: g, suite: m, capture: k, remove: b };
|
|
166
|
+
}
|
|
167
|
+
function ae(o, v) {
|
|
168
|
+
const i = pe(o.template, v.datasets, {
|
|
169
|
+
maxPages: 100,
|
|
170
|
+
maxCells: 25e4
|
|
171
|
+
}), u = [
|
|
172
|
+
...new Set(
|
|
173
|
+
ge(o.template).flatMap(
|
|
174
|
+
(c) => c.fields.map((e) => `${c.dataset}.${e.field}`)
|
|
175
|
+
)
|
|
176
|
+
)
|
|
177
|
+
];
|
|
178
|
+
return {
|
|
179
|
+
pages: i.plan.pages.length,
|
|
180
|
+
dimensions: [
|
|
181
|
+
...new Set(
|
|
182
|
+
i.plan.pages.map(
|
|
183
|
+
(c) => `${c.pageWidthMm} × ${c.pageHeightMm} mm`
|
|
184
|
+
)
|
|
185
|
+
)
|
|
186
|
+
],
|
|
187
|
+
fields: u,
|
|
188
|
+
fetcher: async () => i.plan
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function ke(o, v, i) {
|
|
192
|
+
const u = ae(o, v), c = i ? ae(i, v) : void 0, e = new Set(c?.fields), g = new Set(u.fields);
|
|
193
|
+
return {
|
|
194
|
+
current: u,
|
|
195
|
+
previous: c,
|
|
196
|
+
addedFields: u.fields.filter((m) => !e.has(m)),
|
|
197
|
+
removedFields: c?.fields.filter((m) => !g.has(m)) ?? []
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
const xe = ["aria-label"], Se = {
|
|
201
|
+
key: 0,
|
|
202
|
+
role: "alert"
|
|
203
|
+
}, Ce = { class: "mr-fixture-previews" }, Ee = { key: 0 }, Te = /* @__PURE__ */ re({
|
|
204
|
+
__name: "TemplateFixtureComparison",
|
|
205
|
+
props: {
|
|
206
|
+
document: {},
|
|
207
|
+
previous: {},
|
|
208
|
+
fixture: {},
|
|
209
|
+
messages: {}
|
|
210
|
+
},
|
|
211
|
+
setup(o) {
|
|
212
|
+
const v = o, i = $(() => ({ ...Y, ...v.messages })), u = $(() => {
|
|
213
|
+
try {
|
|
214
|
+
return {
|
|
215
|
+
result: ke(
|
|
216
|
+
v.document,
|
|
217
|
+
v.fixture,
|
|
218
|
+
v.previous
|
|
219
|
+
)
|
|
220
|
+
};
|
|
221
|
+
} catch (c) {
|
|
222
|
+
return { error: c instanceof Error ? c.message : String(c) };
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
return (c, e) => (r(), n("section", {
|
|
226
|
+
class: "mr-fixture-comparison",
|
|
227
|
+
"aria-label": i.value.compare
|
|
228
|
+
}, [
|
|
229
|
+
u.value.error ? (r(), n("p", Se, t(u.value.error), 1)) : p("", !0),
|
|
230
|
+
u.value.result ? (r(), n(P, { key: 1 }, [
|
|
231
|
+
a("dl", null, [
|
|
232
|
+
a("dt", null, t(i.value.pages), 1),
|
|
233
|
+
a("dd", null, t(u.value.result.previous?.pages ?? "—") + " → " + t(u.value.result.current.pages), 1),
|
|
234
|
+
a("dt", null, t(i.value.dimensions), 1),
|
|
235
|
+
a("dd", null, t(u.value.result.previous?.dimensions.join(" / ") ?? "—") + " → " + t(u.value.result.current.dimensions.join(" / ")), 1),
|
|
236
|
+
a("dt", null, t(i.value.fieldsAdded), 1),
|
|
237
|
+
a("dd", null, t(u.value.result.addedFields.join("、") || "—"), 1),
|
|
238
|
+
a("dt", null, t(i.value.fieldsRemoved), 1),
|
|
239
|
+
a("dd", null, t(u.value.result.removedFields.join("、") || "—"), 1)
|
|
240
|
+
]),
|
|
241
|
+
a("div", Ce, [
|
|
242
|
+
u.value.result.previous ? (r(), n("article", Ee, [
|
|
243
|
+
a("h4", null, t(i.value.baselinePreview), 1),
|
|
244
|
+
ee(l(se), {
|
|
245
|
+
"report-id": "baseline",
|
|
246
|
+
fetcher: u.value.result.previous.fetcher,
|
|
247
|
+
"show-params": !1,
|
|
248
|
+
"show-export": !1,
|
|
249
|
+
"show-print": !1,
|
|
250
|
+
"show-pdf-window": !1,
|
|
251
|
+
editable: !1,
|
|
252
|
+
"excel-import": !1,
|
|
253
|
+
height: "400px"
|
|
254
|
+
}, null, 8, ["fetcher"])
|
|
255
|
+
])) : p("", !0),
|
|
256
|
+
a("article", null, [
|
|
257
|
+
a("h4", null, t(i.value.draftPreview), 1),
|
|
258
|
+
ee(l(se), {
|
|
259
|
+
"report-id": "draft",
|
|
260
|
+
fetcher: u.value.result.current.fetcher,
|
|
261
|
+
"show-params": !1,
|
|
262
|
+
"show-export": !1,
|
|
263
|
+
"show-print": !1,
|
|
264
|
+
"show-pdf-window": !1,
|
|
265
|
+
editable: !1,
|
|
266
|
+
"excel-import": !1,
|
|
267
|
+
height: "400px"
|
|
268
|
+
}, null, 8, ["fetcher"])
|
|
269
|
+
])
|
|
270
|
+
])
|
|
271
|
+
], 64)) : p("", !0)
|
|
272
|
+
], 8, xe));
|
|
273
|
+
}
|
|
274
|
+
}), je = /* @__PURE__ */ ne(Te, [["__scopeId", "data-v-6409d556"]]), Fe = ["aria-label", "aria-busy"], Oe = {
|
|
275
|
+
key: 0,
|
|
276
|
+
role: "status"
|
|
277
|
+
}, Re = ["disabled"], Me = {
|
|
278
|
+
key: 0,
|
|
279
|
+
class: "mr-review-stale",
|
|
280
|
+
role: "status"
|
|
281
|
+
}, Pe = { class: "mr-review-controls" }, Ne = ["aria-label", "disabled"], Ve = { value: "0" }, $e = { value: "20" }, Ae = { value: "100" }, De = { value: "-1" }, Ue = {
|
|
282
|
+
key: 0,
|
|
283
|
+
class: "mr-review-note"
|
|
284
|
+
}, Ie = { class: "mr-review-fixtures" }, ze = { class: "mr-review-note" }, Be = { key: 0 }, Le = ["disabled", "onClick"], He = { class: "mr-review-fixture-form" }, qe = ["placeholder", "disabled"], Je = { key: 0 }, We = ["onUpdate:modelValue", "placeholder", "disabled"], Ge = { class: "mr-review-consent" }, Ke = ["disabled"], Qe = ["disabled"], Xe = {
|
|
285
|
+
key: 1,
|
|
286
|
+
role: "alert",
|
|
287
|
+
class: "is-error"
|
|
288
|
+
}, Ye = {
|
|
289
|
+
key: 1,
|
|
290
|
+
class: "mr-review-note"
|
|
291
|
+
}, Ze = {
|
|
292
|
+
key: 2,
|
|
293
|
+
class: "is-error",
|
|
294
|
+
role: "alert"
|
|
295
|
+
}, et = {
|
|
296
|
+
key: 3,
|
|
297
|
+
class: "mr-review-stale",
|
|
298
|
+
role: "status"
|
|
299
|
+
}, tt = {
|
|
300
|
+
key: 4,
|
|
301
|
+
class: "mr-review-note"
|
|
302
|
+
}, lt = {
|
|
303
|
+
key: 0,
|
|
304
|
+
class: "mr-review-summary",
|
|
305
|
+
role: "status"
|
|
306
|
+
}, st = {
|
|
307
|
+
key: 0,
|
|
308
|
+
class: "mr-review-note"
|
|
309
|
+
}, at = {
|
|
310
|
+
key: 1,
|
|
311
|
+
class: "mr-review-note"
|
|
312
|
+
}, rt = {
|
|
313
|
+
key: 2,
|
|
314
|
+
class: "mr-review-list"
|
|
315
|
+
}, nt = { key: 0 }, ot = ["disabled", "onClick"], ut = { key: 2 }, it = {
|
|
316
|
+
key: 3,
|
|
317
|
+
class: "mr-review-note"
|
|
318
|
+
}, ct = {
|
|
319
|
+
key: 4,
|
|
320
|
+
class: "mr-review-ack"
|
|
321
|
+
}, dt = {
|
|
322
|
+
key: 0,
|
|
323
|
+
class: "mr-review-note"
|
|
324
|
+
}, vt = {
|
|
325
|
+
key: 1,
|
|
326
|
+
class: "mr-review-list"
|
|
327
|
+
}, mt = ["disabled", "onClick"], pt = { key: 1 }, ft = {
|
|
328
|
+
key: 0,
|
|
329
|
+
class: "mr-review-scope"
|
|
330
|
+
}, ht = { key: 0 }, gt = ["disabled", "onClick"], wt = { class: "mr-review-note" }, yt = /* @__PURE__ */ re({
|
|
331
|
+
__name: "TemplateReviewPanel",
|
|
332
|
+
props: {
|
|
333
|
+
document: {},
|
|
334
|
+
previous: {},
|
|
335
|
+
datasets: {},
|
|
336
|
+
dataSchemas: {},
|
|
337
|
+
formats: {},
|
|
338
|
+
fixtures: {},
|
|
339
|
+
messages: {},
|
|
340
|
+
capabilities: {}
|
|
341
|
+
},
|
|
342
|
+
emits: ["locate"],
|
|
343
|
+
setup(o, { emit: v }) {
|
|
344
|
+
const i = fe(), u = o, c = v, e = $(() => ({ ...Y, ...u.messages })), {
|
|
345
|
+
name: g,
|
|
346
|
+
consent: m,
|
|
347
|
+
failure: k,
|
|
348
|
+
params: b,
|
|
349
|
+
suite: d,
|
|
350
|
+
capture: R,
|
|
351
|
+
remove: U
|
|
352
|
+
} = _e(u, () => e.value), {
|
|
353
|
+
report: y,
|
|
354
|
+
sampleSize: x,
|
|
355
|
+
acknowledged: _,
|
|
356
|
+
running: w,
|
|
357
|
+
stale: F,
|
|
358
|
+
failure: H,
|
|
359
|
+
checkedScope: O,
|
|
360
|
+
checkedFixtures: Q,
|
|
361
|
+
hasTree: h,
|
|
362
|
+
errors: N,
|
|
363
|
+
run: S,
|
|
364
|
+
cancel: q,
|
|
365
|
+
cancelled: z,
|
|
366
|
+
progress: A
|
|
367
|
+
} = we(u, () => d.value), V = E(), T = $(
|
|
368
|
+
() => Q.value.find((C) => C.name === V.value)
|
|
369
|
+
);
|
|
370
|
+
K(F, (C) => {
|
|
371
|
+
C && (V.value = void 0);
|
|
372
|
+
});
|
|
373
|
+
function D(C, f) {
|
|
374
|
+
const s = J(C).target;
|
|
375
|
+
s && (f.currentTarget instanceof HTMLElement && f.currentTarget.focus({ preventScroll: !0 }), c("locate", { ...C, pageIndex: s.pageIndex, componentIndex: s.componentIndex, field: C.field ?? s.field }));
|
|
376
|
+
}
|
|
377
|
+
function J(C, f = !1) {
|
|
378
|
+
return he(u.document, C, f, u.capabilities);
|
|
379
|
+
}
|
|
380
|
+
function Z(C, f = !1) {
|
|
381
|
+
const s = J(C, f).reason;
|
|
382
|
+
return s === "removed" ? e.value.locationRemoved : s === "external" ? e.value.locationExternal : e.value.locationUnavailable;
|
|
383
|
+
}
|
|
384
|
+
return (C, f) => (r(), n("section", {
|
|
385
|
+
class: "mr-template-review",
|
|
386
|
+
style: ce(l(i)),
|
|
387
|
+
"aria-label": e.value.title,
|
|
388
|
+
"aria-busy": l(w)
|
|
389
|
+
}, [
|
|
390
|
+
a("header", null, [
|
|
391
|
+
a("strong", null, t(e.value.title), 1),
|
|
392
|
+
l(w) && l(A) ? (r(), n("span", Oe, t(l(A).completed) + " / " + t(l(A).total) + " " + t(e.value.progress), 1)) : p("", !0),
|
|
393
|
+
l(w) ? (r(), n("button", {
|
|
394
|
+
key: 1,
|
|
395
|
+
type: "button",
|
|
396
|
+
onClick: f[0] || (f[0] = //@ts-ignore
|
|
397
|
+
(...s) => l(q) && l(q)(...s))
|
|
398
|
+
}, t(e.value.cancel), 1)) : p("", !0),
|
|
399
|
+
a("button", {
|
|
400
|
+
type: "button",
|
|
401
|
+
disabled: l(w),
|
|
402
|
+
onClick: f[1] || (f[1] = //@ts-ignore
|
|
403
|
+
(...s) => l(S) && l(S)(...s))
|
|
404
|
+
}, t(l(w) ? e.value.running : e.value.run), 9, Re)
|
|
405
|
+
]),
|
|
406
|
+
l(z) ? (r(), n("p", Me, t(e.value.cancelled), 1)) : p("", !0),
|
|
407
|
+
a("div", Pe, [
|
|
408
|
+
a("label", null, [
|
|
409
|
+
M(t(e.value.samples), 1),
|
|
410
|
+
B(a("select", {
|
|
411
|
+
"onUpdate:modelValue": f[2] || (f[2] = (s) => G(x) ? x.value = s : null),
|
|
412
|
+
"aria-label": e.value.samples,
|
|
413
|
+
disabled: l(w) || !!l(d).length
|
|
414
|
+
}, [
|
|
415
|
+
a("option", Ve, t(e.value.none), 1),
|
|
416
|
+
a("option", $e, t(e.value.first20), 1),
|
|
417
|
+
a("option", Ae, t(e.value.first100), 1),
|
|
418
|
+
a("option", De, t(e.value.all), 1)
|
|
419
|
+
], 8, Ne), [
|
|
420
|
+
[de, l(x)]
|
|
421
|
+
])
|
|
422
|
+
]),
|
|
423
|
+
l(d).length ? (r(), n("span", Ue, t(e.value.namedFixtures) + " · " + t(l(d).length), 1)) : p("", !0)
|
|
424
|
+
]),
|
|
425
|
+
a("details", Ie, [
|
|
426
|
+
a("summary", null, [
|
|
427
|
+
M(t(e.value.namedFixtures) + " ", 1),
|
|
428
|
+
a("small", null, t(l(d).length) + " / 20", 1)
|
|
429
|
+
]),
|
|
430
|
+
a("p", ze, t(e.value.fixtureHint), 1),
|
|
431
|
+
l(d).length ? (r(), n("ul", Be, [
|
|
432
|
+
(r(!0), n(P, null, L(l(d), (s, j) => (r(), n("li", {
|
|
433
|
+
key: s.name
|
|
434
|
+
}, [
|
|
435
|
+
a("strong", null, t(s.name), 1),
|
|
436
|
+
a("span", null, t(Object.values(s.datasets).reduce(
|
|
437
|
+
(I, oe) => I + oe.length,
|
|
438
|
+
0
|
|
439
|
+
)) + " " + t(e.value.rows), 1),
|
|
440
|
+
j >= (o.fixtures?.length ?? 0) ? (r(), n("button", {
|
|
441
|
+
key: 0,
|
|
442
|
+
type: "button",
|
|
443
|
+
disabled: l(w),
|
|
444
|
+
onClick: (I) => l(U)(j - (o.fixtures?.length ?? 0))
|
|
445
|
+
}, t(e.value.remove), 9, Le)) : p("", !0)
|
|
446
|
+
]))), 128))
|
|
447
|
+
])) : p("", !0),
|
|
448
|
+
a("div", He, [
|
|
449
|
+
a("label", null, [
|
|
450
|
+
M(t(e.value.fixtureName), 1),
|
|
451
|
+
B(a("input", {
|
|
452
|
+
"onUpdate:modelValue": f[3] || (f[3] = (s) => G(g) ? g.value = s : null),
|
|
453
|
+
placeholder: e.value.fixturePlaceholder,
|
|
454
|
+
disabled: l(w)
|
|
455
|
+
}, null, 8, qe), [
|
|
456
|
+
[te, l(g)]
|
|
457
|
+
])
|
|
458
|
+
]),
|
|
459
|
+
o.document.template.params?.length ? (r(), n("details", Je, [
|
|
460
|
+
a("summary", null, t(e.value.parameters), 1),
|
|
461
|
+
(r(!0), n(P, null, L(o.document.template.params, (s) => (r(), n("label", {
|
|
462
|
+
key: s.field
|
|
463
|
+
}, [
|
|
464
|
+
M(t(s.label ?? s.field), 1),
|
|
465
|
+
B(a("input", {
|
|
466
|
+
"onUpdate:modelValue": (j) => l(b)[s.field] = j,
|
|
467
|
+
placeholder: s.defaultValue,
|
|
468
|
+
disabled: l(w)
|
|
469
|
+
}, null, 8, We), [
|
|
470
|
+
[te, l(b)[s.field]]
|
|
471
|
+
])
|
|
472
|
+
]))), 128))
|
|
473
|
+
])) : p("", !0),
|
|
474
|
+
a("label", Ge, [
|
|
475
|
+
B(a("input", {
|
|
476
|
+
"onUpdate:modelValue": f[4] || (f[4] = (s) => G(m) ? m.value = s : null),
|
|
477
|
+
type: "checkbox",
|
|
478
|
+
disabled: l(w)
|
|
479
|
+
}, null, 8, Ke), [
|
|
480
|
+
[le, l(m)]
|
|
481
|
+
]),
|
|
482
|
+
M(t(e.value.deidentified), 1)
|
|
483
|
+
]),
|
|
484
|
+
a("button", {
|
|
485
|
+
type: "button",
|
|
486
|
+
disabled: l(w) || !l(m) || !l(g).trim() || l(d).length >= 20,
|
|
487
|
+
onClick: f[5] || (f[5] = //@ts-ignore
|
|
488
|
+
(...s) => l(R) && l(R)(...s))
|
|
489
|
+
}, t(e.value.capture), 9, Qe),
|
|
490
|
+
l(k) ? (r(), n("p", Xe, t(l(k)), 1)) : p("", !0)
|
|
491
|
+
])
|
|
492
|
+
]),
|
|
493
|
+
l(h) ? (r(), n("p", Ye, t(e.value.treeHint), 1)) : p("", !0),
|
|
494
|
+
l(H) ? (r(), n("p", Ze, t(l(H)), 1)) : p("", !0),
|
|
495
|
+
l(F) ? (r(), n("p", et, t(e.value.stale), 1)) : p("", !0),
|
|
496
|
+
l(y) ? (r(), n(P, { key: 5 }, [
|
|
497
|
+
l(F) ? p("", !0) : (r(), n("div", lt, [
|
|
498
|
+
a("span", {
|
|
499
|
+
class: X({ "is-error": l(N) })
|
|
500
|
+
}, t(l(N)) + " " + t(e.value.errors), 3),
|
|
501
|
+
a("span", null, t(l(y).issues.length - l(N)) + " " + t(e.value.warnings), 1)
|
|
502
|
+
])),
|
|
503
|
+
a("section", null, [
|
|
504
|
+
a("h3", null, [
|
|
505
|
+
M(t(e.value.changes) + " ", 1),
|
|
506
|
+
a("small", null, t(l(y).changes?.totalChanges ?? 0), 1)
|
|
507
|
+
]),
|
|
508
|
+
o.previous ? l(y).changes?.totalChanges ? (r(), n("ol", rt, [
|
|
509
|
+
(r(!0), n(P, null, L(l(y).changes?.changes, (s, j) => (r(), n("li", { key: j }, [
|
|
510
|
+
a("div", null, [
|
|
511
|
+
a("span", null, t(e.value.categories[s.category]) + " · " + t(e.value.kinds[s.kind]), 1),
|
|
512
|
+
s.breaking ? (r(), n("b", nt, t(e.value.breaking), 1)) : p("", !0),
|
|
513
|
+
J({ path: s.path }, s.kind === "removed").target ? (r(), n("button", {
|
|
514
|
+
key: 1,
|
|
515
|
+
type: "button",
|
|
516
|
+
disabled: l(F) || l(w),
|
|
517
|
+
onClick: (I) => D({ path: s.path }, I)
|
|
518
|
+
}, t(e.value.locate), 9, ot)) : (r(), n("small", ut, t(Z({ path: s.path }, s.kind === "removed")), 1))
|
|
519
|
+
]),
|
|
520
|
+
a("code", null, t(s.path), 1),
|
|
521
|
+
a("dl", null, [
|
|
522
|
+
s.before !== void 0 ? (r(), n(P, { key: 0 }, [
|
|
523
|
+
a("dt", null, t(e.value.before), 1),
|
|
524
|
+
a("dd", null, t(s.before), 1)
|
|
525
|
+
], 64)) : p("", !0),
|
|
526
|
+
s.after !== void 0 ? (r(), n(P, { key: 1 }, [
|
|
527
|
+
a("dt", null, t(e.value.after), 1),
|
|
528
|
+
a("dd", null, t(s.after), 1)
|
|
529
|
+
], 64)) : p("", !0)
|
|
530
|
+
])
|
|
531
|
+
]))), 128))
|
|
532
|
+
])) : (r(), n("p", at, t(e.value.noChanges), 1)) : (r(), n("p", st, t(e.value.baseline), 1)),
|
|
533
|
+
l(y).changes?.truncated ? (r(), n("p", it, t(e.value.truncated), 1)) : p("", !0),
|
|
534
|
+
l(y).changes?.breakingChanges ? (r(), n("label", ct, [
|
|
535
|
+
B(a("input", {
|
|
536
|
+
"onUpdate:modelValue": f[6] || (f[6] = (s) => G(_) ? _.value = s : null),
|
|
537
|
+
type: "checkbox"
|
|
538
|
+
}, null, 512), [
|
|
539
|
+
[le, l(_)]
|
|
540
|
+
]),
|
|
541
|
+
M(t(e.value.acknowledge), 1)
|
|
542
|
+
])) : p("", !0)
|
|
543
|
+
]),
|
|
544
|
+
a("section", null, [
|
|
545
|
+
a("h3", null, t(e.value.issues), 1),
|
|
546
|
+
l(y).issues.length ? (r(), n("ol", vt, [
|
|
547
|
+
(r(!0), n(P, null, L(l(y).issues, (s, j) => (r(), n("li", { key: j }, [
|
|
548
|
+
a("div", null, [
|
|
549
|
+
a("span", {
|
|
550
|
+
class: X({ "is-error": s.severity === "error" })
|
|
551
|
+
}, t(s.severity === "error" ? e.value.errors : e.value.warnings), 3),
|
|
552
|
+
J(s).target ? (r(), n("button", {
|
|
553
|
+
key: 0,
|
|
554
|
+
type: "button",
|
|
555
|
+
disabled: l(F) || l(w),
|
|
556
|
+
onClick: (I) => D(s, I)
|
|
557
|
+
}, t(e.value.locate), 9, mt)) : (r(), n("small", pt, t(Z(s)), 1))
|
|
558
|
+
]),
|
|
559
|
+
a("p", null, t(s.message), 1),
|
|
560
|
+
a("code", null, t(s.path), 1)
|
|
561
|
+
]))), 128))
|
|
562
|
+
])) : (r(), n("p", dt, t(e.value.noIssues), 1))
|
|
563
|
+
]),
|
|
564
|
+
l(y).samples.length ? (r(), n("section", {
|
|
565
|
+
key: 1,
|
|
566
|
+
class: X({ "is-stale": l(F) })
|
|
567
|
+
}, [
|
|
568
|
+
a("h3", null, t(e.value.results), 1),
|
|
569
|
+
l(O) ? (r(), n("p", ft, [
|
|
570
|
+
M(t(e.value.scope) + " · " + t(l(d).length ? e.value.namedFixtures : l(O).requested === "-1" ? e.value.all : l(O).requested === "0" ? e.value.none : l(O).requested + " " + e.value.rows) + " · " + t(l(O).datasets) + " " + t(e.value.datasets) + " · " + t(l(O).rows) + " " + t(e.value.rows), 1),
|
|
571
|
+
l(O).formats.length ? (r(), n("span", ht, " · " + t(l(O).formats.join(" / ")), 1)) : p("", !0)
|
|
572
|
+
])) : p("", !0),
|
|
573
|
+
(r(!0), n(P, null, L(l(y).samples, (s) => (r(), n("div", {
|
|
574
|
+
key: s.name,
|
|
575
|
+
class: "mr-review-sample"
|
|
576
|
+
}, [
|
|
577
|
+
a("p", null, [
|
|
578
|
+
a("strong", null, t(s.name), 1),
|
|
579
|
+
M(" · " + t(s.rows) + " " + t(e.value.rows) + " · " + t(s.pages) + " " + t(e.value.pages) + " · " + t(l(y).issues.filter((j) => j.fixture === s.name).length) + " " + t(e.value.issues), 1)
|
|
580
|
+
]),
|
|
581
|
+
a("button", {
|
|
582
|
+
type: "button",
|
|
583
|
+
disabled: l(F) || l(w),
|
|
584
|
+
onClick: (j) => V.value = V.value === s.name ? void 0 : s.name
|
|
585
|
+
}, t(V.value === s.name ? e.value.closeCompare : e.value.compare), 9, gt)
|
|
586
|
+
]))), 128))
|
|
587
|
+
], 2)) : p("", !0),
|
|
588
|
+
T.value && !l(F) ? (r(), ve(je, {
|
|
589
|
+
key: 2,
|
|
590
|
+
document: o.document,
|
|
591
|
+
previous: o.previous,
|
|
592
|
+
fixture: T.value,
|
|
593
|
+
messages: o.messages
|
|
594
|
+
}, null, 8, ["document", "previous", "fixture", "messages"])) : p("", !0),
|
|
595
|
+
a("p", wt, t(e.value.checked), 1)
|
|
596
|
+
], 64)) : (r(), n("p", tt, t(e.value.empty), 1))
|
|
597
|
+
], 12, Fe));
|
|
598
|
+
}
|
|
599
|
+
}), Et = /* @__PURE__ */ ne(yt, [["__scopeId", "data-v-dfd35a6b"]]);
|
|
600
|
+
export {
|
|
601
|
+
Et as default
|
|
602
|
+
};
|