@agile-team/mach-report 2.3.1 → 2.4.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 +42 -5
- package/dist/ReportPreview-CL9J9MEE.js +1907 -0
- package/dist/ReportPreview-DJvv3h8m.cjs +6 -0
- package/dist/grid-geometry-BNIvw52m.cjs +1 -0
- package/dist/{grid-geometry-Dw7BlENr.js → grid-geometry-C8hGoe9o.js} +10 -10
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +74 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.js +946 -782
- package/dist/number-format-BA_KwrZe.js +55 -0
- package/dist/number-format-CZ2T_5kF.cjs +1 -0
- package/dist/pdf.cjs +47 -47
- package/dist/pdf.d.cts +6 -0
- package/dist/pdf.d.ts +6 -0
- package/dist/pdf.js +2134 -2117
- package/dist/{plugin-2lqgTX26.cjs → plugin-BkK2mm_p.cjs} +1 -1
- package/dist/{plugin-5R00MJQs.js → plugin-DRnvIbdP.js} +1 -1
- package/dist/render-plan-CCTL4F9v.cjs +1 -0
- package/dist/{render-plan-I9AHvQv7.js → render-plan-CXBWRog4.js} +12 -7
- package/dist/style.css +1 -1
- package/dist/vue/async.d.cts +598 -1
- package/dist/vue/async.d.ts +598 -1
- package/dist/vue/index.d.cts +820 -10
- package/dist/vue/index.d.ts +820 -10
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +96 -73
- package/dist/xlsx.cjs +24 -24
- package/dist/xlsx.d.cts +209 -0
- package/dist/xlsx.d.ts +209 -0
- package/dist/xlsx.js +9805 -9284
- package/package.json +1 -1
- package/dist/ReportPreview-B-mwUSk9.cjs +0 -6
- package/dist/ReportPreview-DKjr4cwO.js +0 -1688
- package/dist/defaults-D4o0NCLo.js +0 -9
- package/dist/defaults-DOO1yHwx.cjs +0 -1
- package/dist/grid-geometry-bkciiZ4Q.cjs +0 -1
- package/dist/render-plan-CfJ3wf1l.cjs +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
function p(n) {
|
|
2
|
+
const t = [""];
|
|
3
|
+
let e = !1, i = !1;
|
|
4
|
+
for (const r of n)
|
|
5
|
+
r === ";" && !e && !i ? t.push("") : t[t.length - 1] += r, r === '"' && !i && (e = !e), i = r === "\\" && !i;
|
|
6
|
+
return t;
|
|
7
|
+
}
|
|
8
|
+
function x(n, t) {
|
|
9
|
+
const e = p(t), i = n === 0 && e.length > 2 ? 2 : n < 0 && e.length > 1 ? 1 : 0;
|
|
10
|
+
return { pattern: e[i], magnitude: Math.abs(n), negative: n < 0 && i === 0 };
|
|
11
|
+
}
|
|
12
|
+
function $(n) {
|
|
13
|
+
const t = [];
|
|
14
|
+
return { text: n.replace(/"([^"]*)"|\\(.)/g, (i, r, c) => (t.push(r ?? c ?? ""), String.fromCharCode(57344 + t.length - 1))).replace(/\[(Black|Blue|Cyan|Green|Magenta|Red|White|Yellow|Color\d+)\]/gi, ""), literals: t };
|
|
15
|
+
}
|
|
16
|
+
function s(n, t) {
|
|
17
|
+
return /[0#?@_*%[\]"\\.,/]/.test(n) ? null : n.replace(/[\uE000-\uF8FF]/g, (e) => t.literals[e.charCodeAt(0) - 57344] ?? "");
|
|
18
|
+
}
|
|
19
|
+
function S(n, t) {
|
|
20
|
+
const e = /^(.*?)(0)(?:\.([0#]+))?E([+-])(0+)(.*?)$/i.exec(t.text);
|
|
21
|
+
if (!e) return null;
|
|
22
|
+
const i = s(e[1], t), r = s(e[6], t), c = e[3] ?? "";
|
|
23
|
+
if (i === null || r === null || c.length > 100) return null;
|
|
24
|
+
const [l, o] = n.magnitude.toExponential(c.length).split("e"), u = c.replace(/#/g, "").length, [f, m = ""] = l.split("."), a = m.replace(/0+$/, "").padEnd(u, "0"), g = Number(o), d = g < 0 ? "-" : e[4] === "+" ? "+" : "", h = String(Math.abs(g)).padStart(e[5].length, "0");
|
|
25
|
+
return `${n.negative ? "-" : ""}${i}${f}${a ? `.${a}` : ""}E${d}${h}${r}`;
|
|
26
|
+
}
|
|
27
|
+
function b(n, t) {
|
|
28
|
+
const e = /^(.*?)([#,]*0[0#]*)(?:\.([0#]+))?(%)?(.*?)$/.exec(t.text);
|
|
29
|
+
if (!e) return s(t.text, t);
|
|
30
|
+
const i = s(e[1], t), r = s(e[5], t), c = e[2], l = e[3] ?? "";
|
|
31
|
+
if (i === null || r === null || l.length > 100 || !/^(?:0+|#+0+|#,##0+)$/.test(c)) return null;
|
|
32
|
+
const o = n.magnitude * (e[4] ? 100 : 1);
|
|
33
|
+
if (!Number.isFinite(o)) return null;
|
|
34
|
+
const u = o.toLocaleString("en-US", {
|
|
35
|
+
useGrouping: c.includes(","),
|
|
36
|
+
minimumIntegerDigits: Math.min(21, c.replace(/[^0]/g, "").length),
|
|
37
|
+
minimumFractionDigits: l.replace(/#/g, "").length,
|
|
38
|
+
maximumFractionDigits: l.length
|
|
39
|
+
});
|
|
40
|
+
return `${n.negative ? "-" : ""}${i}${u}${e[4] ?? ""}${r}`;
|
|
41
|
+
}
|
|
42
|
+
function E(n, t, e) {
|
|
43
|
+
if (!t || /^(General|@)$/i.test(t)) return String(n);
|
|
44
|
+
const i = x(n, t);
|
|
45
|
+
if (i.pattern === "") return "";
|
|
46
|
+
const r = $(i.pattern), c = S(i, r) ?? b(i, r);
|
|
47
|
+
return c !== null ? c : (e?.(), String(n));
|
|
48
|
+
}
|
|
49
|
+
function F(n) {
|
|
50
|
+
return n !== void 0 && n.replace(/"[^"]*"|\\./g, "").includes("%");
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
E as f,
|
|
54
|
+
F as i
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function x(n){const t=[""];let e=!1,i=!1;for(const r of n)r===";"&&!e&&!i?t.push(""):t[t.length-1]+=r,r==='"'&&!i&&(e=!e),i=r==="\\"&&!i;return t}function p(n,t){const e=x(t),i=n===0&&e.length>2?2:n<0&&e.length>1?1:0;return{pattern:e[i],magnitude:Math.abs(n),negative:n<0&&i===0}}function $(n){const t=[];return{text:n.replace(/"([^"]*)"|\\(.)/g,(i,r,c)=>(t.push(r??c??""),String.fromCharCode(57344+t.length-1))).replace(/\[(Black|Blue|Cyan|Green|Magenta|Red|White|Yellow|Color\d+)\]/gi,""),literals:t}}function s(n,t){return/[0#?@_*%[\]"\\.,/]/.test(n)?null:n.replace(/[\uE000-\uF8FF]/g,e=>t.literals[e.charCodeAt(0)-57344]??"")}function E(n,t){const e=/^(.*?)(0)(?:\.([0#]+))?E([+-])(0+)(.*?)$/i.exec(t.text);if(!e)return null;const i=s(e[1],t),r=s(e[6],t),c=e[3]??"";if(i===null||r===null||c.length>100)return null;const[l,o]=n.magnitude.toExponential(c.length).split("e"),u=c.replace(/#/g,"").length,[f,m=""]=l.split("."),a=m.replace(/0+$/,"").padEnd(u,"0"),g=Number(o),d=g<0?"-":e[4]==="+"?"+":"",h=String(Math.abs(g)).padStart(e[5].length,"0");return`${n.negative?"-":""}${i}${f}${a?`.${a}`:""}E${d}${h}${r}`}function b(n,t){const e=/^(.*?)([#,]*0[0#]*)(?:\.([0#]+))?(%)?(.*?)$/.exec(t.text);if(!e)return s(t.text,t);const i=s(e[1],t),r=s(e[5],t),c=e[2],l=e[3]??"";if(i===null||r===null||l.length>100||!/^(?:0+|#+0+|#,##0+)$/.test(c))return null;const o=n.magnitude*(e[4]?100:1);if(!Number.isFinite(o))return null;const u=o.toLocaleString("en-US",{useGrouping:c.includes(","),minimumIntegerDigits:Math.min(21,c.replace(/[^0]/g,"").length),minimumFractionDigits:l.replace(/#/g,"").length,maximumFractionDigits:l.length});return`${n.negative?"-":""}${i}${u}${e[4]??""}${r}`}function F(n,t,e){if(!t||/^(General|@)$/i.test(t))return String(n);const i=p(n,t);if(i.pattern==="")return"";const r=$(i.pattern),c=E(i,r)??b(i,r);return c!==null?c:(e?.(),String(n))}function S(n){return n!==void 0&&n.replace(/"[^"]*"|\\./g,"").includes("%")}exports.formatExcelNumber=F;exports.isExcelPercentageFormat=S;
|