@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
package/dist/vue-async.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-BkK2mm_p.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-DJvv3h8m.cjs")).then(e=>e.ReportPreview$1)}const t={install(e,o={}){r.machReportPlugin.install(e,o)}};exports.MachReportPreview=r.MachReportPreview;exports.default=t;exports.machReportAsyncPlugin=t;exports.preloadMachReport=i;
|
package/dist/vue-async.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { m as o } from "./plugin-
|
|
2
|
-
import { M as l } from "./plugin-
|
|
1
|
+
import { m as o } from "./plugin-DRnvIbdP.js";
|
|
2
|
+
import { M as l } from "./plugin-DRnvIbdP.js";
|
|
3
3
|
function a() {
|
|
4
|
-
return import("./ReportPreview-
|
|
4
|
+
return import("./ReportPreview-CL9J9MEE.js").then((t) => t.s);
|
|
5
5
|
}
|
|
6
6
|
const n = {
|
|
7
7
|
install(t, r = {}) {
|
package/dist/vue.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@agile-team/mach-report"),e=require("./ReportPreview-DJvv3h8m.cjs"),c=require("./plugin-BkK2mm_p.cjs"),u=require("vue");function p(o){const r=s.createReportSource(o),i=async n=>{if(n.reportIds.length===0)throw new e.PlanLoadError("缺少报表 ID");for(const t of n.reportIds)if(!Object.prototype.hasOwnProperty.call(o,t)||!o[t])throw new e.PlanLoadError(`本地模板 ${t} 不存在`);return r(n)};return i.getParamDefs=r.getParamDefs,i}const f=Object.freeze({loading:!1,hasPlan:!1,pageCount:0,currentPage:1,exporting:null,printing:!1,canExport:!1,canPrint:!1,error:null,pdfFont:Object.freeze({status:"unchecked",fontUrl:""})});function P(){const o=u.shallowRef(null),r=()=>o.value?.state??f,i=Object.freeze({get loading(){return r().loading},get hasPlan(){return r().hasPlan},get pageCount(){return r().pageCount},get currentPage(){return r().currentPage},get exporting(){return r().exporting},get printing(){return r().printing},get canExport(){return r().canExport},get canPrint(){return r().canPrint},get error(){return r().error},get pdfFont(){return r().pdfFont},get editing(){return r().editing??!1},get saving(){return r().saving??!1},get importing(){return r().importing??!1},get dirty(){return r().dirty??!1}});function n(){if(!o.value)throw new e.MachReportError("config","报表预览尚未挂载,请在 ready 后调用控制器");return o.value}return{ref(t){const a=t;o.value=a&&typeof a.reload=="function"&&typeof a.print=="function"&&typeof a.exportAs=="function"&&typeof a.openPdfWindow=="function"&&typeof a.gotoPage=="function"&&typeof a.setParams=="function"?a:null},ready:u.computed(()=>o.value!==null),state:i,async checkPdfFont(){const t=n();return t.checkPdfFont?t.checkPdfFont():{status:"unverified",fontUrl:"",message:"旧自定义控制器未提供字体检查,请由宿主确认字体配置"}},async reload(){await n().reload()},async print(){await n().print()},async exportAs(t){await n().exportAs(t)},openPdfWindow(){n().openPdfWindow()},gotoPage(t){n().gotoPage(t)},async setParams(t,a){await n().setParams(t,a)},async importExcel(t,a){const l=n();if(!l.importExcel)throw new e.MachReportError("config","旧自定义控制器未提供 Excel 导入");return l.importExcel(t,a)},getPlan(){return n().getPlan?.()??null},getChanges(){return n().getChanges?.()??[]}}}function g(){return u.inject(c.MACH_REPORT_CONTROLLER_KEY,null)}exports.DEFAULT_MESSAGES=e.DEFAULT_MESSAGES;exports.DEFAULT_THEME=e.DEFAULT_THEME;exports.MachReportError=e.MachReportError;exports.PlanLoadError=e.PlanLoadError;exports.ReportParamPanel=e.ReportParamPanel;exports.ReportPreview=e.ReportPreview;exports.ReportToolbar=e.ReportToolbar;exports.SILENT_LOGGER=e.SILENT_LOGGER;exports.buildPrintDocument=e.buildPrintDocument;exports.buildWordHtml=e.buildWordHtml;exports.createDefaultPdfExporter=e.createDefaultPdfExporter;exports.createFetchRequest=e.createFetchRequest;exports.defineMachReportConfig=e.defineMachReportConfig;exports.defineMachReportPreset=e.defineMachReportPreset;exports.joinReportIds=e.joinReportIds;exports.normalizeReportIds=e.normalizeReportIds;exports.printPlans=e.printPlans;exports.provideMachReportConfig=e.provideMachReportConfig;exports.resolveConfig=e.resolveConfig;exports.themeToCssVars=e.themeToCssVars;exports.toErrorDetail=e.toErrorDetail;exports.useMachReportConfig=e.useMachReportConfig;exports.usePageWindow=e.usePageWindow;exports.usePrintExport=e.usePrintExport;exports.useZoom=e.useZoom;exports.MACH_REPORT_CONFIG_KEY=c.MACH_REPORT_CONFIG_KEY;exports.MACH_REPORT_CONTROLLER_KEY=c.MACH_REPORT_CONTROLLER_KEY;exports.MACH_REPORT_FETCHER_KEY=c.MACH_REPORT_FETCHER_KEY;exports.MACH_REPORT_PDF_EXPORTER_KEY=c.MACH_REPORT_PDF_EXPORTER_KEY;exports.MachReportPreview=c.MachReportPreview;exports.machReportPlugin=c.machReportPlugin;exports.createLocalFetcher=p;exports.useMachReport=P;exports.useReportPreview=g;Object.keys(s).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(exports,o)&&Object.defineProperty(exports,o,{enumerable:!0,get:()=>s[o]})});
|
package/dist/vue.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createReportSource as
|
|
1
|
+
import { createReportSource as u } from "@agile-team/mach-report";
|
|
2
2
|
export * from "@agile-team/mach-report";
|
|
3
|
-
import { P as
|
|
4
|
-
import { D as M, a as T, R as
|
|
5
|
-
import { a as f } from "./plugin-
|
|
6
|
-
import { b as
|
|
7
|
-
import { shallowRef as
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
if (r.reportIds.length === 0) throw new
|
|
11
|
-
for (const
|
|
12
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
13
|
-
throw new
|
|
14
|
-
return
|
|
3
|
+
import { P as i, M as c } from "./ReportPreview-CL9J9MEE.js";
|
|
4
|
+
import { D as M, a as T, R as O, b as v, c as F, S as A, d as D, e as b, f as L, g as S, h as j, i as H, j as I, n as k, p as W, k as Y, r as z, t as G, l as K, u as U, m as N, o as q, q as V } from "./ReportPreview-CL9J9MEE.js";
|
|
5
|
+
import { a as f } from "./plugin-DRnvIbdP.js";
|
|
6
|
+
import { b as Z, c as $, d as B, M as J, m as Q } from "./plugin-DRnvIbdP.js";
|
|
7
|
+
import { shallowRef as l, computed as p, inject as g } from "vue";
|
|
8
|
+
function h(o) {
|
|
9
|
+
const e = u(o), a = async (r) => {
|
|
10
|
+
if (r.reportIds.length === 0) throw new i("缺少报表 ID");
|
|
11
|
+
for (const t of r.reportIds)
|
|
12
|
+
if (!Object.prototype.hasOwnProperty.call(o, t) || !o[t])
|
|
13
|
+
throw new i(`本地模板 ${t} 不存在`);
|
|
14
|
+
return e(r);
|
|
15
15
|
};
|
|
16
|
-
return a.getParamDefs =
|
|
16
|
+
return a.getParamDefs = e.getParamDefs, a;
|
|
17
17
|
}
|
|
18
18
|
const P = Object.freeze({
|
|
19
19
|
loading: !1,
|
|
@@ -27,54 +27,66 @@ const P = Object.freeze({
|
|
|
27
27
|
error: null,
|
|
28
28
|
pdfFont: Object.freeze({ status: "unchecked", fontUrl: "" })
|
|
29
29
|
});
|
|
30
|
-
function
|
|
31
|
-
const
|
|
30
|
+
function w() {
|
|
31
|
+
const o = l(null), e = () => o.value?.state ?? P, a = Object.freeze({
|
|
32
32
|
get loading() {
|
|
33
|
-
return
|
|
33
|
+
return e().loading;
|
|
34
34
|
},
|
|
35
35
|
get hasPlan() {
|
|
36
|
-
return
|
|
36
|
+
return e().hasPlan;
|
|
37
37
|
},
|
|
38
38
|
get pageCount() {
|
|
39
|
-
return
|
|
39
|
+
return e().pageCount;
|
|
40
40
|
},
|
|
41
41
|
get currentPage() {
|
|
42
|
-
return
|
|
42
|
+
return e().currentPage;
|
|
43
43
|
},
|
|
44
44
|
get exporting() {
|
|
45
|
-
return
|
|
45
|
+
return e().exporting;
|
|
46
46
|
},
|
|
47
47
|
get printing() {
|
|
48
|
-
return
|
|
48
|
+
return e().printing;
|
|
49
49
|
},
|
|
50
50
|
get canExport() {
|
|
51
|
-
return
|
|
51
|
+
return e().canExport;
|
|
52
52
|
},
|
|
53
53
|
get canPrint() {
|
|
54
|
-
return
|
|
54
|
+
return e().canPrint;
|
|
55
55
|
},
|
|
56
56
|
get error() {
|
|
57
|
-
return
|
|
57
|
+
return e().error;
|
|
58
58
|
},
|
|
59
59
|
get pdfFont() {
|
|
60
|
-
return
|
|
60
|
+
return e().pdfFont;
|
|
61
|
+
},
|
|
62
|
+
get editing() {
|
|
63
|
+
return e().editing ?? !1;
|
|
64
|
+
},
|
|
65
|
+
get saving() {
|
|
66
|
+
return e().saving ?? !1;
|
|
67
|
+
},
|
|
68
|
+
get importing() {
|
|
69
|
+
return e().importing ?? !1;
|
|
70
|
+
},
|
|
71
|
+
get dirty() {
|
|
72
|
+
return e().dirty ?? !1;
|
|
61
73
|
}
|
|
62
74
|
});
|
|
63
75
|
function r() {
|
|
64
|
-
if (!
|
|
65
|
-
throw new
|
|
66
|
-
return
|
|
76
|
+
if (!o.value)
|
|
77
|
+
throw new c("config", "报表预览尚未挂载,请在 ready 后调用控制器");
|
|
78
|
+
return o.value;
|
|
67
79
|
}
|
|
68
80
|
return {
|
|
69
|
-
ref(
|
|
70
|
-
const
|
|
71
|
-
|
|
81
|
+
ref(t) {
|
|
82
|
+
const n = t;
|
|
83
|
+
o.value = n && typeof n.reload == "function" && typeof n.print == "function" && typeof n.exportAs == "function" && typeof n.openPdfWindow == "function" && typeof n.gotoPage == "function" && typeof n.setParams == "function" ? n : null;
|
|
72
84
|
},
|
|
73
|
-
ready: p(() =>
|
|
85
|
+
ready: p(() => o.value !== null),
|
|
74
86
|
state: a,
|
|
75
87
|
async checkPdfFont() {
|
|
76
|
-
const
|
|
77
|
-
return
|
|
88
|
+
const t = r();
|
|
89
|
+
return t.checkPdfFont ? t.checkPdfFont() : { status: "unverified", fontUrl: "", message: "旧自定义控制器未提供字体检查,请由宿主确认字体配置" };
|
|
78
90
|
},
|
|
79
91
|
async reload() {
|
|
80
92
|
await r().reload();
|
|
@@ -82,56 +94,67 @@ function h() {
|
|
|
82
94
|
async print() {
|
|
83
95
|
await r().print();
|
|
84
96
|
},
|
|
85
|
-
async exportAs(
|
|
86
|
-
await r().exportAs(
|
|
97
|
+
async exportAs(t) {
|
|
98
|
+
await r().exportAs(t);
|
|
87
99
|
},
|
|
88
100
|
openPdfWindow() {
|
|
89
101
|
r().openPdfWindow();
|
|
90
102
|
},
|
|
91
|
-
gotoPage(
|
|
92
|
-
r().gotoPage(
|
|
103
|
+
gotoPage(t) {
|
|
104
|
+
r().gotoPage(t);
|
|
93
105
|
},
|
|
94
|
-
async setParams(
|
|
95
|
-
await r().setParams(
|
|
106
|
+
async setParams(t, n) {
|
|
107
|
+
await r().setParams(t, n);
|
|
108
|
+
},
|
|
109
|
+
async importExcel(t, n) {
|
|
110
|
+
const s = r();
|
|
111
|
+
if (!s.importExcel) throw new c("config", "旧自定义控制器未提供 Excel 导入");
|
|
112
|
+
return s.importExcel(t, n);
|
|
113
|
+
},
|
|
114
|
+
getPlan() {
|
|
115
|
+
return r().getPlan?.() ?? null;
|
|
116
|
+
},
|
|
117
|
+
getChanges() {
|
|
118
|
+
return r().getChanges?.() ?? [];
|
|
96
119
|
}
|
|
97
120
|
};
|
|
98
121
|
}
|
|
99
|
-
function
|
|
100
|
-
return
|
|
122
|
+
function x() {
|
|
123
|
+
return g(f, null);
|
|
101
124
|
}
|
|
102
125
|
export {
|
|
103
126
|
M as DEFAULT_MESSAGES,
|
|
104
127
|
T as DEFAULT_THEME,
|
|
105
|
-
|
|
128
|
+
Z as MACH_REPORT_CONFIG_KEY,
|
|
106
129
|
f as MACH_REPORT_CONTROLLER_KEY,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
130
|
+
$ as MACH_REPORT_FETCHER_KEY,
|
|
131
|
+
B as MACH_REPORT_PDF_EXPORTER_KEY,
|
|
132
|
+
c as MachReportError,
|
|
133
|
+
J as MachReportPreview,
|
|
134
|
+
i as PlanLoadError,
|
|
135
|
+
O as ReportParamPanel,
|
|
136
|
+
v as ReportPreview,
|
|
114
137
|
F as ReportToolbar,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
A as SILENT_LOGGER,
|
|
139
|
+
D as buildPrintDocument,
|
|
140
|
+
b as buildWordHtml,
|
|
141
|
+
L as createDefaultPdfExporter,
|
|
142
|
+
S as createFetchRequest,
|
|
143
|
+
h as createLocalFetcher,
|
|
144
|
+
j as defineMachReportConfig,
|
|
145
|
+
H as defineMachReportPreset,
|
|
146
|
+
I as joinReportIds,
|
|
147
|
+
Q as machReportPlugin,
|
|
148
|
+
k as normalizeReportIds,
|
|
149
|
+
W as printPlans,
|
|
150
|
+
Y as provideMachReportConfig,
|
|
151
|
+
z as resolveConfig,
|
|
152
|
+
G as themeToCssVars,
|
|
153
|
+
K as toErrorDetail,
|
|
154
|
+
w as useMachReport,
|
|
155
|
+
U as useMachReportConfig,
|
|
156
|
+
N as usePageWindow,
|
|
157
|
+
q as usePrintExport,
|
|
158
|
+
x as useReportPreview,
|
|
159
|
+
V as useZoom
|
|
137
160
|
};
|