@agile-team/mach-report 2.23.0 → 2.23.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 +3 -2
- package/dist/ExcelBindingWizard-BrTmdo7f.cjs +1 -0
- package/dist/ExcelBindingWizard-CcDMLO8Q.js +1486 -0
- package/dist/ParamEditor-BGjovFUe.js +737 -0
- package/dist/ParamEditor-CeNp4_zQ.cjs +1 -0
- package/dist/ReportBatchPanel-CHxBtG9R.cjs +1 -0
- package/dist/ReportBatchPanel-CJB67WNd.js +351 -0
- package/dist/ReportLabelStudio-Tplc1TLJ.js +784 -0
- package/dist/ReportLabelStudio-g8PkqJWn.cjs +1 -0
- package/dist/ReportParamPanel-C7fZTllk.cjs +1 -0
- package/dist/{ReportParamPanel-Dgmqro1Y.js → ReportParamPanel-GI43aGa0.js} +61 -56
- package/dist/{ReportPreview-FFIryrIr.cjs → ReportPreview-BoGBGyRr.cjs} +2 -2
- package/dist/{ReportPreview-DeWzG8jQ.js → ReportPreview-QLONCyci.js} +8 -8
- package/dist/ReportTemplateLibrary-BFQIX0sg.cjs +1 -0
- package/dist/ReportTemplateLibrary-KqX4E2sN.js +312 -0
- package/dist/RuleEditor-BZUP9yvL.cjs +1 -0
- package/dist/RuleEditor-OPX1awrH.js +2342 -0
- package/dist/TemplateOutlinePanel-CVYKVLv_.cjs +1 -0
- package/dist/TemplateOutlinePanel-DQS-eOs6.js +97 -0
- package/dist/TemplateReusePanel-CY6O93Zk.cjs +1 -0
- package/dist/TemplateReusePanel-DKXiFTyB.js +389 -0
- package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +1 -0
- package/dist/TemplateReviewPanel-Dijwm9YE.js +593 -0
- package/dist/artifact-integrity.json +68 -68
- package/dist/{auto-CTIJ6PnR.js → auto-BB99S802.js} +4 -4
- package/dist/{auto-4pK9HePf.cjs → auto-BrPWo7Xm.cjs} +1 -1
- package/dist/designer-BZoVWTgl.js +7172 -0
- package/dist/designer-zS2uKJmY.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +7 -0
- package/dist/designer.d.ts +7 -0
- package/dist/designer.js +2 -2
- package/dist/{encoding-BefcaHdp.cjs → encoding-7lquyj0w.cjs} +1 -1
- package/dist/{encoding-CL6rXEkR.js → encoding-CEd-dq9A.js} +2 -2
- package/dist/{font-loader-BT5baV-o.js → font-loader-CNWXomuV.js} +1 -1
- package/dist/{font-loader-Ga51c2VC.cjs → font-loader-D8pI87fL.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -7
- package/dist/{json-snapshot-OqkPyUk5.js → json-snapshot-BRnzKudk.js} +1 -1
- package/dist/{json-snapshot-1tvQNzQE.cjs → json-snapshot-DNiIbpOr.cjs} +1 -1
- package/dist/{pdf-aobetCsy.js → pdf-CJToa81Z.js} +2 -2
- package/dist/{pdf-HiEeXe9H.cjs → pdf-DpMkW72B.cjs} +1 -1
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BFANt-i8.cjs → plugin-BWTp-X7b.cjs} +1 -1
- package/dist/{plugin-DeYYAL6F.js → plugin-_BkUVc2z.js} +1 -1
- package/dist/{prefill-Dk4C6S5R.js → prefill-CWGdnqQd.js} +1 -1
- package/dist/{prefill-DsUD5OoK.cjs → prefill-PaAy6wLk.cjs} +1 -1
- package/dist/{prepared-DCIxhKFo.js → prepared-CJy_qk7d.js} +1 -1
- package/dist/{prepared-Dv-XM3i1.cjs → prepared-D0yCSxSO.cjs} +1 -1
- package/dist/{protocol-DxeUKGYG.js → protocol-BG16rz6D.js} +2 -2
- package/dist/{protocol-B9YgfQ_d.cjs → protocol-wzhl1Fim.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{runtime-DKlGd_D4.cjs → runtime-DYMOS_gz.cjs} +1 -1
- package/dist/{runtime-75Y5Oq5B.js → runtime-PiCax9zQ.js} +2 -2
- package/dist/sbom.cdx.json +1 -1
- package/dist/server-node.cjs +4 -4
- package/dist/server-node.js +737 -736
- package/dist/server.cjs +1 -1
- package/dist/server.js +5 -5
- package/dist/style.css +1 -1
- package/dist/{template-catalog--cjxzgH7.js → template-catalog-CRuZL3pi.js} +1 -1
- package/dist/{template-catalog-CoT7jm_6.cjs → template-catalog-DtrtT1FY.cjs} +1 -1
- package/dist/textwrap-D4ZksyMK.js +111 -0
- package/dist/textwrap-DEHqAjKZ.cjs +4 -0
- package/dist/vue/async.d.cts +7 -0
- package/dist/vue/async.d.ts +7 -0
- package/dist/vue/index.d.cts +7 -0
- package/dist/vue/index.d.ts +7 -0
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +6 -6
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +4 -4
- 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/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/designer-DhrE7jzw.js +0 -7169
- package/dist/designer-IAZu6kBX.cjs +0 -2
- package/dist/textwrap-BIjtEWmq.js +0 -110
- package/dist/textwrap-Cy7o1hIR.cjs +0 -4
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
import { shallowRef as J, ref as C, computed as $, watch as G, onBeforeUnmount as ne, toRaw as oe, defineComponent as le, openBlock as r, createElementBlock as n, toDisplayString as t, createCommentVNode as p, Fragment as R, createElementVNode as l, createVNode as Y, unref as s, normalizeStyle as ue, createTextVNode as T, withDirectives as B, isRef as W, vModelSelect as ie, renderList as I, vModelText as Z, vModelCheckbox as ee, normalizeClass as Q, createBlock as ce } from "vue";
|
|
2
|
+
import { reviewReportTemplateAsync as de, paginateTemplate as me } from "@agile-team/mach-report";
|
|
3
|
+
import { T as X, u as ve } from "./designer-BZoVWTgl.js";
|
|
4
|
+
import { ReportPreview as te } from "@agile-team/mach-report/vue";
|
|
5
|
+
import { b as pe } from "./template-serialization-CWmHq7lX.js";
|
|
6
|
+
import { _ as ae } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
7
|
+
function fe(o, m = () => o.fixtures) {
|
|
8
|
+
const c = J(), u = J([]), i = C("20"), e = C(!1), h = C(!1), v = C(!1), k = C(""), b = J(), d = C(!1), O = J(), D = $(
|
|
9
|
+
() => new Set(
|
|
10
|
+
o.document.template.pages.flatMap((f) => f.components).flatMap(
|
|
11
|
+
(f) => f.kind === "list" && f.tree ? [f.dataset] : []
|
|
12
|
+
)
|
|
13
|
+
)
|
|
14
|
+
), y = $(() => D.value.size > 0);
|
|
15
|
+
let x = 0, _;
|
|
16
|
+
function g() {
|
|
17
|
+
x++, _?.abort(), _ = void 0, h.value = !1, d.value = !1, b.value = void 0, v.value = !!c.value, k.value = "";
|
|
18
|
+
}
|
|
19
|
+
for (const f of [() => o.document, () => o.previous])
|
|
20
|
+
G(
|
|
21
|
+
f,
|
|
22
|
+
() => {
|
|
23
|
+
e.value = !1, g();
|
|
24
|
+
},
|
|
25
|
+
{ deep: !0, flush: "sync" }
|
|
26
|
+
);
|
|
27
|
+
for (const f of [
|
|
28
|
+
() => o.datasets,
|
|
29
|
+
() => o.dataSchemas,
|
|
30
|
+
() => o.formats,
|
|
31
|
+
m
|
|
32
|
+
])
|
|
33
|
+
G(f, g, { deep: !0, flush: "sync" });
|
|
34
|
+
G([i, e], g, { flush: "sync" }), ne(() => {
|
|
35
|
+
x++, _?.abort();
|
|
36
|
+
});
|
|
37
|
+
const N = $(
|
|
38
|
+
() => c.value?.issues.filter((f) => f.severity === "error").length ?? 0
|
|
39
|
+
);
|
|
40
|
+
function q() {
|
|
41
|
+
_?.abort(), _ = new AbortController();
|
|
42
|
+
const f = ++x, M = _;
|
|
43
|
+
h.value = !0, k.value = "", d.value = !1, b.value = void 0, F(f, M);
|
|
44
|
+
}
|
|
45
|
+
async function F(f, M) {
|
|
46
|
+
try {
|
|
47
|
+
const S = Number(i.value), L = Object.fromEntries(
|
|
48
|
+
Object.entries(o.datasets ?? {}).map(([E, U]) => [
|
|
49
|
+
E,
|
|
50
|
+
S < 0 || D.value.has(E) ? U : U.slice(0, S)
|
|
51
|
+
])
|
|
52
|
+
), z = m(), V = z?.length ? [...z] : S === 0 ? [] : [{ name: i.value, datasets: L }], P = await de(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: V,
|
|
59
|
+
signal: M.signal,
|
|
60
|
+
onProgress: (E) => {
|
|
61
|
+
f === x && (b.value = E);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
if (f !== x) return;
|
|
65
|
+
c.value = P, v.value = !1, u.value = V, O.value = {
|
|
66
|
+
requested: i.value,
|
|
67
|
+
rows: P.samples.reduce((E, U) => E + U.rows, 0),
|
|
68
|
+
datasets: new Set(
|
|
69
|
+
V.flatMap((E) => Object.keys(E.datasets))
|
|
70
|
+
).size,
|
|
71
|
+
formats: [...o.formats ?? []]
|
|
72
|
+
};
|
|
73
|
+
} catch (S) {
|
|
74
|
+
f === x && !M.signal.aborted && (k.value = S instanceof Error ? S.message : String(S));
|
|
75
|
+
} finally {
|
|
76
|
+
f === x && (h.value = !1, _ = void 0);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function K() {
|
|
80
|
+
x++, _?.abort(), _ = void 0, h.value = !1, d.value = !0, b.value = void 0;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
report: c,
|
|
84
|
+
sampleSize: i,
|
|
85
|
+
acknowledged: e,
|
|
86
|
+
running: h,
|
|
87
|
+
stale: v,
|
|
88
|
+
failure: k,
|
|
89
|
+
checkedScope: O,
|
|
90
|
+
checkedFixtures: u,
|
|
91
|
+
hasTree: y,
|
|
92
|
+
errors: N,
|
|
93
|
+
run: q,
|
|
94
|
+
cancel: K,
|
|
95
|
+
progress: b,
|
|
96
|
+
cancelled: d
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function he(o) {
|
|
100
|
+
const m = Object.getPrototypeOf(o);
|
|
101
|
+
if (m !== Object.prototype && m !== Array.prototype && m !== 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 we(o) {
|
|
109
|
+
let m = 0, c = 0;
|
|
110
|
+
const u = /* @__PURE__ */ new Set();
|
|
111
|
+
function i(e, h) {
|
|
112
|
+
if (++m > 1e5 || h > 32)
|
|
113
|
+
throw new RangeError("Sample data exceeds the capture budget");
|
|
114
|
+
if (typeof e == "string") {
|
|
115
|
+
if (c += e.length, c > 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 v = oe(e);
|
|
123
|
+
if (u.has(v))
|
|
124
|
+
throw new Error("Sample data must not contain cycles");
|
|
125
|
+
he(v), u.add(v);
|
|
126
|
+
const k = Array.isArray(v) ? [] : /* @__PURE__ */ Object.create(null);
|
|
127
|
+
for (const b of Object.keys(v)) {
|
|
128
|
+
const d = Object.getOwnPropertyDescriptor(v, 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] = i(
|
|
132
|
+
d.value,
|
|
133
|
+
h + 1
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
return u.delete(v), k;
|
|
137
|
+
}
|
|
138
|
+
return i(o, 0);
|
|
139
|
+
}
|
|
140
|
+
function ge(o, m = () => X) {
|
|
141
|
+
const c = C([]), u = C(""), i = C(!1), e = C(""), h = C({}), v = $(() => [...o.fixtures ?? [], ...c.value]);
|
|
142
|
+
function k() {
|
|
143
|
+
e.value = "";
|
|
144
|
+
try {
|
|
145
|
+
if (!i.value) throw new Error(m().sampleConsentMissing);
|
|
146
|
+
if (!u.value.trim()) throw new Error(m().sampleNameMissing);
|
|
147
|
+
if (v.value.length >= 20) throw new Error(m().sampleLimit);
|
|
148
|
+
if (v.value.some((O) => O.name === u.value.trim()))
|
|
149
|
+
throw new Error(m().sampleNameDuplicate);
|
|
150
|
+
const d = we(o.datasets ?? {});
|
|
151
|
+
if (Object.values(d).reduce((O, D) => O + D.length, 0) > 1e3)
|
|
152
|
+
throw new Error(m().sampleRowsLimit);
|
|
153
|
+
c.value.push({
|
|
154
|
+
name: u.value.trim(),
|
|
155
|
+
datasets: d,
|
|
156
|
+
...Object.keys(h.value).length ? { params: { ...h.value } } : {}
|
|
157
|
+
}), u.value = "", i.value = !1;
|
|
158
|
+
} catch (d) {
|
|
159
|
+
e.value = d instanceof Error ? d.message : String(d);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function b(d) {
|
|
163
|
+
c.value.splice(d, 1);
|
|
164
|
+
}
|
|
165
|
+
return { fixtures: c, name: u, consent: i, failure: e, params: h, suite: v, capture: k, remove: b };
|
|
166
|
+
}
|
|
167
|
+
function se(o, m) {
|
|
168
|
+
const c = me(o.template, m.datasets, {
|
|
169
|
+
maxPages: 100,
|
|
170
|
+
maxCells: 25e4
|
|
171
|
+
}), u = [
|
|
172
|
+
...new Set(
|
|
173
|
+
pe(o.template).flatMap(
|
|
174
|
+
(i) => i.fields.map((e) => `${i.dataset}.${e.field}`)
|
|
175
|
+
)
|
|
176
|
+
)
|
|
177
|
+
];
|
|
178
|
+
return {
|
|
179
|
+
pages: c.plan.pages.length,
|
|
180
|
+
dimensions: [
|
|
181
|
+
...new Set(
|
|
182
|
+
c.plan.pages.map(
|
|
183
|
+
(i) => `${i.pageWidthMm} × ${i.pageHeightMm} mm`
|
|
184
|
+
)
|
|
185
|
+
)
|
|
186
|
+
],
|
|
187
|
+
fields: u,
|
|
188
|
+
fetcher: async () => c.plan
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function ye(o, m, c) {
|
|
192
|
+
const u = se(o, m), i = c ? se(c, m) : void 0, e = new Set(i?.fields), h = new Set(u.fields);
|
|
193
|
+
return {
|
|
194
|
+
current: u,
|
|
195
|
+
previous: i,
|
|
196
|
+
addedFields: u.fields.filter((v) => !e.has(v)),
|
|
197
|
+
removedFields: i?.fields.filter((v) => !h.has(v)) ?? []
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
const be = ["aria-label"], _e = {
|
|
201
|
+
key: 0,
|
|
202
|
+
role: "alert"
|
|
203
|
+
}, ke = { class: "mr-fixture-previews" }, xe = { key: 0 }, Se = /* @__PURE__ */ le({
|
|
204
|
+
__name: "TemplateFixtureComparison",
|
|
205
|
+
props: {
|
|
206
|
+
document: {},
|
|
207
|
+
previous: {},
|
|
208
|
+
fixture: {},
|
|
209
|
+
messages: {}
|
|
210
|
+
},
|
|
211
|
+
setup(o) {
|
|
212
|
+
const m = o, c = $(() => ({ ...X, ...m.messages })), u = $(() => {
|
|
213
|
+
try {
|
|
214
|
+
return {
|
|
215
|
+
result: ye(
|
|
216
|
+
m.document,
|
|
217
|
+
m.fixture,
|
|
218
|
+
m.previous
|
|
219
|
+
)
|
|
220
|
+
};
|
|
221
|
+
} catch (i) {
|
|
222
|
+
return { error: i instanceof Error ? i.message : String(i) };
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
return (i, e) => (r(), n("section", {
|
|
226
|
+
class: "mr-fixture-comparison",
|
|
227
|
+
"aria-label": c.value.compare
|
|
228
|
+
}, [
|
|
229
|
+
u.value.error ? (r(), n("p", _e, t(u.value.error), 1)) : p("", !0),
|
|
230
|
+
u.value.result ? (r(), n(R, { key: 1 }, [
|
|
231
|
+
l("dl", null, [
|
|
232
|
+
l("dt", null, t(c.value.pages), 1),
|
|
233
|
+
l("dd", null, t(u.value.result.previous?.pages ?? "—") + " → " + t(u.value.result.current.pages), 1),
|
|
234
|
+
l("dt", null, t(c.value.dimensions), 1),
|
|
235
|
+
l("dd", null, t(u.value.result.previous?.dimensions.join(" / ") ?? "—") + " → " + t(u.value.result.current.dimensions.join(" / ")), 1),
|
|
236
|
+
l("dt", null, t(c.value.fieldsAdded), 1),
|
|
237
|
+
l("dd", null, t(u.value.result.addedFields.join("、") || "—"), 1),
|
|
238
|
+
l("dt", null, t(c.value.fieldsRemoved), 1),
|
|
239
|
+
l("dd", null, t(u.value.result.removedFields.join("、") || "—"), 1)
|
|
240
|
+
]),
|
|
241
|
+
l("div", ke, [
|
|
242
|
+
u.value.result.previous ? (r(), n("article", xe, [
|
|
243
|
+
l("h4", null, t(c.value.baselinePreview), 1),
|
|
244
|
+
Y(s(te), {
|
|
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
|
+
l("article", null, [
|
|
257
|
+
l("h4", null, t(c.value.draftPreview), 1),
|
|
258
|
+
Y(s(te), {
|
|
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, be));
|
|
273
|
+
}
|
|
274
|
+
}), Ce = /* @__PURE__ */ ae(Se, [["__scopeId", "data-v-6409d556"]]), Ee = ["aria-label", "aria-busy"], je = {
|
|
275
|
+
key: 0,
|
|
276
|
+
role: "status"
|
|
277
|
+
}, Fe = ["disabled"], Oe = {
|
|
278
|
+
key: 0,
|
|
279
|
+
class: "mr-review-stale",
|
|
280
|
+
role: "status"
|
|
281
|
+
}, Te = { class: "mr-review-controls" }, Re = ["aria-label", "disabled"], Ne = { value: "0" }, Me = { value: "20" }, Pe = { value: "100" }, $e = { value: "-1" }, Ve = {
|
|
282
|
+
key: 0,
|
|
283
|
+
class: "mr-review-note"
|
|
284
|
+
}, Ae = { class: "mr-review-fixtures" }, De = { class: "mr-review-note" }, Ue = { key: 0 }, ze = ["disabled", "onClick"], Be = { class: "mr-review-fixture-form" }, Ie = ["placeholder", "disabled"], qe = { key: 0 }, Le = ["onUpdate:modelValue", "placeholder", "disabled"], He = { class: "mr-review-consent" }, Je = ["disabled"], We = ["disabled"], Ge = {
|
|
285
|
+
key: 1,
|
|
286
|
+
role: "alert",
|
|
287
|
+
class: "is-error"
|
|
288
|
+
}, Ke = {
|
|
289
|
+
key: 1,
|
|
290
|
+
class: "mr-review-note"
|
|
291
|
+
}, Qe = {
|
|
292
|
+
key: 2,
|
|
293
|
+
class: "is-error",
|
|
294
|
+
role: "alert"
|
|
295
|
+
}, Xe = {
|
|
296
|
+
key: 3,
|
|
297
|
+
class: "mr-review-stale",
|
|
298
|
+
role: "status"
|
|
299
|
+
}, Ye = {
|
|
300
|
+
key: 4,
|
|
301
|
+
class: "mr-review-note"
|
|
302
|
+
}, Ze = {
|
|
303
|
+
key: 0,
|
|
304
|
+
class: "mr-review-summary",
|
|
305
|
+
role: "status"
|
|
306
|
+
}, et = {
|
|
307
|
+
key: 0,
|
|
308
|
+
class: "mr-review-note"
|
|
309
|
+
}, tt = {
|
|
310
|
+
key: 1,
|
|
311
|
+
class: "mr-review-note"
|
|
312
|
+
}, st = {
|
|
313
|
+
key: 2,
|
|
314
|
+
class: "mr-review-list"
|
|
315
|
+
}, lt = { key: 0 }, at = ["onClick"], rt = {
|
|
316
|
+
key: 3,
|
|
317
|
+
class: "mr-review-note"
|
|
318
|
+
}, nt = {
|
|
319
|
+
key: 4,
|
|
320
|
+
class: "mr-review-ack"
|
|
321
|
+
}, ot = {
|
|
322
|
+
key: 0,
|
|
323
|
+
class: "mr-review-note"
|
|
324
|
+
}, ut = {
|
|
325
|
+
key: 1,
|
|
326
|
+
class: "mr-review-list"
|
|
327
|
+
}, it = ["onClick"], ct = {
|
|
328
|
+
key: 0,
|
|
329
|
+
class: "mr-review-scope"
|
|
330
|
+
}, dt = { key: 0 }, mt = ["disabled", "onClick"], vt = { class: "mr-review-note" }, pt = /* @__PURE__ */ le({
|
|
331
|
+
__name: "TemplateReviewPanel",
|
|
332
|
+
props: {
|
|
333
|
+
document: {},
|
|
334
|
+
previous: {},
|
|
335
|
+
datasets: {},
|
|
336
|
+
dataSchemas: {},
|
|
337
|
+
formats: {},
|
|
338
|
+
fixtures: {},
|
|
339
|
+
messages: {}
|
|
340
|
+
},
|
|
341
|
+
emits: ["locate"],
|
|
342
|
+
setup(o, { emit: m }) {
|
|
343
|
+
const c = ve(), u = o, i = m, e = $(() => ({ ...X, ...u.messages })), {
|
|
344
|
+
name: h,
|
|
345
|
+
consent: v,
|
|
346
|
+
failure: k,
|
|
347
|
+
params: b,
|
|
348
|
+
suite: d,
|
|
349
|
+
capture: O,
|
|
350
|
+
remove: D
|
|
351
|
+
} = ge(u, () => e.value), {
|
|
352
|
+
report: y,
|
|
353
|
+
sampleSize: x,
|
|
354
|
+
acknowledged: _,
|
|
355
|
+
running: g,
|
|
356
|
+
stale: N,
|
|
357
|
+
failure: q,
|
|
358
|
+
checkedScope: F,
|
|
359
|
+
checkedFixtures: K,
|
|
360
|
+
hasTree: f,
|
|
361
|
+
errors: M,
|
|
362
|
+
run: S,
|
|
363
|
+
cancel: L,
|
|
364
|
+
cancelled: z,
|
|
365
|
+
progress: V
|
|
366
|
+
} = fe(u, () => d.value), P = C(), E = $(
|
|
367
|
+
() => K.value.find((A) => A.name === P.value)
|
|
368
|
+
);
|
|
369
|
+
G(N, (A) => {
|
|
370
|
+
A && (P.value = void 0);
|
|
371
|
+
});
|
|
372
|
+
function U(A) {
|
|
373
|
+
const w = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(A);
|
|
374
|
+
i("locate", {
|
|
375
|
+
path: A,
|
|
376
|
+
...w ? { pageIndex: Number(w[1]), componentIndex: Number(w[2]) } : {}
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
return (A, w) => (r(), n("section", {
|
|
380
|
+
class: "mr-template-review",
|
|
381
|
+
style: ue(s(c)),
|
|
382
|
+
"aria-label": e.value.title,
|
|
383
|
+
"aria-busy": s(g)
|
|
384
|
+
}, [
|
|
385
|
+
l("header", null, [
|
|
386
|
+
l("strong", null, t(e.value.title), 1),
|
|
387
|
+
s(g) && s(V) ? (r(), n("span", je, t(s(V).completed) + " / " + t(s(V).total) + " " + t(e.value.progress), 1)) : p("", !0),
|
|
388
|
+
s(g) ? (r(), n("button", {
|
|
389
|
+
key: 1,
|
|
390
|
+
type: "button",
|
|
391
|
+
onClick: w[0] || (w[0] = //@ts-ignore
|
|
392
|
+
(...a) => s(L) && s(L)(...a))
|
|
393
|
+
}, t(e.value.cancel), 1)) : p("", !0),
|
|
394
|
+
l("button", {
|
|
395
|
+
type: "button",
|
|
396
|
+
disabled: s(g),
|
|
397
|
+
onClick: w[1] || (w[1] = //@ts-ignore
|
|
398
|
+
(...a) => s(S) && s(S)(...a))
|
|
399
|
+
}, t(s(g) ? e.value.running : e.value.run), 9, Fe)
|
|
400
|
+
]),
|
|
401
|
+
s(z) ? (r(), n("p", Oe, t(e.value.cancelled), 1)) : p("", !0),
|
|
402
|
+
l("div", Te, [
|
|
403
|
+
l("label", null, [
|
|
404
|
+
T(t(e.value.samples), 1),
|
|
405
|
+
B(l("select", {
|
|
406
|
+
"onUpdate:modelValue": w[2] || (w[2] = (a) => W(x) ? x.value = a : null),
|
|
407
|
+
"aria-label": e.value.samples,
|
|
408
|
+
disabled: s(g) || !!s(d).length
|
|
409
|
+
}, [
|
|
410
|
+
l("option", Ne, t(e.value.none), 1),
|
|
411
|
+
l("option", Me, t(e.value.first20), 1),
|
|
412
|
+
l("option", Pe, t(e.value.first100), 1),
|
|
413
|
+
l("option", $e, t(e.value.all), 1)
|
|
414
|
+
], 8, Re), [
|
|
415
|
+
[ie, s(x)]
|
|
416
|
+
])
|
|
417
|
+
]),
|
|
418
|
+
s(d).length ? (r(), n("span", Ve, t(e.value.namedFixtures) + " · " + t(s(d).length), 1)) : p("", !0)
|
|
419
|
+
]),
|
|
420
|
+
l("details", Ae, [
|
|
421
|
+
l("summary", null, [
|
|
422
|
+
T(t(e.value.namedFixtures) + " ", 1),
|
|
423
|
+
l("small", null, t(s(d).length) + " / 20", 1)
|
|
424
|
+
]),
|
|
425
|
+
l("p", De, t(e.value.fixtureHint), 1),
|
|
426
|
+
s(d).length ? (r(), n("ul", Ue, [
|
|
427
|
+
(r(!0), n(R, null, I(s(d), (a, j) => (r(), n("li", {
|
|
428
|
+
key: a.name
|
|
429
|
+
}, [
|
|
430
|
+
l("strong", null, t(a.name), 1),
|
|
431
|
+
l("span", null, t(Object.values(a.datasets).reduce(
|
|
432
|
+
(H, re) => H + re.length,
|
|
433
|
+
0
|
|
434
|
+
)) + " " + t(e.value.rows), 1),
|
|
435
|
+
j >= (o.fixtures?.length ?? 0) ? (r(), n("button", {
|
|
436
|
+
key: 0,
|
|
437
|
+
type: "button",
|
|
438
|
+
disabled: s(g),
|
|
439
|
+
onClick: (H) => s(D)(j - (o.fixtures?.length ?? 0))
|
|
440
|
+
}, t(e.value.remove), 9, ze)) : p("", !0)
|
|
441
|
+
]))), 128))
|
|
442
|
+
])) : p("", !0),
|
|
443
|
+
l("div", Be, [
|
|
444
|
+
l("label", null, [
|
|
445
|
+
T(t(e.value.fixtureName), 1),
|
|
446
|
+
B(l("input", {
|
|
447
|
+
"onUpdate:modelValue": w[3] || (w[3] = (a) => W(h) ? h.value = a : null),
|
|
448
|
+
placeholder: e.value.fixturePlaceholder,
|
|
449
|
+
disabled: s(g)
|
|
450
|
+
}, null, 8, Ie), [
|
|
451
|
+
[Z, s(h)]
|
|
452
|
+
])
|
|
453
|
+
]),
|
|
454
|
+
o.document.template.params?.length ? (r(), n("details", qe, [
|
|
455
|
+
l("summary", null, t(e.value.parameters), 1),
|
|
456
|
+
(r(!0), n(R, null, I(o.document.template.params, (a) => (r(), n("label", {
|
|
457
|
+
key: a.field
|
|
458
|
+
}, [
|
|
459
|
+
T(t(a.label ?? a.field), 1),
|
|
460
|
+
B(l("input", {
|
|
461
|
+
"onUpdate:modelValue": (j) => s(b)[a.field] = j,
|
|
462
|
+
placeholder: a.defaultValue,
|
|
463
|
+
disabled: s(g)
|
|
464
|
+
}, null, 8, Le), [
|
|
465
|
+
[Z, s(b)[a.field]]
|
|
466
|
+
])
|
|
467
|
+
]))), 128))
|
|
468
|
+
])) : p("", !0),
|
|
469
|
+
l("label", He, [
|
|
470
|
+
B(l("input", {
|
|
471
|
+
"onUpdate:modelValue": w[4] || (w[4] = (a) => W(v) ? v.value = a : null),
|
|
472
|
+
type: "checkbox",
|
|
473
|
+
disabled: s(g)
|
|
474
|
+
}, null, 8, Je), [
|
|
475
|
+
[ee, s(v)]
|
|
476
|
+
]),
|
|
477
|
+
T(t(e.value.deidentified), 1)
|
|
478
|
+
]),
|
|
479
|
+
l("button", {
|
|
480
|
+
type: "button",
|
|
481
|
+
disabled: s(g) || !s(v) || !s(h).trim() || s(d).length >= 20,
|
|
482
|
+
onClick: w[5] || (w[5] = //@ts-ignore
|
|
483
|
+
(...a) => s(O) && s(O)(...a))
|
|
484
|
+
}, t(e.value.capture), 9, We),
|
|
485
|
+
s(k) ? (r(), n("p", Ge, t(s(k)), 1)) : p("", !0)
|
|
486
|
+
])
|
|
487
|
+
]),
|
|
488
|
+
s(f) ? (r(), n("p", Ke, t(e.value.treeHint), 1)) : p("", !0),
|
|
489
|
+
s(q) ? (r(), n("p", Qe, t(s(q)), 1)) : p("", !0),
|
|
490
|
+
s(N) ? (r(), n("p", Xe, t(e.value.stale), 1)) : p("", !0),
|
|
491
|
+
s(y) ? (r(), n(R, { key: 5 }, [
|
|
492
|
+
s(N) ? p("", !0) : (r(), n("div", Ze, [
|
|
493
|
+
l("span", {
|
|
494
|
+
class: Q({ "is-error": s(M) })
|
|
495
|
+
}, t(s(M)) + " " + t(e.value.errors), 3),
|
|
496
|
+
l("span", null, t(s(y).issues.length - s(M)) + " " + t(e.value.warnings), 1)
|
|
497
|
+
])),
|
|
498
|
+
l("section", null, [
|
|
499
|
+
l("h3", null, [
|
|
500
|
+
T(t(e.value.changes) + " ", 1),
|
|
501
|
+
l("small", null, t(s(y).changes?.totalChanges ?? 0), 1)
|
|
502
|
+
]),
|
|
503
|
+
o.previous ? s(y).changes?.totalChanges ? (r(), n("ol", st, [
|
|
504
|
+
(r(!0), n(R, null, I(s(y).changes?.changes, (a, j) => (r(), n("li", { key: j }, [
|
|
505
|
+
l("div", null, [
|
|
506
|
+
l("span", null, t(e.value.categories[a.category]) + " · " + t(e.value.kinds[a.kind]), 1),
|
|
507
|
+
a.breaking ? (r(), n("b", lt, t(e.value.breaking), 1)) : p("", !0),
|
|
508
|
+
l("button", {
|
|
509
|
+
type: "button",
|
|
510
|
+
onClick: (H) => U(a.path)
|
|
511
|
+
}, t(e.value.locate), 9, at)
|
|
512
|
+
]),
|
|
513
|
+
l("code", null, t(a.path), 1),
|
|
514
|
+
l("dl", null, [
|
|
515
|
+
a.before !== void 0 ? (r(), n(R, { key: 0 }, [
|
|
516
|
+
l("dt", null, t(e.value.before), 1),
|
|
517
|
+
l("dd", null, t(a.before), 1)
|
|
518
|
+
], 64)) : p("", !0),
|
|
519
|
+
a.after !== void 0 ? (r(), n(R, { key: 1 }, [
|
|
520
|
+
l("dt", null, t(e.value.after), 1),
|
|
521
|
+
l("dd", null, t(a.after), 1)
|
|
522
|
+
], 64)) : p("", !0)
|
|
523
|
+
])
|
|
524
|
+
]))), 128))
|
|
525
|
+
])) : (r(), n("p", tt, t(e.value.noChanges), 1)) : (r(), n("p", et, t(e.value.baseline), 1)),
|
|
526
|
+
s(y).changes?.truncated ? (r(), n("p", rt, t(e.value.truncated), 1)) : p("", !0),
|
|
527
|
+
s(y).changes?.breakingChanges ? (r(), n("label", nt, [
|
|
528
|
+
B(l("input", {
|
|
529
|
+
"onUpdate:modelValue": w[6] || (w[6] = (a) => W(_) ? _.value = a : null),
|
|
530
|
+
type: "checkbox"
|
|
531
|
+
}, null, 512), [
|
|
532
|
+
[ee, s(_)]
|
|
533
|
+
]),
|
|
534
|
+
T(t(e.value.acknowledge), 1)
|
|
535
|
+
])) : p("", !0)
|
|
536
|
+
]),
|
|
537
|
+
l("section", null, [
|
|
538
|
+
l("h3", null, t(e.value.issues), 1),
|
|
539
|
+
s(y).issues.length ? (r(), n("ol", ut, [
|
|
540
|
+
(r(!0), n(R, null, I(s(y).issues, (a, j) => (r(), n("li", { key: j }, [
|
|
541
|
+
l("div", null, [
|
|
542
|
+
l("span", {
|
|
543
|
+
class: Q({ "is-error": a.severity === "error" })
|
|
544
|
+
}, t(a.severity === "error" ? e.value.errors : e.value.warnings), 3),
|
|
545
|
+
l("button", {
|
|
546
|
+
type: "button",
|
|
547
|
+
onClick: (H) => i("locate", a)
|
|
548
|
+
}, t(e.value.locate), 9, it)
|
|
549
|
+
]),
|
|
550
|
+
l("p", null, t(a.message), 1),
|
|
551
|
+
l("code", null, t(a.path), 1)
|
|
552
|
+
]))), 128))
|
|
553
|
+
])) : (r(), n("p", ot, t(e.value.noIssues), 1))
|
|
554
|
+
]),
|
|
555
|
+
s(y).samples.length ? (r(), n("section", {
|
|
556
|
+
key: 1,
|
|
557
|
+
class: Q({ "is-stale": s(N) })
|
|
558
|
+
}, [
|
|
559
|
+
l("h3", null, t(e.value.results), 1),
|
|
560
|
+
s(F) ? (r(), n("p", ct, [
|
|
561
|
+
T(t(e.value.scope) + " · " + t(s(d).length ? e.value.namedFixtures : s(F).requested === "-1" ? e.value.all : s(F).requested === "0" ? e.value.none : s(F).requested + " " + e.value.rows) + " · " + t(s(F).datasets) + " " + t(e.value.datasets) + " · " + t(s(F).rows) + " " + t(e.value.rows), 1),
|
|
562
|
+
s(F).formats.length ? (r(), n("span", dt, " · " + t(s(F).formats.join(" / ")), 1)) : p("", !0)
|
|
563
|
+
])) : p("", !0),
|
|
564
|
+
(r(!0), n(R, null, I(s(y).samples, (a) => (r(), n("div", {
|
|
565
|
+
key: a.name,
|
|
566
|
+
class: "mr-review-sample"
|
|
567
|
+
}, [
|
|
568
|
+
l("p", null, [
|
|
569
|
+
l("strong", null, t(a.name), 1),
|
|
570
|
+
T(" · " + t(a.rows) + " " + t(e.value.rows) + " · " + t(a.pages) + " " + t(e.value.pages) + " · " + t(s(y).issues.filter((j) => j.fixture === a.name).length) + " " + t(e.value.issues), 1)
|
|
571
|
+
]),
|
|
572
|
+
l("button", {
|
|
573
|
+
type: "button",
|
|
574
|
+
disabled: s(N) || s(g),
|
|
575
|
+
onClick: (j) => P.value = P.value === a.name ? void 0 : a.name
|
|
576
|
+
}, t(P.value === a.name ? e.value.closeCompare : e.value.compare), 9, mt)
|
|
577
|
+
]))), 128))
|
|
578
|
+
], 2)) : p("", !0),
|
|
579
|
+
E.value && !s(N) ? (r(), ce(Ce, {
|
|
580
|
+
key: 2,
|
|
581
|
+
document: o.document,
|
|
582
|
+
previous: o.previous,
|
|
583
|
+
fixture: E.value,
|
|
584
|
+
messages: o.messages
|
|
585
|
+
}, null, 8, ["document", "previous", "fixture", "messages"])) : p("", !0),
|
|
586
|
+
l("p", vt, t(e.value.checked), 1)
|
|
587
|
+
], 64)) : (r(), n("p", Ye, t(e.value.empty), 1))
|
|
588
|
+
], 12, Ee));
|
|
589
|
+
}
|
|
590
|
+
}), _t = /* @__PURE__ */ ae(pt, [["__scopeId", "data-v-87b76c26"]]);
|
|
591
|
+
export {
|
|
592
|
+
_t as default
|
|
593
|
+
};
|