amis-editor-core 6.4.0 → 6.5.0
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/esm/component/Editor.d.ts +4 -0
- package/esm/component/Panel/AMisCodeEditor.d.ts +1 -1
- package/esm/component/Panel/CodeEditorPanel.d.ts +1 -1
- package/esm/dnd/flex.d.ts +50 -0
- package/esm/dnd/interface.d.ts +2 -0
- package/esm/index.d.ts +6 -1
- package/esm/index.js +2 -2
- package/esm/layout/default.d.ts +3 -0
- package/esm/layout/flex.d.ts +3711 -0
- package/esm/layout/index.d.ts +3 -0
- package/esm/layout/interface.d.ts +16 -0
- package/esm/manager.d.ts +16 -11
- package/esm/plugin/Unknown.d.ts +1 -1
- package/esm/plugin.d.ts +10 -3
- package/esm/store/editor.d.ts +141 -49
- package/esm/util.d.ts +1 -0
- package/lib/component/Editor.d.ts +4 -0
- package/lib/component/Panel/AMisCodeEditor.d.ts +1 -1
- package/lib/component/Panel/CodeEditorPanel.d.ts +1 -1
- package/lib/dnd/flex.d.ts +50 -0
- package/lib/dnd/interface.d.ts +2 -0
- package/lib/editor.js +1 -1
- package/lib/index.d.ts +6 -1
- package/lib/index.js +2 -2
- package/lib/layout/default.d.ts +3 -0
- package/lib/layout/flex.d.ts +3711 -0
- package/lib/layout/index.d.ts +3 -0
- package/lib/layout/interface.d.ts +16 -0
- package/lib/manager.d.ts +16 -11
- package/lib/plugin/Unknown.d.ts +1 -1
- package/lib/plugin.d.ts +10 -3
- package/lib/store/editor.d.ts +141 -49
- package/lib/style.css +1 -1
- package/lib/util.d.ts +1 -0
- package/package.json +3 -3
|
@@ -17,6 +17,10 @@ export interface EditorProps extends PluginEventListener {
|
|
|
17
17
|
$schemaUrl?: string;
|
|
18
18
|
schemas?: Array<any>;
|
|
19
19
|
theme?: string;
|
|
20
|
+
/** 工具栏模式 */
|
|
21
|
+
toolbarMode?: 'default' | 'mini';
|
|
22
|
+
/** 是否需要弹框 */
|
|
23
|
+
noDialog?: boolean;
|
|
20
24
|
/** 应用语言类型 */
|
|
21
25
|
appLocale?: string;
|
|
22
26
|
/** 是否开启多语言 */
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { EditorDNDManager } from '.';
|
|
2
|
+
import { EditorNodeType } from '../store/node';
|
|
3
|
+
import { DNDModeInterface } from './interface';
|
|
4
|
+
export declare class FlexDNDMode implements DNDModeInterface {
|
|
5
|
+
readonly dnd: EditorDNDManager;
|
|
6
|
+
readonly region: EditorNodeType;
|
|
7
|
+
readonly dndContainer: HTMLElement;
|
|
8
|
+
dropBeforeId?: string;
|
|
9
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
10
|
+
maxRolLength: number;
|
|
11
|
+
dragNode?: any;
|
|
12
|
+
dragId: string;
|
|
13
|
+
store: any;
|
|
14
|
+
constructor(dnd: EditorDNDManager, region: EditorNodeType, config: any);
|
|
15
|
+
/**
|
|
16
|
+
* 首次拖入,把 ghost 插入进来。让用户有个直观感受。
|
|
17
|
+
* @param e
|
|
18
|
+
* @param ghost
|
|
19
|
+
*/
|
|
20
|
+
enter(e: DragEvent, ghost: HTMLElement): void;
|
|
21
|
+
/**
|
|
22
|
+
* 拖出去了,就移除 ghost
|
|
23
|
+
* @param e
|
|
24
|
+
* @param ghost
|
|
25
|
+
*/
|
|
26
|
+
leave(e: DragEvent, ghost: HTMLElement): void;
|
|
27
|
+
over(e: DragEvent, ghost: HTMLElement): void;
|
|
28
|
+
clearGhostStyle(ghost: HTMLElement): void;
|
|
29
|
+
/**
|
|
30
|
+
* 返回个相对位置,如果没有数据会插入到结尾。
|
|
31
|
+
*/
|
|
32
|
+
getDropBeforeId(): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* 获取当时拖动到了哪个节点上面。
|
|
35
|
+
*/
|
|
36
|
+
getTarget(col: Element | null): HTMLElement;
|
|
37
|
+
/**
|
|
38
|
+
* 获取区域的直接孩子,因为有时候会在孩子的孩子里面。
|
|
39
|
+
* 但是插入 ghost 的相对位置,insertBefore 只能是当前孩子。
|
|
40
|
+
* @param dom
|
|
41
|
+
* @param descend
|
|
42
|
+
*/
|
|
43
|
+
getChild(dom: HTMLElement, descend: HTMLElement): HTMLElement;
|
|
44
|
+
/**
|
|
45
|
+
* 销毁
|
|
46
|
+
*/
|
|
47
|
+
dispose(): void;
|
|
48
|
+
getDropPosition(): "left" | "right" | "bottom" | "top" | undefined;
|
|
49
|
+
interruptionDrop(): boolean;
|
|
50
|
+
}
|
package/esm/dnd/interface.d.ts
CHANGED
|
@@ -11,4 +11,6 @@ export interface DNDModeInterface {
|
|
|
11
11
|
over: (e: DragEvent, ghost: HTMLElement) => void;
|
|
12
12
|
getDropBeforeId: () => string | undefined;
|
|
13
13
|
dispose: () => void;
|
|
14
|
+
getDropPosition?: () => 'top' | 'bottom' | 'left' | 'right' | undefined;
|
|
15
|
+
interruptionDrop?: () => boolean;
|
|
14
16
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -31,9 +31,14 @@ import type { EditorNodeType, EditorNodeSnapshot } from './store/node';
|
|
|
31
31
|
import { ContainerWrapper } from './component/ContainerWrapper';
|
|
32
32
|
import type { EditorStoreType } from './store/editor';
|
|
33
33
|
import { AvailableRenderersPlugin } from './plugin/AvailableRenderers';
|
|
34
|
+
import { BasicToolbarPlugin } from './plugin/BasicToolbar';
|
|
35
|
+
import { CodePlugin } from './plugin/Code';
|
|
36
|
+
import { ErrorRendererPlugin } from './plugin/ErrorRenderer';
|
|
37
|
+
import { OutlinePlugin } from './plugin/Outline';
|
|
38
|
+
import { UnknownRendererPlugin } from './plugin/Unknown';
|
|
34
39
|
import ShortcutKey from './component/base/ShortcutKey';
|
|
35
40
|
import WidthDraggableContainer from './component/base/WidthDraggableContainer';
|
|
36
41
|
import { SchemaFrom } from './component/base/SchemaForm';
|
|
37
42
|
export declare const version = "__buildVersion";
|
|
38
43
|
export default Editor;
|
|
39
|
-
export { Editor, MiniEditor, utils, mapReactElement, RendererEditor, BasicEditor, CodeEditor, VRenderer, RegionWrapper, IFramePreview as IFrameEditor, SearchPanel, EditorNodeType, EditorNodeSnapshot, EditorStoreType, ContainerWrapper, AvailableRenderersPlugin, ShortcutKey, SchemaFrom, WidthDraggableContainer };
|
|
44
|
+
export { Editor, MiniEditor, utils, mapReactElement, RendererEditor, BasicEditor, CodeEditor, VRenderer, RegionWrapper, IFramePreview as IFrameEditor, SearchPanel, EditorNodeType, EditorNodeSnapshot, EditorStoreType, ContainerWrapper, AvailableRenderersPlugin, BasicToolbarPlugin, CodePlugin, ErrorRendererPlugin, OutlinePlugin, UnknownRendererPlugin, ShortcutKey, SchemaFrom, WidthDraggableContainer };
|