amis-editor-core 6.9.0-rc.9 → 6.9.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 +0 -3
- package/esm/index.d.ts +1 -4
- package/esm/index.js +2 -2
- package/esm/manager.d.ts +2 -13
- package/esm/plugin.d.ts +0 -4
- package/esm/store/editor.d.ts +36 -25
- package/lib/component/Editor.d.ts +0 -3
- package/lib/editor.js +1 -1
- package/lib/index.d.ts +1 -4
- package/lib/index.js +2 -2
- package/lib/manager.d.ts +2 -13
- package/lib/plugin.d.ts +0 -4
- package/lib/store/editor.d.ts +36 -25
- package/package.json +3 -4
- package/esm/component/ModalForm.d.ts +0 -25
- package/esm/deepSplice.d.ts +0 -12
- package/lib/component/ModalForm.d.ts +0 -25
- package/lib/deepSplice.d.ts +0 -12
package/esm/manager.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { EditorDNDManager } from './dnd';
|
|
|
10
10
|
import { VariableManager } from './variable';
|
|
11
11
|
import type { IScopedContext } from 'amis';
|
|
12
12
|
import type { SchemaObject, SchemaCollection } from 'amis';
|
|
13
|
-
import type {
|
|
13
|
+
import type { RendererConfig } from 'amis-core';
|
|
14
14
|
export interface EditorManagerConfig extends Omit<EditorProps, 'value' | 'onChange'> {
|
|
15
15
|
}
|
|
16
16
|
export interface PluginClass {
|
|
@@ -61,7 +61,6 @@ export declare class EditorManager {
|
|
|
61
61
|
dataSchema: DataSchema;
|
|
62
62
|
/** 变量管理 */
|
|
63
63
|
readonly variableManager: VariableManager;
|
|
64
|
-
fetch?: (api: Api, data?: any, options?: object) => Promise<Payload>;
|
|
65
64
|
constructor(config: EditorManagerConfig, store: EditorStoreType, parent?: EditorManager | undefined);
|
|
66
65
|
normalizeScene(plugins?: Array<PluginClass | [PluginClass, Record<string, any> | (() => Record<string, any>)]>): (PluginClass | [PluginClass, Record<string, any> | (() => Record<string, any>)])[];
|
|
67
66
|
dynamicAddPlugin(pluginName: string): void;
|
|
@@ -441,11 +440,6 @@ export declare class EditorManager {
|
|
|
441
440
|
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
442
441
|
calculateHighlightBox(root?: any): void;
|
|
443
442
|
resetHighlightBox(root: any): void;
|
|
444
|
-
/**
|
|
445
|
-
* 显示插入面板
|
|
446
|
-
* @param region
|
|
447
|
-
* @param preferTag
|
|
448
|
-
*/
|
|
449
443
|
updateState(state: any, replace?: boolean): void;
|
|
450
444
|
setWidthMutable(value: any): void;
|
|
451
445
|
setHeightMutable(value: any): void;
|
|
@@ -823,11 +817,6 @@ export declare class EditorManager {
|
|
|
823
817
|
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
824
818
|
calculateHighlightBox(root?: any): void;
|
|
825
819
|
resetHighlightBox(root: any): void;
|
|
826
|
-
/**
|
|
827
|
-
* 显示插入面板
|
|
828
|
-
* @param region
|
|
829
|
-
* @param preferTag
|
|
830
|
-
*/
|
|
831
820
|
updateState(state: any, replace?: boolean): void;
|
|
832
821
|
setWidthMutable(value: any): void;
|
|
833
822
|
setHeightMutable(value: any): void;
|
|
@@ -1050,7 +1039,7 @@ export declare class EditorManager {
|
|
|
1050
1039
|
toggleSelection(id: string): void;
|
|
1051
1040
|
setSelection(selections: Array<string>, id?: string): void;
|
|
1052
1041
|
startDrag(id: string, e: React.DragEvent): void;
|
|
1053
|
-
scaffold(form:
|
|
1042
|
+
scaffold(form: any, value: any): Promise<SchemaObject>;
|
|
1054
1043
|
reScaffold(id: string, form: ScaffoldForm, value: any): Promise<void>;
|
|
1055
1044
|
reScaffoldV2(id: string): Promise<void>;
|
|
1056
1045
|
lazyPatchSchema: import("lodash").DebouncedFunc<any>;
|
package/esm/plugin.d.ts
CHANGED
|
@@ -243,14 +243,11 @@ export interface PopOverForm {
|
|
|
243
243
|
* @deprecated 改用 body 代替
|
|
244
244
|
*/
|
|
245
245
|
controls?: Array<any>;
|
|
246
|
-
initApi?: any;
|
|
247
|
-
api?: any;
|
|
248
246
|
}
|
|
249
247
|
export interface ScaffoldForm extends PopOverForm {
|
|
250
248
|
stepsBody?: boolean;
|
|
251
249
|
/** 是否可跳过创建向导直接创建 */
|
|
252
250
|
canSkip?: boolean;
|
|
253
|
-
getSchema?: (value: any) => PopOverForm | Promise<PopOverForm>;
|
|
254
251
|
mode?: 'normal' | 'horizontal' | 'inline' | {
|
|
255
252
|
mode: string;
|
|
256
253
|
horizontal: any;
|
|
@@ -339,7 +336,6 @@ export interface PanelProps {
|
|
|
339
336
|
manager: EditorManager;
|
|
340
337
|
popOverContainer?: () => HTMLElement | void;
|
|
341
338
|
readonly?: boolean;
|
|
342
|
-
children?: React.ReactNode | ((props: PanelProps) => React.ReactNode);
|
|
343
339
|
}
|
|
344
340
|
/**
|
|
345
341
|
* 面板信息定义
|
package/esm/store/editor.d.ts
CHANGED
|
@@ -51,13 +51,6 @@ export interface PopOverFormContext extends PopOverForm {
|
|
|
51
51
|
callback: (value: any, diff: any) => void;
|
|
52
52
|
node?: EditorNodeType;
|
|
53
53
|
}
|
|
54
|
-
export interface ModalFormContext extends PopOverForm {
|
|
55
|
-
mode?: 'dialog' | 'drawer';
|
|
56
|
-
size?: string;
|
|
57
|
-
postion?: string;
|
|
58
|
-
value: any;
|
|
59
|
-
callback: (value: any, diff: any) => void;
|
|
60
|
-
}
|
|
61
54
|
/**
|
|
62
55
|
* 搜集的 name 信息
|
|
63
56
|
*/
|
|
@@ -448,7 +441,10 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
448
441
|
updateSchemaStyle(value: any): void;
|
|
449
442
|
setComponent(value: any): void;
|
|
450
443
|
getComponent(): any;
|
|
451
|
-
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
444
|
+
getTarget(): HTMLElement | HTMLElement[] | null; /**
|
|
445
|
+
* 根据当前分类和关键字获取预置组件
|
|
446
|
+
* 备注:组件面板展示需要
|
|
447
|
+
*/
|
|
452
448
|
calculateHighlightBox(root?: any): void;
|
|
453
449
|
resetHighlightBox(root: any): void;
|
|
454
450
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -507,10 +503,6 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
507
503
|
scaffoldFormBuzy: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
508
504
|
scaffoldError: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
509
505
|
popOverForm: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<PopOverFormContext, PopOverFormContext, PopOverFormContext>>;
|
|
510
|
-
modalForm: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<ModalFormContext, ModalFormContext, ModalFormContext>>;
|
|
511
|
-
modalMode: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
512
|
-
modalFormBuzy: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
513
|
-
modalFormError: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
514
506
|
subEditorContext: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<SubEditorContext, SubEditorContext, SubEditorContext>>;
|
|
515
507
|
superEditorData: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<any, any, any>>;
|
|
516
508
|
calculateStarted: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -524,7 +516,6 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
524
516
|
readonly filteredSchema: any;
|
|
525
517
|
readonly filteredSchemaForPreview: any;
|
|
526
518
|
isRootSchema(id: string): boolean;
|
|
527
|
-
readonly rootId: any;
|
|
528
519
|
getRootId(): any;
|
|
529
520
|
isHoved(id: string): boolean | "";
|
|
530
521
|
isActive(id: string): boolean | "";
|
|
@@ -905,7 +896,10 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
905
896
|
updateSchemaStyle(value: any): void;
|
|
906
897
|
setComponent(value: any): void;
|
|
907
898
|
getComponent(): any;
|
|
908
|
-
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
899
|
+
getTarget(): HTMLElement | HTMLElement[] | null; /**
|
|
900
|
+
* 根据当前分类和关键字获取预置组件
|
|
901
|
+
* 备注:组件面板展示需要
|
|
902
|
+
*/
|
|
909
903
|
calculateHighlightBox(root?: any): void;
|
|
910
904
|
resetHighlightBox(root: any): void;
|
|
911
905
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -1282,7 +1276,10 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
1282
1276
|
updateSchemaStyle(value: any): void;
|
|
1283
1277
|
setComponent(value: any): void;
|
|
1284
1278
|
getComponent(): any;
|
|
1285
|
-
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
1279
|
+
getTarget(): HTMLElement | HTMLElement[] | null; /**
|
|
1280
|
+
* 根据当前分类和关键字获取预置组件
|
|
1281
|
+
* 备注:组件面板展示需要
|
|
1282
|
+
*/
|
|
1286
1283
|
calculateHighlightBox(root?: any): void;
|
|
1287
1284
|
resetHighlightBox(root: any): void;
|
|
1288
1285
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -1682,7 +1679,10 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
1682
1679
|
updateSchemaStyle(value: any): void;
|
|
1683
1680
|
setComponent(value: any): void;
|
|
1684
1681
|
getComponent(): any;
|
|
1685
|
-
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
1682
|
+
getTarget(): HTMLElement | HTMLElement[] | null; /**
|
|
1683
|
+
* 根据当前分类和关键字获取预置组件
|
|
1684
|
+
* 备注:组件面板展示需要
|
|
1685
|
+
*/
|
|
1686
1686
|
calculateHighlightBox(root?: any): void;
|
|
1687
1687
|
resetHighlightBox(root: any): void;
|
|
1688
1688
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -2059,7 +2059,10 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
2059
2059
|
updateSchemaStyle(value: any): void;
|
|
2060
2060
|
setComponent(value: any): void;
|
|
2061
2061
|
getComponent(): any;
|
|
2062
|
-
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
2062
|
+
getTarget(): HTMLElement | HTMLElement[] | null; /**
|
|
2063
|
+
* 根据当前分类和关键字获取预置组件
|
|
2064
|
+
* 备注:组件面板展示需要
|
|
2065
|
+
*/
|
|
2063
2066
|
calculateHighlightBox(root?: any): void;
|
|
2064
2067
|
resetHighlightBox(root: any): void;
|
|
2065
2068
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -2437,7 +2440,10 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
2437
2440
|
updateSchemaStyle(value: any): void;
|
|
2438
2441
|
setComponent(value: any): void;
|
|
2439
2442
|
getComponent(): any;
|
|
2440
|
-
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
2443
|
+
getTarget(): HTMLElement | HTMLElement[] | null; /**
|
|
2444
|
+
* 根据当前分类和关键字获取预置组件
|
|
2445
|
+
* 备注:组件面板展示需要
|
|
2446
|
+
*/
|
|
2441
2447
|
calculateHighlightBox(root?: any): void;
|
|
2442
2448
|
resetHighlightBox(root: any): void;
|
|
2443
2449
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -2814,7 +2820,10 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
2814
2820
|
updateSchemaStyle(value: any): void;
|
|
2815
2821
|
setComponent(value: any): void;
|
|
2816
2822
|
getComponent(): any;
|
|
2817
|
-
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
2823
|
+
getTarget(): HTMLElement | HTMLElement[] | null; /**
|
|
2824
|
+
* 根据当前分类和关键字获取预置组件
|
|
2825
|
+
* 备注:组件面板展示需要
|
|
2826
|
+
*/
|
|
2818
2827
|
calculateHighlightBox(root?: any): void;
|
|
2819
2828
|
resetHighlightBox(root: any): void;
|
|
2820
2829
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -3192,7 +3201,10 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3192
3201
|
updateSchemaStyle(value: any): void;
|
|
3193
3202
|
setComponent(value: any): void;
|
|
3194
3203
|
getComponent(): any;
|
|
3195
|
-
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
3204
|
+
getTarget(): HTMLElement | HTMLElement[] | null; /**
|
|
3205
|
+
* 根据当前分类和关键字获取预置组件
|
|
3206
|
+
* 备注:组件面板展示需要
|
|
3207
|
+
*/
|
|
3196
3208
|
calculateHighlightBox(root?: any): void;
|
|
3197
3209
|
resetHighlightBox(root: any): void;
|
|
3198
3210
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -3569,7 +3581,10 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3569
3581
|
updateSchemaStyle(value: any): void;
|
|
3570
3582
|
setComponent(value: any): void;
|
|
3571
3583
|
getComponent(): any;
|
|
3572
|
-
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
3584
|
+
getTarget(): HTMLElement | HTMLElement[] | null; /**
|
|
3585
|
+
* 根据当前分类和关键字获取预置组件
|
|
3586
|
+
* 备注:组件面板展示需要
|
|
3587
|
+
*/
|
|
3573
3588
|
calculateHighlightBox(root?: any): void;
|
|
3574
3589
|
resetHighlightBox(root: any): void;
|
|
3575
3590
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -3736,10 +3751,6 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3736
3751
|
updateScaffoldData(value: any, replace?: boolean): void;
|
|
3737
3752
|
openPopOverForm(context: PopOverFormContext): void;
|
|
3738
3753
|
closePopOverForm(): void;
|
|
3739
|
-
openModalForm(context: ModalFormContext): void;
|
|
3740
|
-
closeModalForm(): void;
|
|
3741
|
-
markModalFormBuzy(value: any): void;
|
|
3742
|
-
setModalFormError(msg?: string): void;
|
|
3743
3754
|
activeHighlightNodes(ids: Array<string>): void;
|
|
3744
3755
|
deActiveHighlightNodes(ids: Array<string>): void;
|
|
3745
3756
|
calculateHighlightBox(ids?: Array<string>): void;
|
|
@@ -91,9 +91,6 @@ export interface EditorProps extends PluginEventListener {
|
|
|
91
91
|
getHostNodeDataSchema?: () => Promise<any>;
|
|
92
92
|
getAvaiableContextFields?: (node: EditorNodeType) => Promise<any>;
|
|
93
93
|
readonly?: boolean;
|
|
94
|
-
onEditorMount?: (manager: EditorManager) => void;
|
|
95
|
-
onEditorUnmount?: (manager: EditorManager) => void;
|
|
96
|
-
children?: React.ReactNode | ((manager: EditorManager) => React.ReactNode);
|
|
97
94
|
}
|
|
98
95
|
export default class Editor extends Component<EditorProps> {
|
|
99
96
|
readonly store: EditorStoreType;
|
package/lib/editor.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -39,9 +39,6 @@ import { UnknownRendererPlugin } from './plugin/Unknown';
|
|
|
39
39
|
import ShortcutKey from './component/base/ShortcutKey';
|
|
40
40
|
import WidthDraggableContainer from './component/base/WidthDraggableContainer';
|
|
41
41
|
import { SchemaFrom } from './component/base/SchemaForm';
|
|
42
|
-
import { RendererThumb } from './component/RendererThumb';
|
|
43
|
-
import { AvailableRenderersPanel } from './component/Panel/AvailableRenderersPanel';
|
|
44
|
-
import { deepSplice } from './deepSplice';
|
|
45
42
|
export declare const version = "__buildVersion";
|
|
46
43
|
export default Editor;
|
|
47
|
-
export { Editor, MiniEditor, utils,
|
|
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 };
|