@borurio-print/print-designer 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{canvasPdfGenerator-CRCbiKtP.js → canvasPdfGenerator-EelKCj7d.js} +391 -387
- package/dist-lib/core/printPagination.d.ts +2 -1
- package/dist-lib/core/templatePrintTypes.d.ts +3 -2
- package/dist-lib/core/types.d.ts +6 -1
- package/dist-lib/{index-SdN_1rry.js → index-BvL56GJM.js} +4220 -4174
- package/dist-lib/index.d.ts +1 -1
- package/dist-lib/{index.es-CBHrCdZT.js → index.es-C24tbhmm.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { DesignerElement, PrintRenderPage, TemplateMode } from './types';
|
|
1
|
+
import type { DesignerElement, PrintRenderPage, TemplateMode, PrintRequest } from './types';
|
|
2
2
|
interface PaginationOptions {
|
|
3
3
|
templateMode: TemplateMode;
|
|
4
4
|
firstElements: DesignerElement[];
|
|
5
5
|
continuationElements: DesignerElement[];
|
|
6
6
|
}
|
|
7
|
+
export declare function buildRequestedPrintPages(request: PrintRequest, options: PaginationOptions): PrintRenderPage[];
|
|
7
8
|
export declare function buildPrintRenderPages(data: unknown, options: PaginationOptions): PrintRenderPage[];
|
|
8
9
|
export declare function buildRepeatedPrintPages(pageCount: number, options: PaginationOptions): PrintRenderPage[];
|
|
9
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PrinterSetting, PrintPluginProps } from './localPrintTypes';
|
|
2
|
-
import type { PrintDesignerTheme, PrintResult, PrintTemplate } from './types';
|
|
2
|
+
import type { ExplicitPrintPage, PrintDesignerTheme, PrintResult, PrintTemplate } from './types';
|
|
3
3
|
/** 业务系统传给统一打印弹窗的模板选项。 */
|
|
4
4
|
export interface TemplatePrintOption {
|
|
5
5
|
id: string | number;
|
|
@@ -9,7 +9,8 @@ export interface TemplatePrintOption {
|
|
|
9
9
|
}
|
|
10
10
|
/** 每次打开统一打印弹窗时传入的任务数据。 */
|
|
11
11
|
export interface TemplatePrintDialogOpenOptions {
|
|
12
|
-
data
|
|
12
|
+
data?: unknown;
|
|
13
|
+
pages?: ExplicitPrintPage[];
|
|
13
14
|
defaultTemplateId?: string | number;
|
|
14
15
|
/** 调用方可指定任务 ID;缺少时由组件生成。 */
|
|
15
16
|
requestId?: string;
|
package/dist-lib/core/types.d.ts
CHANGED
|
@@ -50,10 +50,15 @@ export interface PrintRenderOptions {
|
|
|
50
50
|
pageConcurrency?: number;
|
|
51
51
|
}
|
|
52
52
|
/** 业务系统发起一次 PDF 生成或预览的请求。 */
|
|
53
|
+
export interface ExplicitPrintPage {
|
|
54
|
+
templatePage: TemplatePage;
|
|
55
|
+
data: Record<string, unknown>;
|
|
56
|
+
}
|
|
53
57
|
export interface PrintRequest<T = unknown> {
|
|
54
58
|
/** 由调用方生成,用于将异步结果与请求一一对应。 */
|
|
55
59
|
requestId: string;
|
|
56
|
-
data
|
|
60
|
+
data?: T;
|
|
61
|
+
pages?: ExplicitPrintPage[];
|
|
57
62
|
/** 只有显式需要获取 PDF 文件时才设置为 true。 */
|
|
58
63
|
returnBlob?: boolean;
|
|
59
64
|
/** 可选的打印性能参数;未传时使用组件内置默认值。 */
|