@agile-team/mach-report 2.1.0 → 2.2.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 +97 -12
- package/dist/ReportPreview-BWrQCj9M.js +1643 -0
- package/dist/ReportPreview-DY0PGGqF.cjs +6 -0
- package/dist/grid-geometry-DBH9ExuY.cjs +1 -0
- package/dist/grid-geometry-DONcjshk.js +130 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +79 -11
- package/dist/index.d.ts +79 -11
- package/dist/index.js +1039 -712
- package/dist/page-window-index-CIuT4BAv.js +43 -0
- package/dist/page-window-index-DEjnM6IB.cjs +1 -0
- package/dist/pdf.cjs +46 -46
- package/dist/pdf.d.cts +4 -0
- package/dist/pdf.d.ts +4 -0
- package/dist/pdf.js +6 -6
- package/dist/{plugin-Bl00j_CP.cjs → plugin-BMoMUxrw.cjs} +1 -1
- package/dist/{plugin-DVScnZ4C.js → plugin-CAcNe0FT.js} +2 -2
- package/dist/report-params-B3Fia6JO.js +10 -0
- package/dist/report-params-D1gZ1DME.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/textwrap-DdaewxAd.js +117 -0
- package/dist/textwrap-DqiFwAV3.cjs +3 -0
- package/dist/vue/async.d.cts +53 -2
- package/dist/vue/async.d.ts +53 -2
- package/dist/vue/index.d.cts +65 -12
- package/dist/vue/index.d.ts +65 -12
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +4 -4
- package/dist/xlsx.cjs +14 -14
- package/dist/xlsx.d.cts +8 -0
- package/dist/xlsx.d.ts +8 -0
- package/dist/xlsx.js +1087 -1053
- package/package.json +3 -2
- package/dist/ReportPreview-Dwdsyk9b.js +0 -1558
- package/dist/ReportPreview-VHAIfsz1.cjs +0 -6
- package/dist/grid-geometry-BXpOxznT.cjs +0 -1
- package/dist/grid-geometry-Bs8QXz1X.js +0 -65
- package/dist/report-params-BB85g7mg.js +0 -10
- package/dist/report-params-D1NeY-eR.cjs +0 -1
- package/dist/style-CFZ-HE2s.cjs +0 -3
- package/dist/style-DnmtG7Gl.js +0 -180
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function c(a) {
|
|
2
|
+
return Number.isFinite(a) ? Math.max(0, a) : 0;
|
|
3
|
+
}
|
|
4
|
+
function b(a, g = 0) {
|
|
5
|
+
const n = a.length, w = c(g), o = new Array(n + 1);
|
|
6
|
+
o[0] = 0;
|
|
7
|
+
for (let t = 0; t < n; t++)
|
|
8
|
+
o[t + 1] = o[t] + c(a[t] ?? 0) + w;
|
|
9
|
+
const d = o[n];
|
|
10
|
+
function m(t) {
|
|
11
|
+
let i = 0, r = n - 1, s = 0;
|
|
12
|
+
for (; i <= r; ) {
|
|
13
|
+
const e = i + r >>> 1;
|
|
14
|
+
o[e] <= t ? (s = e, i = e + 1) : r = e - 1;
|
|
15
|
+
}
|
|
16
|
+
return s;
|
|
17
|
+
}
|
|
18
|
+
function P(t, i, r = 1) {
|
|
19
|
+
if (n === 0) return { start: 0, end: -1, padTopPx: 0, padBottomPx: 0 };
|
|
20
|
+
const s = Math.floor(c(r)), e = c(i), x = m(e), p = Math.max(0, x - s), A = e + c(t);
|
|
21
|
+
let f = x, h = n - 1, u = n - 1;
|
|
22
|
+
for (; f <= h; ) {
|
|
23
|
+
const l = f + h >>> 1;
|
|
24
|
+
o[l + 1] < A ? f = l + 1 : (u = l, h = l - 1);
|
|
25
|
+
}
|
|
26
|
+
const M = Math.min(n - 1, u + s);
|
|
27
|
+
return {
|
|
28
|
+
start: p,
|
|
29
|
+
end: M,
|
|
30
|
+
padTopPx: o[p],
|
|
31
|
+
padBottomPx: Math.max(0, d - o[M + 1])
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
totalHeightPx: d,
|
|
36
|
+
pageAt: m,
|
|
37
|
+
offsetAt: (t) => o[Math.max(0, Math.min(n, Math.floor(t)))] ?? 0,
|
|
38
|
+
window: P
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
b as c
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function c(a){return Number.isFinite(a)?Math.max(0,a):0}function b(a,g=0){const e=a.length,w=c(g),n=new Array(e+1);n[0]=0;for(let t=0;t<e;t++)n[t+1]=n[t]+c(a[t]??0)+w;const h=n[e];function m(t){let i=0,r=e-1,s=0;for(;i<=r;){const o=i+r>>>1;n[o]<=t?(s=o,i=o+1):r=o-1}return s}function P(t,i,r=1){if(e===0)return{start:0,end:-1,padTopPx:0,padBottomPx:0};const s=Math.floor(c(r)),o=c(i),x=m(o),u=Math.max(0,x-s),A=o+c(t);let d=x,f=e-1,p=e-1;for(;d<=f;){const l=d+f>>>1;n[l+1]<A?d=l+1:(p=l,f=l-1)}const M=Math.min(e-1,p+s);return{start:u,end:M,padTopPx:n[u],padBottomPx:Math.max(0,h-n[M+1])}}return{totalHeightPx:h,pageAt:m,offsetAt:t=>n[Math.max(0,Math.min(e,Math.floor(t)))]??0,window:P}}exports.createPageWindowIndex=b;
|