@gct-paas/word 0.2.5 → 0.2.6
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 +11 -6
- package/dist/core/layout/handlers/fields/signature-decoration-layout.d.ts +14 -0
- package/dist/core/model/logic/subtable/shared/merged-table-range.d.ts +4 -0
- package/dist/core/view/runs/ImageRun.d.ts +9 -0
- package/dist/domain/constants/enum/signature.d.ts +14 -0
- package/dist/index.es.js +3413 -2542
- package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/fixed-quick-fill-layout.d.ts +30 -0
- package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/quick-fill.util.d.ts +2 -1
- package/dist/runtime/renderer/dialogs/signature/logic.d.ts +5 -1
- package/dist/runtime/renderer/dialogs/signature/signature-autofill-runtime.d.ts +14 -0
- package/dist/sdk/types/index.d.ts +2 -0
- package/dist/suites/edhr/manifest/field/_common_/basic.d.ts +5 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-node.vue.d.ts +2 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-select.vue.d.ts +4 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/types.d.ts +2 -0
- package/dist/word.css +150 -47
- package/package.json +1 -1
|
@@ -18,6 +18,11 @@ export interface ImageCropRect {
|
|
|
18
18
|
width: number;
|
|
19
19
|
height: number;
|
|
20
20
|
}
|
|
21
|
+
/** 固定 360×204 兜底图同一比例,按 2 倍像素绘制 */
|
|
22
|
+
export declare const FALLBACK_SIGN_DISPLAY_SIZE: {
|
|
23
|
+
readonly width: 180;
|
|
24
|
+
readonly height: 102;
|
|
25
|
+
};
|
|
21
26
|
/**
|
|
22
27
|
* 根据图片原始尺寸 + 配置,计算最终显示尺寸
|
|
23
28
|
*/
|
|
@@ -34,11 +39,11 @@ export declare function computeContainLayout(natural: ImageSize, box: ImageSize)
|
|
|
34
39
|
* 在目标框内等比缩放(contain),不压缩、不拉伸
|
|
35
40
|
*/
|
|
36
41
|
export declare function computeContainDisplaySize(natural: ImageSize, box: ImageSize): ImageSize;
|
|
37
|
-
/**
|
|
38
|
-
export declare function getCachedSignatureImage(name: string,
|
|
42
|
+
/** 同步取无图签名缓存(布局重建时可避免先闪占位再异步补图)。宽高参数仅为兼容现有调用。 */
|
|
43
|
+
export declare function getCachedSignatureImage(name: string, _width?: number, _height?: number, time?: number | string, fallbackSignType?: string, signatureImageDirection?: string): HTMLImageElement | null;
|
|
39
44
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
45
|
+
* 创建无图签名兜底图
|
|
46
|
+
* 默认用户名 + 电子签名 + 验证日期;仅用户名时只绘制姓名
|
|
42
47
|
*/
|
|
43
|
-
export declare function createSignatureImageDataUrl(name: string,
|
|
44
|
-
export declare function createSignatureImage(name: string, width?: number, height?: number, time?: number | string): Promise<HTMLImageElement>;
|
|
48
|
+
export declare function createSignatureImageDataUrl(name: string, _width?: number, _height?: number, time?: number | string, fallbackSignType?: string, signatureImageDirection?: string): string;
|
|
49
|
+
export declare function createSignatureImage(name: string, width?: number, height?: number, time?: number | string, fallbackSignType?: string, signatureImageDirection?: string): Promise<HTMLImageElement>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** 签名与日期的组合区域。未设置样式的旧模板按上下排列。 */
|
|
2
|
+
export declare function getSignatureDecorationPlacement(width: number, height: number, textWidth: number, textHeight: number, gap: number, signDisplayStyle?: string): {
|
|
3
|
+
position: "right";
|
|
4
|
+
rectWidth: number;
|
|
5
|
+
rectHeight: number;
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
} | {
|
|
9
|
+
position: "bottom";
|
|
10
|
+
rectWidth: number;
|
|
11
|
+
rectHeight: number;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
@@ -10,14 +10,20 @@ export interface IImageRun {
|
|
|
10
10
|
readonly width: number;
|
|
11
11
|
/** 组件高度 */
|
|
12
12
|
readonly height: number;
|
|
13
|
+
/** 图片本身的宽高(不包含日期装饰) */
|
|
14
|
+
readonly imageWidth: number;
|
|
15
|
+
readonly imageHeight: number;
|
|
13
16
|
/** 组件坐标位置 */
|
|
14
17
|
readonly x: number;
|
|
15
18
|
/** 组件坐标位置 */
|
|
16
19
|
readonly y: number;
|
|
17
20
|
/** 图片源地址 */
|
|
18
21
|
src: string;
|
|
22
|
+
decorations?: ImageRunOptions['decorations'];
|
|
19
23
|
/** 是否保持等比 */
|
|
20
24
|
keepAspect: boolean;
|
|
25
|
+
/** 下方文字比图片宽时,图片在组合区域中的水平偏移 */
|
|
26
|
+
readonly imageOffsetX: number;
|
|
21
27
|
}
|
|
22
28
|
export interface ImageRunOptions extends LayoutNodeOptions {
|
|
23
29
|
src: string;
|
|
@@ -45,6 +51,9 @@ export declare class ImageRun extends LayoutNode implements IImageRun {
|
|
|
45
51
|
decorations?: ImageRunOptions['decorations'];
|
|
46
52
|
get width(): number;
|
|
47
53
|
set width(value: number);
|
|
54
|
+
get imageWidth(): number;
|
|
55
|
+
get imageHeight(): number;
|
|
56
|
+
get imageOffsetX(): number;
|
|
48
57
|
get height(): number;
|
|
49
58
|
set height(value: number);
|
|
50
59
|
constructor(options: ImageRunOptions);
|
|
@@ -28,3 +28,17 @@ export declare const SignDisplayTypeConst: {
|
|
|
28
28
|
/** 水平显示 */
|
|
29
29
|
HORIZONTAL: string;
|
|
30
30
|
};
|
|
31
|
+
/** 兜底签名配置:个人无上传/手写签名素材时,密码校验通过后展示的样式 */
|
|
32
|
+
export declare const FallbackSignTypeConst: {
|
|
33
|
+
/** 仅用户名 */
|
|
34
|
+
NAME_ONLY: string;
|
|
35
|
+
/** 用户名 + 签署日期 */
|
|
36
|
+
NAME_AND_DATE: string;
|
|
37
|
+
};
|
|
38
|
+
/** 签名图片方向 */
|
|
39
|
+
export declare const SignatureImageDirectionConst: {
|
|
40
|
+
/** 横向签名 */
|
|
41
|
+
HORIZONTAL: string;
|
|
42
|
+
/** 竖向签名 */
|
|
43
|
+
VERTICAL: string;
|
|
44
|
+
};
|