@ones-editor/editor 0.0.3-beta.60 → 0.0.3-beta.62
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/comments/comments.d.ts +2 -2
- package/@ones-editor/comments/src/comments-list/comments-list.d.ts +2 -2
- package/@ones-editor/comments/src/comments-list/mini-comment/mini-comments-list.d.ts +1 -1
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +2 -2
- package/@ones-editor/comments/src/types.d.ts +4 -3
- package/@ones-editor/core/src/core/editor/editor-dom/dom-events.d.ts +1 -1
- package/@ones-editor/core/src/utils/dom.d.ts +1 -0
- package/@ones-editor/drawio-embed/src/helper/index.d.ts +3 -3
- package/@ones-editor/drawio-embed/types/index.d.ts +2 -2
- package/@ones-editor/exclusive-block/package.json +6 -0
- package/@ones-editor/exclusive-block/src/exclusive-block-hook.d.ts +6 -0
- package/@ones-editor/exclusive-block/src/exclusive-block.d.ts +22 -0
- package/@ones-editor/exclusive-block/src/exclusive-dom.d.ts +5 -0
- package/@ones-editor/exclusive-block/src/handle-remote-exclusive-message.d.ts +3 -0
- package/@ones-editor/exclusive-block/src/index.d.ts +5 -0
- package/@ones-editor/exclusive-block/src/types.d.ts +7 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +1 -0
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +145 -145
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
-
import { OnesEditorCommentsProvider } from '../types';
|
|
2
|
+
import { CommentRoot, OnesEditorCommentsProvider } from '../types';
|
|
3
3
|
export default class OnesEditorComments {
|
|
4
4
|
private editor;
|
|
5
5
|
private provider;
|
|
@@ -10,10 +10,10 @@ export default class OnesEditorComments {
|
|
|
10
10
|
private get commentOptions();
|
|
11
11
|
get commentProvider(): OnesEditorCommentsProvider;
|
|
12
12
|
get isMobile(): boolean;
|
|
13
|
-
private getCommentRoot;
|
|
14
13
|
destroy(): void;
|
|
15
14
|
private showComment;
|
|
16
15
|
showCommentList: (groupId?: string) => void;
|
|
16
|
+
mount(containers: CommentRoot): void;
|
|
17
17
|
private handleCommentListClose;
|
|
18
18
|
private handleOnSelectComment;
|
|
19
19
|
private handleMiniCommentItemClick;
|
|
@@ -8,10 +8,10 @@ interface CommentsListEvents {
|
|
|
8
8
|
export default class CommentsList extends TypedEmitter<CommentsListEvents> implements OnesEditorCommentsEvents {
|
|
9
9
|
private editor;
|
|
10
10
|
private commentsProvider;
|
|
11
|
-
|
|
11
|
+
root: HTMLElement;
|
|
12
12
|
private groupsContainer;
|
|
13
13
|
private list;
|
|
14
|
-
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider
|
|
14
|
+
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider);
|
|
15
15
|
private get commentOptions();
|
|
16
16
|
destroy(): void;
|
|
17
17
|
onCreateComment(commentId: string, local: boolean): void;
|
|
@@ -11,7 +11,7 @@ export declare class MiniCommentsList extends TypedEmitter<MiniCommentsListEvent
|
|
|
11
11
|
private commentsProvider;
|
|
12
12
|
list: MiniGroupList;
|
|
13
13
|
root: HTMLElement;
|
|
14
|
-
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider
|
|
14
|
+
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider);
|
|
15
15
|
onCreateComment(commentId: string, local: boolean): void;
|
|
16
16
|
onDeleteComment(commentId: string, local: boolean): void;
|
|
17
17
|
onUpdateComment(commentId: string, local: boolean): void;
|
package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ interface MobileCommentsListEvents {
|
|
|
7
7
|
export declare class MobileCommentsList extends TypedEmitter<MobileCommentsListEvents> implements OnesEditorCommentsEvents {
|
|
8
8
|
private editor;
|
|
9
9
|
private commentsProvider;
|
|
10
|
-
|
|
10
|
+
root: HTMLDivElement;
|
|
11
11
|
private list;
|
|
12
12
|
private mask;
|
|
13
13
|
private pullInfoContainer;
|
|
14
|
-
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider
|
|
14
|
+
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider);
|
|
15
15
|
onCreateComment(commentId: string, local: boolean): void;
|
|
16
16
|
onDeleteComment(commentId: string, local: boolean): void;
|
|
17
17
|
onUpdateComment(commentId: string, local: boolean): void;
|
|
@@ -5,12 +5,13 @@ export type CommentData = {
|
|
|
5
5
|
export interface OnesEditorCommentController {
|
|
6
6
|
showCommentList: () => void;
|
|
7
7
|
}
|
|
8
|
-
export type
|
|
9
|
-
export interface OnesEditorCommentOptions {
|
|
10
|
-
controller: OnesEditorCommentController;
|
|
8
|
+
export type CommentRoot = {
|
|
11
9
|
container?: HTMLElement;
|
|
12
10
|
miniContainer?: HTMLElement;
|
|
13
11
|
mobileContainer?: HTMLElement;
|
|
12
|
+
};
|
|
13
|
+
export interface OnesEditorCommentOptions {
|
|
14
|
+
controller: OnesEditorCommentController;
|
|
14
15
|
disableReply?: boolean;
|
|
15
16
|
disableEdit?: boolean;
|
|
16
17
|
pullThreshold?: number;
|
|
@@ -12,7 +12,7 @@ declare class DomEventHandler {
|
|
|
12
12
|
}
|
|
13
13
|
export declare class EditorDomEvents {
|
|
14
14
|
private editor;
|
|
15
|
-
handlers: Map<
|
|
15
|
+
handlers: Map<Element | Document | Window, DomEventHandler[]>;
|
|
16
16
|
constructor(editor: OnesEditor);
|
|
17
17
|
destroy(): void;
|
|
18
18
|
addEventListener<T = Event>(element: Element | Document | Window, eventName: string, eventHandler: DomEventCallback<T>, data?: unknown): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OnesEditor,
|
|
1
|
+
import type { OnesEditor, BlockElement } from '../../../../@ones-editor/core';
|
|
2
2
|
import { type EmbedElement, DrawIoData, GraphDataType, XmlData, XmlSvgData, SrcData, DrawIoOptions } from '../../types';
|
|
3
3
|
import '../../types/window.d';
|
|
4
4
|
export declare function getDrawioOptions(editor: OnesEditor): DrawIoOptions;
|
|
@@ -11,8 +11,8 @@ export declare function initializeDrawioIframe(editor: OnesEditor): Promise<{
|
|
|
11
11
|
drawioIframe: HTMLIFrameElement;
|
|
12
12
|
exit: () => void;
|
|
13
13
|
}>;
|
|
14
|
-
export declare function contactWithIframe(editor: OnesEditor, block:
|
|
15
|
-
export declare function editGraph(editor: OnesEditor, block:
|
|
14
|
+
export declare function contactWithIframe(editor: OnesEditor, block: BlockElement, drawIoData: DrawIoData, iframe: HTMLIFrameElement, loaded: () => void, exit: () => void, isInitializationCompleted: boolean): void;
|
|
15
|
+
export declare function editGraph(editor: OnesEditor, block: BlockElement, data: DrawIoData, isInitializationCompleted: boolean): Promise<void>;
|
|
16
16
|
export declare function initDrawIo(editor: OnesEditor): Promise<void>;
|
|
17
17
|
export declare function removeDrawioEmptyStatus(el: HTMLElement): void;
|
|
18
18
|
export declare function addDrawioEmptyStatus(el: HTMLElement): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OnesEditor,
|
|
1
|
+
import { type OnesEditor, BlockElement } from '@ones-editor/core';
|
|
2
2
|
export type WithNull<T> = T | null;
|
|
3
3
|
export type EmbedElement = HTMLElement & {
|
|
4
4
|
__neverUse: 'EmbedElement';
|
|
@@ -34,6 +34,6 @@ export interface DrawIoOptions {
|
|
|
34
34
|
onError?: (editor: OnesEditor, error: Error) => void;
|
|
35
35
|
onCreateDrawIoFrame?: (editor: OnesEditor) => Promise<HTMLIFrameElement>;
|
|
36
36
|
onCloseDrawIoFrame?: (editor: OnesEditor, iframe: HTMLIFrameElement) => boolean;
|
|
37
|
-
onBeginInitDrawIo?: (editor: OnesEditor, block:
|
|
37
|
+
onBeginInitDrawIo?: (editor: OnesEditor, block: BlockElement) => void;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BlockElement, BlockPath, ContainerElement, DocBlock, OnesEditor, OnesEditorBlockHook } from '../../../@ones-editor/core';
|
|
2
|
+
export default class BlockExclusiveHook implements OnesEditorBlockHook {
|
|
3
|
+
writable(editor: OnesEditor, blockElement: BlockElement): boolean | undefined;
|
|
4
|
+
create(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock): void;
|
|
5
|
+
update(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor, OnesEditorCustom, OnesEditorDocCallbacks } from '../../../@ones-editor/core';
|
|
2
|
+
import { ExclusiveBlockMessage } from './types';
|
|
3
|
+
export declare class OnesEditorExclusiveBlock implements OnesEditorCustom, OnesEditorDocCallbacks {
|
|
4
|
+
private editor;
|
|
5
|
+
exclusiveBlockIds: Set<string>;
|
|
6
|
+
exclusiveBlockTimer: number;
|
|
7
|
+
remoteExclusiveBlockIds: Map<string, ExclusiveBlockMessage>;
|
|
8
|
+
constructor(editor: OnesEditor);
|
|
9
|
+
destroy(): void;
|
|
10
|
+
onCustomMessage(msg: unknown): void;
|
|
11
|
+
handleUserChanged: () => void;
|
|
12
|
+
getExclusiveMessage(blockId: string): ExclusiveBlockMessage | undefined;
|
|
13
|
+
broadcastExclusiveBlockMessage(blocks: BlockElement[], exclusive: boolean): void;
|
|
14
|
+
exclusiveBlock(block: BlockElement): void;
|
|
15
|
+
unexclusiveBlock(block: BlockElement): void;
|
|
16
|
+
startExclusiveBlockTimer(): void;
|
|
17
|
+
stopExclusiveBlockTimer(): void;
|
|
18
|
+
static get(editor: OnesEditor): OnesEditorExclusiveBlock;
|
|
19
|
+
static register(editor: OnesEditor): OnesEditorExclusiveBlock;
|
|
20
|
+
}
|
|
21
|
+
export declare function exclusiveBlock(editor: OnesEditor, block: BlockElement): void;
|
|
22
|
+
export declare function unexclusiveBlock(editor: OnesEditor, block: BlockElement): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
export declare function addExclusiveStyle(block: BlockElement, userId: string, displayName: string): void;
|
|
3
|
+
export declare function removeExclusiveStyle(block: BlockElement): void;
|
|
4
|
+
export declare function updateBlockExclusive(editor: OnesEditor, block: BlockElement, exclusive: boolean, userId: string, displayName: string): void;
|
|
5
|
+
export declare function isExclusiveBlock(block: BlockElement): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OnesEditorExclusiveBlock } from './exclusive-block';
|
|
2
|
+
import BlockExclusiveHook from './exclusive-block-hook';
|
|
3
|
+
import './exclusive-block-styles.scss';
|
|
4
|
+
export { exclusiveBlock, unexclusiveBlock } from './exclusive-block';
|
|
5
|
+
export { BlockExclusiveHook, OnesEditorExclusiveBlock };
|