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

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
  }
@@ -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,7 +27,6 @@ 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;
@@ -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;
@@ -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;
@@ -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[];