@agile-team/mach-report 2.4.1 → 2.6.1
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 +119 -13
- package/dist/ReportPreview-Dk-28QAi.js +2946 -0
- package/dist/ReportPreview-FSvcBLjH.cjs +6 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/analytics.cjs +1 -0
- package/dist/analytics.d.cts +276 -0
- package/dist/analytics.d.ts +276 -0
- package/dist/analytics.js +223 -0
- package/dist/assets-66UBlhES.cjs +1 -0
- package/dist/assets-NVA_sftu.js +163 -0
- package/dist/capabilities-CNjIirfo.js +36 -0
- package/dist/capabilities-D4xeVYSR.cjs +1 -0
- package/dist/designer.cjs +1 -0
- package/dist/designer.d.cts +753 -0
- package/dist/designer.d.ts +753 -0
- package/dist/designer.js +372 -0
- package/dist/grid-geometry-BNptEcMm.js +65 -0
- package/dist/grid-geometry-CZ_cYB6O.cjs +1 -0
- package/dist/index.cjs +8 -5
- package/dist/index.d.cts +413 -8
- package/dist/index.d.ts +413 -8
- package/dist/index.js +1016 -1501
- package/dist/param-validation-BWNjLcN0.js +116 -0
- package/dist/param-validation-CiTxFeZ8.cjs +1 -0
- package/dist/pdf.cjs +48 -48
- package/dist/pdf.d.cts +111 -1
- package/dist/pdf.d.ts +111 -1
- package/dist/pdf.js +3931 -3868
- package/dist/{plugin-DwKr8oF6.cjs → plugin-BqBkn_kI.cjs} +1 -1
- package/dist/{plugin-CKnSVuVe.js → plugin-Ds10VnQO.js} +2 -2
- package/dist/render-plan-CckPEQyf.cjs +1 -0
- package/dist/{render-plan-CXBWRog4.js → render-plan-uzZYYSy1.js} +11 -10
- package/dist/report-params-B_VCihAh.js +12 -0
- package/dist/report-params-CjWrjPl6.cjs +1 -0
- package/dist/report-source-B9bENO0F.js +750 -0
- package/dist/report-source-BbNkkBDy.cjs +1 -0
- package/dist/server/node.d.cts +297 -0
- package/dist/server/node.d.ts +297 -0
- package/dist/server-node.cjs +1 -0
- package/dist/server-node.js +270 -0
- package/dist/server.cjs +1 -0
- package/dist/server.d.cts +643 -0
- package/dist/server.d.ts +643 -0
- package/dist/server.js +237 -0
- package/dist/style-CpwiOPyB.cjs +1 -0
- package/dist/style-Dv5o_x6b.js +67 -0
- package/dist/style.css +1 -1
- package/dist/template-registry-DWExx0gU.cjs +1 -0
- package/dist/template-registry-NpOakidD.js +354 -0
- package/dist/textwrap-CnGsEum6.cjs +4 -0
- package/dist/textwrap-DOl04hCQ.js +110 -0
- package/dist/validate-DfHPD8wX.cjs +1 -0
- package/dist/validate-S6CgIm5d.js +148 -0
- package/dist/vue/async.d.cts +694 -54
- package/dist/vue/async.d.ts +694 -54
- package/dist/vue/index.d.cts +1212 -111
- package/dist/vue/index.d.ts +1212 -111
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +167 -80
- package/dist/worker.cjs +1 -0
- package/dist/worker.d.cts +302 -0
- package/dist/worker.d.ts +302 -0
- package/dist/worker.js +133 -0
- package/dist/xlsx/node.d.cts +47 -0
- package/dist/xlsx/node.d.ts +47 -0
- package/dist/xlsx-node.cjs +221 -0
- package/dist/xlsx-node.js +36409 -0
- package/dist/xlsx.cjs +20 -20
- package/dist/xlsx.d.cts +78 -1
- package/dist/xlsx.d.ts +78 -1
- package/dist/xlsx.js +5974 -5831
- package/package.json +62 -2
- package/dist/ReportPreview-BVTpw9Tb.cjs +0 -6
- package/dist/ReportPreview-XF8iSUG1.js +0 -1910
- package/dist/grid-geometry-BNIvw52m.cjs +0 -1
- package/dist/grid-geometry-C8hGoe9o.js +0 -130
- package/dist/render-plan-CCTL4F9v.cjs +0 -1
- package/dist/report-params-B3Fia6JO.js +0 -10
- package/dist/report-params-D1gZ1DME.cjs +0 -1
- package/dist/textwrap-nH0UYU6D.js +0 -108
- package/dist/textwrap-oD-t4b4B.cjs +0 -4
package/dist/vue/index.d.ts
CHANGED
|
@@ -48,6 +48,31 @@ showPdfWindow: {
|
|
|
48
48
|
type: BooleanConstructor;
|
|
49
49
|
default: undefined;
|
|
50
50
|
};
|
|
51
|
+
showSettings: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
55
|
+
toolbar: {
|
|
56
|
+
type: PropType<MachReportToolbarOptions>;
|
|
57
|
+
default: undefined;
|
|
58
|
+
};
|
|
59
|
+
interaction: {
|
|
60
|
+
type: PropType<ReportInteractionOptions>;
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
preferences: {
|
|
64
|
+
type: PropType<ReportPreferencesOptions>;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
assets: {
|
|
68
|
+
type: PropType<AssetRenderOptions>;
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
71
|
+
/** 保留表头的零行业务结果;不改变计划和导出内容。 */
|
|
72
|
+
emptyState: {
|
|
73
|
+
type: PropType<boolean | ReportEmptyState>;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
51
76
|
/** 页间距(px);不传走配置中心 */
|
|
52
77
|
gapPx: {
|
|
53
78
|
type: NumberConstructor;
|
|
@@ -91,26 +116,49 @@ type: PropType<PlanFetcher | null>;
|
|
|
91
116
|
default: null;
|
|
92
117
|
};
|
|
93
118
|
}>, {
|
|
94
|
-
reload: typeof reload;
|
|
95
|
-
print: typeof print_2;
|
|
96
|
-
exportAs: typeof exportAs;
|
|
97
|
-
openPdfWindow: typeof openPdfWindow;
|
|
98
|
-
gotoPage: typeof gotoPage;
|
|
99
|
-
setParams: typeof setParams;
|
|
100
|
-
checkPdfFont: typeof checkPdfFont;
|
|
101
|
-
importExcel: typeof importExcel;
|
|
102
|
-
getPlan: typeof getPlan;
|
|
103
|
-
getChanges: () => ReportCellEdit_2[];
|
|
104
119
|
state: ComputedRef<MachReportState>;
|
|
120
|
+
checkPdfFont?(): Promise<PdfFontCheckResult>;
|
|
121
|
+
reload(): Promise<void>;
|
|
122
|
+
print(): Promise<void>;
|
|
123
|
+
exportAs(format: string): Promise<void> | void;
|
|
124
|
+
openPdfWindow(): void;
|
|
125
|
+
gotoPage(page: number): void;
|
|
126
|
+
setParams(values: Record<string, string>, opts?: {
|
|
127
|
+
reload
|
|
128
|
+
/**
|
|
129
|
+
* ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
|
|
130
|
+
*
|
|
131
|
+
* 职责编排(实现在 composables,本文件保持薄壳):
|
|
132
|
+
* - usePageWindow:视口虚拟化(自然坐标系 + gap)
|
|
133
|
+
* - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
|
|
134
|
+
* - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
|
|
135
|
+
* - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
|
|
136
|
+
* - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
|
|
137
|
+
*/
|
|
138
|
+
?: boolean;
|
|
139
|
+
}): Promise<void> | void;
|
|
140
|
+
importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions): Promise<ExcelImportResult | null>;
|
|
141
|
+
getPlan?(): RenderPlan | null;
|
|
142
|
+
getChanges?(): ReportCellEdit_2[];
|
|
143
|
+
getDifferences?(): ReportCellEdit_2[];
|
|
144
|
+
undo?(): Promise<boolean>;
|
|
145
|
+
redo?(): Promise<boolean>;
|
|
146
|
+
restoreChanges?(): Promise<boolean>;
|
|
147
|
+
getSelection?(): ReportCellSelection | null;
|
|
148
|
+
focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
|
|
149
|
+
focusField?(target: ReportFieldTarget): Promise<boolean>;
|
|
150
|
+
copySelection?(): string;
|
|
151
|
+
pasteSelection?(text: string): Promise<boolean>;
|
|
105
152
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
153
|
+
warning: (message: string) => any;
|
|
106
154
|
error: (message: string, detail?: {
|
|
107
155
|
code: string;
|
|
108
156
|
cause?: unknown;
|
|
109
157
|
} | undefined) => any;
|
|
110
158
|
loaded: (pageCount: number) => any;
|
|
111
|
-
warning: (message: string) => any;
|
|
112
159
|
"cell-edit": (edit: ReportCellEdit_2) => any;
|
|
113
160
|
"template-import": (result: ExcelImportResult) => any;
|
|
161
|
+
"preferences-change": (preferences: Readonly<ReportPreviewPreferences>) => any;
|
|
114
162
|
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
115
163
|
reportId: {
|
|
116
164
|
type: PropType<string | string[] | null>;
|
|
@@ -141,6 +189,31 @@ showPdfWindow: {
|
|
|
141
189
|
type: BooleanConstructor;
|
|
142
190
|
default: undefined;
|
|
143
191
|
};
|
|
192
|
+
showSettings: {
|
|
193
|
+
type: BooleanConstructor;
|
|
194
|
+
default: undefined;
|
|
195
|
+
};
|
|
196
|
+
toolbar: {
|
|
197
|
+
type: PropType<MachReportToolbarOptions>;
|
|
198
|
+
default: undefined;
|
|
199
|
+
};
|
|
200
|
+
interaction: {
|
|
201
|
+
type: PropType<ReportInteractionOptions>;
|
|
202
|
+
default: undefined;
|
|
203
|
+
};
|
|
204
|
+
preferences: {
|
|
205
|
+
type: PropType<ReportPreferencesOptions>;
|
|
206
|
+
default: undefined;
|
|
207
|
+
};
|
|
208
|
+
assets: {
|
|
209
|
+
type: PropType<AssetRenderOptions>;
|
|
210
|
+
default: undefined;
|
|
211
|
+
};
|
|
212
|
+
/** 保留表头的零行业务结果;不改变计划和导出内容。 */
|
|
213
|
+
emptyState: {
|
|
214
|
+
type: PropType<boolean | ReportEmptyState>;
|
|
215
|
+
default: boolean;
|
|
216
|
+
};
|
|
144
217
|
/** 页间距(px);不传走配置中心 */
|
|
145
218
|
gapPx: {
|
|
146
219
|
type: NumberConstructor;
|
|
@@ -184,14 +257,15 @@ type: PropType<PlanFetcher | null>;
|
|
|
184
257
|
default: null;
|
|
185
258
|
};
|
|
186
259
|
}>> & Readonly<{
|
|
260
|
+
onWarning?: ((message: string) => any) | undefined;
|
|
187
261
|
onError?: ((message: string, detail?: {
|
|
188
262
|
code: string;
|
|
189
263
|
cause?: unknown;
|
|
190
264
|
} | undefined) => any) | undefined;
|
|
191
265
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
192
|
-
onWarning?: ((message: string) => any) | undefined;
|
|
193
266
|
"onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
|
|
194
267
|
"onTemplate-import"?: ((result: ExcelImportResult) => any) | undefined;
|
|
268
|
+
"onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
|
|
195
269
|
}>, {
|
|
196
270
|
editable: boolean | ReportEditingOptions;
|
|
197
271
|
height: string;
|
|
@@ -202,14 +276,181 @@ debug: boolean;
|
|
|
202
276
|
showExport: boolean;
|
|
203
277
|
showPrint: boolean;
|
|
204
278
|
showPdfWindow: boolean;
|
|
279
|
+
showSettings: boolean;
|
|
205
280
|
showParams: boolean;
|
|
281
|
+
toolbar: MachReportToolbarOptions;
|
|
282
|
+
interaction: ReportInteractionOptions;
|
|
283
|
+
preferences: ReportPreferencesOptions;
|
|
284
|
+
assets: AssetRenderOptions;
|
|
206
285
|
messages: Partial<MachReportMessages>;
|
|
207
286
|
excelImport: boolean | ExcelImportOptions;
|
|
208
287
|
autoLoad: boolean;
|
|
288
|
+
emptyState: boolean | ReportEmptyState;
|
|
209
289
|
preset: string;
|
|
210
290
|
paramDefs: ReportParamDef[] | undefined;
|
|
211
291
|
fetcher: PlanFetcher | null;
|
|
212
292
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
293
|
+
paramPanelRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
294
|
+
defs: ReportParamDef[];
|
|
295
|
+
modelValue: Record<string, string>;
|
|
296
|
+
messages: MachReportMessages;
|
|
297
|
+
attempted: boolean;
|
|
298
|
+
issues?: readonly ReportParamIssue[];
|
|
299
|
+
}> & Readonly<{
|
|
300
|
+
onReset?: (() => any) | undefined;
|
|
301
|
+
onQuery?: (() => any) | undefined;
|
|
302
|
+
"onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
|
|
303
|
+
}>, {
|
|
304
|
+
focusInvalid: () => void;
|
|
305
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
306
|
+
reset: () => any;
|
|
307
|
+
query: () => any;
|
|
308
|
+
"update:modelValue": (value: Record<string, string>) => any;
|
|
309
|
+
}, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
310
|
+
root: HTMLDivElement;
|
|
311
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
312
|
+
P: {};
|
|
313
|
+
B: {};
|
|
314
|
+
D: {};
|
|
315
|
+
C: {};
|
|
316
|
+
M: {};
|
|
317
|
+
Defaults: {};
|
|
318
|
+
}, Readonly<{
|
|
319
|
+
defs: ReportParamDef[];
|
|
320
|
+
modelValue: Record<string, string>;
|
|
321
|
+
messages: MachReportMessages;
|
|
322
|
+
attempted: boolean;
|
|
323
|
+
issues?: readonly ReportParamIssue[];
|
|
324
|
+
}> & Readonly<{
|
|
325
|
+
onReset?: (() => any) | undefined;
|
|
326
|
+
onQuery?: (() => any) | undefined;
|
|
327
|
+
"onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
|
|
328
|
+
}>, {
|
|
329
|
+
focusInvalid: () => void;
|
|
330
|
+
}, {}, {}, {}, {}> | null;
|
|
331
|
+
toolbarRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
332
|
+
pageCount: number;
|
|
333
|
+
currentPage: number;
|
|
334
|
+
zoomMode: "fit" | "raw";
|
|
335
|
+
zoom: number;
|
|
336
|
+
showExport: boolean;
|
|
337
|
+
showPrint: boolean;
|
|
338
|
+
showPdfWindow: boolean;
|
|
339
|
+
messages: MachReportMessages;
|
|
340
|
+
search: {
|
|
341
|
+
visible: boolean;
|
|
342
|
+
query: string;
|
|
343
|
+
matchIndex: number;
|
|
344
|
+
matchCount: number;
|
|
345
|
+
searching
|
|
346
|
+
/**
|
|
347
|
+
* ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
|
|
348
|
+
*
|
|
349
|
+
* 职责编排(实现在 composables,本文件保持薄壳):
|
|
350
|
+
* - usePageWindow:视口虚拟化(自然坐标系 + gap)
|
|
351
|
+
* - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
|
|
352
|
+
* - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
|
|
353
|
+
* - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
|
|
354
|
+
* - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
|
|
355
|
+
*/
|
|
356
|
+
?: boolean;
|
|
357
|
+
};
|
|
358
|
+
thumbsVisible: boolean;
|
|
359
|
+
showImport?: boolean;
|
|
360
|
+
showSearch?: boolean;
|
|
361
|
+
showThumbnails?: boolean;
|
|
362
|
+
showZoom?: boolean;
|
|
363
|
+
exportFormats?: readonly ReportExportFormat[];
|
|
364
|
+
showSettings?: boolean;
|
|
365
|
+
settingsOpen?: boolean;
|
|
366
|
+
busy?: boolean;
|
|
367
|
+
}> & Readonly<{
|
|
368
|
+
onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
|
|
369
|
+
onPrint?: (() => any) | undefined;
|
|
370
|
+
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
371
|
+
onGoto?: ((page: number) => any) | undefined;
|
|
372
|
+
"onPdf-window"?: (() => any) | undefined;
|
|
373
|
+
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
374
|
+
"onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
|
|
375
|
+
"onSearch-toggle"?: (() => any) | undefined;
|
|
376
|
+
"onThumbs-toggle"?: (() => any) | undefined;
|
|
377
|
+
"onImport-excel"?: (() => any) | undefined;
|
|
378
|
+
"onSettings-toggle"?: (() => any) | undefined;
|
|
379
|
+
}>, {
|
|
380
|
+
focusSearch: () => void;
|
|
381
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
382
|
+
export: (format: "pdf" | "xlsx" | "html" | "png" | "word") => any;
|
|
383
|
+
print: () => any;
|
|
384
|
+
zoom: (mode: number | "fit") => any;
|
|
385
|
+
goto: (page: number) => any;
|
|
386
|
+
"pdf-window": () => any;
|
|
387
|
+
"search-input": (query: string) => any;
|
|
388
|
+
"search-nav": (dir: 1 | -1) => any;
|
|
389
|
+
"search-toggle": () => any;
|
|
390
|
+
"thumbs-toggle": () => any;
|
|
391
|
+
"import-excel": () => any;
|
|
392
|
+
"settings-toggle": () => any;
|
|
393
|
+
}, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
394
|
+
searchInputRef: HTMLInputElement;
|
|
395
|
+
searchToggleRef: HTMLButtonElement;
|
|
396
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
397
|
+
P: {};
|
|
398
|
+
B: {};
|
|
399
|
+
D: {};
|
|
400
|
+
C: {};
|
|
401
|
+
M: {};
|
|
402
|
+
Defaults: {};
|
|
403
|
+
}, Readonly<{
|
|
404
|
+
pageCount: number;
|
|
405
|
+
currentPage: number;
|
|
406
|
+
zoomMode: "fit" | "raw";
|
|
407
|
+
zoom: number;
|
|
408
|
+
showExport: boolean;
|
|
409
|
+
showPrint: boolean;
|
|
410
|
+
showPdfWindow: boolean;
|
|
411
|
+
messages: MachReportMessages;
|
|
412
|
+
search: {
|
|
413
|
+
visible: boolean;
|
|
414
|
+
query: string;
|
|
415
|
+
matchIndex: number;
|
|
416
|
+
matchCount: number;
|
|
417
|
+
searching
|
|
418
|
+
/**
|
|
419
|
+
* ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
|
|
420
|
+
*
|
|
421
|
+
* 职责编排(实现在 composables,本文件保持薄壳):
|
|
422
|
+
* - usePageWindow:视口虚拟化(自然坐标系 + gap)
|
|
423
|
+
* - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
|
|
424
|
+
* - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
|
|
425
|
+
* - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
|
|
426
|
+
* - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
|
|
427
|
+
*/
|
|
428
|
+
?: boolean;
|
|
429
|
+
};
|
|
430
|
+
thumbsVisible: boolean;
|
|
431
|
+
showImport?: boolean;
|
|
432
|
+
showSearch?: boolean;
|
|
433
|
+
showThumbnails?: boolean;
|
|
434
|
+
showZoom?: boolean;
|
|
435
|
+
exportFormats?: readonly ReportExportFormat[];
|
|
436
|
+
showSettings?: boolean;
|
|
437
|
+
settingsOpen?: boolean;
|
|
438
|
+
busy?: boolean;
|
|
439
|
+
}> & Readonly<{
|
|
440
|
+
onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
|
|
441
|
+
onPrint?: (() => any) | undefined;
|
|
442
|
+
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
443
|
+
onGoto?: ((page: number) => any) | undefined;
|
|
444
|
+
"onPdf-window"?: (() => any) | undefined;
|
|
445
|
+
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
446
|
+
"onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
|
|
447
|
+
"onSearch-toggle"?: (() => any) | undefined;
|
|
448
|
+
"onThumbs-toggle"?: (() => any) | undefined;
|
|
449
|
+
"onImport-excel"?: (() => any) | undefined;
|
|
450
|
+
"onSettings-toggle"?: (() => any) | undefined;
|
|
451
|
+
}>, {
|
|
452
|
+
focusSearch: () => void;
|
|
453
|
+
}, {}, {}, {}, {}> | null;
|
|
213
454
|
importInputRef: HTMLInputElement;
|
|
214
455
|
viewportRef: HTMLDivElement;
|
|
215
456
|
containerRef: HTMLDivElement;
|
|
@@ -234,6 +475,12 @@ declare type __VLS_Props = {
|
|
|
234
475
|
};
|
|
235
476
|
thumbsVisible: boolean;
|
|
236
477
|
showImport?: boolean;
|
|
478
|
+
showSearch?: boolean;
|
|
479
|
+
showThumbnails?: boolean;
|
|
480
|
+
showZoom?: boolean;
|
|
481
|
+
exportFormats?: readonly ReportExportFormat[];
|
|
482
|
+
showSettings?: boolean;
|
|
483
|
+
settingsOpen?: boolean;
|
|
237
484
|
busy?: boolean;
|
|
238
485
|
};
|
|
239
486
|
|
|
@@ -243,14 +490,177 @@ declare type __VLS_Props_2 = {
|
|
|
243
490
|
messages: MachReportMessages;
|
|
244
491
|
/** 触发过查询后才开始必填提示(避免首屏一片红) */
|
|
245
492
|
attempted: boolean;
|
|
493
|
+
issues?: readonly ReportParamIssue[];
|
|
246
494
|
};
|
|
247
495
|
|
|
248
496
|
declare function __VLS_template(): {
|
|
249
497
|
attrs: Partial<{}>;
|
|
250
498
|
slots: {
|
|
499
|
+
settings?(_: {}): any;
|
|
251
500
|
default?(_: {}): any;
|
|
252
501
|
};
|
|
253
502
|
refs: {
|
|
503
|
+
paramPanelRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
504
|
+
defs: ReportParamDef[];
|
|
505
|
+
modelValue: Record<string, string>;
|
|
506
|
+
messages: MachReportMessages;
|
|
507
|
+
attempted: boolean;
|
|
508
|
+
issues?: readonly ReportParamIssue[];
|
|
509
|
+
}> & Readonly<{
|
|
510
|
+
onReset?: (() => any) | undefined;
|
|
511
|
+
onQuery?: (() => any) | undefined;
|
|
512
|
+
"onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
|
|
513
|
+
}>, {
|
|
514
|
+
focusInvalid: () => void;
|
|
515
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
516
|
+
reset: () => any;
|
|
517
|
+
query: () => any;
|
|
518
|
+
"update:modelValue": (value: Record<string, string>) => any;
|
|
519
|
+
}, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
520
|
+
root: HTMLDivElement;
|
|
521
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
522
|
+
P: {};
|
|
523
|
+
B: {};
|
|
524
|
+
D: {};
|
|
525
|
+
C: {};
|
|
526
|
+
M: {};
|
|
527
|
+
Defaults: {};
|
|
528
|
+
}, Readonly<{
|
|
529
|
+
defs: ReportParamDef[];
|
|
530
|
+
modelValue: Record<string, string>;
|
|
531
|
+
messages: MachReportMessages;
|
|
532
|
+
attempted: boolean;
|
|
533
|
+
issues?: readonly ReportParamIssue[];
|
|
534
|
+
}> & Readonly<{
|
|
535
|
+
onReset?: (() => any) | undefined;
|
|
536
|
+
onQuery?: (() => any) | undefined;
|
|
537
|
+
"onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
|
|
538
|
+
}>, {
|
|
539
|
+
focusInvalid: () => void;
|
|
540
|
+
}, {}, {}, {}, {}> | null;
|
|
541
|
+
toolbarRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
542
|
+
pageCount: number;
|
|
543
|
+
currentPage: number;
|
|
544
|
+
zoomMode: "fit" | "raw";
|
|
545
|
+
zoom: number;
|
|
546
|
+
showExport: boolean;
|
|
547
|
+
showPrint: boolean;
|
|
548
|
+
showPdfWindow: boolean;
|
|
549
|
+
messages: MachReportMessages;
|
|
550
|
+
search: {
|
|
551
|
+
visible: boolean;
|
|
552
|
+
query: string;
|
|
553
|
+
matchIndex: number;
|
|
554
|
+
matchCount: number;
|
|
555
|
+
searching
|
|
556
|
+
/**
|
|
557
|
+
* ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
|
|
558
|
+
*
|
|
559
|
+
* 职责编排(实现在 composables,本文件保持薄壳):
|
|
560
|
+
* - usePageWindow:视口虚拟化(自然坐标系 + gap)
|
|
561
|
+
* - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
|
|
562
|
+
* - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
|
|
563
|
+
* - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
|
|
564
|
+
* - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
|
|
565
|
+
*/
|
|
566
|
+
?: boolean;
|
|
567
|
+
};
|
|
568
|
+
thumbsVisible: boolean;
|
|
569
|
+
showImport?: boolean;
|
|
570
|
+
showSearch?: boolean;
|
|
571
|
+
showThumbnails?: boolean;
|
|
572
|
+
showZoom?: boolean;
|
|
573
|
+
exportFormats?: readonly ReportExportFormat[];
|
|
574
|
+
showSettings?: boolean;
|
|
575
|
+
settingsOpen?: boolean;
|
|
576
|
+
busy?: boolean;
|
|
577
|
+
}> & Readonly<{
|
|
578
|
+
onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
|
|
579
|
+
onPrint?: (() => any) | undefined;
|
|
580
|
+
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
581
|
+
onGoto?: ((page: number) => any) | undefined;
|
|
582
|
+
"onPdf-window"?: (() => any) | undefined;
|
|
583
|
+
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
584
|
+
"onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
|
|
585
|
+
"onSearch-toggle"?: (() => any) | undefined;
|
|
586
|
+
"onThumbs-toggle"?: (() => any) | undefined;
|
|
587
|
+
"onImport-excel"?: (() => any) | undefined;
|
|
588
|
+
"onSettings-toggle"?: (() => any) | undefined;
|
|
589
|
+
}>, {
|
|
590
|
+
focusSearch: () => void;
|
|
591
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
592
|
+
export: (format: "pdf" | "xlsx" | "html" | "png" | "word") => any;
|
|
593
|
+
print: () => any;
|
|
594
|
+
zoom: (mode: number | "fit") => any;
|
|
595
|
+
goto: (page: number) => any;
|
|
596
|
+
"pdf-window": () => any;
|
|
597
|
+
"search-input": (query: string) => any;
|
|
598
|
+
"search-nav": (dir: 1 | -1) => any;
|
|
599
|
+
"search-toggle": () => any;
|
|
600
|
+
"thumbs-toggle": () => any;
|
|
601
|
+
"import-excel": () => any;
|
|
602
|
+
"settings-toggle": () => any;
|
|
603
|
+
}, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
604
|
+
searchInputRef: HTMLInputElement;
|
|
605
|
+
searchToggleRef: HTMLButtonElement;
|
|
606
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
607
|
+
P: {};
|
|
608
|
+
B: {};
|
|
609
|
+
D: {};
|
|
610
|
+
C: {};
|
|
611
|
+
M: {};
|
|
612
|
+
Defaults: {};
|
|
613
|
+
}, Readonly<{
|
|
614
|
+
pageCount: number;
|
|
615
|
+
currentPage: number;
|
|
616
|
+
zoomMode: "fit" | "raw";
|
|
617
|
+
zoom: number;
|
|
618
|
+
showExport: boolean;
|
|
619
|
+
showPrint: boolean;
|
|
620
|
+
showPdfWindow: boolean;
|
|
621
|
+
messages: MachReportMessages;
|
|
622
|
+
search: {
|
|
623
|
+
visible: boolean;
|
|
624
|
+
query: string;
|
|
625
|
+
matchIndex: number;
|
|
626
|
+
matchCount: number;
|
|
627
|
+
searching
|
|
628
|
+
/**
|
|
629
|
+
* ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
|
|
630
|
+
*
|
|
631
|
+
* 职责编排(实现在 composables,本文件保持薄壳):
|
|
632
|
+
* - usePageWindow:视口虚拟化(自然坐标系 + gap)
|
|
633
|
+
* - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
|
|
634
|
+
* - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
|
|
635
|
+
* - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
|
|
636
|
+
* - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
|
|
637
|
+
*/
|
|
638
|
+
?: boolean;
|
|
639
|
+
};
|
|
640
|
+
thumbsVisible: boolean;
|
|
641
|
+
showImport?: boolean;
|
|
642
|
+
showSearch?: boolean;
|
|
643
|
+
showThumbnails?: boolean;
|
|
644
|
+
showZoom?: boolean;
|
|
645
|
+
exportFormats?: readonly ReportExportFormat[];
|
|
646
|
+
showSettings?: boolean;
|
|
647
|
+
settingsOpen?: boolean;
|
|
648
|
+
busy?: boolean;
|
|
649
|
+
}> & Readonly<{
|
|
650
|
+
onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
|
|
651
|
+
onPrint?: (() => any) | undefined;
|
|
652
|
+
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
653
|
+
onGoto?: ((page: number) => any) | undefined;
|
|
654
|
+
"onPdf-window"?: (() => any) | undefined;
|
|
655
|
+
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
656
|
+
"onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
|
|
657
|
+
"onSearch-toggle"?: (() => any) | undefined;
|
|
658
|
+
"onThumbs-toggle"?: (() => any) | undefined;
|
|
659
|
+
"onImport-excel"?: (() => any) | undefined;
|
|
660
|
+
"onSettings-toggle"?: (() => any) | undefined;
|
|
661
|
+
}>, {
|
|
662
|
+
focusSearch: () => void;
|
|
663
|
+
}, {}, {}, {}, {}> | null;
|
|
254
664
|
importInputRef: HTMLInputElement;
|
|
255
665
|
viewportRef: HTMLDivElement;
|
|
256
666
|
containerRef: HTMLDivElement;
|
|
@@ -267,6 +677,25 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
267
677
|
};
|
|
268
678
|
};
|
|
269
679
|
|
|
680
|
+
declare interface AssetRenderBudget {
|
|
681
|
+
/** Maximum newly rendered assets, default 1000. Existing imageData is kept unchanged. */
|
|
682
|
+
maxAssets?: number;
|
|
683
|
+
/** Maximum image payload bytes per new asset, default 32 MiB. */
|
|
684
|
+
maxImageBytes?: number;
|
|
685
|
+
/** Maximum total image payload bytes for new assets, default 128 MiB. */
|
|
686
|
+
maxTotalImageBytes?: number;
|
|
687
|
+
/** Wall-clock budget, including adapters that ignore AbortSignal. Default 30 seconds. */
|
|
688
|
+
maxDurationMs?: number;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
declare interface AssetRenderOptions extends OutputDiagnosticOptions {
|
|
692
|
+
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
693
|
+
assetBudget?: AssetRenderBudget;
|
|
694
|
+
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
695
|
+
assetFailure?: "throw" | "placeholder";
|
|
696
|
+
signal?: AbortSignal;
|
|
697
|
+
}
|
|
698
|
+
|
|
270
699
|
/** 供 HTML/Word 导出的完整文档;打印路径逐页渲染,避免预先生成所有页。 */
|
|
271
700
|
export declare function buildPrintDocument(p: RenderPlan): PrintHtmlResult;
|
|
272
701
|
|
|
@@ -280,9 +709,6 @@ export declare function buildWordHtml(p: RenderPlan): {
|
|
|
280
709
|
filename: string;
|
|
281
710
|
};
|
|
282
711
|
|
|
283
|
-
/** 检查失败只影响 PDF 诊断,不阻塞预览或其它输出。 */
|
|
284
|
-
declare function checkPdfFont(): Promise<PdfFontCheckResult>;
|
|
285
|
-
|
|
286
712
|
/**
|
|
287
713
|
* 列值格式化(声明式、JSON 可序列化)。
|
|
288
714
|
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
@@ -346,9 +772,17 @@ declare type ColumnFormat_3 = {
|
|
|
346
772
|
pattern?: string;
|
|
347
773
|
};
|
|
348
774
|
|
|
349
|
-
declare
|
|
775
|
+
declare interface ComponentImageContext {
|
|
776
|
+
readonly component: Readonly<PlanComponent>;
|
|
777
|
+
readonly pageIndex: number;
|
|
778
|
+
readonly componentIndex: number;
|
|
779
|
+
readonly componentPath: readonly number[];
|
|
780
|
+
readonly signal: AbortSignal;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
declare type ComponentImageRenderer = (context: ComponentImageContext) => string | Promise<string>;
|
|
350
784
|
|
|
351
|
-
declare type
|
|
785
|
+
declare type ComponentKind =
|
|
352
786
|
| "text"
|
|
353
787
|
| "image"
|
|
354
788
|
| "barcode"
|
|
@@ -358,6 +792,8 @@ declare type ComponentKind_2 =
|
|
|
358
792
|
| "rect"
|
|
359
793
|
| "ellipse";
|
|
360
794
|
|
|
795
|
+
declare type ComponentKind_2 = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
796
|
+
|
|
361
797
|
declare type ComponentKind_3 = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
362
798
|
|
|
363
799
|
declare interface ComponentStyle {
|
|
@@ -454,8 +890,20 @@ export declare function createFetchRequest(options?: FetchRequestOptions): HostR
|
|
|
454
890
|
*/
|
|
455
891
|
export declare function createLocalFetcher(entries: Record<string, LocalTemplateEntry> | ReportRegistry): PlanFetcher;
|
|
456
892
|
|
|
893
|
+
/** Explicit persistence bridge. Merely registering ReportProvider never enables editing or saving. */
|
|
894
|
+
export declare function createProviderEditing(provider: ReportProvider, options: ProviderEditingOptions): ReportEditingOptions;
|
|
895
|
+
|
|
896
|
+
/** Optional browser convenience adapter. Access errors are handled by the preview. */
|
|
897
|
+
export declare function createReportStoragePreferences(storage: Pick<Storage, "getItem" | "setItem" | "removeItem">): ReportPreferencesAdapter;
|
|
898
|
+
|
|
899
|
+
declare type Current<T> = T | (() => T);
|
|
900
|
+
|
|
901
|
+
declare interface DatasetContract { fields: readonly ReportFieldContract[]; rowKey?: string }
|
|
902
|
+
|
|
457
903
|
declare type DatasetRows = Record<string, Record<string, unknown>[]>;
|
|
458
904
|
|
|
905
|
+
declare interface DatasetValidationOptions { path?: string; maxRows?: number; maxCells?: number; maxIssues?: number }
|
|
906
|
+
|
|
459
907
|
export declare const DEFAULT_MESSAGES: MachReportMessages;
|
|
460
908
|
|
|
461
909
|
export declare const DEFAULT_THEME: MachReportTheme;
|
|
@@ -569,8 +1017,6 @@ declare interface ExcelImportResult_2 {
|
|
|
569
1017
|
sheets: ExcelImportedSheet_2[];
|
|
570
1018
|
}
|
|
571
1019
|
|
|
572
|
-
declare function exportAs(format: string): Promise<void>;
|
|
573
|
-
|
|
574
1020
|
export declare interface FetchRequestOptions {
|
|
575
1021
|
/** 网关前缀(默认空 = 同源) */
|
|
576
1022
|
baseUrl?: string;
|
|
@@ -581,9 +1027,7 @@ export declare interface FetchRequestOptions {
|
|
|
581
1027
|
timeoutMs?: number;
|
|
582
1028
|
}
|
|
583
1029
|
|
|
584
|
-
declare function
|
|
585
|
-
|
|
586
|
-
declare function gotoPage(n: number): void;
|
|
1030
|
+
declare function focusInvalid(): void;
|
|
587
1031
|
|
|
588
1032
|
declare interface GridCell {
|
|
589
1033
|
text?: string;
|
|
@@ -596,6 +1040,7 @@ declare interface GridCell {
|
|
|
596
1040
|
valueType?: "text" | "number" | "boolean";
|
|
597
1041
|
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
598
1042
|
editable?: boolean;
|
|
1043
|
+
source?: ReportCellSource;
|
|
599
1044
|
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
600
1045
|
formula?: string;
|
|
601
1046
|
children?: PlanComponent[];
|
|
@@ -615,6 +1060,7 @@ declare interface GridCell_2 {
|
|
|
615
1060
|
valueType?: "text" | "number" | "boolean";
|
|
616
1061
|
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
617
1062
|
editable?: boolean;
|
|
1063
|
+
source?: ReportCellSource_2;
|
|
618
1064
|
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
619
1065
|
formula?: string;
|
|
620
1066
|
children?: PlanComponent_2[];
|
|
@@ -634,6 +1080,7 @@ declare interface GridCell_3 {
|
|
|
634
1080
|
valueType?: "text" | "number" | "boolean";
|
|
635
1081
|
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
636
1082
|
editable?: boolean;
|
|
1083
|
+
source?: ReportCellSource_3;
|
|
637
1084
|
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
638
1085
|
formula?: string;
|
|
639
1086
|
children?: PlanComponent_3[];
|
|
@@ -651,16 +1098,15 @@ export declare type HostRequest = (config: {
|
|
|
651
1098
|
signal?: AbortSignal;
|
|
652
1099
|
}) => Promise<unknown>;
|
|
653
1100
|
|
|
654
|
-
|
|
655
|
-
declare function importExcel(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions): Promise<ExcelImportResult | null>;
|
|
1101
|
+
declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
656
1102
|
|
|
657
1103
|
export declare function joinReportIds(reportId: ReportIdInput): string;
|
|
658
1104
|
|
|
659
1105
|
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
660
|
-
declare type ListAlignment = NonNullable<
|
|
1106
|
+
declare type ListAlignment = NonNullable<ComponentStyle_2["align"]> | "auto";
|
|
661
1107
|
|
|
662
1108
|
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
663
|
-
declare type ListAlignment_2 = NonNullable<
|
|
1109
|
+
declare type ListAlignment_2 = NonNullable<ComponentStyle["align"]> | "auto";
|
|
664
1110
|
|
|
665
1111
|
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
666
1112
|
declare type ListAlignment_3 = NonNullable<ComponentStyle_3["align"]> | "auto";
|
|
@@ -669,13 +1115,13 @@ declare interface ListColumn {
|
|
|
669
1115
|
header: string;
|
|
670
1116
|
field: string;
|
|
671
1117
|
widthMm: number;
|
|
672
|
-
style?:
|
|
1118
|
+
style?: ComponentStyle_2;
|
|
673
1119
|
/** 内容对齐,优先于 style.align;数值字符串不会自动判为数字。 */
|
|
674
1120
|
align?: ListAlignment;
|
|
675
1121
|
/** 独立的表头对齐,不改变内容对齐。 */
|
|
676
|
-
headerAlign?:
|
|
1122
|
+
headerAlign?: ComponentStyle_2["align"];
|
|
677
1123
|
/** 独立的表头样式,优先于列表级表头样式。 */
|
|
678
|
-
headerStyle?:
|
|
1124
|
+
headerStyle?: ComponentStyle_2;
|
|
679
1125
|
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
680
1126
|
format?: ColumnFormat;
|
|
681
1127
|
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
@@ -683,20 +1129,22 @@ declare interface ListColumn {
|
|
|
683
1129
|
/** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
|
|
684
1130
|
editable?: boolean;
|
|
685
1131
|
/** 空值列或特殊数据类型可显式声明编辑输入类型。 */
|
|
686
|
-
valueType?:
|
|
1132
|
+
valueType?: GridCell_2["valueType"];
|
|
1133
|
+
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
1134
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
687
1135
|
}
|
|
688
1136
|
|
|
689
1137
|
declare interface ListColumn_2 {
|
|
690
1138
|
header: string;
|
|
691
1139
|
field: string;
|
|
692
1140
|
widthMm: number;
|
|
693
|
-
style?:
|
|
1141
|
+
style?: ComponentStyle;
|
|
694
1142
|
/** 内容对齐,优先于 style.align;数值字符串不会自动判为数字。 */
|
|
695
1143
|
align?: ListAlignment_2;
|
|
696
1144
|
/** 独立的表头对齐,不改变内容对齐。 */
|
|
697
|
-
headerAlign?:
|
|
1145
|
+
headerAlign?: ComponentStyle["align"];
|
|
698
1146
|
/** 独立的表头样式,优先于列表级表头样式。 */
|
|
699
|
-
headerStyle?:
|
|
1147
|
+
headerStyle?: ComponentStyle;
|
|
700
1148
|
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
701
1149
|
format?: ColumnFormat_2;
|
|
702
1150
|
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
@@ -704,7 +1152,9 @@ declare interface ListColumn_2 {
|
|
|
704
1152
|
/** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
|
|
705
1153
|
editable?: boolean;
|
|
706
1154
|
/** 空值列或特殊数据类型可显式声明编辑输入类型。 */
|
|
707
|
-
valueType?:
|
|
1155
|
+
valueType?: GridCell["valueType"];
|
|
1156
|
+
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
1157
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
708
1158
|
}
|
|
709
1159
|
|
|
710
1160
|
declare interface ListColumn_3 {
|
|
@@ -726,6 +1176,8 @@ declare interface ListColumn_3 {
|
|
|
726
1176
|
editable?: boolean;
|
|
727
1177
|
/** 空值列或特殊数据类型可显式声明编辑输入类型。 */
|
|
728
1178
|
valueType?: GridCell_3["valueType"];
|
|
1179
|
+
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
1180
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
729
1181
|
}
|
|
730
1182
|
|
|
731
1183
|
declare interface ListComponent {
|
|
@@ -739,6 +1191,10 @@ declare interface ListComponent {
|
|
|
739
1191
|
topMm: number;
|
|
740
1192
|
widthMm: number;
|
|
741
1193
|
dataset: string;
|
|
1194
|
+
/** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
|
|
1195
|
+
rowKey?: string;
|
|
1196
|
+
revisionField?: string;
|
|
1197
|
+
sourceTokenField?: string;
|
|
742
1198
|
columns: ListColumn[];
|
|
743
1199
|
fontSizePt?: number;
|
|
744
1200
|
headerBold?: boolean;
|
|
@@ -749,8 +1205,10 @@ declare interface ListComponent {
|
|
|
749
1205
|
/** 内容默认对齐,列配置可覆盖;低层模板缺省仍为 left。 */
|
|
750
1206
|
align?: ListAlignment;
|
|
751
1207
|
/** 表头默认对齐,列配置可覆盖。 */
|
|
752
|
-
headerAlign?:
|
|
753
|
-
headerStyle?:
|
|
1208
|
+
headerAlign?: ComponentStyle_2["align"];
|
|
1209
|
+
headerStyle?: ComponentStyle_2;
|
|
1210
|
+
/** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
|
|
1211
|
+
headerGrid?: PlanGrid_2;
|
|
754
1212
|
border?: boolean;
|
|
755
1213
|
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
756
1214
|
groupBy?: ListGroupBy;
|
|
@@ -769,6 +1227,10 @@ declare interface ListComponent_2 {
|
|
|
769
1227
|
topMm: number;
|
|
770
1228
|
widthMm: number;
|
|
771
1229
|
dataset: string;
|
|
1230
|
+
/** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
|
|
1231
|
+
rowKey?: string;
|
|
1232
|
+
revisionField?: string;
|
|
1233
|
+
sourceTokenField?: string;
|
|
772
1234
|
columns: ListColumn_2[];
|
|
773
1235
|
fontSizePt?: number;
|
|
774
1236
|
headerBold?: boolean;
|
|
@@ -779,8 +1241,10 @@ declare interface ListComponent_2 {
|
|
|
779
1241
|
/** 内容默认对齐,列配置可覆盖;低层模板缺省仍为 left。 */
|
|
780
1242
|
align?: ListAlignment_2;
|
|
781
1243
|
/** 表头默认对齐,列配置可覆盖。 */
|
|
782
|
-
headerAlign?:
|
|
783
|
-
headerStyle?:
|
|
1244
|
+
headerAlign?: ComponentStyle["align"];
|
|
1245
|
+
headerStyle?: ComponentStyle;
|
|
1246
|
+
/** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
|
|
1247
|
+
headerGrid?: PlanGrid;
|
|
784
1248
|
border?: boolean;
|
|
785
1249
|
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
786
1250
|
groupBy?: ListGroupBy_2;
|
|
@@ -799,6 +1263,10 @@ declare interface ListComponent_3 {
|
|
|
799
1263
|
topMm: number;
|
|
800
1264
|
widthMm: number;
|
|
801
1265
|
dataset: string;
|
|
1266
|
+
/** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
|
|
1267
|
+
rowKey?: string;
|
|
1268
|
+
revisionField?: string;
|
|
1269
|
+
sourceTokenField?: string;
|
|
802
1270
|
columns: ListColumn_3[];
|
|
803
1271
|
fontSizePt?: number;
|
|
804
1272
|
headerBold?: boolean;
|
|
@@ -811,6 +1279,8 @@ declare interface ListComponent_3 {
|
|
|
811
1279
|
/** 表头默认对齐,列配置可覆盖。 */
|
|
812
1280
|
headerAlign?: ComponentStyle_3["align"];
|
|
813
1281
|
headerStyle?: ComponentStyle_3;
|
|
1282
|
+
/** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
|
|
1283
|
+
headerGrid?: PlanGrid_3;
|
|
814
1284
|
border?: boolean;
|
|
815
1285
|
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
816
1286
|
groupBy?: ListGroupBy_3;
|
|
@@ -820,7 +1290,7 @@ declare interface ListComponent_3 {
|
|
|
820
1290
|
|
|
821
1291
|
declare type ListGrandTotal = boolean | {
|
|
822
1292
|
label?: string;
|
|
823
|
-
style?:
|
|
1293
|
+
style?: ComponentStyle_2;
|
|
824
1294
|
/** 合计列(缺省沿用 groupBy.subtotal) */
|
|
825
1295
|
fields?: string[];
|
|
826
1296
|
};
|
|
@@ -829,7 +1299,7 @@ declare type ListGrandTotal_2 =
|
|
|
829
1299
|
| boolean
|
|
830
1300
|
| {
|
|
831
1301
|
label?: string;
|
|
832
|
-
style?:
|
|
1302
|
+
style?: ComponentStyle;
|
|
833
1303
|
/** 合计列(缺省沿用 groupBy.subtotal) */
|
|
834
1304
|
fields?: string[];
|
|
835
1305
|
};
|
|
@@ -847,10 +1317,10 @@ declare interface ListGroupBy {
|
|
|
847
1317
|
field: string;
|
|
848
1318
|
/** 组头文案模板,{value} 占位(默认 "{value}") */
|
|
849
1319
|
headerTemplate?: string;
|
|
850
|
-
headerStyle?:
|
|
1320
|
+
headerStyle?: ComponentStyle_2;
|
|
851
1321
|
/** 需要小计的列字段(组尾输出合计行;数值列求和,其余输出首值/留空) */
|
|
852
1322
|
subtotal?: string[];
|
|
853
|
-
subtotalStyle?:
|
|
1323
|
+
subtotalStyle?: ComponentStyle_2;
|
|
854
1324
|
subtotalLabel?: string;
|
|
855
1325
|
/** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
|
|
856
1326
|
keepWithNext?: boolean;
|
|
@@ -862,10 +1332,10 @@ declare interface ListGroupBy_2 {
|
|
|
862
1332
|
field: string;
|
|
863
1333
|
/** 组头文案模板,{value} 占位(默认 "{value}") */
|
|
864
1334
|
headerTemplate?: string;
|
|
865
|
-
headerStyle?:
|
|
1335
|
+
headerStyle?: ComponentStyle;
|
|
866
1336
|
/** 需要小计的列字段(组尾输出合计行;数值列求和,其余输出首值/留空) */
|
|
867
1337
|
subtotal?: string[];
|
|
868
|
-
subtotalStyle?:
|
|
1338
|
+
subtotalStyle?: ComponentStyle;
|
|
869
1339
|
subtotalLabel?: string;
|
|
870
1340
|
/** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
|
|
871
1341
|
keepWithNext?: boolean;
|
|
@@ -937,6 +1407,15 @@ export declare interface MachReportController {
|
|
|
937
1407
|
/** Copies prevent consumers from mutating the preview's current snapshot. */
|
|
938
1408
|
getPlan?(): RenderPlan | null;
|
|
939
1409
|
getChanges?(): ReportCellEdit_2[];
|
|
1410
|
+
getDifferences?(): ReportCellEdit_2[];
|
|
1411
|
+
undo?(): Promise<boolean>;
|
|
1412
|
+
redo?(): Promise<boolean>;
|
|
1413
|
+
restoreChanges?(): Promise<boolean>;
|
|
1414
|
+
getSelection?(): ReportCellSelection | null;
|
|
1415
|
+
focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
|
|
1416
|
+
focusField?(target: ReportFieldTarget): Promise<boolean>;
|
|
1417
|
+
copySelection?(): string;
|
|
1418
|
+
pasteSelection?(text: string): Promise<boolean>;
|
|
940
1419
|
}
|
|
941
1420
|
|
|
942
1421
|
/** defaults 层可配置项(全部可选,均有内置缺省) */
|
|
@@ -944,6 +1423,13 @@ export declare interface MachReportDefaults {
|
|
|
944
1423
|
showExport?: boolean;
|
|
945
1424
|
showPrint?: boolean;
|
|
946
1425
|
showPdfWindow?: boolean;
|
|
1426
|
+
/** 设置入口默认显示;可在其中按需启用阅读及输出工具。 */
|
|
1427
|
+
showSettings?: boolean;
|
|
1428
|
+
toolbar?: MachReportToolbarOptions;
|
|
1429
|
+
interaction?: ReportInteractionOptions;
|
|
1430
|
+
preferences?: ReportPreferencesOptions;
|
|
1431
|
+
/** Prepare optional image/chart/QR/barcode adapters once for preview and all outputs. */
|
|
1432
|
+
assets?: AssetRenderOptions;
|
|
947
1433
|
/** 参数面板显隐(有参数定义且未显式关闭时显示;缺省 true) */
|
|
948
1434
|
showParams?: boolean;
|
|
949
1435
|
/** 页间距 px */
|
|
@@ -994,6 +1480,15 @@ export declare interface MachReportHandle extends MachReportController {
|
|
|
994
1480
|
importExcel(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions): Promise<ExcelImportResult | null>;
|
|
995
1481
|
getPlan(): RenderPlan | null;
|
|
996
1482
|
getChanges(): ReportCellEdit_2[];
|
|
1483
|
+
getDifferences(): ReportCellEdit_2[];
|
|
1484
|
+
undo(): Promise<boolean>;
|
|
1485
|
+
redo(): Promise<boolean>;
|
|
1486
|
+
restoreChanges(): Promise<boolean>;
|
|
1487
|
+
getSelection(): ReportCellSelection | null;
|
|
1488
|
+
focusCell(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
|
|
1489
|
+
focusField(target: ReportFieldTarget): Promise<boolean>;
|
|
1490
|
+
copySelection(): string;
|
|
1491
|
+
pasteSelection(text: string): Promise<boolean>;
|
|
997
1492
|
}
|
|
998
1493
|
|
|
999
1494
|
/** 日志通道(默认 console;可注入 noop 静默或上报 collector) */
|
|
@@ -1044,6 +1539,11 @@ export declare interface MachReportMessages {
|
|
|
1044
1539
|
reset: string;
|
|
1045
1540
|
/** 必填缺失提示({label} 占位) */
|
|
1046
1541
|
paramRequired: string;
|
|
1542
|
+
paramInvalid?: string;
|
|
1543
|
+
paramPrompt?: string;
|
|
1544
|
+
paramPromptDescription?: string;
|
|
1545
|
+
paramSelectPlaceholder?: string;
|
|
1546
|
+
paramTextPlaceholder?: string;
|
|
1047
1547
|
/** 可选搜索进度文案,旧完整 messages 对象无需新增字段。 */
|
|
1048
1548
|
searching?: string;
|
|
1049
1549
|
importExcel?: string;
|
|
@@ -1054,6 +1554,51 @@ export declare interface MachReportMessages {
|
|
|
1054
1554
|
editInvalidNumber?: string;
|
|
1055
1555
|
editInvalidBoolean?: string;
|
|
1056
1556
|
editConflict?: string;
|
|
1557
|
+
settings?: string;
|
|
1558
|
+
settingsDisplay?: string;
|
|
1559
|
+
settingsExport?: string;
|
|
1560
|
+
settingsData?: string;
|
|
1561
|
+
settingsUnavailable?: string;
|
|
1562
|
+
settingsReset?: string;
|
|
1563
|
+
settingsClose?: string;
|
|
1564
|
+
search?: string;
|
|
1565
|
+
closeSearch?: string;
|
|
1566
|
+
prevSearchMatch?: string;
|
|
1567
|
+
nextSearchMatch?: string;
|
|
1568
|
+
zoom?: string;
|
|
1569
|
+
settingsLocal?: string;
|
|
1570
|
+
editingLocal?: string;
|
|
1571
|
+
editingSaved?: string;
|
|
1572
|
+
importLocal?: string;
|
|
1573
|
+
emptyDescription?: string;
|
|
1574
|
+
undo?: string;
|
|
1575
|
+
redo?: string;
|
|
1576
|
+
restoreChanges?: string;
|
|
1577
|
+
changes?: string;
|
|
1578
|
+
changesCount?: string;
|
|
1579
|
+
changesEmpty?: string;
|
|
1580
|
+
changesBefore?: string;
|
|
1581
|
+
changesAfter?: string;
|
|
1582
|
+
editAtomicRequired?: string;
|
|
1583
|
+
clipboardLimit?: string;
|
|
1584
|
+
preferencesError?: string;
|
|
1585
|
+
freezeHeaders?: string;
|
|
1586
|
+
frozenColumns?: string;
|
|
1587
|
+
sections?: string;
|
|
1588
|
+
locateField?: string;
|
|
1589
|
+
locateFieldPlaceholder?: string;
|
|
1590
|
+
locateFieldMissing?: string;
|
|
1591
|
+
importSummary?: string;
|
|
1592
|
+
importPreserved?: string;
|
|
1593
|
+
importWarnings?: string;
|
|
1594
|
+
importReadOnly?: string;
|
|
1595
|
+
conflicts?: string;
|
|
1596
|
+
editReadOnly?: string;
|
|
1597
|
+
editMissing?: string;
|
|
1598
|
+
editDuplicate?: string;
|
|
1599
|
+
clipboardInvalid?: string;
|
|
1600
|
+
editSaved?: string;
|
|
1601
|
+
settingsPanes?: string;
|
|
1057
1602
|
}
|
|
1058
1603
|
|
|
1059
1604
|
/**
|
|
@@ -1121,6 +1666,30 @@ export declare const MachReportPreview: {
|
|
|
1121
1666
|
type: BooleanConstructor;
|
|
1122
1667
|
default: undefined;
|
|
1123
1668
|
};
|
|
1669
|
+
showSettings: {
|
|
1670
|
+
type: BooleanConstructor;
|
|
1671
|
+
default: undefined;
|
|
1672
|
+
};
|
|
1673
|
+
toolbar: {
|
|
1674
|
+
type: PropType<MachReportToolbarOptions>;
|
|
1675
|
+
default: undefined;
|
|
1676
|
+
};
|
|
1677
|
+
interaction: {
|
|
1678
|
+
type: PropType<ReportInteractionOptions>;
|
|
1679
|
+
default: undefined;
|
|
1680
|
+
};
|
|
1681
|
+
preferences: {
|
|
1682
|
+
type: PropType<ReportPreferencesOptions>;
|
|
1683
|
+
default: undefined;
|
|
1684
|
+
};
|
|
1685
|
+
assets: {
|
|
1686
|
+
type: PropType<AssetRenderOptions>;
|
|
1687
|
+
default: undefined;
|
|
1688
|
+
};
|
|
1689
|
+
emptyState: {
|
|
1690
|
+
type: PropType<boolean | ReportEmptyState>;
|
|
1691
|
+
default: boolean;
|
|
1692
|
+
};
|
|
1124
1693
|
gapPx: {
|
|
1125
1694
|
type: NumberConstructor;
|
|
1126
1695
|
default: undefined;
|
|
@@ -1158,37 +1727,48 @@ export declare const MachReportPreview: {
|
|
|
1158
1727
|
default: null;
|
|
1159
1728
|
};
|
|
1160
1729
|
}>> & Readonly<{
|
|
1730
|
+
onWarning?: ((message: string) => any) | undefined;
|
|
1161
1731
|
onError?: ((message: string, detail?: {
|
|
1162
1732
|
code: string;
|
|
1163
1733
|
cause?: unknown;
|
|
1164
1734
|
} | undefined) => any) | undefined;
|
|
1165
1735
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
1166
|
-
onWarning?: ((message: string) => any) | undefined;
|
|
1167
1736
|
"onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
|
|
1168
1737
|
"onTemplate-import"?: ((result: ExcelImportResult_2) => any) | undefined;
|
|
1738
|
+
"onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
|
|
1169
1739
|
}>, {
|
|
1170
|
-
reload: () => Promise<void>;
|
|
1171
|
-
print: () => Promise<void>;
|
|
1172
|
-
exportAs: (format: string) => Promise<void>;
|
|
1173
|
-
openPdfWindow: () => void;
|
|
1174
|
-
gotoPage: (n: number) => void;
|
|
1175
|
-
setParams: (values: Record<string, string>, opts?: {
|
|
1176
|
-
reload?: boolean;
|
|
1177
|
-
}) => Promise<void>;
|
|
1178
|
-
checkPdfFont: () => Promise<PdfFontCheckResult>;
|
|
1179
|
-
importExcel: (input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2) => Promise<ExcelImportResult_2 | null>;
|
|
1180
|
-
getPlan: () => RenderPlan | null;
|
|
1181
|
-
getChanges: () => ReportCellEdit_2[];
|
|
1182
1740
|
state: ComputedRef<MachReportState>;
|
|
1741
|
+
checkPdfFont?(): Promise<PdfFontCheckResult>;
|
|
1742
|
+
reload(): Promise<void>;
|
|
1743
|
+
print(): Promise<void>;
|
|
1744
|
+
exportAs(format: string): Promise<void> | void;
|
|
1745
|
+
openPdfWindow(): void;
|
|
1746
|
+
gotoPage(page: number): void;
|
|
1747
|
+
setParams(values: Record<string, string>, opts?: {
|
|
1748
|
+
reload?: boolean;
|
|
1749
|
+
}): Promise<void> | void;
|
|
1750
|
+
importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2): Promise<ExcelImportResult_2 | null>;
|
|
1751
|
+
getPlan?(): RenderPlan | null;
|
|
1752
|
+
getChanges?(): ReportCellEdit_2[];
|
|
1753
|
+
getDifferences?(): ReportCellEdit_2[];
|
|
1754
|
+
undo?(): Promise<boolean>;
|
|
1755
|
+
redo?(): Promise<boolean>;
|
|
1756
|
+
restoreChanges?(): Promise<boolean>;
|
|
1757
|
+
getSelection?(): ReportCellSelection | null;
|
|
1758
|
+
focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
|
|
1759
|
+
focusField?(target: ReportFieldTarget): Promise<boolean>;
|
|
1760
|
+
copySelection?(): string;
|
|
1761
|
+
pasteSelection?(text: string): Promise<boolean>;
|
|
1183
1762
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1763
|
+
warning: (message: string) => any;
|
|
1184
1764
|
error: (message: string, detail?: {
|
|
1185
1765
|
code: string;
|
|
1186
1766
|
cause?: unknown;
|
|
1187
1767
|
} | undefined) => any;
|
|
1188
1768
|
loaded: (pageCount: number) => any;
|
|
1189
|
-
warning: (message: string) => any;
|
|
1190
1769
|
"cell-edit": (edit: ReportCellEdit_2) => any;
|
|
1191
1770
|
"template-import": (result: ExcelImportResult_2) => any;
|
|
1771
|
+
"preferences-change": (preferences: Readonly<ReportPreviewPreferences>) => any;
|
|
1192
1772
|
}, PublicProps, {
|
|
1193
1773
|
editable: boolean | ReportEditingOptions;
|
|
1194
1774
|
height: string;
|
|
@@ -1199,14 +1779,159 @@ export declare const MachReportPreview: {
|
|
|
1199
1779
|
showExport: boolean;
|
|
1200
1780
|
showPrint: boolean;
|
|
1201
1781
|
showPdfWindow: boolean;
|
|
1782
|
+
showSettings: boolean;
|
|
1202
1783
|
showParams: boolean;
|
|
1784
|
+
toolbar: MachReportToolbarOptions;
|
|
1785
|
+
interaction: ReportInteractionOptions;
|
|
1786
|
+
preferences: ReportPreferencesOptions;
|
|
1787
|
+
assets: AssetRenderOptions;
|
|
1203
1788
|
messages: Partial<MachReportMessages>;
|
|
1204
1789
|
excelImport: boolean | ExcelImportOptions_2;
|
|
1205
1790
|
autoLoad: boolean;
|
|
1791
|
+
emptyState: boolean | ReportEmptyState;
|
|
1206
1792
|
preset: string;
|
|
1207
1793
|
paramDefs: ReportParamDef[] | undefined;
|
|
1208
1794
|
fetcher: PlanFetcher | null;
|
|
1209
1795
|
}, true, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
1796
|
+
paramPanelRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
1797
|
+
defs: ReportParamDef[];
|
|
1798
|
+
modelValue: Record<string, string>;
|
|
1799
|
+
messages: MachReportMessages;
|
|
1800
|
+
attempted: boolean;
|
|
1801
|
+
issues?: readonly ReportParamIssue[];
|
|
1802
|
+
}> & Readonly<{
|
|
1803
|
+
onReset?: (() => any) | undefined;
|
|
1804
|
+
onQuery?: (() => any) | undefined;
|
|
1805
|
+
"onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
|
|
1806
|
+
}>, {
|
|
1807
|
+
focusInvalid: () => void;
|
|
1808
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1809
|
+
reset: () => any;
|
|
1810
|
+
query: () => any;
|
|
1811
|
+
"update:modelValue": (value: Record<string, string>) => any;
|
|
1812
|
+
}, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
1813
|
+
root: HTMLDivElement;
|
|
1814
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
1815
|
+
P: {};
|
|
1816
|
+
B: {};
|
|
1817
|
+
D: {};
|
|
1818
|
+
C: {};
|
|
1819
|
+
M: {};
|
|
1820
|
+
Defaults: {};
|
|
1821
|
+
}, Readonly<{
|
|
1822
|
+
defs: ReportParamDef[];
|
|
1823
|
+
modelValue: Record<string, string>;
|
|
1824
|
+
messages: MachReportMessages;
|
|
1825
|
+
attempted: boolean;
|
|
1826
|
+
issues?: readonly ReportParamIssue[];
|
|
1827
|
+
}> & Readonly<{
|
|
1828
|
+
onReset?: (() => any) | undefined;
|
|
1829
|
+
onQuery?: (() => any) | undefined;
|
|
1830
|
+
"onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
|
|
1831
|
+
}>, {
|
|
1832
|
+
focusInvalid: () => void;
|
|
1833
|
+
}, {}, {}, {}, {}> | null;
|
|
1834
|
+
toolbarRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
1835
|
+
pageCount: number;
|
|
1836
|
+
currentPage: number;
|
|
1837
|
+
zoomMode: "fit" | "raw";
|
|
1838
|
+
zoom: number;
|
|
1839
|
+
showExport: boolean;
|
|
1840
|
+
showPrint: boolean;
|
|
1841
|
+
showPdfWindow: boolean;
|
|
1842
|
+
messages: MachReportMessages;
|
|
1843
|
+
search: {
|
|
1844
|
+
visible: boolean;
|
|
1845
|
+
query: string;
|
|
1846
|
+
matchIndex: number;
|
|
1847
|
+
matchCount: number;
|
|
1848
|
+
searching?: boolean;
|
|
1849
|
+
};
|
|
1850
|
+
thumbsVisible: boolean;
|
|
1851
|
+
showImport?: boolean;
|
|
1852
|
+
showSearch?: boolean;
|
|
1853
|
+
showThumbnails?: boolean;
|
|
1854
|
+
showZoom?: boolean;
|
|
1855
|
+
exportFormats?: readonly ReportExportFormat[];
|
|
1856
|
+
showSettings?: boolean;
|
|
1857
|
+
settingsOpen?: boolean;
|
|
1858
|
+
busy?: boolean;
|
|
1859
|
+
}> & Readonly<{
|
|
1860
|
+
onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
|
|
1861
|
+
onPrint?: (() => any) | undefined;
|
|
1862
|
+
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
1863
|
+
onGoto?: ((page: number) => any) | undefined;
|
|
1864
|
+
"onPdf-window"?: (() => any) | undefined;
|
|
1865
|
+
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
1866
|
+
"onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
|
|
1867
|
+
"onSearch-toggle"?: (() => any) | undefined;
|
|
1868
|
+
"onThumbs-toggle"?: (() => any) | undefined;
|
|
1869
|
+
"onImport-excel"?: (() => any) | undefined;
|
|
1870
|
+
"onSettings-toggle"?: (() => any) | undefined;
|
|
1871
|
+
}>, {
|
|
1872
|
+
focusSearch: () => void;
|
|
1873
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1874
|
+
export: (format: "pdf" | "xlsx" | "html" | "png" | "word") => any;
|
|
1875
|
+
print: () => any;
|
|
1876
|
+
zoom: (mode: number | "fit") => any;
|
|
1877
|
+
goto: (page: number) => any;
|
|
1878
|
+
"pdf-window": () => any;
|
|
1879
|
+
"search-input": (query: string) => any;
|
|
1880
|
+
"search-nav": (dir: 1 | -1) => any;
|
|
1881
|
+
"search-toggle": () => any;
|
|
1882
|
+
"thumbs-toggle": () => any;
|
|
1883
|
+
"import-excel": () => any;
|
|
1884
|
+
"settings-toggle": () => any;
|
|
1885
|
+
}, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
1886
|
+
searchInputRef: HTMLInputElement;
|
|
1887
|
+
searchToggleRef: HTMLButtonElement;
|
|
1888
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
1889
|
+
P: {};
|
|
1890
|
+
B: {};
|
|
1891
|
+
D: {};
|
|
1892
|
+
C: {};
|
|
1893
|
+
M: {};
|
|
1894
|
+
Defaults: {};
|
|
1895
|
+
}, Readonly<{
|
|
1896
|
+
pageCount: number;
|
|
1897
|
+
currentPage: number;
|
|
1898
|
+
zoomMode: "fit" | "raw";
|
|
1899
|
+
zoom: number;
|
|
1900
|
+
showExport: boolean;
|
|
1901
|
+
showPrint: boolean;
|
|
1902
|
+
showPdfWindow: boolean;
|
|
1903
|
+
messages: MachReportMessages;
|
|
1904
|
+
search: {
|
|
1905
|
+
visible: boolean;
|
|
1906
|
+
query: string;
|
|
1907
|
+
matchIndex: number;
|
|
1908
|
+
matchCount: number;
|
|
1909
|
+
searching?: boolean;
|
|
1910
|
+
};
|
|
1911
|
+
thumbsVisible: boolean;
|
|
1912
|
+
showImport?: boolean;
|
|
1913
|
+
showSearch?: boolean;
|
|
1914
|
+
showThumbnails?: boolean;
|
|
1915
|
+
showZoom?: boolean;
|
|
1916
|
+
exportFormats?: readonly ReportExportFormat[];
|
|
1917
|
+
showSettings?: boolean;
|
|
1918
|
+
settingsOpen?: boolean;
|
|
1919
|
+
busy?: boolean;
|
|
1920
|
+
}> & Readonly<{
|
|
1921
|
+
onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
|
|
1922
|
+
onPrint?: (() => any) | undefined;
|
|
1923
|
+
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
1924
|
+
onGoto?: ((page: number) => any) | undefined;
|
|
1925
|
+
"onPdf-window"?: (() => any) | undefined;
|
|
1926
|
+
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
1927
|
+
"onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
|
|
1928
|
+
"onSearch-toggle"?: (() => any) | undefined;
|
|
1929
|
+
"onThumbs-toggle"?: (() => any) | undefined;
|
|
1930
|
+
"onImport-excel"?: (() => any) | undefined;
|
|
1931
|
+
"onSettings-toggle"?: (() => any) | undefined;
|
|
1932
|
+
}>, {
|
|
1933
|
+
focusSearch: () => void;
|
|
1934
|
+
}, {}, {}, {}, {}> | null;
|
|
1210
1935
|
importInputRef: HTMLInputElement;
|
|
1211
1936
|
viewportRef: HTMLDivElement;
|
|
1212
1937
|
containerRef: HTMLDivElement;
|
|
@@ -1247,6 +1972,30 @@ export declare const MachReportPreview: {
|
|
|
1247
1972
|
type: BooleanConstructor;
|
|
1248
1973
|
default: undefined;
|
|
1249
1974
|
};
|
|
1975
|
+
showSettings: {
|
|
1976
|
+
type: BooleanConstructor;
|
|
1977
|
+
default: undefined;
|
|
1978
|
+
};
|
|
1979
|
+
toolbar: {
|
|
1980
|
+
type: PropType<MachReportToolbarOptions>;
|
|
1981
|
+
default: undefined;
|
|
1982
|
+
};
|
|
1983
|
+
interaction: {
|
|
1984
|
+
type: PropType<ReportInteractionOptions>;
|
|
1985
|
+
default: undefined;
|
|
1986
|
+
};
|
|
1987
|
+
preferences: {
|
|
1988
|
+
type: PropType<ReportPreferencesOptions>;
|
|
1989
|
+
default: undefined;
|
|
1990
|
+
};
|
|
1991
|
+
assets: {
|
|
1992
|
+
type: PropType<AssetRenderOptions>;
|
|
1993
|
+
default: undefined;
|
|
1994
|
+
};
|
|
1995
|
+
emptyState: {
|
|
1996
|
+
type: PropType<boolean | ReportEmptyState>;
|
|
1997
|
+
default: boolean;
|
|
1998
|
+
};
|
|
1250
1999
|
gapPx: {
|
|
1251
2000
|
type: NumberConstructor;
|
|
1252
2001
|
default: undefined;
|
|
@@ -1284,28 +2033,38 @@ export declare const MachReportPreview: {
|
|
|
1284
2033
|
default: null;
|
|
1285
2034
|
};
|
|
1286
2035
|
}>> & Readonly<{
|
|
2036
|
+
onWarning?: ((message: string) => any) | undefined;
|
|
1287
2037
|
onError?: ((message: string, detail?: {
|
|
1288
2038
|
code: string;
|
|
1289
2039
|
cause?: unknown;
|
|
1290
2040
|
} | undefined) => any) | undefined;
|
|
1291
2041
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
1292
|
-
onWarning?: ((message: string) => any) | undefined;
|
|
1293
2042
|
"onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
|
|
1294
2043
|
"onTemplate-import"?: ((result: ExcelImportResult_2) => any) | undefined;
|
|
2044
|
+
"onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
|
|
1295
2045
|
}>, {
|
|
1296
|
-
reload: () => Promise<void>;
|
|
1297
|
-
print: () => Promise<void>;
|
|
1298
|
-
exportAs: (format: string) => Promise<void>;
|
|
1299
|
-
openPdfWindow: () => void;
|
|
1300
|
-
gotoPage: (n: number) => void;
|
|
1301
|
-
setParams: (values: Record<string, string>, opts?: {
|
|
1302
|
-
reload?: boolean;
|
|
1303
|
-
}) => Promise<void>;
|
|
1304
|
-
checkPdfFont: () => Promise<PdfFontCheckResult>;
|
|
1305
|
-
importExcel: (input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2) => Promise<ExcelImportResult_2 | null>;
|
|
1306
|
-
getPlan: () => RenderPlan | null;
|
|
1307
|
-
getChanges: () => ReportCellEdit_2[];
|
|
1308
2046
|
state: ComputedRef<MachReportState>;
|
|
2047
|
+
checkPdfFont?(): Promise<PdfFontCheckResult>;
|
|
2048
|
+
reload(): Promise<void>;
|
|
2049
|
+
print(): Promise<void>;
|
|
2050
|
+
exportAs(format: string): Promise<void> | void;
|
|
2051
|
+
openPdfWindow(): void;
|
|
2052
|
+
gotoPage(page: number): void;
|
|
2053
|
+
setParams(values: Record<string, string>, opts?: {
|
|
2054
|
+
reload?: boolean;
|
|
2055
|
+
}): Promise<void> | void;
|
|
2056
|
+
importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2): Promise<ExcelImportResult_2 | null>;
|
|
2057
|
+
getPlan?(): RenderPlan | null;
|
|
2058
|
+
getChanges?(): ReportCellEdit_2[];
|
|
2059
|
+
getDifferences?(): ReportCellEdit_2[];
|
|
2060
|
+
undo?(): Promise<boolean>;
|
|
2061
|
+
redo?(): Promise<boolean>;
|
|
2062
|
+
restoreChanges?(): Promise<boolean>;
|
|
2063
|
+
getSelection?(): ReportCellSelection | null;
|
|
2064
|
+
focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
|
|
2065
|
+
focusField?(target: ReportFieldTarget): Promise<boolean>;
|
|
2066
|
+
copySelection?(): string;
|
|
2067
|
+
pasteSelection?(text: string): Promise<boolean>;
|
|
1309
2068
|
}, {}, {}, {}, {
|
|
1310
2069
|
editable: boolean | ReportEditingOptions;
|
|
1311
2070
|
height: string;
|
|
@@ -1316,10 +2075,16 @@ export declare const MachReportPreview: {
|
|
|
1316
2075
|
showExport: boolean;
|
|
1317
2076
|
showPrint: boolean;
|
|
1318
2077
|
showPdfWindow: boolean;
|
|
2078
|
+
showSettings: boolean;
|
|
1319
2079
|
showParams: boolean;
|
|
2080
|
+
toolbar: MachReportToolbarOptions;
|
|
2081
|
+
interaction: ReportInteractionOptions;
|
|
2082
|
+
preferences: ReportPreferencesOptions;
|
|
2083
|
+
assets: AssetRenderOptions;
|
|
1320
2084
|
messages: Partial<MachReportMessages>;
|
|
1321
2085
|
excelImport: boolean | ExcelImportOptions_2;
|
|
1322
2086
|
autoLoad: boolean;
|
|
2087
|
+
emptyState: boolean | ReportEmptyState;
|
|
1323
2088
|
preset: string;
|
|
1324
2089
|
paramDefs: ReportParamDef[] | undefined;
|
|
1325
2090
|
fetcher: PlanFetcher | null;
|
|
@@ -1356,6 +2121,30 @@ showPdfWindow: {
|
|
|
1356
2121
|
type: BooleanConstructor;
|
|
1357
2122
|
default: undefined;
|
|
1358
2123
|
};
|
|
2124
|
+
showSettings: {
|
|
2125
|
+
type: BooleanConstructor;
|
|
2126
|
+
default: undefined;
|
|
2127
|
+
};
|
|
2128
|
+
toolbar: {
|
|
2129
|
+
type: PropType<MachReportToolbarOptions>;
|
|
2130
|
+
default: undefined;
|
|
2131
|
+
};
|
|
2132
|
+
interaction: {
|
|
2133
|
+
type: PropType<ReportInteractionOptions>;
|
|
2134
|
+
default: undefined;
|
|
2135
|
+
};
|
|
2136
|
+
preferences: {
|
|
2137
|
+
type: PropType<ReportPreferencesOptions>;
|
|
2138
|
+
default: undefined;
|
|
2139
|
+
};
|
|
2140
|
+
assets: {
|
|
2141
|
+
type: PropType<AssetRenderOptions>;
|
|
2142
|
+
default: undefined;
|
|
2143
|
+
};
|
|
2144
|
+
emptyState: {
|
|
2145
|
+
type: PropType<boolean | ReportEmptyState>;
|
|
2146
|
+
default: boolean;
|
|
2147
|
+
};
|
|
1359
2148
|
gapPx: {
|
|
1360
2149
|
type: NumberConstructor;
|
|
1361
2150
|
default: undefined;
|
|
@@ -1393,37 +2182,48 @@ type: PropType<PlanFetcher | null>;
|
|
|
1393
2182
|
default: null;
|
|
1394
2183
|
};
|
|
1395
2184
|
}>> & Readonly<{
|
|
2185
|
+
onWarning?: ((message: string) => any) | undefined;
|
|
1396
2186
|
onError?: ((message: string, detail?: {
|
|
1397
2187
|
code: string;
|
|
1398
2188
|
cause?: unknown;
|
|
1399
2189
|
} | undefined) => any) | undefined;
|
|
1400
2190
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
1401
|
-
onWarning?: ((message: string) => any) | undefined;
|
|
1402
2191
|
"onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
|
|
1403
2192
|
"onTemplate-import"?: ((result: ExcelImportResult_2) => any) | undefined;
|
|
2193
|
+
"onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
|
|
1404
2194
|
}>, {
|
|
1405
|
-
reload: () => Promise<void>;
|
|
1406
|
-
print: () => Promise<void>;
|
|
1407
|
-
exportAs: (format: string) => Promise<void>;
|
|
1408
|
-
openPdfWindow: () => void;
|
|
1409
|
-
gotoPage: (n: number) => void;
|
|
1410
|
-
setParams: (values: Record<string, string>, opts?: {
|
|
1411
|
-
reload?: boolean;
|
|
1412
|
-
}) => Promise<void>;
|
|
1413
|
-
checkPdfFont: () => Promise<PdfFontCheckResult>;
|
|
1414
|
-
importExcel: (input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2) => Promise<ExcelImportResult_2 | null>;
|
|
1415
|
-
getPlan: () => RenderPlan | null;
|
|
1416
|
-
getChanges: () => ReportCellEdit_2[];
|
|
1417
2195
|
state: ComputedRef<MachReportState>;
|
|
2196
|
+
checkPdfFont?(): Promise<PdfFontCheckResult>;
|
|
2197
|
+
reload(): Promise<void>;
|
|
2198
|
+
print(): Promise<void>;
|
|
2199
|
+
exportAs(format: string): Promise<void> | void;
|
|
2200
|
+
openPdfWindow(): void;
|
|
2201
|
+
gotoPage(page: number): void;
|
|
2202
|
+
setParams(values: Record<string, string>, opts?: {
|
|
2203
|
+
reload?: boolean;
|
|
2204
|
+
}): Promise<void> | void;
|
|
2205
|
+
importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2): Promise<ExcelImportResult_2 | null>;
|
|
2206
|
+
getPlan?(): RenderPlan | null;
|
|
2207
|
+
getChanges?(): ReportCellEdit_2[];
|
|
2208
|
+
getDifferences?(): ReportCellEdit_2[];
|
|
2209
|
+
undo?(): Promise<boolean>;
|
|
2210
|
+
redo?(): Promise<boolean>;
|
|
2211
|
+
restoreChanges?(): Promise<boolean>;
|
|
2212
|
+
getSelection?(): ReportCellSelection | null;
|
|
2213
|
+
focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
|
|
2214
|
+
focusField?(target: ReportFieldTarget): Promise<boolean>;
|
|
2215
|
+
copySelection?(): string;
|
|
2216
|
+
pasteSelection?(text: string): Promise<boolean>;
|
|
1418
2217
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2218
|
+
warning: (message: string) => any;
|
|
1419
2219
|
error: (message: string, detail?: {
|
|
1420
2220
|
code: string;
|
|
1421
2221
|
cause?: unknown;
|
|
1422
2222
|
} | undefined) => any;
|
|
1423
2223
|
loaded: (pageCount: number) => any;
|
|
1424
|
-
warning: (message: string) => any;
|
|
1425
2224
|
"cell-edit": (edit: ReportCellEdit_2) => any;
|
|
1426
2225
|
"template-import": (result: ExcelImportResult_2) => any;
|
|
2226
|
+
"preferences-change": (preferences: Readonly<ReportPreviewPreferences>) => any;
|
|
1427
2227
|
}, string, {
|
|
1428
2228
|
editable: boolean | ReportEditingOptions;
|
|
1429
2229
|
height: string;
|
|
@@ -1434,15 +2234,22 @@ debug: boolean;
|
|
|
1434
2234
|
showExport: boolean;
|
|
1435
2235
|
showPrint: boolean;
|
|
1436
2236
|
showPdfWindow: boolean;
|
|
2237
|
+
showSettings: boolean;
|
|
1437
2238
|
showParams: boolean;
|
|
2239
|
+
toolbar: MachReportToolbarOptions;
|
|
2240
|
+
interaction: ReportInteractionOptions;
|
|
2241
|
+
preferences: ReportPreferencesOptions;
|
|
2242
|
+
assets: AssetRenderOptions;
|
|
1438
2243
|
messages: Partial<MachReportMessages>;
|
|
1439
2244
|
excelImport: boolean | ExcelImportOptions_2;
|
|
1440
2245
|
autoLoad: boolean;
|
|
2246
|
+
emptyState: boolean | ReportEmptyState;
|
|
1441
2247
|
preset: string;
|
|
1442
2248
|
paramDefs: ReportParamDef[] | undefined;
|
|
1443
2249
|
fetcher: PlanFetcher | null;
|
|
1444
2250
|
}, {}, string, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
1445
2251
|
$slots: {
|
|
2252
|
+
settings?(_: {}): any;
|
|
1446
2253
|
default?(_: {}): any;
|
|
1447
2254
|
};
|
|
1448
2255
|
});
|
|
@@ -1472,6 +2279,10 @@ export declare interface MachReportState {
|
|
|
1472
2279
|
readonly saving?: boolean;
|
|
1473
2280
|
readonly importing?: boolean;
|
|
1474
2281
|
readonly dirty?: boolean;
|
|
2282
|
+
readonly canUndo?: boolean;
|
|
2283
|
+
readonly canRedo?: boolean;
|
|
2284
|
+
readonly changeCount?: number;
|
|
2285
|
+
readonly selection?: Readonly<ReportCellSelection> | null;
|
|
1475
2286
|
}
|
|
1476
2287
|
|
|
1477
2288
|
export declare interface MachReportStateError {
|
|
@@ -1494,9 +2305,62 @@ export declare interface MachReportTheme {
|
|
|
1494
2305
|
btnActiveBg: string;
|
|
1495
2306
|
}
|
|
1496
2307
|
|
|
2308
|
+
export declare interface MachReportToolbarOptions {
|
|
2309
|
+
search?: boolean;
|
|
2310
|
+
thumbnails?: boolean;
|
|
2311
|
+
zoom?: boolean;
|
|
2312
|
+
/** 编辑能力由 editable 授权;此项仅设置初始交互偏好,默认 true(兼容旧行为)。 */
|
|
2313
|
+
editing?: boolean;
|
|
2314
|
+
/** 导入能力由 excelImport 授权;此项仅设置初始交互偏好,默认 true。 */
|
|
2315
|
+
excelImport?: boolean;
|
|
2316
|
+
/** 未传时显示全部已有出口;空数组表示不提供导出工具。 */
|
|
2317
|
+
exportFormats?: ReportExportFormat[];
|
|
2318
|
+
}
|
|
2319
|
+
|
|
1497
2320
|
export declare function normalizeReportIds(reportId: ReportIdInput): string[];
|
|
1498
2321
|
|
|
1499
|
-
|
|
2322
|
+
/** Workers preserve stable error codes, not JavaScript class identity. Only known codes cross the UI boundary. */
|
|
2323
|
+
export declare function normalizeReportLoadError(error: unknown): MachReportError;
|
|
2324
|
+
|
|
2325
|
+
declare interface OutputDiagnostic {
|
|
2326
|
+
code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
2327
|
+
severity: "warning";
|
|
2328
|
+
format: OutputFormat;
|
|
2329
|
+
pageIndex: number;
|
|
2330
|
+
componentIndex: number;
|
|
2331
|
+
/** Nested grid child location as repeating [rowIndex, columnIndex, childIndex] triples. */
|
|
2332
|
+
componentPath?: readonly number[];
|
|
2333
|
+
kind: string;
|
|
2334
|
+
nid?: string;
|
|
2335
|
+
message: string;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
declare interface OutputDiagnostic_2 {
|
|
2339
|
+
code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
2340
|
+
severity: "warning";
|
|
2341
|
+
format: OutputFormat_2;
|
|
2342
|
+
pageIndex: number;
|
|
2343
|
+
componentIndex: number;
|
|
2344
|
+
/** Nested grid child location as repeating [rowIndex, columnIndex, childIndex] triples. */
|
|
2345
|
+
componentPath?: readonly number[];
|
|
2346
|
+
kind: string;
|
|
2347
|
+
nid?: string;
|
|
2348
|
+
message: string;
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
declare interface OutputDiagnosticOptions {
|
|
2352
|
+
/** Structured fidelity diagnostics; rendering never silently invents missing content. */
|
|
2353
|
+
onDiagnostic?: (diagnostic: OutputDiagnostic) => void;
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
declare interface OutputDiagnosticOptions_2 {
|
|
2357
|
+
/** Structured fidelity diagnostics; rendering never silently invents missing content. */
|
|
2358
|
+
onDiagnostic?: (diagnostic: OutputDiagnostic_2) => void;
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
declare type OutputFormat = "dom" | "canvas" | "pdf" | "xlsx";
|
|
2362
|
+
|
|
2363
|
+
declare type OutputFormat_2 = "dom" | "canvas" | "pdf" | "xlsx";
|
|
1500
2364
|
|
|
1501
2365
|
declare interface PageWindow {
|
|
1502
2366
|
start: number;
|
|
@@ -1510,6 +2374,8 @@ declare interface PaginateOptions {
|
|
|
1510
2374
|
mmPerRow?: number;
|
|
1511
2375
|
/** 文本测量器(默认启发式;浏览器端可注入 canvas 测量校准) */
|
|
1512
2376
|
measurer?: TextMeasurer;
|
|
2377
|
+
/** 可选页数上限;在追加超限页前终止,避免先分配全部页面再检查。 */
|
|
2378
|
+
maxPages?: number;
|
|
1513
2379
|
}
|
|
1514
2380
|
|
|
1515
2381
|
/** PDF 导出器:RenderPlan → PDF 字节;第二参数可上报非致命保真告警。 */
|
|
@@ -1542,6 +2408,8 @@ declare interface PlanComponent {
|
|
|
1542
2408
|
lines?: string[];
|
|
1543
2409
|
richParagraphs?: RichParagraph[];
|
|
1544
2410
|
imageData?: string;
|
|
2411
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
2412
|
+
lineDirection?: "down" | "up";
|
|
1545
2413
|
grid?: PlanGrid;
|
|
1546
2414
|
table?: PlanTableFragment;
|
|
1547
2415
|
style?: ComponentStyle;
|
|
@@ -1563,6 +2431,8 @@ declare interface PlanComponent_2 {
|
|
|
1563
2431
|
lines?: string[];
|
|
1564
2432
|
richParagraphs?: RichParagraph_2[];
|
|
1565
2433
|
imageData?: string;
|
|
2434
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
2435
|
+
lineDirection?: "down" | "up";
|
|
1566
2436
|
grid?: PlanGrid_2;
|
|
1567
2437
|
table?: PlanTableFragment_2;
|
|
1568
2438
|
style?: ComponentStyle_2;
|
|
@@ -1584,6 +2454,8 @@ declare interface PlanComponent_3 {
|
|
|
1584
2454
|
lines?: string[];
|
|
1585
2455
|
richParagraphs?: RichParagraph_3[];
|
|
1586
2456
|
imageData?: string;
|
|
2457
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
2458
|
+
lineDirection?: "down" | "up";
|
|
1587
2459
|
grid?: PlanGrid_3;
|
|
1588
2460
|
table?: PlanTableFragment_3;
|
|
1589
2461
|
style?: ComponentStyle_3;
|
|
@@ -1640,7 +2512,7 @@ declare interface PlanPage {
|
|
|
1640
2512
|
marginBottomMm?: number;
|
|
1641
2513
|
marginLeftMm?: number;
|
|
1642
2514
|
marginRightMm?: number;
|
|
1643
|
-
components:
|
|
2515
|
+
components: PlanComponent[];
|
|
1644
2516
|
}
|
|
1645
2517
|
|
|
1646
2518
|
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
@@ -1654,6 +2526,8 @@ declare interface PlanTableFragment {
|
|
|
1654
2526
|
columnKeys: string[];
|
|
1655
2527
|
layout?: "page" | "wide";
|
|
1656
2528
|
title?: string;
|
|
2529
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
2530
|
+
source?: Omit<ReportCellSource, "field" | "rowKey"> & { rowKey?: string | number };
|
|
1657
2531
|
}
|
|
1658
2532
|
|
|
1659
2533
|
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
@@ -1667,6 +2541,10 @@ declare interface PlanTableFragment_2 {
|
|
|
1667
2541
|
columnKeys: string[];
|
|
1668
2542
|
layout?: "page" | "wide";
|
|
1669
2543
|
title?: string;
|
|
2544
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
2545
|
+
source?: Omit<ReportCellSource_2, "field" | "rowKey"> & {
|
|
2546
|
+
rowKey?: string | number;
|
|
2547
|
+
};
|
|
1670
2548
|
}
|
|
1671
2549
|
|
|
1672
2550
|
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
@@ -1680,10 +2558,12 @@ declare interface PlanTableFragment_3 {
|
|
|
1680
2558
|
columnKeys: string[];
|
|
1681
2559
|
layout?: "page" | "wide";
|
|
1682
2560
|
title?: string;
|
|
2561
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
2562
|
+
source?: Omit<ReportCellSource_3, "field" | "rowKey"> & {
|
|
2563
|
+
rowKey?: string | number;
|
|
2564
|
+
};
|
|
1683
2565
|
}
|
|
1684
2566
|
|
|
1685
|
-
declare function print_2(): Promise<void>;
|
|
1686
|
-
|
|
1687
2567
|
declare interface PrintHtmlResult {
|
|
1688
2568
|
head: string;
|
|
1689
2569
|
pageChunks: string[];
|
|
@@ -1705,13 +2585,24 @@ export declare function printPlans(plans: RenderPlan[], options?: {
|
|
|
1705
2585
|
*/
|
|
1706
2586
|
export declare function provideMachReportConfig(overlay: MachReportConfigInput | MachReportDefaults): void;
|
|
1707
2587
|
|
|
1708
|
-
declare
|
|
2588
|
+
export declare interface ProviderEditingOptions extends Pick<ReportEditingOptions, "canEdit" | "validate" | "requireSource"> {
|
|
2589
|
+
reportId: Current<string>;
|
|
2590
|
+
params?: Current<Record<string, string>>;
|
|
2591
|
+
/** Getters are useful when query metadata is held by the host. Otherwise stable cell sources are used. */
|
|
2592
|
+
expectedRevision?: Current<string | undefined>;
|
|
2593
|
+
sourceToken?: Current<string | undefined>;
|
|
2594
|
+
onDiagnostic?(diagnostic: ReportDiagnostic): void;
|
|
2595
|
+
}
|
|
1709
2596
|
|
|
1710
2597
|
declare interface RenderPlan {
|
|
1711
2598
|
schemaVersion: string;
|
|
1712
2599
|
pages: PlanPage[];
|
|
1713
2600
|
}
|
|
1714
2601
|
|
|
2602
|
+
export declare const REPORT_EXPORT_FORMATS: readonly ReportExportFormat[];
|
|
2603
|
+
|
|
2604
|
+
export declare const REPORT_PREVIEW_TOOLS: readonly ["search", "thumbnails", "zoom", ...ReportExportFormat[], "print", "pdfWindow", "editing", "import"];
|
|
2605
|
+
|
|
1715
2606
|
/** 预览中的物理坐标;合并单元格使用左上角坐标。 */
|
|
1716
2607
|
declare interface ReportCellAddress {
|
|
1717
2608
|
pageIndex: number;
|
|
@@ -1730,11 +2621,13 @@ declare interface ReportCellAddress_2 {
|
|
|
1730
2621
|
|
|
1731
2622
|
declare interface ReportCellContext {
|
|
1732
2623
|
address: ReportCellAddress;
|
|
1733
|
-
cell: Readonly<
|
|
1734
|
-
component: Readonly<
|
|
2624
|
+
cell: Readonly<GridCell_2>;
|
|
2625
|
+
component: Readonly<PlanComponent_2>;
|
|
1735
2626
|
value: ReportCellValue;
|
|
1736
2627
|
valueType: ReportCellValueType;
|
|
1737
2628
|
table?: ReportCellTableIdentity;
|
|
2629
|
+
/** Stable business identity. Physical row indices must never be used as database keys. */
|
|
2630
|
+
source?: Readonly<ReportCellSource_2>;
|
|
1738
2631
|
editable: boolean;
|
|
1739
2632
|
readOnlyReason?: ReportCellReadOnlyReason;
|
|
1740
2633
|
}
|
|
@@ -1742,6 +2635,7 @@ declare interface ReportCellContext {
|
|
|
1742
2635
|
declare interface ReportCellEdit {
|
|
1743
2636
|
address: ReportCellAddress;
|
|
1744
2637
|
table?: ReportCellTableIdentity;
|
|
2638
|
+
source?: Readonly<ReportCellSource_2>;
|
|
1745
2639
|
previousValue: ReportCellValue;
|
|
1746
2640
|
previousText: string;
|
|
1747
2641
|
value: ReportCellValue;
|
|
@@ -1751,6 +2645,7 @@ declare interface ReportCellEdit {
|
|
|
1751
2645
|
declare interface ReportCellEdit_2 {
|
|
1752
2646
|
address: ReportCellAddress_2;
|
|
1753
2647
|
table?: ReportCellTableIdentity_2;
|
|
2648
|
+
source?: Readonly<ReportCellSource>;
|
|
1754
2649
|
previousValue: ReportCellValue_2;
|
|
1755
2650
|
previousText: string;
|
|
1756
2651
|
value: ReportCellValue_2;
|
|
@@ -1759,11 +2654,43 @@ declare interface ReportCellEdit_2 {
|
|
|
1759
2654
|
|
|
1760
2655
|
declare type ReportCellReadOnlyReason = "cell" | "formula" | "complex" | "structure";
|
|
1761
2656
|
|
|
2657
|
+
export declare interface ReportCellSelection {
|
|
2658
|
+
anchor: ReportCellAddress_2;
|
|
2659
|
+
focus: ReportCellAddress_2;
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
2663
|
+
declare interface ReportCellSource {
|
|
2664
|
+
datasetId: string;
|
|
2665
|
+
rowKey: string | number;
|
|
2666
|
+
field: string;
|
|
2667
|
+
revision?: string | number;
|
|
2668
|
+
sourceToken?: string;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
2672
|
+
declare interface ReportCellSource_2 {
|
|
2673
|
+
datasetId: string;
|
|
2674
|
+
rowKey: string | number;
|
|
2675
|
+
field: string;
|
|
2676
|
+
revision?: string | number;
|
|
2677
|
+
sourceToken?: string;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
2681
|
+
declare interface ReportCellSource_3 {
|
|
2682
|
+
datasetId: string;
|
|
2683
|
+
rowKey: string | number;
|
|
2684
|
+
field: string;
|
|
2685
|
+
revision?: string | number;
|
|
2686
|
+
sourceToken?: string;
|
|
2687
|
+
}
|
|
2688
|
+
|
|
1762
2689
|
declare interface ReportCellTableIdentity {
|
|
1763
2690
|
id: string;
|
|
1764
2691
|
/** 逻辑表行索引;跨分页的同一行保持不变。 */
|
|
1765
2692
|
rowIndex: number;
|
|
1766
|
-
role:
|
|
2693
|
+
role: PlanTableFragment_2["role"];
|
|
1767
2694
|
columnKey?: string;
|
|
1768
2695
|
}
|
|
1769
2696
|
|
|
@@ -1771,7 +2698,7 @@ declare interface ReportCellTableIdentity_2 {
|
|
|
1771
2698
|
id: string;
|
|
1772
2699
|
/** 逻辑表行索引;跨分页的同一行保持不变。 */
|
|
1773
2700
|
rowIndex: number;
|
|
1774
|
-
role:
|
|
2701
|
+
role: PlanTableFragment["role"];
|
|
1775
2702
|
columnKey?: string;
|
|
1776
2703
|
}
|
|
1777
2704
|
|
|
@@ -1779,7 +2706,7 @@ declare type ReportCellValue = string | number | boolean | null;
|
|
|
1779
2706
|
|
|
1780
2707
|
declare type ReportCellValue_2 = string | number | boolean | null;
|
|
1781
2708
|
|
|
1782
|
-
declare type ReportCellValueType = NonNullable<
|
|
2709
|
+
declare type ReportCellValueType = NonNullable<GridCell_2["valueType"]>;
|
|
1783
2710
|
|
|
1784
2711
|
declare interface ReportDefinition {
|
|
1785
2712
|
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
@@ -1787,25 +2714,69 @@ declare interface ReportDefinition {
|
|
|
1787
2714
|
/** 静态数据;load 存在时优先使用 load 的结果。 */
|
|
1788
2715
|
datasets?: DatasetRows;
|
|
1789
2716
|
load?: (context: ReportLoadContext) => DatasetRows | Promise<DatasetRows>;
|
|
2717
|
+
/** 可选统一适配器;load 存在时仍优先 load,兼容已有定义。 */
|
|
2718
|
+
provider?: ReportProvider;
|
|
2719
|
+
/** 可选业务数据契约;声明的数据集缺失或字段不合法时,在分页前给出结构化错误。 */
|
|
2720
|
+
dataSchema?: Record<string, DatasetContract>;
|
|
2721
|
+
dataValidation?: Pick<DatasetValidationOptions, "maxRows" | "maxCells" | "maxIssues">;
|
|
1790
2722
|
/** 覆盖模板参数定义;动态模板应在此声明查询面板元数据,避免查询前先请求模板。 */
|
|
1791
2723
|
params?: ReportParamDef[];
|
|
1792
2724
|
pagination?: PaginateOptions;
|
|
1793
2725
|
}
|
|
1794
2726
|
|
|
2727
|
+
declare interface ReportDiagnostic { code: string; message: string; path?: string; severity: "warning" | "error" | "info" }
|
|
2728
|
+
|
|
2729
|
+
declare interface ReportEditBatch {
|
|
2730
|
+
/** Idempotency identity; the server should bind it to the exact payload. */
|
|
2731
|
+
requestId: string;
|
|
2732
|
+
edits: ReportCellEdit[];
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
declare interface ReportEditConflict {
|
|
2736
|
+
source?: Readonly<ReportCellSource_2>;
|
|
2737
|
+
address?: ReportCellAddress;
|
|
2738
|
+
message: string;
|
|
2739
|
+
currentValue?: ReportCellValue;
|
|
2740
|
+
revision?: string | number;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
1795
2743
|
/** Opt in with true for local drafts, or provide host validation and persistence. */
|
|
1796
2744
|
export declare interface ReportEditingOptions {
|
|
1797
2745
|
canEdit?(context: ReportCellContext): boolean;
|
|
1798
2746
|
/** Return an error message or throw to reject the edit. */
|
|
1799
2747
|
validate?(edit: Readonly<ReportCellEdit>, operation: ReportEditOperation): void | string | Promise<void | string>;
|
|
1800
2748
|
/** Called before applying the change. A rejection leaves the current report untouched. */
|
|
1801
|
-
save?(edit: Readonly<ReportCellEdit>, operation: ReportEditOperation): void | Promise<void>;
|
|
2749
|
+
save?(edit: Readonly<ReportCellEdit>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
|
|
2750
|
+
/** Must commit all edits in one server transaction. Required for multi-cell persisted edits. */
|
|
2751
|
+
saveBatch?(batch: Readonly<ReportEditBatch>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
|
|
2752
|
+
/** Restrict persistence to plans that supply stable datasetId/rowKey/field metadata. */
|
|
2753
|
+
requireSource?: boolean;
|
|
1802
2754
|
}
|
|
1803
2755
|
|
|
1804
2756
|
export declare interface ReportEditOperation {
|
|
1805
2757
|
/** Reload, another import or unmount aborts the operation. Save adapters should forward this signal. */
|
|
1806
2758
|
signal: AbortSignal;
|
|
2759
|
+
requestId?: string;
|
|
2760
|
+
action?: "edit" | "undo" | "redo" | "restore";
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
declare interface ReportEditResult {
|
|
2764
|
+
/** A successful result may advance concurrency tokens for the affected dataset. */
|
|
2765
|
+
revision?: string | number;
|
|
2766
|
+
sourceToken?: string;
|
|
2767
|
+
/** Any conflict rejects the entire client batch. A server must also transact atomically. */
|
|
2768
|
+
conflicts?: readonly ReportEditConflict[];
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
/** 报表含表头但业务行为空时,由接入方明确声明;组件不推测业务数据。 */
|
|
2772
|
+
export declare interface ReportEmptyState {
|
|
2773
|
+
title?: string;
|
|
2774
|
+
description?: string;
|
|
1807
2775
|
}
|
|
1808
2776
|
|
|
2777
|
+
/** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
|
|
2778
|
+
export declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
|
|
2779
|
+
|
|
1809
2780
|
/** 保持 Promise<RenderPlan> 契约;元数据为可选,旧业务 fetcher 无需改造。 */
|
|
1810
2781
|
declare interface ReportFetcher {
|
|
1811
2782
|
(input: ReportFetchInput): Promise<RenderPlan>;
|
|
@@ -1818,10 +2789,39 @@ declare interface ReportFetchInput {
|
|
|
1818
2789
|
signal?: AbortSignal;
|
|
1819
2790
|
/** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
|
|
1820
2791
|
onWarning?: (message: string) => void;
|
|
2792
|
+
onQueryResult?: (reportId: string, result: ReportQueryResult) => void;
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
declare interface ReportFieldContract {
|
|
2796
|
+
field: string;
|
|
2797
|
+
label?: string;
|
|
2798
|
+
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
2799
|
+
required?: boolean;
|
|
2800
|
+
nullable?: boolean;
|
|
2801
|
+
enum?: readonly (string | number | boolean)[];
|
|
2802
|
+
min?: number; max?: number;
|
|
2803
|
+
minLength?: number; maxLength?: number;
|
|
2804
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
2805
|
+
unit?: string;
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2808
|
+
export declare interface ReportFieldTarget {
|
|
2809
|
+
field: string;
|
|
2810
|
+
datasetId?: string;
|
|
2811
|
+
rowKey?: string | number;
|
|
1821
2812
|
}
|
|
1822
2813
|
|
|
1823
2814
|
export declare type ReportIdInput = string | string[] | null | undefined;
|
|
1824
2815
|
|
|
2816
|
+
export declare interface ReportInteractionOptions {
|
|
2817
|
+
/** Screen-only frozen panes; exported geometry is unchanged. */
|
|
2818
|
+
freezeHeaders?: boolean;
|
|
2819
|
+
/** Leading identity columns, from 0 to 20. */
|
|
2820
|
+
frozenColumns?: number;
|
|
2821
|
+
/** Show workbook sheets / report sections when available. Default true. */
|
|
2822
|
+
navigation?: boolean;
|
|
2823
|
+
}
|
|
2824
|
+
|
|
1825
2825
|
/** 取数与排版共同使用的请求上下文;取消只影响本次调用。 */
|
|
1826
2826
|
declare interface ReportLoadContext {
|
|
1827
2827
|
reportId: string;
|
|
@@ -1841,6 +2841,11 @@ declare interface ReportParamDef {
|
|
|
1841
2841
|
defaultValue?: string;
|
|
1842
2842
|
required?: boolean;
|
|
1843
2843
|
placeholder?: string;
|
|
2844
|
+
/** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
|
|
2845
|
+
min?: number | string;
|
|
2846
|
+
max?: number | string;
|
|
2847
|
+
minLength?: number;
|
|
2848
|
+
maxLength?: number;
|
|
1844
2849
|
}
|
|
1845
2850
|
|
|
1846
2851
|
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
@@ -1858,6 +2863,11 @@ declare interface ReportParamDef_2 {
|
|
|
1858
2863
|
defaultValue?: string;
|
|
1859
2864
|
required?: boolean;
|
|
1860
2865
|
placeholder?: string;
|
|
2866
|
+
/** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
|
|
2867
|
+
min?: number | string;
|
|
2868
|
+
max?: number | string;
|
|
2869
|
+
minLength?: number;
|
|
2870
|
+
maxLength?: number;
|
|
1861
2871
|
}
|
|
1862
2872
|
|
|
1863
2873
|
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
@@ -1875,9 +2885,20 @@ declare interface ReportParamDef_3 {
|
|
|
1875
2885
|
defaultValue?: string;
|
|
1876
2886
|
required?: boolean;
|
|
1877
2887
|
placeholder?: string;
|
|
2888
|
+
/** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
|
|
2889
|
+
min?: number | string;
|
|
2890
|
+
max?: number | string;
|
|
2891
|
+
minLength?: number;
|
|
2892
|
+
maxLength?: number;
|
|
1878
2893
|
}
|
|
1879
2894
|
|
|
1880
|
-
|
|
2895
|
+
declare interface ReportParamIssue { code: ReportParamIssueCode; path: string; field: string; message: string }
|
|
2896
|
+
|
|
2897
|
+
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
2898
|
+
|
|
2899
|
+
export declare const ReportParamPanel: DefineComponent<__VLS_Props_2, {
|
|
2900
|
+
focusInvalid: typeof focusInvalid;
|
|
2901
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1881
2902
|
reset: () => any;
|
|
1882
2903
|
query: () => any;
|
|
1883
2904
|
"update:modelValue": (value: Record<string, string>) => any;
|
|
@@ -1885,12 +2906,69 @@ query: () => any;
|
|
|
1885
2906
|
onReset?: (() => any) | undefined;
|
|
1886
2907
|
onQuery?: (() => any) | undefined;
|
|
1887
2908
|
"onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
|
|
1888
|
-
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
2909
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
2910
|
+
root: HTMLDivElement;
|
|
2911
|
+
}, HTMLDivElement>;
|
|
2912
|
+
|
|
2913
|
+
export declare interface ReportPreferencesAdapter {
|
|
2914
|
+
load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
|
|
2915
|
+
save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
|
|
2916
|
+
remove?(key: string): void | Promise<void>;
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
export declare interface ReportPreferencesOptions {
|
|
2920
|
+
/** Host-scoped key; do not share one key between unrelated users/tenants. */
|
|
2921
|
+
key: string;
|
|
2922
|
+
adapter: ReportPreferencesAdapter;
|
|
2923
|
+
}
|
|
1889
2924
|
|
|
1890
2925
|
export declare const ReportPreview: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
1891
2926
|
|
|
2927
|
+
export declare type ReportPreviewPreferences = Record<ReportPreviewTool, boolean>;
|
|
2928
|
+
|
|
2929
|
+
export declare type ReportPreviewTool = "search" | "thumbnails" | "zoom" | ReportExportFormat | "print" | "pdfWindow" | "editing" | "import";
|
|
2930
|
+
|
|
2931
|
+
/** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
|
|
2932
|
+
declare interface ReportProvider {
|
|
2933
|
+
query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
|
|
2934
|
+
save?(input: ReportSaveInput): ReportSaveResult | Promise<ReportSaveResult>;
|
|
2935
|
+
export?(input: ReportProviderExportInput): ReportProviderExportResult | Promise<ReportProviderExportResult>;
|
|
2936
|
+
templates?: ReportTemplateProvider;
|
|
2937
|
+
}
|
|
2938
|
+
|
|
2939
|
+
declare interface ReportProviderExportInput extends ReportLoadContext { format: "pdf" | "xlsx" }
|
|
2940
|
+
|
|
2941
|
+
declare interface ReportProviderExportResult { bytes: Uint8Array; contentType: string; fileName?: string; diagnostics?: ReportDiagnostic[] }
|
|
2942
|
+
|
|
2943
|
+
declare interface ReportQueryResult {
|
|
2944
|
+
datasets: DatasetRows;
|
|
2945
|
+
revision?: string;
|
|
2946
|
+
sourceToken?: string;
|
|
2947
|
+
diagnostics?: ReportDiagnostic[];
|
|
2948
|
+
}
|
|
2949
|
+
|
|
1892
2950
|
declare type ReportRegistry = Record<string, ReportDefinition>;
|
|
1893
2951
|
|
|
2952
|
+
declare interface ReportSaveInput extends ReportLoadContext {
|
|
2953
|
+
requestId: string;
|
|
2954
|
+
expectedRevision?: string;
|
|
2955
|
+
sourceToken?: string;
|
|
2956
|
+
edits: readonly ReportCellEdit_2[];
|
|
2957
|
+
action?: "edit" | "undo" | "redo" | "restore";
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
declare interface ReportSaveResult {
|
|
2961
|
+
revision: string;
|
|
2962
|
+
sourceToken?: string;
|
|
2963
|
+
conflicts?: Array<{ editIndex: number; code: string; message: string }>;
|
|
2964
|
+
diagnostics?: ReportDiagnostic[];
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
export declare interface ReportSection {
|
|
2968
|
+
label: string;
|
|
2969
|
+
pageIndex: number;
|
|
2970
|
+
}
|
|
2971
|
+
|
|
1894
2972
|
declare interface ReportTemplate {
|
|
1895
2973
|
schemaVersion?: string;
|
|
1896
2974
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
@@ -1912,11 +2990,31 @@ declare interface ReportTemplate_3 {
|
|
|
1912
2990
|
pages: TemplatePage_3[];
|
|
1913
2991
|
}
|
|
1914
2992
|
|
|
2993
|
+
/** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
|
|
2994
|
+
declare interface ReportTemplateDocument {
|
|
2995
|
+
schemaVersion: "1.0";
|
|
2996
|
+
id: string;
|
|
2997
|
+
name: string;
|
|
2998
|
+
/** 宿主的发布版本/乐观锁标识,不由引擎自动递增。 */
|
|
2999
|
+
revision?: string;
|
|
3000
|
+
description?: string;
|
|
3001
|
+
template: ReportTemplate_2;
|
|
3002
|
+
}
|
|
3003
|
+
|
|
1915
3004
|
declare type ReportTemplateLoader = (context: ReportLoadContext) => ReportTemplate_2 | Promise<ReportTemplate_2>;
|
|
1916
3005
|
|
|
1917
|
-
|
|
3006
|
+
declare interface ReportTemplateProvider {
|
|
3007
|
+
list(context: { signal?: AbortSignal }): Promise<ReportTemplateSummary[]>;
|
|
3008
|
+
get(id: string, context: { signal?: AbortSignal }): Promise<ReportTemplateDocument | undefined>;
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
3012
|
+
|
|
3013
|
+
export declare const ReportToolbar: DefineComponent<__VLS_Props, {
|
|
3014
|
+
focusSearch: () => void;
|
|
3015
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
3016
|
+
export: (format: "pdf" | "xlsx" | "html" | "png" | "word") => any;
|
|
1918
3017
|
print: () => any;
|
|
1919
|
-
export: (format: "html" | "png" | "pdf" | "xlsx" | "word") => any;
|
|
1920
3018
|
zoom: (mode: number | "fit") => any;
|
|
1921
3019
|
goto: (page: number) => any;
|
|
1922
3020
|
"pdf-window": () => any;
|
|
@@ -1925,9 +3023,10 @@ goto: (page: number) => any;
|
|
|
1925
3023
|
"search-toggle": () => any;
|
|
1926
3024
|
"thumbs-toggle": () => any;
|
|
1927
3025
|
"import-excel": () => any;
|
|
3026
|
+
"settings-toggle": () => any;
|
|
1928
3027
|
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
3028
|
+
onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
|
|
1929
3029
|
onPrint?: (() => any) | undefined;
|
|
1930
|
-
onExport?: ((format: "html" | "png" | "pdf" | "xlsx" | "word") => any) | undefined;
|
|
1931
3030
|
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
1932
3031
|
onGoto?: ((page: number) => any) | undefined;
|
|
1933
3032
|
"onPdf-window"?: (() => any) | undefined;
|
|
@@ -1936,13 +3035,15 @@ onGoto?: ((page: number) => any) | undefined;
|
|
|
1936
3035
|
"onSearch-toggle"?: (() => any) | undefined;
|
|
1937
3036
|
"onThumbs-toggle"?: (() => any) | undefined;
|
|
1938
3037
|
"onImport-excel"?: (() => any) | undefined;
|
|
3038
|
+
"onSettings-toggle"?: (() => any) | undefined;
|
|
1939
3039
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
1940
3040
|
searchInputRef: HTMLInputElement;
|
|
3041
|
+
searchToggleRef: HTMLButtonElement;
|
|
1941
3042
|
}, HTMLDivElement>;
|
|
1942
3043
|
|
|
1943
3044
|
export declare function resolveConfig(config: MachReportConfig | null | undefined, presetName?: string): ResolvedConfig;
|
|
1944
3045
|
|
|
1945
|
-
export declare type ResolvedConfig = Required<Pick<MachReportDefaults, "showExport" | "showPrint" | "showPdfWindow" | "showParams" | "gapPx">> & {
|
|
3046
|
+
export declare type ResolvedConfig = Required<Pick<MachReportDefaults, "showExport" | "showPrint" | "showPdfWindow" | "showSettings" | "showParams" | "gapPx">> & {
|
|
1946
3047
|
pdfFontUrl: string;
|
|
1947
3048
|
theme: MachReportTheme;
|
|
1948
3049
|
messages: MachReportMessages;
|
|
@@ -1951,6 +3052,10 @@ export declare type ResolvedConfig = Required<Pick<MachReportDefaults, "showExpo
|
|
|
1951
3052
|
xlsx: XlsxRenderOptions;
|
|
1952
3053
|
editable: boolean | ReportEditingOptions;
|
|
1953
3054
|
excelImport: boolean | ExcelImportOptions;
|
|
3055
|
+
toolbar: MachReportToolbarOptions;
|
|
3056
|
+
interaction: ReportInteractionOptions;
|
|
3057
|
+
preferences?: ReportPreferencesOptions;
|
|
3058
|
+
assets?: AssetRenderOptions;
|
|
1954
3059
|
};
|
|
1955
3060
|
|
|
1956
3061
|
declare interface RichParagraph {
|
|
@@ -2001,12 +3106,6 @@ declare interface RichSegment_3 {
|
|
|
2001
3106
|
style?: ComponentStyle_3;
|
|
2002
3107
|
}
|
|
2003
3108
|
|
|
2004
|
-
/** 控制器注入:后代组件 useReportPreview() 免模板 ref 编程式访问(与 expose 同面) */
|
|
2005
|
-
/** 编程式设参查询:合并进面板值(面板本地字典经 v-model 同步),可选立即重载 */
|
|
2006
|
-
declare function setParams(values: Record<string, string>, opts?: {
|
|
2007
|
-
reload?: boolean;
|
|
2008
|
-
}): Promise<void>;
|
|
2009
|
-
|
|
2010
3109
|
export declare const SILENT_LOGGER: MachReportLogger;
|
|
2011
3110
|
|
|
2012
3111
|
/** 条件格式规则求值(声明式,见 ListColumn.rules) */
|
|
@@ -2042,9 +3141,9 @@ declare interface StyleRule_3 {
|
|
|
2042
3141
|
style: Record<string, unknown>;
|
|
2043
3142
|
}
|
|
2044
3143
|
|
|
2045
|
-
declare type TemplateComponent =
|
|
3144
|
+
declare type TemplateComponent = PlanComponent_2 | ListComponent;
|
|
2046
3145
|
|
|
2047
|
-
declare type TemplateComponent_2 =
|
|
3146
|
+
declare type TemplateComponent_2 = PlanComponent | ListComponent_2;
|
|
2048
3147
|
|
|
2049
3148
|
declare type TemplateComponent_3 = PlanComponent_3 | ListComponent_3;
|
|
2050
3149
|
|
|
@@ -2094,7 +3193,9 @@ declare interface TemplatePage_3 {
|
|
|
2094
3193
|
|
|
2095
3194
|
declare interface TextMeasureOptions {
|
|
2096
3195
|
fontSizePt: number;
|
|
3196
|
+
fontFamily?: string;
|
|
2097
3197
|
bold?: boolean;
|
|
3198
|
+
italic?: boolean;
|
|
2098
3199
|
letterSpacingPt?: number;
|
|
2099
3200
|
}
|
|
2100
3201
|
|
|
@@ -2196,7 +3297,7 @@ export declare function useZoom(getFitInputs: () => {
|
|
|
2196
3297
|
* 目标是"财务能直接用的对账表"而非复刻版面)
|
|
2197
3298
|
* - 未支持组件、富文本专有内容与单元格嵌套组件跳过并计入 warnings
|
|
2198
3299
|
*/
|
|
2199
|
-
declare interface XlsxRenderOptions {
|
|
3300
|
+
declare interface XlsxRenderOptions extends OutputDiagnosticOptions_2 {
|
|
2200
3301
|
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|
|
2201
3302
|
sheetName?: (sheetIndex: number) => string;
|
|
2202
3303
|
/** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
|