@agile-team/mach-report 0.7.0 → 0.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/dist/ReportPreview-BQE0C_37.cjs +6 -0
- package/dist/ReportPreview-D8X75aLV.js +825 -0
- package/dist/format.d.ts +35 -0
- package/dist/grid-geometry-BXpOxznT.cjs +1 -0
- package/dist/grid-geometry-Bs8QXz1X.js +65 -0
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +839 -655
- package/dist/layout/paginate.d.ts +29 -0
- package/dist/pdf.cjs +46 -46
- package/dist/pdf.js +8 -7
- package/dist/{plugin-Cl-IqCqx.cjs → plugin-7W2Zy3Xc.cjs} +1 -1
- package/dist/{plugin-Dp3kKWiQ.js → plugin-Bc6Px9Lq.js} +3 -3
- package/dist/style-6ihHKVCM.js +192 -0
- package/dist/style-Xq08-IsV.cjs +3 -0
- package/dist/style.css +1 -1
- package/dist/vue/ReportPreview.d.ts +13 -0
- package/dist/vue/ReportToolbar.d.ts +15 -0
- package/dist/vue/async.d.cts +16 -0
- package/dist/vue/async.d.ts +16 -0
- package/dist/vue/composables/useHighlight.d.ts +8 -0
- package/dist/vue/composables/usePrintExport.d.ts +7 -0
- package/dist/vue/config.d.ts +9 -0
- package/dist/vue/plugin.d.ts +16 -0
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +24 -23
- package/dist/xlsx/render-xlsx.d.ts +20 -0
- package/dist/xlsx.cjs +30 -0
- package/dist/xlsx.d.cts +5 -0
- package/dist/xlsx.d.ts +5 -0
- package/dist/xlsx.js +22647 -0
- package/package.json +13 -2
- package/dist/ReportPreview-CrVeTKu1.cjs +0 -6
- package/dist/ReportPreview-DgsOdO4y.js +0 -559
- package/dist/style-B3vxGDZd.cjs +0 -3
- package/dist/style-B7Xfo5I-.js +0 -255
package/dist/vue.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { D as g, a as T, M as _, R as M, b as d, c as C, d as w, e as D, p as F,
|
|
2
|
-
import { P as
|
|
3
|
-
import { a as
|
|
1
|
+
import { D as g, a as T, M as _, R as M, b as d, c as C, d as w, e as D, p as F, f as O, r as A, t as H, g as L, u as j, h as v, i as x, j as b } from "./ReportPreview-D8X75aLV.js";
|
|
2
|
+
import { P as t, M as c } from "./plugin-Bc6Px9Lq.js";
|
|
3
|
+
import { a as Y, b as G, c as I, d as S, e as y, f as N, g as U, j as V, m as q, n as z } from "./plugin-Bc6Px9Lq.js";
|
|
4
4
|
import { paginateTemplate as p } from "@agile-team/mach-report";
|
|
5
5
|
import { inject as R } from "vue";
|
|
6
6
|
function h(n) {
|
|
7
7
|
return async ({ tempIds: a }) => {
|
|
8
|
-
if (a.length === 0) throw new
|
|
8
|
+
if (a.length === 0) throw new t("缺少报表模板 ID");
|
|
9
9
|
const r = [];
|
|
10
10
|
for (const o of a) {
|
|
11
11
|
const e = n[o];
|
|
12
|
-
if (!e) throw new
|
|
13
|
-
const { plan: i, warnings:
|
|
14
|
-
|
|
12
|
+
if (!e) throw new t(`本地模板 ${o} 不存在`);
|
|
13
|
+
const { plan: i, warnings: s } = p(e.template, e.datasets ?? {});
|
|
14
|
+
s.length > 0 && console.warn("[mach-report] 分页告警:", s), r.push(...i.pages);
|
|
15
15
|
}
|
|
16
16
|
return { schemaVersion: "mach-local", pages: r };
|
|
17
17
|
};
|
|
@@ -22,30 +22,31 @@ function m() {
|
|
|
22
22
|
export {
|
|
23
23
|
g as DEFAULT_MESSAGES,
|
|
24
24
|
T as DEFAULT_THEME,
|
|
25
|
-
|
|
25
|
+
Y as MACH_REPORT_CONFIG_KEY,
|
|
26
26
|
c as MACH_REPORT_CONTROLLER_KEY,
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
G as MACH_REPORT_FETCHER_KEY,
|
|
28
|
+
I as MACH_REPORT_PDF_EXPORTER_KEY,
|
|
29
29
|
_ as MachReportError,
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
S as MachReportPreview,
|
|
31
|
+
t as PlanLoadError,
|
|
32
32
|
M as ReportPreview,
|
|
33
33
|
d as ReportToolbar,
|
|
34
34
|
C as buildPrintDocument,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
y as createDefaultPdfExporter,
|
|
36
|
+
N as createFetchRequest,
|
|
37
|
+
U as createJh4jGridPlanFetcher,
|
|
38
38
|
h as createLocalFetcher,
|
|
39
39
|
w as defineMachReportConfig,
|
|
40
40
|
D as defineMachReportPreset,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
F as
|
|
45
|
-
O as
|
|
46
|
-
A as
|
|
47
|
-
H as
|
|
48
|
-
L as
|
|
41
|
+
V as joinTempIds,
|
|
42
|
+
q as machReportPlugin,
|
|
43
|
+
z as normalizeTempIds,
|
|
44
|
+
F as printPlans,
|
|
45
|
+
O as provideMachReportConfig,
|
|
46
|
+
A as resolveConfig,
|
|
47
|
+
H as themeToCssVars,
|
|
48
|
+
L as toErrorDetail,
|
|
49
|
+
j as useMachReportConfig,
|
|
49
50
|
v as usePageWindow,
|
|
50
51
|
x as usePrintExport,
|
|
51
52
|
m as useReportPreview,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as ExcelJS } from 'exceljs';
|
|
2
|
+
import { RenderPlan } from '../schema/render-plan';
|
|
3
|
+
/**
|
|
4
|
+
* RenderPlan → xlsx 导出(B 端第二出口,对齐家族 @agile-team/mach-table-xlsx 路线):
|
|
5
|
+
* - 网格组件 → 真表格:列宽(mm→Excel 宽度)、行高(mm→pt)、colSpan/rowSpan 合并、
|
|
6
|
+
* 加粗/对齐/底色/字号直译(resolveGridLayout 复用单真相源几何)
|
|
7
|
+
* - 文本组件 → 合并标题行(顺序流式输出,保字号/加粗/对齐;非像素级定位,
|
|
8
|
+
* 目标是"财务能直接用的对账表"而非复刻版面)
|
|
9
|
+
* - 图片/条码/图表跳过并计入 warnings(与 PDF 保真告警同口径)
|
|
10
|
+
*/
|
|
11
|
+
export interface XlsxRenderOptions {
|
|
12
|
+
/** 工作表命名(默认 "Sheet1" 起序) */
|
|
13
|
+
sheetName?: (pageIndex: number) => string;
|
|
14
|
+
}
|
|
15
|
+
export interface XlsxRenderResult {
|
|
16
|
+
workbook: ExcelJS.Workbook;
|
|
17
|
+
buffer: ExcelJS.Buffer;
|
|
18
|
+
warnings: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function renderPlanToXlsx(plan: RenderPlan, options?: XlsxRenderOptions): Promise<XlsxRenderResult>;
|