@agile-team/mach-report 2.23.1 → 2.25.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 (159) hide show
  1. package/README.md +10 -4
  2. package/dist/{ExcelBindingWizard-BrTmdo7f.cjs → ExcelBindingWizard-BgJG-T6k.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-CcDMLO8Q.js → ExcelBindingWizard-NQ_v396s.js} +3 -3
  4. package/dist/ParamEditor-DEP38mBp.cjs +1 -0
  5. package/dist/ParamEditor-Z-3yodp5.js +750 -0
  6. package/dist/{ReportBatchPanel-CHxBtG9R.cjs → ReportBatchPanel-D33LjMrA.cjs} +1 -1
  7. package/dist/{ReportBatchPanel-CJB67WNd.js → ReportBatchPanel-DG8FV-5X.js} +2 -2
  8. package/dist/{ReportLabelStudio-Tplc1TLJ.js → ReportLabelStudio-BZp23_hA.js} +68 -68
  9. package/dist/ReportLabelStudio-Bz-xAayk.cjs +1 -0
  10. package/dist/ReportParamPanel-B27IGJjk.cjs +1 -0
  11. package/dist/{ReportParamPanel-GI43aGa0.js → ReportParamPanel-DGXzBzl2.js} +328 -298
  12. package/dist/ReportPreview-CilFAS9U.js +7170 -0
  13. package/dist/ReportPreview-dOOzPts2.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-KqX4E2sN.js → ReportTemplateLibrary-DpSGgvFa.js} +28 -28
  15. package/dist/{ReportTemplateLibrary-BFQIX0sg.cjs → ReportTemplateLibrary-uG1gENaW.cjs} +1 -1
  16. package/dist/{RuleEditor-OPX1awrH.js → RuleEditor-BONALh1Q.js} +846 -835
  17. package/dist/RuleEditor-bLXiRcxL.cjs +1 -0
  18. package/dist/{TemplateOutlinePanel-CVYKVLv_.cjs → TemplateOutlinePanel-C3nfHuaR.cjs} +1 -1
  19. package/dist/{TemplateOutlinePanel-DQS-eOs6.js → TemplateOutlinePanel-JGBKeF3e.js} +10 -10
  20. package/dist/{TemplateReusePanel-CY6O93Zk.cjs → TemplateReusePanel-BKhgp6kg.cjs} +1 -1
  21. package/dist/{TemplateReusePanel-DKXiFTyB.js → TemplateReusePanel-DXQUO6nQ.js} +2 -2
  22. package/dist/TemplateReviewPanel-5RWFUUEf.cjs +1 -0
  23. package/dist/TemplateReviewPanel-DhL7Hapy.js +602 -0
  24. package/dist/analytics.d.cts +1 -1
  25. package/dist/analytics.d.ts +1 -1
  26. package/dist/artifact-integrity.json +98 -98
  27. package/dist/assets-BYdpkTIt.cjs +1 -0
  28. package/dist/assets-C4MIvzQ4.js +137 -0
  29. package/dist/auto-D-eDZa_V.cjs +1 -0
  30. package/dist/{auto-BB99S802.js → auto-umW_ozwr.js} +10 -10
  31. package/dist/capabilities-CN_kSVjO.js +121 -0
  32. package/dist/capabilities-D4nfhcvB.cjs +1 -0
  33. package/dist/cell-style-B6Qffrx8.js +37 -0
  34. package/dist/cell-style-y_uh1pZp.cjs +1 -0
  35. package/dist/{data-bar-IkI6VvMQ.js → data-bar-Bfh54sT4.js} +1 -1
  36. package/dist/data-bar-DzceAVeR.cjs +1 -0
  37. package/dist/designer-CCyj5WYS.js +7595 -0
  38. package/dist/designer-Cj7fn4Hh.cjs +2 -0
  39. package/dist/designer.cjs +1 -1
  40. package/dist/designer.d.cts +143 -10
  41. package/dist/designer.d.ts +143 -10
  42. package/dist/designer.js +5 -5
  43. package/dist/diagnostic-collector-gB07PHy2.js +392 -0
  44. package/dist/diagnostic-collector-wASg6Fzs.cjs +1 -0
  45. package/dist/dom-CXWMmwh-.cjs +1 -0
  46. package/dist/{dom-JWrchIre.js → dom-DxdCMLzs.js} +185 -185
  47. package/dist/{encoding-CEd-dq9A.js → encoding-CEkBtlUP.js} +2 -2
  48. package/dist/{encoding-7lquyj0w.cjs → encoding-Cipno7dq.cjs} +1 -1
  49. package/dist/{font-loader-CNWXomuV.js → font-loader-D4NLIKJL.js} +1 -1
  50. package/dist/{font-loader-D8pI87fL.cjs → font-loader-p_SyTvqt.cjs} +1 -1
  51. package/dist/{grid-strokes-EoY66L2f.js → grid-strokes-DkZEZvcI.js} +1 -1
  52. package/dist/grid-strokes-RFMR91jn.cjs +1 -0
  53. package/dist/index.cjs +5 -5
  54. package/dist/index.d.cts +48 -9
  55. package/dist/index.d.ts +48 -9
  56. package/dist/index.js +137 -136
  57. package/dist/json-snapshot-DQdkA_At.cjs +2 -0
  58. package/dist/{json-snapshot-BRnzKudk.js → json-snapshot-x0JpllWL.js} +919 -791
  59. package/dist/{pdf-DpMkW72B.cjs → pdf-C060D5UY.cjs} +31 -31
  60. package/dist/{pdf-CJToa81Z.js → pdf-DU8HelKd.js} +2499 -2492
  61. package/dist/pdf.cjs +1 -1
  62. package/dist/pdf.d.cts +18 -0
  63. package/dist/pdf.d.ts +18 -0
  64. package/dist/pdf.js +2 -2
  65. package/dist/{plugin-BWTp-X7b.cjs → plugin-B_k23hut.cjs} +1 -1
  66. package/dist/{plugin-_BkUVc2z.js → plugin-CttO46hc.js} +1 -1
  67. package/dist/{prefill-CWGdnqQd.js → prefill-BkF9Fw_p.js} +13 -13
  68. package/dist/prefill-BvkuwooY.cjs +1 -0
  69. package/dist/prepared-CSywIEAZ.cjs +1 -0
  70. package/dist/prepared-Cyuh61fJ.js +128 -0
  71. package/dist/protocol-BwbJNVZl.cjs +1 -0
  72. package/dist/protocol-DwtxjXzO.js +96 -0
  73. package/dist/record-bindings-B7djSjNs.cjs +1 -0
  74. package/dist/{record-bindings-DatJZv_e.js → record-bindings-Cv7lFiof.js} +47 -47
  75. package/dist/{region-binding-workflow-l7NGfagJ.cjs → region-binding-workflow-COD8nISZ.cjs} +1 -1
  76. package/dist/{region-binding-workflow-DjrXuR1q.js → region-binding-workflow-D8I4QWRh.js} +2 -2
  77. package/dist/report-encoding-worker.cjs +1 -1
  78. package/dist/report-encoding-worker.js +1 -1
  79. package/dist/{rich-text-layout-Ciwa6D2o.js → rich-text-layout-Ch_N0Ubu.js} +1 -1
  80. package/dist/rich-text-layout-yJGuThtC.cjs +3 -0
  81. package/dist/runtime-BE30icyB.js +227 -0
  82. package/dist/runtime-DRSuy_SQ.cjs +1 -0
  83. package/dist/sbom.cdx.json +1 -1
  84. package/dist/server/node.d.cts +55 -7
  85. package/dist/server/node.d.ts +55 -7
  86. package/dist/server-node.cjs +5 -5
  87. package/dist/server-node.js +2742 -2417
  88. package/dist/server.cjs +1 -1
  89. package/dist/server.d.cts +51 -16
  90. package/dist/server.d.ts +51 -16
  91. package/dist/server.js +8 -8
  92. package/dist/style.css +1 -1
  93. package/dist/{template-catalog-DtrtT1FY.cjs → template-catalog-C0riwrx7.cjs} +1 -1
  94. package/dist/{template-catalog-CRuZL3pi.js → template-catalog-D_gl93va.js} +3 -3
  95. package/dist/template-fragments-CgzPdFKB.cjs +1 -0
  96. package/dist/{template-fragments-CPpGpQoz.js → template-fragments-D94ZZmPc.js} +2 -2
  97. package/dist/template-registry-BMScUmM4.cjs +1 -0
  98. package/dist/{template-registry-O0hNIOfB.js → template-registry-DZOtRY7t.js} +19 -19
  99. package/dist/{textwrap-D4ZksyMK.js → textwrap-BywMBMXM.js} +1 -1
  100. package/dist/textwrap-LhJkHWb1.cjs +4 -0
  101. package/dist/vue/async.d.cts +101 -22
  102. package/dist/vue/async.d.ts +101 -22
  103. package/dist/vue/index.d.cts +133 -34
  104. package/dist/vue/index.d.ts +133 -34
  105. package/dist/vue-async.cjs +1 -1
  106. package/dist/vue-async.js +3 -3
  107. package/dist/vue.cjs +1 -1
  108. package/dist/vue.js +192 -162
  109. package/dist/{workbook-session-C6-SrnCT.cjs → workbook-session-DR2j6Hxm.cjs} +3 -3
  110. package/dist/{workbook-session-C9ZmCBwY.js → workbook-session-SzfILBJJ.js} +106 -107
  111. package/dist/worker.cjs +1 -1
  112. package/dist/worker.d.cts +55 -7
  113. package/dist/worker.d.ts +55 -7
  114. package/dist/worker.js +4 -4
  115. package/dist/xlsx/node.d.cts +30 -1
  116. package/dist/xlsx/node.d.ts +30 -1
  117. package/dist/xlsx-node.cjs +42 -42
  118. package/dist/xlsx-node.js +3908 -3889
  119. package/dist/xlsx.cjs +4 -4
  120. package/dist/xlsx.d.cts +20 -3
  121. package/dist/xlsx.d.ts +20 -3
  122. package/dist/xlsx.js +302 -295
  123. package/package.json +1 -1
  124. package/dist/ParamEditor-BGjovFUe.js +0 -737
  125. package/dist/ParamEditor-CeNp4_zQ.cjs +0 -1
  126. package/dist/ReportLabelStudio-g8PkqJWn.cjs +0 -1
  127. package/dist/ReportParamPanel-C7fZTllk.cjs +0 -1
  128. package/dist/ReportPreview-BoGBGyRr.cjs +0 -6
  129. package/dist/ReportPreview-QLONCyci.js +0 -6257
  130. package/dist/RuleEditor-BZUP9yvL.cjs +0 -1
  131. package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +0 -1
  132. package/dist/TemplateReviewPanel-Dijwm9YE.js +0 -593
  133. package/dist/assets-D2gHc4Mz.cjs +0 -1
  134. package/dist/assets-T_gDeFaz.js +0 -132
  135. package/dist/auto-BrPWo7Xm.cjs +0 -1
  136. package/dist/capabilities-DiBj4Qgl.cjs +0 -1
  137. package/dist/capabilities-pg7j7VLT.js +0 -106
  138. package/dist/data-bar-CeZuFmYl.cjs +0 -1
  139. package/dist/designer-BZoVWTgl.js +0 -7172
  140. package/dist/designer-zS2uKJmY.cjs +0 -2
  141. package/dist/dom-ChE5D-L-.cjs +0 -1
  142. package/dist/grid-strokes-Be24LGuV.cjs +0 -1
  143. package/dist/json-snapshot-DNiIbpOr.cjs +0 -2
  144. package/dist/prefill-PaAy6wLk.cjs +0 -1
  145. package/dist/prepared-CJy_qk7d.js +0 -94
  146. package/dist/prepared-D0yCSxSO.cjs +0 -1
  147. package/dist/progress-BXzlVbIp.js +0 -29
  148. package/dist/progress-ByiOxUD3.js +0 -250
  149. package/dist/progress-DJBd9Rb9.cjs +0 -1
  150. package/dist/progress-WomPRP3B.cjs +0 -1
  151. package/dist/protocol-BG16rz6D.js +0 -90
  152. package/dist/protocol-wzhl1Fim.cjs +0 -1
  153. package/dist/record-bindings-MBxbeBsi.cjs +0 -1
  154. package/dist/rich-text-layout-DK7A_a5r.cjs +0 -3
  155. package/dist/runtime-DYMOS_gz.cjs +0 -1
  156. package/dist/runtime-PiCax9zQ.js +0 -171
  157. package/dist/template-fragments-GVjpew_q.cjs +0 -1
  158. package/dist/template-registry-DI59PXVK.cjs +0 -1
  159. package/dist/textwrap-DEHqAjKZ.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-CCyj5WYS.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
+ };
@@ -289,7 +289,7 @@ declare interface GridCell {
289
289
  style?: ComponentStyle;
290
290
  }
291
291
 
292
- /** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
292
+ /** auto:真实数字、显式数值格式、日期与布尔居中,其他内容居左。 */
293
293
  declare type ListAlignment = NonNullable<ComponentStyle["align"]> | "auto";
294
294
 
295
295
  declare interface ListColumn {
@@ -289,7 +289,7 @@ declare interface GridCell {
289
289
  style?: ComponentStyle;
290
290
  }
291
291
 
292
- /** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
292
+ /** auto:真实数字、显式数值格式、日期与布尔居中,其他内容居左。 */
293
293
  declare type ListAlignment = NonNullable<ComponentStyle["align"]> | "auto";
294
294
 
295
295
  declare interface ListColumn {