@ones-editor/editor 1.1.17-beta.9 → 1.1.18-beta.10

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.
@@ -13,7 +13,7 @@ export default class OnesEditorComments {
13
13
  private showComment;
14
14
  showCommentList: (groupId?: string) => void;
15
15
  setFirstEditingCommentActive(): void;
16
- isEditing(): boolean;
16
+ isEditing(includeEmpty?: boolean): boolean;
17
17
  mount(containers: CommentRoot): void;
18
18
  private handleCommentListClose;
19
19
  private handleOnSelectComment;
@@ -18,7 +18,7 @@ export default class CommentsList extends TypedEmitter<CommentsListEvents> imple
18
18
  onDeleteComment(commentId: string, local: boolean): void;
19
19
  onUpdateComment(commentId: string, local: boolean): void;
20
20
  createList(): CommentGroupList;
21
- isEditing(): boolean;
21
+ isEditing(includeEmpty?: boolean): boolean;
22
22
  setFirstEditingCommentActive(): void;
23
23
  handleSelectionOnComment: () => void;
24
24
  updateCommentCount: () => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="lodash" />
1
2
  import { OnesEditor, OnesEditorComment } from '../../../../@ones-editor/core';
2
3
  import { CommentWithChildren, OnesEditorCommentsProvider } from '../types';
3
4
  import { CommentGroupItem } from './group-item';
@@ -13,6 +14,7 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
13
14
  groupItemHandlers: CommentGroupItemHandlers;
14
15
  constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, parent: HTMLElement);
15
16
  destroy(): void;
17
+ dispatchScroll: import("lodash").DebouncedFunc<() => void>;
16
18
  updateItemsLayout(): void;
17
19
  private bindEvents;
18
20
  private unbindEvents;
@@ -22,7 +24,7 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
22
24
  active: boolean;
23
25
  }): CommentGroupItem | null;
24
26
  private findFirstEditingComment;
25
- isEditing(): boolean;
27
+ isEditing(includeEmpty?: boolean): boolean;
26
28
  closeEditing: (groupId: string) => void;
27
29
  setFirstEditingCommentActive: () => void;
28
30
  setActiveItem(index: number, direction?: 'prev' | 'next'): void;
@@ -1,6 +1,6 @@
1
1
  import { OnesEditor } from '../../../../../@ones-editor/core';
2
2
  import { TypedEmitter } from 'tiny-typed-emitter';
3
- import { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '../..';
3
+ import { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '../../types';
4
4
  import { MiniGroupList } from './group-list';
5
5
  interface MiniCommentsListEvents {
6
6
  onMiniCommentClose: () => void;
@@ -31,6 +31,7 @@ export declare class EditorInput implements OnesEditorInput {
31
31
  destroy(): void;
32
32
  getInput(): HTMLInputElement;
33
33
  focus(): void;
34
+ isInDisableScrollMask(target: HTMLElement): boolean;
34
35
  handleWindowBlur: () => void;
35
36
  handleDocumentClick: (event: MouseEvent) => void;
36
37
  handleDocumentSelectionChange: () => void;
@@ -1,6 +1,6 @@
1
1
  import { DocBlock, OnesEditorDoc } from '../doc/doc';
2
2
  import { ContainerElement } from '../types';
3
- export declare function isContainer(elem: Element): boolean;
3
+ export declare function isContainer(elem: Element): elem is ContainerElement;
4
4
  export declare function isRootContainer(container: ContainerElement): boolean;
5
5
  export declare function isChildContainer(container: ContainerElement): boolean;
6
6
  export declare function getContainerId(container: ContainerElement): string;
@@ -525,7 +525,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
525
525
  getSelectedText: () => string;
526
526
  clearSelectedContents: () => void;
527
527
  insertBlock: (containerId: string, blockIndex: number, blockData: DocBlock, newRange?: OnesEditorDocRange, options?: InsertBlockOptions) => BlockElement;
528
- insertEmbed: (containerId: string, blockIndex: number, embedType: string, embedData: DocEmbedData, newRange?: OnesEditorDocRange) => BlockElement;
528
+ insertEmbed: (containerId: string, blockIndex: number, embedType: string, embedData: DocEmbedData, newRange?: OnesEditorDocRange, attributes?: DocBlockAttributes) => BlockElement;
529
529
  deleteBlock: (block: BlockElement, newRange?: OnesEditorDocRange) => void;
530
530
  getTextPosition: () => BlockTextPosition;
531
531
  getBlockString: (block: BlockElement, options?: {
@@ -545,7 +545,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
545
545
  insertTextBlock: (text?: string | DocBlockText, containerId?: string, blockIndex?: number, options?: {
546
546
  newRange?: OnesEditorDocRange;
547
547
  insertBlockOptions?: InsertBlockOptions;
548
- }) => BlockElement;
548
+ }, attributes?: DocBlockAttributes) => BlockElement;
549
549
  insertDoc: (block: BlockElement, offset: number, doc: DocObject, cloneDocResult?: CloneBlockResultInfo) => void;
550
550
  insertDocAt: (container: ContainerElement, blockIndex: number, doc: DocObject, cloneDocResult?: CloneBlockResultInfo) => BlockElement[];
551
551
  pasteDoc: (doc: DocObject) => Promise<void>;
@@ -10,6 +10,7 @@
10
10
  "@types/lodash.debounce": "^4.0.7",
11
11
  "@types/lodash.merge": "^4.6.7",
12
12
  "@types/lodash.throttle": "^4.1.7",
13
+ "@types/lodash.uniqby": "^4.7.7",
13
14
  "sass": "^1.54.9"
14
15
  },
15
16
  "types": "src/index.d.ts"
@@ -48,6 +48,9 @@ export declare class TableGrid {
48
48
  map<T>(fn: (cell: TableCell) => T): T[][];
49
49
  getBottomCell(cellData: TableCell): TableCell | null;
50
50
  getTopCell(cellData: TableCell): TableCell | null;
51
+ getLeftCell(cellData: TableCell): TableCell | null;
52
+ getRightCell(cellData: TableCell): TableCell | null;
53
+ get uniqueCells(): TableCell[];
51
54
  get cells(): TableCell[];
52
55
  getVirtualCellContainersGrid(): string[][];
53
56
  static virtualCellContainersGridToChildren(virtualCellContainersGrid: string[][]): string[];