@agile-team/mach-report 2.16.0 → 2.18.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 (177) hide show
  1. package/README.md +25 -12
  2. package/dist/{ExcelBindingWizard-CP6h2x1f.cjs → ExcelBindingWizard-Czn3C2yE.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-HhB3hAJE.js → ExcelBindingWizard-DMGZj6I6.js} +3 -3
  4. package/dist/ParamEditor-KzDQvbHY.js +732 -0
  5. package/dist/ParamEditor-oDfD8LgE.cjs +1 -0
  6. package/dist/{ReportBatchPanel-ruxcbfY6.js → ReportBatchPanel-BJK7PvZ4.js} +39 -39
  7. package/dist/ReportBatchPanel-DnmNRssu.cjs +1 -0
  8. package/dist/ReportParamPanel-mQkeN70Q.js +1020 -0
  9. package/dist/ReportParamPanel-sOANVRz-.cjs +1 -0
  10. package/dist/ReportPreview-BxWWTUL5.js +5583 -0
  11. package/dist/ReportPreview-Yf99omi3.cjs +6 -0
  12. package/dist/{ReportTemplateLibrary-DcwrH-63.js → ReportTemplateLibrary-BFjB08Wu.js} +1 -1
  13. package/dist/{ReportTemplateLibrary-BDlNT8JN.cjs → ReportTemplateLibrary-BO42QnWd.cjs} +1 -1
  14. package/dist/RuleEditor-CqxT1a-W.js +2337 -0
  15. package/dist/RuleEditor-D7YWigD9.cjs +1 -0
  16. package/dist/{TemplateOutlinePanel-CGrT5DFN.cjs → TemplateOutlinePanel-B0XX350V.cjs} +1 -1
  17. package/dist/{TemplateOutlinePanel-SXCjaPKR.js → TemplateOutlinePanel-zG0DrsIB.js} +2 -2
  18. package/dist/{TemplateReusePanel-6Z3wRFz8.cjs → TemplateReusePanel-BD0HSKp_.cjs} +1 -1
  19. package/dist/{TemplateReusePanel-lHLOS9Wn.js → TemplateReusePanel-Czwe5GbC.js} +2 -2
  20. package/dist/{TemplateReviewPanel-Dpk7sLcF.cjs → TemplateReviewPanel-CA5sdffM.cjs} +1 -1
  21. package/dist/{TemplateReviewPanel-CJ9PLc48.js → TemplateReviewPanel-NhmQI65C.js} +2 -2
  22. package/dist/analytics.cjs +1 -1
  23. package/dist/analytics.d.cts +163 -42
  24. package/dist/analytics.d.ts +163 -42
  25. package/dist/analytics.js +76 -141
  26. package/dist/artifact-integrity.json +110 -108
  27. package/dist/assets-2eC3mOcV.js +232 -0
  28. package/dist/assets-B0Hxn4l6.cjs +1 -0
  29. package/dist/{auto-uVBjX1j5.cjs → auto-B0EZFIK1.cjs} +1 -1
  30. package/dist/{auto-YR7a4BtF.js → auto-BlchZ1b8.js} +10 -10
  31. package/dist/{batch-WzDIXJAt.js → batch-DGCt44XM.js} +1 -1
  32. package/dist/{batch-z6Aw5GEY.cjs → batch-DYcokH4v.cjs} +1 -1
  33. package/dist/charts-Dlv8j2AG.js +141 -0
  34. package/dist/charts-aCtoswXq.cjs +1 -0
  35. package/dist/codes.cjs +9 -9
  36. package/dist/codes.d.cts +54 -0
  37. package/dist/codes.d.ts +54 -0
  38. package/dist/codes.js +12097 -13668
  39. package/dist/column-visual-BpgQVWwT.js +238 -0
  40. package/dist/column-visual-CtYxnBCP.cjs +1 -0
  41. package/dist/component-tree-6TV7W6Yj.cjs +1 -0
  42. package/dist/component-tree-CvW4lzpv.js +67 -0
  43. package/dist/computed-4TnxzgIh.cjs +1 -0
  44. package/dist/computed-C8NRZQss.js +739 -0
  45. package/dist/data-bar-Ce38juRZ.cjs +1 -0
  46. package/dist/data-bar-PtjXhMgN.js +9 -0
  47. package/dist/dataset-DL83majE.js +161 -0
  48. package/dist/dataset-IrlXbUvh.cjs +1 -0
  49. package/dist/designer--TKECSEc.cjs +2 -0
  50. package/dist/designer-d6hJS41w.js +5683 -0
  51. package/dist/designer.cjs +1 -1
  52. package/dist/designer.d.cts +835 -45
  53. package/dist/designer.d.ts +835 -45
  54. package/dist/designer.js +23 -20
  55. package/dist/{encoding-BYF9ZTl9.cjs → encoding-B--eZpp1.cjs} +1 -1
  56. package/dist/{encoding-BOGq4qYL.js → encoding-mctOLocI.js} +2 -2
  57. package/dist/{font-loader-EKLzOJxf.cjs → font-loader-DBBJ5KE9.cjs} +1 -1
  58. package/dist/{font-loader-CzI1GuBc.js → font-loader-DW8tIaNp.js} +1 -1
  59. package/dist/index-CPh6tqge.js +1575 -0
  60. package/dist/index-CUNw7dL9.cjs +1 -0
  61. package/dist/index.cjs +8 -8
  62. package/dist/index.d.cts +534 -16
  63. package/dist/index.d.ts +534 -16
  64. package/dist/index.js +1393 -955
  65. package/dist/json-snapshot-By4ZVVUt.js +1967 -0
  66. package/dist/json-snapshot-jiXff4lc.cjs +2 -0
  67. package/dist/matrix-0hywp0-F.cjs +1 -0
  68. package/dist/matrix-Dy-tyY7E.js +381 -0
  69. package/dist/param-validation-C-8sRJLq.cjs +1 -0
  70. package/dist/param-validation-CnDEd2l-.js +333 -0
  71. package/dist/{pdf-DJ5S6ukC.js → pdf-CKROKygt.js} +1845 -1845
  72. package/dist/{pdf-ByVCb1i6.cjs → pdf-DqyxJ96U.cjs} +47 -47
  73. package/dist/pdf.cjs +1 -1
  74. package/dist/pdf.d.cts +66 -0
  75. package/dist/pdf.d.ts +66 -0
  76. package/dist/pdf.js +2 -2
  77. package/dist/{plugin-C2j5_mhx.js → plugin-ByjF2kiV.js} +5 -5
  78. package/dist/{plugin-Dr39GBRG.cjs → plugin-DM1M2wlI.cjs} +1 -1
  79. package/dist/prefill-B8H9qwE4.js +371 -0
  80. package/dist/prefill-D7EswyTI.cjs +1 -0
  81. package/dist/{prepared-DqtpvRTn.js → prepared-BE-4jfX5.js} +2 -2
  82. package/dist/{prepared-DdrjLC7L.cjs → prepared-CGVphji3.cjs} +1 -1
  83. package/dist/{protocol-BzwMP4Vw.cjs → protocol-ByRVzzQG.cjs} +1 -1
  84. package/dist/{protocol-kt4Iy6-3.js → protocol-Cr81vFSQ.js} +3 -3
  85. package/dist/{record-bindings-CZWBJ1fU.js → record-bindings-DEJtmo3p.js} +67 -107
  86. package/dist/record-bindings-ehjnCDHt.cjs +1 -0
  87. package/dist/{region-binding-workflow-CWNvIjkV.js → region-binding-workflow-CBg0l_tj.js} +2 -2
  88. package/dist/{region-binding-workflow-CqSMxQ4p.cjs → region-binding-workflow-D05tOYn3.cjs} +1 -1
  89. package/dist/report-encoding-worker.cjs +1 -1
  90. package/dist/report-encoding-worker.js +1 -1
  91. package/dist/{report-params-B1RzkhJj.js → report-params-D9tBuM9B.js} +1 -1
  92. package/dist/{report-params-WDGrA4oP.cjs → report-params-VTg8MoCp.cjs} +1 -1
  93. package/dist/runtime-CDA6d263.cjs +1 -0
  94. package/dist/runtime-CEMvybO7.js +170 -0
  95. package/dist/sbom.cdx.json +1 -1
  96. package/dist/server/node.d.cts +121 -7
  97. package/dist/server/node.d.ts +121 -7
  98. package/dist/server-node.cjs +4 -4
  99. package/dist/server-node.js +3446 -2115
  100. package/dist/server.cjs +1 -1
  101. package/dist/server.d.cts +417 -29
  102. package/dist/server.d.ts +417 -29
  103. package/dist/server.js +787 -544
  104. package/dist/sha256-BDQ1Qk7A.js +158 -0
  105. package/dist/sha256-DgZAKXqI.cjs +1 -0
  106. package/dist/style.css +1 -1
  107. package/dist/template-bindings-Cg5oBLFT.cjs +1 -0
  108. package/dist/template-bindings-TKnXM7ll.js +62 -0
  109. package/dist/{template-catalog-BtR2JmCL.js → template-catalog-CmbWOJqy.js} +16 -16
  110. package/dist/template-catalog-Utu4GP09.cjs +1 -0
  111. package/dist/{template-fragments-BVsbxs4a.cjs → template-fragments-C_zSHJAa.cjs} +1 -1
  112. package/dist/{template-fragments-By0aZC1D.js → template-fragments-DWgo9tlZ.js} +2 -2
  113. package/dist/{template-outline-BwRV_eRo.cjs → template-outline-DWkzZXVC.cjs} +1 -1
  114. package/dist/{template-outline-cnWfT_LK.js → template-outline-DiADphlq.js} +1 -1
  115. package/dist/{template-registry-Cw3vRTX2.js → template-registry-BIhIHOab.js} +319 -314
  116. package/dist/template-registry-DzWswQI5.cjs +1 -0
  117. package/dist/vue/async.d.cts +636 -35
  118. package/dist/vue/async.d.ts +636 -35
  119. package/dist/vue/index.d.cts +746 -67
  120. package/dist/vue/index.d.ts +746 -67
  121. package/dist/vue-async.cjs +1 -1
  122. package/dist/vue-async.js +3 -3
  123. package/dist/vue.cjs +1 -1
  124. package/dist/vue.js +94 -89
  125. package/dist/{workbook-session-Cbts-22R.cjs → workbook-session-B94EwVa_.cjs} +1 -1
  126. package/dist/{workbook-session-BeSO8PFB.js → workbook-session-BoScoOg-.js} +2 -2
  127. package/dist/worker.cjs +1 -1
  128. package/dist/worker.d.cts +75 -7
  129. package/dist/worker.d.ts +75 -7
  130. package/dist/worker.js +4 -4
  131. package/dist/xlsx.cjs +4 -4
  132. package/dist/xlsx.d.cts +208 -15
  133. package/dist/xlsx.d.ts +208 -15
  134. package/dist/xlsx.js +288 -252
  135. package/package.json +1 -1
  136. package/dist/ParamEditor-CUQLgoxa.cjs +0 -1
  137. package/dist/ParamEditor-OKesP_nO.js +0 -594
  138. package/dist/ReportBatchPanel-cZCAMAwH.cjs +0 -1
  139. package/dist/ReportPreview-BcDKCLiK.js +0 -4834
  140. package/dist/ReportPreview-Bk9nLfO9.cjs +0 -6
  141. package/dist/RuleEditor-BX5S8RSF.cjs +0 -1
  142. package/dist/RuleEditor-CGl9XY2s.js +0 -2037
  143. package/dist/assets-CqIbfbTr.js +0 -126
  144. package/dist/assets-e4YSke8n.cjs +0 -1
  145. package/dist/capabilities-DDwXr_cA.js +0 -103
  146. package/dist/capabilities-DNLyZdNw.cjs +0 -1
  147. package/dist/component-tree-Ca6YYfHq.js +0 -61
  148. package/dist/component-tree-DkGLEfZC.cjs +0 -1
  149. package/dist/computed-C-4C2S5h.js +0 -521
  150. package/dist/computed-CGV2a809.cjs +0 -1
  151. package/dist/config-Dg_o8e7m.cjs +0 -1
  152. package/dist/config-XQ4qrQ7Q.js +0 -844
  153. package/dist/dataset-BkRmwgeJ.cjs +0 -1
  154. package/dist/dataset-H5pFuQGU.js +0 -121
  155. package/dist/designer-BfQSahxq.js +0 -5163
  156. package/dist/designer-CPPdeM5_.cjs +0 -2
  157. package/dist/diagnostic-notification-B9K9We3h.cjs +0 -1
  158. package/dist/diagnostic-notification-qGAYZdkB.js +0 -7
  159. package/dist/drill-CsdjgkRM.cjs +0 -1
  160. package/dist/drill-DIGsZfyB.js +0 -145
  161. package/dist/json-snapshot-D6ioHth9.js +0 -1702
  162. package/dist/json-snapshot-DknkjvxP.cjs +0 -2
  163. package/dist/matrix-CGRGkn5s.js +0 -112
  164. package/dist/matrix-gEO7ZM_u.cjs +0 -1
  165. package/dist/param-validation-C3HlcLLO.cjs +0 -1
  166. package/dist/param-validation-Do7Eg8Zv.js +0 -181
  167. package/dist/record-bindings-DUX1VMlR.cjs +0 -1
  168. package/dist/runtime-BjKBI530.js +0 -168
  169. package/dist/runtime-CBFEPKEs.cjs +0 -1
  170. package/dist/sha256-BshdOkCC.cjs +0 -1
  171. package/dist/sha256-DTG-Gq8i.js +0 -157
  172. package/dist/template-bindings-C2SpvsMU.js +0 -58
  173. package/dist/template-bindings-CEtWyiLX.cjs +0 -1
  174. package/dist/template-catalog-C2NLdrwB.cjs +0 -1
  175. package/dist/template-registry-C62vpv4a.cjs +0 -1
  176. package/dist/tree-BX380Rr7.cjs +0 -1
  177. package/dist/tree-CjVZLRw7.js +0 -172
