@agile-team/mach-report 0.6.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 +811 -606
- package/dist/layout/paginate.d.ts +29 -0
- package/dist/pdf.cjs +46 -46
- package/dist/pdf.js +12 -11
- package/dist/plugin-7W2Zy3Xc.cjs +1 -0
- package/dist/plugin-Bc6Px9Lq.js +92 -0
- 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 +40 -3
- package/dist/vue/ReportToolbar.d.ts +15 -0
- package/dist/vue/adapters.d.ts +3 -0
- package/dist/vue/async.d.cts +209 -64
- package/dist/vue/async.d.ts +209 -64
- 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/controller.d.ts +24 -0
- package/dist/vue/errors.d.ts +16 -0
- package/dist/vue/index.d.cts +2 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/injection-keys.d.ts +2 -0
- package/dist/vue/plugin.d.ts +278 -2
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +39 -29
- 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-DWLjYi_p.js +0 -527
- package/dist/ReportPreview-rBtmbu3W.cjs +0 -6
- package/dist/plugin-BIJxGHZX.cjs +0 -1
- package/dist/plugin-DrV67_VW.js +0 -89
- package/dist/style-B3vxGDZd.cjs +0 -3
- package/dist/style-B7Xfo5I-.js +0 -255
package/dist/vue/async.d.cts
CHANGED
|
@@ -1,19 +1,199 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MachReportPluginOptions } from './plugin';
|
|
2
2
|
/**
|
|
3
|
-
* 异步插件入口(@agile-team/mach-report
|
|
3
|
+
* 异步插件入口(@agile-team/mach-report/vue/async):
|
|
4
4
|
*
|
|
5
5
|
* 首屏敏感页面用异步全局组件代替静态 import——组件与其引擎依赖
|
|
6
6
|
* 拆为独立 chunk,路由级按需加载:
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
|
-
* import AsyncMachReportPlugin, { preloadMachReport } from "@agile-team/mach-report
|
|
9
|
+
* import AsyncMachReportPlugin, { preloadMachReport } from "@agile-team/mach-report/vue/async";
|
|
10
10
|
* app.use(AsyncMachReportPlugin, { baseUrl: "/sub/mach-report" });
|
|
11
11
|
* void preloadMachReport(); // 可选:路由 hover 时预取
|
|
12
12
|
* // 模板:<MachReportPreview temp-id="X" />
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
/** 全局异步组件(懒加载 ReportPreview
|
|
16
|
-
export declare const MachReportPreview:
|
|
15
|
+
/** 全局异步组件(懒加载 ReportPreview 及其引擎分片;与主插件同源共享) */
|
|
16
|
+
export declare const MachReportPreview: {
|
|
17
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
+
tempId: {
|
|
19
|
+
type: import('vue').PropType<string | string[] | null>;
|
|
20
|
+
default: null;
|
|
21
|
+
};
|
|
22
|
+
furnitureTempId: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
params: {
|
|
27
|
+
type: import('vue').PropType<Record<string, string>>;
|
|
28
|
+
default: () => {};
|
|
29
|
+
};
|
|
30
|
+
height: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
autoLoad: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
showExport: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
showPrint: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
showPdfWindow: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
gapPx: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
messages: {
|
|
55
|
+
type: import('vue').PropType<Partial<import('./config').MachReportMessages>>;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
preset: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
debug: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
fetcher: {
|
|
67
|
+
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
68
|
+
default: null;
|
|
69
|
+
};
|
|
70
|
+
}>> & Readonly<{
|
|
71
|
+
onError?: ((message: string, detail?: {
|
|
72
|
+
code: string;
|
|
73
|
+
cause?: unknown;
|
|
74
|
+
} | undefined) => any) | undefined;
|
|
75
|
+
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
76
|
+
}>, {
|
|
77
|
+
reload: () => Promise<void>;
|
|
78
|
+
print: () => Promise<void>;
|
|
79
|
+
exportAs: (format: string) => void;
|
|
80
|
+
openPdfWindow: () => void;
|
|
81
|
+
gotoPage: (n: number) => void;
|
|
82
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
83
|
+
error: (message: string, detail?: {
|
|
84
|
+
code: string;
|
|
85
|
+
cause?: unknown;
|
|
86
|
+
} | undefined) => any;
|
|
87
|
+
loaded: (pageCount: number) => any;
|
|
88
|
+
}, import('vue').PublicProps, {
|
|
89
|
+
height: string;
|
|
90
|
+
gapPx: number;
|
|
91
|
+
params: Record<string, string>;
|
|
92
|
+
furnitureTempId: string;
|
|
93
|
+
tempId: string | string[] | null;
|
|
94
|
+
showExport: boolean;
|
|
95
|
+
showPrint: boolean;
|
|
96
|
+
showPdfWindow: boolean;
|
|
97
|
+
messages: Partial<import('./config').MachReportMessages>;
|
|
98
|
+
autoLoad: boolean;
|
|
99
|
+
preset: string;
|
|
100
|
+
debug: boolean;
|
|
101
|
+
fetcher: import('./adapters').PlanFetcher | null;
|
|
102
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
103
|
+
viewportRef: HTMLDivElement;
|
|
104
|
+
containerRef: HTMLDivElement;
|
|
105
|
+
thumbsRef: HTMLElement;
|
|
106
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
107
|
+
P: {};
|
|
108
|
+
B: {};
|
|
109
|
+
D: {};
|
|
110
|
+
C: {};
|
|
111
|
+
M: {};
|
|
112
|
+
Defaults: {};
|
|
113
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
114
|
+
tempId: {
|
|
115
|
+
type: import('vue').PropType<string | string[] | null>;
|
|
116
|
+
default: null;
|
|
117
|
+
};
|
|
118
|
+
furnitureTempId: {
|
|
119
|
+
type: StringConstructor;
|
|
120
|
+
default: string;
|
|
121
|
+
};
|
|
122
|
+
params: {
|
|
123
|
+
type: import('vue').PropType<Record<string, string>>;
|
|
124
|
+
default: () => {};
|
|
125
|
+
};
|
|
126
|
+
height: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
default: string;
|
|
129
|
+
};
|
|
130
|
+
autoLoad: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
default: boolean;
|
|
133
|
+
};
|
|
134
|
+
showExport: {
|
|
135
|
+
type: BooleanConstructor;
|
|
136
|
+
default: undefined;
|
|
137
|
+
};
|
|
138
|
+
showPrint: {
|
|
139
|
+
type: BooleanConstructor;
|
|
140
|
+
default: undefined;
|
|
141
|
+
};
|
|
142
|
+
showPdfWindow: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: undefined;
|
|
145
|
+
};
|
|
146
|
+
gapPx: {
|
|
147
|
+
type: NumberConstructor;
|
|
148
|
+
default: undefined;
|
|
149
|
+
};
|
|
150
|
+
messages: {
|
|
151
|
+
type: import('vue').PropType<Partial<import('./config').MachReportMessages>>;
|
|
152
|
+
default: undefined;
|
|
153
|
+
};
|
|
154
|
+
preset: {
|
|
155
|
+
type: StringConstructor;
|
|
156
|
+
default: undefined;
|
|
157
|
+
};
|
|
158
|
+
debug: {
|
|
159
|
+
type: BooleanConstructor;
|
|
160
|
+
default: boolean;
|
|
161
|
+
};
|
|
162
|
+
fetcher: {
|
|
163
|
+
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
164
|
+
default: null;
|
|
165
|
+
};
|
|
166
|
+
}>> & Readonly<{
|
|
167
|
+
onError?: ((message: string, detail?: {
|
|
168
|
+
code: string;
|
|
169
|
+
cause?: unknown;
|
|
170
|
+
} | undefined) => any) | undefined;
|
|
171
|
+
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
172
|
+
}>, {
|
|
173
|
+
reload: () => Promise<void>;
|
|
174
|
+
print: () => Promise<void>;
|
|
175
|
+
exportAs: (format: string) => void;
|
|
176
|
+
openPdfWindow: () => void;
|
|
177
|
+
gotoPage: (n: number) => void;
|
|
178
|
+
}, {}, {}, {}, {
|
|
179
|
+
height: string;
|
|
180
|
+
gapPx: number;
|
|
181
|
+
params: Record<string, string>;
|
|
182
|
+
furnitureTempId: string;
|
|
183
|
+
tempId: string | string[] | null;
|
|
184
|
+
showExport: boolean;
|
|
185
|
+
showPrint: boolean;
|
|
186
|
+
showPdfWindow: boolean;
|
|
187
|
+
messages: Partial<import('./config').MachReportMessages>;
|
|
188
|
+
autoLoad: boolean;
|
|
189
|
+
preset: string;
|
|
190
|
+
debug: boolean;
|
|
191
|
+
fetcher: import('./adapters').PlanFetcher | null;
|
|
192
|
+
}>;
|
|
193
|
+
__isFragment?: never;
|
|
194
|
+
__isTeleport?: never;
|
|
195
|
+
__isSuspense?: never;
|
|
196
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
17
197
|
tempId: {
|
|
18
198
|
type: import('vue').PropType<string | string[] | null>;
|
|
19
199
|
default: null;
|
|
@@ -58,10 +238,20 @@ export declare const MachReportPreview: import('vue').DefineComponent<import('vu
|
|
|
58
238
|
type: StringConstructor;
|
|
59
239
|
default: undefined;
|
|
60
240
|
};
|
|
241
|
+
debug: {
|
|
242
|
+
type: BooleanConstructor;
|
|
243
|
+
default: boolean;
|
|
244
|
+
};
|
|
61
245
|
fetcher: {
|
|
62
246
|
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
63
247
|
default: null;
|
|
64
248
|
};
|
|
249
|
+
}>> & Readonly<{
|
|
250
|
+
onError?: ((message: string, detail?: {
|
|
251
|
+
code: string;
|
|
252
|
+
cause?: unknown;
|
|
253
|
+
} | undefined) => any) | undefined;
|
|
254
|
+
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
65
255
|
}>, {
|
|
66
256
|
reload: () => Promise<void>;
|
|
67
257
|
print: () => Promise<void>;
|
|
@@ -69,61 +259,12 @@ export declare const MachReportPreview: import('vue').DefineComponent<import('vu
|
|
|
69
259
|
openPdfWindow: () => void;
|
|
70
260
|
gotoPage: (n: number) => void;
|
|
71
261
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
72
|
-
error: (message: string
|
|
262
|
+
error: (message: string, detail?: {
|
|
263
|
+
code: string;
|
|
264
|
+
cause?: unknown;
|
|
265
|
+
} | undefined) => any;
|
|
73
266
|
loaded: (pageCount: number) => any;
|
|
74
|
-
}, string,
|
|
75
|
-
tempId: {
|
|
76
|
-
type: import('vue').PropType<string | string[] | null>;
|
|
77
|
-
default: null;
|
|
78
|
-
};
|
|
79
|
-
furnitureTempId: {
|
|
80
|
-
type: StringConstructor;
|
|
81
|
-
default: string;
|
|
82
|
-
};
|
|
83
|
-
params: {
|
|
84
|
-
type: import('vue').PropType<Record<string, string>>;
|
|
85
|
-
default: () => {};
|
|
86
|
-
};
|
|
87
|
-
height: {
|
|
88
|
-
type: StringConstructor;
|
|
89
|
-
default: string;
|
|
90
|
-
};
|
|
91
|
-
autoLoad: {
|
|
92
|
-
type: BooleanConstructor;
|
|
93
|
-
default: boolean;
|
|
94
|
-
};
|
|
95
|
-
showExport: {
|
|
96
|
-
type: BooleanConstructor;
|
|
97
|
-
default: undefined;
|
|
98
|
-
};
|
|
99
|
-
showPrint: {
|
|
100
|
-
type: BooleanConstructor;
|
|
101
|
-
default: undefined;
|
|
102
|
-
};
|
|
103
|
-
showPdfWindow: {
|
|
104
|
-
type: BooleanConstructor;
|
|
105
|
-
default: undefined;
|
|
106
|
-
};
|
|
107
|
-
gapPx: {
|
|
108
|
-
type: NumberConstructor;
|
|
109
|
-
default: undefined;
|
|
110
|
-
};
|
|
111
|
-
messages: {
|
|
112
|
-
type: import('vue').PropType<Partial<import('./config').MachReportMessages>>;
|
|
113
|
-
default: undefined;
|
|
114
|
-
};
|
|
115
|
-
preset: {
|
|
116
|
-
type: StringConstructor;
|
|
117
|
-
default: undefined;
|
|
118
|
-
};
|
|
119
|
-
fetcher: {
|
|
120
|
-
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
121
|
-
default: null;
|
|
122
|
-
};
|
|
123
|
-
}>> & Readonly<{
|
|
124
|
-
onError?: ((message: string) => any) | undefined;
|
|
125
|
-
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
126
|
-
}>, {
|
|
267
|
+
}, string, {
|
|
127
268
|
height: string;
|
|
128
269
|
gapPx: number;
|
|
129
270
|
params: Record<string, string>;
|
|
@@ -135,12 +276,16 @@ export declare const MachReportPreview: import('vue').DefineComponent<import('vu
|
|
|
135
276
|
messages: Partial<import('./config').MachReportMessages>;
|
|
136
277
|
autoLoad: boolean;
|
|
137
278
|
preset: string;
|
|
279
|
+
debug: boolean;
|
|
138
280
|
fetcher: import('./adapters').PlanFetcher | null;
|
|
139
|
-
}, {},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
281
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
282
|
+
$slots: {
|
|
283
|
+
default?(_: {}): any;
|
|
284
|
+
};
|
|
285
|
+
});
|
|
143
286
|
/** 预取组件分片(路由 hover / 空闲时调用,正式渲染零等待) */
|
|
144
287
|
export declare function preloadMachReport(): Promise<unknown>;
|
|
145
|
-
export declare const machReportAsyncPlugin:
|
|
288
|
+
export declare const machReportAsyncPlugin: {
|
|
289
|
+
install(app: import('vue').App, options?: MachReportPluginOptions): void;
|
|
290
|
+
};
|
|
146
291
|
export default machReportAsyncPlugin;
|
package/dist/vue/async.d.ts
CHANGED
|
@@ -1,19 +1,199 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MachReportPluginOptions } from './plugin';
|
|
2
2
|
/**
|
|
3
|
-
* 异步插件入口(@agile-team/mach-report
|
|
3
|
+
* 异步插件入口(@agile-team/mach-report/vue/async):
|
|
4
4
|
*
|
|
5
5
|
* 首屏敏感页面用异步全局组件代替静态 import——组件与其引擎依赖
|
|
6
6
|
* 拆为独立 chunk,路由级按需加载:
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
|
-
* import AsyncMachReportPlugin, { preloadMachReport } from "@agile-team/mach-report
|
|
9
|
+
* import AsyncMachReportPlugin, { preloadMachReport } from "@agile-team/mach-report/vue/async";
|
|
10
10
|
* app.use(AsyncMachReportPlugin, { baseUrl: "/sub/mach-report" });
|
|
11
11
|
* void preloadMachReport(); // 可选:路由 hover 时预取
|
|
12
12
|
* // 模板:<MachReportPreview temp-id="X" />
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
/** 全局异步组件(懒加载 ReportPreview
|
|
16
|
-
export declare const MachReportPreview:
|
|
15
|
+
/** 全局异步组件(懒加载 ReportPreview 及其引擎分片;与主插件同源共享) */
|
|
16
|
+
export declare const MachReportPreview: {
|
|
17
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
+
tempId: {
|
|
19
|
+
type: import('vue').PropType<string | string[] | null>;
|
|
20
|
+
default: null;
|
|
21
|
+
};
|
|
22
|
+
furnitureTempId: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
params: {
|
|
27
|
+
type: import('vue').PropType<Record<string, string>>;
|
|
28
|
+
default: () => {};
|
|
29
|
+
};
|
|
30
|
+
height: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
autoLoad: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
showExport: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
showPrint: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
showPdfWindow: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
gapPx: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
messages: {
|
|
55
|
+
type: import('vue').PropType<Partial<import('./config').MachReportMessages>>;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
preset: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
debug: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
fetcher: {
|
|
67
|
+
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
68
|
+
default: null;
|
|
69
|
+
};
|
|
70
|
+
}>> & Readonly<{
|
|
71
|
+
onError?: ((message: string, detail?: {
|
|
72
|
+
code: string;
|
|
73
|
+
cause?: unknown;
|
|
74
|
+
} | undefined) => any) | undefined;
|
|
75
|
+
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
76
|
+
}>, {
|
|
77
|
+
reload: () => Promise<void>;
|
|
78
|
+
print: () => Promise<void>;
|
|
79
|
+
exportAs: (format: string) => void;
|
|
80
|
+
openPdfWindow: () => void;
|
|
81
|
+
gotoPage: (n: number) => void;
|
|
82
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
83
|
+
error: (message: string, detail?: {
|
|
84
|
+
code: string;
|
|
85
|
+
cause?: unknown;
|
|
86
|
+
} | undefined) => any;
|
|
87
|
+
loaded: (pageCount: number) => any;
|
|
88
|
+
}, import('vue').PublicProps, {
|
|
89
|
+
height: string;
|
|
90
|
+
gapPx: number;
|
|
91
|
+
params: Record<string, string>;
|
|
92
|
+
furnitureTempId: string;
|
|
93
|
+
tempId: string | string[] | null;
|
|
94
|
+
showExport: boolean;
|
|
95
|
+
showPrint: boolean;
|
|
96
|
+
showPdfWindow: boolean;
|
|
97
|
+
messages: Partial<import('./config').MachReportMessages>;
|
|
98
|
+
autoLoad: boolean;
|
|
99
|
+
preset: string;
|
|
100
|
+
debug: boolean;
|
|
101
|
+
fetcher: import('./adapters').PlanFetcher | null;
|
|
102
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
103
|
+
viewportRef: HTMLDivElement;
|
|
104
|
+
containerRef: HTMLDivElement;
|
|
105
|
+
thumbsRef: HTMLElement;
|
|
106
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
107
|
+
P: {};
|
|
108
|
+
B: {};
|
|
109
|
+
D: {};
|
|
110
|
+
C: {};
|
|
111
|
+
M: {};
|
|
112
|
+
Defaults: {};
|
|
113
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
114
|
+
tempId: {
|
|
115
|
+
type: import('vue').PropType<string | string[] | null>;
|
|
116
|
+
default: null;
|
|
117
|
+
};
|
|
118
|
+
furnitureTempId: {
|
|
119
|
+
type: StringConstructor;
|
|
120
|
+
default: string;
|
|
121
|
+
};
|
|
122
|
+
params: {
|
|
123
|
+
type: import('vue').PropType<Record<string, string>>;
|
|
124
|
+
default: () => {};
|
|
125
|
+
};
|
|
126
|
+
height: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
default: string;
|
|
129
|
+
};
|
|
130
|
+
autoLoad: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
default: boolean;
|
|
133
|
+
};
|
|
134
|
+
showExport: {
|
|
135
|
+
type: BooleanConstructor;
|
|
136
|
+
default: undefined;
|
|
137
|
+
};
|
|
138
|
+
showPrint: {
|
|
139
|
+
type: BooleanConstructor;
|
|
140
|
+
default: undefined;
|
|
141
|
+
};
|
|
142
|
+
showPdfWindow: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: undefined;
|
|
145
|
+
};
|
|
146
|
+
gapPx: {
|
|
147
|
+
type: NumberConstructor;
|
|
148
|
+
default: undefined;
|
|
149
|
+
};
|
|
150
|
+
messages: {
|
|
151
|
+
type: import('vue').PropType<Partial<import('./config').MachReportMessages>>;
|
|
152
|
+
default: undefined;
|
|
153
|
+
};
|
|
154
|
+
preset: {
|
|
155
|
+
type: StringConstructor;
|
|
156
|
+
default: undefined;
|
|
157
|
+
};
|
|
158
|
+
debug: {
|
|
159
|
+
type: BooleanConstructor;
|
|
160
|
+
default: boolean;
|
|
161
|
+
};
|
|
162
|
+
fetcher: {
|
|
163
|
+
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
164
|
+
default: null;
|
|
165
|
+
};
|
|
166
|
+
}>> & Readonly<{
|
|
167
|
+
onError?: ((message: string, detail?: {
|
|
168
|
+
code: string;
|
|
169
|
+
cause?: unknown;
|
|
170
|
+
} | undefined) => any) | undefined;
|
|
171
|
+
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
172
|
+
}>, {
|
|
173
|
+
reload: () => Promise<void>;
|
|
174
|
+
print: () => Promise<void>;
|
|
175
|
+
exportAs: (format: string) => void;
|
|
176
|
+
openPdfWindow: () => void;
|
|
177
|
+
gotoPage: (n: number) => void;
|
|
178
|
+
}, {}, {}, {}, {
|
|
179
|
+
height: string;
|
|
180
|
+
gapPx: number;
|
|
181
|
+
params: Record<string, string>;
|
|
182
|
+
furnitureTempId: string;
|
|
183
|
+
tempId: string | string[] | null;
|
|
184
|
+
showExport: boolean;
|
|
185
|
+
showPrint: boolean;
|
|
186
|
+
showPdfWindow: boolean;
|
|
187
|
+
messages: Partial<import('./config').MachReportMessages>;
|
|
188
|
+
autoLoad: boolean;
|
|
189
|
+
preset: string;
|
|
190
|
+
debug: boolean;
|
|
191
|
+
fetcher: import('./adapters').PlanFetcher | null;
|
|
192
|
+
}>;
|
|
193
|
+
__isFragment?: never;
|
|
194
|
+
__isTeleport?: never;
|
|
195
|
+
__isSuspense?: never;
|
|
196
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
17
197
|
tempId: {
|
|
18
198
|
type: import('vue').PropType<string | string[] | null>;
|
|
19
199
|
default: null;
|
|
@@ -58,10 +238,20 @@ export declare const MachReportPreview: import('vue').DefineComponent<import('vu
|
|
|
58
238
|
type: StringConstructor;
|
|
59
239
|
default: undefined;
|
|
60
240
|
};
|
|
241
|
+
debug: {
|
|
242
|
+
type: BooleanConstructor;
|
|
243
|
+
default: boolean;
|
|
244
|
+
};
|
|
61
245
|
fetcher: {
|
|
62
246
|
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
63
247
|
default: null;
|
|
64
248
|
};
|
|
249
|
+
}>> & Readonly<{
|
|
250
|
+
onError?: ((message: string, detail?: {
|
|
251
|
+
code: string;
|
|
252
|
+
cause?: unknown;
|
|
253
|
+
} | undefined) => any) | undefined;
|
|
254
|
+
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
65
255
|
}>, {
|
|
66
256
|
reload: () => Promise<void>;
|
|
67
257
|
print: () => Promise<void>;
|
|
@@ -69,61 +259,12 @@ export declare const MachReportPreview: import('vue').DefineComponent<import('vu
|
|
|
69
259
|
openPdfWindow: () => void;
|
|
70
260
|
gotoPage: (n: number) => void;
|
|
71
261
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
72
|
-
error: (message: string
|
|
262
|
+
error: (message: string, detail?: {
|
|
263
|
+
code: string;
|
|
264
|
+
cause?: unknown;
|
|
265
|
+
} | undefined) => any;
|
|
73
266
|
loaded: (pageCount: number) => any;
|
|
74
|
-
}, string,
|
|
75
|
-
tempId: {
|
|
76
|
-
type: import('vue').PropType<string | string[] | null>;
|
|
77
|
-
default: null;
|
|
78
|
-
};
|
|
79
|
-
furnitureTempId: {
|
|
80
|
-
type: StringConstructor;
|
|
81
|
-
default: string;
|
|
82
|
-
};
|
|
83
|
-
params: {
|
|
84
|
-
type: import('vue').PropType<Record<string, string>>;
|
|
85
|
-
default: () => {};
|
|
86
|
-
};
|
|
87
|
-
height: {
|
|
88
|
-
type: StringConstructor;
|
|
89
|
-
default: string;
|
|
90
|
-
};
|
|
91
|
-
autoLoad: {
|
|
92
|
-
type: BooleanConstructor;
|
|
93
|
-
default: boolean;
|
|
94
|
-
};
|
|
95
|
-
showExport: {
|
|
96
|
-
type: BooleanConstructor;
|
|
97
|
-
default: undefined;
|
|
98
|
-
};
|
|
99
|
-
showPrint: {
|
|
100
|
-
type: BooleanConstructor;
|
|
101
|
-
default: undefined;
|
|
102
|
-
};
|
|
103
|
-
showPdfWindow: {
|
|
104
|
-
type: BooleanConstructor;
|
|
105
|
-
default: undefined;
|
|
106
|
-
};
|
|
107
|
-
gapPx: {
|
|
108
|
-
type: NumberConstructor;
|
|
109
|
-
default: undefined;
|
|
110
|
-
};
|
|
111
|
-
messages: {
|
|
112
|
-
type: import('vue').PropType<Partial<import('./config').MachReportMessages>>;
|
|
113
|
-
default: undefined;
|
|
114
|
-
};
|
|
115
|
-
preset: {
|
|
116
|
-
type: StringConstructor;
|
|
117
|
-
default: undefined;
|
|
118
|
-
};
|
|
119
|
-
fetcher: {
|
|
120
|
-
type: import('vue').PropType<import('./adapters').PlanFetcher | null>;
|
|
121
|
-
default: null;
|
|
122
|
-
};
|
|
123
|
-
}>> & Readonly<{
|
|
124
|
-
onError?: ((message: string) => any) | undefined;
|
|
125
|
-
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
126
|
-
}>, {
|
|
267
|
+
}, string, {
|
|
127
268
|
height: string;
|
|
128
269
|
gapPx: number;
|
|
129
270
|
params: Record<string, string>;
|
|
@@ -135,12 +276,16 @@ export declare const MachReportPreview: import('vue').DefineComponent<import('vu
|
|
|
135
276
|
messages: Partial<import('./config').MachReportMessages>;
|
|
136
277
|
autoLoad: boolean;
|
|
137
278
|
preset: string;
|
|
279
|
+
debug: boolean;
|
|
138
280
|
fetcher: import('./adapters').PlanFetcher | null;
|
|
139
|
-
}, {},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
281
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
282
|
+
$slots: {
|
|
283
|
+
default?(_: {}): any;
|
|
284
|
+
};
|
|
285
|
+
});
|
|
143
286
|
/** 预取组件分片(路由 hover / 空闲时调用,正式渲染零等待) */
|
|
144
287
|
export declare function preloadMachReport(): Promise<unknown>;
|
|
145
|
-
export declare const machReportAsyncPlugin:
|
|
288
|
+
export declare const machReportAsyncPlugin: {
|
|
289
|
+
install(app: import('vue').App, options?: MachReportPluginOptions): void;
|
|
290
|
+
};
|
|
146
291
|
export default machReportAsyncPlugin;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 预览内文本高亮(搜索命中标记):
|
|
3
|
+
* - highlightTextNodes:TreeWalker 找文本节点,命中片段包 <mark class="mrp-hit">
|
|
4
|
+
* - clearHighlights:拆包还原(避免重复高亮叠加)
|
|
5
|
+
* 纯 DOM 操作,虚拟化窗口外的页不处理(随窗口重建自然清理)。
|
|
6
|
+
*/
|
|
7
|
+
export declare function clearHighlights(root: HTMLElement): void;
|
|
8
|
+
export declare function highlightTextNodes(root: HTMLElement, query: string): number;
|
|
@@ -7,6 +7,13 @@ interface PrintHtmlResult {
|
|
|
7
7
|
}
|
|
8
8
|
/** 构建打印文档:head(含按尺寸分组的 @page 规则)+ 每页一段 HTML(供流式写入) */
|
|
9
9
|
export declare function buildPrintDocument(p: RenderPlan): PrintHtmlResult;
|
|
10
|
+
/**
|
|
11
|
+
* 批量打印(多单连打):把多份计划合并为一个打印文档——
|
|
12
|
+
* named pages 保证混合纸张正确分页,浏览器只弹一次打印对话框。
|
|
13
|
+
*/
|
|
14
|
+
export declare function printPlans(plans: RenderPlan[], options?: {
|
|
15
|
+
onProgress?: (done: number, total: number) => void;
|
|
16
|
+
}): Promise<void>;
|
|
10
17
|
export declare function usePrintExport(plan: Ref<RenderPlan | null>, hooks: {
|
|
11
18
|
getPdfExporter: () => PdfExporter;
|
|
12
19
|
onError: (message: string) => void;
|
package/dist/vue/config.d.ts
CHANGED
|
@@ -21,6 +21,15 @@ export interface MachReportMessages {
|
|
|
21
21
|
empty: string;
|
|
22
22
|
errorPrefix: string;
|
|
23
23
|
retry: string;
|
|
24
|
+
/** 搜索框占位文案 */
|
|
25
|
+
searchPlaceholder: string;
|
|
26
|
+
/** 搜索命中计数,{cur}/{total} 占位 */
|
|
27
|
+
matchInfo: string;
|
|
28
|
+
/** 上/下一个命中 */
|
|
29
|
+
prevMatch: string;
|
|
30
|
+
nextMatch: string;
|
|
31
|
+
/** 缩略图侧栏开关 */
|
|
32
|
+
thumbnails: string;
|
|
24
33
|
}
|
|
25
34
|
export declare const DEFAULT_MESSAGES: MachReportMessages;
|
|
26
35
|
/** 主题变量(组件外壳注入的 --mrp-* CSS 自定义属性) */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReportPreview 的编程式控制器(与组件 ref 方法同面):
|
|
3
|
+
* reload / print / exportAs / openPdfWindow / gotoPage。
|
|
4
|
+
*/
|
|
5
|
+
export interface MachReportController {
|
|
6
|
+
reload(): Promise<void>;
|
|
7
|
+
print(): Promise<void>;
|
|
8
|
+
exportAs(format: "html" | "pdf" | string): void;
|
|
9
|
+
openPdfWindow(): void;
|
|
10
|
+
gotoPage(page: number): void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 在 ReportPreview 的任意后代组件中获取控制器(免模板 ref):
|
|
14
|
+
*
|
|
15
|
+
* ```vue
|
|
16
|
+
* <script setup>
|
|
17
|
+
* import { useReportPreview } from "@agile-team/mach-report/vue";
|
|
18
|
+
* const preview = useReportPreview();
|
|
19
|
+
* </script>
|
|
20
|
+
* <template><button @click="preview?.print()">打印本单</button></template>
|
|
21
|
+
*
|
|
22
|
+
* 不在预览组件内调用时返回 null(不抛错,便于条件渲染场景)。
|
|
23
|
+
*/
|
|
24
|
+
export declare function useReportPreview(): MachReportController | null;
|