@agile-team/mach-report 2.11.2 → 2.13.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 (88) hide show
  1. package/README.md +30 -5
  2. package/THIRD_PARTY_NOTICES.md +270 -0
  3. package/dist/{ExcelBindingWizard-LWX6G1A2.js → ExcelBindingWizard-CeAf4QSE.js} +2 -2
  4. package/dist/{ExcelBindingWizard-a4kslPHF.cjs → ExcelBindingWizard-y0mT-AHR.cjs} +1 -1
  5. package/dist/{ReportBatchPanel-B5ClP9tm.js → ReportBatchPanel-CW2HV9I8.js} +1 -1
  6. package/dist/{ReportBatchPanel-Dc-SDkYA.cjs → ReportBatchPanel-Fp1ePFag.cjs} +1 -1
  7. package/dist/ReportPreview-BN6fk7Wz.cjs +6 -0
  8. package/dist/ReportPreview-D2Jkyh1U.js +4243 -0
  9. package/dist/{RuleEditor-C2QsOHOs.cjs → RuleEditor-ChRzNQuF.cjs} +1 -1
  10. package/dist/{RuleEditor-D9wQHrkf.js → RuleEditor-DzAmW5YH.js} +1 -1
  11. package/dist/analytics.d.cts +28 -0
  12. package/dist/analytics.d.ts +28 -0
  13. package/dist/assets-C2U-e-Sz.cjs +4 -0
  14. package/dist/assets-Q0wUwNrV.js +217 -0
  15. package/dist/code-options-BKXXY7NI.js +18 -0
  16. package/dist/code-options-BUTChiZZ.cjs +1 -0
  17. package/dist/codes.cjs +9 -0
  18. package/dist/codes.d.cts +223 -0
  19. package/dist/codes.d.ts +223 -0
  20. package/dist/codes.js +26917 -0
  21. package/dist/config-Bb7RiIO5.cjs +1 -0
  22. package/dist/{config-B612mw0x.js → config-XVwG87IA.js} +4 -0
  23. package/dist/designer.cjs +2 -2
  24. package/dist/designer.d.cts +283 -0
  25. package/dist/designer.d.ts +283 -0
  26. package/dist/designer.js +2852 -2010
  27. package/dist/grid-strokes-Cr7DwUux.cjs +1 -0
  28. package/dist/grid-strokes-DyyG1q_o.js +53 -0
  29. package/dist/index.cjs +7 -7
  30. package/dist/index.d.cts +105 -1
  31. package/dist/index.d.ts +105 -1
  32. package/dist/index.js +488 -439
  33. package/dist/pdf.cjs +76 -59
  34. package/dist/pdf.d.cts +51 -0
  35. package/dist/pdf.d.ts +51 -0
  36. package/dist/pdf.js +32128 -32048
  37. package/dist/{plugin-Cd5G2QQn.js → plugin-D4wizDXB.js} +1 -1
  38. package/dist/{plugin-BDTU4D94.cjs → plugin-DzS6pxTA.cjs} +1 -1
  39. package/dist/record-bindings-By_UKZ2g.cjs +1 -0
  40. package/dist/{list-cell-ClFra1zS.js → record-bindings-D-5jQlTj.js} +67 -44
  41. package/dist/{region-binding-workflow-DhQvu1co.cjs → region-binding-workflow-BzfbxRiR.cjs} +1 -1
  42. package/dist/{region-binding-workflow-CXDmt9Bs.js → region-binding-workflow-CcUq8W2Q.js} +1 -1
  43. package/dist/server/node.d.cts +52 -1
  44. package/dist/server/node.d.ts +52 -1
  45. package/dist/server-node.cjs +1 -1
  46. package/dist/server-node.js +239 -210
  47. package/dist/server.cjs +1 -1
  48. package/dist/server.d.cts +95 -3
  49. package/dist/server.d.ts +95 -3
  50. package/dist/server.js +457 -434
  51. package/dist/style.css +1 -1
  52. package/dist/{template-registry-WNXdkiET.js → template-registry-BjE1VS6g.js} +221 -157
  53. package/dist/template-registry-D3SjENi6.cjs +1 -0
  54. package/dist/template-review-DGwWOoCv.cjs +2 -0
  55. package/dist/{template-review-BdcXSYbx.js → template-review-PgEe_Wr9.js} +792 -666
  56. package/dist/validate-BJ5HIWY8.cjs +1 -0
  57. package/dist/validate-DbgEM1Hh.js +163 -0
  58. package/dist/vue/async.d.cts +125 -2
  59. package/dist/vue/async.d.ts +125 -2
  60. package/dist/vue/index.d.cts +121 -8
  61. package/dist/vue/index.d.ts +121 -8
  62. package/dist/vue-async.cjs +1 -1
  63. package/dist/vue-async.js +3 -3
  64. package/dist/vue.cjs +1 -1
  65. package/dist/vue.js +5 -5
  66. package/dist/{workbook-session-BKOTwcoq.js → workbook-session-BPb3TMnT.js} +1 -1
  67. package/dist/{workbook-session-CLYLhZWu.cjs → workbook-session-DNa2RHNG.cjs} +1 -1
  68. package/dist/worker.cjs +1 -1
  69. package/dist/worker.d.cts +52 -1
  70. package/dist/worker.d.ts +52 -1
  71. package/dist/worker.js +2 -2
  72. package/dist/xlsx.cjs +1 -1
  73. package/dist/xlsx.d.cts +40 -0
  74. package/dist/xlsx.d.ts +40 -0
  75. package/dist/xlsx.js +3 -3
  76. package/package.json +16 -3
  77. package/dist/ReportPreview-DWXROHBP.cjs +0 -6
  78. package/dist/ReportPreview-DiNXhQI0.js +0 -4138
  79. package/dist/assets-Bu6UohJx.cjs +0 -1
  80. package/dist/assets-DegqDNqY.js +0 -160
  81. package/dist/config-BRoLo2oj.cjs +0 -1
  82. package/dist/list-cell-BuYn4tGF.cjs +0 -1
  83. package/dist/template-registry-ukBGlm8N.cjs +0 -1
  84. package/dist/template-review-BXp2oyqg.cjs +0 -1
  85. package/dist/textwrap-CWHyzkBH.cjs +0 -4
  86. package/dist/textwrap-DE1kgcJB.js +0 -110
  87. package/dist/validate-7s0yn6ii.js +0 -148
  88. package/dist/validate-DsRiNw8h.cjs +0 -1
