@hailin-zheng/editor-core 2.0.27 → 2.0.29
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/index-cjs.js +79 -38
- package/index-cjs.js.map +1 -1
- package/index.js +79 -38
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +2 -12
- package/med_editor/framework/common-util.d.ts +1 -0
- package/med_editor/framework/editor-calendar-vnode.d.ts +2 -2
- package/package.json +1 -1
@@ -88,7 +88,7 @@ export declare class DocEditor {
|
|
88
88
|
* @param visibility
|
89
89
|
*/
|
90
90
|
setCursorVisibility(visibility: boolean): void;
|
91
|
-
hiddenInput(reset?: boolean): void;
|
91
|
+
hiddenInput(reset?: boolean, pos?: Omit<Rect, 'width'> | null): void;
|
92
92
|
/**
|
93
93
|
* 设置光标位置
|
94
94
|
* @param position
|
@@ -98,12 +98,6 @@ export declare class DocEditor {
|
|
98
98
|
y: number;
|
99
99
|
height: number;
|
100
100
|
}): void;
|
101
|
-
/**
|
102
|
-
* 将相对坐标位置转换为绝对坐标位
|
103
|
-
* 由于缩放,导致绝对位置=相对位置*scale
|
104
|
-
* @param pos
|
105
|
-
*/
|
106
|
-
transToAbsolutePos<T extends Position | Rect>(pos: T): T;
|
107
101
|
/**
|
108
102
|
* 判断是否光标可以设置接受编辑
|
109
103
|
* @returns
|
@@ -142,11 +136,7 @@ export declare class DocEditor {
|
|
142
136
|
* @param element
|
143
137
|
* @returns
|
144
138
|
*/
|
145
|
-
getDataElementPosition(element: LeafElement):
|
146
|
-
x: number;
|
147
|
-
y: number;
|
148
|
-
translateY: number;
|
149
|
-
} | undefined;
|
139
|
+
getDataElementPosition(element: LeafElement): Omit<Rect, 'width'> | null;
|
150
140
|
/**
|
151
141
|
* 获取文档模型
|
152
142
|
* @returns
|
@@ -63,5 +63,6 @@ export declare class CommonUtil {
|
|
63
63
|
static isConstructor(f: any): boolean;
|
64
64
|
static toArray<T>(item: Array<T> | T): Array<T>;
|
65
65
|
static removeChild(ele: HTMLElement): void;
|
66
|
+
static findParent(curr: HTMLElement | null, predicate: (parent: HTMLElement) => boolean): HTMLElement | null;
|
66
67
|
}
|
67
68
|
export {};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { EditorVNodeObject } from "./render-define";
|
2
2
|
import { Subject } from "./event-subject";
|
3
3
|
import { ISignal } from "../editor-core";
|
4
|
-
import {
|
4
|
+
import { Rect } from "./element-define";
|
5
5
|
/**
|
6
6
|
* 渲染日历虚拟节点处理类
|
7
7
|
*/
|
@@ -16,7 +16,7 @@ export declare class EditorCalendarVNode {
|
|
16
16
|
selectedTime: ISignal<string | null>;
|
17
17
|
constructor();
|
18
18
|
reset(): void;
|
19
|
-
render(position:
|
19
|
+
render(position: Omit<Rect, 'width'>, dataValue: string): EditorVNodeObject | null;
|
20
20
|
private renderDropContainer;
|
21
21
|
renderDay(): EditorVNodeObject | null;
|
22
22
|
navigateToToday(): void;
|