@agile-team/mach-report 2.10.0 → 2.11.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 (111) hide show
  1. package/README.md +6 -2
  2. package/dist/ExcelBindingWizard-CjIiVox-.cjs +1 -0
  3. package/dist/ExcelBindingWizard-Dxm-K5HL.js +1240 -0
  4. package/dist/ParamEditor-D-Hf5xfO.cjs +1 -0
  5. package/dist/ParamEditor-DRGxzxeO.js +381 -0
  6. package/dist/ReportBatchPanel-BYgg0EDB.cjs +1 -0
  7. package/dist/ReportBatchPanel-Bby5yLzU.js +287 -0
  8. package/dist/ReportPreview-DWXROHBP.cjs +6 -0
  9. package/dist/ReportPreview-DiNXhQI0.js +4138 -0
  10. package/dist/ReportTemplateLibrary-C6CO7YCT.cjs +1 -0
  11. package/dist/ReportTemplateLibrary-DfzDXRvr.js +260 -0
  12. package/dist/RuleEditor-C2QsOHOs.cjs +1 -0
  13. package/dist/RuleEditor-D9wQHrkf.js +2024 -0
  14. package/dist/TemplateReviewPanel-BKofGrV9.js +222 -0
  15. package/dist/TemplateReviewPanel-DwtOcLue.cjs +1 -0
  16. package/dist/analytics.cjs +1 -1
  17. package/dist/analytics.d.cts +2 -0
  18. package/dist/analytics.d.ts +2 -0
  19. package/dist/analytics.js +29 -29
  20. package/dist/batch-Bt3Fd27Z.cjs +1 -0
  21. package/dist/batch-mRqhhhjt.js +364 -0
  22. package/dist/computed-Bvk0W15F.js +521 -0
  23. package/dist/computed-CGV2a809.cjs +1 -0
  24. package/dist/config-B612mw0x.js +525 -0
  25. package/dist/config-BRoLo2oj.cjs +1 -0
  26. package/dist/designer.cjs +2 -2
  27. package/dist/designer.d.cts +659 -9
  28. package/dist/designer.d.ts +659 -9
  29. package/dist/designer.js +2030 -1824
  30. package/dist/index.cjs +8 -8
  31. package/dist/index.d.cts +147 -3
  32. package/dist/index.d.ts +147 -3
  33. package/dist/index.js +639 -592
  34. package/dist/injection-keys-Db_DyLkm.cjs +1 -0
  35. package/dist/injection-keys-e85udZCp.js +7 -0
  36. package/dist/list-cell-BuYn4tGF.cjs +1 -0
  37. package/dist/{list-cell-Dxyi7DOw.js → list-cell-ClFra1zS.js} +54 -40
  38. package/dist/matrix-DVyWiYsd.cjs +1 -0
  39. package/dist/matrix-yZsGnldA.js +227 -0
  40. package/dist/param-validation-BlHHXs6u.js +153 -0
  41. package/dist/param-validation-DCK039V1.cjs +1 -0
  42. package/dist/pdf.cjs +25 -25
  43. package/dist/pdf.d.cts +3 -0
  44. package/dist/pdf.d.ts +3 -0
  45. package/dist/pdf.js +677 -677
  46. package/dist/plugin-BDTU4D94.cjs +1 -0
  47. package/dist/plugin-Cd5G2QQn.js +22 -0
  48. package/dist/region-binding-workflow-CXDmt9Bs.js +977 -0
  49. package/dist/region-binding-workflow-DhQvu1co.cjs +3 -0
  50. package/dist/{report-params-B_VCihAh.js → report-params-B44imUd4.js} +1 -1
  51. package/dist/{report-params-CjWrjPl6.cjs → report-params-SJfhKgaX.cjs} +1 -1
  52. package/dist/server/node.d.cts +5 -2
  53. package/dist/server/node.d.ts +5 -2
  54. package/dist/server-node.cjs +1 -1
  55. package/dist/server-node.js +87 -87
  56. package/dist/server.cjs +1 -1
  57. package/dist/server.d.cts +201 -2
  58. package/dist/server.d.ts +201 -2
  59. package/dist/server.js +557 -658
  60. package/dist/style.css +1 -1
  61. package/dist/template-registry-WNXdkiET.js +506 -0
  62. package/dist/template-registry-ukBGlm8N.cjs +1 -0
  63. package/dist/template-review-BXp2oyqg.cjs +1 -0
  64. package/dist/template-review-BdcXSYbx.js +1616 -0
  65. package/dist/tree-BX380Rr7.cjs +1 -0
  66. package/dist/tree-CqcQ99NM.js +172 -0
  67. package/dist/{validate-UUy9yP4K.js → validate-7s0yn6ii.js} +44 -44
  68. package/dist/validate-DsRiNw8h.cjs +1 -0
  69. package/dist/vue/async.d.cts +93 -4
  70. package/dist/vue/async.d.ts +93 -4
  71. package/dist/vue/index.d.cts +145 -7
  72. package/dist/vue/index.d.ts +145 -7
  73. package/dist/vue-async.cjs +1 -1
  74. package/dist/vue-async.js +5 -5
  75. package/dist/vue.cjs +1 -1
  76. package/dist/vue.js +116 -113
  77. package/dist/{workbook-session-B-bW5_yR.js → workbook-session-BKOTwcoq.js} +1 -1
  78. package/dist/{workbook-session-D7RtdNo0.cjs → workbook-session-CLYLhZWu.cjs} +1 -1
  79. package/dist/worker.cjs +1 -1
  80. package/dist/worker.d.cts +5 -2
  81. package/dist/worker.d.ts +5 -2
  82. package/dist/worker.js +1 -1
  83. package/dist/xlsx.cjs +3 -3
  84. package/dist/xlsx.d.cts +129 -2
  85. package/dist/xlsx.d.ts +129 -2
  86. package/dist/xlsx.js +336 -242
  87. package/package.json +1 -1
  88. package/dist/ExcelBindingWizard-CF7RplWm.cjs +0 -1
  89. package/dist/ExcelBindingWizard-qhwEderR.js +0 -842
  90. package/dist/ReportPreview-BE1tCHqE.js +0 -4604
  91. package/dist/ReportPreview-QKRKQOe3.cjs +0 -6
  92. package/dist/RuleEditor-BA36yIV6.js +0 -1723
  93. package/dist/RuleEditor-CczJ6mJm.cjs +0 -1
  94. package/dist/TemplateReviewPanel-CHi4Alqa.cjs +0 -1
  95. package/dist/TemplateReviewPanel-Dz0G5o83.js +0 -217
  96. package/dist/binding-preview-BWsdf_z2.cjs +0 -2
  97. package/dist/binding-preview-DILq0-0f.js +0 -649
  98. package/dist/decimal-CI1OAczk.js +0 -87
  99. package/dist/decimal-CQA0xJex.cjs +0 -1
  100. package/dist/list-cell-CyM1ZlRN.cjs +0 -1
  101. package/dist/matrix-BbXarwyk.js +0 -661
  102. package/dist/matrix-Cm65WLLP.cjs +0 -1
  103. package/dist/param-validation-BWNjLcN0.js +0 -116
  104. package/dist/param-validation-CiTxFeZ8.cjs +0 -1
  105. package/dist/plugin-CThk42vJ.cjs +0 -1
  106. package/dist/plugin-tGn7-5oF.js +0 -25
  107. package/dist/template-registry-CGWTLtIA.cjs +0 -1
  108. package/dist/template-registry-DzlQs3OF.js +0 -434
  109. package/dist/template-review-D1RoNCPw.cjs +0 -1
  110. package/dist/template-review-fnteXRng.js +0 -1473
  111. package/dist/validate-Bf6ccFr2.cjs +0 -1