@@ -0,0 +1,217 @@
1
+ import { D as A } from "./defaults-DXhiM1ZD.js";
2
+ import { n as b } from "./capabilities-CK_7hizc.js";
3
+ import { w as I } from "./progress-7OSZbFok.js";
4
+ const x = /[\u3000-\u9fff\uff00-\uffef]/, g = new Uint8Array(128);
5
+ {
6
+ for (const e of "iljtf.,:;'`|!()[]") g[e.charCodeAt(0)] = 1;
7
+ for (const e of "mwMW@") g[e.charCodeAt(0)] = 2;
8
+ for (let e = 48; e <= 57; e++) g[e] = 3;
9
+ for (let e = 65; e <= 90; e++) g[e] = 4;
10
+ g[32] = 5;
11
+ }
12
+ const v = [0.54, 0.26, 0.95, 0.59, 0.67, 0.3];
13
+ function E(e) {
14
+ const t = e.charCodeAt(0);
15
+ return t < 128 ? v[g[t]] : x.test(e) ? 1 : /[A-Z]/.test(e) ? 0.67 : 0.54;
16
+ }
17
+ const p = {
18
+ measureMm(e, t) {
19
+ const { fontSizePt: r, bold: s = !1, letterSpacingPt: a = 0 } = t, n = 25.4 / 72;
20
+ let i = 0;
21
+ for (const d of e)
22
+ i += E(d);
23
+ return s && (i *= 1.04), (i * r + a * Math.max(0, Array.from(e).length - 1)) * n;
24
+ }
25
+ };
26
+ function B() {
27
+ return p;
28
+ }
29
+ function R(e, t) {
30
+ return p.measureMm(e, t);
31
+ }
32
+ function $(e) {
33
+ let t;
34
+ return {
35
+ measureMm(r, s) {
36
+ if (t === void 0 && (t = e()), !t) return p.measureMm(r, s);
37
+ const a = s.fontSizePt * 96 / 72;
38
+ t.font = `${s.italic ? "italic " : ""}${s.bold ? "bold " : ""}${a}px ${s.fontFamily ?? A}`, "letterSpacing" in t && (t.letterSpacing = "0px");
39
+ const n = (s.letterSpacingPt ?? 0) * Math.max(0, Array.from(r).length - 1);
40
+ return t.measureText(r).width * 25.4 / 96 + n * 25.4 / 72;
41
+ }
42
+ };
43
+ }
44
+ function T(e, t, r) {
45
+ const s = [];
46
+ let a = "";
47
+ const n = () => {
48
+ a && (s.push({ text: a, widthMm: r.measureMm(a, t), cjk: !1 }), a = "");
49
+ };
50
+ for (const i of e) {
51
+ if (i === `
52
+ `) {
53
+ n(), s.push({ text: `
54
+ `, widthMm: 0, cjk: !1, br: !0 });
55
+ continue;
56
+ }
57
+ if (i === " ") {
58
+ n(), s.push({ text: i, widthMm: r.measureMm(i, t), cjk: !1, space: !0 });
59
+ continue;
60
+ }
61
+ if (x.test(i)) {
62
+ n(), s.push({ text: i, widthMm: r.measureMm(i, t), cjk: !0 });
63
+ continue;
64
+ }
65
+ a += i;
66
+ }
67
+ return n(), s;
68
+ }
69
+ function F(e, t, r, s = p) {
70
+ if (!e) return [""];
71
+ e = e.replace(/\r\n?/g, `
72
+ `);
73
+ const a = [];
74
+ let n = "", i = 0;
75
+ const d = (r.letterSpacingPt ?? 0) * 25.4 / 72, c = () => {
76
+ a.push(n), n = "", i = 0;
77
+ };
78
+ for (const o of T(e, r, s)) {
79
+ if (o.br) {
80
+ c();
81
+ continue;
82
+ }
83
+ const f = n.length > 0 ? d : 0;
84
+ if (i + f + o.widthMm <= t) {
85
+ n += o.text, i += f + o.widthMm;
86
+ continue;
87
+ }
88
+ if (o.space) {
89
+ c();
90
+ continue;
91
+ }
92
+ if (o.cjk) {
93
+ n.length > 0 && c(), n = o.text, i = o.widthMm;
94
+ continue;
95
+ }
96
+ if (n.length > 0 && c(), o.widthMm <= t) {
97
+ n = o.text, i = o.widthMm;
98
+ continue;
99
+ }
100
+ for (const u of o.text)
101
+ s.measureMm(n + u, r) > t && n.length > 0 && c(), n += u, i = s.measureMm(n, r);
102
+ }
103
+ return c(), a;
104
+ }
105
+ class w extends Error {
106
+ constructor(t, r) {
107
+ super(t.message), this.name = "OutputAssetError", this.diagnostic = t, this.cause = r;
108
+ }
109
+ }
110
+ function l(e) {
111
+ if (e.aborted) throw e.reason ?? new DOMException("The operation was aborted.", "AbortError");
112
+ }
113
+ function k(e) {
114
+ const t = { maxAssets: 1e3, maxImageBytes: 33554432, maxTotalImageBytes: 134217728, maxDurationMs: 3e4, ...e.assetBudget };
115
+ for (const [r, s] of Object.entries(t))
116
+ if (!Number.isSafeInteger(s) || s <= 0 || s > 2147483647) throw new RangeError(`${r} must be a positive safe integer at most 2147483647.`);
117
+ return t;
118
+ }
119
+ function D(e) {
120
+ const t = /^data:image\/[a-z0-9.+-]+(;base64)?,(.*)$/is.exec(e);
121
+ if (!t) throw new TypeError("Asset renderers must return an image data URL.");
122
+ return t[1] ? Math.ceil(t[2].length * 3 / 4) : new TextEncoder().encode(decodeURIComponent(t[2])).byteLength;
123
+ }
124
+ function h(e, t, r, s, a) {
125
+ const n = { code: r, message: s, severity: "warning", format: e.options.format ?? "dom", pageIndex: t.pageIndex, componentIndex: t.componentIndex, componentPath: t.componentPath, kind: t.component.kind, nid: t.component.nid };
126
+ if (e.diagnostics.push(n), b(n, { ...e.options, signal: e.signal }), e.options.assetFailure !== "placeholder") throw new w(n, a);
127
+ }
128
+ async function O(e, t, r) {
129
+ const s = e.options.assetRenderers?.[t.kind];
130
+ if (t.imageData || !s) return t.imageData;
131
+ if (++e.rendered > e.budget.maxAssets) return h(e, r, "asset-budget-exceeded", "Output exceeded the asset count budget.");
132
+ let a;
133
+ try {
134
+ if (e.active = r, a = await I(s({ ...r, signal: e.signal }), e.signal), l(e.signal), a.length > e.budget.maxImageBytes * 4 + 1024) return h(e, r, "asset-budget-exceeded", "Output exceeded the image payload byte budget.");
135
+ const n = D(a);
136
+ if (n > e.budget.maxImageBytes || e.bytes + n > e.budget.maxTotalImageBytes) return h(e, r, "asset-budget-exceeded", "Output exceeded the encoded image byte budget.");
137
+ e.bytes += n;
138
+ } catch (n) {
139
+ if (e.signal.aborted || n instanceof w) throw n;
140
+ return h(e, r, "asset-render-failed", `Asset renderer failed for ${t.kind}; output was not silently omitted.`, n);
141
+ }
142
+ return a;
143
+ }
144
+ function P(e, t) {
145
+ const r = e.active;
146
+ if (!r) {
147
+ t.abort(new Error("Asset rendering exceeded maxDurationMs."));
148
+ return;
149
+ }
150
+ const s = { code: "asset-budget-exceeded", message: "Asset rendering exceeded maxDurationMs.", severity: "warning", format: e.options.format ?? "dom", pageIndex: r.pageIndex, componentIndex: r.componentIndex, componentPath: r.componentPath, kind: r.component.kind, nid: r.component.nid };
151
+ e.diagnostics.push(s);
152
+ try {
153
+ b(s, { ...e.options, signal: e.signal });
154
+ } catch (a) {
155
+ t.abort(a);
156
+ return;
157
+ }
158
+ t.abort(new w(s));
159
+ }
160
+ async function S(e, t, r, s, a) {
161
+ if (!t?.children?.length) return t;
162
+ const n = [];
163
+ for (const [i, d] of t.children.entries())
164
+ n.push(await y(e, d, { ...r, component: d, componentPath: [...s, i] }, a));
165
+ return n.some((i, d) => i !== t.children[d]) ? { ...t, children: n } : t;
166
+ }
167
+ async function y(e, t, r, s) {
168
+ if (l(e.signal), s.has(t)) throw new TypeError("Cyclic grid children cannot be rendered.");
169
+ let a = e.cache.get(t);
170
+ a || (a = O(e, t, r), e.cache.set(t, a));
171
+ const n = await a;
172
+ l(e.signal);
173
+ let i = t.grid;
174
+ if (i) {
175
+ const d = new Set(s).add(t), c = [];
176
+ for (const [o, f] of i.cells.entries()) {
177
+ const u = [];
178
+ for (const [m, M] of f.entries()) u.push(await S(e, M, r, [...r.componentPath, o, m], d));
179
+ c.push(u);
180
+ }
181
+ c.some((o, f) => o.some((u, m) => u !== i.cells[f][m])) && (i = { ...i, cells: c });
182
+ }
183
+ return n !== t.imageData || i !== t.grid ? { ...t, imageData: n, grid: i } : t;
184
+ }
185
+ async function W(e, t = {}) {
186
+ const r = k(t);
187
+ if (t.signal?.aborted) throw t.signal.reason ?? new DOMException("The operation was aborted.", "AbortError");
188
+ const s = new AbortController(), a = () => s.abort(t.signal?.reason);
189
+ if (t.signal?.addEventListener("abort", a, { once: !0 }), !t.assetRenderers || !Object.keys(t.assetRenderers).length)
190
+ return t.signal?.removeEventListener("abort", a), { plan: e, diagnostics: [] };
191
+ const n = { options: t, signal: s.signal, diagnostics: [], rendered: 0, bytes: 0, budget: r, cache: /* @__PURE__ */ new WeakMap() }, i = setTimeout(() => P(n, s), r.maxDurationMs);
192
+ try {
193
+ const d = [];
194
+ for (const [c, o] of e.pages.entries()) {
195
+ if (c < (t.start ?? 0) || c > (t.end ?? e.pages.length - 1)) {
196
+ d.push(o);
197
+ continue;
198
+ }
199
+ const f = [];
200
+ for (const [u, m] of o.components.entries()) f.push(await y(n, m, { component: m, pageIndex: c, componentIndex: u, componentPath: [] }, /* @__PURE__ */ new Set()));
201
+ d.push(f.some((u, m) => u !== o.components[m]) ? { ...o, components: f } : o);
202
+ }
203
+ return l(n.signal), { plan: d.some((c, o) => c !== e.pages[o]) ? { ...e, pages: d } : e, diagnostics: n.diagnostics };
204
+ } finally {
205
+ clearTimeout(i), t.signal?.removeEventListener("abort", a);
206
+ }
207
+ }
208
+ export {
209
+ w as O,
210
+ $ as a,
211
+ B as b,
212
+ E as c,
213
+ p as h,
214
+ R as m,
215
+ W as r,
216
+ F as w
217
+ };
@@ -0,0 +1,18 @@
1
+ function a(e) {
2
+ const s = [];
3
+ return e.value !== void 0 && typeof e.value != "string" && s.push({ path: "value", message: "Symbol value must be a string." }), e.symbology !== void 0 && !["code128", "code39", "ean13", "ean8"].includes(e.symbology) && s.push({ path: "symbology", message: "Unsupported barcode symbology." }), e.errorCorrection !== void 0 && !["L", "M", "Q", "H"].includes(e.errorCorrection) && s.push({ path: "errorCorrection", message: "Unsupported QR error correction." }), e.showText !== void 0 && typeof e.showText != "boolean" && s.push({ path: "showText", message: "showText must be a boolean." }), s;
4
+ }
5
+ function i(e, s) {
6
+ const o = [];
7
+ return s !== "barcode" && s !== "qrcode" && o.push({ path: "", message: "code is only supported by barcode and qrcode components." }), s === "qrcode" && e.symbology !== void 0 && o.push({ path: "symbology", message: "QR components do not use a linear symbology." }), s === "qrcode" && e.showText === !0 && o.push({ path: "showText", message: "Use a separate text component below a QR code." }), s === "barcode" && e.errorCorrection !== void 0 && o.push({ path: "errorCorrection", message: "Linear barcodes do not use QR error correction." }), o;
8
+ }
9
+ function c(e, s) {
10
+ if (typeof e != "object" || e === null || Array.isArray(e)) return [{ path: "", message: "code must be an object." }];
11
+ const o = e, r = [...a(o), ...i(o, s)];
12
+ for (const n of Object.keys(o)) ["value", "symbology", "errorCorrection", "quietZoneModules", "showText"].includes(n) || r.push({ path: n, message: "Unknown symbol option." });
13
+ const u = o.symbology === "ean13" || o.symbology === "ean8", t = s === "qrcode" ? 4 : u ? 11 : 10;
14
+ return o.quietZoneModules !== void 0 && (!Number.isSafeInteger(o.quietZoneModules) || Number(o.quietZoneModules) < t || Number(o.quietZoneModules) > 64) && r.push({ path: "quietZoneModules", message: `Quiet zone must contain ${t}–64 whole modules.` }), r;
15
+ }
16
+ export {
17
+ c
18
+ };
@@ -0,0 +1 @@
1
+ "use strict";function a(e){const s=[];return e.value!==void 0&&typeof e.value!="string"&&s.push({path:"value",message:"Symbol value must be a string."}),e.symbology!==void 0&&!["code128","code39","ean13","ean8"].includes(e.symbology)&&s.push({path:"symbology",message:"Unsupported barcode symbology."}),e.errorCorrection!==void 0&&!["L","M","Q","H"].includes(e.errorCorrection)&&s.push({path:"errorCorrection",message:"Unsupported QR error correction."}),e.showText!==void 0&&typeof e.showText!="boolean"&&s.push({path:"showText",message:"showText must be a boolean."}),s}function i(e,s){const o=[];return s!=="barcode"&&s!=="qrcode"&&o.push({path:"",message:"code is only supported by barcode and qrcode components."}),s==="qrcode"&&e.symbology!==void 0&&o.push({path:"symbology",message:"QR components do not use a linear symbology."}),s==="qrcode"&&e.showText===!0&&o.push({path:"showText",message:"Use a separate text component below a QR code."}),s==="barcode"&&e.errorCorrection!==void 0&&o.push({path:"errorCorrection",message:"Linear barcodes do not use QR error correction."}),o}function c(e,s){if(typeof e!="object"||e===null||Array.isArray(e))return[{path:"",message:"code must be an object."}];const o=e,r=[...a(o),...i(o,s)];for(const n of Object.keys(o))["value","symbology","errorCorrection","quietZoneModules","showText"].includes(n)||r.push({path:n,message:"Unknown symbol option."});const u=o.symbology==="ean13"||o.symbology==="ean8",t=s==="qrcode"?4:u?11:10;return o.quietZoneModules!==void 0&&(!Number.isSafeInteger(o.quietZoneModules)||Number(o.quietZoneModules)<t||Number(o.quietZoneModules)>64)&&r.push({path:"quietZoneModules",message:`Quiet zone must contain ${t}–64 whole modules.`}),r}exports.codeOptionIssues=c;