@agile-team/mach-report 2.12.0 → 2.14.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.
Files changed (97) hide show
  1. package/README.md +27 -3
  2. package/dist/ExcelBindingWizard-CLT2p7P3.cjs +1 -0
  3. package/dist/ExcelBindingWizard-CvsWR8Ga.js +1485 -0
  4. package/dist/{ParamEditor-BLaE5q5W.js → ParamEditor-CflQV3eQ.js} +191 -187
  5. package/dist/ParamEditor-vIDzvpPV.cjs +1 -0
  6. package/dist/ReportBatchPanel-DkxTzBkD.cjs +1 -0
  7. package/dist/{ReportBatchPanel-B5ClP9tm.js → ReportBatchPanel-LqVgiqp7.js} +3 -3
  8. package/dist/ReportPreview-CvbqLUzM.cjs +6 -0
  9. package/dist/ReportPreview-D_ywJ_-H.js +4533 -0
  10. package/dist/{ReportTemplateLibrary-BZB-XWjj.js → ReportTemplateLibrary-MjWEtc7X.js} +1 -1
  11. package/dist/ReportTemplateLibrary-cQ1sqNYo.cjs +1 -0
  12. package/dist/RuleEditor-BaR6xUiI.cjs +1 -0
  13. package/dist/RuleEditor-ChuXMlei.js +2037 -0
  14. package/dist/TemplateOutlinePanel-BHKP89Xz.cjs +1 -0
  15. package/dist/TemplateOutlinePanel-Dci6aRn1.js +96 -0
  16. package/dist/TemplateReusePanel-B7Gmyc1z.js +388 -0
  17. package/dist/TemplateReusePanel-CY5eO2Sh.cjs +1 -0
  18. package/dist/TemplateReviewPanel-DjlX3xpt.js +592 -0
  19. package/dist/TemplateReviewPanel-JvZe9_4G.cjs +1 -0
  20. package/dist/{batch-mRqhhhjt.js → batch-DzaTNLWI.js} +23 -16
  21. package/dist/batch-xMkqYiTr.cjs +1 -0
  22. package/dist/config-0UIohTS7.cjs +1 -0
  23. package/dist/{config-B612mw0x.js → config-Dt9NtCPl.js} +227 -186
  24. package/dist/data-explanation-BktvER5B.cjs +1 -0
  25. package/dist/data-explanation-C_J6jYNi.js +16 -0
  26. package/dist/designer-Ci1LizA9.js +5020 -0
  27. package/dist/designer-rtmVIIdN.cjs +2 -0
  28. package/dist/designer.cjs +1 -2
  29. package/dist/designer.d.cts +306 -3
  30. package/dist/designer.d.ts +306 -3
  31. package/dist/designer.js +21 -4266
  32. package/dist/font-loader-DHto6Lra.js +297 -0
  33. package/dist/font-loader-vhCT8znW.cjs +1 -0
  34. package/dist/index.cjs +8 -8
  35. package/dist/index.d.cts +182 -1
  36. package/dist/index.d.ts +182 -1
  37. package/dist/index.js +728 -628
  38. package/dist/{template-review-BzpcI-tR.js → json-snapshot-BeFT3Tso.js} +867 -637
  39. package/dist/json-snapshot-D1NTP2oI.cjs +2 -0
  40. package/dist/pdf-8UPQebOE.js +36288 -0
  41. package/dist/pdf-AyJGb22z.cjs +101 -0
  42. package/dist/pdf.cjs +1 -101
  43. package/dist/pdf.js +9 -36579
  44. package/dist/plugin-BGKf-Tqg.js +22 -0
  45. package/dist/{plugin-BDTU4D94.cjs → plugin-CktLH_Iy.cjs} +1 -1
  46. package/dist/{region-binding-workflow-CcUq8W2Q.js → region-binding-workflow-DEJbhpCv.js} +1 -1
  47. package/dist/server/node.d.cts +46 -11
  48. package/dist/server/node.d.ts +46 -11
  49. package/dist/server-node.cjs +1 -1
  50. package/dist/server-node.js +294 -280
  51. package/dist/server.cjs +1 -1
  52. package/dist/server.d.cts +107 -12
  53. package/dist/server.d.ts +107 -12
  54. package/dist/server.js +713 -453
  55. package/dist/style.css +1 -1
  56. package/dist/template-bindings-BJR4k7qZ.cjs +1 -0
  57. package/dist/template-bindings-Daui7hLF.js +252 -0
  58. package/dist/template-fragments-CLkGo6To.js +187 -0
  59. package/dist/template-fragments-DFUpq5QM.cjs +1 -0
  60. package/dist/template-outline-B3xVkzSv.cjs +1 -0
  61. package/dist/template-outline-CFenM1PV.js +88 -0
  62. package/dist/{template-registry-BjE1VS6g.js → template-registry-COXDEJEM.js} +1 -1
  63. package/dist/{useLocalDraft-C07SYRnC.js → useLocalDraft-BnhcxXk_.js} +1 -1
  64. package/dist/{useLocalDraft-Yiw1wFgI.cjs → useLocalDraft-CioIfDb6.cjs} +1 -1
  65. package/dist/{validate-DbgEM1Hh.js → validate-CkQBWCeg.js} +3 -3
  66. package/dist/vue/async.d.cts +72 -2
  67. package/dist/vue/async.d.ts +72 -2
  68. package/dist/vue/index.d.cts +124 -5
  69. package/dist/vue/index.d.ts +124 -5
  70. package/dist/vue-async.cjs +1 -1
  71. package/dist/vue-async.js +5 -5
  72. package/dist/vue.cjs +1 -1
  73. package/dist/vue.js +78 -71
  74. package/dist/{workbook-session-BPb3TMnT.js → workbook-session-BfK1yHOO.js} +1 -1
  75. package/dist/worker.cjs +1 -1
  76. package/dist/worker.d.cts +46 -11
  77. package/dist/worker.d.ts +46 -11
  78. package/dist/worker.js +59 -55
  79. package/dist/xlsx.js +3 -3
  80. package/package.json +1 -1
  81. package/dist/ExcelBindingWizard-CeAf4QSE.js +0 -1465
  82. package/dist/ExcelBindingWizard-y0mT-AHR.cjs +0 -1
  83. package/dist/ParamEditor-MBBC7lUE.cjs +0 -1
  84. package/dist/ReportBatchPanel-Dc-SDkYA.cjs +0 -1
  85. package/dist/ReportPreview-DWXROHBP.cjs +0 -6
  86. package/dist/ReportPreview-DiNXhQI0.js +0 -4138
  87. package/dist/ReportTemplateLibrary-5fk5CQBO.cjs +0 -1
  88. package/dist/RuleEditor-ChRzNQuF.cjs +0 -1
  89. package/dist/RuleEditor-DzAmW5YH.js +0 -2024
  90. package/dist/TemplateReviewPanel-BKofGrV9.js +0 -222
  91. package/dist/TemplateReviewPanel-DwtOcLue.cjs +0 -1
  92. package/dist/batch-Bt3Fd27Z.cjs +0 -1
  93. package/dist/config-BRoLo2oj.cjs +0 -1
  94. package/dist/plugin-Cd5G2QQn.js +0 -22
  95. package/dist/record-bindings-By_UKZ2g.cjs +0 -1
  96. package/dist/record-bindings-D-5jQlTj.js +0 -196
  97. package/dist/template-review-BfCC8Ng9.cjs +0 -2
