@ones-editor/editor 2.8.37-beta.3 → 2.8.37-beta.31

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.
Files changed (31) hide show
  1. package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -0
  2. package/@ones-editor/core/src/core/selection/range/simple-range.d.ts +2 -2
  3. package/@ones-editor/core/src/core/types.d.ts +2 -0
  4. package/@ones-editor/html-to-doc/src/html-to-doc/office-html-to-doc/helper/elem.d.ts +1 -0
  5. package/@ones-editor/main-toolbar/src/index.d.ts +1 -0
  6. package/@ones-editor/main-toolbar/src/items/comment.d.ts +1 -0
  7. package/@ones-editor/main-toolbar/src/items/file.d.ts +8 -0
  8. package/@ones-editor/main-toolbar/src/items/index.d.ts +4 -2
  9. package/@ones-editor/main-toolbar/src/items/insert.d.ts +2 -1
  10. package/@ones-editor/main-toolbar/src/items/mention.d.ts +8 -0
  11. package/@ones-editor/main-toolbar/src/locale/en-us.d.ts +3 -0
  12. package/@ones-editor/main-toolbar/src/locale/ja-jp.d.ts +3 -0
  13. package/@ones-editor/main-toolbar/src/locale/zh-cn.d.ts +3 -0
  14. package/@ones-editor/main-toolbar/src/locale/zh-hant-hk.d.ts +3 -0
  15. package/@ones-editor/main-toolbar/src/types.d.ts +2 -1
  16. package/@ones-editor/scroll-container/src/scroll-bar-handle.d.ts +1 -4
  17. package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +1 -0
  18. package/@ones-editor/sharedb-doc/src/doc/edit-status.d.ts +1 -1
  19. package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +1 -0
  20. package/@ones-editor/to-docx/src/index.d.ts +1 -0
  21. package/@ones-editor/to-docx/src/locale/en-us.d.ts +7 -0
  22. package/@ones-editor/to-docx/src/locale/index.d.ts +1 -0
  23. package/@ones-editor/to-docx/src/locale/ja-jp.d.ts +7 -0
  24. package/@ones-editor/to-docx/src/locale/zh-cn.d.ts +7 -0
  25. package/@ones-editor/to-docx/src/locale/zh-hant-hk.d.ts +7 -0
  26. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  27. package/@ones-editor/ui-base/src/icons/index.d.ts +3 -1
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +643 -381
  30. package/dist/types.d.ts +1 -0
  31. package/package.json +1 -1
@@ -28,6 +28,7 @@ export declare class EditorInput implements OnesEditorInput {
28
28
  composingTimer: NodeJS.Timeout | undefined;
29
29
  callbacks: EditorInputCallbacks;
30
30
  inputElement: HTMLTextAreaElement;
31
+ private focused;
31
32
  constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
32
33
  private isInCommandBar;
33
34
  destroy(): void;
@@ -1,5 +1,5 @@
1
1
  import { OnesEditorDocRange } from '../../doc';
2
- import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange } from '../../types';
2
+ import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange, SimpleBlockPosition } from '../../types';
3
3
  import { EditorSimpleBlockPosition } from '../editor-position';
