@hailin-zheng/editor-core 2.2.7 → 2.2.8
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 +348 -348
- package/index-cjs.js +208 -254
- package/index-cjs.js.map +1 -1
- package/index.js +208 -254
- package/index.js.map +1 -1
- package/med_editor/framework/element-define.d.ts +8 -5
- package/med_editor/framework/element-serialize.d.ts +1 -1
- package/med_editor/framework/impl/data-element/data-container-impl.d.ts +8 -8
- package/med_editor/framework/impl/document/doc-body-impl.d.ts +2 -2
- package/med_editor/framework/impl/document/doc-body-part-impl.d.ts +2 -2
- package/med_editor/framework/impl/paragraph/p-impl.d.ts +2 -2
- package/med_editor/framework/impl/table/table-impl.d.ts +2 -2
- package/med_editor/framework/impl/table/table-row-impl.d.ts +2 -2
- package/med_editor/framework/render-define.d.ts +5 -6
- package/package.json +2 -2
@@ -252,12 +252,16 @@ export declare class ViewOptions {
|
|
252
252
|
defaultColor: string;
|
253
253
|
currentFontSize: number;
|
254
254
|
currentFontName: string;
|
255
|
-
|
256
|
-
|
255
|
+
selectionColor: string;
|
256
|
+
dataDecoratorNormalColor: string;
|
257
|
+
dataDecoratorMouseEnterColor: string;
|
258
|
+
dataDecoratorFocusedColor: string;
|
259
|
+
dataEleEmptyBgColor: string;
|
260
|
+
dataEleMouseEnterBgColor: string;
|
261
|
+
dataEleReadOnlyBgColor: string;
|
257
262
|
dataEleFocusedBgColor: string;
|
263
|
+
dataEleNormalBgColor: string;
|
258
264
|
dataEleErrorBgColor: string;
|
259
|
-
dataEleReadOnlyOverlayColor: string;
|
260
|
-
dataEleOutlineColor: string;
|
261
265
|
viewBackcolor: string;
|
262
266
|
paraSymbolColor: string;
|
263
267
|
dataGroupColor: string;
|
@@ -268,7 +272,6 @@ export declare class ViewOptions {
|
|
268
272
|
showLineRect: boolean;
|
269
273
|
showCharRect: boolean;
|
270
274
|
dataEleDecoratorMode: 'none' | 'outline' | 'overlay';
|
271
|
-
dataEleDecoratorColor: string;
|
272
275
|
showTabChar: boolean;
|
273
276
|
showSpaceChar: boolean;
|
274
277
|
showLineBreak: boolean;
|
@@ -10,7 +10,7 @@ export declare class ElementSerialize {
|
|
10
10
|
static serializeString(element: Element, options?: {
|
11
11
|
all: boolean;
|
12
12
|
}): string;
|
13
|
-
static
|
13
|
+
static serializeObject(obj: object | undefined | null): any;
|
14
14
|
/**
|
15
15
|
* 获取选中的结构
|
16
16
|
* @param ss
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, readElementProps, SerializeProps } from "../../element-define";
|
2
|
-
import {
|
1
|
+
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, NullableType, readElementProps, SerializeProps, ViewOptions } from "../../element-define";
|
2
|
+
import { DataEleBaseProps } from "../../element-props";
|
3
|
+
import { IEditorVNodeOptions, MultiBlockLineRenderObject, RenderObject } from "../../render-define";
|
3
4
|
/**
|
4
5
|
* 数据块容器,包裹多个段落
|
5
6
|
*/
|
@@ -7,10 +8,10 @@ export declare class DataContainerElement extends BlockContainerElement<DataCont
|
|
7
8
|
constructor();
|
8
9
|
createRenderObject(): DataContainerRenderObject;
|
9
10
|
beginMeasure(data: IBeginMeasureData): void;
|
10
|
-
serialize(): SerializeProps;
|
11
|
+
serialize(viewOptions: ViewOptions): SerializeProps | null;
|
11
12
|
clone(data: boolean): DataContainerElement;
|
12
13
|
}
|
13
|
-
export declare class DataContainerRenderObject extends
|
14
|
+
export declare class DataContainerRenderObject extends MultiBlockLineRenderObject<DataContainerElement> {
|
14
15
|
clone(cloneData?: boolean): RenderObject;
|
15
16
|
exportSVG(event: IEditorVNodeOptions): any;
|
16
17
|
}
|
@@ -18,8 +19,7 @@ export declare class DataContainerFactory extends ElementFactory<DataContainerPr
|
|
18
19
|
match(type: string): boolean;
|
19
20
|
createElement(data: readElementProps<DataContainerProps>): Element<any>;
|
20
21
|
}
|
21
|
-
export declare class DataContainerProps {
|
22
|
-
|
23
|
-
|
24
|
-
name: string;
|
22
|
+
export declare class DataContainerProps extends DataEleBaseProps {
|
23
|
+
clone(dest: DataContainerProps | null): void;
|
24
|
+
getSerializeProps(options: ViewOptions): NullableType<DataEleBaseProps>;
|
25
25
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, SerializeProps } from "../../element-define";
|
2
2
|
import { MouseElementEvent } from "../../element-event-define";
|
3
|
-
import { IEditorVNodeOptions,
|
3
|
+
import { IEditorVNodeOptions, MultiBlockLineRenderObject, RenderObject } from "../../render-define";
|
4
4
|
export declare class DocumentBodyElement extends BlockContainerElement {
|
5
5
|
constructor();
|
6
6
|
createRenderObject(): DocumentBodyRenderObject;
|
@@ -9,7 +9,7 @@ export declare class DocumentBodyElement extends BlockContainerElement {
|
|
9
9
|
clone(data: boolean): DocumentBodyElement;
|
10
10
|
beginMeasure(data: IBeginMeasureData): void;
|
11
11
|
}
|
12
|
-
export declare class DocumentBodyRenderObject extends
|
12
|
+
export declare class DocumentBodyRenderObject extends MultiBlockLineRenderObject {
|
13
13
|
clone(cloneData?: boolean): RenderObject;
|
14
14
|
exportSVG(event: IEditorVNodeOptions): any;
|
15
15
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { BlockContainerElement, SerializeProps, Element, readElementProps, ElementFactory } from "../../element-define";
|
2
|
-
import { IEditorVNodeOptions,
|
2
|
+
import { IEditorVNodeOptions, MultiBlockLineRenderObject, RenderObject } from "../../render-define";
|
3
3
|
import { BodyPartProps } from "../../element-props";
|
4
4
|
/**
|
5
5
|
* 用于合并病程录,每个part包含每份病程录body
|
@@ -12,7 +12,7 @@ export declare class DocumentBodyPartElement extends BlockContainerElement<BodyP
|
|
12
12
|
serialize(): SerializeProps;
|
13
13
|
clone(data: boolean): DocumentBodyPartElement;
|
14
14
|
}
|
15
|
-
export declare class DocumentBodyPartRenderObject extends
|
15
|
+
export declare class DocumentBodyPartRenderObject extends MultiBlockLineRenderObject {
|
16
16
|
clone(cloneData?: boolean): RenderObject;
|
17
17
|
exportSVG(event: IEditorVNodeOptions): any;
|
18
18
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { BlockContentElement, Element, ElementFactory, readElementProps, SerializeProps, ViewOptions } from "../../element-define";
|
2
2
|
import { ParagraphProps } from "../../element-props";
|
3
3
|
import { RenderContextType } from "../../render-context";
|
4
|
-
import { BlockLineRectRenderObject, IEditorVNodeOptions, IRenderData,
|
4
|
+
import { BlockLineRectRenderObject, IEditorVNodeOptions, IRenderData, MultiBlockLineRenderObject, RenderObject } from "../../render-define";
|
5
5
|
export declare class ParagraphElement extends BlockContentElement<ParagraphProps> {
|
6
6
|
constructor();
|
7
7
|
/**
|
@@ -15,7 +15,7 @@ export declare class ParagraphElement extends BlockContentElement<ParagraphProps
|
|
15
15
|
clone(data: boolean): Element;
|
16
16
|
static createElement(): ParagraphElement;
|
17
17
|
}
|
18
|
-
export declare class ParagraphRenderObject extends
|
18
|
+
export declare class ParagraphRenderObject extends MultiBlockLineRenderObject<ParagraphElement> {
|
19
19
|
/**
|
20
20
|
* 绘制项目符号
|
21
21
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, ICreateRenderData, SerializeProps, ViewOptions } from "../../element-define";
|
2
2
|
import { TableProps } from "../../element-props";
|
3
|
-
import { IEditorVNodeOptions,
|
3
|
+
import { IEditorVNodeOptions, MultiBlockLineRenderObject, RenderObject } from "../../render-define";
|
4
4
|
export declare class TableElement extends BlockContainerElement<TableProps> {
|
5
5
|
private _actualColsProps;
|
6
6
|
constructor();
|
@@ -28,7 +28,7 @@ export declare class TableElement extends BlockContainerElement<TableProps> {
|
|
28
28
|
beginMeasure(data: IBeginMeasureData): void;
|
29
29
|
serialize(options: ViewOptions): SerializeProps;
|
30
30
|
}
|
31
|
-
export declare class TableRenderObject extends
|
31
|
+
export declare class TableRenderObject extends MultiBlockLineRenderObject<TableElement> {
|
32
32
|
setRenderWidth(maxWidth: number): void;
|
33
33
|
private exportTableBorder;
|
34
34
|
clone(): RenderObject;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, readElementProps, SerializeProps, ViewOptions } from "../../element-define";
|
2
2
|
import { TableRowProps } from "../../element-props";
|
3
|
-
import {
|
3
|
+
import { MultiBlockLineRenderObject, RenderObject } from "../../render-define";
|
4
4
|
export declare const RowMinHeight = 20;
|
5
5
|
export declare class TableRowElement extends BlockContainerElement<TableRowProps> {
|
6
6
|
constructor();
|
@@ -15,7 +15,7 @@ export declare class TableRowElement extends BlockContainerElement<TableRowProps
|
|
15
15
|
clone(data: boolean): Element;
|
16
16
|
static createRow(cols: number): TableRowElement;
|
17
17
|
}
|
18
|
-
export declare class TableRowRenderObject extends
|
18
|
+
export declare class TableRowRenderObject extends MultiBlockLineRenderObject<TableRowElement> {
|
19
19
|
remeasureState: boolean;
|
20
20
|
hasMergeCells: boolean | undefined;
|
21
21
|
minHeight: number;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Rect, Element, MarginProps, PaddingProps, Position, ViewOptions } from './element-define';
|
1
|
+
import { Rect, Element, MarginProps, PaddingProps, Position, ViewOptions, BranchElement } from './element-define';
|
2
2
|
import { RenderContext, RenderContextType } from './render-context';
|
3
3
|
import { EditorContext } from "./document-context";
|
4
4
|
/**
|
@@ -69,8 +69,7 @@ export interface IRenderData {
|
|
69
69
|
export declare abstract class BlockContentRenderObject<T extends Element = Element> extends BranchRenderObject<T> {
|
70
70
|
setRenderWidth(maxWidth: number): void;
|
71
71
|
}
|
72
|
-
export declare abstract class InlineGroupRenderObject<T extends
|
73
|
-
paintPos: Position;
|
72
|
+
export declare abstract class InlineGroupRenderObject<T extends BranchElement = BranchElement> extends BranchRenderObject<T> {
|
74
73
|
}
|
75
74
|
/**
|
76
75
|
* 包含块级渲染元素的容器元素,例如body、table-cell等
|
@@ -81,18 +80,18 @@ export declare abstract class BlockContainerRenderObject<T extends Element = Ele
|
|
81
80
|
/**
|
82
81
|
* 多级 ‘BlockLineRectRenderObject’ 包裹元素,例如 p、table
|
83
82
|
*/
|
84
|
-
export declare abstract class
|
83
|
+
export declare abstract class MultiBlockLineRenderObject<T extends Element = Element> extends BlockContentRenderObject<T> {
|
85
84
|
}
|
86
85
|
/**
|
87
86
|
* 容器-子内容为多个行内块级元素,例如table-row
|
88
87
|
*/
|
89
|
-
export declare abstract class InlineBlockContainer extends
|
88
|
+
export declare abstract class InlineBlockContainer extends MultiBlockLineRenderObject {
|
90
89
|
}
|
91
90
|
/**
|
92
91
|
* 服务于table-cell
|
93
92
|
* 可被多级拆分的元素
|
94
93
|
*/
|
95
|
-
export declare abstract class InlineMuiltBlockLineRenderObject<T extends Element = Element> extends
|
94
|
+
export declare abstract class InlineMuiltBlockLineRenderObject<T extends Element = Element> extends MultiBlockLineRenderObject<T> {
|
96
95
|
}
|
97
96
|
/**
|
98
97
|
* 最小不可分割单位的块级行框,例如 p-line
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"author": "hailin-zheng",
|
5
5
|
"private": false,
|
6
6
|
"license": "ISC",
|
7
|
-
"version": "2.2.
|
7
|
+
"version": "2.2.8",
|
8
8
|
"scripts": {},
|
9
9
|
"dependencies": {
|
10
10
|
"moment": "^2.29.3",
|
@@ -16,4 +16,4 @@
|
|
16
16
|
"snabbdom-to-html": "^7.1.0",
|
17
17
|
"jsbarcode": "^3.11.5"
|
18
18
|
}
|
19
|
-
}
|
19
|
+
}
|