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/lib/manager.d.ts CHANGED
@@ -70,6 +70,7 @@ export declare class EditorManager {
70
70
  parentId: string;
71
71
  parentRegion: string;
72
72
  isCommonConfig: boolean;
73
+ isFormConfig: boolean;
73
74
  id: string;
74
75
  type: string;
75
76
  label: string;
@@ -96,6 +97,7 @@ export declare class EditorManager {
96
97
  } & {
97
98
  readonly info: RendererInfo;
98
99
  getNodeById(id: string, regionOrType?: string | undefined): any;
100
+ getNodeByComponentId(id: string): any;
99
101
  setInfo(value: RendererInfo): void;
100
102
  updateSharedContext(value: Record<string, any>): void;
101
103
  readonly rendererConfig: any;
@@ -113,7 +115,7 @@ export declare class EditorManager {
113
115
  readonly isRegion: boolean;
114
116
  readonly childRegions: any[];
115
117
  readonly uniqueChildren: any[];
116
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
118
+ readonly sameIdChild: any;
117
119
  readonly singleRegion: boolean;
118
120
  isExists(id: string): boolean;
119
121
  getChildById(id: string): any;
@@ -132,6 +134,7 @@ export declare class EditorManager {
132
134
  parentId: string;
133
135
  parentRegion: string;
134
136
  isCommonConfig: boolean;
137
+ isFormConfig: boolean;
135
138
  id: string;
136
139
  type: string;
137
140
  label: string;
@@ -158,6 +161,7 @@ export declare class EditorManager {
158
161
  } & {
159
162
  readonly info: RendererInfo;
160
163
  getNodeById(id: string, regionOrType?: string | undefined): any;
164
+ getNodeByComponentId(id: string): any;
161
165
  setInfo(value: RendererInfo): void;
162
166
  updateSharedContext(value: Record<string, any>): void;
163
167
  readonly rendererConfig: any;
@@ -175,7 +179,7 @@ export declare class EditorManager {
175
179
  readonly isRegion: boolean;
176
180
  readonly childRegions: any[];
177
181
  readonly uniqueChildren: any[];
178
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
182
+ readonly sameIdChild: any;
179
183
  readonly singleRegion: boolean;
180
184
  isExists(id: string): boolean;
181
185
  getChildById(id: string): any;
@@ -193,6 +197,7 @@ export declare class EditorManager {
193
197
  parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
194
198
  parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
195
199
  isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
200
+ isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
196
201
  id: import("mobx-state-tree").IType<string | undefined, string, string>;
197
202
  type: import("mobx-state-tree").IType<string | undefined, string, string>;
198
203
  label: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -219,6 +224,7 @@ export declare class EditorManager {
219
224
  } & {
220
225
  readonly info: RendererInfo;
221
226
  getNodeById(id: string, regionOrType?: string | undefined): any;
227
+ getNodeByComponentId(id: string): any;
222
228
  setInfo(value: RendererInfo): void;
223
229
  updateSharedContext(value: Record<string, any>): void;
224
230
  readonly rendererConfig: any;
@@ -236,7 +242,7 @@ export declare class EditorManager {
236
242
  readonly isRegion: boolean;
237
243
  readonly childRegions: any[];
238
244
  readonly uniqueChildren: any[];
239
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
245
+ readonly sameIdChild: any;
240
246
  readonly singleRegion: boolean;
241
247
  isExists(id: string): boolean;
242
248
  getChildById(id: string): any;
@@ -255,6 +261,7 @@ export declare class EditorManager {
255
261
  parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
256
262
  parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
257
263
  isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
264
+ isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
258
265
  id: import("mobx-state-tree").IType<string | undefined, string, string>;
259
266
  type: import("mobx-state-tree").IType<string | undefined, string, string>;
260
267
  label: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -280,6 +287,7 @@ export declare class EditorManager {
280
287
  parentId: string;
281
288
  parentRegion: string;
282
289
  isCommonConfig: boolean;
290
+ isFormConfig: boolean;
283
291
  id: string;
284
292
  type: string;
285
293
  label: string;
@@ -306,6 +314,7 @@ export declare class EditorManager {
306
314
  } & {
307
315
  readonly info: RendererInfo;
308
316
  getNodeById(id: string, regionOrType?: string | undefined): any;
317
+ getNodeByComponentId(id: string): any;
309
318
  setInfo(value: RendererInfo): void;
310
319
  updateSharedContext(value: Record<string, any>): void;
311
320
  readonly rendererConfig: any;
@@ -323,7 +332,7 @@ export declare class EditorManager {
323
332
  readonly isRegion: boolean;
324
333
  readonly childRegions: any[];
325
334
  readonly uniqueChildren: any[];
326
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
335
+ readonly sameIdChild: any;
327
336
  readonly singleRegion: boolean;
328
337
  isExists(id: string): boolean;
329
338
  getChildById(id: string): any;
@@ -341,6 +350,7 @@ export declare class EditorManager {
341
350
  parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
342
351
  parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
343
352
  isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
353
+ isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
344
354
  id: import("mobx-state-tree").IType<string | undefined, string, string>;
345
355
  type: import("mobx-state-tree").IType<string | undefined, string, string>;
346
356
  label: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -367,6 +377,7 @@ export declare class EditorManager {
367
377
  } & {
368
378
  readonly info: RendererInfo;
369
379
  getNodeById(id: string, regionOrType?: string | undefined): any;
380
+ getNodeByComponentId(id: string): any;
370
381
  setInfo(value: RendererInfo): void;
371
382
  updateSharedContext(value: Record<string, any>): void;
372
383
  readonly rendererConfig: any;
@@ -384,7 +395,7 @@ export declare class EditorManager {
384
395
  readonly isRegion: boolean;
385
396
  readonly childRegions: any[];
386
397
  readonly uniqueChildren: any[];
387
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
398
+ readonly sameIdChild: any;
388
399
  readonly singleRegion: boolean;
389
400
  isExists(id: string): boolean;
390
401
  getChildById(id: string): any;
@@ -400,12 +411,14 @@ export declare class EditorManager {
400
411
  readonly isSecondFactor: boolean;
401
412
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
402
413
  updateIsCommonConfig: (value: boolean) => void;
414
+ updateIsFormConfig: (value: boolean) => void;
403
415
  addChild(props: {
404
416
  id: string;
405
417
  type: string;
406
418
  label: string;
407
419
  path: string;
408
420
  isCommonConfig?: boolean | undefined;
421
+ isFormConfig?: boolean | undefined;
409
422
  info?: RendererInfo | undefined;
410
423
  region?: string | undefined;
411
424
  getData?: (() => any) | undefined;
@@ -424,6 +437,7 @@ export declare class EditorManager {
424
437
  updateSchemaStyle(value: any): void;
425
438
  setComponent(value: any): void;
426
439
  getComponent(): any;
440
+ getTarget(): HTMLElement | HTMLElement[] | null;
427
441
  calculateHighlightBox(root?: any): void;
428
442
  resetHighlightBox(root: any): void;
429
443
  updateState(state: any, replace?: boolean): void;
@@ -433,6 +447,7 @@ export declare class EditorManager {
433
447
  parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
434
448
  parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
435
449
  isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
450
+ isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
436
451
  id: import("mobx-state-tree").IType<string | undefined, string, string>;
437
452
  type: import("mobx-state-tree").IType<string | undefined, string, string>;
438
453
  label: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -459,6 +474,7 @@ export declare class EditorManager {
459
474
  } & {
460
475
  readonly info: RendererInfo;
461
476
  getNodeById(id: string, regionOrType?: string | undefined): any;
477
+ getNodeByComponentId(id: string): any;
462
478
  setInfo(value: RendererInfo): void;
463
479
  updateSharedContext(value: Record<string, any>): void;
464
480
  readonly rendererConfig: any;
@@ -476,7 +492,7 @@ export declare class EditorManager {
476
492
  readonly isRegion: boolean;
477
493
  readonly childRegions: any[];
478
494
  readonly uniqueChildren: any[];
479
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
495
+ readonly sameIdChild: any;
480
496
  readonly singleRegion: boolean;
481
497
  isExists(id: string): boolean;
482
498
  getChildById(id: string): any;
@@ -495,6 +511,7 @@ export declare class EditorManager {
495
511
  parentId: string;
496
512
  parentRegion: string;
497
513
  isCommonConfig: boolean;
514
+ isFormConfig: boolean;
498
515
  id: string;
499
516
  type: string;
500
517
  label: string;
@@ -521,6 +538,7 @@ export declare class EditorManager {
521
538
  } & {
522
539
  readonly info: RendererInfo;
523
540
  getNodeById(id: string, regionOrType?: string | undefined): any;
541
+ getNodeByComponentId(id: string): any;
524
542
  setInfo(value: RendererInfo): void;
525
543
  updateSharedContext(value: Record<string, any>): void;
526
544
  readonly rendererConfig: any;
@@ -538,7 +556,7 @@ export declare class EditorManager {
538
556
  readonly isRegion: boolean;
539
557
  readonly childRegions: any[];
540
558
  readonly uniqueChildren: any[];
541
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
559
+ readonly sameIdChild: any;
542
560
  readonly singleRegion: boolean;
543
561
  isExists(id: string): boolean;
544
562
  getChildById(id: string): any;
@@ -556,6 +574,7 @@ export declare class EditorManager {
556
574
  parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
557
575
  parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
558
576
  isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
577
+ isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
559
578
  id: import("mobx-state-tree").IType<string | undefined, string, string>;
560
579
  type: import("mobx-state-tree").IType<string | undefined, string, string>;
561
580
  label: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -582,6 +601,7 @@ export declare class EditorManager {
582
601
  } & {
583
602
  readonly info: RendererInfo;
584
603
  getNodeById(id: string, regionOrType?: string | undefined): any;
604
+ getNodeByComponentId(id: string): any;
585
605
  setInfo(value: RendererInfo): void;
586
606
  updateSharedContext(value: Record<string, any>): void;
587
607
  readonly rendererConfig: any;
@@ -599,7 +619,7 @@ export declare class EditorManager {
599
619
  readonly isRegion: boolean;
600
620
  readonly childRegions: any[];
601
621
  readonly uniqueChildren: any[];
602
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
622
+ readonly sameIdChild: any;
603
623
  readonly singleRegion: boolean;
604
624
  isExists(id: string): boolean;
605
625
  getChildById(id: string): any;
@@ -618,6 +638,7 @@ export declare class EditorManager {
618
638
  parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
619
639
  parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
620
640
  isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
641
+ isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
621
642
  id: import("mobx-state-tree").IType<string | undefined, string, string>;
622
643
  type: import("mobx-state-tree").IType<string | undefined, string, string>;
623
644
  label: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -643,6 +664,7 @@ export declare class EditorManager {
643
664
  parentId: string;
644
665
  parentRegion: string;
645
666
  isCommonConfig: boolean;
667
+ isFormConfig: boolean;
646
668
  id: string;
647
669
  type: string;
648
670
  label: string;
@@ -669,6 +691,7 @@ export declare class EditorManager {
669
691
  } & {
670
692
  readonly info: RendererInfo;
671
693
  getNodeById(id: string, regionOrType?: string | undefined): any;
694
+ getNodeByComponentId(id: string): any;
672
695
  setInfo(value: RendererInfo): void;
673
696
  updateSharedContext(value: Record<string, any>): void;
674
697
  readonly rendererConfig: any;
@@ -686,7 +709,7 @@ export declare class EditorManager {
686
709
  readonly isRegion: boolean;
687
710
  readonly childRegions: any[];
688
711
  readonly uniqueChildren: any[];
689
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
712
+ readonly sameIdChild: any;
690
713
  readonly singleRegion: boolean;
691
714
  isExists(id: string): boolean;
692
715
  getChildById(id: string): any;
@@ -704,6 +727,7 @@ export declare class EditorManager {
704
727
  parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
705
728
  parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
706
729
  isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
730
+ isFormConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
707
731
  id: import("mobx-state-tree").IType<string | undefined, string, string>;
708
732
  type: import("mobx-state-tree").IType<string | undefined, string, string>;
709
733
  label: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -730,6 +754,7 @@ export declare class EditorManager {
730
754
  } & {
731
755
  readonly info: RendererInfo;
732
756
  getNodeById(id: string, regionOrType?: string | undefined): any;
757
+ getNodeByComponentId(id: string): any;
733
758
  setInfo(value: RendererInfo): void;
734
759
  updateSharedContext(value: Record<string, any>): void;
735
760
  readonly rendererConfig: any;
@@ -747,7 +772,7 @@ export declare class EditorManager {
747
772
  readonly isRegion: boolean;
748
773
  readonly childRegions: any[];
749
774
  readonly uniqueChildren: any[];
750
- readonly sameIdChild: any; /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */
775
+ readonly sameIdChild: any;
751
776
  readonly singleRegion: boolean;
752
777
  isExists(id: string): boolean;
753
778
  getChildById(id: string): any;
@@ -763,12 +788,14 @@ export declare class EditorManager {
763
788
  readonly isSecondFactor: boolean;
764
789
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
765
790
  updateIsCommonConfig: (value: boolean) => void;
791
+ updateIsFormConfig: (value: boolean) => void;
766
792
  addChild(props: {
767
793
  id: string;
768
794
  type: string;
769
795
  label: string;
770
796
  path: string;
771
797
  isCommonConfig?: boolean | undefined;
798
+ isFormConfig?: boolean | undefined;
772
799
  info?: RendererInfo | undefined;
773
800
  region?: string | undefined;
774
801
  getData?: (() => any) | undefined;
@@ -787,6 +814,7 @@ export declare class EditorManager {
787
814
  updateSchemaStyle(value: any): void;
788
815
  setComponent(value: any): void;
789
816
  getComponent(): any;
817
+ getTarget(): HTMLElement | HTMLElement[] | null;
790
818
  calculateHighlightBox(root?: any): void;
791
819
  resetHighlightBox(root: any): void;
792
820
  updateState(state: any, replace?: boolean): void;
@@ -961,9 +989,9 @@ export declare class EditorManager {
961
989
  */
962
990
  paste(id: string, region?: string): Promise<void>;
963
991
  /**
964
- * 重新生成当前节点的 id
992
+ * 重新生成当前节点的重复的id
965
993
  */
966
- reGenerateCurrentNodeID(): void;
994
+ reGenerateNodeDuplicateID(types?: Array<string>): void;
967
995
  /**
968
996
  * 清空区域
969
997
  * @param id
package/lib/plugin.d.ts CHANGED
@@ -703,6 +703,8 @@ export declare abstract class BasePlugin implements PluginInterface {
703
703
  readonly manager: EditorManager;
704
704
  constructor(manager: EditorManager);
705
705
  static scene: string[];
706
+ name?: string;
707
+ rendererName?: string;
706
708
  /**
707
709
  * 如果配置里面有 rendererName 自动返回渲染器信息。
708
710
  * @param renderer
@@ -731,6 +733,10 @@ export declare abstract class BasePlugin implements PluginInterface {
731
733
  }, HTMLElement>;
732
734
  getPlugin(rendererNameOrKlass: string | typeof BasePlugin): PluginInterface | undefined;
733
735
  buildDataSchemas(node: EditorNodeType, region?: EditorNodeType, trigger?: EditorNodeType, parent?: EditorNodeType): any;
736
+ getKeyAndName(): {
737
+ key: string | undefined;
738
+ name: string | undefined;
739
+ };
734
740
  }
735
741
  /**
736
742
  * 布局相关组件基类,带宽高可拖拽功能。