@ones-editor/editor 0.0.7-beta.9 → 0.0.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.
- package/@ones-editor/code-block/src/code-block/languages.d.ts +8 -8
- package/@ones-editor/comments/src/comments/comments.d.ts +2 -0
- package/@ones-editor/comments/src/comments-list/comments-list.d.ts +2 -0
- package/@ones-editor/comments/src/comments-list/group-item.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/group-list.d.ts +5 -0
- package/@ones-editor/comments/src/comments-list/handler.d.ts +1 -1
- package/@ones-editor/comments/src/comments-list/list-base.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +1 -0
- package/@ones-editor/core/package.json +2 -1
- package/@ones-editor/core/src/core/block-renderers/block-renderers.d.ts +1 -0
- package/@ones-editor/core/src/core/block-renderers/standard-block-render.d.ts +1 -0
- package/@ones-editor/core/src/core/blocks/common/block-dom.d.ts +2 -1
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +2 -0
- package/@ones-editor/core/src/core/composition/index.d.ts +1 -0
- package/@ones-editor/core/src/core/containers/root-container.d.ts +1 -3
- package/@ones-editor/core/src/core/doc/doc.d.ts +2 -1
- package/@ones-editor/core/src/core/doc/index.d.ts +1 -0
- package/@ones-editor/core/src/core/editor/actions/replace-container.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/editor-dom/editor-dom.d.ts +1 -1
- package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +1 -0
- package/@ones-editor/core/src/core/selection/range-from-point.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +3 -0
- package/@ones-editor/core/src/utils/abbreviation.d.ts +1 -1
- package/@ones-editor/core/src/utils/dom.d.ts +4 -0
- package/@ones-editor/drop-target/src/drop-indicator.d.ts +1 -0
- package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +1 -1
- package/@ones-editor/graph-embed/types/index.d.ts +2 -2
- package/@ones-editor/image-embed/src/utils.d.ts +1 -0
- package/@ones-editor/input-handlers/src/enforce-with-document-title/enforce-with-document-title-handler.d.ts +1 -0
- package/@ones-editor/media-embed/src/locale/en-us.d.ts +1 -0
- package/@ones-editor/media-embed/src/locale/ja-jp.d.ts +1 -0
- package/@ones-editor/media-embed/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/paste-special/src/paste-special-button.d.ts +1 -0
- package/@ones-editor/paste-special/src/paste-special-handler.d.ts +2 -1
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +1 -0
- package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +1 -0
- package/@ones-editor/table-block/src/table-block/paste/paste-table-in-table.d.ts +2 -2
- package/@ones-editor/to-docx/src/doc2other/image.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +3 -1
- package/@ones-editor/ui/src/tooltips/index.d.ts +2 -0
- package/@ones-editor/ui-base/src/icons/index.d.ts +15 -5
- package/@ones-editor/ui-base/src/index.d.ts +2 -1
- package/@ones-editor/ui-base/src/list/filterable-list.d.ts +1 -0
- package/@ones-editor/versions/src/history-render/index.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +73625 -650
- package/dist/types.d.ts +3 -1
- package/package.json +3 -1
|
@@ -68,10 +68,6 @@ import 'prismjs/components/prism-visual-basic';
|
|
|
68
68
|
import 'prismjs/components/prism-wasm';
|
|
69
69
|
import 'prismjs/components/prism-yaml';
|
|
70
70
|
declare const SUPPORTED_LANGUAGES: {
|
|
71
|
-
plain: {
|
|
72
|
-
name: string;
|
|
73
|
-
aliases: string[];
|
|
74
|
-
};
|
|
75
71
|
abap: {
|
|
76
72
|
name: string;
|
|
77
73
|
aliases: string[];
|
|
@@ -172,6 +168,10 @@ declare const SUPPORTED_LANGUAGES: {
|
|
|
172
168
|
name: string;
|
|
173
169
|
aliases: string[];
|
|
174
170
|
};
|
|
171
|
+
markup: {
|
|
172
|
+
name: string;
|
|
173
|
+
aliases: string[];
|
|
174
|
+
};
|
|
175
175
|
java: {
|
|
176
176
|
name: string;
|
|
177
177
|
aliases: string[];
|
|
@@ -220,10 +220,6 @@ declare const SUPPORTED_LANGUAGES: {
|
|
|
220
220
|
name: string;
|
|
221
221
|
aliases: string[];
|
|
222
222
|
};
|
|
223
|
-
markup: {
|
|
224
|
-
name: string;
|
|
225
|
-
aliases: string[];
|
|
226
|
-
};
|
|
227
223
|
matlab: {
|
|
228
224
|
name: string;
|
|
229
225
|
aliases: string[];
|
|
@@ -256,6 +252,10 @@ declare const SUPPORTED_LANGUAGES: {
|
|
|
256
252
|
name: string;
|
|
257
253
|
aliases: string[];
|
|
258
254
|
};
|
|
255
|
+
plain: {
|
|
256
|
+
name: string;
|
|
257
|
+
aliases: string[];
|
|
258
|
+
};
|
|
259
259
|
powershell: {
|
|
260
260
|
name: string;
|
|
261
261
|
aliases: string[];
|
|
@@ -12,6 +12,8 @@ export default class OnesEditorComments {
|
|
|
12
12
|
destroy(): void;
|
|
13
13
|
private showComment;
|
|
14
14
|
showCommentList: (groupId?: string) => void;
|
|
15
|
+
setFirstEditingCommentActive(): void;
|
|
16
|
+
isEditing(): boolean;
|
|
15
17
|
mount(containers: CommentRoot): void;
|
|
16
18
|
private handleCommentListClose;
|
|
17
19
|
private handleOnSelectComment;
|
|
@@ -18,6 +18,8 @@ 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;
|
|
22
|
+
setFirstEditingCommentActive(): void;
|
|
21
23
|
handleSelectionOnComment: () => void;
|
|
22
24
|
updateCommentCount: () => void;
|
|
23
25
|
handleActiveItemChanged: (index: number, direction?: 'prev' | 'next') => void;
|
|
@@ -35,6 +35,7 @@ export declare class CommentGroupItem extends TypedEmitter<CommentGroupItemEvent
|
|
|
35
35
|
deleteMainComment(commentId: OnesEditorComment['id']): void;
|
|
36
36
|
handleReadonlyChanged: (editor: OnesEditor) => void;
|
|
37
37
|
edit(): void;
|
|
38
|
+
getCommentEditor: () => import("../comment-editor").CommentEditor;
|
|
38
39
|
destroy(): void;
|
|
39
40
|
private handleResize;
|
|
40
41
|
}
|
|
@@ -21,6 +21,10 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
|
|
|
21
21
|
insertItem(data: CommentWithChildren, options?: {
|
|
22
22
|
active: boolean;
|
|
23
23
|
}): CommentGroupItem | null;
|
|
24
|
+
private findFirstEditingComment;
|
|
25
|
+
isEditing(): boolean;
|
|
26
|
+
closeEditing: (groupId: string) => void;
|
|
27
|
+
setFirstEditingCommentActive: () => void;
|
|
24
28
|
setActiveItem(index: number, direction?: 'prev' | 'next'): void;
|
|
25
29
|
get activeIndex(): number;
|
|
26
30
|
get activeItem(): CommentGroupItem | null;
|
|
@@ -29,6 +33,7 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
|
|
|
29
33
|
handleDeleteComment(commentId: string): void;
|
|
30
34
|
handleUpdateComment(comment: OnesEditorComment): void;
|
|
31
35
|
handleContainerClick: (event: MouseEvent) => void;
|
|
36
|
+
handleDocumentClick: (event: MouseEvent) => void;
|
|
32
37
|
handleSelectionChanged: () => void;
|
|
33
38
|
handleEditorResize: () => void;
|
|
34
39
|
handleDocChanged: () => void;
|
|
@@ -14,7 +14,7 @@ export declare class CommentGroupItemHandlers {
|
|
|
14
14
|
private handleCommentItemReply;
|
|
15
15
|
private handleCommentItemMore;
|
|
16
16
|
private handleCommentItemOk;
|
|
17
|
-
|
|
17
|
+
handleCommentItemCancel: (groupItem: CommentGroupItem, commentId: string | null) => void;
|
|
18
18
|
handleCommentItemEdit: (commentItem: CommentItem) => void;
|
|
19
19
|
handleCommentItemDelete: (commentItem: CommentItem) => void;
|
|
20
20
|
execute: (element: HTMLElement, groupItem: CommentGroupItem, commentId: string | null, itemIndex: number) => void;
|
|
@@ -15,6 +15,7 @@ export default abstract class ListBase<TData, TItem extends ItemBase, ListOption
|
|
|
15
15
|
deleteItem(commentId: string): boolean;
|
|
16
16
|
findItemIndex(commentId: string): number;
|
|
17
17
|
findItem(commentId: string): TItem | null;
|
|
18
|
+
findItemAsGroupId(commentId: string): TItem | null;
|
|
18
19
|
destroy(): void;
|
|
19
20
|
protected abstract createItem(data: TData, reason: 'init' | 'insert'): TItem;
|
|
20
21
|
protected abstract findInsertPos(data: TData): number;
|
package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare class MobileCommentsList extends TypedEmitter<MobileCommentsListE
|
|
|
23
23
|
private hidePullInfo;
|
|
24
24
|
private handleReachBottom;
|
|
25
25
|
private handleReachTop;
|
|
26
|
+
isEditing(): boolean;
|
|
26
27
|
show: (groupId?: string) => void;
|
|
27
28
|
hide: () => void;
|
|
28
29
|
destroy(): void;
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"@types/lodash.intersection": "^4.4.0",
|
|
12
12
|
"@types/lodash.isequal": "^4.5.5",
|
|
13
13
|
"@types/lodash.merge": "^4.6.7",
|
|
14
|
-
"@types/string-template": "^1.0.0"
|
|
14
|
+
"@types/string-template": "^1.0.0",
|
|
15
|
+
"@types/lodash-es": "4.17.7"
|
|
15
16
|
},
|
|
16
17
|
"types": "src/index.d.ts"
|
|
17
18
|
}
|
|
@@ -5,6 +5,7 @@ export declare class EditorBlockRenderers implements OnesEditorBlockRenderers {
|
|
|
5
5
|
private renders;
|
|
6
6
|
constructor(editor: OnesEditor);
|
|
7
7
|
registerRender(render: OnesEditorBlockRenderer): void;
|
|
8
|
+
renderBox(path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
8
9
|
renderText(path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
9
10
|
renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
|
|
10
11
|
updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
|
|
@@ -7,4 +7,5 @@ export declare class StandardBlockRenderer implements OnesEditorBlockRenderer {
|
|
|
7
7
|
renderText(editor: OnesEditor, path: BlockPath, attributes: AttributeMap): OnesEditorBlockRenderResult;
|
|
8
8
|
renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
|
|
9
9
|
updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
|
|
10
|
+
generateCSSCustomProperties(attributes: AttributeMap): OnesEditorBlockRenderResult;
|
|
10
11
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import AttributeMap from 'quill-delta/dist/AttributeMap';
|
|
1
2
|
import { DocBlock, DocBox } from '../../doc';
|
|
2
3
|
import { BlockBackgroundElement, BlockContentElement, BlockElement, BlockPath, BlockToolsElement, BoxContentElement, BoxElement, ContainerElement, InsertionContentElement, InsertionElement, OnesEditor } from '../../types';
|
|
3
4
|
export declare function isBlock(node: Node): node is BlockElement;
|
|
@@ -23,7 +24,7 @@ export declare function getBoxId(box: BoxElement): string;
|
|
|
23
24
|
export declare function getParentBox(node: Node): BoxElement | null;
|
|
24
25
|
export declare function createBoxContentElement(boxElement: BoxElement): BoxContentElement;
|
|
25
26
|
export declare function getBoxContent(box: BoxElement): BoxContentElement;
|
|
26
|
-
export declare function createInsertionElement(type: string, id: string): InsertionElement;
|
|
27
|
+
export declare function createInsertionElement(type: string, id: string, attributes?: AttributeMap): InsertionElement;
|
|
27
28
|
export declare function findInsertionById(editor: OnesEditor, id: string): InsertionElement | null;
|
|
28
29
|
export declare function createInsertionContentElement(insertionElement: InsertionElement): InsertionContentElement;
|
|
29
30
|
export declare function getInsertionContent(insertion: InsertionElement): InsertionContentElement;
|
|
@@ -19,6 +19,7 @@ export interface EditorInputCallbacks {
|
|
|
19
19
|
defaultHandleKeydown: (editor: OnesEditor, event: KeyboardEvent) => boolean;
|
|
20
20
|
destroy: () => void;
|
|
21
21
|
pasteDoc: (doc: DocObject) => Promise<void>;
|
|
22
|
+
forEach: (callback: (handler: OnesEditorInputHandler) => void) => void;
|
|
22
23
|
}
|
|
23
24
|
export declare class EditorInput implements OnesEditorInput {
|
|
24
25
|
editor: OnesEditor;
|
|
@@ -47,4 +48,5 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
47
48
|
removeHandler(handler: OnesEditorInputHandler): void;
|
|
48
49
|
defaultInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): void;
|
|
49
50
|
defaultHandleKeydown(editor: OnesEditor, event: KeyboardEvent): boolean;
|
|
51
|
+
forEach(callback: (handler: OnesEditorInputHandler) => void): void;
|
|
50
52
|
}
|
|
@@ -4,13 +4,11 @@ export declare class RootContainer {
|
|
|
4
4
|
private editor;
|
|
5
5
|
rootContainer: ContainerElement;
|
|
6
6
|
resizeObserver: ResizeObserver;
|
|
7
|
-
private isMouseDown;
|
|
8
|
-
private bindEvent;
|
|
9
7
|
constructor(editor: OnesEditor, rootContainer: ContainerElement);
|
|
10
8
|
private bindEvents;
|
|
11
9
|
private unbindEvents;
|
|
12
10
|
destroy(): void;
|
|
13
|
-
handleContextMenu: (event:
|
|
11
|
+
handleContextMenu: (event: MouseEvent) => void;
|
|
14
12
|
handleResize: () => void;
|
|
15
13
|
handleClick: (event: MouseEvent) => void;
|
|
16
14
|
handleBlockClick: (event: MouseEvent, block: BlockElement, elem: Element) => void;
|
|
@@ -46,7 +46,8 @@ export interface DocBox {
|
|
|
46
46
|
export interface DocInsertion {
|
|
47
47
|
id: string;
|
|
48
48
|
type: string;
|
|
49
|
-
[index: string]: string | boolean | number;
|
|
49
|
+
[index: string]: string | boolean | number | AttributeMap | undefined;
|
|
50
|
+
attributes?: AttributeMap;
|
|
50
51
|
}
|
|
51
52
|
export interface DocComment {
|
|
52
53
|
id: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DocObject } from '../../doc';
|
|
2
|
-
import { ContainerElement, OnesEditor } from '../../types';
|
|
3
|
-
export declare function editorReplaceContainer(editor: OnesEditor, container: ContainerElement, doc: DocObject): void;
|
|
2
|
+
import { CloneBlockResultInfo, ContainerElement, OnesEditor } from '../../types';
|
|
3
|
+
export declare function editorReplaceContainer(editor: OnesEditor, container: ContainerElement, doc: DocObject, cloneDocResult: CloneBlockResultInfo): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnesEditor, SimpleBlockPosition, ContainerElement } from '../../types';
|
|
2
2
|
export declare function editorGetClientHeight(editor: OnesEditor): number;
|
|
3
3
|
export declare function editorGetClientTop(editor: OnesEditor): number;
|
|
4
4
|
export declare function editorGetClientBottom(editor: OnesEditor): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SelectionRange, OnesEditor } from '../types';
|
|
2
2
|
import EditorSimpleSelectionRange from './range/simple-range';
|
|
3
|
-
export declare function getBlockRangeFromPoint(editor: OnesEditor,
|
|
3
|
+
export declare function getBlockRangeFromPoint(editor: OnesEditor, pointX: number, pointY: number): SelectionRange | null;
|
|
4
4
|
export declare function getBlockNearestRangeFromPoint(editor: OnesEditor, x: number, y: number): EditorSimpleSelectionRange | null;
|
|
@@ -334,11 +334,13 @@ export interface OnesEditorBlockRenderResult {
|
|
|
334
334
|
attributes?: Record<string, string>;
|
|
335
335
|
}
|
|
336
336
|
export interface OnesEditorBlockRenderer {
|
|
337
|
+
renderBox?: (editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
|
|
337
338
|
renderText?: (editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
|
|
338
339
|
renderBlock?: (editor: OnesEditor, path: BlockPath, blockData: DocBlock) => OnesEditorBlockRenderResult;
|
|
339
340
|
updateBlock?: (editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock) => void;
|
|
340
341
|
}
|
|
341
342
|
export interface OnesEditorBlockRenderers {
|
|
343
|
+
renderBox: (path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
|
|
342
344
|
renderText: (path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
|
|
343
345
|
renderBlock: (editor: OnesEditor, path: BlockPath, blockData: DocBlock) => OnesEditorBlockRenderResult;
|
|
344
346
|
updateBlock: (editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock) => void;
|
|
@@ -577,6 +579,7 @@ export interface OnesEditorInput {
|
|
|
577
579
|
handlePasteText: (text: string, options?: PasteOptions) => void;
|
|
578
580
|
addHandler: (handler: OnesEditorInputHandler) => void;
|
|
579
581
|
removeHandler: (handler: OnesEditorInputHandler) => void;
|
|
582
|
+
forEach: (cb: (handler: OnesEditorInputHandler) => void) => void;
|
|
580
583
|
defaultInsertText: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => void;
|
|
581
584
|
defaultHandleKeydown: (editor: OnesEditor, event: KeyboardEvent) => boolean;
|
|
582
585
|
}
|
|
@@ -12,7 +12,7 @@ export declare function hashCode(str: string): number;
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function abbreviation(name: string, maxLength?: number): string;
|
|
14
14
|
declare enum EColor {
|
|
15
|
-
blue = "#
|
|
15
|
+
blue = "#0064FF",
|
|
16
16
|
cyan = "#34AFDE",
|
|
17
17
|
teal = "#2CB2AE",
|
|
18
18
|
green = "#24B47E",
|
|
@@ -11,6 +11,10 @@ export declare function createExpandedRange(startNode: Node, startOffset: number
|
|
|
11
11
|
export declare function getFirstClientRect(elem: Element): DOMRect;
|
|
12
12
|
export declare function getLastClientRect(elem: Element): DOMRect;
|
|
13
13
|
export declare function getDistanceSquare(rect: DOMRect, x: number, y: number): number;
|
|
14
|
+
export declare function getOffsetFromPoint(x: number, y: number): {
|
|
15
|
+
textNode: any;
|
|
16
|
+
offset: number;
|
|
17
|
+
};
|
|
14
18
|
export declare function textNodeOffsetFromPoint(node: Text, x: number, y: number): number;
|
|
15
19
|
export declare function compareElement(elem1: Element, elem2: Element): number;
|
|
16
20
|
export declare function getHorizontalPadding(elem: Element): number;
|
|
@@ -19,7 +19,7 @@ export default abstract class GraphBase {
|
|
|
19
19
|
createEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
|
|
20
20
|
updateEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
|
|
21
21
|
protected updateImage(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, err: Error | null): Promise<void>;
|
|
22
|
-
protected errorBoundary(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, reason: 'imageLoadError' | 'grammarError'): void;
|
|
22
|
+
protected errorBoundary(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, reason: 'imageLoadError' | 'grammarError', error?: Error): void;
|
|
23
23
|
protected emptyContent(): void;
|
|
24
24
|
protected updateSpecialClasses(embed: HTMLDivElement, code: string | undefined, err: Error | null): void;
|
|
25
25
|
editGraph(content: BlockContentElement): void;
|
|
@@ -5,12 +5,12 @@ export type MermaidEmbedOptions = {
|
|
|
5
5
|
};
|
|
6
6
|
export type FlowCharEmbedOptions = {
|
|
7
7
|
cdn?: {
|
|
8
|
-
flowchart
|
|
8
|
+
flowchart?: string[];
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
export type PlantumlEmbedOptions = {
|
|
12
12
|
cdn?: {
|
|
13
|
-
plantuml
|
|
13
|
+
plantuml?: string;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export type LANG = Record<string, string | Record<string, string>>;
|
|
@@ -10,6 +10,7 @@ declare class EnforceWithDocumentTitleHandler implements OnesEditorInputHandler
|
|
|
10
10
|
handleRemoteChanged(editor: OnesEditor): void;
|
|
11
11
|
handleUpdateCompositionText(editor: OnesEditor): void;
|
|
12
12
|
handleSelectionChange: (editor: OnesEditor) => void;
|
|
13
|
+
private reload;
|
|
13
14
|
private applyPlaceholder;
|
|
14
15
|
private isDocumentTitleBlock;
|
|
15
16
|
}
|
|
@@ -11,6 +11,7 @@ export default class PasteSpecialButton {
|
|
|
11
11
|
private checkedId;
|
|
12
12
|
constructor(editor: OnesEditor, onPasteSpecial: OnPasteSpecial);
|
|
13
13
|
show(docs: OnesEditorDocs): void;
|
|
14
|
+
private cleaningDoc;
|
|
14
15
|
handlePasteSpecial: (bar: AbstractCommandBar, item: CommandItem) => void;
|
|
15
16
|
handleClose: () => void;
|
|
16
17
|
handleSelectionChange: () => void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, OnesEditorDocs, DocObject } from '../../../@ones-editor/core';
|
|
1
|
+
import { OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, OnesEditorDocs, DocObject, BlockPosition } from '../../../@ones-editor/core';
|
|
2
2
|
import PasteSpecialButton from './paste-special-button';
|
|
3
3
|
export default class PasteSpecialHandler implements OnesEditorInputHandler {
|
|
4
4
|
private editor;
|
|
5
5
|
button: PasteSpecialButton;
|
|
6
6
|
lastUndoAction: OnesEditorUndoAction | null;
|
|
7
|
+
lastPos: BlockPosition | null;
|
|
7
8
|
event: ClipboardEvent | null;
|
|
8
9
|
constructor(editor: OnesEditor);
|
|
9
10
|
destroy(): void;
|
|
@@ -31,6 +31,7 @@ export declare class AuthConnection {
|
|
|
31
31
|
handleMessage(message: object): void;
|
|
32
32
|
get(collectionName: string, documentID: string): Doc;
|
|
33
33
|
addEventListener(event: 'open' | 'close' | 'error', callback: (e: Event | Error) => void): void;
|
|
34
|
+
onAuthError(callback: (error: Error) => void): void;
|
|
34
35
|
onWriteConflictError(callback: (error: Error) => void): void;
|
|
35
36
|
onMaxUsersError(callback: () => void): void;
|
|
36
37
|
onRequestReloadError(callback: (error: Error) => void): void;
|
|
@@ -14,6 +14,7 @@ export default class ShareDBClient {
|
|
|
14
14
|
editorServer(): string;
|
|
15
15
|
close(logout: boolean): void;
|
|
16
16
|
on(event: 'open' | 'close' | 'error', callback: (event: Event | Error) => void): void;
|
|
17
|
+
onAuthError(callback: (error: Error) => void): void;
|
|
17
18
|
onWriteConflictError(callback: (error: Error) => void): void;
|
|
18
19
|
onMaxUsersError(callback: () => void): void;
|
|
19
20
|
onRequestReloadError(callback: (error: Error) => void): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockElement, DocObject, OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
|
-
export declare function pasteTableInTableBlock(editor: OnesEditor, doc: DocObject, tableBlock: BlockElement, destCell: HTMLTableCellElement): void;
|
|
1
|
+
import { BlockElement, DocObject, OnesEditor, CloneBlockResultInfo } from '../../../../../@ones-editor/core';
|
|
2
|
+
export declare function pasteTableInTableBlock(editor: OnesEditor, doc: DocObject, tableBlock: BlockElement, destCell: HTMLTableCellElement, cloneDocResult: CloneBlockResultInfo): void;
|