@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/async.d.ts
CHANGED
|
@@ -13,6 +13,25 @@ import { PropType } from 'vue';
|
|
|
13
13
|
import { PublicProps } from 'vue';
|
|
14
14
|
import { VNodeProps } from 'vue';
|
|
15
15
|
|
|
16
|
+
declare interface AssetRenderBudget {
|
|
17
|
+
/** Maximum newly rendered assets, default 1000. Existing imageData is kept unchanged. */
|
|
18
|
+
maxAssets?: number;
|
|
19
|
+
/** Maximum image payload bytes per new asset, default 32 MiB. */
|
|
20
|
+
maxImageBytes?: number;
|
|
21
|
+
/** Maximum total image payload bytes for new assets, default 128 MiB. */
|
|
22
|
+
maxTotalImageBytes?: number;
|
|
23
|
+
/** Wall-clock budget, including adapters that ignore AbortSignal. Default 30 seconds. */
|
|
24
|
+
maxDurationMs?: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare interface AssetRenderOptions extends OutputDiagnosticOptions {
|
|
28
|
+
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
29
|
+
assetBudget?: AssetRenderBudget;
|
|
30
|
+
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
31
|
+
assetFailure?: "throw" | "placeholder";
|
|
32
|
+
signal?: AbortSignal;
|
|
33
|
+
}
|
|
34
|
+
|
|
16
35
|
/**
|
|
17
36
|
* 列值格式化(声明式、JSON 可序列化)。
|
|
18
37
|
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
@@ -53,6 +72,16 @@ declare type ColumnFormat_2 = {
|
|
|
53
72
|
pattern?: string;
|
|
54
73
|
};
|
|
55
74
|
|
|
75
|
+
declare interface ComponentImageContext {
|
|
76
|
+
readonly component: Readonly<PlanComponent>;
|
|
77
|
+
readonly pageIndex: number;
|
|
78
|
+
readonly componentIndex: number;
|
|
79
|
+
readonly componentPath: readonly number[];
|
|
80
|
+
readonly signal: AbortSignal;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare type ComponentImageRenderer = (context: ComponentImageContext) => string | Promise<string>;
|
|
84
|
+
|
|
56
85
|
declare type ComponentKind =
|
|
57
86
|
| "text"
|
|
58
87
|
| "image"
|
|
@@ -139,8 +168,12 @@ declare interface ComponentStyle_3 {
|
|
|
139
168
|
rotateDeg?: number;
|
|
140
169
|
}
|
|
141
170
|
|
|
171
|
+
declare interface DatasetContract { fields: readonly ReportFieldContract[]; rowKey?: string }
|
|
172
|
+
|
|
142
173
|
declare type DatasetRows = Record<string, Record<string, unknown>[]>;
|
|
143
174
|
|
|
175
|
+
declare interface DatasetValidationOptions { path?: string; maxRows?: number; maxCells?: number; maxIssues?: number }
|
|
176
|
+
|
|
144
177
|
declare interface ExcelImportedSheet {
|
|
145
178
|
name: string;
|
|
146
179
|
/** Original, one-based workbook position. */
|
|
@@ -232,6 +265,7 @@ declare interface GridCell {
|
|
|
232
265
|
valueType?: "text" | "number" | "boolean";
|
|
233
266
|
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
234
267
|
editable?: boolean;
|
|
268
|
+
source?: ReportCellSource;
|
|
235
269
|
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
236
270
|
formula?: string;
|
|
237
271
|
children?: PlanComponent[];
|
|
@@ -251,6 +285,7 @@ declare interface GridCell_2 {
|
|
|
251
285
|
valueType?: "text" | "number" | "boolean";
|
|
252
286
|
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
253
287
|
editable?: boolean;
|
|
288
|
+
source?: ReportCellSource_2;
|
|
254
289
|
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
255
290
|
formula?: string;
|
|
256
291
|
children?: PlanComponent_2[];
|
|
@@ -270,6 +305,7 @@ declare interface GridCell_3 {
|
|
|
270
305
|
valueType?: "text" | "number" | "boolean";
|
|
271
306
|
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
272
307
|
editable?: boolean;
|
|
308
|
+
source?: ReportCellSource_3;
|
|
273
309
|
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
274
310
|
formula?: string;
|
|
275
311
|
children?: PlanComponent_3[];
|
|
@@ -278,6 +314,8 @@ declare interface GridCell_3 {
|
|
|
278
314
|
style?: ComponentStyle_3;
|
|
279
315
|
}
|
|
280
316
|
|
|
317
|
+
declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
318
|
+
|
|
281
319
|
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
282
320
|
declare type ListAlignment = NonNullable<ComponentStyle["align"]> | "auto";
|
|
283
321
|
|
|
@@ -303,6 +341,8 @@ declare interface ListColumn {
|
|
|
303
341
|
editable?: boolean;
|
|
304
342
|
/** 空值列或特殊数据类型可显式声明编辑输入类型。 */
|
|
305
343
|
valueType?: GridCell["valueType"];
|
|
344
|
+
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
345
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
306
346
|
}
|
|
307
347
|
|
|
308
348
|
declare interface ListColumn_2 {
|
|
@@ -324,6 +364,8 @@ declare interface ListColumn_2 {
|
|
|
324
364
|
editable?: boolean;
|
|
325
365
|
/** 空值列或特殊数据类型可显式声明编辑输入类型。 */
|
|
326
366
|
valueType?: GridCell_3["valueType"];
|
|
367
|
+
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
368
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
327
369
|
}
|
|
328
370
|
|
|
329
371
|
declare interface ListComponent {
|
|
@@ -337,6 +379,10 @@ declare interface ListComponent {
|
|
|
337
379
|
topMm: number;
|
|
338
380
|
widthMm: number;
|
|
339
381
|
dataset: string;
|
|
382
|
+
/** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
|
|
383
|
+
rowKey?: string;
|
|
384
|
+
revisionField?: string;
|
|
385
|
+
sourceTokenField?: string;
|
|
340
386
|
columns: ListColumn[];
|
|
341
387
|
fontSizePt?: number;
|
|
342
388
|
headerBold?: boolean;
|
|
@@ -349,6 +395,8 @@ declare interface ListComponent {
|
|
|
349
395
|
/** 表头默认对齐,列配置可覆盖。 */
|
|
350
396
|
headerAlign?: ComponentStyle["align"];
|
|
351
397
|
headerStyle?: ComponentStyle;
|
|
398
|
+
/** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
|
|
399
|
+
headerGrid?: PlanGrid;
|
|
352
400
|
border?: boolean;
|
|
353
401
|
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
354
402
|
groupBy?: ListGroupBy;
|
|
@@ -367,6 +415,10 @@ declare interface ListComponent_2 {
|
|
|
367
415
|
topMm: number;
|
|
368
416
|
widthMm: number;
|
|
369
417
|
dataset: string;
|
|
418
|
+
/** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
|
|
419
|
+
rowKey?: string;
|
|
420
|
+
revisionField?: string;
|
|
421
|
+
sourceTokenField?: string;
|
|
370
422
|
columns: ListColumn_2[];
|
|
371
423
|
fontSizePt?: number;
|
|
372
424
|
headerBold?: boolean;
|
|
@@ -379,6 +431,8 @@ declare interface ListComponent_2 {
|
|
|
379
431
|
/** 表头默认对齐,列配置可覆盖。 */
|
|
380
432
|
headerAlign?: ComponentStyle_3["align"];
|
|
381
433
|
headerStyle?: ComponentStyle_3;
|
|
434
|
+
/** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
|
|
435
|
+
headerGrid?: PlanGrid_3;
|
|
382
436
|
border?: boolean;
|
|
383
437
|
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
384
438
|
groupBy?: ListGroupBy_2;
|
|
@@ -450,6 +504,13 @@ declare interface MachReportDefaults {
|
|
|
450
504
|
showExport?: boolean;
|
|
451
505
|
showPrint?: boolean;
|
|
452
506
|
showPdfWindow?: boolean;
|
|
507
|
+
/** 设置入口默认显示;可在其中按需启用阅读及输出工具。 */
|
|
508
|
+
showSettings?: boolean;
|
|
509
|
+
toolbar?: MachReportToolbarOptions;
|
|
510
|
+
interaction?: ReportInteractionOptions;
|
|
511
|
+
preferences?: ReportPreferencesOptions;
|
|
512
|
+
/** Prepare optional image/chart/QR/barcode adapters once for preview and all outputs. */
|
|
513
|
+
assets?: AssetRenderOptions;
|
|
453
514
|
/** 参数面板显隐(有参数定义且未显式关闭时显示;缺省 true) */
|
|
454
515
|
showParams?: boolean;
|
|
455
516
|
/** 页间距 px */
|
|
@@ -523,6 +584,11 @@ declare interface MachReportMessages {
|
|
|
523
584
|
reset: string;
|
|
524
585
|
/** 必填缺失提示({label} 占位) */
|
|
525
586
|
paramRequired: string;
|
|
587
|
+
paramInvalid?: string;
|
|
588
|
+
paramPrompt?: string;
|
|
589
|
+
paramPromptDescription?: string;
|
|
590
|
+
paramSelectPlaceholder?: string;
|
|
591
|
+
paramTextPlaceholder?: string;
|
|
526
592
|
/** 可选搜索进度文案,旧完整 messages 对象无需新增字段。 */
|
|
527
593
|
searching?: string;
|
|
528
594
|
importExcel?: string;
|
|
@@ -533,6 +599,51 @@ declare interface MachReportMessages {
|
|
|
533
599
|
editInvalidNumber?: string;
|
|
534
600
|
editInvalidBoolean?: string;
|
|
535
601
|
editConflict?: string;
|
|
602
|
+
settings?: string;
|
|
603
|
+
settingsDisplay?: string;
|
|
604
|
+
settingsExport?: string;
|
|
605
|
+
settingsData?: string;
|
|
606
|
+
settingsUnavailable?: string;
|
|
607
|
+
settingsReset?: string;
|
|
608
|
+
settingsClose?: string;
|
|
609
|
+
search?: string;
|
|
610
|
+
closeSearch?: string;
|
|
611
|
+
prevSearchMatch?: string;
|
|
612
|
+
nextSearchMatch?: string;
|
|
613
|
+
zoom?: string;
|
|
614
|
+
settingsLocal?: string;
|
|
615
|
+
editingLocal?: string;
|
|
616
|
+
editingSaved?: string;
|
|
617
|
+
importLocal?: string;
|
|
618
|
+
emptyDescription?: string;
|
|
619
|
+
undo?: string;
|
|
620
|
+
redo?: string;
|
|
621
|
+
restoreChanges?: string;
|
|
622
|
+
changes?: string;
|
|
623
|
+
changesCount?: string;
|
|
624
|
+
changesEmpty?: string;
|
|
625
|
+
changesBefore?: string;
|
|
626
|
+
changesAfter?: string;
|
|
627
|
+
editAtomicRequired?: string;
|
|
628
|
+
clipboardLimit?: string;
|
|
629
|
+
preferencesError?: string;
|
|
630
|
+
freezeHeaders?: string;
|
|
631
|
+
frozenColumns?: string;
|
|
632
|
+
sections?: string;
|
|
633
|
+
locateField?: string;
|
|
634
|
+
locateFieldPlaceholder?: string;
|
|
635
|
+
locateFieldMissing?: string;
|
|
636
|
+
importSummary?: string;
|
|
637
|
+
importPreserved?: string;
|
|
638
|
+
importWarnings?: string;
|
|
639
|
+
importReadOnly?: string;
|
|
640
|
+
conflicts?: string;
|
|
641
|
+
editReadOnly?: string;
|
|
642
|
+
editMissing?: string;
|
|
643
|
+
editDuplicate?: string;
|
|
644
|
+
clipboardInvalid?: string;
|
|
645
|
+
editSaved?: string;
|
|
646
|
+
settingsPanes?: string;
|
|
536
647
|
}
|
|
537
648
|
|
|
538
649
|
declare interface MachReportPluginOptions {
|
|
@@ -586,6 +697,30 @@ export declare const MachReportPreview: {
|
|
|
586
697
|
type: BooleanConstructor;
|
|
587
698
|
default: undefined;
|
|
588
699
|
};
|
|
700
|
+
showSettings: {
|
|
701
|
+
type: BooleanConstructor;
|
|
702
|
+
default: undefined;
|
|
703
|
+
};
|
|
704
|
+
toolbar: {
|
|
705
|
+
type: PropType<MachReportToolbarOptions>;
|
|
706
|
+
default: undefined;
|
|
707
|
+
};
|
|
708
|
+
interaction: {
|
|
709
|
+
type: PropType<ReportInteractionOptions>;
|
|
710
|
+
default: undefined;
|
|
711
|
+
};
|
|
712
|
+
preferences: {
|
|
713
|
+
type: PropType<ReportPreferencesOptions>;
|
|
714
|
+
default: undefined;
|
|
715
|
+
};
|
|
716
|
+
assets: {
|
|
717
|
+
type: PropType<AssetRenderOptions>;
|
|
718
|
+
default: undefined;
|
|
719
|
+
};
|
|
720
|
+
emptyState: {
|
|
721
|
+
type: PropType<boolean | ReportEmptyState>;
|
|
722
|
+
default: boolean;
|
|
723
|
+
};
|
|
589
724
|
gapPx: {
|
|
590
725
|
type: NumberConstructor;
|
|
591
726
|
default: undefined;
|
|
@@ -623,37 +758,48 @@ export declare const MachReportPreview: {
|
|
|
623
758
|
default: null;
|
|
624
759
|
};
|
|
625
760
|
}>> & Readonly<{
|
|
761
|
+
onWarning?: ((message: string) => any) | undefined;
|
|
626
762
|
onError?: ((message: string, detail?: {
|
|
627
763
|
code: string;
|
|
628
764
|
cause?: unknown;
|
|
629
765
|
} | undefined) => any) | undefined;
|
|
630
766
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
631
|
-
|
|
632
|
-
"onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
|
|
767
|
+
"onCell-edit"?: ((edit: ReportCellEdit) => any) | undefined;
|
|
633
768
|
"onTemplate-import"?: ((result: ExcelImportResult) => any) | undefined;
|
|
769
|
+
"onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
|
|
634
770
|
}>, {
|
|
635
|
-
reload: () => Promise<void>;
|
|
636
|
-
print: () => Promise<void>;
|
|
637
|
-
exportAs: (format: string) => Promise<void>;
|
|
638
|
-
openPdfWindow: () => void;
|
|
639
|
-
gotoPage: (n: number) => void;
|
|
640
|
-
setParams: (values: Record<string, string>, opts?: {
|
|
641
|
-
reload?: boolean;
|
|
642
|
-
}) => Promise<void>;
|
|
643
|
-
checkPdfFont: () => Promise<PdfFontCheckResult>;
|
|
644
|
-
importExcel: (input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2) => Promise<ExcelImportResult | null>;
|
|
645
|
-
getPlan: () => RenderPlan | null;
|
|
646
|
-
getChanges: () => ReportCellEdit_2[];
|
|
647
771
|
state: ComputedRef<MachReportState>;
|
|
772
|
+
checkPdfFont?(): Promise<PdfFontCheckResult>;
|
|
773
|
+
reload(): Promise<void>;
|
|
774
|
+
print(): Promise<void>;
|
|
775
|
+
exportAs(format: string): Promise<void> | void;
|
|
776
|
+
openPdfWindow(): void;
|
|
777
|
+
gotoPage(page: number): void;
|
|
778
|
+
setParams(values: Record<string, string>, opts?: {
|
|
779
|
+
reload?: boolean;
|
|
780
|
+
}): Promise<void> | void;
|
|
781
|
+
importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2): Promise<ExcelImportResult | null>;
|
|
782
|
+
getPlan?(): RenderPlan | null;
|
|
783
|
+
getChanges?(): ReportCellEdit[];
|
|
784
|
+
getDifferences?(): ReportCellEdit[];
|
|
785
|
+
undo?(): Promise<boolean>;
|
|
786
|
+
redo?(): Promise<boolean>;
|
|
787
|
+
restoreChanges?(): Promise<boolean>;
|
|
788
|
+
getSelection?(): ReportCellSelection | null;
|
|
789
|
+
focusCell?(address: ReportCellAddress, extend?: boolean): Promise<boolean>;
|
|
790
|
+
focusField?(target: ReportFieldTarget): Promise<boolean>;
|
|
791
|
+
copySelection?(): string;
|
|
792
|
+
pasteSelection?(text: string): Promise<boolean>;
|
|
648
793
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
794
|
+
warning: (message: string) => any;
|
|
649
795
|
error: (message: string, detail?: {
|
|
650
796
|
code: string;
|
|
651
797
|
cause?: unknown;
|
|
652
798
|
} | undefined) => any;
|
|
653
799
|
loaded: (pageCount: number) => any;
|
|
654
|
-
|
|
655
|
-
"cell-edit": (edit: ReportCellEdit_2) => any;
|
|
800
|
+
"cell-edit": (edit: ReportCellEdit) => any;
|
|
656
801
|
"template-import": (result: ExcelImportResult) => any;
|
|
802
|
+
"preferences-change": (preferences: Readonly<ReportPreviewPreferences>) => any;
|
|
657
803
|
}, PublicProps, {
|
|
658
804
|
editable: boolean | ReportEditingOptions;
|
|
659
805
|
height: string;
|
|
@@ -664,14 +810,159 @@ export declare const MachReportPreview: {
|
|
|
664
810
|
showExport: boolean;
|
|
665
811
|
showPrint: boolean;
|
|
666
812
|
showPdfWindow: boolean;
|
|
813
|
+
showSettings: boolean;
|
|
667
814
|
showParams: boolean;
|
|
815
|
+
toolbar: MachReportToolbarOptions;
|
|
816
|
+
interaction: ReportInteractionOptions;
|
|
817
|
+
preferences: ReportPreferencesOptions;
|
|
818
|
+
assets: AssetRenderOptions;
|
|
668
819
|
messages: Partial<MachReportMessages>;
|
|
669
820
|
excelImport: boolean | ExcelImportOptions_2;
|
|
670
821
|
autoLoad: boolean;
|
|
822
|
+
emptyState: boolean | ReportEmptyState;
|
|
671
823
|
preset: string;
|
|
672
824
|
paramDefs: ReportParamDef[] | undefined;
|
|
673
825
|
fetcher: PlanFetcher | null;
|
|
674
826
|
}, true, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
827
|
+
paramPanelRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
828
|
+
defs: ReportParamDef[];
|
|
829
|
+
modelValue: Record<string, string>;
|
|
830
|
+
messages: MachReportMessages;
|
|
831
|
+
attempted: boolean;
|
|
832
|
+
issues?: readonly ReportParamIssue[];
|
|
833
|
+
}> & Readonly<{
|
|
834
|
+
onReset?: (() => any) | undefined;
|
|
835
|
+
onQuery?: (() => any) | undefined;
|
|
836
|
+
"onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
|
|
837
|
+
}>, {
|
|
838
|
+
focusInvalid: () => void;
|
|
839
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
840
|
+
reset: () => any;
|
|
841
|
+
query: () => any;
|
|
842
|
+
"update:modelValue": (value: Record<string, string>) => any;
|
|
843
|
+
}, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
844
|
+
root: HTMLDivElement;
|
|
845
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
846
|
+
P: {};
|
|
847
|
+
B: {};
|
|
848
|
+
D: {};
|
|
849
|
+
C: {};
|
|
850
|
+
M: {};
|
|
851
|
+
Defaults: {};
|
|
852
|
+
}, Readonly<{
|
|
853
|
+
defs: ReportParamDef[];
|
|
854
|
+
modelValue: Record<string, string>;
|
|
855
|
+
messages: MachReportMessages;
|
|
856
|
+
attempted: boolean;
|
|
857
|
+
issues?: readonly ReportParamIssue[];
|
|
858
|
+
}> & Readonly<{
|
|
859
|
+
onReset?: (() => any) | undefined;
|
|
860
|
+
onQuery?: (() => any) | undefined;
|
|
861
|
+
"onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
|
|
862
|
+
}>, {
|
|
863
|
+
focusInvalid: () => void;
|
|
864
|
+
}, {}, {}, {}, {}> | null;
|
|
865
|
+
toolbarRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
866
|
+
pageCount: number;
|
|
867
|
+
currentPage: number;
|
|
868
|
+
zoomMode: "fit" | "raw";
|
|
869
|
+
zoom: number;
|
|
870
|
+
showExport: boolean;
|
|
871
|
+
showPrint: boolean;
|
|
872
|
+
showPdfWindow: boolean;
|
|
873
|
+
messages: MachReportMessages;
|
|
874
|
+
search: {
|
|
875
|
+
visible: boolean;
|
|
876
|
+
query: string;
|
|
877
|
+
matchIndex: number;
|
|
878
|
+
matchCount: number;
|
|
879
|
+
searching?: boolean;
|
|
880
|
+
};
|
|
881
|
+
thumbsVisible: boolean;
|
|
882
|
+
showImport?: boolean;
|
|
883
|
+
showSearch?: boolean;
|
|
884
|
+
showThumbnails?: boolean;
|
|
885
|
+
showZoom?: boolean;
|
|
886
|
+
exportFormats?: readonly ReportExportFormat[];
|
|
887
|
+
showSettings?: boolean;
|
|
888
|
+
settingsOpen?: boolean;
|
|
889
|
+
busy?: boolean;
|
|
890
|
+
}> & Readonly<{
|
|
891
|
+
onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
|
|
892
|
+
onPrint?: (() => any) | undefined;
|
|
893
|
+
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
894
|
+
onGoto?: ((page: number) => any) | undefined;
|
|
895
|
+
"onPdf-window"?: (() => any) | undefined;
|
|
896
|
+
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
897
|
+
"onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
|
|
898
|
+
"onSearch-toggle"?: (() => any) | undefined;
|
|
899
|
+
"onThumbs-toggle"?: (() => any) | undefined;
|
|
900
|
+
"onImport-excel"?: (() => any) | undefined;
|
|
901
|
+
"onSettings-toggle"?: (() => any) | undefined;
|
|
902
|
+
}>, {
|
|
903
|
+
focusSearch: () => void;
|
|
904
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
905
|
+
export: (format: "pdf" | "xlsx" | "html" | "png" | "word") => any;
|
|
906
|
+
print: () => any;
|
|
907
|
+
zoom: (mode: number | "fit") => any;
|
|
908
|
+
goto: (page: number) => any;
|
|
909
|
+
"pdf-window": () => any;
|
|
910
|
+
"search-input": (query: string) => any;
|
|
911
|
+
"search-nav": (dir: 1 | -1) => any;
|
|
912
|
+
"search-toggle": () => any;
|
|
913
|
+
"thumbs-toggle": () => any;
|
|
914
|
+
"import-excel": () => any;
|
|
915
|
+
"settings-toggle": () => any;
|
|
916
|
+
}, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
|
|
917
|
+
searchInputRef: HTMLInputElement;
|
|
918
|
+
searchToggleRef: HTMLButtonElement;
|
|
919
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
920
|
+
P: {};
|
|
921
|
+
B: {};
|
|
922
|
+
D: {};
|
|
923
|
+
C: {};
|
|
924
|
+
M: {};
|
|
925
|
+
Defaults: {};
|
|
926
|
+
}, Readonly<{
|
|
927
|
+
pageCount: number;
|
|
928
|
+
currentPage: number;
|
|
929
|
+
zoomMode: "fit" | "raw";
|
|
930
|
+
zoom: number;
|
|
931
|
+
showExport: boolean;
|
|
932
|
+
showPrint: boolean;
|
|
933
|
+
showPdfWindow: boolean;
|
|
934
|
+
messages: MachReportMessages;
|
|
935
|
+
search: {
|
|
936
|
+
visible: boolean;
|
|
937
|
+
query: string;
|
|
938
|
+
matchIndex: number;
|
|
939
|
+
matchCount: number;
|
|
940
|
+
searching?: boolean;
|
|
941
|
+
};
|
|
942
|
+
thumbsVisible: boolean;
|
|
943
|
+
showImport?: boolean;
|
|
944
|
+
showSearch?: boolean;
|
|
945
|
+
showThumbnails?: boolean;
|
|
946
|
+
showZoom?: boolean;
|
|
947
|
+
exportFormats?: readonly ReportExportFormat[];
|
|
948
|
+
showSettings?: boolean;
|
|
949
|
+
settingsOpen?: boolean;
|
|
950
|
+
busy?: boolean;
|
|
951
|
+
}> & Readonly<{
|
|
952
|
+
onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
|
|
953
|
+
onPrint?: (() => any) | undefined;
|
|
954
|
+
onZoom?: ((mode: number | "fit") => any) | undefined;
|
|
955
|
+
onGoto?: ((page: number) => any) | undefined;
|
|
956
|
+
"onPdf-window"?: (() => any) | undefined;
|
|
957
|
+
"onSearch-input"?: ((query: string) => any) | undefined;
|
|
958
|
+
"onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
|
|
959
|
+
"onSearch-toggle"?: (() => any) | undefined;
|
|
960
|
+
"onThumbs-toggle"?: (() => any) | undefined;
|
|
961
|
+
"onImport-excel"?: (() => any) | undefined;
|
|
962
|
+
"onSettings-toggle"?: (() => any) | undefined;
|
|
963
|
+
}>, {
|
|
964
|
+
focusSearch: () => void;
|
|
965
|
+
}, {}, {}, {}, {}> | null;
|
|
675
966
|
importInputRef: HTMLInputElement;
|
|
676
967
|
viewportRef: HTMLDivElement;
|
|
677
968
|
containerRef: HTMLDivElement;
|
|
@@ -712,6 +1003,30 @@ export declare const MachReportPreview: {
|
|
|
712
1003
|
type: BooleanConstructor;
|
|
713
1004
|
default: undefined;
|
|
714
1005
|
};
|
|
1006
|
+
showSettings: {
|
|
1007
|
+
type: BooleanConstructor;
|
|
1008
|
+
default: undefined;
|
|
1009
|
+
};
|
|
1010
|
+
toolbar: {
|
|
1011
|
+
type: PropType<MachReportToolbarOptions>;
|
|
1012
|
+
default: undefined;
|
|
1013
|
+
};
|
|
1014
|
+
interaction: {
|
|
1015
|
+
type: PropType<ReportInteractionOptions>;
|
|
1016
|
+
default: undefined;
|
|
1017
|
+
};
|
|
1018
|
+
preferences: {
|
|
1019
|
+
type: PropType<ReportPreferencesOptions>;
|
|
1020
|
+
default: undefined;
|
|
1021
|
+
};
|
|
1022
|
+
assets: {
|
|
1023
|
+
type: PropType<AssetRenderOptions>;
|
|
1024
|
+
default: undefined;
|
|
1025
|
+
};
|
|
1026
|
+
emptyState: {
|
|
1027
|
+
type: PropType<boolean | ReportEmptyState>;
|
|
1028
|
+
default: boolean;
|
|
1029
|
+
};
|
|
715
1030
|
gapPx: {
|
|
716
1031
|
type: NumberConstructor;
|
|
717
1032
|
default: undefined;
|
|
@@ -749,28 +1064,38 @@ export declare const MachReportPreview: {
|
|
|
749
1064
|
default: null;
|
|
750
1065
|
};
|
|
751
1066
|
}>> & Readonly<{
|
|
1067
|
+
onWarning?: ((message: string) => any) | undefined;
|
|
752
1068
|
onError?: ((message: string, detail?: {
|
|
753
1069
|
code: string;
|
|
754
1070
|
cause?: unknown;
|
|
755
1071
|
} | undefined) => any) | undefined;
|
|
756
1072
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
757
|
-
|
|
758
|
-
"onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
|
|
1073
|
+
"onCell-edit"?: ((edit: ReportCellEdit) => any) | undefined;
|
|
759
1074
|
"onTemplate-import"?: ((result: ExcelImportResult) => any) | undefined;
|
|
1075
|
+
"onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
|
|
760
1076
|
}>, {
|
|
761
|
-
reload: () => Promise<void>;
|
|
762
|
-
print: () => Promise<void>;
|
|
763
|
-
exportAs: (format: string) => Promise<void>;
|
|
764
|
-
openPdfWindow: () => void;
|
|
765
|
-
gotoPage: (n: number) => void;
|
|
766
|
-
setParams: (values: Record<string, string>, opts?: {
|
|
767
|
-
reload?: boolean;
|
|
768
|
-
}) => Promise<void>;
|
|
769
|
-
checkPdfFont: () => Promise<PdfFontCheckResult>;
|
|
770
|
-
importExcel: (input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2) => Promise<ExcelImportResult | null>;
|
|
771
|
-
getPlan: () => RenderPlan | null;
|
|
772
|
-
getChanges: () => ReportCellEdit_2[];
|
|
773
1077
|
state: ComputedRef<MachReportState>;
|
|
1078
|
+
checkPdfFont?(): Promise<PdfFontCheckResult>;
|
|
1079
|
+
reload(): Promise<void>;
|
|
1080
|
+
print(): Promise<void>;
|
|
1081
|
+
exportAs(format: string): Promise<void> | void;
|
|
1082
|
+
openPdfWindow(): void;
|
|
1083
|
+
gotoPage(page: number): void;
|
|
1084
|
+
setParams(values: Record<string, string>, opts?: {
|
|
1085
|
+
reload?: boolean;
|
|
1086
|
+
}): Promise<void> | void;
|
|
1087
|
+
importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2): Promise<ExcelImportResult | null>;
|
|
1088
|
+
getPlan?(): RenderPlan | null;
|
|
1089
|
+
getChanges?(): ReportCellEdit[];
|
|
1090
|
+
getDifferences?(): ReportCellEdit[];
|
|
1091
|
+
undo?(): Promise<boolean>;
|
|
1092
|
+
redo?(): Promise<boolean>;
|
|
1093
|
+
restoreChanges?(): Promise<boolean>;
|
|
1094
|
+
getSelection?(): ReportCellSelection | null;
|
|
1095
|
+
focusCell?(address: ReportCellAddress, extend?: boolean): Promise<boolean>;
|
|
1096
|
+
focusField?(target: ReportFieldTarget): Promise<boolean>;
|
|
1097
|
+
copySelection?(): string;
|
|
1098
|
+
pasteSelection?(text: string): Promise<boolean>;
|
|
774
1099
|
}, {}, {}, {}, {
|
|
775
1100
|
editable: boolean | ReportEditingOptions;
|
|
776
1101
|
height: string;
|
|
@@ -781,10 +1106,16 @@ export declare const MachReportPreview: {
|
|
|
781
1106
|
showExport: boolean;
|
|
782
1107
|
showPrint: boolean;
|
|
783
1108
|
showPdfWindow: boolean;
|
|
1109
|
+
showSettings: boolean;
|
|
784
1110
|
showParams: boolean;
|
|
1111
|
+
toolbar: MachReportToolbarOptions;
|
|
1112
|
+
interaction: ReportInteractionOptions;
|
|
1113
|
+
preferences: ReportPreferencesOptions;
|
|
1114
|
+
assets: AssetRenderOptions;
|
|
785
1115
|
messages: Partial<MachReportMessages>;
|
|
786
1116
|
excelImport: boolean | ExcelImportOptions_2;
|
|
787
1117
|
autoLoad: boolean;
|
|
1118
|
+
emptyState: boolean | ReportEmptyState;
|
|
788
1119
|
preset: string;
|
|
789
1120
|
paramDefs: ReportParamDef[] | undefined;
|
|
790
1121
|
fetcher: PlanFetcher | null;
|
|
@@ -821,6 +1152,30 @@ showPdfWindow: {
|
|
|
821
1152
|
type: BooleanConstructor;
|
|
822
1153
|
default: undefined;
|
|
823
1154
|
};
|
|
1155
|
+
showSettings: {
|
|
1156
|
+
type: BooleanConstructor;
|
|
1157
|
+
default: undefined;
|
|
1158
|
+
};
|
|
1159
|
+
toolbar: {
|
|
1160
|
+
type: PropType<MachReportToolbarOptions>;
|
|
1161
|
+
default: undefined;
|
|
1162
|
+
};
|
|
1163
|
+
interaction: {
|
|
1164
|
+
type: PropType<ReportInteractionOptions>;
|
|
1165
|
+
default: undefined;
|
|
1166
|
+
};
|
|
1167
|
+
preferences: {
|
|
1168
|
+
type: PropType<ReportPreferencesOptions>;
|
|
1169
|
+
default: undefined;
|
|
1170
|
+
};
|
|
1171
|
+
assets: {
|
|
1172
|
+
type: PropType<AssetRenderOptions>;
|
|
1173
|
+
default: undefined;
|
|
1174
|
+
};
|
|
1175
|
+
emptyState: {
|
|
1176
|
+
type: PropType<boolean | ReportEmptyState>;
|
|
1177
|
+
default: boolean;
|
|
1178
|
+
};
|
|
824
1179
|
gapPx: {
|
|
825
1180
|
type: NumberConstructor;
|
|
826
1181
|
default: undefined;
|
|
@@ -858,37 +1213,48 @@ type: PropType<PlanFetcher | null>;
|
|
|
858
1213
|
default: null;
|
|
859
1214
|
};
|
|
860
1215
|
}>> & Readonly<{
|
|
1216
|
+
onWarning?: ((message: string) => any) | undefined;
|
|
861
1217
|
onError?: ((message: string, detail?: {
|
|
862
1218
|
code: string;
|
|
863
1219
|
cause?: unknown;
|
|
864
1220
|
} | undefined) => any) | undefined;
|
|
865
1221
|
onLoaded?: ((pageCount: number) => any) | undefined;
|
|
866
|
-
|
|
867
|
-
"onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
|
|
1222
|
+
"onCell-edit"?: ((edit: ReportCellEdit) => any) | undefined;
|
|
868
1223
|
"onTemplate-import"?: ((result: ExcelImportResult) => any) | undefined;
|
|
1224
|
+
"onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
|
|
869
1225
|
}>, {
|
|
870
|
-
reload: () => Promise<void>;
|
|
871
|
-
print: () => Promise<void>;
|
|
872
|
-
exportAs: (format: string) => Promise<void>;
|
|
873
|
-
openPdfWindow: () => void;
|
|
874
|
-
gotoPage: (n: number) => void;
|
|
875
|
-
setParams: (values: Record<string, string>, opts?: {
|
|
876
|
-
reload?: boolean;
|
|
877
|
-
}) => Promise<void>;
|
|
878
|
-
checkPdfFont: () => Promise<PdfFontCheckResult>;
|
|
879
|
-
importExcel: (input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2) => Promise<ExcelImportResult | null>;
|
|
880
|
-
getPlan: () => RenderPlan | null;
|
|
881
|
-
getChanges: () => ReportCellEdit_2[];
|
|
882
1226
|
state: ComputedRef<MachReportState>;
|
|
1227
|
+
checkPdfFont?(): Promise<PdfFontCheckResult>;
|
|
1228
|
+
reload(): Promise<void>;
|
|
1229
|
+
print(): Promise<void>;
|
|
1230
|
+
exportAs(format: string): Promise<void> | void;
|
|
1231
|
+
openPdfWindow(): void;
|
|
1232
|
+
gotoPage(page: number): void;
|
|
1233
|
+
setParams(values: Record<string, string>, opts?: {
|
|
1234
|
+
reload?: boolean;
|
|
1235
|
+
}): Promise<void> | void;
|
|
1236
|
+
importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2): Promise<ExcelImportResult | null>;
|
|
1237
|
+
getPlan?(): RenderPlan | null;
|
|
1238
|
+
getChanges?(): ReportCellEdit[];
|
|
1239
|
+
getDifferences?(): ReportCellEdit[];
|
|
1240
|
+
undo?(): Promise<boolean>;
|
|
1241
|
+
redo?(): Promise<boolean>;
|
|
1242
|
+
restoreChanges?(): Promise<boolean>;
|
|
1243
|
+
getSelection?(): ReportCellSelection | null;
|
|
1244
|
+
focusCell?(address: ReportCellAddress, extend?: boolean): Promise<boolean>;
|
|
1245
|
+
focusField?(target: ReportFieldTarget): Promise<boolean>;
|
|
1246
|
+
copySelection?(): string;
|
|
1247
|
+
pasteSelection?(text: string): Promise<boolean>;
|
|
883
1248
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1249
|
+
warning: (message: string) => any;
|
|
884
1250
|
error: (message: string, detail?: {
|
|
885
1251
|
code: string;
|
|
886
1252
|
cause?: unknown;
|
|
887
1253
|
} | undefined) => any;
|
|
888
1254
|
loaded: (pageCount: number) => any;
|
|
889
|
-
|
|
890
|
-
"cell-edit": (edit: ReportCellEdit_2) => any;
|
|
1255
|
+
"cell-edit": (edit: ReportCellEdit) => any;
|
|
891
1256
|
"template-import": (result: ExcelImportResult) => any;
|
|
1257
|
+
"preferences-change": (preferences: Readonly<ReportPreviewPreferences>) => any;
|
|
892
1258
|
}, string, {
|
|
893
1259
|
editable: boolean | ReportEditingOptions;
|
|
894
1260
|
height: string;
|
|
@@ -899,15 +1265,22 @@ debug: boolean;
|
|
|
899
1265
|
showExport: boolean;
|
|
900
1266
|
showPrint: boolean;
|
|
901
1267
|
showPdfWindow: boolean;
|
|
1268
|
+
showSettings: boolean;
|
|
902
1269
|
showParams: boolean;
|
|
1270
|
+
toolbar: MachReportToolbarOptions;
|
|
1271
|
+
interaction: ReportInteractionOptions;
|
|
1272
|
+
preferences: ReportPreferencesOptions;
|
|
1273
|
+
assets: AssetRenderOptions;
|
|
903
1274
|
messages: Partial<MachReportMessages>;
|
|
904
1275
|
excelImport: boolean | ExcelImportOptions_2;
|
|
905
1276
|
autoLoad: boolean;
|
|
1277
|
+
emptyState: boolean | ReportEmptyState;
|
|
906
1278
|
preset: string;
|
|
907
1279
|
paramDefs: ReportParamDef[] | undefined;
|
|
908
1280
|
fetcher: PlanFetcher | null;
|
|
909
1281
|
}, {}, string, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
910
1282
|
$slots: {
|
|
1283
|
+
settings?(_: {}): any;
|
|
911
1284
|
default?(_: {}): any;
|
|
912
1285
|
};
|
|
913
1286
|
});
|
|
@@ -937,6 +1310,10 @@ declare interface MachReportState {
|
|
|
937
1310
|
readonly saving?: boolean;
|
|
938
1311
|
readonly importing?: boolean;
|
|
939
1312
|
readonly dirty?: boolean;
|
|
1313
|
+
readonly canUndo?: boolean;
|
|
1314
|
+
readonly canRedo?: boolean;
|
|
1315
|
+
readonly changeCount?: number;
|
|
1316
|
+
readonly selection?: Readonly<ReportCellSelection> | null;
|
|
940
1317
|
}
|
|
941
1318
|
|
|
942
1319
|
declare interface MachReportStateError {
|
|
@@ -959,11 +1336,65 @@ declare interface MachReportTheme {
|
|
|
959
1336
|
btnActiveBg: string;
|
|
960
1337
|
}
|
|
961
1338
|
|
|
1339
|
+
declare interface MachReportToolbarOptions {
|
|
1340
|
+
search?: boolean;
|
|
1341
|
+
thumbnails?: boolean;
|
|
1342
|
+
zoom?: boolean;
|
|
1343
|
+
/** 编辑能力由 editable 授权;此项仅设置初始交互偏好,默认 true(兼容旧行为)。 */
|
|
1344
|
+
editing?: boolean;
|
|
1345
|
+
/** 导入能力由 excelImport 授权;此项仅设置初始交互偏好,默认 true。 */
|
|
1346
|
+
excelImport?: boolean;
|
|
1347
|
+
/** 未传时显示全部已有出口;空数组表示不提供导出工具。 */
|
|
1348
|
+
exportFormats?: ReportExportFormat[];
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
declare interface OutputDiagnostic {
|
|
1352
|
+
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";
|
|
1353
|
+
severity: "warning";
|
|
1354
|
+
format: OutputFormat;
|
|
1355
|
+
pageIndex: number;
|
|
1356
|
+
componentIndex: number;
|
|
1357
|
+
/** Nested grid child location as repeating [rowIndex, columnIndex, childIndex] triples. */
|
|
1358
|
+
componentPath?: readonly number[];
|
|
1359
|
+
kind: string;
|
|
1360
|
+
nid?: string;
|
|
1361
|
+
message: string;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
declare interface OutputDiagnostic_2 {
|
|
1365
|
+
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";
|
|
1366
|
+
severity: "warning";
|
|
1367
|
+
format: OutputFormat_2;
|
|
1368
|
+
pageIndex: number;
|
|
1369
|
+
componentIndex: number;
|
|
1370
|
+
/** Nested grid child location as repeating [rowIndex, columnIndex, childIndex] triples. */
|
|
1371
|
+
componentPath?: readonly number[];
|
|
1372
|
+
kind: string;
|
|
1373
|
+
nid?: string;
|
|
1374
|
+
message: string;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
declare interface OutputDiagnosticOptions {
|
|
1378
|
+
/** Structured fidelity diagnostics; rendering never silently invents missing content. */
|
|
1379
|
+
onDiagnostic?: (diagnostic: OutputDiagnostic) => void;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
declare interface OutputDiagnosticOptions_2 {
|
|
1383
|
+
/** Structured fidelity diagnostics; rendering never silently invents missing content. */
|
|
1384
|
+
onDiagnostic?: (diagnostic: OutputDiagnostic_2) => void;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
declare type OutputFormat = "dom" | "canvas" | "pdf" | "xlsx";
|
|
1388
|
+
|
|
1389
|
+
declare type OutputFormat_2 = "dom" | "canvas" | "pdf" | "xlsx";
|
|
1390
|
+
|
|
962
1391
|
declare interface PaginateOptions {
|
|
963
1392
|
/** 每行额外占高(mm),压测专用钩子 */
|
|
964
1393
|
mmPerRow?: number;
|
|
965
1394
|
/** 文本测量器(默认启发式;浏览器端可注入 canvas 测量校准) */
|
|
966
1395
|
measurer?: TextMeasurer;
|
|
1396
|
+
/** 可选页数上限;在追加超限页前终止,避免先分配全部页面再检查。 */
|
|
1397
|
+
maxPages?: number;
|
|
967
1398
|
}
|
|
968
1399
|
|
|
969
1400
|
/** PDF 导出器:RenderPlan → PDF 字节;第二参数可上报非致命保真告警。 */
|
|
@@ -996,6 +1427,8 @@ declare interface PlanComponent {
|
|
|
996
1427
|
lines?: string[];
|
|
997
1428
|
richParagraphs?: RichParagraph[];
|
|
998
1429
|
imageData?: string;
|
|
1430
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
1431
|
+
lineDirection?: "down" | "up";
|
|
999
1432
|
grid?: PlanGrid;
|
|
1000
1433
|
table?: PlanTableFragment;
|
|
1001
1434
|
style?: ComponentStyle;
|
|
@@ -1017,6 +1450,8 @@ declare interface PlanComponent_2 {
|
|
|
1017
1450
|
lines?: string[];
|
|
1018
1451
|
richParagraphs?: RichParagraph_2[];
|
|
1019
1452
|
imageData?: string;
|
|
1453
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
1454
|
+
lineDirection?: "down" | "up";
|
|
1020
1455
|
grid?: PlanGrid_2;
|
|
1021
1456
|
table?: PlanTableFragment_2;
|
|
1022
1457
|
style?: ComponentStyle_2;
|
|
@@ -1038,6 +1473,8 @@ declare interface PlanComponent_3 {
|
|
|
1038
1473
|
lines?: string[];
|
|
1039
1474
|
richParagraphs?: RichParagraph_3[];
|
|
1040
1475
|
imageData?: string;
|
|
1476
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
1477
|
+
lineDirection?: "down" | "up";
|
|
1041
1478
|
grid?: PlanGrid_3;
|
|
1042
1479
|
table?: PlanTableFragment_3;
|
|
1043
1480
|
style?: ComponentStyle_3;
|
|
@@ -1104,6 +1541,8 @@ declare interface PlanTableFragment {
|
|
|
1104
1541
|
columnKeys: string[];
|
|
1105
1542
|
layout?: "page" | "wide";
|
|
1106
1543
|
title?: string;
|
|
1544
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
1545
|
+
source?: Omit<ReportCellSource, "field" | "rowKey"> & { rowKey?: string | number };
|
|
1107
1546
|
}
|
|
1108
1547
|
|
|
1109
1548
|
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
@@ -1117,6 +1556,10 @@ declare interface PlanTableFragment_2 {
|
|
|
1117
1556
|
columnKeys: string[];
|
|
1118
1557
|
layout?: "page" | "wide";
|
|
1119
1558
|
title?: string;
|
|
1559
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
1560
|
+
source?: Omit<ReportCellSource_2, "field" | "rowKey"> & {
|
|
1561
|
+
rowKey?: string | number;
|
|
1562
|
+
};
|
|
1120
1563
|
}
|
|
1121
1564
|
|
|
1122
1565
|
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
@@ -1130,6 +1573,10 @@ declare interface PlanTableFragment_3 {
|
|
|
1130
1573
|
columnKeys: string[];
|
|
1131
1574
|
layout?: "page" | "wide";
|
|
1132
1575
|
title?: string;
|
|
1576
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
1577
|
+
source?: Omit<ReportCellSource_3, "field" | "rowKey"> & {
|
|
1578
|
+
rowKey?: string | number;
|
|
1579
|
+
};
|
|
1133
1580
|
}
|
|
1134
1581
|
|
|
1135
1582
|
/** 预取组件分片(路由 hover / 空闲时调用,正式渲染零等待) */
|
|
@@ -1157,12 +1604,14 @@ declare interface ReportCellAddress_2 {
|
|
|
1157
1604
|
}
|
|
1158
1605
|
|
|
1159
1606
|
declare interface ReportCellContext {
|
|
1160
|
-
address:
|
|
1607
|
+
address: ReportCellAddress_2;
|
|
1161
1608
|
cell: Readonly<GridCell_2>;
|
|
1162
1609
|
component: Readonly<PlanComponent_2>;
|
|
1163
|
-
value:
|
|
1610
|
+
value: ReportCellValue_2;
|
|
1164
1611
|
valueType: ReportCellValueType;
|
|
1165
|
-
table?:
|
|
1612
|
+
table?: ReportCellTableIdentity_2;
|
|
1613
|
+
/** Stable business identity. Physical row indices must never be used as database keys. */
|
|
1614
|
+
source?: Readonly<ReportCellSource_2>;
|
|
1166
1615
|
editable: boolean;
|
|
1167
1616
|
readOnlyReason?: ReportCellReadOnlyReason;
|
|
1168
1617
|
}
|
|
@@ -1170,6 +1619,7 @@ declare interface ReportCellContext {
|
|
|
1170
1619
|
declare interface ReportCellEdit {
|
|
1171
1620
|
address: ReportCellAddress;
|
|
1172
1621
|
table?: ReportCellTableIdentity;
|
|
1622
|
+
source?: Readonly<ReportCellSource>;
|
|
1173
1623
|
previousValue: ReportCellValue;
|
|
1174
1624
|
previousText: string;
|
|
1175
1625
|
value: ReportCellValue;
|
|
@@ -1179,6 +1629,7 @@ declare interface ReportCellEdit {
|
|
|
1179
1629
|
declare interface ReportCellEdit_2 {
|
|
1180
1630
|
address: ReportCellAddress_2;
|
|
1181
1631
|
table?: ReportCellTableIdentity_2;
|
|
1632
|
+
source?: Readonly<ReportCellSource_2>;
|
|
1182
1633
|
previousValue: ReportCellValue_2;
|
|
1183
1634
|
previousText: string;
|
|
1184
1635
|
value: ReportCellValue_2;
|
|
@@ -1187,11 +1638,43 @@ declare interface ReportCellEdit_2 {
|
|
|
1187
1638
|
|
|
1188
1639
|
declare type ReportCellReadOnlyReason = "cell" | "formula" | "complex" | "structure";
|
|
1189
1640
|
|
|
1641
|
+
declare interface ReportCellSelection {
|
|
1642
|
+
anchor: ReportCellAddress;
|
|
1643
|
+
focus: ReportCellAddress;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1647
|
+
declare interface ReportCellSource {
|
|
1648
|
+
datasetId: string;
|
|
1649
|
+
rowKey: string | number;
|
|
1650
|
+
field: string;
|
|
1651
|
+
revision?: string | number;
|
|
1652
|
+
sourceToken?: string;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1656
|
+
declare interface ReportCellSource_2 {
|
|
1657
|
+
datasetId: string;
|
|
1658
|
+
rowKey: string | number;
|
|
1659
|
+
field: string;
|
|
1660
|
+
revision?: string | number;
|
|
1661
|
+
sourceToken?: string;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1665
|
+
declare interface ReportCellSource_3 {
|
|
1666
|
+
datasetId: string;
|
|
1667
|
+
rowKey: string | number;
|
|
1668
|
+
field: string;
|
|
1669
|
+
revision?: string | number;
|
|
1670
|
+
sourceToken?: string;
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1190
1673
|
declare interface ReportCellTableIdentity {
|
|
1191
1674
|
id: string;
|
|
1192
1675
|
/** 逻辑表行索引;跨分页的同一行保持不变。 */
|
|
1193
1676
|
rowIndex: number;
|
|
1194
|
-
role:
|
|
1677
|
+
role: PlanTableFragment["role"];
|
|
1195
1678
|
columnKey?: string;
|
|
1196
1679
|
}
|
|
1197
1680
|
|
|
@@ -1199,7 +1682,7 @@ declare interface ReportCellTableIdentity_2 {
|
|
|
1199
1682
|
id: string;
|
|
1200
1683
|
/** 逻辑表行索引;跨分页的同一行保持不变。 */
|
|
1201
1684
|
rowIndex: number;
|
|
1202
|
-
role:
|
|
1685
|
+
role: PlanTableFragment_2["role"];
|
|
1203
1686
|
columnKey?: string;
|
|
1204
1687
|
}
|
|
1205
1688
|
|
|
@@ -1215,25 +1698,69 @@ declare interface ReportDefinition {
|
|
|
1215
1698
|
/** 静态数据;load 存在时优先使用 load 的结果。 */
|
|
1216
1699
|
datasets?: DatasetRows;
|
|
1217
1700
|
load?: (context: ReportLoadContext) => DatasetRows | Promise<DatasetRows>;
|
|
1701
|
+
/** 可选统一适配器;load 存在时仍优先 load,兼容已有定义。 */
|
|
1702
|
+
provider?: ReportProvider;
|
|
1703
|
+
/** 可选业务数据契约;声明的数据集缺失或字段不合法时,在分页前给出结构化错误。 */
|
|
1704
|
+
dataSchema?: Record<string, DatasetContract>;
|
|
1705
|
+
dataValidation?: Pick<DatasetValidationOptions, "maxRows" | "maxCells" | "maxIssues">;
|
|
1218
1706
|
/** 覆盖模板参数定义;动态模板应在此声明查询面板元数据,避免查询前先请求模板。 */
|
|
1219
1707
|
params?: ReportParamDef[];
|
|
1220
1708
|
pagination?: PaginateOptions;
|
|
1221
1709
|
}
|
|
1222
1710
|
|
|
1711
|
+
declare interface ReportDiagnostic { code: string; message: string; path?: string; severity: "warning" | "error" | "info" }
|
|
1712
|
+
|
|
1713
|
+
declare interface ReportEditBatch {
|
|
1714
|
+
/** Idempotency identity; the server should bind it to the exact payload. */
|
|
1715
|
+
requestId: string;
|
|
1716
|
+
edits: ReportCellEdit_2[];
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
declare interface ReportEditConflict {
|
|
1720
|
+
source?: Readonly<ReportCellSource_2>;
|
|
1721
|
+
address?: ReportCellAddress_2;
|
|
1722
|
+
message: string;
|
|
1723
|
+
currentValue?: ReportCellValue_2;
|
|
1724
|
+
revision?: string | number;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1223
1727
|
/** Opt in with true for local drafts, or provide host validation and persistence. */
|
|
1224
1728
|
declare interface ReportEditingOptions {
|
|
1225
1729
|
canEdit?(context: ReportCellContext): boolean;
|
|
1226
1730
|
/** Return an error message or throw to reject the edit. */
|
|
1227
|
-
validate?(edit: Readonly<
|
|
1731
|
+
validate?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | string | Promise<void | string>;
|
|
1228
1732
|
/** Called before applying the change. A rejection leaves the current report untouched. */
|
|
1229
|
-
save?(edit: Readonly<
|
|
1733
|
+
save?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
|
|
1734
|
+
/** Must commit all edits in one server transaction. Required for multi-cell persisted edits. */
|
|
1735
|
+
saveBatch?(batch: Readonly<ReportEditBatch>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
|
|
1736
|
+
/** Restrict persistence to plans that supply stable datasetId/rowKey/field metadata. */
|
|
1737
|
+
requireSource?: boolean;
|
|
1230
1738
|
}
|
|
1231
1739
|
|
|
1232
1740
|
declare interface ReportEditOperation {
|
|
1233
1741
|
/** Reload, another import or unmount aborts the operation. Save adapters should forward this signal. */
|
|
1234
1742
|
signal: AbortSignal;
|
|
1743
|
+
requestId?: string;
|
|
1744
|
+
action?: "edit" | "undo" | "redo" | "restore";
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
declare interface ReportEditResult {
|
|
1748
|
+
/** A successful result may advance concurrency tokens for the affected dataset. */
|
|
1749
|
+
revision?: string | number;
|
|
1750
|
+
sourceToken?: string;
|
|
1751
|
+
/** Any conflict rejects the entire client batch. A server must also transact atomically. */
|
|
1752
|
+
conflicts?: readonly ReportEditConflict[];
|
|
1235
1753
|
}
|
|
1236
1754
|
|
|
1755
|
+
/** 报表含表头但业务行为空时,由接入方明确声明;组件不推测业务数据。 */
|
|
1756
|
+
declare interface ReportEmptyState {
|
|
1757
|
+
title?: string;
|
|
1758
|
+
description?: string;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
/** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
|
|
1762
|
+
declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
|
|
1763
|
+
|
|
1237
1764
|
/** 保持 Promise<RenderPlan> 契约;元数据为可选,旧业务 fetcher 无需改造。 */
|
|
1238
1765
|
declare interface ReportFetcher {
|
|
1239
1766
|
(input: ReportFetchInput): Promise<RenderPlan>;
|
|
@@ -1246,6 +1773,35 @@ declare interface ReportFetchInput {
|
|
|
1246
1773
|
signal?: AbortSignal;
|
|
1247
1774
|
/** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
|
|
1248
1775
|
onWarning?: (message: string) => void;
|
|
1776
|
+
onQueryResult?: (reportId: string, result: ReportQueryResult) => void;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
declare interface ReportFieldContract {
|
|
1780
|
+
field: string;
|
|
1781
|
+
label?: string;
|
|
1782
|
+
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
1783
|
+
required?: boolean;
|
|
1784
|
+
nullable?: boolean;
|
|
1785
|
+
enum?: readonly (string | number | boolean)[];
|
|
1786
|
+
min?: number; max?: number;
|
|
1787
|
+
minLength?: number; maxLength?: number;
|
|
1788
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
1789
|
+
unit?: string;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
declare interface ReportFieldTarget {
|
|
1793
|
+
field: string;
|
|
1794
|
+
datasetId?: string;
|
|
1795
|
+
rowKey?: string | number;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
declare interface ReportInteractionOptions {
|
|
1799
|
+
/** Screen-only frozen panes; exported geometry is unchanged. */
|
|
1800
|
+
freezeHeaders?: boolean;
|
|
1801
|
+
/** Leading identity columns, from 0 to 20. */
|
|
1802
|
+
frozenColumns?: number;
|
|
1803
|
+
/** Show workbook sheets / report sections when available. Default true. */
|
|
1804
|
+
navigation?: boolean;
|
|
1249
1805
|
}
|
|
1250
1806
|
|
|
1251
1807
|
/** 取数与排版共同使用的请求上下文;取消只影响本次调用。 */
|
|
@@ -1267,6 +1823,11 @@ declare interface ReportParamDef {
|
|
|
1267
1823
|
defaultValue?: string;
|
|
1268
1824
|
required?: boolean;
|
|
1269
1825
|
placeholder?: string;
|
|
1826
|
+
/** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
|
|
1827
|
+
min?: number | string;
|
|
1828
|
+
max?: number | string;
|
|
1829
|
+
minLength?: number;
|
|
1830
|
+
maxLength?: number;
|
|
1270
1831
|
}
|
|
1271
1832
|
|
|
1272
1833
|
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
@@ -1284,10 +1845,69 @@ declare interface ReportParamDef_2 {
|
|
|
1284
1845
|
defaultValue?: string;
|
|
1285
1846
|
required?: boolean;
|
|
1286
1847
|
placeholder?: string;
|
|
1848
|
+
/** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
|
|
1849
|
+
min?: number | string;
|
|
1850
|
+
max?: number | string;
|
|
1851
|
+
minLength?: number;
|
|
1852
|
+
maxLength?: number;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
declare interface ReportParamIssue { code: ReportParamIssueCode; path: string; field: string; message: string }
|
|
1856
|
+
|
|
1857
|
+
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
1858
|
+
|
|
1859
|
+
declare interface ReportPreferencesAdapter {
|
|
1860
|
+
load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
|
|
1861
|
+
save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
|
|
1862
|
+
remove?(key: string): void | Promise<void>;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
declare interface ReportPreferencesOptions {
|
|
1866
|
+
/** Host-scoped key; do not share one key between unrelated users/tenants. */
|
|
1867
|
+
key: string;
|
|
1868
|
+
adapter: ReportPreferencesAdapter;
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
declare type ReportPreviewPreferences = Record<ReportPreviewTool, boolean>;
|
|
1872
|
+
|
|
1873
|
+
declare type ReportPreviewTool = "search" | "thumbnails" | "zoom" | ReportExportFormat | "print" | "pdfWindow" | "editing" | "import";
|
|
1874
|
+
|
|
1875
|
+
/** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
|
|
1876
|
+
declare interface ReportProvider {
|
|
1877
|
+
query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
|
|
1878
|
+
save?(input: ReportSaveInput): ReportSaveResult | Promise<ReportSaveResult>;
|
|
1879
|
+
export?(input: ReportProviderExportInput): ReportProviderExportResult | Promise<ReportProviderExportResult>;
|
|
1880
|
+
templates?: ReportTemplateProvider;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
declare interface ReportProviderExportInput extends ReportLoadContext { format: "pdf" | "xlsx" }
|
|
1884
|
+
|
|
1885
|
+
declare interface ReportProviderExportResult { bytes: Uint8Array; contentType: string; fileName?: string; diagnostics?: ReportDiagnostic[] }
|
|
1886
|
+
|
|
1887
|
+
declare interface ReportQueryResult {
|
|
1888
|
+
datasets: DatasetRows;
|
|
1889
|
+
revision?: string;
|
|
1890
|
+
sourceToken?: string;
|
|
1891
|
+
diagnostics?: ReportDiagnostic[];
|
|
1287
1892
|
}
|
|
1288
1893
|
|
|
1289
1894
|
declare type ReportRegistry = Record<string, ReportDefinition>;
|
|
1290
1895
|
|
|
1896
|
+
declare interface ReportSaveInput extends ReportLoadContext {
|
|
1897
|
+
requestId: string;
|
|
1898
|
+
expectedRevision?: string;
|
|
1899
|
+
sourceToken?: string;
|
|
1900
|
+
edits: readonly ReportCellEdit[];
|
|
1901
|
+
action?: "edit" | "undo" | "redo" | "restore";
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
declare interface ReportSaveResult {
|
|
1905
|
+
revision: string;
|
|
1906
|
+
sourceToken?: string;
|
|
1907
|
+
conflicts?: Array<{ editIndex: number; code: string; message: string }>;
|
|
1908
|
+
diagnostics?: ReportDiagnostic[];
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1291
1911
|
declare interface ReportTemplate {
|
|
1292
1912
|
schemaVersion?: string;
|
|
1293
1913
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
@@ -1302,8 +1922,26 @@ declare interface ReportTemplate_2 {
|
|
|
1302
1922
|
pages: TemplatePage_2[];
|
|
1303
1923
|
}
|
|
1304
1924
|
|
|
1925
|
+
/** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
|
|
1926
|
+
declare interface ReportTemplateDocument {
|
|
1927
|
+
schemaVersion: "1.0";
|
|
1928
|
+
id: string;
|
|
1929
|
+
name: string;
|
|
1930
|
+
/** 宿主的发布版本/乐观锁标识,不由引擎自动递增。 */
|
|
1931
|
+
revision?: string;
|
|
1932
|
+
description?: string;
|
|
1933
|
+
template: ReportTemplate;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1305
1936
|
declare type ReportTemplateLoader = (context: ReportLoadContext) => ReportTemplate | Promise<ReportTemplate>;
|
|
1306
1937
|
|
|
1938
|
+
declare interface ReportTemplateProvider {
|
|
1939
|
+
list(context: { signal?: AbortSignal }): Promise<ReportTemplateSummary[]>;
|
|
1940
|
+
get(id: string, context: { signal?: AbortSignal }): Promise<ReportTemplateDocument | undefined>;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
1944
|
+
|
|
1307
1945
|
declare interface RichParagraph {
|
|
1308
1946
|
segments: RichSegment[];
|
|
1309
1947
|
align?: ComponentStyle["align"];
|
|
@@ -1412,7 +2050,9 @@ declare interface TemplatePage_2 {
|
|
|
1412
2050
|
|
|
1413
2051
|
declare interface TextMeasureOptions {
|
|
1414
2052
|
fontSizePt: number;
|
|
2053
|
+
fontFamily?: string;
|
|
1415
2054
|
bold?: boolean;
|
|
2055
|
+
italic?: boolean;
|
|
1416
2056
|
letterSpacingPt?: number;
|
|
1417
2057
|
}
|
|
1418
2058
|
|
|
@@ -1429,7 +2069,7 @@ declare interface TextMeasurer {
|
|
|
1429
2069
|
* 目标是"财务能直接用的对账表"而非复刻版面)
|
|
1430
2070
|
* - 未支持组件、富文本专有内容与单元格嵌套组件跳过并计入 warnings
|
|
1431
2071
|
*/
|
|
1432
|
-
declare interface XlsxRenderOptions {
|
|
2072
|
+
declare interface XlsxRenderOptions extends OutputDiagnosticOptions_2 {
|
|
1433
2073
|
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|
|
1434
2074
|
sheetName?: (sheetIndex: number) => string;
|
|
1435
2075
|
/** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
|