4
4
  interface SimpleRangeOptions {
5
5
  anchor: EditorSimpleBlockPosition;
@@ -13,7 +13,7 @@ export default class EditorSimpleSelectionRange implements SelectionRange {
13
13
  constructor(editor: OnesEditor, options: SimpleRangeOptions);
14
14
  isCollapsed(): boolean;
15
15
  isEqual(other: SelectionRange): boolean;
16
- isSimple(): boolean;
16
+ isSimple(): this is SimpleBlockPosition;
17
17
  isReverse(): boolean;
18
18
  getEditor(): OnesEditor;
19
19
  get start(): EditorSimpleBlockPosition;
@@ -586,6 +586,8 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
586
586
  getParentContainer: (block: BlockElement) => ContainerElement;
587
587
  reloadBlock: (block: BlockElement) => void;
588
588
  contains: (node: Node) => boolean;
589
+ scrollable: () => boolean;
590
+ setScrollable: (scrollable: boolean) => void;
589
591
  getSelectedText: () => string;
590
592
  clearSelectedContents: () => void;
591
593
  insertBlock: (containerId: string, blockIndex: number, blockData: DocBlock, newRange?: OnesEditorDocRange, options?: InsertBlockOptions) => BlockElement;
@@ -2,3 +2,4 @@ export declare function isOfficeHtml(html: string): boolean;
2
2
  export declare function isInlineElem(elem: Element): boolean;
3
3
  export declare function isTextBlockElem(elem: Element): boolean;
4
4
  export declare function replaceCrLf(text: string): string;
5
+ export declare function replaceCrLfWithSpace(text: string): string;
@@ -14,6 +14,7 @@ export declare class MainToolbar implements OnesEditorCustom {
14
14
  private options;
15
15
  toolbar: FixedToolbar;
16
16
  toolbarFullScreen?: FixedToolbar;
17
+ root: HTMLElement;
17
18
  constructor(editor: OnesEditor, parent: HTMLElement, options?: MainToolbarOptions);
18
19
  destroy(): void;
19
20
  setItems(items: ToolbarItem[]): void;
@@ -4,5 +4,6 @@ export declare class CommentItem implements ToolbarItem {
4
4
  id: string;
5
5
  name: string;
6
6
  icon: string;
7
+ adding: boolean;
7
8
  onClick(editor: OnesEditor, item: ToolbarItem): void;
8
9
  }
@@ -0,0 +1,8 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class InsertFileItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ onClick(editor: OnesEditor, item: ToolbarItem): Promise<void>;
8
+ }
@@ -13,5 +13,7 @@ import { FindReplaceItem } from './find';
13
13
  import { CommentItem } from './comment';
14
14
  import { ColorItem } from './text-color';
15
15
  import { MoreItem } from './more-item';
16
- export declare function getToolbarDefaultItems(editor: OnesEditor): (FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | InlineCodeItem | SuperscriptItem | SubscriptItem | InsertLinkItem | OrderedListItem | UnorderedListItem | CheckListItem | ParagraphItem | QuoteItem | SeparatorItem | AlignLeftItem | AlignCenterItem | AlignRightItem | UndoItem | RedoItem | InsertItem | FindReplaceItem | CommentItem | ColorItem | MoreItem)[];
17
- export { UndoItem, RedoItem, FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, ColorItem, InlineCodeItem, SuperscriptItem, SubscriptItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertLinkItem, QuoteItem, InsertItem, FindReplaceItem, CommentItem, MoreItem, };
16
+ import { InsertFileItem } from './file';
17
+ import { InsertMentionItem } from './mention';
18
+ export declare function getToolbarDefaultItems(editor: OnesEditor): (FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | InlineCodeItem | SuperscriptItem | SubscriptItem | InsertLinkItem | OrderedListItem | UnorderedListItem | CheckListItem | ParagraphItem | QuoteItem | SeparatorItem | AlignLeftItem | AlignCenterItem | AlignRightItem | UndoItem | RedoItem | InsertItem | FindReplaceItem | ColorItem)[];
19
+ export { UndoItem, RedoItem, FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, ColorItem, InlineCodeItem, SuperscriptItem, SubscriptItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertFileItem, InsertLinkItem, QuoteItem, InsertItem, FindReplaceItem, CommentItem, MoreItem, InsertMentionItem, };
@@ -1,4 +1,5 @@
1
1
  import { CommandItem, CommandItemChildrenPlacement, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { AbstractCommandBar } from '../../../../@ones-editor/ui-base';
2
3
  import { ToolbarItem } from '../types';
3
4
  export declare class InsertItem implements ToolbarItem {
4
5
  name: string;
@@ -8,5 +9,5 @@ export declare class InsertItem implements ToolbarItem {
8
9
  childrenPlacement: CommandItemChildrenPlacement;
9
10
  children: CommandItem[];
10
11
  constructor(editor: OnesEditor);
11
- onClick(editor: OnesEditor, item: ToolbarItem): void;
12
+ onClick(editor: OnesEditor, item: ToolbarItem, commandBar: AbstractCommandBar): void;
12
13
  }
@@ -0,0 +1,8 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class InsertMentionItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
8
+ }
@@ -10,6 +10,9 @@ declare const _default: {
10
10
  checkList: string;
11
11
  orderedList: string;
12
12
  unorderedList: string;
13
+ fullscreen: string;
14
+ file: string;
15
+ mention: string;
13
16
  };
14
17
  };
15
18
  export default _default;
@@ -10,6 +10,9 @@ declare const _default: {
10
10
  checkList: string;
11
11
  orderedList: string;
12
12
  unorderedList: string;
13
+ fullscreen: string;
14
+ file: string;
15
+ mention: string;
13
16
  };
14
17
  };
15
18
  export default _default;
@@ -10,6 +10,9 @@ declare const _default: {
10
10
  checkList: string;
11
11
  orderedList: string;
12
12
  unorderedList: string;
13
+ fullscreen: string;
14
+ file: string;
15
+ mention: string;
13
16
  };
14
17
  };
