@ones-editor/editor 2.1.7-beta.7 → 2.1.7-beta.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/block-menu/src/block-menu-button/menu-button/index.d.ts +1 -1
- package/@ones-editor/block-menu/src/index.d.ts +0 -1
- package/@ones-editor/block-padding/src/index.d.ts +1 -1
- package/@ones-editor/callout-block/src/callout-block/callout-quick-menu-item-filter.d.ts +3 -4
- package/@ones-editor/callout-block/src/index.d.ts +1 -0
- package/@ones-editor/comments/src/index.d.ts +2 -1
- package/@ones-editor/comments/src/text-comments/comments-command-provider.d.ts +4 -3
- package/@ones-editor/core/src/core/blocks/common/execute-block-command.d.ts +2 -2
- package/@ones-editor/core/src/core/command-providers/abstract-providers.d.ts +25 -0
- package/@ones-editor/core/src/core/command-providers/block-attributes.d.ts +14 -0
- package/@ones-editor/core/src/core/command-providers/commands/index.d.ts +2 -0
- package/@ones-editor/core/src/core/command-providers/commands/inject-source.d.ts +3 -0
- package/@ones-editor/core/src/core/command-providers/commands/merge-commands.d.ts +4 -0
- package/@ones-editor/core/src/core/command-providers/commands/range-commands.d.ts +2 -5
- package/@ones-editor/core/src/core/command-providers/editor-command-providers.d.ts +5 -14
- package/@ones-editor/core/src/core/command-providers/index.d.ts +3 -1
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -1
- package/@ones-editor/core/src/core/containers/root-container.d.ts +2 -2
- package/@ones-editor/core/src/core/doc/rich-text/text-style.d.ts +2 -0
- package/@ones-editor/core/src/core/editor/actions/clear-selected-contents.d.ts +2 -2
- package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -1
- package/@ones-editor/core/src/core/selection/index.d.ts +1 -0
- package/@ones-editor/core/src/core/selection/select-handler.d.ts +3 -3
- package/@ones-editor/core/src/core/types.d.ts +27 -26
- package/@ones-editor/core/src/helper/hovering-block.d.ts +2 -2
- package/@ones-editor/core/src/utils/dom.d.ts +3 -0
- package/@ones-editor/core/src/utils/drag-drop.d.ts +8 -3
- package/@ones-editor/embed-block-helper/src/block-properties/embed-block-properties.d.ts +6 -5
- package/@ones-editor/file/src/locale/en-us.d.ts +1 -0
- package/@ones-editor/file/src/locale/ja-jp.d.ts +1 -0
- package/@ones-editor/file/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +5 -19
- package/@ones-editor/image-embed/src/hovering-toolbar/index.d.ts +12 -1
- package/@ones-editor/image-embed/src/splitter-resizer/index.d.ts +3 -3
- package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
- package/@ones-editor/layout-block/src/command-filter.d.ts +6 -0
- package/@ones-editor/layout-block/src/index.d.ts +1 -0
- package/@ones-editor/list-block/src/index.d.ts +2 -1
- package/@ones-editor/main-toolbar/src/items/font-style.d.ts +1 -1
- package/@ones-editor/main-toolbar/src/items/link.d.ts +1 -1
- package/@ones-editor/main-toolbar/src/items/list.d.ts +4 -4
- package/@ones-editor/main-toolbar/src/items/quote.d.ts +1 -1
- package/@ones-editor/main-toolbar/src/items/text-color.d.ts +37 -0
- package/@ones-editor/media-embed/src/core/hovering-toolbar/index.d.ts +12 -1
- package/@ones-editor/media-embed/src/utils/dom.d.ts +2 -0
- package/@ones-editor/mention/src/locale/en-us.d.ts +3 -0
- package/@ones-editor/mention/src/locale/ja-jp.d.ts +3 -0
- package/@ones-editor/mention/src/locale/zh-cn.d.ts +3 -0
- package/@ones-editor/mention/src/mention.d.ts +15 -0
- package/@ones-editor/mobile-helper/src/cursor-toolbar.d.ts +14 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/active-observer.d.ts +11 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/fixed-providers.d.ts +6 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/index.d.ts +21 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/align-dropdown.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/group.d.ts +7 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert-menu.d.ts +15 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert.d.ts +8 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/paragraph.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/tab-provider.d.ts +10 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/text-dropdown.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/turn-into.d.ts +8 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/toolbar-handler.d.ts +11 -0
- package/@ones-editor/mobile-helper/src/index.d.ts +10 -1
- package/@ones-editor/mobile-helper/src/locale/en-us.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/locale/index.d.ts +1 -0
- package/@ones-editor/mobile-helper/src/locale/ja-jp.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/locale/zh-cn.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/selection-gripper/index.d.ts +19 -0
- package/@ones-editor/mobile-helper/src/selection-gripper/select-handle.d.ts +3 -0
- package/@ones-editor/table-block/src/commands/index.d.ts +2 -0
- package/@ones-editor/table-block/src/commands/table-block-commands.d.ts +4 -3
- package/@ones-editor/table-block/src/commands/table-command-provider.d.ts +12 -0
- package/@ones-editor/table-block/src/index.d.ts +6 -2
- package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
- package/@ones-editor/table-block/src/locale/ja-jp.d.ts +5 -0
- package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
- package/@ones-editor/table-block/src/table-block/cell-menu/table-cell-dom.d.ts +6 -0
- package/@ones-editor/table-block/src/table-block/table-resize/resize-drag-drop.d.ts +4 -4
- package/@ones-editor/text-commands/src/index.d.ts +1 -2
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/block-menu/block-command-providers.d.ts +8 -0
- package/@ones-editor/{block-menu → ui}/src/block-menu/index.d.ts +3 -1
- package/@ones-editor/ui/src/box-helper/standard-box-commands.d.ts +10 -0
- package/@ones-editor/ui/src/box-helper/standard-box-provider.d.ts +9 -0
- package/@ones-editor/ui/src/index.d.ts +29 -8
- package/@ones-editor/ui/src/locale/en-us.d.ts +5 -0
- package/@ones-editor/ui/src/locale/ja-jp.d.ts +5 -0
- package/@ones-editor/ui/src/locale/zh-cn.d.ts +5 -0
- package/@ones-editor/ui/src/providers/align-dropdown.d.ts +10 -0
- package/@ones-editor/ui/src/providers/align.d.ts +11 -0
- package/@ones-editor/ui/src/providers/block-hook-provider.d.ts +16 -0
- package/@ones-editor/ui/src/providers/clipboard-provider.d.ts +19 -0
- package/@ones-editor/ui/src/providers/color-provider.d.ts +18 -0
- package/@ones-editor/ui/src/providers/edit-link-provider.d.ts +6 -0
- package/@ones-editor/ui/src/providers/heading.d.ts +13 -0
- package/@ones-editor/ui/src/providers/inline-code-provider.d.ts +10 -0
- package/@ones-editor/ui/src/providers/inline-style-provider.d.ts +10 -0
- package/@ones-editor/ui/src/providers/insert-above.d.ts +9 -0
- package/@ones-editor/ui/src/providers/insert-after.d.ts +9 -0
- package/@ones-editor/ui/src/providers/insert-box-provider.d.ts +12 -0
- package/@ones-editor/ui/src/providers/insert-group.d.ts +7 -0
- package/@ones-editor/ui/src/providers/insert-menu.d.ts +16 -0
- package/@ones-editor/ui/src/providers/link.d.ts +12 -0
- package/@ones-editor/ui/src/providers/list.d.ts +13 -0
- package/@ones-editor/ui/src/providers/mobile-link-provider.d.ts +10 -0
- package/@ones-editor/ui/src/providers/paragraph.d.ts +9 -0
- package/@ones-editor/ui/src/providers/proxy-provider.d.ts +9 -0
- package/@ones-editor/ui/src/providers/quoted.d.ts +10 -0
- package/@ones-editor/ui/src/providers/script-with-dropdown.d.ts +9 -0
- package/@ones-editor/ui/src/providers/text-command-provider.d.ts +16 -0
- package/@ones-editor/ui/src/providers/text-fixed-provider.d.ts +16 -0
- package/@ones-editor/ui/src/providers/text-script-provider.d.ts +10 -0
- package/@ones-editor/ui/src/providers/text-styles.d.ts +9 -0
- package/@ones-editor/ui/src/providers/turn-into.d.ts +9 -0
- package/@ones-editor/ui/src/providers/utils/add-section.d.ts +2 -0
- package/@ones-editor/ui/src/{quick-menu → providers/utils}/basic-commands.d.ts +1 -2
- package/@ones-editor/ui/src/providers/utils/clipboard.d.ts +6 -0
- package/@ones-editor/ui/src/providers/utils/index.d.ts +2 -0
- package/@ones-editor/ui/src/providers/utils/inject-block-options.d.ts +8 -0
- package/@ones-editor/ui/src/providers/utils/text-commands.d.ts +3 -0
- package/@ones-editor/{text-commands/src → ui/src/providers/utils}/text-styles.d.ts +3 -1
- package/@ones-editor/ui/src/quick-menu/index.d.ts +7 -19
- package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +8 -0
- package/@ones-editor/ui/src/quick-menu/types.d.ts +2 -5
- package/@ones-editor/ui/src/readonly-toolbar/index.d.ts +0 -1
- package/@ones-editor/ui/src/toolbar/link-commands.d.ts +4 -0
- package/@ones-editor/ui/src/toolbar/text-commands.d.ts +2 -2
- package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +1 -0
- package/@ones-editor/ui/src/utils/hide-toolbar.d.ts +2 -0
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +2 -1
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +1 -1
- package/@ones-editor/ui-base/src/color-button/text-color-item.d.ts +1 -0
- package/@ones-editor/ui-base/src/color-palette/color-palette.d.ts +1 -1
- package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +3 -2
- package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +3 -1
- package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +1 -0
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +4 -1
- package/@ones-editor/ui-base/src/icons/index.d.ts +5 -1
- package/@ones-editor/ui-base/src/index.d.ts +2 -0
- package/@ones-editor/ui-base/src/input/create-input.d.ts +23 -3
- package/@ones-editor/ui-base/src/mobile-command-bar/init-menu-item.d.ts +3 -0
- package/@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu.d.ts +23 -0
- package/@ones-editor/ui-base/src/popup/popup.d.ts +1 -1
- package/@ones-editor/{ui → ui-base}/src/text-button/index.d.ts +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.js +16760 -13859
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/@ones-editor/block-menu/src/block-menu/items/block-command-items.d.ts +0 -3
- package/@ones-editor/block-menu/src/block-menu/items/index.d.ts +0 -5
- package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +0 -5
- package/@ones-editor/block-menu/src/block-menu/items/text-styles/text-style-item.d.ts +0 -30
- package/@ones-editor/block-menu/src/block-menu/items/types.d.ts +0 -5
- package/@ones-editor/text-commands/src/text-command-provider.d.ts +0 -24
- package/@ones-editor/text-commands/src/text-commands.d.ts +0 -4
- package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +0 -16
- package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +0 -8
- package/@ones-editor/ui/src/quick-menu/insert-empty-block.d.ts +0 -4
- package/@ones-editor/ui/src/quick-menu/order.d.ts +0 -1
- package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +0 -9
- package/@ones-editor/ui/src/toolbar/commands/align.d.ts +0 -10
- package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +0 -11
- package/@ones-editor/ui/src/toolbar/commands/turn-into.d.ts +0 -10
- package/@ones-editor/ui/src/toolbar/merge-commands.d.ts +0 -2
- /package/@ones-editor/{block-menu → ui}/src/block-menu/standard-block-actions/hook.d.ts +0 -0
|
@@ -5,7 +5,7 @@ export declare class InsertLinkItem implements ToolbarItem {
|
|
|
5
5
|
name: string;
|
|
6
6
|
icon: string;
|
|
7
7
|
states: CommandItemState[];
|
|
8
|
-
getCommand(editor: OnesEditor): import("@ones-editor/core").
|
|
8
|
+
getCommand(editor: OnesEditor): import("@ones-editor/core").CommandItemWithSource | undefined;
|
|
9
9
|
updateState(editor: OnesEditor): void;
|
|
10
10
|
onClick(editor: OnesEditor, item: ToolbarItem): void;
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommandItemWithSource, CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
2
|
import { ToolbarItem } from '../types';
|
|
3
3
|
export declare class OrderedListItem implements ToolbarItem {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
icon: string;
|
|
7
7
|
states: CommandItemState[];
|
|
8
|
-
getCommand(editor: OnesEditor):
|
|
8
|
+
getCommand(editor: OnesEditor): CommandItemWithSource | undefined;
|
|
9
9
|
updateState(editor: OnesEditor): void;
|
|
10
10
|
onClick(editor: OnesEditor, item: ToolbarItem): void;
|
|
11
11
|
}
|
|
@@ -14,7 +14,7 @@ export declare class UnorderedListItem implements ToolbarItem {
|
|
|
14
14
|
name: string;
|
|
15
15
|
icon: string;
|
|
16
16
|
states: CommandItemState[];
|
|
17
|
-
getCommand(editor: OnesEditor):
|
|
17
|
+
getCommand(editor: OnesEditor): CommandItemWithSource | undefined;
|
|
18
18
|
updateState(editor: OnesEditor): void;
|
|
19
19
|
onClick(editor: OnesEditor, item: ToolbarItem): void;
|
|
20
20
|
}
|
|
@@ -23,7 +23,7 @@ export declare class CheckListItem implements ToolbarItem {
|
|
|
23
23
|
name: string;
|
|
24
24
|
icon: string;
|
|
25
25
|
states: CommandItemState[];
|
|
26
|
-
getCommand(editor: OnesEditor):
|
|
26
|
+
getCommand(editor: OnesEditor): CommandItemWithSource | undefined;
|
|
27
27
|
updateState(editor: OnesEditor): void;
|
|
28
28
|
onClick(editor: OnesEditor, item: ToolbarItem): void;
|
|
29
29
|
}
|
|
@@ -5,7 +5,7 @@ export declare class QuoteItem implements ToolbarItem {
|
|
|
5
5
|
name: string;
|
|
6
6
|
icon: string;
|
|
7
7
|
states: CommandItemState[];
|
|
8
|
-
getCommand(editor: OnesEditor): import("@ones-editor/core").
|
|
8
|
+
getCommand(editor: OnesEditor): import("@ones-editor/core").CommandItemWithSource | undefined;
|
|
9
9
|
updateState(editor: OnesEditor): void;
|
|
10
10
|
onClick(editor: OnesEditor, item: ToolbarItem): void;
|
|
11
11
|
}
|
|
@@ -1,10 +1,47 @@
|
|
|
1
1
|
import { CommandItemChildrenPlacement, CommandItemState, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
2
|
import { TextColorItem as ColorItem } from '../../../../@ones-editor/ui-base';
|
|
3
|
+
import { ColorStyleProvider } from '../../../../@ones-editor/ui';
|
|
3
4
|
import { ToolbarItem } from '../types';
|
|
4
5
|
export declare class TextColorItem extends ColorItem implements ToolbarItem {
|
|
5
6
|
childrenPlacement: CommandItemChildrenPlacement;
|
|
6
7
|
states?: CommandItemState[] | undefined;
|
|
8
|
+
provider: ColorStyleProvider;
|
|
7
9
|
constructor(editor: OnesEditor);
|
|
10
|
+
getCommand(): {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
desc?: string | undefined;
|
|
14
|
+
states?: CommandItemState[] | undefined;
|
|
15
|
+
value?: string | undefined;
|
|
16
|
+
order?: number | undefined;
|
|
17
|
+
type?: import("@ones-editor/core").CommandItemType | undefined;
|
|
18
|
+
element?: HTMLElement | ((item: import("@ones-editor/core").CommandItem) => HTMLElement) | undefined;
|
|
19
|
+
icon?: string | undefined;
|
|
20
|
+
childrenType?: "menu" | "toolbar" | "mobile-bottom-menu" | undefined;
|
|
21
|
+
children?: import("@ones-editor/core").CommandItem[] | undefined;
|
|
22
|
+
childrenMenuId?: string | undefined;
|
|
23
|
+
data?: unknown;
|
|
24
|
+
group?: string | undefined;
|
|
25
|
+
groupOrder?: number | undefined;
|
|
26
|
+
dropdown?: boolean | undefined;
|
|
27
|
+
dropSplit?: boolean | undefined;
|
|
28
|
+
splitTooltip?: string | undefined;
|
|
29
|
+
manualShowChildren?: boolean | undefined;
|
|
30
|
+
childrenPlacement?: CommandItemChildrenPlacement | undefined;
|
|
31
|
+
childrenOffset?: [number, number] | undefined;
|
|
32
|
+
childArrow?: boolean | undefined;
|
|
33
|
+
subText?: string | undefined;
|
|
34
|
+
defaultCheckedChildren?: string[] | undefined;
|
|
35
|
+
ellipsisTooltip?: string | undefined;
|
|
36
|
+
disableTooltip?: boolean | undefined;
|
|
37
|
+
tooltipPlacement?: CommandItemChildrenPlacement | undefined;
|
|
38
|
+
disableReason?: string | undefined;
|
|
39
|
+
hideGroupItem?: boolean | undefined;
|
|
40
|
+
setCloseable?: ((closeable: import("@ones-editor/core").Closeable) => void) | undefined;
|
|
41
|
+
beforePopup?: ((parent: unknown) => void) | undefined;
|
|
42
|
+
switchable?: boolean | undefined;
|
|
43
|
+
clickToClose?: boolean | undefined;
|
|
44
|
+
} | null;
|
|
8
45
|
handleChangeColor(type: 'color' | 'backgroundColor' | 'clearColor', value: number): void;
|
|
9
46
|
handleMousedown: (event: MouseEvent) => void;
|
|
10
47
|
updateState(editor: OnesEditor): void;
|
|
@@ -9,14 +9,25 @@ export default class ImageHoveringToolbarCommands implements BlockCommands {
|
|
|
9
9
|
id: string;
|
|
10
10
|
name: string;
|
|
11
11
|
icon: string;
|
|
12
|
+
groupOrder: number;
|
|
13
|
+
order: number;
|
|
12
14
|
type?: undefined;
|
|
13
15
|
} | {
|
|
14
16
|
id: string;
|
|
15
17
|
name: string;
|
|
16
18
|
type: CommandItemType;
|
|
17
19
|
icon?: undefined;
|
|
20
|
+
groupOrder?: undefined;
|
|
21
|
+
order?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
icon: string;
|
|
26
|
+
groupOrder?: undefined;
|
|
27
|
+
order?: undefined;
|
|
28
|
+
type?: undefined;
|
|
18
29
|
})[];
|
|
19
|
-
|
|
30
|
+
isHoveringImageEmpty: () => boolean;
|
|
20
31
|
get commands(): CommandItem[];
|
|
21
32
|
executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
|
|
22
33
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import { CommandItem, OnesEditor, OnesEditorCustom } from '../../../@ones-editor/core';
|
|
2
3
|
import { AutoSuggestAnchor, OnesEditorAutoSuggest } from '../../../@ones-editor/ui-base';
|
|
3
4
|
import { MentionOptions } from './types';
|
|
@@ -5,10 +6,24 @@ export default class OnesEditorMention implements OnesEditorCustom {
|
|
|
5
6
|
private editor;
|
|
6
7
|
private options;
|
|
7
8
|
suggest: OnesEditorAutoSuggest;
|
|
9
|
+
private mobileWrap;
|
|
10
|
+
private items;
|
|
8
11
|
constructor(editor: OnesEditor, options: MentionOptions);
|
|
12
|
+
createMobileHeader: () => HTMLDivElement | undefined;
|
|
9
13
|
onClose: () => void;
|
|
10
14
|
destroy(): void;
|
|
11
15
|
onShow: (suggest: OnesEditorAutoSuggest, containerId: string, blockIndex: number, offset: number) => boolean;
|
|
16
|
+
handleClickItem: (item: CommandItem) => void;
|
|
17
|
+
handleMobileWrapClick: (e: Event) => void;
|
|
12
18
|
onClickItem: (menu: OnesEditorAutoSuggest, item: CommandItem, anchor: AutoSuggestAnchor) => void;
|
|
19
|
+
createItemElement: (item: CommandItem, find: string) => HTMLElement;
|
|
20
|
+
createMobileItems: (content: HTMLElement, items: CommandItem[], find: string) => void;
|
|
21
|
+
onInputChanged: import("lodash").DebouncedFunc<(content: HTMLElement, e: Event) => void>;
|
|
22
|
+
createMobileCommandItem: (items: CommandItem[]) => {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
element: HTMLElement;
|
|
26
|
+
}[];
|
|
27
|
+
_queryItems: (text: string) => Promise<CommandItem[]>;
|
|
13
28
|
queryItems: (menu: OnesEditorAutoSuggest, text: string) => Promise<CommandItem[]>;
|
|
14
29
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type CommandItem, type OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
export declare class CursorToolbarHandler {
|
|
3
|
+
private editor;
|
|
4
|
+
private toolbar;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
handleButtonClick: (toolbar: any, item: CommandItem) => void;
|
|
7
|
+
private handleSelectionChange;
|
|
8
|
+
getCommands: () => CommandItem[];
|
|
9
|
+
showToolbar: () => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const createCursorToolbar: (editor: OnesEditor) => CursorToolbarHandler;
|
|
14
|
+
export declare const hideCursorToolbar: (editor: OnesEditor) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type Options = {
|
|
2
|
+
onFocused: () => void;
|
|
3
|
+
onBlurred: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare class ActiveElementObserver {
|
|
6
|
+
private options;
|
|
7
|
+
constructor(options: Options);
|
|
8
|
+
handleFocusIn: () => void;
|
|
9
|
+
handleFocusOut: () => void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AbstractProvider, OnesEditor, OnesEditorCommandProviders } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class FixedProviders extends AbstractProvider implements OnesEditorCommandProviders {
|
|
3
|
+
protected editor: OnesEditor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
3
|
+
import './mobile.scss';
|
|
4
|
+
export declare class MobileCommandHandler {
|
|
5
|
+
private editor;
|
|
6
|
+
private commandBar;
|
|
7
|
+
private observer;
|
|
8
|
+
constructor(editor: OnesEditor);
|
|
9
|
+
destroy(): void;
|
|
10
|
+
private showKeyboard;
|
|
11
|
+
private initViewportHeight;
|
|
12
|
+
private get isKeyboardShow();
|
|
13
|
+
private get virtualViewportHeight();
|
|
14
|
+
private get clientHeight();
|
|
15
|
+
private get virtualViewportOffsetTop();
|
|
16
|
+
private get window();
|
|
17
|
+
private setDebugInfo;
|
|
18
|
+
toggle: import("lodash").DebouncedFunc<() => void>;
|
|
19
|
+
handleFocusIn: () => void;
|
|
20
|
+
handleFocusOut: () => void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from '../../../../../@ones-editor/ui';
|
|
3
|
+
export default class AlignDropdownProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
getInsertCommands: () => never[];
|
|
8
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OnesEditor, OnesEditorCommandProvider } from '../../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from '../../../../../@ones-editor/ui';
|
|
3
|
+
export default class GroupProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, ContainerElement, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from '../../../../../@ones-editor/ui';
|
|
3
|
+
export default class InsertMenuProvider extends ProxyProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
get whiteList(): string[];
|
|
7
|
+
providers: OnesEditorCommandProvider[];
|
|
8
|
+
constructor(editor: OnesEditor);
|
|
9
|
+
getNextBlock(container: ContainerElement, block: BlockElement): number;
|
|
10
|
+
getInsertCommands: () => CommandItem[];
|
|
11
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
12
|
+
executeInsertCommand: () => boolean;
|
|
13
|
+
getNextBlockIndex: (container: ContainerElement, block: BlockElement) => number;
|
|
14
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams) => boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from '../../../../../@ones-editor/ui';
|
|
3
|
+
export default class InsertProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from '../../../../../@ones-editor/ui';
|
|
3
|
+
export default class ParagraphProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
groupIndex: number;
|
|
7
|
+
constructor(editor: OnesEditor);
|
|
8
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
|
|
2
|
+
export default class TabProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
isDisabled: (block: BlockElement) => boolean;
|
|
7
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
8
|
+
getInsertCommands: () => never[];
|
|
9
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from '../../../../../@ones-editor/ui';
|
|
3
|
+
export default class TextDropdownProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
getInsertCommands: () => never[];
|
|
8
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from '../../../../../@ones-editor/ui';
|
|
3
|
+
export default class TurnIntoCommandProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CommandItem, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class MobileToolbarHandler {
|
|
3
|
+
private editor;
|
|
4
|
+
private mobileToolbar;
|
|
5
|
+
private fixedProviders;
|
|
6
|
+
bar: HTMLElement;
|
|
7
|
+
constructor(editor: OnesEditor, parent: HTMLElement);
|
|
8
|
+
private handleSelectionChange;
|
|
9
|
+
handleClick: (_: any, item: CommandItem) => void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { OnesEditor, OnesEditorCustom } from '../../../@ones-editor/core';
|
|
2
|
+
import { MobileCommandHandler } from './fixed-toolbar';
|
|
3
|
+
import './mobile-helper-styles.scss';
|
|
4
|
+
import './locale';
|
|
5
|
+
export { MobileCommandHandler };
|
|
2
6
|
export declare class OnesEditorMobileHelper implements OnesEditorCustom {
|
|
3
7
|
private editor;
|
|
4
8
|
private longPressTimeout;
|
|
9
|
+
private longPressTriggered;
|
|
10
|
+
private gripper;
|
|
11
|
+
private cursorToolbar;
|
|
12
|
+
private isMoving;
|
|
5
13
|
constructor(editor: OnesEditor);
|
|
6
14
|
destroy(): void;
|
|
7
15
|
handleSelectionChange: () => void;
|
|
8
|
-
handleLongPress: (event: TouchEvent) =>
|
|
16
|
+
handleLongPress: (event: TouchEvent) => boolean;
|
|
17
|
+
handleTouchMove: (event: TouchEvent) => void;
|
|
9
18
|
handleTouchStart: (event: TouchEvent) => void;
|
|
10
19
|
handleTouchEnd: (event: TouchEvent) => void;
|
|
11
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DragDrop, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
interface DragData {
|
|
3
|
+
type: 'start' | 'end';
|
|
4
|
+
}
|
|
5
|
+
export default class SelectionGripper {
|
|
6
|
+
private editor;
|
|
7
|
+
private startGripper;
|
|
8
|
+
private endGripper;
|
|
9
|
+
private dragDropStart;
|
|
10
|
+
private dragDropEnd;
|
|
11
|
+
constructor(editor: OnesEditor);
|
|
12
|
+
destroy(): void;
|
|
13
|
+
handleDragStart: (drag: DragDrop<DragData>, event: MouseEvent | TouchEvent, elem: HTMLElement) => void;
|
|
14
|
+
handleDragging: (drag: DragDrop<DragData>, event: MouseEvent | TouchEvent, elem: HTMLElement) => void;
|
|
15
|
+
handleDragEnd: (drag: DragDrop<DragData>, event: MouseEvent | TouchEvent, elem: HTMLElement) => void;
|
|
16
|
+
update(): void;
|
|
17
|
+
close(): void;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommandItem, BlockElement, CommandParams, CommandResult, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
2
|
declare const TableCommands: readonly ["table/merge-cells", "table/split-cell", "table/insert-column", "table/insert-row", "table/delete-rows", "table/delete-columns", "table/delete"];
|
|
3
3
|
export type TableCommand = typeof TableCommands[number];
|
|
4
4
|
export default class TableBlockCommandProvider implements OnesEditorCommandProvider {
|
|
5
5
|
id: string;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
groupIndex: number;
|
|
7
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange): CommandItem[];
|
|
8
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem, params: CommandParams, result?: CommandResult): boolean;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, CommandResult, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class MobileTableCommandProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
7
|
+
deleteRow: (tableBlock: BlockElement) => void;
|
|
8
|
+
deleteCol: (tableBlock: BlockElement) => void;
|
|
9
|
+
insertRowToBottom: (tableBlock: BlockElement) => void;
|
|
10
|
+
insertColToRight: (tableBlock: BlockElement) => void;
|
|
11
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result?: CommandResult | undefined) => boolean;
|
|
12
|
+
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import TableBlock, { includeBigTable } from './table-block';
|
|
2
|
-
import { TableBlockCommandProvider } from './commands';
|
|
2
|
+
import { TableBlockCommandProvider, deleteColumns, deleteRows, setStripeStyle, setColTitle, setRowTitle, insertColumn, insertRow } from './commands';
|
|
3
3
|
import './locale';
|
|
4
4
|
import './table-style.scss';
|
|
5
5
|
import TableShortcuts from './table-block/table-shortcuts';
|
|
6
|
+
import { createEntireRowAndColumnRange, getAbstractTableSelectionRange } from './table-block/cell-menu/table-cell-dom';
|
|
7
|
+
import MobileTableCommandProvider from './commands/table-command-provider';
|
|
6
8
|
export * from './types';
|
|
7
|
-
export { TableBlock, TableBlockCommandProvider, TableShortcuts, includeBigTable };
|
|
9
|
+
export { MobileTableCommandProvider, TableBlock, TableBlockCommandProvider, TableShortcuts, includeBigTable };
|
|
10
|
+
export { deleteColumns, deleteRows, setStripeStyle, setColTitle, setRowTitle, insertColumn, insertRow, };
|
|
11
|
+
export { createEntireRowAndColumnRange, getAbstractTableSelectionRange };
|
|
8
12
|
export type { CreateTableData } from './table-block/table-creator';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { BlockElement, ComplexBlockPosition, OnesEditor, SimpleBlockPosition } from '../../../../../@ones-editor/core';
|
|
2
2
|
export declare function getCellElementByChildBlockId(editor: OnesEditor, tableBlock: BlockElement, blockId: string): HTMLTableCellElement;
|
|
3
3
|
export declare function createComplexPosFromBlockPos(editor: OnesEditor, tableBlock: BlockElement, blockPosition: ComplexBlockPosition | SimpleBlockPosition): ComplexBlockPosition;
|
|
4
|
+
export declare function getAbstractTableSelectionRange(editor: OnesEditor, tableBlock: BlockElement): {
|
|
5
|
+
fromRow: number;
|
|
6
|
+
toRow: number;
|
|
7
|
+
fromCol: number;
|
|
8
|
+
toCol: number;
|
|
9
|
+
};
|
|
4
10
|
export declare function updateBarsDangerStatus(editor: OnesEditor, tableBlock: BlockElement, selectedRows: number[], selectedColumns: number[]): void;
|
|
5
11
|
export declare function updateCellsDangerStatus(editor: OnesEditor, tableBlock: BlockElement, isDanger?: boolean, isCol?: boolean): void;
|
|
6
12
|
export declare function updateCellBarsDangerStatus(editor: OnesEditor, tableBlock: BlockElement, isDanger?: boolean, isCol?: boolean): void;
|
|
@@ -10,8 +10,8 @@ export declare class TableResizeDragDrop implements DragDropOptions<TableResizeD
|
|
|
10
10
|
data: TableResizeDragDropData;
|
|
11
11
|
private onEnd;
|
|
12
12
|
cursor: string;
|
|
13
|
-
constructor(editor: OnesEditor, elem: HTMLDivElement, data: TableResizeDragDropData, onEnd: ((event: MouseEvent) => void) | null);
|
|
14
|
-
onDragStart(drag: DragDrop<TableResizeDragDropData>, event: MouseEvent, elem: HTMLElement): void;
|
|
15
|
-
onDragging(drag: DragDrop<TableResizeDragDropData>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
|
|
16
|
-
onDragEnd(drag: DragDrop<TableResizeDragDropData>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
|
|
13
|
+
constructor(editor: OnesEditor, elem: HTMLDivElement, data: TableResizeDragDropData, onEnd: ((event: MouseEvent | TouchEvent) => void) | null);
|
|
14
|
+
onDragStart(drag: DragDrop<TableResizeDragDropData>, event: MouseEvent | TouchEvent, elem: HTMLElement): void;
|
|
15
|
+
onDragging(drag: DragDrop<TableResizeDragDropData>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
|
|
16
|
+
onDragEnd(drag: DragDrop<TableResizeDragDropData>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
|
|
17
17
|
}
|