@hailin-zheng/editor-core 2.2.43 → 2.2.44
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/editor.css +679 -679
- package/index.d.ts +32 -32
- package/index.js +24553 -24460
- package/med_editor/doc-editor.d.ts +553 -547
- package/med_editor/doc-rule.d.ts +174 -174
- package/med_editor/editor-core.d.ts +18 -18
- package/med_editor/framework/code-interpreter/ast-parser.d.ts +4 -4
- package/med_editor/framework/code-interpreter/document-eval-func.d.ts +18 -18
- package/med_editor/framework/code-interpreter/dynamic-execute.d.ts +42 -42
- package/med_editor/framework/doc-layout/arrange-manager.d.ts +96 -0
- package/med_editor/framework/doc-layout/document-arrange.d.ts +95 -95
- package/med_editor/framework/doc-layout/paragraph-arrange.d.ts +110 -110
- package/med_editor/framework/document-change.d.ts +346 -346
- 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 +162 -162
- package/med_editor/framework/document-event.d.ts +261 -261
- package/med_editor/framework/document-input-cursor.d.ts +32 -32
- package/med_editor/framework/document-paginator.d.ts +46 -46
- package/med_editor/framework/document-svg.d.ts +36 -36
- 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/element-define.d.ts +439 -440
- package/med_editor/framework/element-event-define.d.ts +101 -102
- package/med_editor/framework/element-props.d.ts +344 -344
- package/med_editor/framework/element-reader.d.ts +20 -20
- package/med_editor/framework/element-serialize.d.ts +39 -39
- package/med_editor/framework/element-type-handler.d.ts +8 -8
- package/med_editor/framework/history/element-trace-manage.d.ts +107 -107
- package/med_editor/framework/history/element-trace-tracking.d.ts +89 -89
- 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/validate-msg-impl.d.ts +19 -19
- package/med_editor/framework/impl/data-element/data-container-impl.d.ts +25 -25
- package/med_editor/framework/impl/data-element/data-decorate-impl.d.ts +16 -16
- 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 +122 -122
- 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 +28 -28
- 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 +19 -19
- 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 +85 -85
- package/med_editor/framework/impl/index.d.ts +41 -41
- 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/shape/line-impl.d.ts +31 -31
- 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 +93 -93
- 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/infrastructure/event-subject.d.ts +57 -57
- package/med_editor/framework/infrastructure/notify.d.ts +13 -13
- package/med_editor/framework/print/document-print-offscreen.d.ts +59 -59
- package/med_editor/framework/print/document-print.d.ts +19 -19
- package/med_editor/framework/render-context.d.ts +111 -111
- package/med_editor/framework/render-define.d.ts +169 -169
- package/med_editor/framework/search/search-panel.d.ts +31 -31
- package/med_editor/framework/selection/document-selection.d.ts +92 -92
- package/med_editor/framework/selection/range-util.d.ts +36 -36
- package/med_editor/framework/selection/selection-overlays.d.ts +36 -36
- package/med_editor/framework/suggestions/input-suggestions.d.ts +29 -29
- package/med_editor/framework/util/adjust-viewport-elements.d.ts +12 -12
- package/med_editor/framework/util/common-util.d.ts +78 -78
- package/med_editor/framework/util/document-segmenter.d.ts +2 -2
- package/med_editor/framework/util/element-util.d.ts +419 -417
- package/med_editor/framework/vnode/editor-calendar-vnode.d.ts +44 -44
- package/med_editor/framework/vnode/editor-list-vnode.d.ts +18 -18
- package/package.json +18 -18
- package/index-cjs.d.ts +0 -32
- package/index-cjs.js +0 -29731
- package/index-cjs.js.map +0 -1
- package/index.js.map +0 -1
package/med_editor/doc-rule.d.ts
CHANGED
@@ -1,174 +1,174 @@
|
|
1
|
-
import { SelectionState } from "./framework/selection/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 thumbWidth;
|
16
|
-
private thumbX;
|
17
|
-
private mouseDownPos;
|
18
|
-
private mouseDownThumbType;
|
19
|
-
viewOptions: ViewOptions;
|
20
|
-
ss: SelectionState;
|
21
|
-
constructor(docCtx: EditorContext);
|
22
|
-
destroy(): void;
|
23
|
-
setRuleOptions(options: RuleOptions): void;
|
24
|
-
refreshRuleSvg(): IVNodeRenderFunc;
|
25
|
-
getRuleSVG(): any;
|
26
|
-
private getRuleMarksPos;
|
27
|
-
private getCurrPara;
|
28
|
-
private drawCellMark;
|
29
|
-
/**
|
30
|
-
* 绘制首行缩进thumb
|
31
|
-
* @returns
|
32
|
-
*/
|
33
|
-
createTopThumb(): {
|
34
|
-
sel: string;
|
35
|
-
data: {
|
36
|
-
on: {
|
37
|
-
mousedown: (evt: any) => void;
|
38
|
-
};
|
39
|
-
style: {
|
40
|
-
left: string;
|
41
|
-
};
|
42
|
-
};
|
43
|
-
children: {
|
44
|
-
sel: string;
|
45
|
-
data: {};
|
46
|
-
children: {
|
47
|
-
sel: string;
|
48
|
-
data: {
|
49
|
-
ns: string;
|
50
|
-
attrs: {
|
51
|
-
width: number;
|
52
|
-
height: number;
|
53
|
-
viewBox: string;
|
54
|
-
fill: string;
|
55
|
-
"stroke-width": number;
|
56
|
-
};
|
57
|
-
};
|
58
|
-
children: ({
|
59
|
-
sel: string;
|
60
|
-
data: {
|
61
|
-
ns: string;
|
62
|
-
attrs: {
|
63
|
-
stroke: string;
|
64
|
-
fill: string;
|
65
|
-
};
|
66
|
-
};
|
67
|
-
children: {
|
68
|
-
sel: string;
|
69
|
-
data: {
|
70
|
-
ns: string;
|
71
|
-
attrs: {
|
72
|
-
d: string;
|
73
|
-
stroke: string;
|
74
|
-
};
|
75
|
-
};
|
76
|
-
}[];
|
77
|
-
} | {
|
78
|
-
sel: string;
|
79
|
-
data: {
|
80
|
-
ns: string;
|
81
|
-
attrs: {
|
82
|
-
stroke: string;
|
83
|
-
fill: string;
|
84
|
-
};
|
85
|
-
};
|
86
|
-
children: {
|
87
|
-
sel: string;
|
88
|
-
data: {
|
89
|
-
ns: string;
|
90
|
-
attrs: {
|
91
|
-
d: string;
|
92
|
-
fill: string;
|
93
|
-
"vector-effect": string;
|
94
|
-
};
|
95
|
-
};
|
96
|
-
}[];
|
97
|
-
})[];
|
98
|
-
}[];
|
99
|
-
}[];
|
100
|
-
};
|
101
|
-
/**
|
102
|
-
* 绘制悬挂缩进thumb
|
103
|
-
* @returns
|
104
|
-
*/
|
105
|
-
createLeftThumb(): {
|
106
|
-
sel: string;
|
107
|
-
data: {
|
108
|
-
on: {
|
109
|
-
mousedown: (evt: MouseEvent) => void;
|
110
|
-
};
|
111
|
-
style: {
|
112
|
-
left: string;
|
113
|
-
};
|
114
|
-
};
|
115
|
-
children: {
|
116
|
-
sel: string;
|
117
|
-
data: {};
|
118
|
-
children: {
|
119
|
-
sel: string;
|
120
|
-
data: {
|
121
|
-
ns: string;
|
122
|
-
attrs: {
|
123
|
-
width: number;
|
124
|
-
height: number;
|
125
|
-
viewBox: string;
|
126
|
-
fill: string;
|
127
|
-
"stroke-width": number;
|
128
|
-
};
|
129
|
-
};
|
130
|
-
children: ({
|
131
|
-
sel: string;
|
132
|
-
data: {
|
133
|
-
ns: string;
|
134
|
-
attrs: {
|
135
|
-
stroke: string;
|
136
|
-
fill: string;
|
137
|
-
};
|
138
|
-
};
|
139
|
-
children: {
|
140
|
-
sel: string;
|
141
|
-
data: {
|
142
|
-
ns: string;
|
143
|
-
attrs: {
|
144
|
-
d: string;
|
145
|
-
stroke: string;
|
146
|
-
};
|
147
|
-
};
|
148
|
-
}[];
|
149
|
-
} | {
|
150
|
-
sel: string;
|
151
|
-
data: {
|
152
|
-
ns: string;
|
153
|
-
attrs: {
|
154
|
-
stroke: string;
|
155
|
-
fill: string;
|
156
|
-
};
|
157
|
-
};
|
158
|
-
children: {
|
159
|
-
sel: string;
|
160
|
-
data: {
|
161
|
-
ns: string;
|
162
|
-
attrs: {
|
163
|
-
d: string;
|
164
|
-
fill: string;
|
165
|
-
"vector-effect": string;
|
166
|
-
};
|
167
|
-
};
|
168
|
-
}[];
|
169
|
-
})[];
|
170
|
-
}[];
|
171
|
-
}[];
|
172
|
-
};
|
173
|
-
}
|
174
|
-
export {};
|
1
|
+
import { SelectionState } from "./framework/selection/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 thumbWidth;
|
16
|
+
private thumbX;
|
17
|
+
private mouseDownPos;
|
18
|
+
private mouseDownThumbType;
|
19
|
+
viewOptions: ViewOptions;
|
20
|
+
ss: SelectionState;
|
21
|
+
constructor(docCtx: EditorContext);
|
22
|
+
destroy(): void;
|
23
|
+
setRuleOptions(options: RuleOptions): void;
|
24
|
+
refreshRuleSvg(): IVNodeRenderFunc;
|
25
|
+
getRuleSVG(): any;
|
26
|
+
private getRuleMarksPos;
|
27
|
+
private getCurrPara;
|
28
|
+
private drawCellMark;
|
29
|
+
/**
|
30
|
+
* 绘制首行缩进thumb
|
31
|
+
* @returns
|
32
|
+
*/
|
33
|
+
createTopThumb(): {
|
34
|
+
sel: string;
|
35
|
+
data: {
|
36
|
+
on: {
|
37
|
+
mousedown: (evt: any) => void;
|
38
|
+
};
|
39
|
+
style: {
|
40
|
+
left: string;
|
41
|
+
};
|
42
|
+
};
|
43
|
+
children: {
|
44
|
+
sel: string;
|
45
|
+
data: {};
|
46
|
+
children: {
|
47
|
+
sel: string;
|
48
|
+
data: {
|
49
|
+
ns: string;
|
50
|
+
attrs: {
|
51
|
+
width: number;
|
52
|
+
height: number;
|
53
|
+
viewBox: string;
|
54
|
+
fill: string;
|
55
|
+
"stroke-width": number;
|
56
|
+
};
|
57
|
+
};
|
58
|
+
children: ({
|
59
|
+
sel: string;
|
60
|
+
data: {
|
61
|
+
ns: string;
|
62
|
+
attrs: {
|
63
|
+
stroke: string;
|
64
|
+
fill: string;
|
65
|
+
};
|
66
|
+
};
|
67
|
+
children: {
|
68
|
+
sel: string;
|
69
|
+
data: {
|
70
|
+
ns: string;
|
71
|
+
attrs: {
|
72
|
+
d: string;
|
73
|
+
stroke: string;
|
74
|
+
};
|
75
|
+
};
|
76
|
+
}[];
|
77
|
+
} | {
|
78
|
+
sel: string;
|
79
|
+
data: {
|
80
|
+
ns: string;
|
81
|
+
attrs: {
|
82
|
+
stroke: string;
|
83
|
+
fill: string;
|
84
|
+
};
|
85
|
+
};
|
86
|
+
children: {
|
87
|
+
sel: string;
|
88
|
+
data: {
|
89
|
+
ns: string;
|
90
|
+
attrs: {
|
91
|
+
d: string;
|
92
|
+
fill: string;
|
93
|
+
"vector-effect": string;
|
94
|
+
};
|
95
|
+
};
|
96
|
+
}[];
|
97
|
+
})[];
|
98
|
+
}[];
|
99
|
+
}[];
|
100
|
+
};
|
101
|
+
/**
|
102
|
+
* 绘制悬挂缩进thumb
|
103
|
+
* @returns
|
104
|
+
*/
|
105
|
+
createLeftThumb(): {
|
106
|
+
sel: string;
|
107
|
+
data: {
|
108
|
+
on: {
|
109
|
+
mousedown: (evt: MouseEvent) => void;
|
110
|
+
};
|
111
|
+
style: {
|
112
|
+
left: string;
|
113
|
+
};
|
114
|
+
};
|
115
|
+
children: {
|
116
|
+
sel: string;
|
117
|
+
data: {};
|
118
|
+
children: {
|
119
|
+
sel: string;
|
120
|
+
data: {
|
121
|
+
ns: string;
|
122
|
+
attrs: {
|
123
|
+
width: number;
|
124
|
+
height: number;
|
125
|
+
viewBox: string;
|
126
|
+
fill: string;
|
127
|
+
"stroke-width": number;
|
128
|
+
};
|
129
|
+
};
|
130
|
+
children: ({
|
131
|
+
sel: string;
|
132
|
+
data: {
|
133
|
+
ns: string;
|
134
|
+
attrs: {
|
135
|
+
stroke: string;
|
136
|
+
fill: string;
|
137
|
+
};
|
138
|
+
};
|
139
|
+
children: {
|
140
|
+
sel: string;
|
141
|
+
data: {
|
142
|
+
ns: string;
|
143
|
+
attrs: {
|
144
|
+
d: string;
|
145
|
+
stroke: string;
|
146
|
+
};
|
147
|
+
};
|
148
|
+
}[];
|
149
|
+
} | {
|
150
|
+
sel: string;
|
151
|
+
data: {
|
152
|
+
ns: string;
|
153
|
+
attrs: {
|
154
|
+
stroke: string;
|
155
|
+
fill: string;
|
156
|
+
};
|
157
|
+
};
|
158
|
+
children: {
|
159
|
+
sel: string;
|
160
|
+
data: {
|
161
|
+
ns: string;
|
162
|
+
attrs: {
|
163
|
+
d: string;
|
164
|
+
fill: string;
|
165
|
+
"vector-effect": string;
|
166
|
+
};
|
167
|
+
};
|
168
|
+
}[];
|
169
|
+
})[];
|
170
|
+
}[];
|
171
|
+
}[];
|
172
|
+
};
|
173
|
+
}
|
174
|
+
export {};
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import { EditorVNodeObject } from "./framework/render-define";
|
2
|
-
import { SelectionState } from "./framework/selection/document-selection";
|
3
|
-
export declare type IActiveEditorContext = {
|
4
|
-
onChange: () => void;
|
5
|
-
emit: (event: string, ...args: any[]) => void;
|
6
|
-
selectionState: SelectionState;
|
7
|
-
};
|
8
|
-
export declare let activeEditorContext: IActiveEditorContext | null;
|
9
|
-
export declare function setActiveEditorContext(ctx: IActiveEditorContext | null): void;
|
10
|
-
export declare function getActiveEditorContext(): IActiveEditorContext | null;
|
11
|
-
export declare type IVNodeRenderFunc = {
|
12
|
-
render: () => EditorVNodeObject | null;
|
13
|
-
};
|
14
|
-
export interface ISignal<T> {
|
15
|
-
value: T;
|
16
|
-
onChange: () => void;
|
17
|
-
}
|
18
|
-
export declare function createSignal<T>(state: T): ISignal<T>;
|
1
|
+
import { EditorVNodeObject } from "./framework/render-define";
|
2
|
+
import { SelectionState } from "./framework/selection/document-selection";
|
3
|
+
export declare type IActiveEditorContext = {
|
4
|
+
onChange: () => void;
|
5
|
+
emit: (event: string, ...args: any[]) => void;
|
6
|
+
selectionState: SelectionState;
|
7
|
+
};
|
8
|
+
export declare let activeEditorContext: IActiveEditorContext | null;
|
9
|
+
export declare function setActiveEditorContext(ctx: IActiveEditorContext | null): void;
|
10
|
+
export declare function getActiveEditorContext(): IActiveEditorContext | null;
|
11
|
+
export declare type IVNodeRenderFunc = {
|
12
|
+
render: () => EditorVNodeObject | null;
|
13
|
+
};
|
14
|
+
export interface ISignal<T> {
|
15
|
+
value: T;
|
16
|
+
onChange: () => void;
|
17
|
+
}
|
18
|
+
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,18 +1,18 @@
|
|
1
|
-
import { EditorContext } from "../document-context";
|
2
|
-
export declare class DocumentEvalFunc {
|
3
|
-
docCtx: EditorContext;
|
4
|
-
constructor(docCtx: EditorContext);
|
5
|
-
scriptsFunc: (() => void) | null;
|
6
|
-
/**
|
7
|
-
* 实例化动态脚本
|
8
|
-
*/
|
9
|
-
initScripts(scripts: string): void;
|
10
|
-
/**
|
11
|
-
* 销毁动态脚本实例
|
12
|
-
*/
|
13
|
-
destroyScripts(): void;
|
14
|
-
/**
|
15
|
-
* 触发动态脚本
|
16
|
-
*/
|
17
|
-
invokedScripts(): void;
|
18
|
-
}
|
1
|
+
import { EditorContext } from "../document-context";
|
2
|
+
export declare class DocumentEvalFunc {
|
3
|
+
docCtx: EditorContext;
|
4
|
+
constructor(docCtx: EditorContext);
|
5
|
+
scriptsFunc: (() => void) | null;
|
6
|
+
/**
|
7
|
+
* 实例化动态脚本
|
8
|
+
*/
|
9
|
+
initScripts(scripts: string): void;
|
10
|
+
/**
|
11
|
+
* 销毁动态脚本实例
|
12
|
+
*/
|
13
|
+
destroyScripts(): void;
|
14
|
+
/**
|
15
|
+
* 触发动态脚本
|
16
|
+
*/
|
17
|
+
invokedScripts(): void;
|
18
|
+
}
|
@@ -1,42 +1,42 @@
|
|
1
|
-
import { BranchElement, Element, RefCtxValue } from "../element-define";
|
2
|
-
import { SelectionState } from "../selection/document-selection";
|
3
|
-
import { DataCheckEleModel, DataInputEleModel, DataLeafEleModel, DocumentContext } from "../document-context";
|
4
|
-
import { TableElement, TableRowElement } from "../impl";
|
5
|
-
export declare class DynamicExecute {
|
6
|
-
doc: BranchElement;
|
7
|
-
ss: SelectionState;
|
8
|
-
current?: Element;
|
9
|
-
depItems?: Map<string, RefCtxValue>;
|
10
|
-
constructor(doc: BranchElement, ss: SelectionState);
|
11
|
-
create(): DynamicExecute;
|
12
|
-
/**
|
13
|
-
* 设置当前执行上下文
|
14
|
-
* 一般情况下为document,但是如果为病程录文档,需要设置为当前病程录part
|
15
|
-
*/
|
16
|
-
setExecuteCtx(parseEle: Element): BranchElement;
|
17
|
-
setCurrentCtx(ele: Element, depItems: Map<string, RefCtxValue>): void;
|
18
|
-
clearCurrentCtx(): void;
|
19
|
-
cacheList: ReturnType<DocumentContext['getDataElementModelList']>;
|
20
|
-
getControlById(id: string, options?: {
|
21
|
-
includeChildren: boolean;
|
22
|
-
}): DataCheckEleModel | DataInputEleModel | DataLeafEleModel | undefined;
|
23
|
-
getObject(id: string): RefCtxValue;
|
24
|
-
AVG(fn: () => Array<number | string>): number;
|
25
|
-
SUM(fn: () => Array<number | string | Array<string>>): number;
|
26
|
-
MAX(fn: () => Array<number | string>): number;
|
27
|
-
MIN(fn: () => Array<number | string>): number;
|
28
|
-
Float(val: any): number;
|
29
|
-
IF(condition: () => boolean, truePart: VoidFunction, falsePart: VoidFunction): any;
|
30
|
-
Number(val: any): number;
|
31
|
-
TableData(tableId: string, startRow: number, startCol: number, endRow: number, endCol: number): Array<string>;
|
32
|
-
/**
|
33
|
-
* 获取元素的父表格行元素。
|
34
|
-
*
|
35
|
-
*/
|
36
|
-
CtxRow(ele: Element): TableRowElement;
|
37
|
-
/**
|
38
|
-
* 获取元素的父表格行元素。
|
39
|
-
*
|
40
|
-
*/
|
41
|
-
CtxTable(ele: Element): TableElement;
|
42
|
-
}
|
1
|
+
import { BranchElement, Element, RefCtxValue } from "../element-define";
|
2
|
+
import { SelectionState } from "../selection/document-selection";
|
3
|
+
import { DataCheckEleModel, DataInputEleModel, DataLeafEleModel, DocumentContext } from "../document-context";
|
4
|
+
import { TableElement, TableRowElement } from "../impl";
|
5
|
+
export declare class DynamicExecute {
|
6
|
+
doc: BranchElement;
|
7
|
+
ss: SelectionState;
|
8
|
+
current?: Element;
|
9
|
+
depItems?: Map<string, RefCtxValue>;
|
10
|
+
constructor(doc: BranchElement, ss: SelectionState);
|
11
|
+
create(): DynamicExecute;
|
12
|
+
/**
|
13
|
+
* 设置当前执行上下文
|
14
|
+
* 一般情况下为document,但是如果为病程录文档,需要设置为当前病程录part
|
15
|
+
*/
|
16
|
+
setExecuteCtx(parseEle: Element): BranchElement;
|
17
|
+
setCurrentCtx(ele: Element, depItems: Map<string, RefCtxValue>): void;
|
18
|
+
clearCurrentCtx(): void;
|
19
|
+
cacheList: ReturnType<DocumentContext['getDataElementModelList']>;
|
20
|
+
getControlById(id: string, options?: {
|
21
|
+
includeChildren: boolean;
|
22
|
+
}): DataCheckEleModel | DataInputEleModel | DataLeafEleModel | undefined;
|
23
|
+
getObject(id: string): RefCtxValue;
|
24
|
+
AVG(fn: () => Array<number | string>): number;
|
25
|
+
SUM(fn: () => Array<number | string | Array<string>>): number;
|
26
|
+
MAX(fn: () => Array<number | string>): number;
|
27
|
+
MIN(fn: () => Array<number | string>): number;
|
28
|
+
Float(val: any): number;
|
29
|
+
IF(condition: () => boolean, truePart: VoidFunction, falsePart: VoidFunction): any;
|
30
|
+
Number(val: any): number;
|
31
|
+
TableData(tableId: string, startRow: number, startCol: number, endRow: number, endCol: number): Array<string>;
|
32
|
+
/**
|
33
|
+
* 获取元素的父表格行元素。
|
34
|
+
*
|
35
|
+
*/
|
36
|
+
CtxRow(ele: Element): TableRowElement;
|
37
|
+
/**
|
38
|
+
* 获取元素的父表格行元素。
|
39
|
+
*
|
40
|
+
*/
|
41
|
+
CtxTable(ele: Element): TableElement;
|
42
|
+
}
|
@@ -0,0 +1,96 @@
|
|
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 "../code-interpreter/dynamic-execute";
|
7
|
+
import { ParagraphMeasure } from "./paragraph-arrange";
|
8
|
+
import { SelectionEffectObject } from "../element-props";
|
9
|
+
export declare class ArrangeManager {
|
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
|
+
/**
|
28
|
+
* 重置文档测量的相关信息
|
29
|
+
* @param data
|
30
|
+
* @private
|
31
|
+
*/
|
32
|
+
private reset;
|
33
|
+
private arrangeDoc;
|
34
|
+
private arrangeDocs;
|
35
|
+
private createEmptyBodyRender;
|
36
|
+
private measureControl;
|
37
|
+
private processTableTextLineMode;
|
38
|
+
private getDocInnerRect;
|
39
|
+
/**
|
40
|
+
* 切割渲染元素
|
41
|
+
* @param render 被切割的对象
|
42
|
+
* @param limitHeight
|
43
|
+
* @returns
|
44
|
+
*/
|
45
|
+
cutRenderItem(render: BlockContentRenderObject, limitHeight: number): BlockContentRenderObject | null;
|
46
|
+
/**
|
47
|
+
* 切割渲染元素
|
48
|
+
* @param tbRender 被切割的对象
|
49
|
+
* @param limitHeight
|
50
|
+
* @returns
|
51
|
+
*/
|
52
|
+
cutTable(tbRender: TableRenderObject, limitHeight: number): BlockContentRenderObject | null;
|
53
|
+
cutRowRenderItem(render: TableRowRenderObject, limitHeight: number): TableRowRenderObject | null;
|
54
|
+
/**
|
55
|
+
* 修复->已经截断的合并单元格要向下移动到合适的位置
|
56
|
+
* @param cutTable
|
57
|
+
* @param aboveTable
|
58
|
+
* @returns
|
59
|
+
*/
|
60
|
+
private fixCutTable2;
|
61
|
+
/**
|
62
|
+
* 超找指定位置的单元格
|
63
|
+
* @param table
|
64
|
+
* @param x
|
65
|
+
* @returns
|
66
|
+
*/
|
67
|
+
private findAboveCellByPos;
|
68
|
+
/**
|
69
|
+
* 校验当前是否是一个完整的行,没有Null单元格,检查当前是否还需要向下合并
|
70
|
+
* @param row
|
71
|
+
*/
|
72
|
+
private checkFullRow;
|
73
|
+
private existsCellRender;
|
74
|
+
private getBlockLineHeight;
|
75
|
+
getRowInsertCellIndex(sourceCell: TableCellRenderObject, destRow: TableRowRenderObject): number;
|
76
|
+
private getHeaderRows;
|
77
|
+
/**
|
78
|
+
* 修改测量完毕后的元素状态
|
79
|
+
* @param ele
|
80
|
+
*/
|
81
|
+
setMeasureCompletedModifyFlag(ele: Element): void;
|
82
|
+
clearPaintCache(ele: Element, data: IBeginMeasureData): void;
|
83
|
+
identifyComment(ele: Element): void;
|
84
|
+
private cacheDoc;
|
85
|
+
cacheDocRenders(docs: Array<DocumentRenderObject>): void;
|
86
|
+
/**
|
87
|
+
* 生成批注区间信息
|
88
|
+
* @param renderTree
|
89
|
+
*/
|
90
|
+
generateCommRange(): void;
|
91
|
+
cacheRenders(renderTree: BranchRenderObject): void;
|
92
|
+
endMeasures(ele: Element): void;
|
93
|
+
createDefaultPara(): ParagraphElement;
|
94
|
+
patchParagraph(): boolean;
|
95
|
+
fastPatchReset(docRenders: Array<DocumentRenderObject>): void;
|
96
|
+
}
|