@agile-team/mach-report 2.17.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.
- package/README.md +18 -9
- package/dist/{ExcelBindingWizard-Bq6FYME6.cjs → ExcelBindingWizard-Czn3C2yE.cjs} +1 -1
- package/dist/{ExcelBindingWizard-Co1svTsw.js → ExcelBindingWizard-DMGZj6I6.js} +3 -3
- package/dist/ParamEditor-KzDQvbHY.js +732 -0
- package/dist/ParamEditor-oDfD8LgE.cjs +1 -0
- package/dist/{ReportBatchPanel-uQh06usx.js → ReportBatchPanel-BJK7PvZ4.js} +39 -39
- package/dist/ReportBatchPanel-DnmNRssu.cjs +1 -0
- package/dist/ReportParamPanel-mQkeN70Q.js +1020 -0
- package/dist/ReportParamPanel-sOANVRz-.cjs +1 -0
- package/dist/ReportPreview-BxWWTUL5.js +5583 -0
- package/dist/ReportPreview-Yf99omi3.cjs +6 -0
- package/dist/{ReportTemplateLibrary-TIL_Oj2l.js → ReportTemplateLibrary-BFjB08Wu.js} +1 -1
- package/dist/{ReportTemplateLibrary-CnP7_1pH.cjs → ReportTemplateLibrary-BO42QnWd.cjs} +1 -1
- package/dist/RuleEditor-CqxT1a-W.js +2337 -0
- package/dist/RuleEditor-D7YWigD9.cjs +1 -0
- package/dist/{TemplateOutlinePanel-BlLxRrfu.cjs → TemplateOutlinePanel-B0XX350V.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-BouxsuqQ.js → TemplateOutlinePanel-zG0DrsIB.js} +2 -2
- package/dist/{TemplateReusePanel-yxsHSO40.cjs → TemplateReusePanel-BD0HSKp_.cjs} +1 -1
- package/dist/{TemplateReusePanel-BEACLPaN.js → TemplateReusePanel-Czwe5GbC.js} +2 -2
- package/dist/{TemplateReviewPanel-D9Cx0m2N.cjs → TemplateReviewPanel-CA5sdffM.cjs} +1 -1
- package/dist/{TemplateReviewPanel-B1OGRY2i.js → TemplateReviewPanel-NhmQI65C.js} +2 -2
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +100 -41
- package/dist/analytics.d.ts +100 -41
- package/dist/analytics.js +76 -141
- package/dist/artifact-integrity.json +108 -102
- package/dist/assets-2eC3mOcV.js +232 -0
- package/dist/assets-B0Hxn4l6.cjs +1 -0
- package/dist/{auto-DDHflI9v.cjs → auto-B0EZFIK1.cjs} +1 -1
- package/dist/{auto-BIOmtVhk.js → auto-BlchZ1b8.js} +19 -19
- package/dist/{batch-WzDIXJAt.js → batch-DGCt44XM.js} +1 -1
- package/dist/{batch-z6Aw5GEY.cjs → batch-DYcokH4v.cjs} +1 -1
- package/dist/charts-Dlv8j2AG.js +141 -0
- package/dist/charts-aCtoswXq.cjs +1 -0
- package/dist/codes.cjs +9 -9
- package/dist/codes.d.cts +54 -0
- package/dist/codes.d.ts +54 -0
- package/dist/codes.js +12097 -13668
- package/dist/column-visual-BpgQVWwT.js +238 -0
- package/dist/column-visual-CtYxnBCP.cjs +1 -0
- package/dist/component-tree-6TV7W6Yj.cjs +1 -0
- package/dist/component-tree-CvW4lzpv.js +67 -0
- package/dist/computed-4TnxzgIh.cjs +1 -0
- package/dist/computed-C8NRZQss.js +739 -0
- package/dist/data-bar-Ce38juRZ.cjs +1 -0
- package/dist/data-bar-PtjXhMgN.js +9 -0
- package/dist/designer--TKECSEc.cjs +2 -0
- package/dist/designer-d6hJS41w.js +5683 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +710 -42
- package/dist/designer.d.ts +710 -42
- package/dist/designer.js +23 -20
- package/dist/{encoding-BFMFIc4r.cjs → encoding-B--eZpp1.cjs} +1 -1
- package/dist/{encoding-DP_Eaf0A.js → encoding-mctOLocI.js} +2 -2
- package/dist/{font-loader-7FWVlykp.cjs → font-loader-DBBJ5KE9.cjs} +1 -1
- package/dist/{font-loader-CQZowp0I.js → font-loader-DW8tIaNp.js} +1 -1
- package/dist/index-CPh6tqge.js +1575 -0
- package/dist/index-CUNw7dL9.cjs +1 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +361 -15
- package/dist/index.d.ts +361 -15
- package/dist/index.js +876 -835
- package/dist/json-snapshot-By4ZVVUt.js +1967 -0
- package/dist/json-snapshot-jiXff4lc.cjs +2 -0
- package/dist/matrix-0hywp0-F.cjs +1 -0
- package/dist/matrix-Dy-tyY7E.js +381 -0
- package/dist/param-validation-C-8sRJLq.cjs +1 -0
- package/dist/param-validation-CnDEd2l-.js +333 -0
- package/dist/{pdf-l3ea86di.js → pdf-CKROKygt.js} +1851 -1849
- package/dist/{pdf-B8JouyYv.cjs → pdf-DqyxJ96U.cjs} +46 -46
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +54 -0
- package/dist/pdf.d.ts +54 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BBp74CQZ.js → plugin-ByjF2kiV.js} +5 -5
- package/dist/{plugin-CtFX9PFG.cjs → plugin-DM1M2wlI.cjs} +1 -1
- package/dist/prefill-B8H9qwE4.js +371 -0
- package/dist/prefill-D7EswyTI.cjs +1 -0
- package/dist/{prepared-CARicKYh.js → prepared-BE-4jfX5.js} +2 -2
- package/dist/{prepared-Ch1x_Gog.cjs → prepared-CGVphji3.cjs} +1 -1
- package/dist/{protocol-B5A2uom4.cjs → protocol-ByRVzzQG.cjs} +1 -1
- package/dist/{protocol-BaiWjq5w.js → protocol-Cr81vFSQ.js} +3 -3
- package/dist/{record-bindings-D4TuMzHs.js → record-bindings-DEJtmo3p.js} +67 -107
- package/dist/record-bindings-ehjnCDHt.cjs +1 -0
- package/dist/{region-binding-workflow-BNasF5kz.js → region-binding-workflow-CBg0l_tj.js} +1 -1
- package/dist/{region-binding-workflow-O2Cni3mF.cjs → region-binding-workflow-D05tOYn3.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{report-params-B1RzkhJj.js → report-params-D9tBuM9B.js} +1 -1
- package/dist/{report-params-WDGrA4oP.cjs → report-params-VTg8MoCp.cjs} +1 -1
- package/dist/runtime-CDA6d263.cjs +1 -0
- package/dist/runtime-CEMvybO7.js +170 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +75 -7
- package/dist/server/node.d.ts +75 -7
- package/dist/server-node.cjs +4 -4
- package/dist/server-node.js +2692 -1990
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +243 -28
- package/dist/server.d.ts +243 -28
- package/dist/server.js +28 -28
- package/dist/sha256-BDQ1Qk7A.js +158 -0
- package/dist/sha256-DgZAKXqI.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/template-bindings-Cg5oBLFT.cjs +1 -0
- package/dist/template-bindings-TKnXM7ll.js +62 -0
- package/dist/{template-catalog-wT1fNeAP.js → template-catalog-CmbWOJqy.js} +16 -16
- package/dist/{template-catalog-Dua8h9ZA.cjs → template-catalog-Utu4GP09.cjs} +1 -1
- package/dist/{template-fragments-BajTajb4.cjs → template-fragments-C_zSHJAa.cjs} +1 -1
- package/dist/{template-fragments-DmX5XK4N.js → template-fragments-DWgo9tlZ.js} +2 -2
- package/dist/{template-outline-BwRV_eRo.cjs → template-outline-DWkzZXVC.cjs} +1 -1
- package/dist/{template-outline-cnWfT_LK.js → template-outline-DiADphlq.js} +1 -1
- package/dist/{template-registry-u11fPd8D.js → template-registry-BIhIHOab.js} +319 -314
- package/dist/template-registry-DzWswQI5.cjs +1 -0
- package/dist/vue/async.d.cts +528 -33
- package/dist/vue/async.d.ts +528 -33
- package/dist/vue/index.d.cts +616 -64
- package/dist/vue/index.d.ts +616 -64
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +94 -89
- package/dist/{workbook-session-DN5LSA5C.cjs → workbook-session-B94EwVa_.cjs} +1 -1
- package/dist/{workbook-session-B8pNW24X.js → workbook-session-BoScoOg-.js} +2 -2
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +75 -7
- package/dist/worker.d.ts +75 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +120 -13
- package/dist/xlsx.d.ts +120 -13
- package/dist/xlsx.js +313 -279
- package/package.json +1 -1
- package/dist/ParamEditor-B5UZRgxv.cjs +0 -1
- package/dist/ParamEditor-DNNARyeB.js +0 -594
- package/dist/ReportBatchPanel-Ctvs2t_9.cjs +0 -1
- package/dist/ReportPreview-BdQawRh0.js +0 -4879
- package/dist/ReportPreview-CJC_-j2I.cjs +0 -6
- package/dist/RuleEditor-DkRjOLlr.js +0 -2141
- package/dist/RuleEditor-h5anGsDB.cjs +0 -1
- package/dist/assets-BIMVwjQe.js +0 -231
- package/dist/assets-Dfs2ElxI.cjs +0 -1
- package/dist/component-tree-Ca6YYfHq.js +0 -61
- package/dist/component-tree-DkGLEfZC.cjs +0 -1
- package/dist/computed-BW5a8QFk.js +0 -612
- package/dist/computed-C2GD3XcE.cjs +0 -1
- package/dist/config-Dg_o8e7m.cjs +0 -1
- package/dist/config-XQ4qrQ7Q.js +0 -844
- package/dist/designer-D9XAxqSc.js +0 -5178
- package/dist/designer-uCDo5XSK.cjs +0 -2
- package/dist/drill-ByN8COs_.cjs +0 -1
- package/dist/drill-CKW3Xtfa.js +0 -145
- package/dist/json-snapshot-D7PE1NsU.cjs +0 -2
- package/dist/json-snapshot-DYmEe3sO.js +0 -1779
- package/dist/matrix-JLAXlux-.js +0 -302
- package/dist/matrix-gTHpDTGm.cjs +0 -1
- package/dist/param-validation-C3HlcLLO.cjs +0 -1
- package/dist/param-validation-Do7Eg8Zv.js +0 -181
- package/dist/record-bindings-B86Sur_y.cjs +0 -1
- package/dist/runtime-DakRXui3.js +0 -170
- package/dist/runtime-dL5ygIfa.cjs +0 -1
- package/dist/sha256-BshdOkCC.cjs +0 -1
- package/dist/sha256-DTG-Gq8i.js +0 -157
- package/dist/template-bindings-C2SpvsMU.js +0 -58
- package/dist/template-bindings-CEtWyiLX.cjs +0 -1
- package/dist/template-registry-CpysHAxy.cjs +0 -1
- package/dist/tree-CLpxYbKa.cjs +0 -1
- package/dist/tree-DNJorJUf.js +0 -172
package/dist/tree-DNJorJUf.js
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { e as A, c as w } from "./computed-BW5a8QFk.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
|
-
};
|