@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.
- package/@ones-editor/comments/src/comment-quick-reply/index.d.ts +0 -1
- package/@ones-editor/context-menu/src/menu/index.d.ts +0 -1
- package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +1 -2
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +0 -1
- package/@ones-editor/core/src/core/containers/container.d.ts +1 -1
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +0 -1
- package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +1 -3
- package/@ones-editor/core/src/core/types.d.ts +0 -2
- package/@ones-editor/core/src/utils/dom.d.ts +0 -3
- package/@ones-editor/core/src/utils/file.d.ts +1 -2
- package/@ones-editor/paste-special/src/paste-special-button.d.ts +0 -1
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +0 -1
- package/@ones-editor/table-block/package.json +1 -0
- package/@ones-editor/table-block/src/table-block/table-grid.d.ts +3 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +205 -205
- package/package.json +2 -1
|
@@ -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
|
|
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):
|
|
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
|
|
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
|
-
} ?
|
|
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;
|
|
@@ -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[];
|