@hailin-zheng/editor-core 2.0.15 → 2.0.17

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.
@@ -307,6 +307,7 @@ export declare class DocEditor {
307
307
  * @param ele
308
308
  */
309
309
  insertNewElement(ele: Element): void;
310
+ test(): void;
310
311
  switchPageLayout(mode: PageLayoutMode): void;
311
312
  /**
312
313
  * 获取当前光标位置所在的段落
@@ -208,10 +208,18 @@ export declare class DocumentEvent {
208
208
  * 向左移动光标
209
209
  */
210
210
  moveCursorToLeft(): void;
211
+ /**
212
+ * 向左移动光标处理函数
213
+ * @param startControl
214
+ * @param startOffset
215
+ * @private
216
+ */
217
+ private moveCursorToLeftHandle;
211
218
  /**
212
219
  * 向右移动光标
213
220
  */
214
221
  moveCursorToRight(): void;
222
+ moveCursorToRightHandle(startControl: LeafElement, startOffset: number): void;
215
223
  /**
216
224
  * 向上移动光标
217
225
  */
@@ -197,6 +197,7 @@ export declare class DataEleListProps extends DataEleBaseTextProps {
197
197
  * 是否允许多选
198
198
  */
199
199
  multiSelect: boolean;
200
+ displayField: 'code' | 'value';
200
201
  clone(dest: DataEleListProps | null): DataEleListProps;
201
202
  getSerializeProps(options: ViewOptions): any;
202
203
  updateProps(props: DataEleListProps): void;
@@ -235,6 +236,7 @@ export declare class DataEleCheckProps extends DataEleBaseProps {
235
236
  falseChar: string;
236
237
  trueStateColor: string;
237
238
  falseStateColor: string;
239
+ style: 'CheckBox' | 'RadioButton';
238
240
  clone(dest: DataEleCheckProps | null): DataEleCheckProps;
239
241
  getSerializeProps(options: ViewOptions): any;
240
242
  updateProps(props: DataEleCheckProps): void;
@@ -396,5 +396,11 @@ export declare class ElementUtil {
396
396
  static getFillSvgRect(x: number, y: number, width: number, height: number, fill: string): any;
397
397
  static getMousePos(e: MouseEvent): Position;
398
398
  static createClipPath(id: string, width: number, height: number, x?: number, y?: number): any;
399
+ /**
400
+ * 判断是否光标可以设置接受编辑
401
+ * @returns
402
+ */
403
+ static canSetCursor(startControl: LeafElement, startOffset: number, editable: boolean, viewOptions: ViewOptions): boolean;
404
+ static fixedOffset(control: LeafElement, offset: number): number;
399
405
  }
400
406
  export {};
@@ -17,6 +17,8 @@ export declare class DataElementCheckRenderObject extends LeafRenderObject<DataE
17
17
  clone(): RenderObject;
18
18
  render(e: IRenderData): void;
19
19
  exportHTML(event: IEditorVNodeOptions): any;
20
+ private drawRectCheckbox;
21
+ private drawCircleCheckbox;
20
22
  }
21
23
  export declare class DataElementCheckFactory extends ElementFactory<DataEleCheckProps> {
22
24
  match(type: string): boolean;
@@ -1,4 +1,5 @@
1
1
  import { SelectionState } from "../../document-selection";
2
+ import { Element } from "../../element-define";
2
3
  import { TableCellElement } from "./table-cell-impl";
3
4
  import { TableElement } from "./table-impl";
4
5
  import { TableRowElement } from "./table-row-impl";
@@ -161,6 +162,15 @@ export declare class TableUtil {
161
162
  */
162
163
  static calcTableColsWidth(cols: Array<string | number>, tbWidth: number): Array<number>;
163
164
  static setTableCellBgColorAtSelection(ss: SelectionState, bgColor: string): void;
165
+ static getTableData(tb: TableElement): any;
166
+ /**
167
+ * 获取单元格内的数据元的值
168
+ * @param target
169
+ */
170
+ static getCellData(target: Element): {
171
+ id: string;
172
+ value: any;
173
+ } | null;
164
174
  }
165
175
  export interface ITableSelectedRegion {
166
176
  startRow: number;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "hailin-zheng",
5
5
  "private": false,
6
6
  "license": "ISC",
7
- "version": "2.0.15",
7
+ "version": "2.0.17",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "bwip-js": "^3.0.5",