@gct-paas/word 0.1.62-patch.2 → 0.1.62-patch.4
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/base/utils/image-size-util.d.ts +6 -4
- package/dist/core/view/Doc.d.ts +13 -0
- package/dist/domain/constants/enum.d.ts +7 -0
- package/dist/index.es.js +858 -656
- package/dist/sdk/doc-runtime/factories/useDocumentFactory.d.ts +4 -0
- package/dist/suites/edhr/manifest/field/_common_/basic.d.ts +1 -0
- package/dist/utils/fonts/normalize-document-font.d.ts +16 -0
- package/dist/word.css +38 -17
- package/package.json +1 -1
|
@@ -20,9 +20,11 @@ export declare function computeImageDisplaySize(natural: ImageSize, opts?: Image
|
|
|
20
20
|
* 在目标框内等比缩放(contain),不压缩、不拉伸
|
|
21
21
|
*/
|
|
22
22
|
export declare function computeContainDisplaySize(natural: ImageSize, box: ImageSize): ImageSize;
|
|
23
|
+
/** 同步取无图签名缓存(布局重建时可避免先闪占位再异步补图) */
|
|
24
|
+
export declare function getCachedSignatureImage(name: string, width?: number, height?: number, time?: number | string, fallbackSignType?: string): HTMLImageElement | null;
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
+
* 创建无图签名兜底图
|
|
27
|
+
* 默认用户名 + 电子签名 + 验证日期;仅用户名时只绘制姓名
|
|
26
28
|
*/
|
|
27
|
-
export declare function createSignatureImageDataUrl(name: string, width?: number, height?: number, time?: number | string): string;
|
|
28
|
-
export declare function createSignatureImage(name: string, width?: number, height?: number, time?: number | string): Promise<HTMLImageElement>;
|
|
29
|
+
export declare function createSignatureImageDataUrl(name: string, width?: number, height?: number, time?: number | string, fallbackSignType?: string): string;
|
|
30
|
+
export declare function createSignatureImage(name: string, width?: number, height?: number, time?: number | string, fallbackSignType?: string): Promise<HTMLImageElement>;
|
package/dist/core/view/Doc.d.ts
CHANGED
|
@@ -11,6 +11,15 @@ import { DocModeType } from '../constants';
|
|
|
11
11
|
import { CommandPayloadMap, RequiredPayloadCommands, OptionalPayloadCommands } from '../command/types';
|
|
12
12
|
import { DocModel } from '../model';
|
|
13
13
|
import { DocRuntimeMeta, FieldModelQuery } from '../../sdk/types';
|
|
14
|
+
/** 设备配置。签名预览读取其中的默认用户名 / 登录账号 */
|
|
15
|
+
export interface DocDeviceConfig {
|
|
16
|
+
defaultUserId?: string;
|
|
17
|
+
defaultOrgId?: string;
|
|
18
|
+
defaultLoginAccount?: string;
|
|
19
|
+
defaultUserName?: string;
|
|
20
|
+
defaultProductSearchFields?: string;
|
|
21
|
+
enableUserField?: boolean;
|
|
22
|
+
}
|
|
14
23
|
export interface DocInitOptions {
|
|
15
24
|
mode?: DocModeType;
|
|
16
25
|
model?: DocModel;
|
|
@@ -22,6 +31,8 @@ export interface DocInitOptions {
|
|
|
22
31
|
btnRenderModeType: DocModeType;
|
|
23
32
|
formType: string;
|
|
24
33
|
paramsConfig: Record<string, any>;
|
|
34
|
+
/** 设备配置信息 */
|
|
35
|
+
deviceConfig?: DocDeviceConfig;
|
|
25
36
|
pageSize?: {
|
|
26
37
|
width: number;
|
|
27
38
|
height: number;
|
|
@@ -65,6 +76,8 @@ export declare class Doc {
|
|
|
65
76
|
docRuntimeMeta: DocRuntimeMeta;
|
|
66
77
|
/** 外部的参数配置 */
|
|
67
78
|
paramsConfig: Record<string, any>;
|
|
79
|
+
/** 设备配置信息 */
|
|
80
|
+
deviceConfig?: DocDeviceConfig;
|
|
68
81
|
/** 字段/模型查询(由上层注入 `SuiteRuntime` 等实现) */
|
|
69
82
|
fieldModelQuery: FieldModelQuery;
|
|
70
83
|
/** 安全距离-上下 */
|
|
@@ -115,6 +115,13 @@ export declare const SignDisplayTypeConst: {
|
|
|
115
115
|
/** 水平显示 */
|
|
116
116
|
HORIZONTAL: string;
|
|
117
117
|
};
|
|
118
|
+
/** 兜底签名配置:个人无上传/手写签名素材时,密码校验通过后展示的样式 */
|
|
119
|
+
export declare const FallbackSignTypeConst: {
|
|
120
|
+
/** 仅用户名 */
|
|
121
|
+
NAME_ONLY: string;
|
|
122
|
+
/** 用户名 + 签署日期 */
|
|
123
|
+
NAME_AND_DATE: string;
|
|
124
|
+
};
|
|
118
125
|
/** 图片显示模式 */
|
|
119
126
|
export declare const ImageDisplayModeConst: {
|
|
120
127
|
/** 自定义 */
|