@agile-team/mach-report 2.6.1 → 2.8.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 +59 -8
- package/dist/ReportPreview-BKKDAv8e.js +4481 -0
- package/dist/ReportPreview-E3cm67Tk.cjs +6 -0
- package/dist/{assets-NVA_sftu.js → assets-B9qJku3V.js} +54 -57
- package/dist/assets-RZan7EyL.cjs +1 -0
- package/dist/capabilities-joSutDF8.js +63 -0
- package/dist/capabilities-xGTpnPjJ.cjs +1 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +922 -753
- package/dist/designer.d.ts +922 -753
- package/dist/designer.js +490 -234
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +128 -3
- package/dist/index.d.ts +128 -3
- package/dist/index.js +971 -699
- package/dist/pdf.cjs +30 -30
- package/dist/pdf.d.cts +11 -3
- package/dist/pdf.d.ts +11 -3
- package/dist/pdf.js +1501 -1500
- package/dist/{plugin-Ds10VnQO.js → plugin-PCgxBVB2.js} +1 -1
- package/dist/{plugin-BqBkn_kI.cjs → plugin-mAfvgSey.cjs} +1 -1
- package/dist/progress-DD964VAB.js +102 -0
- package/dist/progress-KvhwXZ1Q.cjs +1 -0
- package/dist/{report-source-B9bENO0F.js → report-source-BXHNy_AD.js} +337 -332
- package/dist/report-source-CCAvFE3t.cjs +1 -0
- package/dist/server/node.d.cts +26 -3
- package/dist/server/node.d.ts +26 -3
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +125 -92
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +28 -3
- package/dist/server.d.ts +28 -3
- package/dist/server.js +172 -164
- package/dist/style.css +1 -1
- package/dist/task-events-DQ276fn2.cjs +1 -0
- package/dist/task-events-Dpsvf_t2.js +47 -0
- package/dist/vue/async.d.cts +1553 -2083
- package/dist/vue/async.d.ts +1553 -2083
- package/dist/vue/index.d.cts +2465 -3310
- package/dist/vue/index.d.ts +2465 -3310
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +159 -132
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +26 -3
- package/dist/worker.d.ts +26 -3
- package/dist/worker.js +110 -85
- package/dist/xlsx.cjs +14 -14
- package/dist/xlsx.d.cts +11 -3
- package/dist/xlsx.d.ts +11 -3
- package/dist/xlsx.js +656 -652
- package/package.json +2 -2
- package/dist/ReportPreview-Dk-28QAi.js +0 -2946
- package/dist/ReportPreview-FSvcBLjH.cjs +0 -6
- package/dist/assets-66UBlhES.cjs +0 -1
- package/dist/capabilities-CNjIirfo.js +0 -36
- package/dist/capabilities-D4xeVYSR.cjs +0 -1
- package/dist/grid-geometry-BNptEcMm.js +0 -65
- package/dist/grid-geometry-CZ_cYB6O.cjs +0 -1
- package/dist/report-source-BbNkkBDy.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineAsyncComponent as a, computed as s } from "vue";
|
|
2
2
|
import { g as m } from "./report-params-B_VCihAh.js";
|
|
3
|
-
const p = "mach-report/fetcher", l = "mach-report/pdf-exporter", R = "mach-report/config", h = "mach-report/controller", d = a(() => import("./ReportPreview-
|
|
3
|
+
const p = "mach-report/fetcher", l = "mach-report/pdf-exporter", R = "mach-report/config", h = "mach-report/controller", d = a(() => import("./ReportPreview-BKKDAv8e.js").then((r) => r.C)), _ = {
|
|
4
4
|
install(r, e = {}) {
|
|
5
5
|
let t = e.fetcher;
|
|
6
6
|
if (!t && e.reports) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=Object.create;var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var m=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of p(e))!h.call(r,c)&&c!==t&&n(r,c,{get:()=>e[c],enumerable:!(o=s(e,c))||o.enumerable});return r};var C=(r,e,t)=>(t=r!=null?l(d(r)):{},m(e||!r||!r.__esModule?n(t,"default",{value:r,enumerable:!0}):t,r));const E=require("vue"),O=require("./report-params-CjWrjPl6.cjs"),_="mach-report/fetcher",f="mach-report/pdf-exporter",P="mach-report/config",u="mach-report/controller",a=E.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ReportPreview-
|
|
1
|
+
"use strict";var l=Object.create;var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var m=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of p(e))!h.call(r,c)&&c!==t&&n(r,c,{get:()=>e[c],enumerable:!(o=s(e,c))||o.enumerable});return r};var C=(r,e,t)=>(t=r!=null?l(d(r)):{},m(e||!r||!r.__esModule?n(t,"default",{value:r,enumerable:!0}):t,r));const E=require("vue"),O=require("./report-params-CjWrjPl6.cjs"),_="mach-report/fetcher",f="mach-report/pdf-exporter",P="mach-report/config",u="mach-report/controller",a=E.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ReportPreview-E3cm67Tk.cjs")).then(r=>r.ReportPreview$1)),T={install(r,e={}){let t=e.fetcher;if(!t&&e.reports){const o=e.reports;let c;t=async R=>(c??=import("@agile-team/mach-report").then(({createReportSource:i})=>i(o)),(await c)(R)),t.getParamDefs=R=>O.getReportParamDefs(o,R)}t&&r.provide(_,t),e.pdfExporter&&r.provide(f,e.pdfExporter),r.provide(P,E.computed(()=>{if(e.pdfFontUrl===void 0)return e.config??null;const o=e.config??{defaults:{},presets:{}};return{...o,defaults:{...o.defaults,pdfFontUrl:e.pdfFontUrl}}})),e.globalComponent!==!1&&!r.component("MachReportPreview")&&r.component("MachReportPreview",a)}};exports.MACH_REPORT_CONFIG_KEY=P;exports.MACH_REPORT_CONTROLLER_KEY=u;exports.MACH_REPORT_FETCHER_KEY=_;exports.MACH_REPORT_PDF_EXPORTER_KEY=f;exports.MachReportPreview=a;exports.machReportPlugin=T;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
function C(t, n) {
|
|
2
|
+
const s = t.length;
|
|
3
|
+
if (s === 0) return [];
|
|
4
|
+
const u = t.reduce((c, l) => c + l, 0), h = u > 0 && n > 0 ? n / u : 1, a = [];
|
|
5
|
+
let i = 0;
|
|
6
|
+
for (let c = 0; c < s; c++) {
|
|
7
|
+
const l = Math.max(0, t[c] * h);
|
|
8
|
+
a.push({ pos: i, size: l }), i += l;
|
|
9
|
+
}
|
|
10
|
+
return a;
|
|
11
|
+
}
|
|
12
|
+
function k(t, n, s) {
|
|
13
|
+
return t?.length ? C(t, n) : Array.from({ length: s }, (u, h) => ({
|
|
14
|
+
pos: n * h / s,
|
|
15
|
+
size: n / s
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
function B(t, n, s) {
|
|
19
|
+
const u = t.cells ?? [], h = Math.max(u.length, 1), a = t.colWidthsMm?.length ?? Math.max(1, ...u.map((o) => Array.isArray(o) ? o.length : 0)), i = k(t.colWidthsMm, n, a), c = (o) => o <= 0 ? 0 : o >= a ? i[i.length - 1].pos + i[i.length - 1].size : i[o].pos, l = k(t.rowHeightsMm, s, h), w = (o) => o <= 0 ? 0 : o >= h ? l[l.length - 1].pos + l[l.length - 1].size : l[o].pos, y = /* @__PURE__ */ new Set(), E = (o, r) => `${o}:${r}`, M = [], x = /* @__PURE__ */ new Set(), A = /* @__PURE__ */ new Set(), P = (o, r) => `v${o}:${r}`, S = (o, r) => `h${o}:${r}`;
|
|
20
|
+
u.forEach((o, r) => {
|
|
21
|
+
if (!Array.isArray(o)) return;
|
|
22
|
+
let e = 0;
|
|
23
|
+
for (const p of o) {
|
|
24
|
+
for (; e < a && y.has(E(r, e)); ) e++;
|
|
25
|
+
if (e >= a) break;
|
|
26
|
+
const L = Math.max(1, Math.min(p?.colSpan ?? 1, a - e)), T = Math.max(1, p?.rowSpan ?? 1), b = Math.min(h, r + T), m = Math.min(a, e + L);
|
|
27
|
+
for (let f = r; f < b; f++)
|
|
28
|
+
for (let d = e; d < m; d++)
|
|
29
|
+
y.add(E(f, d));
|
|
30
|
+
for (let f = e + 1; f < m; f++)
|
|
31
|
+
for (let d = r; d < b; d++) x.add(P(f, d));
|
|
32
|
+
for (let f = r + 1; f < b; f++)
|
|
33
|
+
for (let d = e; d < m; d++) A.add(S(f, d));
|
|
34
|
+
const O = c(e), $ = w(r);
|
|
35
|
+
M.push({
|
|
36
|
+
ri: r,
|
|
37
|
+
ci: e,
|
|
38
|
+
cell: p ?? {},
|
|
39
|
+
xMm: O,
|
|
40
|
+
yMm: $,
|
|
41
|
+
widthMm: c(m) - O,
|
|
42
|
+
heightMm: w(b) - $
|
|
43
|
+
}), e = m;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const v = [];
|
|
47
|
+
for (let o = 1; o < a; o++) {
|
|
48
|
+
let r = -1;
|
|
49
|
+
for (let e = 0; e <= h; e++) {
|
|
50
|
+
const p = e < h && !x.has(P(o, e));
|
|
51
|
+
p && r < 0 && (r = e), !p && r >= 0 && (v.push({ kind: "v", pos: c(o), from: w(r), to: w(e) }), r = -1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
for (let o = 1; o < h; o++) {
|
|
55
|
+
let r = -1;
|
|
56
|
+
for (let e = 0; e <= a; e++) {
|
|
57
|
+
const p = e < a && !A.has(S(o, e));
|
|
58
|
+
p && r < 0 && (r = e), !p && r >= 0 && (v.push({ kind: "h", pos: w(o), from: c(r), to: c(e) }), r = -1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return { columns: i, rows: l, cells: M, edges: v };
|
|
62
|
+
}
|
|
63
|
+
function g(t) {
|
|
64
|
+
if (t?.aborted) throw t.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
65
|
+
}
|
|
66
|
+
function D(t, n, s) {
|
|
67
|
+
g(t.signal);
|
|
68
|
+
try {
|
|
69
|
+
t.onProgress?.(n, s);
|
|
70
|
+
} catch {
|
|
71
|
+
}
|
|
72
|
+
g(t.signal);
|
|
73
|
+
}
|
|
74
|
+
function K(t, n) {
|
|
75
|
+
const s = Promise.resolve(t);
|
|
76
|
+
return n?.aborted ? (s.catch(() => {
|
|
77
|
+
}), Promise.reject(n.reason ?? new DOMException("The operation was aborted.", "AbortError"))) : n ? new Promise((u, h) => {
|
|
78
|
+
const a = () => n.removeEventListener("abort", i), i = () => {
|
|
79
|
+
a(), h(n.reason ?? new DOMException("The operation was aborted.", "AbortError"));
|
|
80
|
+
};
|
|
81
|
+
n.addEventListener("abort", i, { once: !0 }), s.then((c) => {
|
|
82
|
+
a(), u(c);
|
|
83
|
+
}, (c) => {
|
|
84
|
+
a(), h(c);
|
|
85
|
+
}), n.aborted && i();
|
|
86
|
+
}) : s;
|
|
87
|
+
}
|
|
88
|
+
function W(t, n) {
|
|
89
|
+
const s = () => n.abort(t?.reason);
|
|
90
|
+
return t?.addEventListener("abort", s, { once: !0 }), t?.aborted && s(), () => t?.removeEventListener("abort", s);
|
|
91
|
+
}
|
|
92
|
+
async function z(t, n, s) {
|
|
93
|
+
D(t, n, s), (t.signal || t.onProgress) && await new Promise((u) => setTimeout(u, 0)), g(t.signal);
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
g as a,
|
|
97
|
+
W as f,
|
|
98
|
+
D as n,
|
|
99
|
+
z as o,
|
|
100
|
+
B as r,
|
|
101
|
+
K as w
|
|
102
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function D(t,n){const s=t.length;if(s===0)return[];const h=t.reduce((a,l)=>a+l,0),u=h>0&&n>0?n/h:1,c=[];let i=0;for(let a=0;a<s;a++){const l=Math.max(0,t[a]*u);c.push({pos:i,size:l}),i+=l}return c}function L(t,n,s){return t?.length?D(t,n):Array.from({length:s},(h,u)=>({pos:n*u/s,size:n/s}))}function B(t,n,s){const h=t.cells??[],u=Math.max(h.length,1),c=t.colWidthsMm?.length??Math.max(1,...h.map(o=>Array.isArray(o)?o.length:0)),i=L(t.colWidthsMm,n,c),a=o=>o<=0?0:o>=c?i[i.length-1].pos+i[i.length-1].size:i[o].pos,l=L(t.rowHeightsMm,s,u),w=o=>o<=0?0:o>=u?l[l.length-1].pos+l[l.length-1].size:l[o].pos,g=new Set,A=(o,r)=>`${o}:${r}`,E=[],M=new Set,O=new Set,x=(o,r)=>`v${o}:${r}`,P=(o,r)=>`h${o}:${r}`;h.forEach((o,r)=>{if(!Array.isArray(o))return;let e=0;for(const p of o){for(;e<c&&g.has(A(r,e));)e++;if(e>=c)break;const C=Math.max(1,Math.min(p?.colSpan??1,c-e)),T=Math.max(1,p?.rowSpan??1),b=Math.min(u,r+T),m=Math.min(c,e+C);for(let f=r;f<b;f++)for(let d=e;d<m;d++)g.add(A(f,d));for(let f=e+1;f<m;f++)for(let d=r;d<b;d++)M.add(x(f,d));for(let f=r+1;f<b;f++)for(let d=e;d<m;d++)O.add(P(f,d));const S=a(e),k=w(r);E.push({ri:r,ci:e,cell:p??{},xMm:S,yMm:k,widthMm:a(m)-S,heightMm:w(b)-k}),e=m}});const y=[];for(let o=1;o<c;o++){let r=-1;for(let e=0;e<=u;e++){const p=e<u&&!M.has(x(o,e));p&&r<0&&(r=e),!p&&r>=0&&(y.push({kind:"v",pos:a(o),from:w(r),to:w(e)}),r=-1)}}for(let o=1;o<u;o++){let r=-1;for(let e=0;e<=c;e++){const p=e<c&&!O.has(P(o,e));p&&r<0&&(r=e),!p&&r>=0&&(y.push({kind:"h",pos:w(o),from:a(r),to:a(e)}),r=-1)}}return{columns:i,rows:l,cells:E,edges:y}}function v(t){if(t?.aborted)throw t.reason??new DOMException("The operation was aborted.","AbortError")}function $(t,n,s){v(t.signal);try{t.onProgress?.(n,s)}catch{}v(t.signal)}function F(t,n){const s=Promise.resolve(t);return n?.aborted?(s.catch(()=>{}),Promise.reject(n.reason??new DOMException("The operation was aborted.","AbortError"))):n?new Promise((h,u)=>{const c=()=>n.removeEventListener("abort",i),i=()=>{c(),u(n.reason??new DOMException("The operation was aborted.","AbortError"))};n.addEventListener("abort",i,{once:!0}),s.then(a=>{c(),h(a)},a=>{c(),u(a)}),n.aborted&&i()}):s}function G(t,n){const s=()=>n.abort(t?.reason);return t?.addEventListener("abort",s,{once:!0}),t?.aborted&&s(),()=>t?.removeEventListener("abort",s)}async function K(t,n,s){$(t,n,s),(t.signal||t.onProgress)&&await new Promise(h=>setTimeout(h,0)),v(t.signal)}exports.assertOutputActive=v;exports.forwardOutputAbort=G;exports.notifyOutputProgress=$;exports.outputCheckpoint=K;exports.resolveGridLayout=B;exports.waitForOutput=F;
|