@@ -1,172 +0,0 @@
1
- import { e as A, c as w } from "./computed-C-4C2S5h.js";
2
- class b extends Error {
3
- constructor(r) {
4
- super(`树节点超出行数预算 ${r}`), this.limit = r, this.code = "tree-row-limit", this.name = "TreeRowLimitError";
5
- }
6
- }
7
- function s(e, r, i, t) {
8
- const n = e ?? r;
9
- if (!Number.isInteger(n) || n < 1 || n > i) throw new Error(`${t}应为 1–${i} 的整数`);
10
- return n;
11
- }
12
- function u(e) {
13
- return { rows: s(e.maxRows, 1e5, 1e6, "树行数预算"), depth: s(e.maxDepth, 64, 256, "树深度预算"), visits: s(e.maxAggregationVisits, 1e6, 1e7, "树聚合访问预算") };
14
- }
15
- function g(e) {
16
- return typeof e == "string" && !!e.trim();
17
- }
18
- function c(e) {
19
- return g(e) && !["__proto__", "prototype", "constructor"].includes(e);
20
- }
21
- function m(e) {
22
- if (g(e) || typeof e == "number" && Number.isFinite(e)) return e;
23
- throw new Error("树节点业务键应为非空字符串或有限数字");
24
- }
25
- function E(e) {
26
- return JSON.stringify([typeof e, e]);
27
- }
28
- function p(e) {
29
- return [e.idField, ...e.input === "flat" ? [e.parentField ?? ""] : [e.childrenField ?? "children"]];
30
- }
31
- function k(e, r) {
32
- const i = p(e);
33
- if (r?.some((t) => t.scope && t.scope !== "row" || i.includes(t.field))) throw new Error("树形布局仅支持不覆盖结构键的当前行计算");
34
- }
35
- function h(e) {
36
- if (!e?.aborted) return;
37
- const r = new Error("树报表处理已取消");
38
- throw r.name = "AbortError", r;
39
- }
40
- function N(e) {
41
- const r = e.aggregates ?? [];
42
- if (!Array.isArray(r) || r.length > 32) throw new Error("树聚合最多 32 项");
43
- if (e.parentValues !== "leaf-aggregate" && r.length) throw new Error("树聚合需显式选择 leaf-aggregate 父级取值策略");
44
- if (e.parentValues === "leaf-aggregate" && !r.length) throw new Error("叶子聚合策略至少需要一个聚合字段");
45
- const i = /* @__PURE__ */ new Set();
46
- for (const t of r) {
47
- if (!t || !c(t.field) || i.has(t.field)) throw new Error("树聚合输出字段应安全、非空且唯一");
48
- for (const n of [t.valueField, t.weightField]) if (n !== void 0 && !c(n)) throw new Error("树聚合来源字段应安全且非空");
49
- if ([...p(e), e.labelField].includes(t.field)) throw new Error("树聚合不能覆盖结构键或标签字段");
50
- i.add(t.field), w({ ...t, field: t.valueField ?? t.field });
51
- }
52
- }
53
- function T(e) {
54
- if (!c(e.idField) || !c(e.labelField)) throw new Error("树需要安全的业务键和标签字段");
55
- if (e.input === "flat" && (!c(e.parentField) || e.parentField === e.idField)) throw new Error("扁平树需要独立的父键字段");
56
- if (e.childrenField !== void 0 && !c(e.childrenField)) throw new Error("子节点字段应安全且非空");
57
- if (e.input === "nested" && [e.idField, e.labelField].includes(e.childrenField ?? "children")) throw new Error("子节点字段不能覆盖业务键或标签字段");
58
- }
59
- function $(e) {
60
- if (!e || typeof e != "object" || !["flat", "nested"].includes(e.input)) throw new Error("树输入应为 flat 或 nested");
61
- if (T(e), e.orphan !== void 0 && !["error", "root"].includes(e.orphan)) throw new Error("树孤儿策略应为 error 或 root");
62
- if (e.parentValues !== void 0 && !["source", "leaf-aggregate"].includes(e.parentValues)) throw new Error("未知树父级取值策略");
63
- if (e.indentMm !== void 0 && (!Number.isFinite(e.indentMm) || e.indentMm < 0 || e.indentMm > 20)) throw new Error("树每级缩进应为 0–20 mm");
64
- u(e), N(e);
65
- }
66
- function F(e, r, i, t) {
67
- if (!e || typeof e != "object" || Array.isArray(e)) throw new Error("树节点应为对象");
68
- if (i.size >= t.rows) throw new b(t.rows);
69
- const n = m(e[r.idField]), l = E(n);
70
- if (i.has(l)) throw new Error(`树节点业务键重复:${String(n)}`);
71
- const o = { original: e, row: e, key: n, depth: 0, children: [] };
72
- return i.set(l, o), o;
73
- }
74
- function M(e, r, i, t, n) {
75
- for (const o of e)
76
- h(n), F(o, r, i, t);
77
- const l = [];
78
- for (const o of i.values()) {
79
- h(n);
80
- const a = o.row[r.parentField];
81
- if (a == null) {
82
- l.push(o);
83
- continue;
84
- }
85
- const f = i.get(E(m(a)));
86
- if (!f) {
87
- if (r.orphan !== "root") throw new Error(`树节点 ${String(o.key)} 的父节点不存在`);
88
- l.push(o);
89
- continue;
90
- }
91
- if (f === o) throw new Error("树节点不能以自身为父节点");
92
- o.parent = f, f.children.push(o);
93
- }
94
- return l;
95
- }
96
- function V(e, r, i, t, n) {
97
- const l = [], o = [{ rows: e, next: 0 }];
98
- for (; o.length; ) {
99
- h(n);
100
- const a = o[o.length - 1];
101
- if (a.next >= a.rows.length) {
102
- o.pop();
103
- continue;
104
- }
105
- const f = F(a.rows[a.next++], r, i, t);
106
- if (f.parent = a.parent, f.depth = o.length - 1, o.length > t.depth) throw new Error(`树节点超出深度预算 ${t.depth}`);
107
- (a.parent?.children ?? l).push(f);
108
- const d = f.row[r.childrenField ?? "children"];
109
- if (d != null) {
110
- if (!Array.isArray(d)) throw new Error("嵌套树 children 字段应为数组");
111
- d.length && o.push({ rows: d, next: 0, parent: f });
112
- }
113
- }
114
- return l;
115
- }
116
- function x(e, r, i, t) {
117
- const n = [], l = [{ nodes: e, next: 0 }];
118
- for (; l.length; ) {
119
- h(t);
120
- const o = l[l.length - 1];
121
- if (o.next >= o.nodes.length) {
122
- l.pop();
123
- continue;
124
- }
125
- if (l.length > i.depth) throw new Error(`树节点超出深度预算 ${i.depth}`);
126
- const a = o.nodes[o.next++];
127
- a.depth = l.length - 1, n.push(a), a.children.length && l.push({ nodes: a.children, next: 0 });
128
- }
129
- if (n.length !== r) throw new Error("树父子关系存在循环");
130
- return n;
131
- }
132
- function S(e, r, i, t) {
133
- if (r.parentValues !== "leaf-aggregate") return;
134
- const n = r.aggregates, l = /* @__PURE__ */ new Map();
135
- for (const a of e) a.children.length && l.set(a, n.map((f) => w({ ...f, field: f.valueField ?? f.field })));
136
- let o = 0;
137
- for (const a of e)
138
- if (!a.children.length)
139
- for (let f = a.parent; f; f = f.parent) {
140
- if (h(t), o += n.length, o > i.visits) throw new Error(`树聚合超出访问预算 ${i.visits}`);
141
- for (const d of l.get(f)) d.add(a.row);
142
- }
143
- for (const [a, f] of l)
144
- a.row = { ...a.row }, n.forEach((d, v) => {
145
- a.row[d.field] = f[v].value();
146
- });
147
- }
148
- function y(e, r, i) {
149
- if ($(r), h(i), !Array.isArray(e)) throw new Error("树数据应为节点数组");
150
- const t = u(r), n = /* @__PURE__ */ new Map(), l = r.input === "flat" ? M(e, r, n, t, i) : V(e, r, n, t, i);
151
- return x(l, n.size, t, i);
152
- }
153
- function O(e, r, i) {
154
- return y(e, r, i).map((t) => t.original);
155
- }
156
- function R(e, r, i = {}) {
157
- const t = y(e, r, i.signal);
158
- if (k(r, i.computed?.fields), i.computed?.fields.length) {
159
- const n = A(t.map((l) => l.row), { ...i.computed, signal: i.signal }).rows;
160
- t.forEach((l, o) => {
161
- l.row = n[o];
162
- });
163
- }
164
- return S(t, r, u(r), i.signal), { rows: t.map((n) => n.row), entries: t.map((n) => ({ row: n.row, original: n.original, key: n.key, depth: n.depth, hasChildren: !!n.children.length })), leaves: t.filter((n) => !n.children.length).map((n) => n.row) };
165
- }
166
- export {
167
- b as T,
168
- k as a,
169
- R as c,
170
- O as f,
171
- $ as v
172
- };