amis-editor-core 6.6.0 → 6.8.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 -0
- package/esm/component/FormConfigWrapper.d.ts +6 -0
- package/esm/component/HighlightBox.d.ts +2 -1
- package/esm/component/Panel/Outline.d.ts +5 -1
- package/esm/component/Panel/RightPanels.d.ts +2 -0
- package/esm/component/Preview.d.ts +2 -0
- package/esm/component/RegionWrapper.d.ts +28 -0
- package/esm/component/SubEditor.d.ts +3 -0
- package/esm/component/VRenderer.d.ts +28 -0
- package/esm/dnd/index.d.ts +0 -11
- package/esm/index.js +2 -2
- package/esm/layout/flex.d.ts +140 -0
- package/esm/manager.d.ts +40 -12
- package/esm/plugin.d.ts +6 -0
- package/esm/store/editor.d.ts +186 -146
- package/esm/store/node.d.ts +27 -0
- package/esm/util.d.ts +15 -0
- package/lib/component/Editor.d.ts +1 -0
- package/lib/component/FormConfigWrapper.d.ts +6 -0
- package/lib/component/HighlightBox.d.ts +2 -1
- package/lib/component/Panel/Outline.d.ts +5 -1
- package/lib/component/Panel/RightPanels.d.ts +2 -0
- package/lib/component/Preview.d.ts +2 -0
- package/lib/component/RegionWrapper.d.ts +28 -0
- package/lib/component/SubEditor.d.ts +3 -0
- package/lib/component/VRenderer.d.ts +28 -0
- package/lib/dnd/index.d.ts +0 -11
- package/lib/editor.js +1 -1
- package/lib/index.js +2 -2
- package/lib/layout/flex.d.ts +140 -1
- package/lib/manager.d.ts +40 -12
- package/lib/plugin.d.ts +6 -0
- package/lib/store/editor.d.ts +186 -147
- package/lib/store/node.d.ts +27 -0
- package/lib/style.css +1 -1
- package/lib/util.d.ts +15 -0
- package/package.json +1 -1
package/esm/store/node.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const EditorNode: import("mobx-state-tree").IModelType<{
|
|
|
9
9
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
10
10
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
11
11
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
12
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
12
13
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
13
14
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
14
15
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -35,6 +36,7 @@ export declare const EditorNode: import("mobx-state-tree").IModelType<{
|
|
|
35
36
|
} & {
|
|
36
37
|
readonly info: RendererInfo;
|
|
37
38
|
getNodeById(id: string, regionOrType?: string): any;
|
|
39
|
+
getNodeByComponentId(id: string): any;
|
|
38
40
|
setInfo(value: RendererInfo): void;
|
|
39
41
|
updateSharedContext(value: Record<string, any>): void;
|
|
40
42
|
readonly rendererConfig: any;
|
|
@@ -72,6 +74,7 @@ export declare const EditorNode: import("mobx-state-tree").IModelType<{
|
|
|
72
74
|
parentId: string;
|
|
73
75
|
parentRegion: string;
|
|
74
76
|
isCommonConfig: boolean;
|
|
77
|
+
isFormConfig: boolean;
|
|
75
78
|
id: string;
|
|
76
79
|
type: string;
|
|
77
80
|
label: string;
|
|
@@ -98,6 +101,7 @@ export declare const EditorNode: import("mobx-state-tree").IModelType<{
|
|
|
98
101
|
} & {
|
|
99
102
|
readonly info: RendererInfo;
|
|
100
103
|
getNodeById(id: string, regionOrType?: string): any;
|
|
104
|
+
getNodeByComponentId(id: string): any;
|
|
101
105
|
setInfo(value: RendererInfo): void;
|
|
102
106
|
updateSharedContext(value: Record<string, any>): void;
|
|
103
107
|
readonly rendererConfig: any;
|
|
@@ -133,6 +137,7 @@ export declare const EditorNode: import("mobx-state-tree").IModelType<{
|
|
|
133
137
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
134
138
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
135
139
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
140
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
136
141
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
137
142
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
138
143
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -159,6 +164,7 @@ export declare const EditorNode: import("mobx-state-tree").IModelType<{
|
|
|
159
164
|
} & {
|
|
160
165
|
readonly info: RendererInfo;
|
|
161
166
|
getNodeById(id: string, regionOrType?: string): any;
|
|
167
|
+
getNodeByComponentId(id: string): any;
|
|
162
168
|
setInfo(value: RendererInfo): void;
|
|
163
169
|
updateSharedContext(value: Record<string, any>): void;
|
|
164
170
|
readonly rendererConfig: any;
|
|
@@ -192,12 +198,14 @@ export declare const EditorNode: import("mobx-state-tree").IModelType<{
|
|
|
192
198
|
readonly isSecondFactor: boolean;
|
|
193
199
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
194
200
|
updateIsCommonConfig: (value: boolean) => void;
|
|
201
|
+
updateIsFormConfig: (value: boolean) => void;
|
|
195
202
|
addChild(props: {
|
|
196
203
|
id: string;
|
|
197
204
|
type: string;
|
|
198
205
|
label: string;
|
|
199
206
|
path: string;
|
|
200
207
|
isCommonConfig?: boolean;
|
|
208
|
+
isFormConfig?: boolean;
|
|
201
209
|
info?: RendererInfo;
|
|
202
210
|
region?: string;
|
|
203
211
|
getData?: () => any;
|
|
@@ -216,6 +224,7 @@ export declare const EditorNode: import("mobx-state-tree").IModelType<{
|
|
|
216
224
|
updateSchemaStyle(value: any): void;
|
|
217
225
|
setComponent(value: any): void;
|
|
218
226
|
getComponent(): any;
|
|
227
|
+
getTarget(): null | HTMLElement | Array<HTMLElement>;
|
|
219
228
|
/**
|
|
220
229
|
* 计算高亮区域信息。
|
|
221
230
|
* @param layer
|
|
@@ -231,6 +240,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
231
240
|
parentId: string;
|
|
232
241
|
parentRegion: string;
|
|
233
242
|
isCommonConfig: boolean;
|
|
243
|
+
isFormConfig: boolean;
|
|
234
244
|
id: string;
|
|
235
245
|
type: string;
|
|
236
246
|
label: string;
|
|
@@ -257,6 +267,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
257
267
|
} & {
|
|
258
268
|
readonly info: RendererInfo;
|
|
259
269
|
getNodeById(id: string, regionOrType?: string): any;
|
|
270
|
+
getNodeByComponentId(id: string): any;
|
|
260
271
|
setInfo(value: RendererInfo): void;
|
|
261
272
|
updateSharedContext(value: Record<string, any>): void;
|
|
262
273
|
readonly rendererConfig: any;
|
|
@@ -294,6 +305,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
294
305
|
parentId: string;
|
|
295
306
|
parentRegion: string;
|
|
296
307
|
isCommonConfig: boolean;
|
|
308
|
+
isFormConfig: boolean;
|
|
297
309
|
id: string;
|
|
298
310
|
type: string;
|
|
299
311
|
label: string;
|
|
@@ -320,6 +332,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
320
332
|
} & {
|
|
321
333
|
readonly info: RendererInfo;
|
|
322
334
|
getNodeById(id: string, regionOrType?: string): any;
|
|
335
|
+
getNodeByComponentId(id: string): any;
|
|
323
336
|
setInfo(value: RendererInfo): void;
|
|
324
337
|
updateSharedContext(value: Record<string, any>): void;
|
|
325
338
|
readonly rendererConfig: any;
|
|
@@ -355,6 +368,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
355
368
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
356
369
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
357
370
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
371
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
358
372
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
359
373
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
360
374
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -381,6 +395,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
381
395
|
} & {
|
|
382
396
|
readonly info: RendererInfo;
|
|
383
397
|
getNodeById(id: string, regionOrType?: string): any;
|
|
398
|
+
getNodeByComponentId(id: string): any;
|
|
384
399
|
setInfo(value: RendererInfo): void;
|
|
385
400
|
updateSharedContext(value: Record<string, any>): void;
|
|
386
401
|
readonly rendererConfig: any;
|
|
@@ -414,12 +429,14 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
414
429
|
readonly isSecondFactor: boolean;
|
|
415
430
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
416
431
|
updateIsCommonConfig: (value: boolean) => void;
|
|
432
|
+
updateIsFormConfig: (value: boolean) => void;
|
|
417
433
|
addChild(props: {
|
|
418
434
|
id: string;
|
|
419
435
|
type: string;
|
|
420
436
|
label: string;
|
|
421
437
|
path: string;
|
|
422
438
|
isCommonConfig?: boolean;
|
|
439
|
+
isFormConfig?: boolean;
|
|
423
440
|
info?: RendererInfo;
|
|
424
441
|
region?: string;
|
|
425
442
|
getData?: () => any;
|
|
@@ -438,6 +455,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
438
455
|
updateSchemaStyle(value: any): void;
|
|
439
456
|
setComponent(value: any): void;
|
|
440
457
|
getComponent(): any;
|
|
458
|
+
getTarget(): null | HTMLElement | Array<HTMLElement>;
|
|
441
459
|
/**
|
|
442
460
|
* 计算高亮区域信息。
|
|
443
461
|
* @param layer
|
|
@@ -452,6 +470,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
452
470
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
453
471
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
454
472
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
473
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
455
474
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
456
475
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
457
476
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -478,6 +497,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
478
497
|
} & {
|
|
479
498
|
readonly info: RendererInfo;
|
|
480
499
|
getNodeById(id: string, regionOrType?: string): any;
|
|
500
|
+
getNodeByComponentId(id: string): any;
|
|
481
501
|
setInfo(value: RendererInfo): void;
|
|
482
502
|
updateSharedContext(value: Record<string, any>): void;
|
|
483
503
|
readonly rendererConfig: any;
|
|
@@ -515,6 +535,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
515
535
|
parentId: string;
|
|
516
536
|
parentRegion: string;
|
|
517
537
|
isCommonConfig: boolean;
|
|
538
|
+
isFormConfig: boolean;
|
|
518
539
|
id: string;
|
|
519
540
|
type: string;
|
|
520
541
|
label: string;
|
|
@@ -541,6 +562,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
541
562
|
} & {
|
|
542
563
|
readonly info: RendererInfo;
|
|
543
564
|
getNodeById(id: string, regionOrType?: string): any;
|
|
565
|
+
getNodeByComponentId(id: string): any;
|
|
544
566
|
setInfo(value: RendererInfo): void;
|
|
545
567
|
updateSharedContext(value: Record<string, any>): void;
|
|
546
568
|
readonly rendererConfig: any;
|
|
@@ -576,6 +598,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
576
598
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
577
599
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
578
600
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
601
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
579
602
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
580
603
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
581
604
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -602,6 +625,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
602
625
|
} & {
|
|
603
626
|
readonly info: RendererInfo;
|
|
604
627
|
getNodeById(id: string, regionOrType?: string): any;
|
|
628
|
+
getNodeByComponentId(id: string): any;
|
|
605
629
|
setInfo(value: RendererInfo): void;
|
|
606
630
|
updateSharedContext(value: Record<string, any>): void;
|
|
607
631
|
readonly rendererConfig: any;
|
|
@@ -635,12 +659,14 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
635
659
|
readonly isSecondFactor: boolean;
|
|
636
660
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
637
661
|
updateIsCommonConfig: (value: boolean) => void;
|
|
662
|
+
updateIsFormConfig: (value: boolean) => void;
|
|
638
663
|
addChild(props: {
|
|
639
664
|
id: string;
|
|
640
665
|
type: string;
|
|
641
666
|
label: string;
|
|
642
667
|
path: string;
|
|
643
668
|
isCommonConfig?: boolean;
|
|
669
|
+
isFormConfig?: boolean;
|
|
644
670
|
info?: RendererInfo;
|
|
645
671
|
region?: string;
|
|
646
672
|
getData?: () => any;
|
|
@@ -659,6 +685,7 @@ export declare const EditorNodeContext: React.Context<({
|
|
|
659
685
|
updateSchemaStyle(value: any): void;
|
|
660
686
|
setComponent(value: any): void;
|
|
661
687
|
getComponent(): any;
|
|
688
|
+
getTarget(): null | HTMLElement | Array<HTMLElement>;
|
|
662
689
|
/**
|
|
663
690
|
* 计算高亮区域信息。
|
|
664
691
|
* @param layer
|
package/esm/util.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ import type { Schema } from 'amis';
|
|
|
3
3
|
import type { VariableItem } from 'amis-ui';
|
|
4
4
|
import { Diff } from 'deep-diff';
|
|
5
5
|
import { EditorModalBody } from './store/editor';
|
|
6
|
+
import type { SchemaType } from 'amis/lib/Schema';
|
|
6
7
|
declare const guid: any, omitControls: any, isObjectShallowModified: any, cloneObject: any, anyChanged: any, noop: any, makeHorizontalDeeper: any, isEmpty: any, eachTree: any, createObject: any;
|
|
7
8
|
export { guid, isObjectShallowModified, anyChanged, noop, makeHorizontalDeeper, omitControls, isEmpty, cloneObject, eachTree, createObject };
|
|
8
9
|
export declare let themeConfig: any;
|
|
9
10
|
export declare let themeOptionsData: any;
|
|
11
|
+
export declare let cssVars: any;
|
|
10
12
|
export declare function __uri(id: string): string;
|
|
11
13
|
export declare function cleanUndefined(obj: any): any;
|
|
12
14
|
/**
|
|
@@ -19,6 +21,7 @@ export declare function JSONPipeOut(obj: any, filterHiddenProps?: boolean | ((ke
|
|
|
19
21
|
export declare function JSONGetByPath(json: any, paths: Array<string>, stacks?: Array<any>): any;
|
|
20
22
|
export declare function JSONGetPathById(json: any, id: string, idKey?: string): Array<string> | null;
|
|
21
23
|
export declare function JSONGetById(json: any, id: string, idKey?: string): any;
|
|
24
|
+
export declare function JSONGetNodesById(json: any, id: string, idKey?: string): Array<any>;
|
|
22
25
|
export declare function JSONGetParentById(json: any, id: string, skipArray?: boolean): any;
|
|
23
26
|
export declare function JSONUpdate(json: any, id: string, value: any, replace?: boolean): any;
|
|
24
27
|
export declare function JSONDelete(json: any, id: string, pathsRef?: Array<string>, deleteIfEmpty?: boolean): any;
|
|
@@ -129,6 +132,14 @@ export declare function appTranslate(value?: string): any;
|
|
|
129
132
|
*/
|
|
130
133
|
export declare function needFillPlaceholder(curProps: any): boolean;
|
|
131
134
|
export declare function setThemeConfig(config: any): void;
|
|
135
|
+
/**
|
|
136
|
+
* 获取组件的css变量
|
|
137
|
+
* @param id 组件id
|
|
138
|
+
* @param selectorText 选择器
|
|
139
|
+
* @returns css变量
|
|
140
|
+
*/
|
|
141
|
+
export declare function getCssVarById(id: string, selectorText: string): PlainObject;
|
|
142
|
+
export declare function getAllCssVar(): any;
|
|
132
143
|
export declare function getThemeConfig(): any;
|
|
133
144
|
/**
|
|
134
145
|
* 将style转换为组件ThemeCSS格式
|
|
@@ -185,3 +196,7 @@ export declare function modalsToDefinitions(modals: Array<EditorModalBody>, defi
|
|
|
185
196
|
*/
|
|
186
197
|
export declare function mergeDefinitions(originSchema: any, definitions: any, modal: any): any;
|
|
187
198
|
export declare function setDefaultColSize(regionList: any[], row: number, preRow?: number): any[];
|
|
199
|
+
export declare function getModals(schema: any): any[];
|
|
200
|
+
export declare const RAW_TYPE_MAP: {
|
|
201
|
+
[k in SchemaType | 'user-select' | 'department-select']?: 'string' | 'number' | 'array' | 'boolean' | 'object' | 'enum' | 'date' | 'datetime' | 'time' | 'quarter' | 'year' | 'month' | 'user' | 'department';
|
|
202
|
+
};
|
|
@@ -90,6 +90,7 @@ export interface EditorProps extends PluginEventListener {
|
|
|
90
90
|
}) => Promise<void | boolean>;
|
|
91
91
|
getHostNodeDataSchema?: () => Promise<any>;
|
|
92
92
|
getAvaiableContextFields?: (node: EditorNodeType) => Promise<any>;
|
|
93
|
+
readonly?: boolean;
|
|
93
94
|
}
|
|
94
95
|
export default class Editor extends Component<EditorProps> {
|
|
95
96
|
readonly store: EditorStoreType;
|
|
@@ -12,6 +12,7 @@ export interface HighlightBoxProps {
|
|
|
12
12
|
onSwitch?: (id: string) => void;
|
|
13
13
|
manager: EditorManager;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
|
+
readonly?: boolean;
|
|
15
16
|
}
|
|
16
|
-
declare const _default: ({ className, store, id, title, children, node, toolbarContainer, onSwitch, manager }: HighlightBoxProps) => React.JSX.Element;
|
|
17
|
+
declare const _default: ({ className, store, id, title, children, node, toolbarContainer, onSwitch, manager, readonly }: HighlightBoxProps) => React.JSX.Element;
|
|
17
18
|
export default _default;
|
|
@@ -6,17 +6,21 @@ export declare class OutlinePanel extends React.Component<PanelProps> {
|
|
|
6
6
|
state: {
|
|
7
7
|
curSearchElemKey: string;
|
|
8
8
|
};
|
|
9
|
+
dragEnterCount: number;
|
|
9
10
|
handleClick(e: React.MouseEvent<HTMLAnchorElement>): void;
|
|
10
11
|
handleDialogNodeClick(e: React.MouseEvent<HTMLAnchorElement>, option: Schema): void;
|
|
11
12
|
handleEnter(e: React.MouseEvent): void;
|
|
12
13
|
handleTabChange(key: string): void;
|
|
13
14
|
handleDragStart(e: React.DragEvent): void;
|
|
15
|
+
timer: any;
|
|
16
|
+
handleDragEnter(e: React.DragEvent): void;
|
|
14
17
|
handleDragOver(e: React.DragEvent): void;
|
|
15
18
|
handleDrop(e: React.DragEvent): void;
|
|
16
19
|
handleSearchElemKeyChange(searchVal: string): void;
|
|
17
20
|
clearSearchElemKey(): void;
|
|
18
21
|
renderTitleByKeyword(rendererTitle: string, curSearchTitle: string): string | React.JSX.Element;
|
|
19
|
-
renderItem(option: EditorNodeType, index: number, type?: 'dialog' | 'dialogView'): React.JSX.Element
|
|
22
|
+
renderItem(option: EditorNodeType, index: number, type?: 'dialog' | 'dialogView', indent?: number): React.JSX.Element;
|
|
23
|
+
renderDropItem(option: EditorNodeType, index: number): any;
|
|
20
24
|
getDialogNodeLabel(option: EditorNodeType, type?: 'dialog' | 'dialogView'): string;
|
|
21
25
|
getDialogLabel(option: any, isNode: boolean, title?: 'title' | 'dialogTitle'): string;
|
|
22
26
|
renderDialogItem(option: any, index: number): React.JSX.Element;
|
|
@@ -7,6 +7,7 @@ interface RightPanelsProps {
|
|
|
7
7
|
theme?: string;
|
|
8
8
|
appLocale?: string;
|
|
9
9
|
amisEnv?: any;
|
|
10
|
+
readonly?: boolean;
|
|
10
11
|
}
|
|
11
12
|
interface RightPanelsStates {
|
|
12
13
|
isOpenStatus: boolean;
|
|
@@ -18,6 +19,7 @@ export declare class RightPanels extends React.Component<RightPanelsProps, Right
|
|
|
18
19
|
handleSelect(key: string): void;
|
|
19
20
|
handleHidden(): void;
|
|
20
21
|
getPopOverContainer(): HTMLElement;
|
|
22
|
+
handlePanelChangeValue(...arg: Parameters<typeof this.props.manager.panelChangeValue>): void;
|
|
21
23
|
render(): React.JSX.Element | null;
|
|
22
24
|
}
|
|
23
25
|
export {};
|
|
@@ -16,6 +16,7 @@ export interface PreviewProps {
|
|
|
16
16
|
data?: any;
|
|
17
17
|
autoFocus?: boolean;
|
|
18
18
|
toolbarContainer?: () => any;
|
|
19
|
+
readonly?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export interface PreviewState {
|
|
21
22
|
ready?: boolean;
|
|
@@ -52,6 +53,7 @@ export default class Preview extends Component<PreviewProps> {
|
|
|
52
53
|
handleDragLeave(e: React.DragEvent): void;
|
|
53
54
|
handleDragOver(e: React.DragEvent): void;
|
|
54
55
|
handleDrop(e: React.DragEvent): void;
|
|
56
|
+
handleWidgetsDragEnter(e: React.DragEvent): void;
|
|
55
57
|
getCurrentTarget(): HTMLDivElement;
|
|
56
58
|
rendererResolver(path: string, schema: Schema, props: any): RendererConfig;
|
|
57
59
|
render(): React.JSX.Element;
|
|
@@ -26,6 +26,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
26
26
|
parentId: string;
|
|
27
27
|
parentRegion: string;
|
|
28
28
|
isCommonConfig: boolean;
|
|
29
|
+
isFormConfig: boolean;
|
|
29
30
|
id: string;
|
|
30
31
|
type: string;
|
|
31
32
|
label: string;
|
|
@@ -52,6 +53,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
52
53
|
} & {
|
|
53
54
|
readonly info: RendererInfo;
|
|
54
55
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
56
|
+
getNodeByComponentId(id: string): any;
|
|
55
57
|
setInfo(value: RendererInfo): void;
|
|
56
58
|
updateSharedContext(value: Record<string, any>): void;
|
|
57
59
|
readonly rendererConfig: any;
|
|
@@ -88,6 +90,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
88
90
|
parentId: string;
|
|
89
91
|
parentRegion: string;
|
|
90
92
|
isCommonConfig: boolean;
|
|
93
|
+
isFormConfig: boolean;
|
|
91
94
|
id: string;
|
|
92
95
|
type: string;
|
|
93
96
|
label: string;
|
|
@@ -114,6 +117,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
114
117
|
} & {
|
|
115
118
|
readonly info: RendererInfo;
|
|
116
119
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
120
|
+
getNodeByComponentId(id: string): any;
|
|
117
121
|
setInfo(value: RendererInfo): void;
|
|
118
122
|
updateSharedContext(value: Record<string, any>): void;
|
|
119
123
|
readonly rendererConfig: any;
|
|
@@ -149,6 +153,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
149
153
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
150
154
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
151
155
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
156
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
152
157
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
153
158
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
154
159
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -175,6 +180,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
175
180
|
} & {
|
|
176
181
|
readonly info: RendererInfo;
|
|
177
182
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
183
|
+
getNodeByComponentId(id: string): any;
|
|
178
184
|
setInfo(value: RendererInfo): void;
|
|
179
185
|
updateSharedContext(value: Record<string, any>): void;
|
|
180
186
|
readonly rendererConfig: any;
|
|
@@ -211,6 +217,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
211
217
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
212
218
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
213
219
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
220
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
214
221
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
215
222
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
216
223
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -236,6 +243,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
236
243
|
parentId: string;
|
|
237
244
|
parentRegion: string;
|
|
238
245
|
isCommonConfig: boolean;
|
|
246
|
+
isFormConfig: boolean;
|
|
239
247
|
id: string;
|
|
240
248
|
type: string;
|
|
241
249
|
label: string;
|
|
@@ -262,6 +270,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
262
270
|
} & {
|
|
263
271
|
readonly info: RendererInfo;
|
|
264
272
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
273
|
+
getNodeByComponentId(id: string): any;
|
|
265
274
|
setInfo(value: RendererInfo): void;
|
|
266
275
|
updateSharedContext(value: Record<string, any>): void;
|
|
267
276
|
readonly rendererConfig: any;
|
|
@@ -297,6 +306,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
297
306
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
298
307
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
299
308
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
309
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
300
310
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
301
311
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
302
312
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -323,6 +333,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
323
333
|
} & {
|
|
324
334
|
readonly info: RendererInfo;
|
|
325
335
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
336
|
+
getNodeByComponentId(id: string): any;
|
|
326
337
|
setInfo(value: RendererInfo): void;
|
|
327
338
|
updateSharedContext(value: Record<string, any>): void;
|
|
328
339
|
readonly rendererConfig: any;
|
|
@@ -356,12 +367,14 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
356
367
|
readonly isSecondFactor: boolean;
|
|
357
368
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
358
369
|
updateIsCommonConfig: (value: boolean) => void;
|
|
370
|
+
updateIsFormConfig: (value: boolean) => void;
|
|
359
371
|
addChild(props: {
|
|
360
372
|
id: string;
|
|
361
373
|
type: string;
|
|
362
374
|
label: string;
|
|
363
375
|
path: string;
|
|
364
376
|
isCommonConfig?: boolean | undefined;
|
|
377
|
+
isFormConfig?: boolean | undefined;
|
|
365
378
|
info?: RendererInfo | undefined;
|
|
366
379
|
region?: string | undefined;
|
|
367
380
|
getData?: (() => any) | undefined;
|
|
@@ -380,6 +393,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
380
393
|
updateSchemaStyle(value: any): void;
|
|
381
394
|
setComponent(value: any): void;
|
|
382
395
|
getComponent(): any;
|
|
396
|
+
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
383
397
|
calculateHighlightBox(root?: any): void;
|
|
384
398
|
resetHighlightBox(root: any): void;
|
|
385
399
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -389,6 +403,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
389
403
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
390
404
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
391
405
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
406
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
392
407
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
393
408
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
394
409
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -415,6 +430,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
415
430
|
} & {
|
|
416
431
|
readonly info: RendererInfo;
|
|
417
432
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
433
|
+
getNodeByComponentId(id: string): any;
|
|
418
434
|
setInfo(value: RendererInfo): void;
|
|
419
435
|
updateSharedContext(value: Record<string, any>): void;
|
|
420
436
|
readonly rendererConfig: any;
|
|
@@ -451,6 +467,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
451
467
|
parentId: string;
|
|
452
468
|
parentRegion: string;
|
|
453
469
|
isCommonConfig: boolean;
|
|
470
|
+
isFormConfig: boolean;
|
|
454
471
|
id: string;
|
|
455
472
|
type: string;
|
|
456
473
|
label: string;
|
|
@@ -477,6 +494,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
477
494
|
} & {
|
|
478
495
|
readonly info: RendererInfo;
|
|
479
496
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
497
|
+
getNodeByComponentId(id: string): any;
|
|
480
498
|
setInfo(value: RendererInfo): void;
|
|
481
499
|
updateSharedContext(value: Record<string, any>): void;
|
|
482
500
|
readonly rendererConfig: any;
|
|
@@ -512,6 +530,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
512
530
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
513
531
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
514
532
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
533
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
515
534
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
516
535
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
517
536
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -538,6 +557,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
538
557
|
} & {
|
|
539
558
|
readonly info: RendererInfo;
|
|
540
559
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
560
|
+
getNodeByComponentId(id: string): any;
|
|
541
561
|
setInfo(value: RendererInfo): void;
|
|
542
562
|
updateSharedContext(value: Record<string, any>): void;
|
|
543
563
|
readonly rendererConfig: any;
|
|
@@ -574,6 +594,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
574
594
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
575
595
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
576
596
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
597
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
577
598
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
578
599
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
579
600
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -599,6 +620,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
599
620
|
parentId: string;
|
|
600
621
|
parentRegion: string;
|
|
601
622
|
isCommonConfig: boolean;
|
|
623
|
+
isFormConfig: boolean;
|
|
602
624
|
id: string;
|
|
603
625
|
type: string;
|
|
604
626
|
label: string;
|
|
@@ -625,6 +647,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
625
647
|
} & {
|
|
626
648
|
readonly info: RendererInfo;
|
|
627
649
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
650
|
+
getNodeByComponentId(id: string): any;
|
|
628
651
|
setInfo(value: RendererInfo): void;
|
|
629
652
|
updateSharedContext(value: Record<string, any>): void;
|
|
630
653
|
readonly rendererConfig: any;
|
|
@@ -660,6 +683,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
660
683
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
661
684
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
662
685
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
686
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
663
687
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
664
688
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
665
689
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -686,6 +710,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
686
710
|
} & {
|
|
687
711
|
readonly info: RendererInfo;
|
|
688
712
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
713
|
+
getNodeByComponentId(id: string): any;
|
|
689
714
|
setInfo(value: RendererInfo): void;
|
|
690
715
|
updateSharedContext(value: Record<string, any>): void;
|
|
691
716
|
readonly rendererConfig: any;
|
|
@@ -719,12 +744,14 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
719
744
|
readonly isSecondFactor: boolean;
|
|
720
745
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
721
746
|
updateIsCommonConfig: (value: boolean) => void;
|
|
747
|
+
updateIsFormConfig: (value: boolean) => void;
|
|
722
748
|
addChild(props: {
|
|
723
749
|
id: string;
|
|
724
750
|
type: string;
|
|
725
751
|
label: string;
|
|
726
752
|
path: string;
|
|
727
753
|
isCommonConfig?: boolean | undefined;
|
|
754
|
+
isFormConfig?: boolean | undefined;
|
|
728
755
|
info?: RendererInfo | undefined;
|
|
729
756
|
region?: string | undefined;
|
|
730
757
|
getData?: (() => any) | undefined;
|
|
@@ -743,6 +770,7 @@ export declare class RegionWrapper extends React.Component<RegionWrapperProps> {
|
|
|
743
770
|
updateSchemaStyle(value: any): void;
|
|
744
771
|
setComponent(value: any): void;
|
|
745
772
|
getComponent(): any;
|
|
773
|
+
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
746
774
|
calculateHighlightBox(root?: any): void;
|
|
747
775
|
resetHighlightBox(root: any): void;
|
|
748
776
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -8,6 +8,7 @@ export interface SubEditorProps {
|
|
|
8
8
|
manager: EditorManager;
|
|
9
9
|
theme?: string;
|
|
10
10
|
amisEnv?: RenderOptions;
|
|
11
|
+
readonly?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare class SubEditor extends React.Component<SubEditorProps> {
|
|
13
14
|
afterResolveEditorInfo(event: PluginEvent<RendererInfoResolveEventContext>): void;
|
|
@@ -20,6 +21,7 @@ export declare class SubEditor extends React.Component<SubEditorProps> {
|
|
|
20
21
|
body: {
|
|
21
22
|
type: string;
|
|
22
23
|
mode: string;
|
|
24
|
+
wrapWithPanel: boolean;
|
|
23
25
|
wrapperComponent: string;
|
|
24
26
|
onValidate: (value: any) => Promise<{
|
|
25
27
|
schema: string;
|
|
@@ -38,6 +40,7 @@ export declare class SubEditor extends React.Component<SubEditorProps> {
|
|
|
38
40
|
type: string;
|
|
39
41
|
tpl: string;
|
|
40
42
|
mode?: undefined;
|
|
43
|
+
wrapWithPanel?: undefined;
|
|
41
44
|
wrapperComponent?: undefined;
|
|
42
45
|
onValidate?: undefined;
|
|
43
46
|
onChange?: undefined;
|