amis-editor-core 6.2.1 → 6.3.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 +1 -1
- package/esm/component/HighlightBox.d.ts +2 -16
- package/esm/component/Panel/DialogList.d.ts +9 -0
- package/esm/component/Panel/Outline.d.ts +1 -1
- package/esm/component/Panel/RenderersPanel.d.ts +2 -0
- package/esm/component/RegionHLBox.d.ts +2 -4
- package/esm/component/base/SchemaForm.d.ts +24 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -2
- package/esm/manager.d.ts +2 -2
- package/esm/plugin.d.ts +1 -1
- package/esm/store/editor.d.ts +35 -16
- package/esm/util.d.ts +17 -9
- package/lib/component/Editor.d.ts +1 -1
- package/lib/component/HighlightBox.d.ts +2 -16
- package/lib/component/Panel/DialogList.d.ts +9 -0
- package/lib/component/Panel/Outline.d.ts +1 -1
- package/lib/component/Panel/RenderersPanel.d.ts +2 -0
- package/lib/component/RegionHLBox.d.ts +2 -4
- package/lib/component/base/BackTop.d.ts +1 -1
- package/lib/component/base/SchemaForm.d.ts +24 -0
- package/lib/editor.js +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -2
- package/lib/manager.d.ts +2 -2
- package/lib/plugin.d.ts +1 -1
- package/lib/store/editor.d.ts +35 -16
- package/lib/style.css +1 -1
- package/lib/util.d.ts +17 -9
- package/package.json +1 -1
package/lib/manager.d.ts
CHANGED
|
@@ -853,7 +853,7 @@ export declare class EditorManager {
|
|
|
853
853
|
* @param rendererIdOrSchema
|
|
854
854
|
* 备注:可以根据渲染器ID添加新元素,也可以根据现有schema片段添加新元素
|
|
855
855
|
*/
|
|
856
|
-
addElem(rendererIdOrSchema: string | any, reGenerateId?: boolean): Promise<void>;
|
|
856
|
+
addElem(rendererIdOrSchema: string | any, reGenerateId?: boolean, activeChild?: boolean): Promise<void>;
|
|
857
857
|
/**
|
|
858
858
|
* 判断当前节点是否可以添加同级节点
|
|
859
859
|
*/
|
|
@@ -908,7 +908,7 @@ export declare class EditorManager {
|
|
|
908
908
|
* @param value
|
|
909
909
|
* @param diff
|
|
910
910
|
*/
|
|
911
|
-
panelChangeValue(value: any, diff?: any): void;
|
|
911
|
+
panelChangeValue(value: any, diff?: any, changeFilter?: (schema: any, value: any, id: string, diff?: any) => any, id?: string): void;
|
|
912
912
|
/**
|
|
913
913
|
* 打开子编辑器,比如弹框什么的,没办法直接编辑器,靠弹窗个新的编辑器来编辑。
|
|
914
914
|
* @param config
|
package/lib/plugin.d.ts
CHANGED
|
@@ -676,7 +676,7 @@ export interface RendererPluginAction {
|
|
|
676
676
|
schema?: any;
|
|
677
677
|
supportComponents?: string[] | string;
|
|
678
678
|
innerArgs?: string[];
|
|
679
|
-
descDetail?: (info: any) => string | JSX.Element;
|
|
679
|
+
descDetail?: (info: any, context: any, props: any) => string | JSX.Element;
|
|
680
680
|
outputVarDataSchema?: any | any[];
|
|
681
681
|
actions?: SubRendererPluginAction[];
|
|
682
682
|
children?: RendererPluginAction[];
|
package/lib/store/editor.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { Instance } from 'mobx-state-tree';
|
|
|
3
3
|
import { InsertEventContext, PluginEvent, RendererInfo, SubRendererInfo, ToolbarItem, PanelItem, MoveEventContext, ScaffoldForm, PopOverForm } from '../plugin';
|
|
4
4
|
import type { Schema } from 'amis';
|
|
5
5
|
import { EditorNodeType } from './node';
|
|
6
|
+
import type { DialogSchema } from '../../../amis/src/renderers/Dialog';
|
|
7
|
+
import type { DrawerSchema } from '../../../amis/src/renderers/Drawer';
|
|
6
8
|
export interface SchemaHistory {
|
|
7
9
|
versionId: number;
|
|
8
10
|
schema: any;
|
|
@@ -57,6 +59,11 @@ export interface TargetName {
|
|
|
57
59
|
name: string;
|
|
58
60
|
editorId: string;
|
|
59
61
|
}
|
|
62
|
+
export type EditorModalBody = (DialogSchema | DrawerSchema) & {
|
|
63
|
+
$$id?: string;
|
|
64
|
+
$$ref?: string;
|
|
65
|
+
actionType?: string;
|
|
66
|
+
};
|
|
60
67
|
export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
61
68
|
isMobile: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
62
69
|
isSubEditor: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -415,7 +422,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
415
422
|
removeChild(child: any): void;
|
|
416
423
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
417
424
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
418
|
-
updateSchema(value: any): void;
|
|
425
|
+
updateSchema(value: any): void; /** 根据关键字过滤组件 */
|
|
419
426
|
updateSchemaStyle(value: any): void;
|
|
420
427
|
setComponent(value: any): void;
|
|
421
428
|
getComponent(): any;
|
|
@@ -429,8 +436,6 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
429
436
|
hoverId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
430
437
|
hoverRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
431
438
|
activeId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
432
|
-
previewDialogId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
433
|
-
activeDialogPath: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
434
439
|
activeRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
435
440
|
mouseMoveRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
436
441
|
selections: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<string[], string[], string[]>, [undefined]>;
|
|
@@ -853,7 +858,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
853
858
|
removeChild(child: any): void;
|
|
854
859
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
855
860
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
856
|
-
updateSchema(value: any): void;
|
|
861
|
+
updateSchema(value: any): void; /** 根据关键字过滤组件 */
|
|
857
862
|
updateSchemaStyle(value: any): void;
|
|
858
863
|
setComponent(value: any): void;
|
|
859
864
|
getComponent(): any;
|
|
@@ -1216,7 +1221,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
1216
1221
|
removeChild(child: any): void;
|
|
1217
1222
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
1218
1223
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
1219
|
-
updateSchema(value: any): void;
|
|
1224
|
+
updateSchema(value: any): void; /** 根据关键字过滤组件 */
|
|
1220
1225
|
updateSchemaStyle(value: any): void;
|
|
1221
1226
|
setComponent(value: any): void;
|
|
1222
1227
|
getComponent(): any;
|
|
@@ -1601,7 +1606,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
1601
1606
|
removeChild(child: any): void;
|
|
1602
1607
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
1603
1608
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
1604
|
-
updateSchema(value: any): void;
|
|
1609
|
+
updateSchema(value: any): void; /** 根据关键字过滤组件 */
|
|
1605
1610
|
updateSchemaStyle(value: any): void;
|
|
1606
1611
|
setComponent(value: any): void;
|
|
1607
1612
|
getComponent(): any;
|
|
@@ -1964,7 +1969,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
1964
1969
|
removeChild(child: any): void;
|
|
1965
1970
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
1966
1971
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
1967
|
-
updateSchema(value: any): void;
|
|
1972
|
+
updateSchema(value: any): void; /** 根据关键字过滤组件 */
|
|
1968
1973
|
updateSchemaStyle(value: any): void;
|
|
1969
1974
|
setComponent(value: any): void;
|
|
1970
1975
|
getComponent(): any;
|
|
@@ -2328,7 +2333,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
2328
2333
|
removeChild(child: any): void;
|
|
2329
2334
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
2330
2335
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
2331
|
-
updateSchema(value: any): void;
|
|
2336
|
+
updateSchema(value: any): void; /** 根据关键字过滤组件 */
|
|
2332
2337
|
updateSchemaStyle(value: any): void;
|
|
2333
2338
|
setComponent(value: any): void;
|
|
2334
2339
|
getComponent(): any;
|
|
@@ -2691,7 +2696,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
2691
2696
|
removeChild(child: any): void;
|
|
2692
2697
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
2693
2698
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
2694
|
-
updateSchema(value: any): void;
|
|
2699
|
+
updateSchema(value: any): void; /** 根据关键字过滤组件 */
|
|
2695
2700
|
updateSchemaStyle(value: any): void;
|
|
2696
2701
|
setComponent(value: any): void;
|
|
2697
2702
|
getComponent(): any;
|
|
@@ -3055,7 +3060,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3055
3060
|
removeChild(child: any): void;
|
|
3056
3061
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
3057
3062
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
3058
|
-
updateSchema(value: any): void;
|
|
3063
|
+
updateSchema(value: any): void; /** 根据关键字过滤组件 */
|
|
3059
3064
|
updateSchemaStyle(value: any): void;
|
|
3060
3065
|
setComponent(value: any): void;
|
|
3061
3066
|
getComponent(): any;
|
|
@@ -3418,7 +3423,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3418
3423
|
removeChild(child: any): void;
|
|
3419
3424
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
3420
3425
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
3421
|
-
updateSchema(value: any): void;
|
|
3426
|
+
updateSchema(value: any): void; /** 根据关键字过滤组件 */
|
|
3422
3427
|
updateSchemaStyle(value: any): void;
|
|
3423
3428
|
setComponent(value: any): void;
|
|
3424
3429
|
getComponent(): any;
|
|
@@ -3483,7 +3488,13 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3483
3488
|
readonly getSuperEditorData: any;
|
|
3484
3489
|
getComponentTreeSource(): any;
|
|
3485
3490
|
readonly scaffoldData: any;
|
|
3486
|
-
readonly
|
|
3491
|
+
readonly modals: any[];
|
|
3492
|
+
readonly modalOptions: {
|
|
3493
|
+
label: string;
|
|
3494
|
+
tip: string;
|
|
3495
|
+
value: any;
|
|
3496
|
+
$$ref: any;
|
|
3497
|
+
}[];
|
|
3487
3498
|
} & {
|
|
3488
3499
|
setLayer(value: any): void;
|
|
3489
3500
|
getLayer(): HTMLElement | undefined;
|
|
@@ -3500,8 +3511,6 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3500
3511
|
insertSchema(event: PluginEvent<InsertEventContext>): any;
|
|
3501
3512
|
moveSchema(event: PluginEvent<MoveEventContext>): void;
|
|
3502
3513
|
setActiveId(id: string, region?: string, selections?: Array<string>): void;
|
|
3503
|
-
setActiveDialogPath(path: string): void;
|
|
3504
|
-
setPreviewDialogId(id?: string): void;
|
|
3505
3514
|
setSelections(ids: Array<string>): void;
|
|
3506
3515
|
clearSelection(): void;
|
|
3507
3516
|
setHoverId(id: string, region?: string): void;
|
|
@@ -3527,9 +3536,9 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3527
3536
|
changeOutlineTabsKey(key: string): void;
|
|
3528
3537
|
changeLeftPanelOpenStatus(isOpenStatus: boolean): void;
|
|
3529
3538
|
showRendererPanel(tag?: string, msg?: string): void;
|
|
3530
|
-
changeValue(value: Schema, diff?: any): void;
|
|
3539
|
+
changeValue(value: Schema, diff?: any, changeFilter?: ((schema: any, value: any, id: string, diff?: any) => any) | undefined, id?: string): void;
|
|
3531
3540
|
definitionOnchangeValue(value: Schema, diff?: any): void;
|
|
3532
|
-
changeValueById(id: string, value: Schema, diff?: any, replace?: boolean, noTrace?: boolean): void;
|
|
3541
|
+
changeValueById(id: string, value: Schema, diff?: any, replace?: boolean, noTrace?: boolean, changeFilter?: ((schema: any, value: any, id: string, diff?: any) => any) | undefined): void;
|
|
3533
3542
|
batchChangeValue(list: Array<{
|
|
3534
3543
|
id: string;
|
|
3535
3544
|
value: Schema;
|
|
@@ -3555,6 +3564,16 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3555
3564
|
setInsertTag(tag: string): void;
|
|
3556
3565
|
setInsertSelected(id: string): void;
|
|
3557
3566
|
setJSONSchemaUri(schemaUri: string): void;
|
|
3567
|
+
addModal(modal?: DialogSchema | DrawerSchema, definitions?: any): void;
|
|
3568
|
+
/**
|
|
3569
|
+
* 计算具有指定ID的模态动作引用的数量
|
|
3570
|
+
*
|
|
3571
|
+
* @param id 模态动作的ID
|
|
3572
|
+
* @returns 返回模态动作引用的数量
|
|
3573
|
+
*/
|
|
3574
|
+
countModalActionRefs(id: string): number;
|
|
3575
|
+
removeModal(id: string): void;
|
|
3576
|
+
updateModal(id: string, modal: DialogSchema | DrawerSchema, definitions?: any): void;
|
|
3558
3577
|
openSubEditor(context: SubEditorContext): void;
|
|
3559
3578
|
confirmSubEditor([valueRaw]: any): void;
|
|
3560
3579
|
closeSubEditor(): void;
|