@ones-editor/editor 1.1.18-beta.7 → 1.1.18-beta.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.
@@ -21,5 +21,4 @@ export declare class CommentQuickReply {
21
21
  cancel: () => void;
22
22
  hide: () => void;
23
23
  show: () => void;
24
- destroy(): void;
25
24
  }
@@ -13,7 +13,7 @@ export default class OnesEditorComments {
13
13
  private showComment;
14
14
  showCommentList: (groupId?: string) => void;
15
15
  setFirstEditingCommentActive(): void;
16
- isEditing(includeEmpty?: boolean): boolean;
16
+ isEditing(): 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(includeEmpty?: boolean): boolean;
21
+ isEditing(): 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(includeEmpty?: boolean): boolean;
27
+ isEditing(): 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 '../../types';
3
+ import { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '../..';
4
4
  import { MiniGroupList } from './group-list';
5
5
  interface MiniCommentsListEvents {
6
6
  onMiniCommentClose: () => void;
@@ -12,7 +12,6 @@ declare class OnesEditorContextMenu implements OnesEditorCustom {
12
12
  private isInEditor;
13
13
  private handleContextMenuShown;
14
14
  private handleContextMenuClick;
15
- private handleContextMenuClose;
16
15
  private handleImageEmbedAction;
17
16
  }
18
17
  export default OnesEditorContextMenu;
@@ -2,9 +2,8 @@ import { OnesEditor, BlockElement, BlockPosition, ContainerElement, ComplexBlock
2
2
  export declare function complexBlockGetAllChildContainers(editor: OnesEditor, block: BlockElement, options?: GetChildContainerOptions): ContainerElement[];
3
3
  export declare function complexBlockGetSelectedContainers(editor: OnesEditor, block: BlockElement, start: BlockPosition, end: BlockPosition): ContainerElement[];
4
4
  export declare function isFirstChildBlockInComplexBlock(editor: OnesEditor, childBlock: BlockElement): boolean;
5
- export declare function complexBlockGetFirstSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
5
+ export declare function complexBlockGeFirstSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
6
6
  export declare function complexBlockGetLastSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
7
- export declare function complexBlockGetDeepFirstChild(editor: OnesEditor, container: ContainerElement): BlockElement | null;
8
7
  export declare function findPrevSimpleBlockBeforeChildContainer(editor: OnesEditor, childContainer: ContainerElement, options?: GetChildContainerOptions): BlockElement | null;
9
8
  export declare function complexBlockGetTopChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
10
9
  export declare function complexBlockGetBottomChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
@@ -27,11 +27,9 @@ export declare class EditorInput implements OnesEditorInput {
27
27
  callbacks: EditorInputCallbacks;
28
28
  inputElement: HTMLInputElement;
29
29
  constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
30
- private isInCommandbar;
31
30
  destroy(): void;
32
31
  getInput(): HTMLInputElement;
33
32
  focus(): void;
34
- isInDisableScrollMask(target: HTMLElement): boolean;
35
33
  handleWindowBlur: () => void;
36
34
  handleDocumentClick: (event: MouseEvent) => void;
37
35
  handleDocumentSelectionChange: () => void;
@@ -34,7 +34,6 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
34
34
  onCustomMessage(msg: unknown): void;
35
35
  onStatusChanged(status: OnesEditorDocStatus): void;
36
36
  onError(error: Error): void;
37
- onAuthRecover(): void;
38
37
  uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
39
38
  addResources(resourceIds: string[]): Promise<string[]>;
40
39
  buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
@@ -1,4 +1,3 @@
1
- /// <reference types="lodash" />
2
1
  import { EditorInputCallbacks } from '../composition/editor-input';
3
2
  import { OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType, PasteOptions } from '../types';
4
3
  import { DocObject } from '../doc';
@@ -19,8 +18,7 @@ export declare class EditorInputHandlers implements EditorInputCallbacks {
19
18
  onPaste(event: ClipboardEvent): void;
20
19
  onPasteText: (text: string, options?: PasteOptions) => Promise<void>;
21
20
  onFocus(): void;
22
- onBlur: import("lodash").DebouncedFunc<() => void>;
23
- removeActiveForBlur: import("lodash").DebouncedFunc<() => void>;
21
+ onBlur(): void;
24
22
  addHandler(handler: OnesEditorInputHandler): void;
25
23
  removeHandler(handler: OnesEditorInputHandler): void;
26
24
  handleBeforeInsertText(containerId: string, blockIndex: number, offset: number, text: string): boolean;
@@ -399,7 +399,6 @@ export interface OnesEditorOptionalOptions {
399
399
  colors?: string[];
400
400
  scrollContainer?: HTMLElement;
401
401
  enableComments?: boolean;
402
- enableContextMenu?: boolean;
403
402
  settingsProvider?: OnesEditorSettingsProvider;
404
403
  }
405
404
  export interface OnesEditorOptions {
@@ -408,7 +407,6 @@ export interface OnesEditorOptions {
408
407
  [index: string]: unknown;
409
408
  };
410
409
  enableComments?: boolean;
411
- enableContextMenu?: boolean;
412
410
  scrollContainer?: HTMLElement;
413
411
  }
414
412
  export interface OnesEditorComponents {
@@ -34,7 +34,4 @@ export declare function findEventTargetBlock(event: Event): Element | null;
34
34
  export declare function isElementVisible(element: Element | null): boolean;
35
35
  export declare function getElementScale(element: Element): number;
36
36
  export declare function bindKeyDownEvent(input: HTMLInputElement | HTMLTextAreaElement, callback: (event: KeyboardEvent, composing: boolean) => void): () => void;
37
- export declare function getElementFromPoint(x: number, y: number, options?: {
38
- noFilter: boolean;
39
- }): Element;
40
37
  export {};
@@ -1,10 +1,9 @@
1
1
  interface SelectFileOptions {
2
2
  multiple?: boolean;
3
- container?: HTMLElement;
4
3
  }
5
4
  export declare function selectFile<T extends SelectFileOptions = SelectFileOptions>(accept: string, options?: T): Promise<T extends {
6
5
  multiple: true;
7
- } ? (File[] | null) : (File | null)>;
6
+ } ? File[] : File>;
8
7
  export declare function isDraggingFiles(v: unknown): v is File[];
9
8
  export declare function getFileExt(file: string): string;
10
9
  export declare function requestDownload(downloadUrl: string, fileName?: string): void;
@@ -14,7 +14,6 @@ export default class PasteSpecialButton {
14
14
  private cleaningDoc;
15
15
  handlePasteSpecial: (bar: AbstractCommandBar, item: CommandItem) => void;
16
16
  handleClose: () => void;
17
- handleSelectionChange: () => void;
18
17
  hide(): void;
19
18
  clearCheckedState(): void;
20
19
  destroy(): void;
@@ -27,7 +27,6 @@ export declare class AuthConnection {
27
27
  }>;
28
28
  logout(): Promise<void>;
29
29
  init(auth: AuthMessage): Promise<void>;
30
- reConnect(token: string): Promise<void>;
31
30
  handleAuthError(): Promise<void>;
32
31
  reAuth: () => Promise<void>;
33
32
  private emitPermissionError;