@hailin-zheng/editor-core 2.2.3 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/editor.css +694 -610
- package/index-cjs.d.ts +32 -31
- package/index-cjs.js +22648 -22205
- package/index-cjs.js.map +1 -1
- package/index.d.ts +32 -31
- package/index.js +22646 -22207
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +493 -464
- package/med_editor/doc-rule.d.ts +46 -46
- package/med_editor/editor-core.d.ts +21 -21
- 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 +23 -23
- package/med_editor/framework/doc-layout/document-arrange.d.ts +86 -86
- package/med_editor/framework/doc-layout/paragraph-arrange.d.ts +107 -107
- package/med_editor/framework/document-change.d.ts +314 -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 +138 -133
- package/med_editor/framework/document-event.d.ts +251 -251
- package/med_editor/framework/document-input-cursor.d.ts +32 -43
- 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 +413 -409
- package/med_editor/framework/element-event-define.d.ts +104 -107
- package/med_editor/framework/element-props.d.ts +343 -343
- 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-type-handler.d.ts +8 -9
- 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 -0
- 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 +96 -96
- 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 +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 +72 -72
- package/med_editor/framework/impl/index.d.ts +40 -39
- 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 +93 -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/infrastructure/event-subject.d.ts +57 -56
- package/med_editor/framework/infrastructure/notify.d.ts +13 -13
- package/med_editor/framework/print/document-print-offscreen.d.ts +58 -58
- package/med_editor/framework/print/document-print.d.ts +18 -18
- 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/document-selection.d.ts +92 -91
- package/med_editor/framework/selection/range-util.d.ts +36 -36
- package/med_editor/framework/selection/selection-overlays.d.ts +32 -32
- package/med_editor/framework/suggestions/input-suggestions.d.ts +29 -0
- package/med_editor/framework/util/adjust-viewport-elements.d.ts +12 -12
- package/med_editor/framework/util/common-util.d.ts +76 -76
- package/med_editor/framework/util/document-segmenter.d.ts +2 -2
- package/med_editor/framework/util/element-util.d.ts +410 -410
- package/med_editor/framework/vnode/editor-calendar-vnode.d.ts +42 -42
- package/package.json +19 -19
@@ -1,15 +1,15 @@
|
|
1
|
-
import { Element, ElementFactory, LeafElement, SerializeProps } from "../../element-define";
|
2
|
-
import { LeafRenderObject, RenderObject } from "../../render-define";
|
3
|
-
export declare class TabElement extends LeafElement {
|
4
|
-
constructor();
|
5
|
-
createRenderObject(): LeafRenderObject;
|
6
|
-
serialize(): SerializeProps;
|
7
|
-
clone(): Element;
|
8
|
-
}
|
9
|
-
export declare class TabRenderObject extends LeafRenderObject<TabElement> {
|
10
|
-
clone(): RenderObject;
|
11
|
-
}
|
12
|
-
export declare class TabFactory extends ElementFactory<null> {
|
13
|
-
match(type: string): boolean;
|
14
|
-
createElement(data: any): Element;
|
15
|
-
}
|
1
|
+
import { Element, ElementFactory, LeafElement, SerializeProps } from "../../element-define";
|
2
|
+
import { LeafRenderObject, RenderObject } from "../../render-define";
|
3
|
+
export declare class TabElement extends LeafElement {
|
4
|
+
constructor();
|
5
|
+
createRenderObject(): LeafRenderObject;
|
6
|
+
serialize(): SerializeProps;
|
7
|
+
clone(): Element;
|
8
|
+
}
|
9
|
+
export declare class TabRenderObject extends LeafRenderObject<TabElement> {
|
10
|
+
clone(): RenderObject;
|
11
|
+
}
|
12
|
+
export declare class TabFactory extends ElementFactory<null> {
|
13
|
+
match(type: string): boolean;
|
14
|
+
createElement(data: any): Element;
|
15
|
+
}
|
@@ -1,34 +1,34 @@
|
|
1
|
-
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, ICreateRenderData, readElementProps, SerializeProps, ViewOptions } from "../../element-define";
|
2
|
-
import { TableCellProps } from "../../element-props";
|
3
|
-
import { IEditorVNodeOptions, InlineMuiltBlockLineRenderObject, RenderObject } from "../../render-define";
|
4
|
-
export declare class TableCellElement extends BlockContainerElement<TableCellProps> {
|
5
|
-
constructor();
|
6
|
-
beginMeasure(data: IBeginMeasureData): void;
|
7
|
-
/**
|
8
|
-
* 不被合并单元格的单元格
|
9
|
-
* @returns
|
10
|
-
*/
|
11
|
-
isNotBeMergedCell(): boolean;
|
12
|
-
createRenderObject(data: ICreateRenderData): RenderObject | null;
|
13
|
-
serialize(options: ViewOptions): SerializeProps;
|
14
|
-
clone(data: boolean): Element;
|
15
|
-
getCellWidth(): {
|
16
|
-
cellWidth: number;
|
17
|
-
cellOffset: number;
|
18
|
-
};
|
19
|
-
static createCell(): TableCellElement;
|
20
|
-
}
|
21
|
-
export declare class TableCellRenderObject extends InlineMuiltBlockLineRenderObject<TableCellElement> {
|
22
|
-
/**
|
23
|
-
* 绘制对角线
|
24
|
-
* @private
|
25
|
-
*/
|
26
|
-
private renderDiagonalHTML;
|
27
|
-
clone(): RenderObject;
|
28
|
-
exportSVG(event: IEditorVNodeOptions): any;
|
29
|
-
private createBgRect;
|
30
|
-
}
|
31
|
-
export declare class TableCellFactory extends ElementFactory<TableCellProps> {
|
32
|
-
match(type: string): boolean;
|
33
|
-
createElement(data: readElementProps<TableCellProps>): Element;
|
34
|
-
}
|
1
|
+
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, ICreateRenderData, readElementProps, SerializeProps, ViewOptions } from "../../element-define";
|
2
|
+
import { TableCellProps } from "../../element-props";
|
3
|
+
import { IEditorVNodeOptions, InlineMuiltBlockLineRenderObject, RenderObject } from "../../render-define";
|
4
|
+
export declare class TableCellElement extends BlockContainerElement<TableCellProps> {
|
5
|
+
constructor();
|
6
|
+
beginMeasure(data: IBeginMeasureData): void;
|
7
|
+
/**
|
8
|
+
* 不被合并单元格的单元格
|
9
|
+
* @returns
|
10
|
+
*/
|
11
|
+
isNotBeMergedCell(): boolean;
|
12
|
+
createRenderObject(data: ICreateRenderData): RenderObject | null;
|
13
|
+
serialize(options: ViewOptions): SerializeProps;
|
14
|
+
clone(data: boolean): Element;
|
15
|
+
getCellWidth(): {
|
16
|
+
cellWidth: number;
|
17
|
+
cellOffset: number;
|
18
|
+
};
|
19
|
+
static createCell(): TableCellElement;
|
20
|
+
}
|
21
|
+
export declare class TableCellRenderObject extends InlineMuiltBlockLineRenderObject<TableCellElement> {
|
22
|
+
/**
|
23
|
+
* 绘制对角线
|
24
|
+
* @private
|
25
|
+
*/
|
26
|
+
private renderDiagonalHTML;
|
27
|
+
clone(): RenderObject;
|
28
|
+
exportSVG(event: IEditorVNodeOptions): any;
|
29
|
+
private createBgRect;
|
30
|
+
}
|
31
|
+
export declare class TableCellFactory extends ElementFactory<TableCellProps> {
|
32
|
+
match(type: string): boolean;
|
33
|
+
createElement(data: readElementProps<TableCellProps>): Element;
|
34
|
+
}
|
@@ -1,49 +1,49 @@
|
|
1
|
-
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, ICreateRenderData, SerializeProps, ViewOptions } from "../../element-define";
|
2
|
-
import { TableProps } from "../../element-props";
|
3
|
-
import { IEditorVNodeOptions, MuiltBlockLineRenderObject, RenderObject } from "../../render-define";
|
4
|
-
export declare class TableElement extends BlockContainerElement<TableProps> {
|
5
|
-
private _actualColsProps;
|
6
|
-
constructor();
|
7
|
-
/**
|
8
|
-
* 获取实际测量的宽度,将auto、百分比列宽度进行转化为 number 类型
|
9
|
-
*/
|
10
|
-
get actualColsProps(): IColsData[];
|
11
|
-
getCellWidth(cellIndex: number): number;
|
12
|
-
getCellOffsetX(cellIndex: number): number;
|
13
|
-
setCellWidth(cellIndex: number, width: number): void;
|
14
|
-
/**
|
15
|
-
* 插入列的定义
|
16
|
-
* @param index
|
17
|
-
* @param width
|
18
|
-
*/
|
19
|
-
insertCol(index: number, width: number): void;
|
20
|
-
/**
|
21
|
-
* 移除列的定义
|
22
|
-
* @param index
|
23
|
-
*/
|
24
|
-
removeCol(index: number): void;
|
25
|
-
getColsCount(): number;
|
26
|
-
clone(data: boolean): Element;
|
27
|
-
createRenderObject(): RenderObject;
|
28
|
-
beginMeasure(data: IBeginMeasureData): void;
|
29
|
-
serialize(options: ViewOptions): SerializeProps;
|
30
|
-
}
|
31
|
-
export declare class TableRenderObject extends MuiltBlockLineRenderObject<TableElement> {
|
32
|
-
setRenderWidth(maxWidth: number): void;
|
33
|
-
private exportTableBorder;
|
34
|
-
clone(): RenderObject;
|
35
|
-
exportSVG(event: IEditorVNodeOptions): any;
|
36
|
-
}
|
37
|
-
export declare class TableFactory extends ElementFactory<TableProps> {
|
38
|
-
match(type: string): boolean;
|
39
|
-
createElement(data: any): Element;
|
40
|
-
}
|
41
|
-
/**
|
42
|
-
* 行-表格渲染模式
|
43
|
-
*/
|
44
|
-
export declare function textLineRenderMode(tbRender: TableRenderObject, data: ICreateRenderData): boolean;
|
45
|
-
interface IColsData {
|
46
|
-
width: number;
|
47
|
-
offset: number;
|
48
|
-
}
|
49
|
-
export {};
|
1
|
+
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, ICreateRenderData, SerializeProps, ViewOptions } from "../../element-define";
|
2
|
+
import { TableProps } from "../../element-props";
|
3
|
+
import { IEditorVNodeOptions, MuiltBlockLineRenderObject, RenderObject } from "../../render-define";
|
4
|
+
export declare class TableElement extends BlockContainerElement<TableProps> {
|
5
|
+
private _actualColsProps;
|
6
|
+
constructor();
|
7
|
+
/**
|
8
|
+
* 获取实际测量的宽度,将auto、百分比列宽度进行转化为 number 类型
|
9
|
+
*/
|
10
|
+
get actualColsProps(): IColsData[];
|
11
|
+
getCellWidth(cellIndex: number): number;
|
12
|
+
getCellOffsetX(cellIndex: number): number;
|
13
|
+
setCellWidth(cellIndex: number, width: number): void;
|
14
|
+
/**
|
15
|
+
* 插入列的定义
|
16
|
+
* @param index
|
17
|
+
* @param width
|
18
|
+
*/
|
19
|
+
insertCol(index: number, width: number): void;
|
20
|
+
/**
|
21
|
+
* 移除列的定义
|
22
|
+
* @param index
|
23
|
+
*/
|
24
|
+
removeCol(index: number): void;
|
25
|
+
getColsCount(): number;
|
26
|
+
clone(data: boolean): Element;
|
27
|
+
createRenderObject(): RenderObject;
|
28
|
+
beginMeasure(data: IBeginMeasureData): void;
|
29
|
+
serialize(options: ViewOptions): SerializeProps;
|
30
|
+
}
|
31
|
+
export declare class TableRenderObject extends MuiltBlockLineRenderObject<TableElement> {
|
32
|
+
setRenderWidth(maxWidth: number): void;
|
33
|
+
private exportTableBorder;
|
34
|
+
clone(): RenderObject;
|
35
|
+
exportSVG(event: IEditorVNodeOptions): any;
|
36
|
+
}
|
37
|
+
export declare class TableFactory extends ElementFactory<TableProps> {
|
38
|
+
match(type: string): boolean;
|
39
|
+
createElement(data: any): Element;
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* 行-表格渲染模式
|
43
|
+
*/
|
44
|
+
export declare function textLineRenderMode(tbRender: TableRenderObject, data: ICreateRenderData): boolean;
|
45
|
+
interface IColsData {
|
46
|
+
width: number;
|
47
|
+
offset: number;
|
48
|
+
}
|
49
|
+
export {};
|
@@ -1,27 +1,27 @@
|
|
1
|
-
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, readElementProps, SerializeProps, ViewOptions } from "../../element-define";
|
2
|
-
import { TableRowProps } from "../../element-props";
|
3
|
-
import { MuiltBlockLineRenderObject, RenderObject } from "../../render-define";
|
4
|
-
export declare const RowMinHeight = 20;
|
5
|
-
export declare class TableRowElement extends BlockContainerElement<TableRowProps> {
|
6
|
-
constructor();
|
7
|
-
beginMeasure(data: IBeginMeasureData): void;
|
8
|
-
/**
|
9
|
-
* 解决纵向合并行的行缓存高度bug
|
10
|
-
* @private
|
11
|
-
*/
|
12
|
-
private checkRowModifyState;
|
13
|
-
createRenderObject(): RenderObject;
|
14
|
-
serialize(viewOptions: ViewOptions): SerializeProps;
|
15
|
-
clone(data: boolean): Element;
|
16
|
-
static createRow(cols: number): TableRowElement;
|
17
|
-
}
|
18
|
-
export declare class TableRowRenderObject extends MuiltBlockLineRenderObject<TableRowElement> {
|
19
|
-
remeasureState: boolean;
|
20
|
-
hasMergeCells: boolean | undefined;
|
21
|
-
minHeight: number;
|
22
|
-
clone(): RenderObject;
|
23
|
-
}
|
24
|
-
export declare class TableRowFactory extends ElementFactory<TableRowProps> {
|
25
|
-
match(type: string): boolean;
|
26
|
-
createElement(data: readElementProps<TableRowProps>): Element;
|
27
|
-
}
|
1
|
+
import { BlockContainerElement, Element, ElementFactory, IBeginMeasureData, readElementProps, SerializeProps, ViewOptions } from "../../element-define";
|
2
|
+
import { TableRowProps } from "../../element-props";
|
3
|
+
import { MuiltBlockLineRenderObject, RenderObject } from "../../render-define";
|
4
|
+
export declare const RowMinHeight = 20;
|
5
|
+
export declare class TableRowElement extends BlockContainerElement<TableRowProps> {
|
6
|
+
constructor();
|
7
|
+
beginMeasure(data: IBeginMeasureData): void;
|
8
|
+
/**
|
9
|
+
* 解决纵向合并行的行缓存高度bug
|
10
|
+
* @private
|
11
|
+
*/
|
12
|
+
private checkRowModifyState;
|
13
|
+
createRenderObject(): RenderObject;
|
14
|
+
serialize(viewOptions: ViewOptions): SerializeProps;
|
15
|
+
clone(data: boolean): Element;
|
16
|
+
static createRow(cols: number): TableRowElement;
|
17
|
+
}
|
18
|
+
export declare class TableRowRenderObject extends MuiltBlockLineRenderObject<TableRowElement> {
|
19
|
+
remeasureState: boolean;
|
20
|
+
hasMergeCells: boolean | undefined;
|
21
|
+
minHeight: number;
|
22
|
+
clone(): RenderObject;
|
23
|
+
}
|
24
|
+
export declare class TableRowFactory extends ElementFactory<TableRowProps> {
|
25
|
+
match(type: string): boolean;
|
26
|
+
createElement(data: readElementProps<TableRowProps>): Element;
|
27
|
+
}
|
@@ -1,20 +1,20 @@
|
|
1
|
-
export interface ColumnPartOffset extends ColumnPart {
|
2
|
-
offset: number;
|
3
|
-
}
|
4
|
-
export interface ColumnPart {
|
5
|
-
index: number;
|
6
|
-
width: number;
|
7
|
-
}
|
8
|
-
export interface ColumnPatch {
|
9
|
-
type: 'modify' | 'insert';
|
10
|
-
data: ColumnPart;
|
11
|
-
}
|
12
|
-
export declare class ColumnPatchUtil {
|
13
|
-
static getPatchPacks(cols: Array<ColumnPart>, splitCols: Array<ColumnPart>): [Array<{
|
14
|
-
part: ColumnPartOffset;
|
15
|
-
patchs: Array<ColumnPatch>;
|
16
|
-
}>, Array<Array<ColumnPart>>];
|
17
|
-
private static getColumn;
|
18
|
-
private static getSplitCols;
|
19
|
-
private static getLinePointMap;
|
20
|
-
}
|
1
|
+
export interface ColumnPartOffset extends ColumnPart {
|
2
|
+
offset: number;
|
3
|
+
}
|
4
|
+
export interface ColumnPart {
|
5
|
+
index: number;
|
6
|
+
width: number;
|
7
|
+
}
|
8
|
+
export interface ColumnPatch {
|
9
|
+
type: 'modify' | 'insert';
|
10
|
+
data: ColumnPart;
|
11
|
+
}
|
12
|
+
export declare class ColumnPatchUtil {
|
13
|
+
static getPatchPacks(cols: Array<ColumnPart>, splitCols: Array<ColumnPart>): [Array<{
|
14
|
+
part: ColumnPartOffset;
|
15
|
+
patchs: Array<ColumnPatch>;
|
16
|
+
}>, Array<Array<ColumnPart>>];
|
17
|
+
private static getColumn;
|
18
|
+
private static getSplitCols;
|
19
|
+
private static getLinePointMap;
|
20
|
+
}
|
@@ -1,92 +1,93 @@
|
|
1
|
-
import { SelectionState } from "../../selection/document-selection";
|
2
|
-
|
3
|
-
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
*
|
12
|
-
*
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
*
|
22
|
-
* @param
|
23
|
-
* @param
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
*
|
29
|
-
* @param
|
30
|
-
* @param
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
*
|
39
|
-
* @param
|
40
|
-
* @param
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
*
|
57
|
-
* @param
|
58
|
-
* @param
|
59
|
-
* @param
|
60
|
-
* @param
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
*
|
66
|
-
*
|
67
|
-
|
68
|
-
|
69
|
-
private static
|
70
|
-
|
71
|
-
|
72
|
-
*
|
73
|
-
* @param
|
74
|
-
* @param
|
75
|
-
* @param
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
*
|
81
|
-
* @param
|
82
|
-
* @param
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
*
|
88
|
-
* @param
|
89
|
-
* @param
|
90
|
-
|
91
|
-
|
92
|
-
|
1
|
+
import { SelectionState } from "../../selection/document-selection";
|
2
|
+
import { TableElement } from "./table-impl";
|
3
|
+
/**
|
4
|
+
* 拆分单元格
|
5
|
+
* 蜀道难,难于上青天;拆分单元格,头发秃,精神衰,眼睛昏,身体废。
|
6
|
+
*
|
7
|
+
* 1.拆分为多列规则:不影响其他列宽度,将当前列宽度均分
|
8
|
+
*/
|
9
|
+
export declare class TableSplitCell {
|
10
|
+
/**
|
11
|
+
*
|
12
|
+
* 普通单元格可以任意拆分行和列
|
13
|
+
* 已合并的单元格,可以拆分任意数量的列;可以拆分的数量必须为合并单元格数量的约数
|
14
|
+
*/
|
15
|
+
static splitCell(ss: SelectionState, rows: number, cols: number): void;
|
16
|
+
/**
|
17
|
+
* 拆分普通的单元格
|
18
|
+
*/
|
19
|
+
private static splitNormalCell;
|
20
|
+
/**
|
21
|
+
* 拆分合并的单元格
|
22
|
+
* @param ss
|
23
|
+
* @param rows
|
24
|
+
* @param cols
|
25
|
+
*/
|
26
|
+
static splitMergeCell(ss: SelectionState, rows: number, cols: number): void;
|
27
|
+
/**
|
28
|
+
* 拆分横向正常的单元格
|
29
|
+
* @param ss
|
30
|
+
* @param rows
|
31
|
+
* @param cols
|
32
|
+
*/
|
33
|
+
static horSplitHorNormalCell(ss: SelectionState, rows: number, cols: number): {
|
34
|
+
startColIndex: number;
|
35
|
+
endColIndex: number;
|
36
|
+
};
|
37
|
+
/**
|
38
|
+
* 横向拆分合并的单元格
|
39
|
+
* @param ss
|
40
|
+
* @param rows
|
41
|
+
* @param cols
|
42
|
+
*/
|
43
|
+
static horSplitHorMergeCell(ss: SelectionState, rows: number, cols: number): {
|
44
|
+
startColIndex: number;
|
45
|
+
endColIndex: number;
|
46
|
+
};
|
47
|
+
/**
|
48
|
+
* 获取需要新创建的列数量
|
49
|
+
*/
|
50
|
+
private static getPrepareNewColCounts;
|
51
|
+
/**
|
52
|
+
* 应用横向拆分单元格补丁
|
53
|
+
*/
|
54
|
+
private static applyHorSplitColumnPatchPacks;
|
55
|
+
/**
|
56
|
+
* 存在横向合并的单元格,进行单元格分拆,打补丁
|
57
|
+
* @param tb
|
58
|
+
* @param focusRowIndex
|
59
|
+
* @param focusColInex
|
60
|
+
* @param splitRows
|
61
|
+
* @param packs
|
62
|
+
*/
|
63
|
+
private static applyHorSplitColumnCurrPatchPacks;
|
64
|
+
/**
|
65
|
+
* 纵向拆分合并的单元格
|
66
|
+
* 在指定行下插入复制行
|
67
|
+
* 存在
|
68
|
+
*/
|
69
|
+
private static verSplitVerMergeCell;
|
70
|
+
private static getSplitCols;
|
71
|
+
/**
|
72
|
+
* 获取横向合并的列
|
73
|
+
* @param tb
|
74
|
+
* @param currRowIndex
|
75
|
+
* @param currColIndex
|
76
|
+
* @param splitCols
|
77
|
+
*/
|
78
|
+
private static getHMergeCols;
|
79
|
+
/**
|
80
|
+
* 获取纵向合并的行数
|
81
|
+
* @param tb
|
82
|
+
* @param rowIndex
|
83
|
+
* @param colIndex
|
84
|
+
*/
|
85
|
+
static getVMergeRowsCount(tb: TableElement, rowIndex: number, colIndex: number): number;
|
86
|
+
/**
|
87
|
+
* 获取纵向合并的行数
|
88
|
+
* @param tb
|
89
|
+
* @param rowIndex
|
90
|
+
* @param colIndex
|
91
|
+
*/
|
92
|
+
static getHMergeColsCount(tb: TableElement, rowIndex: number, colIndex: number): number;
|
93
|
+
}
|