15
18
  export default _default;
@@ -10,6 +10,9 @@ declare const _default: {
10
10
  checkList: string;
11
11
  orderedList: string;
12
12
  unorderedList: string;
13
+ fullscreen: string;
14
+ file: string;
15
+ mention: string;
13
16
  };
14
17
  };
15
18
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import { CommandItem, OnesEditor } from '../../../@ones-editor/core';
2
+ import { AbstractCommandBar } from '../../../@ones-editor/ui-base';
2
3
  export interface ToolbarItem extends CommandItem {
3
4
  updateState?: (editor: OnesEditor) => void;
4
- onClick?: (editor: OnesEditor, item: ToolbarItem) => void;
5
+ onClick?: (editor: OnesEditor, item: ToolbarItem, commandBar: AbstractCommandBar) => void;
5
6
  }
@@ -1,7 +1,4 @@
1
- /// <reference types="lodash" />
2
1
  import { ScrollAreaElement, ScrollContainerElement, ScrollCore } from './common-types';
3
2
  export declare function getScrollbarContainer(scrollContainer: ScrollContainerElement): HTMLDivElement;
4
- declare function resetScrollbarCore(scrollCore: ScrollCore, scrollWrap: ScrollAreaElement): void;
5
- export declare const resetScrollbar: import("lodash").DebouncedFunc<typeof resetScrollbarCore>;
3
+ export declare const resetScrollbar: (scrollCore: ScrollCore, scrollWrap: ScrollAreaElement) => void | undefined;
6
4
  export declare function calcScrollbarPos(scrollCore: ScrollCore, scrollContainer: ScrollContainerElement): void;
7
- export {};
@@ -15,6 +15,7 @@ export interface AutoConnectionEvents {
15
15
  writeConflictError: (error: Error) => void;
16
16
  maxUsersError: () => void;
17
17
  requestReloadError: (error: Error) => void;
18
+ opReceived: () => void;
18
19
  ready: () => void;
19
20
  }
20
21
  export declare class AuthConnection extends TypedEmitter<AutoConnectionEvents> {
@@ -8,6 +8,6 @@ export declare class EditStatus {
8
8
  private dirtyTimeout;
9
9
  private waitingForSave;
10
10
  constructor(options: EditStatusOptions);
11
- setStatus(status: 'clean' | 'dirty'): void;
11
+ setStatus(status: 'clean' | 'dirty' | 'busy'): void;
12
12
  destroy(): void;
13
13
  }
@@ -26,6 +26,7 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
26
26
  private handleReload;
27
27
  private handleReset;
28
28
  private handleWriteConflictError;
29
+ private handleOpReceived;
29
30
  private setStatus;
30
31
  initEvents(): void;
31
32
  clearEvents(): void;
@@ -1,3 +1,4 @@
1
+ import './locale';
1
2
  import { OnesEditor } from '../../../@ones-editor/core';
2
3
  import { ExportImageError } from './errors';
3
4
  import { EditorToDocxOptions } from './types';
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ toDocx: {
3
+ videoUnsupportedExport: string;
4
+ audioUnsupportedExport: string;
5
+ };
6
+ };
7
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ toDocx: {
3
+ videoUnsupportedExport: string;
4
+ audioUnsupportedExport: string;
5
+ };
6
+ };
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ toDocx: {
3
+ videoUnsupportedExport: string;
4
+ audioUnsupportedExport: string;
5
+ };
6
+ };
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ toDocx: {
3
+ videoUnsupportedExport: string;
4
+ audioUnsupportedExport: string;
5
+ };
6
+ };
7
+ export default _default;