@@ -0,0 +1,592 @@
1
+ import { shallowRef as q, ref as C, computed as P, watch as H, onBeforeUnmount as re, toRaw as ne, defineComponent as se, openBlock as r, createElementBlock as n, toDisplayString as t, createCommentVNode as v, Fragment as N, createElementVNode as l, createVNode as X, unref as s, createTextVNode as R, withDirectives as U, isRef as L, vModelSelect as oe, renderList as B, vModelText as Y, vModelCheckbox as Z, normalizeClass as K, createBlock as ue } from "vue";
2
+ import { reviewReportTemplateAsync as ie, paginateTemplate as ce } from "@agile-team/mach-report";
3
+ import { T as Q } from "./designer-Ci1LizA9.js";
4
+ import { ReportPreview as ee } from "@agile-team/mach-report/vue";
5
+ import { g as de } from "./template-bindings-Daui7hLF.js";
6
+ import { _ as le } from "./_plugin-vue_export-helper-8SL1F89S.js";
7
+ function ve(o, d = () => o.fixtures) {
8
+ const i = q(), u = q([]), e = C("20"), c = C(!1), g = C(!1), m = C(!1), _ = C(""), h = q(), w = C(!1), M = q(), b = P(
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
+ ), A = P(() => b.value.size > 0);
15
+ let k = 0, p;
16
+ function j() {
17
+ k++, p?.abort(), p = void 0, g.value = !1, w.value = !1, h.value = void 0, m.value = !!i.value, _.value = "";
18
+ }
19
+ for (const f of [() => o.document, () => o.previous])
20
+ H(
21
+ f,
22
+ () => {
23
+ c.value = !1, j();
24
+ },
25
+ { deep: !0, flush: "sync" }
26
+ );
27
+ for (const f of [
28
+ () => o.datasets,
29
+ () => o.dataSchemas,
30
+ () => o.formats,
31
+ d
32
+ ])
33
+ H(f, j, { deep: !0, flush: "sync" });
34
+ H([e, c], j, { flush: "sync" }), re(() => {
35
+ k++, p?.abort();
36
+ });
37
+ const z = P(
38
+ () => i.value?.issues.filter((f) => f.severity === "error").length ?? 0
39
+ );
40
+ function F() {
41
+ p?.abort(), p = new AbortController();
42
+ const f = ++k, $ = p;
43
+ g.value = !0, _.value = "", w.value = !1, h.value = void 0, J(f, $);
44
+ }
45
+ async function J(f, $) {
46
+ try {
47
+ const x = Number(e.value), G = Object.fromEntries(
48
+ Object.entries(o.datasets ?? {}).map(([O, S]) => [
49
+ O,
50
+ x < 0 || b.value.has(O) ? S : S.slice(0, x)
51
+ ])
52
+ ), V = d(), T = V?.length ? [...V] : x === 0 ? [] : [{ name: e.value, datasets: G }], D = await ie(o.document, {
53
+ previous: o.previous,
54
+ dataSchemas: o.dataSchemas,
55
+ formats: o.formats,
56
+ allowBreakingChanges: c.value,
57
+ ...!V?.length && A.value && x > 0 ? { maxSampleRows: x } : {},
58
+ fixtures: T,
59
+ signal: $.signal,
60
+ onProgress: (O) => {
61
+ f === k && (h.value = O);
62
+ }
63
+ });
64
+ if (f !== k) return;
65
+ i.value = D, m.value = !1, u.value = T, M.value = {
66
+ requested: e.value,
67
+ rows: D.samples.reduce((O, S) => O + S.rows, 0),
68
+ datasets: new Set(
69
+ T.flatMap((O) => Object.keys(O.datasets))
70
+ ).size,
71
+ formats: [...o.formats ?? []]
72
+ };
73
+ } catch (x) {
74
+ f === k && !$.signal.aborted && (_.value = x instanceof Error ? x.message : String(x));
75
+ } finally {
76
+ f === k && (g.value = !1, p = void 0);
77
+ }
78
+ }
79
+ function W() {
80
+ k++, p?.abort(), p = void 0, g.value = !1, w.value = !0, h.value = void 0;
81
+ }
82
+ return {
83
+ report: i,
84
+ sampleSize: e,
85
+ acknowledged: c,
86
+ running: g,
87
+ stale: m,
88
+ failure: _,
89
+ checkedScope: M,
90
+ checkedFixtures: u,
91
+ hasTree: A,
92
+ errors: z,
93
+ run: F,
94
+ cancel: W,
95
+ progress: h,
96
+ cancelled: w
97
+ };
98
+ }
99
+ function me(o) {
100
+ const d = Object.getPrototypeOf(o);
101
+ if (d !== Object.prototype && d !== Array.prototype && d !== 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 pe(o) {
109
+ let d = 0, i = 0;
110
+ const u = /* @__PURE__ */ new Set();
111
+ function e(c, g) {
112
+ if (++d > 1e5 || g > 32)
113
+ throw new RangeError("Sample data exceeds the capture budget");
114
+ if (typeof c == "string") {
115
+ if (i += c.length, i > 2e6)
116
+ throw new RangeError("Sample text exceeds the capture budget");
117
+ return c;
118
+ }
119
+ if (c === null || typeof c == "boolean" || typeof c == "number" && Number.isFinite(c)) return c;
120
+ if (!c || typeof c != "object")
121
+ throw new Error("Sample data must contain plain JSON values");
122
+ const m = ne(c);
123
+ if (u.has(m))
124
+ throw new Error("Sample data must not contain cycles");
125
+ me(m), u.add(m);
126
+ const _ = Array.isArray(m) ? [] : /* @__PURE__ */ Object.create(null);
127
+ for (const h of Object.keys(m)) {
128
+ const w = Object.getOwnPropertyDescriptor(m, h);
129
+ if (w.get || w.set || ["__proto__", "constructor", "prototype"].includes(h))
130
+ throw new Error("Sample data must not contain getters or unsafe keys");
131
+ _[h] = e(
132
+ w.value,
133
+ g + 1
134
+ );
135
+ }
136
+ return u.delete(m), _;
137
+ }
138
+ return e(o, 0);
139
+ }
140
+ function fe(o, d = () => Q) {
141
+ const i = C([]), u = C(""), e = C(!1), c = C(""), g = C({}), m = P(() => [...o.fixtures ?? [], ...i.value]);
142
+ function _() {
143
+ c.value = "";
144
+ try {
145
+ if (!e.value) throw new Error(d().sampleConsentMissing);
146
+ if (!u.value.trim()) throw new Error(d().sampleNameMissing);
147
+ if (m.value.length >= 20) throw new Error(d().sampleLimit);
148
+ if (m.value.some((M) => M.name === u.value.trim()))
149
+ throw new Error(d().sampleNameDuplicate);
150
+ const w = pe(o.datasets ?? {});
151
+ if (Object.values(w).reduce((M, b) => M + b.length, 0) > 1e3)
152
+ throw new Error(d().sampleRowsLimit);
153
+ i.value.push({
154
+ name: u.value.trim(),
155
+ datasets: w,
156
+ ...Object.keys(g.value).length ? { params: { ...g.value } } : {}
157
+ }), u.value = "", e.value = !1;
158
+ } catch (w) {
159
+ c.value = w instanceof Error ? w.message : String(w);
160
+ }
161
+ }
162
+ function h(w) {
163
+ i.value.splice(w, 1);
164
+ }
165
+ return { fixtures: i, name: u, consent: e, failure: c, params: g, suite: m, capture: _, remove: h };
166
+ }
167
+ function te(o, d) {
168
+ const i = ce(o.template, d.datasets, {
169
+ maxPages: 100,
170
+ maxCells: 25e4
171
+ }), u = [
172
+ ...new Set(
173
+ de(o.template).flatMap(
174
+ (e) => e.fields.map((c) => `${e.dataset}.${c.field}`)
175
+ )
176
+ )
177
+ ];
178
+ return {
179
+ pages: i.plan.pages.length,
180
+ dimensions: [
181
+ ...new Set(
182
+ i.plan.pages.map(
183
+ (e) => `${e.pageWidthMm} × ${e.pageHeightMm} mm`
184
+ )
185
+ )
186
+ ],
187
+ fields: u,
188
+ fetcher: async () => i.plan
189
+ };
190
+ }
191
+ function he(o, d, i) {
192
+ const u = te(o, d), e = i ? te(i, d) : void 0, c = new Set(e?.fields), g = new Set(u.fields);
193
+ return {
194
+ current: u,
195
+ previous: e,
196
+ addedFields: u.fields.filter((m) => !c.has(m)),
197
+ removedFields: e?.fields.filter((m) => !g.has(m)) ?? []
198
+ };
199
+ }
200
+ const we = ["aria-label"], ge = {
201
+ key: 0,
202
+ role: "alert"
203
+ }, ye = { class: "mr-fixture-previews" }, be = { key: 0 }, _e = /* @__PURE__ */ se({
204
+ __name: "TemplateFixtureComparison",
205
+ props: {
206
+ document: {},
207
+ previous: {},
208
+ fixture: {},
209
+ messages: {}
210
+ },
211
+ setup(o) {
212
+ const d = o, i = P(() => ({ ...Q, ...d.messages })), u = P(() => {
213
+ try {
214
+ return {
215
+ result: he(
216
+ d.document,
217
+ d.fixture,
218
+ d.previous
219
+ )
220
+ };
221
+ } catch (e) {
222
+ return { error: e instanceof Error ? e.message : String(e) };
223
+ }
224
+ });
225
+ return (e, c) => (r(), n("section", {
226
+ class: "mr-fixture-comparison",
227
+ "aria-label": i.value.compare
228
+ }, [
229
+ u.value.error ? (r(), n("p", ge, t(u.value.error), 1)) : v("", !0),
230
+ u.value.result ? (r(), n(N, { key: 1 }, [
231
+ l("dl", null, [
232
+ l("dt", null, t(i.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(i.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(i.value.fieldsAdded), 1),
237
+ l("dd", null, t(u.value.result.addedFields.join("、") || "—"), 1),
238
+ l("dt", null, t(i.value.fieldsRemoved), 1),
239
+ l("dd", null, t(u.value.result.removedFields.join("、") || "—"), 1)
240
+ ]),
241
+ l("div", ye, [
242
+ u.value.result.previous ? (r(), n("article", be, [
243
+ l("h4", null, t(i.value.baselinePreview), 1),
244
+ X(s(ee), {
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
+ ])) : v("", !0),
256
+ l("article", null, [
257
+ l("h4", null, t(i.value.draftPreview), 1),
258
+ X(s(ee), {
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)) : v("", !0)
272
+ ], 8, we));
273
+ }
274
+ }), ke = /* @__PURE__ */ le(_e, [["__scopeId", "data-v-211ee4bf"]]), xe = ["aria-label", "aria-busy"], Se = {
275
+ key: 0,
276
+ role: "status"
277
+ }, Ce = ["disabled"], Ee = {
278
+ key: 0,
279
+ class: "mr-review-stale",
280
+ role: "status"
281
+ }, je = { class: "mr-review-controls" }, Fe = ["aria-label", "disabled"], Oe = { value: "0" }, Te = { value: "20" }, Re = { value: "100" }, Ne = { value: "-1" }, Me = {
282
+ key: 0,
283
+ class: "mr-review-note"
284
+ }, Pe = { class: "mr-review-fixtures" }, $e = { class: "mr-review-note" }, Ve = { key: 0 }, Ae = ["disabled", "onClick"], De = { class: "mr-review-fixture-form" }, Ue = ["placeholder", "disabled"], Be = { key: 0 }, ze = ["onUpdate:modelValue", "placeholder", "disabled"], Ie = { class: "mr-review-consent" }, qe = ["disabled"], Le = ["disabled"], He = {
285
+ key: 1,
286
+ role: "alert",
287
+ class: "is-error"
288
+ }, Je = {
289
+ key: 1,
290
+ class: "mr-review-note"
291
+ }, We = {
292
+ key: 2,
293
+ class: "is-error",
294
+ role: "alert"
295
+ }, Ge = {
296
+ key: 3,
297
+ class: "mr-review-stale",
298
+ role: "status"
299
+ }, Ke = {
300
+ key: 4,
301
+ class: "mr-review-note"
302
+ }, Qe = {
303
+ key: 0,
304
+ class: "mr-review-summary",
305
+ role: "status"
306
+ }, Xe = {
307
+ key: 0,
308
+ class: "mr-review-note"
309
+ }, Ye = {
310
+ key: 1,
311
+ class: "mr-review-note"
312
+ }, Ze = {
313
+ key: 2,
314
+ class: "mr-review-list"
315
+ }, et = { key: 0 }, tt = ["onClick"], st = {
316
+ key: 3,
317
+ class: "mr-review-note"
318
+ }, lt = {
319
+ key: 4,
320
+ class: "mr-review-ack"
321
+ }, at = {
322
+ key: 0,
323
+ class: "mr-review-note"
324
+ }, rt = {
325
+ key: 1,
326
+ class: "mr-review-list"
327
+ }, nt = ["onClick"], ot = {
328
+ key: 0,
329
+ class: "mr-review-scope"
330
+ }, ut = { key: 0 }, it = ["disabled", "onClick"], ct = { class: "mr-review-note" }, dt = /* @__PURE__ */ se({
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: d }) {
343
+ const i = o, u = d, e = P(() => ({ ...Q, ...i.messages })), {
344
+ name: c,
345
+ consent: g,
346
+ failure: m,
347
+ params: _,
348
+ suite: h,
349
+ capture: w,
350
+ remove: M
351
+ } = fe(i, () => e.value), {
352
+ report: b,
353
+ sampleSize: A,
354
+ acknowledged: k,
355
+ running: p,
356
+ stale: j,
357
+ failure: z,
358
+ checkedScope: F,
359
+ checkedFixtures: J,
360
+ hasTree: W,
361
+ errors: f,
362
+ run: $,
363
+ cancel: x,
364
+ cancelled: G,
365
+ progress: V
366
+ } = ve(i, () => h.value), T = C(), D = P(
367
+ () => J.value.find((S) => S.name === T.value)
368
+ );
369
+ H(j, (S) => {
370
+ S && (T.value = void 0);
371
+ });
372
+ function O(S) {
373
+ const y = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(S);
374
+ u("locate", {
375
+ path: S,
376
+ ...y ? { pageIndex: Number(y[1]), componentIndex: Number(y[2]) } : {}
377
+ });
378
+ }
379
+ return (S, y) => (r(), n("section", {
380
+ class: "mr-template-review",
381
+ "aria-label": e.value.title,
382
+ "aria-busy": s(p)
383
+ }, [
384
+ l("header", null, [
385
+ l("strong", null, t(e.value.title), 1),
386
+ s(p) && s(V) ? (r(), n("span", Se, t(s(V).completed) + " / " + t(s(V).total) + " " + t(e.value.progress), 1)) : v("", !0),
387
+ s(p) ? (r(), n("button", {
388
+ key: 1,
389
+ type: "button",
390
+ onClick: y[0] || (y[0] = //@ts-ignore
391
+ (...a) => s(x) && s(x)(...a))
392
+ }, t(e.value.cancel), 1)) : v("", !0),
393
+ l("button", {
394
+ type: "button",
395
+ disabled: s(p),
396
+ onClick: y[1] || (y[1] = //@ts-ignore
397
+ (...a) => s($) && s($)(...a))
398
+ }, t(s(p) ? e.value.running : e.value.run), 9, Ce)
399
+ ]),
400
+ s(G) ? (r(), n("p", Ee, t(e.value.cancelled), 1)) : v("", !0),
401
+ l("div", je, [
402
+ l("label", null, [
403
+ R(t(e.value.samples), 1),
404
+ U(l("select", {
405
+ "onUpdate:modelValue": y[2] || (y[2] = (a) => L(A) ? A.value = a : null),
406
+ "aria-label": e.value.samples,
407
+ disabled: s(p) || !!s(h).length
408
+ }, [
409
+ l("option", Oe, t(e.value.none), 1),
410
+ l("option", Te, t(e.value.first20), 1),
411
+ l("option", Re, t(e.value.first100), 1),
412
+ l("option", Ne, t(e.value.all), 1)
413
+ ], 8, Fe), [
414
+ [oe, s(A)]
415
+ ])
416
+ ]),
417
+ s(h).length ? (r(), n("span", Me, t(e.value.namedFixtures) + " · " + t(s(h).length), 1)) : v("", !0)
418
+ ]),
419
+ l("details", Pe, [
420
+ l("summary", null, [
421
+ R(t(e.value.namedFixtures) + " ", 1),
422
+ l("small", null, t(s(h).length) + " / 20", 1)
423
+ ]),
424
+ l("p", $e, t(e.value.fixtureHint), 1),
425
+ s(h).length ? (r(), n("ul", Ve, [
426
+ (r(!0), n(N, null, B(s(h), (a, E) => (r(), n("li", {
427
+ key: a.name
428
+ }, [
429
+ l("strong", null, t(a.name), 1),
430
+ l("span", null, t(Object.values(a.datasets).reduce(
431
+ (I, ae) => I + ae.length,
432
+ 0
433
+ )) + " " + t(e.value.rows), 1),
434
+ E >= (o.fixtures?.length ?? 0) ? (r(), n("button", {
435
+ key: 0,
436
+ type: "button",
437
+ disabled: s(p),
438
+ onClick: (I) => s(M)(E - (o.fixtures?.length ?? 0))
439
+ }, t(e.value.remove), 9, Ae)) : v("", !0)
440
+ ]))), 128))
441
+ ])) : v("", !0),
442
+ l("div", De, [
443
+ l("label", null, [
444
+ R(t(e.value.fixtureName), 1),
445
+ U(l("input", {
446
+ "onUpdate:modelValue": y[3] || (y[3] = (a) => L(c) ? c.value = a : null),
447
+ placeholder: e.value.fixturePlaceholder,
448
+ disabled: s(p)
449
+ }, null, 8, Ue), [
450
+ [Y, s(c)]
451
+ ])
452
+ ]),
453
+ o.document.template.params?.length ? (r(), n("details", Be, [
454
+ l("summary", null, t(e.value.parameters), 1),
455
+ (r(!0), n(N, null, B(o.document.template.params, (a) => (r(), n("label", {
456
+ key: a.field
457
+ }, [
458
+ R(t(a.label ?? a.field), 1),
459
+ U(l("input", {
460
+ "onUpdate:modelValue": (E) => s(_)[a.field] = E,
461
+ placeholder: a.defaultValue,
462
+ disabled: s(p)
463
+ }, null, 8, ze), [
464
+ [Y, s(_)[a.field]]
465
+ ])
466
+ ]))), 128))
467
+ ])) : v("", !0),
468
+ l("label", Ie, [
469
+ U(l("input", {
470
+ "onUpdate:modelValue": y[4] || (y[4] = (a) => L(g) ? g.value = a : null),
471
+ type: "checkbox",
472
+ disabled: s(p)
473
+ }, null, 8, qe), [
474
+ [Z, s(g)]
475
+ ]),
476
+ R(t(e.value.deidentified), 1)
477
+ ]),
478
+ l("button", {
479
+ type: "button",
480
+ disabled: s(p) || !s(g) || !s(c).trim() || s(h).length >= 20,
481
+ onClick: y[5] || (y[5] = //@ts-ignore
482
+ (...a) => s(w) && s(w)(...a))
483
+ }, t(e.value.capture), 9, Le),
484
+ s(m) ? (r(), n("p", He, t(s(m)), 1)) : v("", !0)
485
+ ])
486
+ ]),
487
+ s(W) ? (r(), n("p", Je, t(e.value.treeHint), 1)) : v("", !0),
488
+ s(z) ? (r(), n("p", We, t(s(z)), 1)) : v("", !0),
489
+ s(j) ? (r(), n("p", Ge, t(e.value.stale), 1)) : v("", !0),
490
+ s(b) ? (r(), n(N, { key: 5 }, [
491
+ s(j) ? v("", !0) : (r(), n("div", Qe, [
492
+ l("span", {
493
+ class: K({ "is-error": s(f) })
494
+ }, t(s(f)) + " " + t(e.value.errors), 3),
495
+ l("span", null, t(s(b).issues.length - s(f)) + " " + t(e.value.warnings), 1)
496
+ ])),
497
+ l("section", null, [
498
+ l("h3", null, [
499
+ R(t(e.value.changes) + " ", 1),
500
+ l("small", null, t(s(b).changes?.totalChanges ?? 0), 1)
501
+ ]),
502
+ o.previous ? s(b).changes?.totalChanges ? (r(), n("ol", Ze, [
503
+ (r(!0), n(N, null, B(s(b).changes?.changes, (a, E) => (r(), n("li", { key: E }, [
504
+ l("div", null, [
505
+ l("span", null, t(e.value.categories[a.category]) + " · " + t(e.value.kinds[a.kind]), 1),
506
+ a.breaking ? (r(), n("b", et, t(e.value.breaking), 1)) : v("", !0),
507
+ l("button", {
508
+ type: "button",
509
+ onClick: (I) => O(a.path)
510
+ }, t(e.value.locate), 9, tt)
511
+ ]),
512
+ l("code", null, t(a.path), 1),
513
+ l("dl", null, [
514
+ a.before !== void 0 ? (r(), n(N, { key: 0 }, [
515
+ l("dt", null, t(e.value.before), 1),
516
+ l("dd", null, t(a.before), 1)
517
+ ], 64)) : v("", !0),
518
+ a.after !== void 0 ? (r(), n(N, { key: 1 }, [
519
+ l("dt", null, t(e.value.after), 1),
520
+ l("dd", null, t(a.after), 1)
521
+ ], 64)) : v("", !0)
522
+ ])
523
+ ]))), 128))
524
+ ])) : (r(), n("p", Ye, t(e.value.noChanges), 1)) : (r(), n("p", Xe, t(e.value.baseline), 1)),
525
+ s(b).changes?.truncated ? (r(), n("p", st, t(e.value.truncated), 1)) : v("", !0),
526
+ s(b).changes?.breakingChanges ? (r(), n("label", lt, [
527
+ U(l("input", {
528
+ "onUpdate:modelValue": y[6] || (y[6] = (a) => L(k) ? k.value = a : null),
529
+ type: "checkbox"
530
+ }, null, 512), [
531
+ [Z, s(k)]
532
+ ]),
533
+ R(t(e.value.acknowledge), 1)
534
+ ])) : v("", !0)
535
+ ]),
536
+ l("section", null, [
537
+ l("h3", null, t(e.value.issues), 1),
538
+ s(b).issues.length ? (r(), n("ol", rt, [
539
+ (r(!0), n(N, null, B(s(b).issues, (a, E) => (r(), n("li", { key: E }, [
540
+ l("div", null, [
541
+ l("span", {
542
+ class: K({ "is-error": a.severity === "error" })
543
+ }, t(a.severity === "error" ? e.value.errors : e.value.warnings), 3),
544
+ l("button", {
545
+ type: "button",
546
+ onClick: (I) => u("locate", a)
547
+ }, t(e.value.locate), 9, nt)
548
+ ]),
549
+ l("p", null, t(a.message), 1),
550
+ l("code", null, t(a.path), 1)
551
+ ]))), 128))
552
+ ])) : (r(), n("p", at, t(e.value.noIssues), 1))
553
+ ]),
554
+ s(b).samples.length ? (r(), n("section", {
555
+ key: 1,
556
+ class: K({ "is-stale": s(j) })
557
+ }, [
558
+ l("h3", null, t(e.value.results), 1),
559
+ s(F) ? (r(), n("p", ot, [
560
+ R(t(e.value.scope) + " · " + t(s(h).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),
561
+ s(F).formats.length ? (r(), n("span", ut, " · " + t(s(F).formats.join(" / ")), 1)) : v("", !0)
562
+ ])) : v("", !0),
563
+ (r(!0), n(N, null, B(s(b).samples, (a) => (r(), n("div", {
564
+ key: a.name,
565
+ class: "mr-review-sample"
566
+ }, [
567
+ l("p", null, [
568
+ l("strong", null, t(a.name), 1),
569
+ R(" · " + t(a.rows) + " " + t(e.value.rows) + " · " + t(a.pages) + " " + t(e.value.pages) + " · " + t(s(b).issues.filter((E) => E.fixture === a.name).length) + " " + t(e.value.issues), 1)
570
+ ]),
571
+ l("button", {
572
+ type: "button",
573
+ disabled: s(j) || s(p),
574
+ onClick: (E) => T.value = T.value === a.name ? void 0 : a.name
575
+ }, t(T.value === a.name ? e.value.closeCompare : e.value.compare), 9, it)
576
+ ]))), 128))
577
+ ], 2)) : v("", !0),
578
+ D.value && !s(j) ? (r(), ue(ke, {
579
+ key: 2,
580
+ document: o.document,
581
+ previous: o.previous,
582
+ fixture: D.value,
583
+ messages: o.messages
584
+ }, null, 8, ["document", "previous", "fixture", "messages"])) : v("", !0),
585
+ l("p", ct, t(e.value.checked), 1)
586
+ ], 64)) : (r(), n("p", Ke, t(e.value.empty), 1))
587
+ ], 8, xe));
588
+ }
589
+ }), gt = /* @__PURE__ */ le(dt, [["__scopeId", "data-v-0a5dda64"]]);
590
+ export {
591
+ gt as default
592
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),A=require("@agile-team/mach-report"),j=require("./designer-rtmVIIdN.cjs"),O=require("@agile-team/mach-report/vue"),L=require("./template-bindings-BJR4k7qZ.cjs"),$=require("./_plugin-vue_export-helper-BLmdZLlg.cjs");function z(n,s=()=>n.fixtures){const o=e.shallowRef(),r=e.shallowRef([]),t=e.ref("20"),a=e.ref(!1),p=e.ref(!1),i=e.ref(!1),g=e.ref(""),d=e.shallowRef(),m=e.ref(!1),D=e.shallowRef(),v=e.computed(()=>new Set(n.document.template.pages.flatMap(u=>u.components).flatMap(u=>u.kind==="list"&&u.tree?[u.dataset]:[]))),B=e.computed(()=>v.value.size>0);let y=0,c;function S(){y++,c?.abort(),c=void 0,p.value=!1,m.value=!1,d.value=void 0,i.value=!!o.value,g.value=""}for(const u of[()=>n.document,()=>n.previous])e.watch(u,()=>{a.value=!1,S()},{deep:!0,flush:"sync"});for(const u of[()=>n.datasets,()=>n.dataSchemas,()=>n.formats,s])e.watch(u,S,{deep:!0,flush:"sync"});e.watch([t,a],S,{flush:"sync"}),e.onBeforeUnmount(()=>{y++,c?.abort()});const C=e.computed(()=>o.value?.issues.filter(u=>u.severity==="error").length??0);function w(){c?.abort(),c=new AbortController;const u=++y,_=c;p.value=!0,g.value="",m.value=!1,d.value=void 0,F(u,_)}async function F(u,_){try{const k=Number(t.value),M=Object.fromEntries(Object.entries(n.datasets??{}).map(([V,h])=>[V,k<0||v.value.has(V)?h:h.slice(0,k)])),b=s(),N=b?.length?[...b]:k===0?[]:[{name:t.value,datasets:M}],x=await A.reviewReportTemplateAsync(n.document,{previous:n.previous,dataSchemas:n.dataSchemas,formats:n.formats,allowBreakingChanges:a.value,...!b?.length&&B.value&&k>0?{maxSampleRows:k}:{},fixtures:N,signal:_.signal,onProgress:V=>{u===y&&(d.value=V)}});if(u!==y)return;o.value=x,i.value=!1,r.value=N,D.value={requested:t.value,rows:x.samples.reduce((V,h)=>V+h.rows,0),datasets:new Set(N.flatMap(V=>Object.keys(V.datasets))).size,formats:[...n.formats??[]]}}catch(k){u===y&&!_.signal.aborted&&(g.value=k instanceof Error?k.message:String(k))}finally{u===y&&(p.value=!1,c=void 0)}}function R(){y++,c?.abort(),c=void 0,p.value=!1,m.value=!0,d.value=void 0}return{report:o,sampleSize:t,acknowledged:a,running:p,stale:i,failure:g,checkedScope:D,checkedFixtures:r,hasTree:B,errors:C,run:w,cancel:R,progress:d,cancelled:m}}function I(n){const s=Object.getPrototypeOf(n);if(s!==Object.prototype&&s!==Array.prototype&&s!==null)throw new Error("Sample data must contain plain JSON objects");if(Object.getOwnPropertySymbols(n).length)throw new Error("Sample data must not contain symbols");if(Array.isArray(n)&&Object.keys(n).length!==n.length)throw new Error("Sample arrays must not contain holes or extra properties")}function U(n){let s=0,o=0;const r=new Set;function t(a,p){if(++s>1e5||p>32)throw new RangeError("Sample data exceeds the capture budget");if(typeof a=="string"){if(o+=a.length,o>2e6)throw new RangeError("Sample text exceeds the capture budget");return a}if(a===null||typeof a=="boolean"||typeof a=="number"&&Number.isFinite(a))return a;if(!a||typeof a!="object")throw new Error("Sample data must contain plain JSON values");const i=e.toRaw(a);if(r.has(i))throw new Error("Sample data must not contain cycles");I(i),r.add(i);const g=Array.isArray(i)?[]:Object.create(null);for(const d of Object.keys(i)){const m=Object.getOwnPropertyDescriptor(i,d);if(m.get||m.set||["__proto__","constructor","prototype"].includes(d))throw new Error("Sample data must not contain getters or unsafe keys");g[d]=t(m.value,p+1)}return r.delete(i),g}return t(n,0)}function H(n,s=()=>j.TEMPLATE_REVIEW_MESSAGES){const o=e.ref([]),r=e.ref(""),t=e.ref(!1),a=e.ref(""),p=e.ref({}),i=e.computed(()=>[...n.fixtures??[],...o.value]);function g(){a.value="";try{if(!t.value)throw new Error(s().sampleConsentMissing);if(!r.value.trim())throw new Error(s().sampleNameMissing);if(i.value.length>=20)throw new Error(s().sampleLimit);if(i.value.some(D=>D.name===r.value.trim()))throw new Error(s().sampleNameDuplicate);const m=U(n.datasets??{});if(Object.values(m).reduce((D,v)=>D+v.length,0)>1e3)throw new Error(s().sampleRowsLimit);o.value.push({name:r.value.trim(),datasets:m,...Object.keys(p.value).length?{params:{...p.value}}:{}}),r.value="",t.value=!1}catch(m){a.value=m instanceof Error?m.message:String(m)}}function d(m){o.value.splice(m,1)}return{fixtures:o,name:r,consent:t,failure:a,params:p,suite:i,capture:g,remove:d}}function P(n,s){const o=A.paginateTemplate(n.template,s.datasets,{maxPages:100,maxCells:25e4}),r=[...new Set(L.collectTemplateDatasetBindings(n.template).flatMap(t=>t.fields.map(a=>`${t.dataset}.${a.field}`)))];return{pages:o.plan.pages.length,dimensions:[...new Set(o.plan.pages.map(t=>`${t.pageWidthMm} × ${t.pageHeightMm} mm`))],fields:r,fetcher:async()=>o.plan}}function W(n,s,o){const r=P(n,s),t=o?P(o,s):void 0,a=new Set(t?.fields),p=new Set(r.fields);return{current:r,previous:t,addedFields:r.fields.filter(i=>!a.has(i)),removedFields:t?.fields.filter(i=>!p.has(i))??[]}}const G=["aria-label"],J={key:0,role:"alert"},K={class:"mr-fixture-previews"},Q={key:0},X=e.defineComponent({__name:"TemplateFixtureComparison",props:{document:{},previous:{},fixture:{},messages:{}},setup(n){const s=n,o=e.computed(()=>({...j.TEMPLATE_REVIEW_MESSAGES,...s.messages})),r=e.computed(()=>{try{return{result:W(s.document,s.fixture,s.previous)}}catch(t){return{error:t instanceof Error?t.message:String(t)}}});return(t,a)=>(e.openBlock(),e.createElementBlock("section",{class:"mr-fixture-comparison","aria-label":o.value.compare},[r.value.error?(e.openBlock(),e.createElementBlock("p",J,e.toDisplayString(r.value.error),1)):e.createCommentVNode("",!0),r.value.result?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("dl",null,[e.createElementVNode("dt",null,e.toDisplayString(o.value.pages),1),e.createElementVNode("dd",null,e.toDisplayString(r.value.result.previous?.pages??"—")+" → "+e.toDisplayString(r.value.result.current.pages),1),e.createElementVNode("dt",null,e.toDisplayString(o.value.dimensions),1),e.createElementVNode("dd",null,e.toDisplayString(r.value.result.previous?.dimensions.join(" / ")??"—")+" → "+e.toDisplayString(r.value.result.current.dimensions.join(" / ")),1),e.createElementVNode("dt",null,e.toDisplayString(o.value.fieldsAdded),1),e.createElementVNode("dd",null,e.toDisplayString(r.value.result.addedFields.join("、")||"—"),1),e.createElementVNode("dt",null,e.toDisplayString(o.value.fieldsRemoved),1),e.createElementVNode("dd",null,e.toDisplayString(r.value.result.removedFields.join("、")||"—"),1)]),e.createElementVNode("div",K,[r.value.result.previous?(e.openBlock(),e.createElementBlock("article",Q,[e.createElementVNode("h4",null,e.toDisplayString(o.value.baselinePreview),1),e.createVNode(e.unref(O.ReportPreview),{"report-id":"baseline",fetcher:r.value.result.previous.fetcher,"show-params":!1,"show-export":!1,"show-print":!1,"show-pdf-window":!1,editable:!1,"excel-import":!1,height:"400px"},null,8,["fetcher"])])):e.createCommentVNode("",!0),e.createElementVNode("article",null,[e.createElementVNode("h4",null,e.toDisplayString(o.value.draftPreview),1),e.createVNode(e.unref(O.ReportPreview),{"report-id":"draft",fetcher:r.value.result.current.fetcher,"show-params":!1,"show-export":!1,"show-print":!1,"show-pdf-window":!1,editable:!1,"excel-import":!1,height:"400px"},null,8,["fetcher"])])])],64)):e.createCommentVNode("",!0)],8,G))}}),Y=$._export_sfc(X,[["__scopeId","data-v-211ee4bf"]]),Z=["aria-label","aria-busy"],ee={key:0,role:"status"},te=["disabled"],le={key:0,class:"mr-review-stale",role:"status"},ne={class:"mr-review-controls"},re=["aria-label","disabled"],oe={value:"0"},ae={value:"20"},se={value:"100"},ie={value:"-1"},ce={key:0,class:"mr-review-note"},ue={class:"mr-review-fixtures"},de={class:"mr-review-note"},me={key:0},pe=["disabled","onClick"],fe={class:"mr-review-fixture-form"},ve=["placeholder","disabled"],ge={key:0},ye=["onUpdate:modelValue","placeholder","disabled"],ke={class:"mr-review-consent"},he=["disabled"],Ee=["disabled"],Se={key:1,role:"alert",class:"is-error"},we={key:1,class:"mr-review-note"},Ve={key:2,class:"is-error",role:"alert"},Ne={key:3,class:"mr-review-stale",role:"status"},De={key:4,class:"mr-review-note"},_e={key:0,class:"mr-review-summary",role:"status"},be={key:0,class:"mr-review-note"},Be={key:1,class:"mr-review-note"},xe={key:2,class:"mr-review-list"},Ce={key:0},Te=["onClick"],Fe={key:3,class:"mr-review-note"},Re={key:4,class:"mr-review-ack"},Me={key:0,class:"mr-review-note"},je={key:1,class:"mr-review-list"},Oe=["onClick"],Pe={key:0,class:"mr-review-scope"},Ae={key:0},$e=["disabled","onClick"],qe={class:"mr-review-note"},Le=e.defineComponent({__name:"TemplateReviewPanel",props:{document:{},previous:{},datasets:{},dataSchemas:{},formats:{},fixtures:{},messages:{}},emits:["locate"],setup(n,{emit:s}){const o=n,r=s,t=e.computed(()=>({...j.TEMPLATE_REVIEW_MESSAGES,...o.messages})),{name:a,consent:p,failure:i,params:g,suite:d,capture:m,remove:D}=H(o,()=>t.value),{report:v,sampleSize:B,acknowledged:y,running:c,stale:S,failure:C,checkedScope:w,checkedFixtures:F,hasTree:R,errors:u,run:_,cancel:k,cancelled:M,progress:b}=z(o,()=>d.value),N=e.ref(),x=e.computed(()=>F.value.find(h=>h.name===N.value));e.watch(S,h=>{h&&(N.value=void 0)});function V(h){const f=/\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(h);r("locate",{path:h,...f?{pageIndex:Number(f[1]),componentIndex:Number(f[2])}:{}})}return(h,f)=>(e.openBlock(),e.createElementBlock("section",{class:"mr-template-review","aria-label":t.value.title,"aria-busy":e.unref(c)},[e.createElementVNode("header",null,[e.createElementVNode("strong",null,e.toDisplayString(t.value.title),1),e.unref(c)&&e.unref(b)?(e.openBlock(),e.createElementBlock("span",ee,e.toDisplayString(e.unref(b).completed)+" / "+e.toDisplayString(e.unref(b).total)+" "+e.toDisplayString(t.value.progress),1)):e.createCommentVNode("",!0),e.unref(c)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",onClick:f[0]||(f[0]=(...l)=>e.unref(k)&&e.unref(k)(...l))},e.toDisplayString(t.value.cancel),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",disabled:e.unref(c),onClick:f[1]||(f[1]=(...l)=>e.unref(_)&&e.unref(_)(...l))},e.toDisplayString(e.unref(c)?t.value.running:t.value.run),9,te)]),e.unref(M)?(e.openBlock(),e.createElementBlock("p",le,e.toDisplayString(t.value.cancelled),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ne,[e.createElementVNode("label",null,[e.createTextVNode(e.toDisplayString(t.value.samples),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":f[2]||(f[2]=l=>e.isRef(B)?B.value=l:null),"aria-label":t.value.samples,disabled:e.unref(c)||!!e.unref(d).length},[e.createElementVNode("option",oe,e.toDisplayString(t.value.none),1),e.createElementVNode("option",ae,e.toDisplayString(t.value.first20),1),e.createElementVNode("option",se,e.toDisplayString(t.value.first100),1),e.createElementVNode("option",ie,e.toDisplayString(t.value.all),1)],8,re),[[e.vModelSelect,e.unref(B)]])]),e.unref(d).length?(e.openBlock(),e.createElementBlock("span",ce,e.toDisplayString(t.value.namedFixtures)+" · "+e.toDisplayString(e.unref(d).length),1)):e.createCommentVNode("",!0)]),e.createElementVNode("details",ue,[e.createElementVNode("summary",null,[e.createTextVNode(e.toDisplayString(t.value.namedFixtures)+" ",1),e.createElementVNode("small",null,e.toDisplayString(e.unref(d).length)+" / 20",1)]),e.createElementVNode("p",de,e.toDisplayString(t.value.fixtureHint),1),e.unref(d).length?(e.openBlock(),e.createElementBlock("ul",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(l,E)=>(e.openBlock(),e.createElementBlock("li",{key:l.name},[e.createElementVNode("strong",null,e.toDisplayString(l.name),1),e.createElementVNode("span",null,e.toDisplayString(Object.values(l.datasets).reduce((T,q)=>T+q.length,0))+" "+e.toDisplayString(t.value.rows),1),E>=(n.fixtures?.length??0)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",disabled:e.unref(c),onClick:T=>e.unref(D)(E-(n.fixtures?.length??0))},e.toDisplayString(t.value.remove),9,pe)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",fe,[e.createElementVNode("label",null,[e.createTextVNode(e.toDisplayString(t.value.fixtureName),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":f[3]||(f[3]=l=>e.isRef(a)?a.value=l:null),placeholder:t.value.fixturePlaceholder,disabled:e.unref(c)},null,8,ve),[[e.vModelText,e.unref(a)]])]),n.document.template.params?.length?(e.openBlock(),e.createElementBlock("details",ge,[e.createElementVNode("summary",null,e.toDisplayString(t.value.parameters),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.document.template.params,l=>(e.openBlock(),e.createElementBlock("label",{key:l.field},[e.createTextVNode(e.toDisplayString(l.label??l.field),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":E=>e.unref(g)[l.field]=E,placeholder:l.defaultValue,disabled:e.unref(c)},null,8,ye),[[e.vModelText,e.unref(g)[l.field]]])]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("label",ke,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":f[4]||(f[4]=l=>e.isRef(p)?p.value=l:null),type:"checkbox",disabled:e.unref(c)},null,8,he),[[e.vModelCheckbox,e.unref(p)]]),e.createTextVNode(e.toDisplayString(t.value.deidentified),1)]),e.createElementVNode("button",{type:"button",disabled:e.unref(c)||!e.unref(p)||!e.unref(a).trim()||e.unref(d).length>=20,onClick:f[5]||(f[5]=(...l)=>e.unref(m)&&e.unref(m)(...l))},e.toDisplayString(t.value.capture),9,Ee),e.unref(i)?(e.openBlock(),e.createElementBlock("p",Se,e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)])]),e.unref(R)?(e.openBlock(),e.createElementBlock("p",we,e.toDisplayString(t.value.treeHint),1)):e.createCommentVNode("",!0),e.unref(C)?(e.openBlock(),e.createElementBlock("p",Ve,e.toDisplayString(e.unref(C)),1)):e.createCommentVNode("",!0),e.unref(S)?(e.openBlock(),e.createElementBlock("p",Ne,e.toDisplayString(t.value.stale),1)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.unref(S)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("span",{class:e.normalizeClass({"is-error":e.unref(u)})},e.toDisplayString(e.unref(u))+" "+e.toDisplayString(t.value.errors),3),e.createElementVNode("span",null,e.toDisplayString(e.unref(v).issues.length-e.unref(u))+" "+e.toDisplayString(t.value.warnings),1)])),e.createElementVNode("section",null,[e.createElementVNode("h3",null,[e.createTextVNode(e.toDisplayString(t.value.changes)+" ",1),e.createElementVNode("small",null,e.toDisplayString(e.unref(v).changes?.totalChanges??0),1)]),n.previous?e.unref(v).changes?.totalChanges?(e.openBlock(),e.createElementBlock("ol",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v).changes?.changes,(l,E)=>(e.openBlock(),e.createElementBlock("li",{key:E},[e.createElementVNode("div",null,[e.createElementVNode("span",null,e.toDisplayString(t.value.categories[l.category])+" · "+e.toDisplayString(t.value.kinds[l.kind]),1),l.breaking?(e.openBlock(),e.createElementBlock("b",Ce,e.toDisplayString(t.value.breaking),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",onClick:T=>V(l.path)},e.toDisplayString(t.value.locate),9,Te)]),e.createElementVNode("code",null,e.toDisplayString(l.path),1),e.createElementVNode("dl",null,[l.before!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("dt",null,e.toDisplayString(t.value.before),1),e.createElementVNode("dd",null,e.toDisplayString(l.before),1)],64)):e.createCommentVNode("",!0),l.after!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("dt",null,e.toDisplayString(t.value.after),1),e.createElementVNode("dd",null,e.toDisplayString(l.after),1)],64)):e.createCommentVNode("",!0)])]))),128))])):(e.openBlock(),e.createElementBlock("p",Be,e.toDisplayString(t.value.noChanges),1)):(e.openBlock(),e.createElementBlock("p",be,e.toDisplayString(t.value.baseline),1)),e.unref(v).changes?.truncated?(e.openBlock(),e.createElementBlock("p",Fe,e.toDisplayString(t.value.truncated),1)):e.createCommentVNode("",!0),e.unref(v).changes?.breakingChanges?(e.openBlock(),e.createElementBlock("label",Re,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":f[6]||(f[6]=l=>e.isRef(y)?y.value=l:null),type:"checkbox"},null,512),[[e.vModelCheckbox,e.unref(y)]]),e.createTextVNode(e.toDisplayString(t.value.acknowledge),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("section",null,[e.createElementVNode("h3",null,e.toDisplayString(t.value.issues),1),e.unref(v).issues.length?(e.openBlock(),e.createElementBlock("ol",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v).issues,(l,E)=>(e.openBlock(),e.createElementBlock("li",{key:E},[e.createElementVNode("div",null,[e.createElementVNode("span",{class:e.normalizeClass({"is-error":l.severity==="error"})},e.toDisplayString(l.severity==="error"?t.value.errors:t.value.warnings),3),e.createElementVNode("button",{type:"button",onClick:T=>r("locate",l)},e.toDisplayString(t.value.locate),9,Oe)]),e.createElementVNode("p",null,e.toDisplayString(l.message),1),e.createElementVNode("code",null,e.toDisplayString(l.path),1)]))),128))])):(e.openBlock(),e.createElementBlock("p",Me,e.toDisplayString(t.value.noIssues),1))]),e.unref(v).samples.length?(e.openBlock(),e.createElementBlock("section",{key:1,class:e.normalizeClass({"is-stale":e.unref(S)})},[e.createElementVNode("h3",null,e.toDisplayString(t.value.results),1),e.unref(w)?(e.openBlock(),e.createElementBlock("p",Pe,[e.createTextVNode(e.toDisplayString(t.value.scope)+" · "+e.toDisplayString(e.unref(d).length?t.value.namedFixtures:e.unref(w).requested==="-1"?t.value.all:e.unref(w).requested==="0"?t.value.none:e.unref(w).requested+" "+t.value.rows)+" · "+e.toDisplayString(e.unref(w).datasets)+" "+e.toDisplayString(t.value.datasets)+" · "+e.toDisplayString(e.unref(w).rows)+" "+e.toDisplayString(t.value.rows),1),e.unref(w).formats.length?(e.openBlock(),e.createElementBlock("span",Ae," · "+e.toDisplayString(e.unref(w).formats.join(" / ")),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v).samples,l=>(e.openBlock(),e.createElementBlock("div",{key:l.name,class:"mr-review-sample"},[e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(l.name),1),e.createTextVNode(" · "+e.toDisplayString(l.rows)+" "+e.toDisplayString(t.value.rows)+" · "+e.toDisplayString(l.pages)+" "+e.toDisplayString(t.value.pages)+" · "+e.toDisplayString(e.unref(v).issues.filter(E=>E.fixture===l.name).length)+" "+e.toDisplayString(t.value.issues),1)]),e.createElementVNode("button",{type:"button",disabled:e.unref(S)||e.unref(c),onClick:E=>N.value=N.value===l.name?void 0:l.name},e.toDisplayString(N.value===l.name?t.value.closeCompare:t.value.compare),9,$e)]))),128))],2)):e.createCommentVNode("",!0),x.value&&!e.unref(S)?(e.openBlock(),e.createBlock(Y,{key:2,document:n.document,previous:n.previous,fixture:x.value,messages:n.messages},null,8,["document","previous","fixture","messages"])):e.createCommentVNode("",!0),e.createElementVNode("p",qe,e.toDisplayString(t.value.checked),1)],64)):(e.openBlock(),e.createElementBlock("p",De,e.toDisplayString(t.value.empty),1))],8,Z))}}),ze=$._export_sfc(Le,[["__scopeId","data-v-0a5dda64"]]);exports.default=ze;