@@ -1,87 +0,0 @@
1
- function f(e) {
2
- if (!Number.isSafeInteger(e) || e < 0 || e > 1e3 * 2)
3
- throw new Error("十进制精度超出预算");
4
- return 10n ** BigInt(e);
5
- }
6
- function a(e) {
7
- if (e.coefficient.toString().length > 1e3 * 2 || e.scale > 1e3 * 2)
8
- throw new Error("十进制结果超出精度预算");
9
- return e;
10
- }
11
- function m(e) {
12
- if (typeof e != "string" && !(typeof e == "number" && Number.isFinite(e)))
13
- throw new Error("十进制参数必须是有限数字或十进制文本");
14
- const n = String(e);
15
- if (n.length > 1e3) throw new Error("十进制文本超出精度预算");
16
- const c = /^([+-]?)(\d+)(?:\.(\d*))?(?:[eE]([+-]?\d{1,4}))?$/.exec(
17
- n
18
- );
19
- if (!c) throw new Error("无效十进制文本");
20
- const t = c[3] ?? "", o = Number(c[4] ?? 0), r = t.length - o, i = BigInt(
21
- `${c[1] === "-" ? "-" : ""}${c[2]}${t}`
22
- );
23
- return a(
24
- r < 0 ? { coefficient: i * f(-r), scale: 0 } : { coefficient: i, scale: r }
25
- );
26
- }
27
- function s(e, n) {
28
- const c = Math.max(e.scale, n.scale);
29
- return [
30
- e.coefficient * f(c - e.scale),
31
- n.coefficient * f(c - n.scale),
32
- c
33
- ];
34
- }
35
- function D(e, n) {
36
- const [c, t] = s(e, n);
37
- return c < t ? -1 : c > t ? 1 : 0;
38
- }
39
- function $(e, n) {
40
- const [c, t, o] = s(e, n);
41
- return a({ coefficient: c + t, scale: o });
42
- }
43
- function h(e, n) {
44
- return a({
45
- coefficient: e.coefficient * n.coefficient,
46
- scale: e.scale + n.scale
47
- });
48
- }
49
- function l(e, n) {
50
- const c = e / n, t = e % n, o = (r) => r < 0n ? -r : r;
51
- return o(t) * 2n < o(n) ? c : c + (e < 0n == n < 0n ? 1n : -1n);
52
- }
53
- function u(e) {
54
- if (!Number.isInteger(e) || e < 0 || e > 100)
55
- throw new Error("十进制小数位应为 0–100 的整数");
56
- }
57
- function d(e, n, c = 20) {
58
- if (u(c), n.coefficient === 0n) throw new Error("不能除以零");
59
- const t = n.scale - e.scale + c, o = e.coefficient * f(Math.max(0, t)), r = n.coefficient * f(Math.max(0, -t));
60
- return a({
61
- coefficient: l(o, r),
62
- scale: c
63
- });
64
- }
65
- function w(e, n) {
66
- let c = e.coefficient, t = e.scale;
67
- n !== void 0 && (u(n), c = n >= t ? c * f(n - t) : l(c, f(t - n)), t = n);
68
- const o = c < 0n, r = (o ? -c : c).toString().padStart(t + 1, "0");
69
- let i = t ? r.slice(-t) : "";
70
- return n === void 0 && (i = i.replace(/0+$/, "")), `${o ? "-" : ""}${t ? r.slice(0, -t) : r}${i ? `.${i}` : ""}`;
71
- }
72
- function S(e, n, c = !1, t = !1) {
73
- let o = m(e);
74
- t && (o = h(o, { coefficient: 100n, scale: 0 }));
75
- const [r, i] = w(o, n).split(".");
76
- return `${c ? r.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : r}${i === void 0 ? "" : `.${i}`}${t ? "%" : ""}`;
77
- }
78
- export {
79
- $ as a,
80
- d as b,
81
- D as c,
82
- u as d,
83
- w as e,
84
- S as f,
85
- h as m,
86
- m as p
87
- };
@@ -1 +0,0 @@
1
- "use strict";function f(e){if(!Number.isSafeInteger(e)||e<0||e>1e3*2)throw new Error("十进制精度超出预算");return 10n**BigInt(e)}function a(e){if(e.coefficient.toString().length>1e3*2||e.scale>1e3*2)throw new Error("十进制结果超出精度预算");return e}function s(e){if(typeof e!="string"&&!(typeof e=="number"&&Number.isFinite(e)))throw new Error("十进制参数必须是有限数字或十进制文本");const c=String(e);if(c.length>1e3)throw new Error("十进制文本超出精度预算");const n=/^([+-]?)(\d+)(?:\.(\d*))?(?:[eE]([+-]?\d{1,4}))?$/.exec(c);if(!n)throw new Error("无效十进制文本");const t=n[3]??"",r=Number(n[4]??0),i=t.length-r,o=BigInt(`${n[1]==="-"?"-":""}${n[2]}${t}`);return a(i<0?{coefficient:o*f(-i),scale:0}:{coefficient:o,scale:i})}function u(e,c){const n=Math.max(e.scale,c.scale);return[e.coefficient*f(n-e.scale),c.coefficient*f(n-c.scale),n]}function d(e,c){const[n,t]=u(e,c);return n<t?-1:n>t?1:0}function w(e,c){const[n,t,r]=u(e,c);return a({coefficient:n+t,scale:r})}function m(e,c){return a({coefficient:e.coefficient*c.coefficient,scale:e.scale+c.scale})}function D(e,c){const n=e/c,t=e%c,r=i=>i<0n?-i:i;return r(t)*2n<r(c)?n:n+(e<0n==c<0n?1n:-1n)}function l(e){if(!Number.isInteger(e)||e<0||e>100)throw new Error("十进制小数位应为 0–100 的整数")}function I(e,c,n=20){if(l(n),c.coefficient===0n)throw new Error("不能除以零");const t=c.scale-e.scale+n,r=e.coefficient*f(Math.max(0,t)),i=c.coefficient*f(Math.max(0,-t));return a({coefficient:D(r,i),scale:n})}function h(e,c){let n=e.coefficient,t=e.scale;c!==void 0&&(l(c),n=c>=t?n*f(c-t):D(n,f(t-c)),t=c);const r=n<0n,i=(r?-n:n).toString().padStart(t+1,"0");let o=t?i.slice(-t):"";return c===void 0&&(o=o.replace(/0+$/,"")),`${r?"-":""}${t?i.slice(0,-t):i}${o?`.${o}`:""}`}function $(e,c,n=!1,t=!1){let r=s(e);t&&(r=m(r,{coefficient:100n,scale:0}));const[i,o]=h(r,c).split(".");return`${n?i.replace(/\B(?=(\d{3})+(?!\d))/g,","):i}${o===void 0?"":`.${o}`}${t?"%":""}`}exports.addDecimal=w;exports.compareDecimal=d;exports.decimalDigits=l;exports.divideDecimal=I;exports.formatDecimal=$;exports.multiplyDecimal=m;exports.parseDecimal=s;exports.printDecimal=h;
@@ -1 +0,0 @@
1
- "use strict";const p=require("./defaults-xhmcLLrf.cjs"),o=require("./decimal-CQA0xJex.cjs"),u=require("./style-UgIJSA1F.cjs");function y(e){if(!e||e.kind==="date")return;const t=e.digits;if(!(t!==void 0&&(!Number.isInteger(t)||t<0||t>100))){if(e.kind==="percent"){const r=t??2;return`0${r?`.${"0".repeat(r)}`:""}%`}return t===void 0?e.thousands?"#,##0.###############":void 0:`${e.thousands?"#,##0":"0"}${t?`.${"0".repeat(t)}`:""}`}}function b(e){const t=/^(\d{4})[-/](\d{1,2})[-/](\d{1,2})$/.exec(e.trim());if(t){const n=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(n.getTime())?null:n}const r=new Date(e);return Number.isNaN(r.getTime())?null:r}function l(e,t){return e.toLocaleString("en-US",{minimumFractionDigits:t,maximumFractionDigits:t})}function D(e,t){const r=n=>String(n).padStart(2,"0");return t.replace(/YYYY/g,String(e.getFullYear())).replace(/MM/g,r(e.getMonth()+1)).replace(/DD/g,r(e.getDate())).replace(/hh/g,r(e.getHours())).replace(/mm/g,r(e.getMinutes())).replace(/ss/g,r(e.getSeconds()))}function F(e,t,r){return r!=null?t?l(e,r):e.toFixed(r):t?l(e):String(e)}function d(e){const t=typeof e=="number"?e:Number(String(e).replace(/,/g,""));return Number.isFinite(t)?t:null}function S(e,t){if(e==null||e===""||!t)return String(e??"");switch(t.kind){case"number":{if(typeof e=="string")try{return o.formatDecimal(e,t.digits,t.thousands===!0)}catch{return e}const r=d(e);return r==null?String(e):F(r,t.thousands===!0,t.digits)}case"percent":{if(typeof e=="string")try{return o.formatDecimal(e,t.digits??2,!0,!0)}catch{return e}const r=d(e);return r==null?String(e):`${l(r*100,t.digits??2)}%`}case"date":{const r=t.pattern??"YYYY-MM-DD",n=e instanceof Date?e:b(String(e));return n?D(n,r):String(e)}default:return String(e)}}function g(e,t){const r=e[t.field];if(r==null||r==="")return!1;if(typeof t.value=="number"||t.numeric!==void 0){let s;try{s=o.compareDecimal(o.parseDecimal(r),o.parseDecimal(t.value))}catch{return!1}if(!Number.isFinite(s))return!1;switch(t.op){case">":return s>0;case">=":return s>=0;case"<":return s<0;case"<=":return s<=0;case"==":return s===0;case"!=":return s!==0}}const n=String(r),i=String(t.value);switch(t.op){case"==":return n===i;case"!=":return n!==i;case">":return n>i;case">=":return n>=i;case"<":return n<i;case"<=":return n<=i}return!1}function h(e,t,r){return r==="identifier"||r==="dimension"||r==="date"?"center":r==="measure"?"right":r==="text"?"left":t?.kind==="number"||t?.kind==="percent"?"right":t?.kind==="date"||e instanceof Date||typeof e=="boolean"?"center":typeof e=="number"&&Number.isFinite(e)?"right":"left"}function N(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number")return String(e);if(typeof e=="boolean")return e?"是":"否";if(e instanceof Date)return e.toISOString().slice(0,10);try{return JSON.stringify(e)}catch{return String(e)}}function T(e,t){let r=u.mergeComponentStyles({fontSize:e.fontSizePt??p.DEFAULT_FONT_PT,bold:e.headerBold??!0,align:"center",verticalAlign:"middle",backgroundColor:e.headerBackgroundColor},t.style);return e.headerAlign!==void 0&&(r.align=e.headerAlign),r=u.mergeComponentStyles(r,e.headerStyle),t.headerAlign!==void 0&&(r.align=t.headerAlign),u.mergeComponentStyles(r,t.headerStyle)}function A(e,t,r){(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"&&Number.isFinite(r))&&(e.value=r);const n=t.format?.kind==="number"||t.format?.kind==="percent";t.valueType!==void 0?e.valueType=t.valueType:n&&(e.valueType="number"),t.editable!==void 0&&(e.editable=t.editable);const i=y(t.format);(typeof e.value=="number"||e.value==null)&&i!==void 0&&(e.numberFormat=i)}function C(e,t,r){const n=!!t.visibleWhen&&!g(r,t.visibleWhen),i=n?null:r[t.field],s=t.align??t.style?.align??e.align??"left";let c=u.mergeComponentStyles({fontSize:e.fontSizePt??p.DEFAULT_FONT_PT,verticalAlign:"middle"},t.style);c.align=s==="auto"?h(i,t.format,t.semanticRole):s;const m=t.rules?.find(f=>g(r,f.when));m&&(c=u.mergeComponentStyles(c,m.style));const a={text:t.format?S(i,t.format):N(i),style:c};return A(a,t,i),e.computed?.some(f=>f.field===t.field)&&(a.derived=!0,a.editable=!1),n&&(a.editable=!1),a}exports.evalStyleRule=g;exports.formatValue=S;exports.listCellText=N;exports.parseDateLocal=b;exports.resolveListAutoAlignment=h;exports.resolveListHeaderStyle=T;exports.resolveListSampleCell=C;exports.toExcelNumberFormat=y;exports.toNumber=d;