@hailin-zheng/editor-core 2.1.26 → 2.1.27
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/controls/ButtonBase.d.ts +10 -10
- package/controls/Canvas.d.ts +7 -7
- package/controls/Config.d.ts +12 -12
- package/controls/FlexBox.d.ts +81 -81
- package/controls/Input.d.ts +33 -33
- package/controls/MedTimeLine/TimeAxis.d.ts +21 -21
- package/controls/MedTimeLine/TimeSlider.d.ts +19 -19
- package/controls/Menu.d.ts +31 -31
- package/controls/Node.d.ts +232 -232
- package/controls/NodeEvent.d.ts +138 -138
- package/controls/Rect.d.ts +4 -4
- package/controls/ScrollView.d.ts +57 -57
- package/controls/StackPanel.d.ts +27 -27
- package/controls/SurfaceView.d.ts +44 -44
- package/controls/Text.d.ts +46 -46
- package/controls/TextBase.d.ts +19 -19
- package/controls/ViewPaint.d.ts +64 -64
- package/controls/Window.d.ts +27 -27
- package/controls/WrapPanel.d.ts +10 -10
- package/controls/event-subject.d.ts +42 -42
- package/editor.css +544 -544
- package/index-cjs.d.ts +31 -31
- package/index-cjs.js +26740 -26740
- package/index-cjs.js.map +1 -1
- package/index.d.ts +31 -31
- package/index.js +26744 -26744
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +458 -458
- package/med_editor/doc-rule.d.ts +46 -46
- package/med_editor/editor-core.d.ts +21 -21
- package/med_editor/framework/ast-parser.d.ts +4 -4
- package/med_editor/framework/common-util.d.ts +76 -76
- package/med_editor/framework/document-arrange.d.ts +85 -85
- package/med_editor/framework/document-change.d.ts +295 -295
- package/med_editor/framework/document-combine.d.ts +24 -24
- package/med_editor/framework/document-comment.d.ts +38 -38
- package/med_editor/framework/document-context.d.ts +143 -143
- package/med_editor/framework/document-eval-func.d.ts +18 -18
- package/med_editor/framework/document-event.d.ts +262 -262
- package/med_editor/framework/document-input-cursor.d.ts +43 -43
- package/med_editor/framework/document-paginator.d.ts +47 -47
- package/med_editor/framework/document-print-offscreen.d.ts +58 -58
- package/med_editor/framework/document-print.d.ts +18 -18
- package/med_editor/framework/document-segmenter.d.ts +2 -2
- package/med_editor/framework/document-selection.d.ts +97 -97
- package/med_editor/framework/document-svg.d.ts +32 -32
- package/med_editor/framework/document-template.d.ts +13 -13
- package/med_editor/framework/document-textline-mode.d.ts +6 -6
- package/med_editor/framework/dynamic-execute.d.ts +23 -23
- package/med_editor/framework/editor-calendar-vnode.d.ts +42 -42
- package/med_editor/framework/element-define.d.ts +412 -412
- package/med_editor/framework/element-event-define.d.ts +107 -107
- package/med_editor/framework/element-props.d.ts +345 -345
- package/med_editor/framework/element-reader.d.ts +20 -20
- package/med_editor/framework/element-serialize.d.ts +36 -36
- package/med_editor/framework/element-trace-manage.d.ts +106 -106
- package/med_editor/framework/element-trace-tracking.d.ts +89 -89
- package/med_editor/framework/element-type-handler.d.ts +9 -9
- package/med_editor/framework/element-util.d.ts +409 -409
- package/med_editor/framework/event-subject.d.ts +56 -56
- package/med_editor/framework/impl/checkbox/checkbox-impl.d.ts +19 -19
- package/med_editor/framework/impl/comments/comment-content-impl.d.ts +39 -39
- package/med_editor/framework/impl/comments/comment-element-impl.d.ts +24 -24
- package/med_editor/framework/impl/comments/comments-container-impl.d.ts +19 -19
- package/med_editor/framework/impl/comments/comments-util.d.ts +5 -5
- package/med_editor/framework/impl/comments/validate-msg-impl.d.ts +19 -19
- package/med_editor/framework/impl/data-element/data-decorate-impl.d.ts +15 -15
- package/med_editor/framework/impl/data-element/data-element-barcode.d.ts +32 -32
- package/med_editor/framework/impl/data-element/data-element-base-impl.d.ts +83 -83
- package/med_editor/framework/impl/data-element/data-element-check-impl.d.ts +26 -26
- package/med_editor/framework/impl/data-element/data-element-date-impl.d.ts +23 -23
- package/med_editor/framework/impl/data-element/data-element-group-impl.d.ts +17 -17
- package/med_editor/framework/impl/data-element/data-element-image-impl.d.ts +23 -23
- package/med_editor/framework/impl/data-element/data-element-list-impl.d.ts +21 -21
- package/med_editor/framework/impl/data-element/data-element-text-impl.d.ts +22 -22
- package/med_editor/framework/impl/data-element/qrcode.d.ts +93 -93
- package/med_editor/framework/impl/decorate/fill-null-space-imple.d.ts +16 -16
- package/med_editor/framework/impl/document/doc-body-impl.d.ts +20 -20
- package/med_editor/framework/impl/document/doc-body-part-impl.d.ts +22 -22
- package/med_editor/framework/impl/document/doc-container-impl.d.ts +7 -7
- package/med_editor/framework/impl/document/doc-footer-impl.d.ts +19 -19
- package/med_editor/framework/impl/document/doc-header-impl.d.ts +19 -19
- package/med_editor/framework/impl/document/doc-impl.d.ts +81 -81
- package/med_editor/framework/impl/index.d.ts +40 -40
- package/med_editor/framework/impl/media-formula/menstrual-history.d.ts +31 -31
- package/med_editor/framework/impl/media-formula/permanent-teeth.d.ts +34 -34
- package/med_editor/framework/impl/paragraph/p-impl.d.ts +38 -38
- package/med_editor/framework/impl/picture/RectEle.d.ts +44 -44
- package/med_editor/framework/impl/picture/image-impl.d.ts +24 -24
- package/med_editor/framework/impl/radio/radio-impl.d.ts +17 -17
- package/med_editor/framework/impl/svg/svg-impl.d.ts +20 -20
- package/med_editor/framework/impl/symbol/br-symbol-impl.d.ts +18 -18
- package/med_editor/framework/impl/symbol/p-symbol-impl.d.ts +16 -16
- package/med_editor/framework/impl/symbol/page-br-symbol-impl.d.ts +20 -20
- package/med_editor/framework/impl/symbol/tab-symbol-impl.d.ts +15 -15
- package/med_editor/framework/impl/table/table-cell-impl.d.ts +34 -34
- package/med_editor/framework/impl/table/table-impl.d.ts +49 -49
- package/med_editor/framework/impl/table/table-row-impl.d.ts +27 -27
- package/med_editor/framework/impl/table/table-split-cell-patch.d.ts +20 -20
- package/med_editor/framework/impl/table/table-split-cell.d.ts +92 -92
- package/med_editor/framework/impl/table/table-util.d.ts +180 -180
- package/med_editor/framework/impl/text/text-impl.d.ts +34 -34
- package/med_editor/framework/impl/text/track-run-impl.d.ts +27 -27
- package/med_editor/framework/notify.d.ts +13 -13
- package/med_editor/framework/paragraph-arrange.d.ts +107 -107
- package/med_editor/framework/range-util.d.ts +36 -36
- package/med_editor/framework/render-context.d.ts +111 -111
- package/med_editor/framework/render-define.d.ts +141 -141
- package/med_editor/framework/selection-overlays.d.ts +32 -32
- package/med_editor/rule-control.d.ts +66 -66
- package/package.json +19 -19
- package/timeline/TimeLineControl.d.ts +47 -47
- package/timeline/TimeValueGridControl.d.ts +106 -106
- package/timeline/TimelineConfig.d.ts +68 -68
- package/timeline/TimelineScrollbar.d.ts +25 -25
- package/timeline/TimelineStatus.d.ts +61 -61
- package/timeline/TimelineTick.d.ts +63 -63
- package/timeline/example.d.ts +2 -2
package/med_editor/doc-rule.d.ts
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { SelectionState } from "./framework/document-selection";
|
|
2
|
-
import { ViewOptions } from "./framework/element-define";
|
|
3
|
-
import { EditorContext } from "./framework/document-context";
|
|
4
|
-
import { IVNodeRenderFunc } from "./editor-core";
|
|
5
|
-
interface RuleOptions {
|
|
6
|
-
width: number;
|
|
7
|
-
pagePL: number;
|
|
8
|
-
pagePR: number;
|
|
9
|
-
docLeft: number;
|
|
10
|
-
}
|
|
11
|
-
export declare class DocRule {
|
|
12
|
-
private docCtx;
|
|
13
|
-
private options;
|
|
14
|
-
private ruleHeight;
|
|
15
|
-
private thumbX;
|
|
16
|
-
private mouseDownPos;
|
|
17
|
-
private indentThumbPoints;
|
|
18
|
-
private hangThumbPoints;
|
|
19
|
-
private mouseDownThumbType;
|
|
20
|
-
viewOptions: ViewOptions;
|
|
21
|
-
ss: SelectionState;
|
|
22
|
-
private nodes;
|
|
23
|
-
constructor(docCtx: EditorContext);
|
|
24
|
-
destroy(): void;
|
|
25
|
-
setRuleOptions(options: RuleOptions): void;
|
|
26
|
-
private fillRectSvg;
|
|
27
|
-
private drawIndentThumbSvg;
|
|
28
|
-
private drawHangThumbSvg;
|
|
29
|
-
private drawLineSvg;
|
|
30
|
-
private drawTextSvg;
|
|
31
|
-
refreshRuleSvg(): IVNodeRenderFunc;
|
|
32
|
-
private canvasMousedown;
|
|
33
|
-
private getMousePos;
|
|
34
|
-
private canvasMousemove;
|
|
35
|
-
private canvasMouseup;
|
|
36
|
-
private pointInPoly;
|
|
37
|
-
/**
|
|
38
|
-
* 绘制
|
|
39
|
-
*/
|
|
40
|
-
private drawRuleSvg;
|
|
41
|
-
private getRuleMarksPos;
|
|
42
|
-
private getCurrPara;
|
|
43
|
-
private setParentMarksPosSvg;
|
|
44
|
-
private drawCellMarkSvg;
|
|
45
|
-
}
|
|
46
|
-
export {};
|
|
1
|
+
import { SelectionState } from "./framework/document-selection";
|
|
2
|
+
import { ViewOptions } from "./framework/element-define";
|
|
3
|
+
import { EditorContext } from "./framework/document-context";
|
|
4
|
+
import { IVNodeRenderFunc } from "./editor-core";
|
|
5
|
+
interface RuleOptions {
|
|
6
|
+
width: number;
|
|
7
|
+
pagePL: number;
|
|
8
|
+
pagePR: number;
|
|
9
|
+
docLeft: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class DocRule {
|
|
12
|
+
private docCtx;
|
|
13
|
+
private options;
|
|
14
|
+
private ruleHeight;
|
|
15
|
+
private thumbX;
|
|
16
|
+
private mouseDownPos;
|
|
17
|
+
private indentThumbPoints;
|
|
18
|
+
private hangThumbPoints;
|
|
19
|
+
private mouseDownThumbType;
|
|
20
|
+
viewOptions: ViewOptions;
|
|
21
|
+
ss: SelectionState;
|
|
22
|
+
private nodes;
|
|
23
|
+
constructor(docCtx: EditorContext);
|
|
24
|
+
destroy(): void;
|
|
25
|
+
setRuleOptions(options: RuleOptions): void;
|
|
26
|
+
private fillRectSvg;
|
|
27
|
+
private drawIndentThumbSvg;
|
|
28
|
+
private drawHangThumbSvg;
|
|
29
|
+
private drawLineSvg;
|
|
30
|
+
private drawTextSvg;
|
|
31
|
+
refreshRuleSvg(): IVNodeRenderFunc;
|
|
32
|
+
private canvasMousedown;
|
|
33
|
+
private getMousePos;
|
|
34
|
+
private canvasMousemove;
|
|
35
|
+
private canvasMouseup;
|
|
36
|
+
private pointInPoly;
|
|
37
|
+
/**
|
|
38
|
+
* 绘制
|
|
39
|
+
*/
|
|
40
|
+
private drawRuleSvg;
|
|
41
|
+
private getRuleMarksPos;
|
|
42
|
+
private getCurrPara;
|
|
43
|
+
private setParentMarksPosSvg;
|
|
44
|
+
private drawCellMarkSvg;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { EditorVNodeObject } from "./framework/render-define";
|
|
2
|
-
import { SelectionState } from "./framework/document-selection";
|
|
3
|
-
export declare type EditorContext = {
|
|
4
|
-
onChange: () => void;
|
|
5
|
-
emit: (event: string, ...args: any[]) => void;
|
|
6
|
-
selectionState: SelectionState;
|
|
7
|
-
};
|
|
8
|
-
export declare let activeEditorContext: EditorContext | null;
|
|
9
|
-
export declare function setActiveEditorContext(ctx: EditorContext | null): void;
|
|
10
|
-
export declare function getActiveEditorContext(): EditorContext | null;
|
|
11
|
-
export declare type IVNodeRenderFunc = {
|
|
12
|
-
render: () => EditorVNodeObject | null;
|
|
13
|
-
};
|
|
14
|
-
export interface EditorFuncComp {
|
|
15
|
-
(...args: any): IVNodeRenderFunc;
|
|
16
|
-
}
|
|
17
|
-
export interface ISignal<T> {
|
|
18
|
-
value: T;
|
|
19
|
-
onChange: () => void;
|
|
20
|
-
}
|
|
21
|
-
export declare function createSignal<T>(state: T): ISignal<T>;
|
|
1
|
+
import { EditorVNodeObject } from "./framework/render-define";
|
|
2
|
+
import { SelectionState } from "./framework/document-selection";
|
|
3
|
+
export declare type EditorContext = {
|
|
4
|
+
onChange: () => void;
|
|
5
|
+
emit: (event: string, ...args: any[]) => void;
|
|
6
|
+
selectionState: SelectionState;
|
|
7
|
+
};
|
|
8
|
+
export declare let activeEditorContext: EditorContext | null;
|
|
9
|
+
export declare function setActiveEditorContext(ctx: EditorContext | null): void;
|
|
10
|
+
export declare function getActiveEditorContext(): EditorContext | null;
|
|
11
|
+
export declare type IVNodeRenderFunc = {
|
|
12
|
+
render: () => EditorVNodeObject | null;
|
|
13
|
+
};
|
|
14
|
+
export interface EditorFuncComp {
|
|
15
|
+
(...args: any): IVNodeRenderFunc;
|
|
16
|
+
}
|
|
17
|
+
export interface ISignal<T> {
|
|
18
|
+
value: T;
|
|
19
|
+
onChange: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function createSignal<T>(state: T): ISignal<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node } from "acorn";
|
|
2
|
-
export declare function parser(code: string, objects?: Array<string>): string;
|
|
3
|
-
export declare function addReturn(code: string): string;
|
|
4
|
-
export declare function getCalleeName(node: Node): string;
|
|
1
|
+
import { Node } from "acorn";
|
|
2
|
+
export declare function parser(code: string, objects?: Array<string>): string;
|
|
3
|
+
export declare function addReturn(code: string): string;
|
|
4
|
+
export declare function getCalleeName(node: Node): string;
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import { Rect } from "./element-define";
|
|
2
|
-
import { BorderType } from "./render-define";
|
|
3
|
-
interface Position {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
}
|
|
7
|
-
export declare class CommonUtil {
|
|
8
|
-
/**
|
|
9
|
-
* 判断坐标是否在矩形框内
|
|
10
|
-
* @param rect
|
|
11
|
-
* @param position
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
static isInsideRectByPosition(rect: Omit<Rect, 'maxWidth' | 'maxHeight'>, position: Position): boolean;
|
|
15
|
-
static isInsideRectByRect(rect: Rect, position: Rect): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* 判断坐标是否在矩形的边框上
|
|
18
|
-
* @param rect
|
|
19
|
-
* @param borderWidth
|
|
20
|
-
* @param position
|
|
21
|
-
*/
|
|
22
|
-
static isInRectBorder(rect: Rect, borderWidth: number, position: Position): {
|
|
23
|
-
borderType: BorderType;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* 判断坐标是否在图片的缩放操作点上
|
|
27
|
-
*/
|
|
28
|
-
static isInPictureResizePoint(rect: Rect, pos: Position, r: number): {
|
|
29
|
-
borderType: BorderType;
|
|
30
|
-
} | null;
|
|
31
|
-
/**
|
|
32
|
-
* 整形符合连线要求
|
|
33
|
-
* @param points
|
|
34
|
-
* @param width
|
|
35
|
-
* @param strokeColor
|
|
36
|
-
*/
|
|
37
|
-
static resharpPoints(points: Array<Position>): Array<Position>;
|
|
38
|
-
static getOffsetX(node: HTMLElement): number;
|
|
39
|
-
static randomColor(): string;
|
|
40
|
-
static randomRgbColor(opacity?: number): string;
|
|
41
|
-
/**
|
|
42
|
-
* 判断一个数值是否在另一个数值的增益区间中
|
|
43
|
-
* @param val
|
|
44
|
-
* @param offset
|
|
45
|
-
* @param compareValue
|
|
46
|
-
* @returns
|
|
47
|
-
*/
|
|
48
|
-
static ApproxmateValueInRange(val: number, offset: number, compareValue: number): boolean;
|
|
49
|
-
static getEmptyValue<T>(val: T, emptyVal: T): T;
|
|
50
|
-
/**
|
|
51
|
-
* 移除并集
|
|
52
|
-
* @param array
|
|
53
|
-
* @param deleteItems
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
static removeUnionSet<T>(array: Array<T>, deleteItems: Array<T>): Array<T>;
|
|
57
|
-
static nullToString(val: any): string;
|
|
58
|
-
static formatDate(date: Date, format: string): string;
|
|
59
|
-
static formatNow(format: string): string;
|
|
60
|
-
static parseText(text: string, data: object): string;
|
|
61
|
-
static getNowDiffSeconds(date: Date | string): number;
|
|
62
|
-
static isDate(str: string): boolean;
|
|
63
|
-
static cloneValue(val: any): any;
|
|
64
|
-
static cloneDeep<T>(source: T, visited?: WeakMap<object, any>): T;
|
|
65
|
-
static isConstructor(f: any): boolean;
|
|
66
|
-
static toArray<T>(item: Array<T> | T): Array<T>;
|
|
67
|
-
static removeChild(ele: HTMLElement): void;
|
|
68
|
-
static findParent(curr: HTMLElement | null, predicate: (parent: HTMLElement) => boolean): HTMLElement | null;
|
|
69
|
-
static isIntersect(rect1: Rect, rect2: Rect): boolean;
|
|
70
|
-
static debounce<F extends AnyFunction>(fn: F, wait: number): (...args: Parameters<F>) => void;
|
|
71
|
-
static btoa(str: string): string;
|
|
72
|
-
static isEqual(a: any, b: any): boolean;
|
|
73
|
-
static getValue(val: any, defaultValue: any): any;
|
|
74
|
-
}
|
|
75
|
-
declare type AnyFunction = (...args: any[]) => any;
|
|
76
|
-
export {};
|
|
1
|
+
import { Rect } from "./element-define";
|
|
2
|
+
import { BorderType } from "./render-define";
|
|
3
|
+
interface Position {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class CommonUtil {
|
|
8
|
+
/**
|
|
9
|
+
* 判断坐标是否在矩形框内
|
|
10
|
+
* @param rect
|
|
11
|
+
* @param position
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
static isInsideRectByPosition(rect: Omit<Rect, 'maxWidth' | 'maxHeight'>, position: Position): boolean;
|
|
15
|
+
static isInsideRectByRect(rect: Rect, position: Rect): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 判断坐标是否在矩形的边框上
|
|
18
|
+
* @param rect
|
|
19
|
+
* @param borderWidth
|
|
20
|
+
* @param position
|
|
21
|
+
*/
|
|
22
|
+
static isInRectBorder(rect: Rect, borderWidth: number, position: Position): {
|
|
23
|
+
borderType: BorderType;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 判断坐标是否在图片的缩放操作点上
|
|
27
|
+
*/
|
|
28
|
+
static isInPictureResizePoint(rect: Rect, pos: Position, r: number): {
|
|
29
|
+
borderType: BorderType;
|
|
30
|
+
} | null;
|
|
31
|
+
/**
|
|
32
|
+
* 整形符合连线要求
|
|
33
|
+
* @param points
|
|
34
|
+
* @param width
|
|
35
|
+
* @param strokeColor
|
|
36
|
+
*/
|
|
37
|
+
static resharpPoints(points: Array<Position>): Array<Position>;
|
|
38
|
+
static getOffsetX(node: HTMLElement): number;
|
|
39
|
+
static randomColor(): string;
|
|
40
|
+
static randomRgbColor(opacity?: number): string;
|
|
41
|
+
/**
|
|
42
|
+
* 判断一个数值是否在另一个数值的增益区间中
|
|
43
|
+
* @param val
|
|
44
|
+
* @param offset
|
|
45
|
+
* @param compareValue
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
static ApproxmateValueInRange(val: number, offset: number, compareValue: number): boolean;
|
|
49
|
+
static getEmptyValue<T>(val: T, emptyVal: T): T;
|
|
50
|
+
/**
|
|
51
|
+
* 移除并集
|
|
52
|
+
* @param array
|
|
53
|
+
* @param deleteItems
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
static removeUnionSet<T>(array: Array<T>, deleteItems: Array<T>): Array<T>;
|
|
57
|
+
static nullToString(val: any): string;
|
|
58
|
+
static formatDate(date: Date, format: string): string;
|
|
59
|
+
static formatNow(format: string): string;
|
|
60
|
+
static parseText(text: string, data: object): string;
|
|
61
|
+
static getNowDiffSeconds(date: Date | string): number;
|
|
62
|
+
static isDate(str: string): boolean;
|
|
63
|
+
static cloneValue(val: any): any;
|
|
64
|
+
static cloneDeep<T>(source: T, visited?: WeakMap<object, any>): T;
|
|
65
|
+
static isConstructor(f: any): boolean;
|
|
66
|
+
static toArray<T>(item: Array<T> | T): Array<T>;
|
|
67
|
+
static removeChild(ele: HTMLElement): void;
|
|
68
|
+
static findParent(curr: HTMLElement | null, predicate: (parent: HTMLElement) => boolean): HTMLElement | null;
|
|
69
|
+
static isIntersect(rect1: Rect, rect2: Rect): boolean;
|
|
70
|
+
static debounce<F extends AnyFunction>(fn: F, wait: number): (...args: Parameters<F>) => void;
|
|
71
|
+
static btoa(str: string): string;
|
|
72
|
+
static isEqual(a: any, b: any): boolean;
|
|
73
|
+
static getValue(val: any, defaultValue: any): any;
|
|
74
|
+
}
|
|
75
|
+
declare type AnyFunction = (...args: any[]) => any;
|
|
76
|
+
export {};
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { Element, IBeginMeasureData, ViewOptions } from "./element-define";
|
|
2
|
-
import { EditorContext } from "./document-context";
|
|
3
|
-
import { RenderContextType } from "./render-context";
|
|
4
|
-
import { DocumentRenderObject, ParagraphElement, TableCellRenderObject, TableRenderObject, TableRowRenderObject } from "./impl";
|
|
5
|
-
import { BlockContentRenderObject, BranchRenderObject } from "./render-define";
|
|
6
|
-
import { DynamicExecute } from "./dynamic-execute";
|
|
7
|
-
import { ParagraphMeasure } from "./paragraph-arrange";
|
|
8
|
-
import { SelectionEffectObject } from "./element-props";
|
|
9
|
-
export declare class DocumentArrange {
|
|
10
|
-
docCtx: EditorContext;
|
|
11
|
-
renderCtx: RenderContextType;
|
|
12
|
-
seo: SelectionEffectObject;
|
|
13
|
-
options: ViewOptions;
|
|
14
|
-
execute: DynamicExecute;
|
|
15
|
-
pMeasure: ParagraphMeasure;
|
|
16
|
-
constructor(docCtx: EditorContext, renderCtx: RenderContextType, seo: SelectionEffectObject);
|
|
17
|
-
/**
|
|
18
|
-
* 测量排版过程
|
|
19
|
-
* 1.先测量排版页眉、页脚
|
|
20
|
-
* 2.根据页边距以及页眉、页脚测量的高度,获取"页体高度"
|
|
21
|
-
* 3.根据页体高度测量页体内容,并实时分页
|
|
22
|
-
* 3.1测量页体直接子内容
|
|
23
|
-
* 3.1.1页体直接子内容递归测量孙子元素
|
|
24
|
-
* 3.2完成页体子内容测量,并分页切分
|
|
25
|
-
*/
|
|
26
|
-
measureDoc(): Array<DocumentRenderObject>;
|
|
27
|
-
private arrangeDoc;
|
|
28
|
-
private createEmptyBodyRender;
|
|
29
|
-
private measureControl;
|
|
30
|
-
private processTableTextLineMode;
|
|
31
|
-
private getDocInnerRect;
|
|
32
|
-
/**
|
|
33
|
-
* 切割渲染元素
|
|
34
|
-
* @param render 被切割的对象
|
|
35
|
-
* @param limitHeight
|
|
36
|
-
* @returns
|
|
37
|
-
*/
|
|
38
|
-
cutRenderItem(render: BlockContentRenderObject, limitHeight: number): BlockContentRenderObject | null;
|
|
39
|
-
/**
|
|
40
|
-
* 切割渲染元素
|
|
41
|
-
* @param tbRender 被切割的对象
|
|
42
|
-
* @param limitHeight
|
|
43
|
-
* @returns
|
|
44
|
-
*/
|
|
45
|
-
cutTable(tbRender: TableRenderObject, limitHeight: number): BlockContentRenderObject | null;
|
|
46
|
-
cutRowRenderItem(render: TableRowRenderObject, limitHeight: number): TableRowRenderObject | null;
|
|
47
|
-
/**
|
|
48
|
-
* 修复->已经截断的合并单元格要向下移动到合适的位置
|
|
49
|
-
* @param tbRender
|
|
50
|
-
* @param cutRows
|
|
51
|
-
* @returns
|
|
52
|
-
*/
|
|
53
|
-
private fixCutTable;
|
|
54
|
-
/**
|
|
55
|
-
* 校验当前是否是一个完整的行,没有Null单元格,检查当前是否还需要向下合并
|
|
56
|
-
* @param row
|
|
57
|
-
*/
|
|
58
|
-
private checkFullRow;
|
|
59
|
-
private existsCellRender;
|
|
60
|
-
private getBlockLineHeight;
|
|
61
|
-
getRowInsertCellIndex(sourceCell: TableCellRenderObject, destRow: TableRowRenderObject): number;
|
|
62
|
-
private getHeaderRows;
|
|
63
|
-
/**
|
|
64
|
-
* 修改测量完毕后的元素状态
|
|
65
|
-
* @param ele
|
|
66
|
-
*/
|
|
67
|
-
setMeasureCompletedModifyFlag(ele: Element): void;
|
|
68
|
-
clearPaintCache(ele: Element, data: IBeginMeasureData): void;
|
|
69
|
-
identifyComment(ele: Element): void;
|
|
70
|
-
private cacheDoc;
|
|
71
|
-
cacheDocRenders(docs: Array<DocumentRenderObject>): void;
|
|
72
|
-
/**
|
|
73
|
-
* 生成批注区间信息
|
|
74
|
-
* @param renderTree
|
|
75
|
-
*/
|
|
76
|
-
generateCommRange(): void;
|
|
77
|
-
cacheRenders(renderTree: BranchRenderObject): void;
|
|
78
|
-
/**
|
|
79
|
-
* 缓存批注标志
|
|
80
|
-
* @private
|
|
81
|
-
*/
|
|
82
|
-
private cacheCommsRender;
|
|
83
|
-
endMeasures(ele: Element): void;
|
|
84
|
-
createDefaultPara(): ParagraphElement;
|
|
85
|
-
}
|
|
1
|
+
import { Element, IBeginMeasureData, ViewOptions } from "./element-define";
|
|
2
|
+
import { EditorContext } from "./document-context";
|
|
3
|
+
import { RenderContextType } from "./render-context";
|
|
4
|
+
import { DocumentRenderObject, ParagraphElement, TableCellRenderObject, TableRenderObject, TableRowRenderObject } from "./impl";
|
|
5
|
+
import { BlockContentRenderObject, BranchRenderObject } from "./render-define";
|
|
6
|
+
import { DynamicExecute } from "./dynamic-execute";
|
|
7
|
+
import { ParagraphMeasure } from "./paragraph-arrange";
|
|
8
|
+
import { SelectionEffectObject } from "./element-props";
|
|
9
|
+
export declare class DocumentArrange {
|
|
10
|
+
docCtx: EditorContext;
|
|
11
|
+
renderCtx: RenderContextType;
|
|
12
|
+
seo: SelectionEffectObject;
|
|
13
|
+
options: ViewOptions;
|
|
14
|
+
execute: DynamicExecute;
|
|
15
|
+
pMeasure: ParagraphMeasure;
|
|
16
|
+
constructor(docCtx: EditorContext, renderCtx: RenderContextType, seo: SelectionEffectObject);
|
|
17
|
+
/**
|
|
18
|
+
* 测量排版过程
|
|
19
|
+
* 1.先测量排版页眉、页脚
|
|
20
|
+
* 2.根据页边距以及页眉、页脚测量的高度,获取"页体高度"
|
|
21
|
+
* 3.根据页体高度测量页体内容,并实时分页
|
|
22
|
+
* 3.1测量页体直接子内容
|
|
23
|
+
* 3.1.1页体直接子内容递归测量孙子元素
|
|
24
|
+
* 3.2完成页体子内容测量,并分页切分
|
|
25
|
+
*/
|
|
26
|
+
measureDoc(): Array<DocumentRenderObject>;
|
|
27
|
+
private arrangeDoc;
|
|
28
|
+
private createEmptyBodyRender;
|
|
29
|
+
private measureControl;
|
|
30
|
+
private processTableTextLineMode;
|
|
31
|
+
private getDocInnerRect;
|
|
32
|
+
/**
|
|
33
|
+
* 切割渲染元素
|
|
34
|
+
* @param render 被切割的对象
|
|
35
|
+
* @param limitHeight
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
cutRenderItem(render: BlockContentRenderObject, limitHeight: number): BlockContentRenderObject | null;
|
|
39
|
+
/**
|
|
40
|
+
* 切割渲染元素
|
|
41
|
+
* @param tbRender 被切割的对象
|
|
42
|
+
* @param limitHeight
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
cutTable(tbRender: TableRenderObject, limitHeight: number): BlockContentRenderObject | null;
|
|
46
|
+
cutRowRenderItem(render: TableRowRenderObject, limitHeight: number): TableRowRenderObject | null;
|
|
47
|
+
/**
|
|
48
|
+
* 修复->已经截断的合并单元格要向下移动到合适的位置
|
|
49
|
+
* @param tbRender
|
|
50
|
+
* @param cutRows
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
private fixCutTable;
|
|
54
|
+
/**
|
|
55
|
+
* 校验当前是否是一个完整的行,没有Null单元格,检查当前是否还需要向下合并
|
|
56
|
+
* @param row
|
|
57
|
+
*/
|
|
58
|
+
private checkFullRow;
|
|
59
|
+
private existsCellRender;
|
|
60
|
+
private getBlockLineHeight;
|
|
61
|
+
getRowInsertCellIndex(sourceCell: TableCellRenderObject, destRow: TableRowRenderObject): number;
|
|
62
|
+
private getHeaderRows;
|
|
63
|
+
/**
|
|
64
|
+
* 修改测量完毕后的元素状态
|
|
65
|
+
* @param ele
|
|
66
|
+
*/
|
|
67
|
+
setMeasureCompletedModifyFlag(ele: Element): void;
|
|
68
|
+
clearPaintCache(ele: Element, data: IBeginMeasureData): void;
|
|
69
|
+
identifyComment(ele: Element): void;
|
|
70
|
+
private cacheDoc;
|
|
71
|
+
cacheDocRenders(docs: Array<DocumentRenderObject>): void;
|
|
72
|
+
/**
|
|
73
|
+
* 生成批注区间信息
|
|
74
|
+
* @param renderTree
|
|
75
|
+
*/
|
|
76
|
+
generateCommRange(): void;
|
|
77
|
+
cacheRenders(renderTree: BranchRenderObject): void;
|
|
78
|
+
/**
|
|
79
|
+
* 缓存批注标志
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
private cacheCommsRender;
|
|
83
|
+
endMeasures(ele: Element): void;
|
|
84
|
+
createDefaultPara(): ParagraphElement;
|
|
85
|
+
}
|