amis-editor-core 6.13.0-beta.8 → 6.13.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/Preview.d.ts +2 -1
- package/esm/index.js +2 -2
- package/esm/manager.d.ts +6 -2
- package/esm/plugin/BasicToolbar.d.ts +2 -1
- package/esm/plugin.d.ts +5 -0
- package/lib/component/Preview.d.ts +2 -1
- package/lib/component/base/BackTop.d.ts +1 -1
- package/lib/dnd/default.d.ts +1 -1
- package/lib/dnd/flex.d.ts +1 -1
- package/lib/editor.js +1 -1
- package/lib/index.js +2 -2
- package/lib/layout/flex.d.ts +0 -1
- package/lib/manager.d.ts +6 -2
- package/lib/plugin/BasicToolbar.d.ts +2 -1
- package/lib/plugin.d.ts +5 -0
- package/lib/store/editor.d.ts +0 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/layout/flex.d.ts
CHANGED
package/lib/manager.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="lodash" />
|
|
3
3
|
import { DataSchema } from 'amis';
|
|
4
4
|
import { RenderOptions, GlobalVariableItem } from 'amis-core';
|
|
5
|
-
import { PluginInterface, BasicPanelItem, RendererInfo, SubRendererInfo, PluginEvent, RegionConfig, ContextMenuEventContext, EventContext, PluginEventFn, ScaffoldForm, RendererPluginEvent, PluginEvents, PluginActions, InlineEditableElement } from './plugin';
|
|
5
|
+
import { PluginInterface, BasicPanelItem, RendererInfo, SubRendererInfo, PluginEvent, RegionConfig, ContextMenuItem, ContextMenuEventContext, EventContext, PluginEventFn, ScaffoldForm, RendererPluginEvent, PluginEvents, PluginActions, InlineEditableElement } from './plugin';
|
|
6
6
|
import { EditorStoreType, SubEditorContext } from './store/editor';
|
|
7
7
|
import { EditorNodeType } from './store/node';
|
|
8
8
|
import { EditorProps } from './component/Editor';
|
|
@@ -953,8 +953,11 @@ export declare class EditorManager {
|
|
|
953
953
|
openContextMenu(id: string, region: string, info: {
|
|
954
954
|
x: number;
|
|
955
955
|
y: number;
|
|
956
|
+
clientX: number;
|
|
957
|
+
clientY: number;
|
|
958
|
+
target: HTMLElement;
|
|
956
959
|
}): void;
|
|
957
|
-
buildContextMenus(context: ContextMenuEventContext):
|
|
960
|
+
buildContextMenus(context: ContextMenuEventContext): ContextMenuItem[];
|
|
958
961
|
closeContextMenu(): void;
|
|
959
962
|
/**
|
|
960
963
|
* 自由容器内元素置于顶层
|
|
@@ -1156,6 +1159,7 @@ export declare class EditorManager {
|
|
|
1156
1159
|
*/
|
|
1157
1160
|
deleteGlobalVariable(variable: Partial<GlobalVariableItem>): Promise<any>;
|
|
1158
1161
|
beforeDispatchEvent(originHook: any, e: any, component: any, scoped: IScopedContext, data: any, broadcasts?: any): void;
|
|
1162
|
+
getThemeClassPrefix(): any;
|
|
1159
1163
|
/**
|
|
1160
1164
|
* 销毁函数
|
|
1161
1165
|
*/
|
|
@@ -6,7 +6,8 @@ export declare class BasicToolbarPlugin extends BasePlugin {
|
|
|
6
6
|
static scene: string[];
|
|
7
7
|
order: number;
|
|
8
8
|
buildEditorToolbar({ id, schema, info }: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
|
|
9
|
-
|
|
9
|
+
getElementsFromPoint(x: number, y: number, target: HTMLElement): Element[];
|
|
10
|
+
buildEditorContextMenu({ id, schema, region, info, selections, clientX, clientY, target }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
10
11
|
buildEditorPanel(context: BuildPanelEventContext, panels: Array<BasicPanelItem>): void;
|
|
11
12
|
afterInsert(event: PluginEvent<InsertEventContext>): void;
|
|
12
13
|
}
|
package/lib/plugin.d.ts
CHANGED
|
@@ -140,6 +140,7 @@ export interface InlineEditableElement {
|
|
|
140
140
|
* 渲染器信息。
|
|
141
141
|
*/
|
|
142
142
|
export interface RendererInfo extends RendererScaffoldInfo {
|
|
143
|
+
useLazyRender?: boolean;
|
|
143
144
|
scaffolds?: Array<Partial<RendererScaffoldInfo>>;
|
|
144
145
|
rendererName?: string;
|
|
145
146
|
/**
|
|
@@ -413,6 +414,9 @@ export interface ContextMenuEventContext extends BaseEventContext {
|
|
|
413
414
|
region: string;
|
|
414
415
|
selections: Array<BaseEventContext>;
|
|
415
416
|
data: Array<ContextMenuItem>;
|
|
417
|
+
clientX?: number;
|
|
418
|
+
clientY?: number;
|
|
419
|
+
target?: HTMLElement;
|
|
416
420
|
}
|
|
417
421
|
export interface SelectionEventContext extends BaseEventContext {
|
|
418
422
|
selections: Array<BaseEventContext>;
|
|
@@ -569,6 +573,7 @@ export interface PluginEventListener {
|
|
|
569
573
|
onMove(e: MouseEvent): void;
|
|
570
574
|
onEnd(e: MouseEvent): void;
|
|
571
575
|
}>) => void;
|
|
576
|
+
afterBuildPanelBody?: (event: PluginEvent<AfterBuildPanelBody>) => void;
|
|
572
577
|
onGlobalVariableInit?: (event: PluginEvent<GlobalVariablesEventContext>) => void;
|
|
573
578
|
onGlobalVariableDetail?: (event: PluginEvent<GlobalVariableEventContext>) => void;
|
|
574
579
|
onGlobalVariableSave?: (event: PluginEvent<GlobalVariableEventContext>) => void;
|
package/lib/store/editor.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { GlobalVariableItem } from 'amis-core';
|
|
3
2
|
import { Instance } from 'mobx-state-tree';
|
|
4
3
|
import { InsertEventContext, PluginEvent, RendererInfo, SubRendererInfo, ToolbarItem, PanelItem, MoveEventContext, ScaffoldForm, PopOverForm, DeleteEventContext, BaseEventContext, IGlobalEvent } from '../plugin';
|