@ones-editor/editor 1.1.8-beta.12 → 1.1.8-beta.14
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/standard-block-actions/hook.d.ts +0 -2
- package/@ones-editor/code-block/src/code-block/languages.d.ts +1 -1
- package/@ones-editor/code-block/src/locale/en-us.d.ts +1 -0
- package/@ones-editor/code-block/src/locale/ja-jp.d.ts +1 -0
- package/@ones-editor/code-block/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/comments/src/comments-render/index.d.ts +1 -0
- package/@ones-editor/core/src/core/composition/clipboard/copy.d.ts +1 -2
- package/@ones-editor/core/src/core/composition/index.d.ts +1 -1
- package/@ones-editor/core/src/core/containers/root-container.d.ts +0 -1
- package/@ones-editor/core/src/core/doc/rich-text/replace-text.d.ts +8 -0
- package/@ones-editor/core/src/core/doc/rich-text/text-style.d.ts +1 -0
- package/@ones-editor/core/src/core/editor/actions/index.d.ts +0 -1
- package/@ones-editor/core/src/core/editor/actions/update-block-text.d.ts +3 -3
- package/@ones-editor/core/src/core/editor/actions/update-box-data.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/editor-dom/editor-dom.d.ts +1 -3
- package/@ones-editor/core/src/core/editor/index.d.ts +0 -1
- package/@ones-editor/core/src/core/selection/actions/move-simple-block-position.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +3 -3
- package/@ones-editor/core/src/utils/animate-scroll.d.ts +0 -4
- package/@ones-editor/find-dialog/src/find-dialog.d.ts +1 -4
- package/@ones-editor/find-dialog/src/highlights/highlight-dom.d.ts +0 -4
- package/@ones-editor/heading-collapse/src/heading-collapse-button/collapse-heading-block.d.ts +0 -2
- package/@ones-editor/heading-collapse/src/heading-collapse-button/index.d.ts +1 -3
- package/@ones-editor/mathjax/src/index.d.ts +0 -2
- package/@ones-editor/paste-special/src/paste-special-button.d.ts +0 -1
- package/@ones-editor/status/package.json +7 -0
- package/@ones-editor/status/src/dom/input.d.ts +1 -0
- package/@ones-editor/status/src/dom/overflow-tooltip-tag.d.ts +10 -0
- package/@ones-editor/status/src/dom/status-palette.d.ts +6 -0
- package/@ones-editor/status/src/index.d.ts +4 -0
- package/@ones-editor/status/src/locale/en-us.d.ts +25 -0
- package/@ones-editor/status/src/locale/index.d.ts +1 -0
- package/@ones-editor/status/src/locale/ja-jp.d.ts +25 -0
- package/@ones-editor/status/src/locale/zh-cn.d.ts +25 -0
- package/@ones-editor/status/src/status-box-command.d.ts +7 -0
- package/@ones-editor/status/src/status-box-data.d.ts +5 -0
- package/@ones-editor/status/src/status-box-editor.d.ts +21 -0
- package/@ones-editor/status/src/status-box.d.ts +4 -0
- package/@ones-editor/status/src/types.d.ts +8 -0
- package/@ones-editor/table-block/src/index.d.ts +2 -2
- package/@ones-editor/table-block/src/table-block/index.d.ts +0 -1
- package/@ones-editor/table-block/src/table-block/table-dom.d.ts +0 -1
- package/@ones-editor/table-block/src/types.d.ts +0 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/icons/index.d.ts +2 -1
- package/@ones-editor/ui-base/src/input/create-input.d.ts +2 -1
- package/@ones-editor/versions/src/types.d.ts +0 -1
- package/@ones-editor/versions/src/version-dialog/version-list.d.ts +0 -1
- package/dist/index.js +224 -213
- package/dist/lang/en-us.d.ts +0 -1
- package/dist/lang/ja-jp.d.ts +0 -1
- package/dist/lang/zh-cn.d.ts +0 -1
- package/dist/types.d.ts +0 -2
- package/package.json +1 -1
- package/@ones-editor/core/src/core/editor/actions/replace-text.d.ts +0 -10
- package/@ones-editor/heading-collapse/src/doc-event/collapse-handler.d.ts +0 -3
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { BlockCommands, BlockElement, CommandItem, OnesEditor, OnesEditorBlockHook } from '../../../../../@ones-editor/core';
|
|
2
2
|
export default class StandardBlockActionHook implements OnesEditorBlockHook {
|
|
3
3
|
commands(editor: OnesEditor, blockElement: BlockElement): BlockCommands;
|
|
4
|
-
deleteBlock(editor: OnesEditor, block: BlockElement): void;
|
|
5
|
-
copyBlock(editor: OnesEditor, block: BlockElement): void;
|
|
6
4
|
executeCommand: (editor: OnesEditor, bloockElement: BlockElement, item: CommandItem) => void;
|
|
7
5
|
}
|
|
@@ -67,7 +67,7 @@ import 'prismjs/components/prism-vhdl';
|
|
|
67
67
|
import 'prismjs/components/prism-visual-basic';
|
|
68
68
|
import 'prismjs/components/prism-wasm';
|
|
69
69
|
import 'prismjs/components/prism-yaml';
|
|
70
|
-
declare const SUPPORTED_LANGUAGES: {
|
|
70
|
+
declare const SUPPORTED_LANGUAGES: () => {
|
|
71
71
|
abap: {
|
|
72
72
|
name: string;
|
|
73
73
|
aliases: string[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BlockElement, BlockPath, DocBlock, DocBlockTextAttributes, OnesEditor, OnesEditorBlockRenderer, OnesEditorBlockRenderResult } from '../../../../@ones-editor/core';
|
|
2
2
|
export declare class OnesEditorCommentsRender implements OnesEditorBlockRenderer {
|
|
3
3
|
renderText(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
4
|
+
renderBox(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
4
5
|
renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
|
|
5
6
|
updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
|
|
6
7
|
}
|
|
@@ -4,6 +4,5 @@ export declare function injectDocToHtmlFragment(htmlFragment: string, doc: DocOb
|
|
|
4
4
|
export declare function addMetaToDoc(editor: OnesEditor, doc: DocObject): void;
|
|
5
5
|
export type BeforeCopyCallback = (editor: OnesEditor, event: ClipboardEvent, doc: DocObject) => DocObject | boolean | undefined;
|
|
6
6
|
export declare function editorCopy(editor: OnesEditor, event: ClipboardEvent, beforeCopy?: BeforeCopyCallback): void;
|
|
7
|
-
export declare function editorCopyDoc(editor: OnesEditor, doc: DocObject): void;
|
|
8
7
|
export declare function editorCopyWithoutEvent(editor: OnesEditor, beforeCopy?: BeforeCopyCallback): void;
|
|
9
|
-
export declare function editorCopyBlock(editor: OnesEditor, block: BlockElement): Promise<
|
|
8
|
+
export declare function editorCopyBlock(editor: OnesEditor, block: BlockElement): Promise<boolean>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { editorCopyBlock,
|
|
1
|
+
export { editorCopyBlock, addMetaToDoc, injectDocToHtmlFragment } from './clipboard/copy';
|
|
2
2
|
export { copyResourcesFromDoc } from './clipboard/resources/copy-resources';
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
import { DocBlockText } from '../doc';
|
|
2
2
|
export declare function replaceText(text: DocBlockText, start: number, end: number, replaceWith: string): DocBlockText;
|
|
3
|
+
export interface FindTextRange {
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function findAllText(text: DocBlockText, find: string): FindTextRange[];
|
|
8
|
+
export declare function replaceAllText(text: DocBlockText, find: string, replaceWith: string, replaceResult?: {
|
|
9
|
+
count: number;
|
|
10
|
+
}): DocBlockText;
|
|
@@ -5,6 +5,7 @@ export declare const TEXT_STYLE_BACKGROUND_COLOR_PREFIX = "style-bg-color-";
|
|
|
5
5
|
export declare function addAttribute(text: DocBlockText, key: string, value: DocTextAttributeType): DocBlockText;
|
|
6
6
|
export declare function removeAttribute(text: DocBlockText, key: string, value: unknown, options?: {
|
|
7
7
|
ignoreValue: boolean;
|
|
8
|
+
handleBox?: boolean;
|
|
8
9
|
}): DocBlockText;
|
|
9
10
|
export declare function rangeAddAttribute(offset: number, length: number, text: DocBlockText, key: string, value: DocTextAttributeType): DocBlockText;
|
|
10
11
|
export declare function rangeRemoveAttribute(offset: number, length: number, text: DocBlockText, key: string, value: unknown, options?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement } from '../../types';
|
|
1
|
+
import { OnesEditor, BlockElement, InsertTextOptions } from '../../types';
|
|
2
2
|
import { DocBlockText, DocBlockTextActions } from '../../doc';
|
|
3
|
-
export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions): DocBlockText;
|
|
4
|
-
export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText): void;
|
|
3
|
+
export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions, options?: InsertTextOptions): DocBlockText;
|
|
4
|
+
export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText, options?: InsertTextOptions): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { OnesEditor } from '../../types';
|
|
1
|
+
import { InsertTextOptions, OnesEditor } from '../../types';
|
|
2
2
|
import { DocBox } from '../../doc';
|
|
3
|
-
export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox): void;
|
|
3
|
+
export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox, options?: InsertTextOptions): void;
|
|
@@ -5,7 +5,5 @@ export declare function editorGetClientBottom(editor: OnesEditor): number;
|
|
|
5
5
|
export declare function editorGetVisibleRect(editor: OnesEditor): DOMRect;
|
|
6
6
|
export declare function isBlockPositionVisible(editor: OnesEditor, pos: SimpleBlockPosition): boolean;
|
|
7
7
|
export declare function isChildContainerVisible(editor: OnesEditor, container: ContainerElement): boolean;
|
|
8
|
-
export declare function scrollIntoView(editor: OnesEditor, target: HTMLElement, options?: {
|
|
9
|
-
animation?: boolean;
|
|
10
|
-
}): void;
|
|
11
8
|
export declare function editorScrollIntoView(editor: OnesEditor): void;
|
|
9
|
+
export declare function scrollIntoView(dom: Element, options?: any): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BlockPosition, OnesEditor, SimpleBlockPosition, MoveDirection } from '../../types';
|
|
2
|
-
export declare function moveSimpleBlockPosition(editor: OnesEditor, old: SimpleBlockPosition,
|
|
2
|
+
export declare function moveSimpleBlockPosition(editor: OnesEditor, old: SimpleBlockPosition, type: MoveDirection): BlockPosition | null;
|
|
@@ -67,7 +67,6 @@ export interface Box {
|
|
|
67
67
|
toStandardText?: (editor: OnesEditor, box: DocBox) => Promise<DocBlockText | undefined>;
|
|
68
68
|
getBoxProperties?: (editor: OnesEditor, boxElement: BoxElement) => BoxProperties;
|
|
69
69
|
getResources?: (editor: OnesEditor, box: DocBox) => string[] | null;
|
|
70
|
-
matchText?: (editor: OnesEditor, box: DocBox, keyword: string) => boolean;
|
|
71
70
|
}
|
|
72
71
|
export interface Insertion {
|
|
73
72
|
insertionType: string;
|
|
@@ -78,7 +77,6 @@ export interface InsertEmptyBlockOptions {
|
|
|
78
77
|
containerId: string;
|
|
79
78
|
blockIndex: number;
|
|
80
79
|
data?: Record<string, unknown>;
|
|
81
|
-
from?: 'block-menu' | 'quick-menu';
|
|
82
80
|
}
|
|
83
81
|
export interface EmbedOptions {
|
|
84
82
|
name: string;
|
|
@@ -442,6 +440,7 @@ export type OnesEditorCustomCreator = (editor: OnesEditor) => OnesEditorCustom;
|
|
|
442
440
|
export interface CloneBlockResultInfo {
|
|
443
441
|
containerIdMap: Map<string, string>;
|
|
444
442
|
blockIdMap: Map<string, string>;
|
|
443
|
+
boxIdMap: Map<string, string>;
|
|
445
444
|
}
|
|
446
445
|
export interface OnesEditorDomEvents extends OnesEditorCustom {
|
|
447
446
|
addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void) => void;
|
|
@@ -476,6 +475,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
476
475
|
readonly options: OnesEditorOptions;
|
|
477
476
|
readonly domEvents: OnesEditorDomEvents;
|
|
478
477
|
readonly settingsProvider: OnesEditorSettingsProvider;
|
|
478
|
+
version: string;
|
|
479
479
|
readonly: boolean;
|
|
480
480
|
addCustom: <T extends OnesEditorCustom>(name: string, creator: OnesEditorCustomCreator) => T;
|
|
481
481
|
getCustom: <T extends OnesEditorCustom>(name: string) => T;
|
|
@@ -542,7 +542,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
542
542
|
deleteChildContainers: (containerIds: string[]) => void;
|
|
543
543
|
updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange) => DocBlock;
|
|
544
544
|
updateEmbedData: (block: BlockElement, data: DocEmbedData, newRange?: SelectionRange) => DocBlock;
|
|
545
|
-
updateBoxData: (boxData: DocBox) => void;
|
|
545
|
+
updateBoxData: (boxData: DocBox, options?: InsertTextOptions) => void;
|
|
546
546
|
updateCompositionText: (text: string, end: boolean) => void;
|
|
547
547
|
getColor: (index: number, type?: string) => string;
|
|
548
548
|
}
|
|
@@ -8,8 +8,6 @@ export interface IUserOptions {
|
|
|
8
8
|
minDuration?: number;
|
|
9
9
|
speed?: number;
|
|
10
10
|
verticalOffset?: number;
|
|
11
|
-
disableHorizontal?: boolean;
|
|
12
|
-
disableVertical?: boolean;
|
|
13
11
|
}
|
|
14
12
|
export interface IOptions {
|
|
15
13
|
cancelOnUserAction: boolean;
|
|
@@ -20,8 +18,6 @@ export interface IOptions {
|
|
|
20
18
|
minDuration: number;
|
|
21
19
|
speed: number;
|
|
22
20
|
verticalOffset: number;
|
|
23
|
-
disableHorizontal?: boolean;
|
|
24
|
-
disableVertical?: boolean;
|
|
25
21
|
}
|
|
26
22
|
declare function animateScrollTo(y: number, userOptions?: IUserOptions): Promise<boolean>;
|
|
27
23
|
declare function animateScrollTo(coords: TCoords, userOptions?: IUserOptions): Promise<boolean>;
|
|
@@ -41,10 +41,7 @@ export default class FindDialog {
|
|
|
41
41
|
}): void;
|
|
42
42
|
gotoNext(): void;
|
|
43
43
|
gotoPrev(): void;
|
|
44
|
-
updateSearchStatus(curr: number,
|
|
45
|
-
ele: HTMLElement;
|
|
46
|
-
type: 'text' | 'box';
|
|
47
|
-
}[]): void;
|
|
44
|
+
updateSearchStatus(curr: number, count: number): void;
|
|
48
45
|
doSearch: import("lodash").DebouncedFunc<(options: {
|
|
49
46
|
keepReplaceResult: boolean;
|
|
50
47
|
gotoFirstSearchResult: boolean;
|
|
@@ -6,10 +6,6 @@ export declare function getAllReplaceResultHighlights(editor: OnesEditor): HTMLE
|
|
|
6
6
|
export declare function getBlockHighlight(block: BlockElement): HTMLElement[];
|
|
7
7
|
export declare function clearBlockHighlight(block: BlockElement): void;
|
|
8
8
|
export declare function getHighlightCount(editor: OnesEditor): number;
|
|
9
|
-
export declare function getHighlightInfo(editor: OnesEditor): {
|
|
10
|
-
ele: HTMLElement;
|
|
11
|
-
type: 'text' | 'box';
|
|
12
|
-
}[];
|
|
13
9
|
export declare function getHighlightByIndex(editor: OnesEditor, index: number): HTMLElement | null;
|
|
14
10
|
export declare function createFindHighlight(editor: OnesEditor, block: BlockElement, start: number, end: number): void;
|
|
15
11
|
export declare function createReplaceResultHighligh(editor: OnesEditor, block: BlockElement, start: number, end: number): void;
|
package/@ones-editor/heading-collapse/src/heading-collapse-button/collapse-heading-block.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
2
|
export declare function getHeadingBlockChildren(block: BlockElement): BlockElement[];
|
|
3
|
-
export declare function getNextHiddenBlocks(block: BlockElement): BlockElement[];
|
|
4
3
|
export declare function collapseHeadingBlock(editor: OnesEditor, block: BlockElement): void;
|
|
5
|
-
export declare function showBlocks(editor: OnesEditor, blocks: BlockElement[]): void;
|
|
6
4
|
export declare function expandHeadingBlock(editor: OnesEditor, block: BlockElement): void;
|
|
7
5
|
export declare function toggleHeadingBlock(editor: OnesEditor, block: BlockElement): void;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import { getHeadingBlockChildren } from './collapse-heading-block';
|
|
2
1
|
import { HeadingBlockCollapseButton } from './heading-block-collapse-button-render';
|
|
3
|
-
export
|
|
4
|
-
export { HeadingBlockCollapseButton, getHeadingBlockChildren };
|
|
2
|
+
export { HeadingBlockCollapseButton };
|
|
@@ -4,6 +4,4 @@ import MathjaxEmbed from './mathjax-embed';
|
|
|
4
4
|
import './mathjax-style.scss';
|
|
5
5
|
import './locale';
|
|
6
6
|
import ConvertEmptyMathjaxBoxInputHandler from './mathjax-box/convert-mathjax';
|
|
7
|
-
import { MathjaxOptions } from './mathjax/convert';
|
|
8
|
-
export type { MathjaxOptions };
|
|
9
7
|
export { MathjaxBox, MathjaxEmbed, createEmptyMathjaxBox, editMathjaxBox, ConvertEmptyMathjaxBoxInputHandler, };
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createStatusInput(parent: HTMLElement, defaultValue: string, onChange: ((e: Event) => void), onKeyDown: (e: KeyboardEvent) => void): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class OverflowTooltipTag {
|
|
3
|
+
private editor;
|
|
4
|
+
constructor(editor: OnesEditor);
|
|
5
|
+
private check;
|
|
6
|
+
private onMouseOver;
|
|
7
|
+
destroy(): void;
|
|
8
|
+
static create(classes: string[], title: string): HTMLAnchorElement;
|
|
9
|
+
static replaceTitleSpace(title: string): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
status: {
|
|
3
|
+
empty: string;
|
|
4
|
+
command: {
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
7
|
+
color: {
|
|
8
|
+
red: string;
|
|
9
|
+
yellow: string;
|
|
10
|
+
green: string;
|
|
11
|
+
blue: string;
|
|
12
|
+
purple: string;
|
|
13
|
+
grey: string;
|
|
14
|
+
};
|
|
15
|
+
colorDefaultTitle: {
|
|
16
|
+
red: string;
|
|
17
|
+
yellow: string;
|
|
18
|
+
green: string;
|
|
19
|
+
blue: string;
|
|
20
|
+
purple: string;
|
|
21
|
+
grey: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
status: {
|
|
3
|
+
empty: string;
|
|
4
|
+
command: {
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
7
|
+
color: {
|
|
8
|
+
red: string;
|
|
9
|
+
yellow: string;
|
|
10
|
+
green: string;
|
|
11
|
+
blue: string;
|
|
12
|
+
purple: string;
|
|
13
|
+
grey: string;
|
|
14
|
+
};
|
|
15
|
+
colorDefaultTitle: {
|
|
16
|
+
red: string;
|
|
17
|
+
yellow: string;
|
|
18
|
+
green: string;
|
|
19
|
+
blue: string;
|
|
20
|
+
purple: string;
|
|
21
|
+
grey: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
status: {
|
|
3
|
+
empty: string;
|
|
4
|
+
command: {
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
7
|
+
color: {
|
|
8
|
+
red: string;
|
|
9
|
+
yellow: string;
|
|
10
|
+
green: string;
|
|
11
|
+
blue: string;
|
|
12
|
+
purple: string;
|
|
13
|
+
grey: string;
|
|
14
|
+
};
|
|
15
|
+
colorDefaultTitle: {
|
|
16
|
+
red: string;
|
|
17
|
+
yellow: string;
|
|
18
|
+
green: string;
|
|
19
|
+
blue: string;
|
|
20
|
+
purple: string;
|
|
21
|
+
grey: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommandItem, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
export declare class StatusBoxCommand {
|
|
3
|
+
static id: string;
|
|
4
|
+
static get commands(): CommandItem[];
|
|
5
|
+
static insertStatus(editor: OnesEditor, containerId: string, blockIndex: number): void;
|
|
6
|
+
static insertEmptyBlockStatus(editor: OnesEditor, containerId: string, blockIndex: number): import("@ones-editor/core").BlockElement;
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DocBlockTextOp } from '../../../@ones-editor/core';
|
|
2
|
+
import { StatusBoxData, StatusColor } from './types';
|
|
3
|
+
export declare function recordLastStatusBoxData(box: StatusBoxData): void;
|
|
4
|
+
export declare function getLastStatusBoxTitle(color: StatusColor): string;
|
|
5
|
+
export declare function createEmptyStatusBox(): DocBlockTextOp;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BoxElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
import { Popup } from '../../../@ones-editor/ui-base';
|
|
3
|
+
import { StatusColor } from './types';
|
|
4
|
+
import { StatusPalette } from './dom/status-palette';
|
|
5
|
+
export declare class StatusBoxEditor {
|
|
6
|
+
private editor;
|
|
7
|
+
linkPopup: Popup | null;
|
|
8
|
+
boxElement?: BoxElement;
|
|
9
|
+
statusPalette: StatusPalette;
|
|
10
|
+
isEditing: boolean;
|
|
11
|
+
constructor(editor: OnesEditor);
|
|
12
|
+
editorStatus: (boxElement: BoxElement) => void;
|
|
13
|
+
focus(): void;
|
|
14
|
+
handleShow: () => void;
|
|
15
|
+
handClose: () => void;
|
|
16
|
+
handleKeyDown: (e: KeyboardEvent) => void;
|
|
17
|
+
createPopupContent(title: string, color: StatusColor, subtle: boolean): HTMLDivElement;
|
|
18
|
+
onColorChange: (e: Event) => void;
|
|
19
|
+
onTitleChange: (e: Event) => void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DocBox } from '../../../@ones-editor/core';
|
|
2
|
+
export declare const STATUS_COLORS: readonly ["Blue", "Grey", "Yellow", "Red", "Green", "Purple"];
|
|
3
|
+
export type StatusColor = typeof STATUS_COLORS[number];
|
|
4
|
+
export interface StatusBoxData extends DocBox {
|
|
5
|
+
title: string;
|
|
6
|
+
subtle: boolean;
|
|
7
|
+
color: StatusColor;
|
|
8
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import TableBlock
|
|
1
|
+
import TableBlock from './table-block';
|
|
2
2
|
import { TableBlockCommandProvider } from './commands';
|
|
3
3
|
import './locale';
|
|
4
4
|
import './table-style.scss';
|
|
5
5
|
import TableShortcuts from './table-block/table-shortcuts';
|
|
6
6
|
export * from './types';
|
|
7
|
-
export { TableBlock, TableBlockCommandProvider, TableShortcuts
|
|
7
|
+
export { TableBlock, TableBlockCommandProvider, TableShortcuts };
|
|
@@ -15,4 +15,3 @@ export declare function getParentTableBlock(block: BlockElement): BlockElement |
|
|
|
15
15
|
export declare function getTableCol(table: HTMLTableElement, colIndex: number): HTMLTableColElement;
|
|
16
16
|
export declare function isValid(tableBlock: BlockElement): boolean;
|
|
17
17
|
export declare function resetBlockHelperPos(scrollContainer: ScrollContainer): void;
|
|
18
|
-
export declare function includeBigTable(editor: OnesEditor): boolean;
|