11import { action , makeObservable , obx , engineConfig , IEditor , FocusTracker } from '@alilc/lowcode-editor-core' ;
22import {
33 DockConfig ,
4- PanelConfig ,
54 WidgetConfig ,
65 PanelDockConfig ,
76 DialogDockConfig ,
@@ -29,6 +28,7 @@ import {
2928 IPublicTypeSkeletonConfig ,
3029 IPublicApiSkeleton ,
3130 IPublicTypeConfigTransducer ,
31+ IPublicTypePanelConfig ,
3232} from '@alilc/lowcode-types' ;
3333
3434const logger = new Logger ( { level : 'warn' , bizName : 'skeleton' } ) ;
@@ -70,15 +70,15 @@ export interface ISkeleton extends Omit<IPublicApiSkeleton,
7070
7171 readonly toolbar : Area < DockConfig | DividerConfig | PanelDockConfig | DialogDockConfig > ;
7272
73- readonly leftFixedArea : Area < PanelConfig , Panel > ;
73+ readonly leftFixedArea : Area < IPublicTypePanelConfig , Panel > ;
7474
75- readonly leftFloatArea : Area < PanelConfig , Panel > ;
75+ readonly leftFloatArea : Area < IPublicTypePanelConfig , Panel > ;
7676
77- readonly rightArea : Area < PanelConfig , Panel > ;
77+ readonly rightArea : Area < IPublicTypePanelConfig , Panel > ;
7878
79- readonly mainArea : Area < WidgetConfig | PanelConfig , Widget | Panel > ;
79+ readonly mainArea : Area < WidgetConfig | IPublicTypePanelConfig , Widget | Panel > ;
8080
81- readonly bottomArea : Area < PanelConfig , Panel > ;
81+ readonly bottomArea : Area < IPublicTypePanelConfig , Panel > ;
8282
8383 readonly stages : Area < StageConfig , Stage > ;
8484
@@ -104,7 +104,7 @@ export interface ISkeleton extends Omit<IPublicApiSkeleton,
104104 defaultSetCurrent ?: boolean ,
105105 ) : WidgetContainer ;
106106
107- createPanel ( config : PanelConfig ) : Panel ;
107+ createPanel ( config : IPublicTypePanelConfig ) : Panel ;
108108
109109 add ( config : IPublicTypeSkeletonConfig , extraConfig ?: Record < string , any > ) : IWidget | Widget | Panel | Stage | Dock | PanelDock | undefined ;
110110}
@@ -124,15 +124,15 @@ export class Skeleton implements ISkeleton {
124124
125125 readonly toolbar : Area < DockConfig | DividerConfig | PanelDockConfig | DialogDockConfig > ;
126126
127- readonly leftFixedArea : Area < PanelConfig , Panel > ;
127+ readonly leftFixedArea : Area < IPublicTypePanelConfig , Panel > ;
128128
129- readonly leftFloatArea : Area < PanelConfig , Panel > ;
129+ readonly leftFloatArea : Area < IPublicTypePanelConfig , Panel > ;
130130
131- readonly rightArea : Area < PanelConfig , Panel > ;
131+ readonly rightArea : Area < IPublicTypePanelConfig , Panel > ;
132132
133- @obx readonly mainArea : Area < WidgetConfig | PanelConfig , Widget | Panel > ;
133+ @obx readonly mainArea : Area < WidgetConfig | IPublicTypePanelConfig , Widget | Panel > ;
134134
135- readonly bottomArea : Area < PanelConfig , Panel > ;
135+ readonly bottomArea : Area < IPublicTypePanelConfig , Panel > ;
136136
137137 readonly stages : Area < StageConfig , Stage > ;
138138
@@ -388,9 +388,9 @@ export class Skeleton implements ISkeleton {
388388 return this . widgets . find ( widget => widget . name === name ) ;
389389 }
390390
391- createPanel ( config : PanelConfig ) {
391+ createPanel ( config : IPublicTypePanelConfig ) {
392392 const parsedConfig = this . parseConfig ( config ) ;
393- const panel = new Panel ( this , parsedConfig as PanelConfig ) ;
393+ const panel = new Panel ( this , parsedConfig as IPublicTypePanelConfig ) ;
394394 this . panels . set ( panel . name , panel ) ;
395395 logger . debug ( `Panel created with name: ${ panel . name } \nconfig:` , config , '\n current panels: ' , this . panels ) ;
396396 return panel ;
@@ -496,7 +496,7 @@ export class Skeleton implements ISkeleton {
496496 return this . leftArea . add ( parsedConfig as PanelDockConfig ) ;
497497 case 'rightArea' :
498498 case 'right' :
499- return this . rightArea . add ( parsedConfig as PanelConfig ) ;
499+ return this . rightArea . add ( parsedConfig as IPublicTypePanelConfig ) ;
500500 case 'topArea' :
501501 case 'top' :
502502 return this . topArea . add ( parsedConfig as PanelDockConfig ) ;
@@ -508,14 +508,14 @@ export class Skeleton implements ISkeleton {
508508 case 'main' :
509509 case 'center' :
510510 case 'centerArea' :
511- return this . mainArea . add ( parsedConfig as PanelConfig ) ;
511+ return this . mainArea . add ( parsedConfig as IPublicTypePanelConfig ) ;
512512 case 'bottomArea' :
513513 case 'bottom' :
514- return this . bottomArea . add ( parsedConfig as PanelConfig ) ;
514+ return this . bottomArea . add ( parsedConfig as IPublicTypePanelConfig ) ;
515515 case 'leftFixedArea' :
516- return this . leftFixedArea . add ( parsedConfig as PanelConfig ) ;
516+ return this . leftFixedArea . add ( parsedConfig as IPublicTypePanelConfig ) ;
517517 case 'leftFloatArea' :
518- return this . leftFloatArea . add ( parsedConfig as PanelConfig ) ;
518+ return this . leftFloatArea . add ( parsedConfig as IPublicTypePanelConfig ) ;
519519 case 'stages' :
520520 return this . stages . add ( parsedConfig as StageConfig ) ;
521521 default :
0 commit comments