amis-editor-core 6.9.0-rc.6 → 6.9.0-rc.7
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 -7
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -2
- package/esm/manager.d.ts +17 -16
- package/esm/plugin.d.ts +2 -0
- package/esm/store/editor.d.ts +4 -3
- package/esm/util.d.ts +1 -3
- package/lib/component/Editor.d.ts +4 -7
- package/lib/dnd/flex.d.ts +1 -1
- package/lib/editor.js +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -2
- package/lib/manager.d.ts +17 -16
- package/lib/plugin.d.ts +2 -0
- package/lib/store/editor.d.ts +4 -3
- package/lib/util.d.ts +1 -3
- package/package.json +1 -1
package/lib/manager.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="lodash" />
|
|
3
3
|
import { DataSchema } from 'amis';
|
|
4
|
-
import {
|
|
5
|
-
import { PluginInterface, BasicPanelItem, RendererInfo, SubRendererInfo, PluginEvent, RegionConfig, ContextMenuItem, ContextMenuEventContext, EventContext, PluginEventFn, ScaffoldForm, RendererPluginEvent, PluginEvents, PluginActions } from './plugin';
|
|
4
|
+
import { PluginInterface, BasicPanelItem, RendererInfo, SubRendererInfo, PluginEvent, RegionConfig, ContextMenuEventContext, EventContext, PluginEventFn, ScaffoldForm, RendererPluginEvent, PluginEvents, PluginActions } from './plugin';
|
|
6
5
|
import { EditorStoreType, SubEditorContext } from './store/editor';
|
|
7
6
|
import { EditorNodeType } from './store/node';
|
|
8
7
|
import { EditorProps } from './component/Editor';
|
|
@@ -10,7 +9,7 @@ import { EditorDNDManager } from './dnd';
|
|
|
10
9
|
import { VariableManager } from './variable';
|
|
11
10
|
import type { IScopedContext } from 'amis';
|
|
12
11
|
import type { SchemaObject, SchemaCollection } from 'amis';
|
|
13
|
-
import type { RendererConfig } from 'amis-core';
|
|
12
|
+
import type { RendererConfig, RendererEnv } from 'amis-core';
|
|
14
13
|
export interface EditorManagerConfig extends Omit<EditorProps, 'value' | 'onChange'> {
|
|
15
14
|
}
|
|
16
15
|
export interface PluginClass {
|
|
@@ -48,7 +47,9 @@ export declare class EditorManager {
|
|
|
48
47
|
readonly store: EditorStoreType;
|
|
49
48
|
readonly parent?: EditorManager | undefined;
|
|
50
49
|
readonly plugins: Array<PluginInterface>;
|
|
51
|
-
readonly env:
|
|
50
|
+
readonly env: Omit<RendererEnv, 'theme'> & {
|
|
51
|
+
theme?: string;
|
|
52
|
+
};
|
|
52
53
|
toDispose: Array<() => void>;
|
|
53
54
|
readonly dnd: EditorDNDManager;
|
|
54
55
|
readonly id: any;
|
|
@@ -104,7 +105,7 @@ export declare class EditorManager {
|
|
|
104
105
|
setRendererConfig(value: RendererConfig): void;
|
|
105
106
|
readonly isVitualRenderer: boolean;
|
|
106
107
|
readonly clickable: boolean;
|
|
107
|
-
readonly draggable: boolean;
|
|
108
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
108
109
|
readonly moveable: boolean;
|
|
109
110
|
readonly canMoveUp: boolean;
|
|
110
111
|
readonly canMoveDown: boolean;
|
|
@@ -168,7 +169,7 @@ export declare class EditorManager {
|
|
|
168
169
|
setRendererConfig(value: RendererConfig): void;
|
|
169
170
|
readonly isVitualRenderer: boolean;
|
|
170
171
|
readonly clickable: boolean;
|
|
171
|
-
readonly draggable: boolean;
|
|
172
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
172
173
|
readonly moveable: boolean;
|
|
173
174
|
readonly canMoveUp: boolean;
|
|
174
175
|
readonly canMoveDown: boolean;
|
|
@@ -231,7 +232,7 @@ export declare class EditorManager {
|
|
|
231
232
|
setRendererConfig(value: RendererConfig): void;
|
|
232
233
|
readonly isVitualRenderer: boolean;
|
|
233
234
|
readonly clickable: boolean;
|
|
234
|
-
readonly draggable: boolean;
|
|
235
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
235
236
|
readonly moveable: boolean;
|
|
236
237
|
readonly canMoveUp: boolean;
|
|
237
238
|
readonly canMoveDown: boolean;
|
|
@@ -321,7 +322,7 @@ export declare class EditorManager {
|
|
|
321
322
|
setRendererConfig(value: RendererConfig): void;
|
|
322
323
|
readonly isVitualRenderer: boolean;
|
|
323
324
|
readonly clickable: boolean;
|
|
324
|
-
readonly draggable: boolean;
|
|
325
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
325
326
|
readonly moveable: boolean;
|
|
326
327
|
readonly canMoveUp: boolean;
|
|
327
328
|
readonly canMoveDown: boolean;
|
|
@@ -384,7 +385,7 @@ export declare class EditorManager {
|
|
|
384
385
|
setRendererConfig(value: RendererConfig): void;
|
|
385
386
|
readonly isVitualRenderer: boolean;
|
|
386
387
|
readonly clickable: boolean;
|
|
387
|
-
readonly draggable: boolean;
|
|
388
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
388
389
|
readonly moveable: boolean;
|
|
389
390
|
readonly canMoveUp: boolean;
|
|
390
391
|
readonly canMoveDown: boolean;
|
|
@@ -481,7 +482,7 @@ export declare class EditorManager {
|
|
|
481
482
|
setRendererConfig(value: RendererConfig): void;
|
|
482
483
|
readonly isVitualRenderer: boolean;
|
|
483
484
|
readonly clickable: boolean;
|
|
484
|
-
readonly draggable: boolean;
|
|
485
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
485
486
|
readonly moveable: boolean;
|
|
486
487
|
readonly canMoveUp: boolean;
|
|
487
488
|
readonly canMoveDown: boolean;
|
|
@@ -545,7 +546,7 @@ export declare class EditorManager {
|
|
|
545
546
|
setRendererConfig(value: RendererConfig): void;
|
|
546
547
|
readonly isVitualRenderer: boolean;
|
|
547
548
|
readonly clickable: boolean;
|
|
548
|
-
readonly draggable: boolean;
|
|
549
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
549
550
|
readonly moveable: boolean;
|
|
550
551
|
readonly canMoveUp: boolean;
|
|
551
552
|
readonly canMoveDown: boolean;
|
|
@@ -608,7 +609,7 @@ export declare class EditorManager {
|
|
|
608
609
|
setRendererConfig(value: RendererConfig): void;
|
|
609
610
|
readonly isVitualRenderer: boolean;
|
|
610
611
|
readonly clickable: boolean;
|
|
611
|
-
readonly draggable: boolean;
|
|
612
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
612
613
|
readonly moveable: boolean;
|
|
613
614
|
readonly canMoveUp: boolean;
|
|
614
615
|
readonly canMoveDown: boolean;
|
|
@@ -698,7 +699,7 @@ export declare class EditorManager {
|
|
|
698
699
|
setRendererConfig(value: RendererConfig): void;
|
|
699
700
|
readonly isVitualRenderer: boolean;
|
|
700
701
|
readonly clickable: boolean;
|
|
701
|
-
readonly draggable: boolean;
|
|
702
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
702
703
|
readonly moveable: boolean;
|
|
703
704
|
readonly canMoveUp: boolean;
|
|
704
705
|
readonly canMoveDown: boolean;
|
|
@@ -761,7 +762,7 @@ export declare class EditorManager {
|
|
|
761
762
|
setRendererConfig(value: RendererConfig): void;
|
|
762
763
|
readonly isVitualRenderer: boolean;
|
|
763
764
|
readonly clickable: boolean;
|
|
764
|
-
readonly draggable: boolean;
|
|
765
|
+
readonly draggable: boolean; /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */
|
|
765
766
|
readonly moveable: boolean;
|
|
766
767
|
readonly canMoveUp: boolean;
|
|
767
768
|
readonly canMoveDown: boolean;
|
|
@@ -953,7 +954,7 @@ export declare class EditorManager {
|
|
|
953
954
|
x: number;
|
|
954
955
|
y: number;
|
|
955
956
|
}): void;
|
|
956
|
-
buildContextMenus(context: ContextMenuEventContext):
|
|
957
|
+
buildContextMenus(context: ContextMenuEventContext): any[];
|
|
957
958
|
closeContextMenu(): void;
|
|
958
959
|
/**
|
|
959
960
|
* 将当前选中的节点上移
|
|
@@ -1039,7 +1040,7 @@ export declare class EditorManager {
|
|
|
1039
1040
|
toggleSelection(id: string): void;
|
|
1040
1041
|
setSelection(selections: Array<string>, id?: string): void;
|
|
1041
1042
|
startDrag(id: string, e: React.DragEvent): void;
|
|
1042
|
-
scaffold(form:
|
|
1043
|
+
scaffold(form: ScaffoldForm, value: any): Promise<SchemaObject>;
|
|
1043
1044
|
reScaffold(id: string, form: ScaffoldForm, value: any): Promise<void>;
|
|
1044
1045
|
reScaffoldV2(id: string): Promise<void>;
|
|
1045
1046
|
lazyPatchSchema: import("lodash").DebouncedFunc<any>;
|
package/lib/plugin.d.ts
CHANGED
|
@@ -250,6 +250,7 @@ export interface ScaffoldForm extends PopOverForm {
|
|
|
250
250
|
stepsBody?: boolean;
|
|
251
251
|
/** 是否可跳过创建向导直接创建 */
|
|
252
252
|
canSkip?: boolean;
|
|
253
|
+
getSchema?: (value: any) => PopOverForm | Promise<PopOverForm>;
|
|
253
254
|
mode?: 'normal' | 'horizontal' | 'inline' | {
|
|
254
255
|
mode: string;
|
|
255
256
|
horizontal: any;
|
|
@@ -338,6 +339,7 @@ export interface PanelProps {
|
|
|
338
339
|
manager: EditorManager;
|
|
339
340
|
popOverContainer?: () => HTMLElement | void;
|
|
340
341
|
readonly?: boolean;
|
|
342
|
+
children?: React.ReactNode | ((props: PanelProps) => React.ReactNode);
|
|
341
343
|
}
|
|
342
344
|
/**
|
|
343
345
|
* 面板信息定义
|
package/lib/store/editor.d.ts
CHANGED
|
@@ -523,6 +523,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
523
523
|
readonly filteredSchema: any;
|
|
524
524
|
readonly filteredSchemaForPreview: any;
|
|
525
525
|
isRootSchema(id: string): boolean;
|
|
526
|
+
readonly rootId: any;
|
|
526
527
|
getRootId(): any;
|
|
527
528
|
isHoved(id: string): boolean | "";
|
|
528
529
|
isActive(id: string): boolean | "";
|
|
@@ -3629,12 +3630,12 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3629
3630
|
readonly getSuperEditorData: any;
|
|
3630
3631
|
getComponentTreeSource(): any;
|
|
3631
3632
|
readonly scaffoldData: any;
|
|
3632
|
-
readonly modals:
|
|
3633
|
+
readonly modals: any[];
|
|
3633
3634
|
readonly modalOptions: {
|
|
3634
3635
|
label: string;
|
|
3635
3636
|
tip: string;
|
|
3636
|
-
value:
|
|
3637
|
-
$$ref:
|
|
3637
|
+
value: any;
|
|
3638
|
+
$$ref: any;
|
|
3638
3639
|
}[];
|
|
3639
3640
|
} & {
|
|
3640
3641
|
markReady(): void;
|
package/lib/util.d.ts
CHANGED
|
@@ -4,8 +4,6 @@ import type { VariableItem } from 'amis-ui';
|
|
|
4
4
|
import { Diff } from 'deep-diff';
|
|
5
5
|
import { EditorModalBody } from './store/editor';
|
|
6
6
|
import type { SchemaType } from 'amis/lib/Schema';
|
|
7
|
-
import type { DialogSchema } from 'amis/lib/renderers/Dialog';
|
|
8
|
-
import type { DrawerSchema } from 'amis/lib/renderers/Drawer';
|
|
9
7
|
declare const guid: any, omitControls: any, isObjectShallowModified: any, cloneObject: any, anyChanged: any, noop: any, makeHorizontalDeeper: any, isEmpty: any, eachTree: any, createObject: any;
|
|
10
8
|
export { guid, isObjectShallowModified, anyChanged, noop, makeHorizontalDeeper, omitControls, isEmpty, cloneObject, eachTree, createObject };
|
|
11
9
|
export declare let themeConfig: any;
|
|
@@ -198,7 +196,7 @@ export declare function modalsToDefinitions(modals: Array<EditorModalBody>, defi
|
|
|
198
196
|
*/
|
|
199
197
|
export declare function mergeDefinitions(originSchema: any, definitions: any, modal: any): any;
|
|
200
198
|
export declare function setDefaultColSize(regionList: any[], row: number, preRow?: number): any[];
|
|
201
|
-
export declare function getModals(schema: any):
|
|
199
|
+
export declare function getModals(schema: any): any[];
|
|
202
200
|
/**
|
|
203
201
|
* 深度 splice 数组,同时返回新的对象,按需拷贝,没有副作用
|
|
204
202
|
* @param target
|