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
|
@@ -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;
|
|
@@ -12,6 +12,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
12
12
|
parentId: string;
|
|
13
13
|
parentRegion: string;
|
|
14
14
|
isCommonConfig: boolean;
|
|
15
|
+
isFormConfig: boolean;
|
|
15
16
|
id: string;
|
|
16
17
|
type: string;
|
|
17
18
|
label: string;
|
|
@@ -38,6 +39,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
38
39
|
} & {
|
|
39
40
|
readonly info: RendererInfo;
|
|
40
41
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
42
|
+
getNodeByComponentId(id: string): any;
|
|
41
43
|
setInfo(value: RendererInfo): void;
|
|
42
44
|
updateSharedContext(value: Record<string, any>): void;
|
|
43
45
|
readonly rendererConfig: any;
|
|
@@ -74,6 +76,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
74
76
|
parentId: string;
|
|
75
77
|
parentRegion: string;
|
|
76
78
|
isCommonConfig: boolean;
|
|
79
|
+
isFormConfig: boolean;
|
|
77
80
|
id: string;
|
|
78
81
|
type: string;
|
|
79
82
|
label: string;
|
|
@@ -100,6 +103,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
100
103
|
} & {
|
|
101
104
|
readonly info: RendererInfo;
|
|
102
105
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
106
|
+
getNodeByComponentId(id: string): any;
|
|
103
107
|
setInfo(value: RendererInfo): void;
|
|
104
108
|
updateSharedContext(value: Record<string, any>): void;
|
|
105
109
|
readonly rendererConfig: any;
|
|
@@ -135,6 +139,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
135
139
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
136
140
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
137
141
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
142
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
138
143
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
139
144
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
140
145
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -161,6 +166,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
161
166
|
} & {
|
|
162
167
|
readonly info: RendererInfo;
|
|
163
168
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
169
|
+
getNodeByComponentId(id: string): any;
|
|
164
170
|
setInfo(value: RendererInfo): void;
|
|
165
171
|
updateSharedContext(value: Record<string, any>): void;
|
|
166
172
|
readonly rendererConfig: any;
|
|
@@ -197,6 +203,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
197
203
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
198
204
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
199
205
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
206
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
200
207
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
201
208
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
202
209
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -222,6 +229,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
222
229
|
parentId: string;
|
|
223
230
|
parentRegion: string;
|
|
224
231
|
isCommonConfig: boolean;
|
|
232
|
+
isFormConfig: boolean;
|
|
225
233
|
id: string;
|
|
226
234
|
type: string;
|
|
227
235
|
label: string;
|
|
@@ -248,6 +256,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
248
256
|
} & {
|
|
249
257
|
readonly info: RendererInfo;
|
|
250
258
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
259
|
+
getNodeByComponentId(id: string): any;
|
|
251
260
|
setInfo(value: RendererInfo): void;
|
|
252
261
|
updateSharedContext(value: Record<string, any>): void;
|
|
253
262
|
readonly rendererConfig: any;
|
|
@@ -283,6 +292,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
283
292
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
284
293
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
285
294
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
295
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
286
296
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
287
297
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
288
298
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -309,6 +319,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
309
319
|
} & {
|
|
310
320
|
readonly info: RendererInfo;
|
|
311
321
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
322
|
+
getNodeByComponentId(id: string): any;
|
|
312
323
|
setInfo(value: RendererInfo): void;
|
|
313
324
|
updateSharedContext(value: Record<string, any>): void;
|
|
314
325
|
readonly rendererConfig: any;
|
|
@@ -342,12 +353,14 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
342
353
|
readonly isSecondFactor: boolean;
|
|
343
354
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
344
355
|
updateIsCommonConfig: (value: boolean) => void;
|
|
356
|
+
updateIsFormConfig: (value: boolean) => void;
|
|
345
357
|
addChild(props: {
|
|
346
358
|
id: string;
|
|
347
359
|
type: string;
|
|
348
360
|
label: string;
|
|
349
361
|
path: string;
|
|
350
362
|
isCommonConfig?: boolean | undefined;
|
|
363
|
+
isFormConfig?: boolean | undefined;
|
|
351
364
|
info?: RendererInfo | undefined;
|
|
352
365
|
region?: string | undefined;
|
|
353
366
|
getData?: (() => any) | undefined;
|
|
@@ -366,6 +379,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
366
379
|
updateSchemaStyle(value: any): void;
|
|
367
380
|
setComponent(value: any): void;
|
|
368
381
|
getComponent(): any;
|
|
382
|
+
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
369
383
|
calculateHighlightBox(root?: any): void;
|
|
370
384
|
resetHighlightBox(root: any): void;
|
|
371
385
|
updateState(state: any, replace?: boolean): void;
|
|
@@ -375,6 +389,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
375
389
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
376
390
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
377
391
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
392
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
378
393
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
379
394
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
380
395
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -401,6 +416,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
401
416
|
} & {
|
|
402
417
|
readonly info: RendererInfo;
|
|
403
418
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
419
|
+
getNodeByComponentId(id: string): any;
|
|
404
420
|
setInfo(value: RendererInfo): void;
|
|
405
421
|
updateSharedContext(value: Record<string, any>): void;
|
|
406
422
|
readonly rendererConfig: any;
|
|
@@ -437,6 +453,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
437
453
|
parentId: string;
|
|
438
454
|
parentRegion: string;
|
|
439
455
|
isCommonConfig: boolean;
|
|
456
|
+
isFormConfig: boolean;
|
|
440
457
|
id: string;
|
|
441
458
|
type: string;
|
|
442
459
|
label: string;
|
|
@@ -463,6 +480,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
463
480
|
} & {
|
|
464
481
|
readonly info: RendererInfo;
|
|
465
482
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
483
|
+
getNodeByComponentId(id: string): any;
|
|
466
484
|
setInfo(value: RendererInfo): void;
|
|
467
485
|
updateSharedContext(value: Record<string, any>): void;
|
|
468
486
|
readonly rendererConfig: any;
|
|
@@ -498,6 +516,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
498
516
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
499
517
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
500
518
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
519
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
501
520
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
502
521
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
503
522
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -524,6 +543,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
524
543
|
} & {
|
|
525
544
|
readonly info: RendererInfo;
|
|
526
545
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
546
|
+
getNodeByComponentId(id: string): any;
|
|
527
547
|
setInfo(value: RendererInfo): void;
|
|
528
548
|
updateSharedContext(value: Record<string, any>): void;
|
|
529
549
|
readonly rendererConfig: any;
|
|
@@ -560,6 +580,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
560
580
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
561
581
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
562
582
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
583
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
563
584
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
564
585
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
565
586
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -585,6 +606,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
585
606
|
parentId: string;
|
|
586
607
|
parentRegion: string;
|
|
587
608
|
isCommonConfig: boolean;
|
|
609
|
+
isFormConfig: boolean;
|
|
588
610
|
id: string;
|
|
589
611
|
type: string;
|
|
590
612
|
label: string;
|
|
@@ -611,6 +633,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
611
633
|
} & {
|
|
612
634
|
readonly info: RendererInfo;
|
|
613
635
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
636
|
+
getNodeByComponentId(id: string): any;
|
|
614
637
|
setInfo(value: RendererInfo): void;
|
|
615
638
|
updateSharedContext(value: Record<string, any>): void;
|
|
616
639
|
readonly rendererConfig: any;
|
|
@@ -646,6 +669,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
646
669
|
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
647
670
|
parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
648
671
|
isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
672
|
+
isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
649
673
|
id: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
650
674
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
651
675
|
label: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -672,6 +696,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
672
696
|
} & {
|
|
673
697
|
readonly info: RendererInfo;
|
|
674
698
|
getNodeById(id: string, regionOrType?: string | undefined): any;
|
|
699
|
+
getNodeByComponentId(id: string): any;
|
|
675
700
|
setInfo(value: RendererInfo): void;
|
|
676
701
|
updateSharedContext(value: Record<string, any>): void;
|
|
677
702
|
readonly rendererConfig: any;
|
|
@@ -705,12 +730,14 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
705
730
|
readonly isSecondFactor: boolean;
|
|
706
731
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
707
732
|
updateIsCommonConfig: (value: boolean) => void;
|
|
733
|
+
updateIsFormConfig: (value: boolean) => void;
|
|
708
734
|
addChild(props: {
|
|
709
735
|
id: string;
|
|
710
736
|
type: string;
|
|
711
737
|
label: string;
|
|
712
738
|
path: string;
|
|
713
739
|
isCommonConfig?: boolean | undefined;
|
|
740
|
+
isFormConfig?: boolean | undefined;
|
|
714
741
|
info?: RendererInfo | undefined;
|
|
715
742
|
region?: string | undefined;
|
|
716
743
|
getData?: (() => any) | undefined;
|
|
@@ -729,6 +756,7 @@ export declare class VRenderer extends React.Component<VRendererProps> {
|
|
|
729
756
|
updateSchemaStyle(value: any): void;
|
|
730
757
|
setComponent(value: any): void;
|
|
731
758
|
getComponent(): any;
|
|
759
|
+
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
732
760
|
calculateHighlightBox(root?: any): void;
|
|
733
761
|
resetHighlightBox(root: any): void;
|
|
734
762
|
updateState(state: any, replace?: boolean): void;
|
package/esm/dnd/index.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ export declare class EditorDNDManager {
|
|
|
32
32
|
*/
|
|
33
33
|
lastX: number;
|
|
34
34
|
lastY: number;
|
|
35
|
-
lastMoveAt: number;
|
|
36
35
|
curDragId: string;
|
|
37
36
|
startX: number;
|
|
38
37
|
startY: number;
|
|
@@ -105,16 +104,6 @@ export declare class EditorDNDManager {
|
|
|
105
104
|
id: string;
|
|
106
105
|
region: string;
|
|
107
106
|
}): void;
|
|
108
|
-
/**
|
|
109
|
-
* 自动给即将激活的区域添加高亮。
|
|
110
|
-
*/
|
|
111
|
-
updatePlanDropRegion(value: {
|
|
112
|
-
id: string;
|
|
113
|
-
region: string;
|
|
114
|
-
}, oldValue?: {
|
|
115
|
-
id: string;
|
|
116
|
-
region: string;
|
|
117
|
-
}): void;
|
|
118
107
|
/**
|
|
119
108
|
* 销毁函数。
|
|
120
109
|
*/
|